avifGuessBufferFileFormat:
  273|    196|{
  274|    196|    if (size == 0) {
  ------------------
  |  Branch (274:9): [True: 0, False: 196]
  ------------------
  275|      0|        return AVIF_APP_FILE_FORMAT_UNKNOWN;
  276|      0|    }
  277|       |
  278|    196|    avifROData header;
  279|    196|    header.data = data;
  280|    196|    header.size = size;
  281|       |
  282|    196|    if (avifPeekCompatibleFileType(&header)) {
  ------------------
  |  Branch (282:9): [True: 128, False: 68]
  ------------------
  283|    128|        return AVIF_APP_FILE_FORMAT_AVIF;
  284|    128|    }
  285|       |
  286|     68|    static const uint8_t signatureJPEG[2] = { 0xFF, 0xD8 };
  287|     68|    static const uint8_t signaturePNG[8] = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A };
  288|     68|    static const uint8_t signatureY4M[9] = { 0x59, 0x55, 0x56, 0x34, 0x4D, 0x50, 0x45, 0x47, 0x32 }; // "YUV4MPEG2"
  289|     68|    struct avifHeaderSignature
  290|     68|    {
  291|     68|        avifAppFileFormat format;
  292|     68|        const uint8_t * magic;
  293|     68|        size_t magicSize;
  294|     68|    } signatures[] = { { AVIF_APP_FILE_FORMAT_JPEG, signatureJPEG, sizeof(signatureJPEG) },
  295|     68|                       { AVIF_APP_FILE_FORMAT_PNG, signaturePNG, sizeof(signaturePNG) },
  296|     68|                       { AVIF_APP_FILE_FORMAT_Y4M, signatureY4M, sizeof(signatureY4M) } };
  297|     68|    const size_t signaturesCount = sizeof(signatures) / sizeof(signatures[0]);
  298|       |
  299|    126|    for (size_t signatureIndex = 0; signatureIndex < signaturesCount; ++signatureIndex) {
  ------------------
  |  Branch (299:37): [True: 122, False: 4]
  ------------------
  300|    122|        const struct avifHeaderSignature * const signature = &signatures[signatureIndex];
  301|    122|        if (header.size < signature->magicSize) {
  ------------------
  |  Branch (301:13): [True: 0, False: 122]
  ------------------
  302|      0|            continue;
  303|      0|        }
  304|    122|        if (!memcmp(header.data, signature->magic, signature->magicSize)) {
  ------------------
  |  Branch (304:13): [True: 64, False: 58]
  ------------------
  305|     64|            return signature->format;
  306|     64|        }
  307|    122|    }
  308|       |
  309|      4|    return AVIF_APP_FILE_FORMAT_UNKNOWN;
  310|     68|}

_ZN4absl12lts_2024011613base_internal16SchedulingHelperC2ENS1_14SchedulingModeE:
  116|     32|  explicit SchedulingHelper(base_internal::SchedulingMode mode) : mode_(mode) {
  117|     32|    if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
  ------------------
  |  Branch (117:9): [True: 0, False: 32]
  ------------------
  118|      0|      guard_result_ = base_internal::SchedulingGuard::DisableRescheduling();
  119|      0|    }
  120|     32|  }
_ZN4absl12lts_2024011613base_internal16SchedulingHelperD2Ev:
  122|     32|  ~SchedulingHelper() {
  123|     32|    if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
  ------------------
  |  Branch (123:9): [True: 0, False: 32]
  ------------------
  124|      0|      base_internal::SchedulingGuard::EnableRescheduling(guard_result_);
  125|      0|    }
  126|     32|  }
_ZN4absl12lts_2024011613base_internal11ControlWordEPNS0_9once_flagE:
  193|     60|    absl::Nonnull<once_flag*> flag) {
  194|     60|  return &flag->control_;
  195|     60|}
_ZN4absl12lts_202401169call_onceIMNS0_14flags_internal8FlagImplEFvvEJPS3_EEEvRNS0_9once_flagEOT_DpOT0_:
  212|     58|void call_once(absl::once_flag& flag, Callable&& fn, Args&&... args) {
  213|     58|  std::atomic<uint32_t>* once = base_internal::ControlWord(&flag);
  214|     58|  uint32_t s = once->load(std::memory_order_acquire);
  215|     58|  if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) {
  ------------------
  |  |  178|     58|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 30, False: 28]
  |  |  |  Branch (178:49): [Folded, False: 58]
  |  |  |  Branch (178:58): [True: 30, False: 28]
  |  |  ------------------
  ------------------
  216|     30|    base_internal::CallOnceImpl(
  217|     30|        once, base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL,
  218|     30|        std::forward<Callable>(fn), std::forward<Args>(args)...);
  219|     30|  }
  220|     58|}
_ZN4absl12lts_2024011613base_internal12CallOnceImplIMNS0_14flags_internal8FlagImplEFvvEJPS4_EEEvPNSt3__16atomicIjEENS1_14SchedulingModeEOT_DpOT0_:
  153|     30|    Args&&... args) {
  154|       |#ifndef NDEBUG
  155|       |  {
  156|       |    uint32_t old_control = control->load(std::memory_order_relaxed);
  157|       |    if (old_control != kOnceInit &&
  158|       |        old_control != kOnceRunning &&
  159|       |        old_control != kOnceWaiter &&
  160|       |        old_control != kOnceDone) {
  161|       |      ABSL_RAW_LOG(FATAL, "Unexpected value for control word: 0x%lx",
  162|       |                   static_cast<unsigned long>(old_control));  // NOLINT
  163|       |    }
  164|       |  }
  165|       |#endif  // NDEBUG
  166|     30|  static const base_internal::SpinLockWaitTransition trans[] = {
  167|     30|      {kOnceInit, kOnceRunning, true},
  168|     30|      {kOnceRunning, kOnceWaiter, false},
  169|     30|      {kOnceDone, kOnceDone, true}};
  170|       |
  171|       |  // Must do this before potentially modifying control word's state.
  172|     30|  base_internal::SchedulingHelper maybe_disable_scheduling(scheduling_mode);
  173|       |  // Short circuit the simplest case to avoid procedure call overhead.
  174|       |  // The base_internal::SpinLockWait() call returns either kOnceInit or
  175|       |  // kOnceDone. If it returns kOnceDone, it must have loaded the control word
  176|       |  // with std::memory_order_acquire and seen a value of kOnceDone.
  177|     30|  uint32_t old_control = kOnceInit;
  178|     30|  if (control->compare_exchange_strong(old_control, kOnceRunning,
  ------------------
  |  Branch (178:7): [True: 30, False: 0]
  ------------------
  179|     30|                                       std::memory_order_relaxed) ||
  180|      0|      base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans,
  ------------------
  |  |   45|      0|  (sizeof(::absl::macros_internal::ArraySizeHelper(array)))
  ------------------
  |  Branch (180:7): [True: 0, False: 0]
  ------------------
  181|     30|                                  scheduling_mode) == kOnceInit) {
  182|     30|    base_internal::invoke(std::forward<Callable>(fn),
  183|     30|                          std::forward<Args>(args)...);
  184|     30|    old_control =
  185|     30|        control->exchange(base_internal::kOnceDone, std::memory_order_release);
  186|     30|    if (old_control == base_internal::kOnceWaiter) {
  ------------------
  |  Branch (186:9): [True: 0, False: 30]
  ------------------
  187|      0|      base_internal::SpinLockWake(control, true);
  188|      0|    }
  189|     30|  }  // else *control is already kOnceDone
  190|     30|}
_ZN4absl12lts_202401169call_onceIRFvvEJEEEvRNS0_9once_flagEOT_DpOT0_:
  212|      2|void call_once(absl::once_flag& flag, Callable&& fn, Args&&... args) {
  213|      2|  std::atomic<uint32_t>* once = base_internal::ControlWord(&flag);
  214|      2|  uint32_t s = once->load(std::memory_order_acquire);
  215|      2|  if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) {
  ------------------
  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 2]
  |  |  |  Branch (178:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  216|      2|    base_internal::CallOnceImpl(
  217|      2|        once, base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL,
  218|      2|        std::forward<Callable>(fn), std::forward<Args>(args)...);
  219|      2|  }
  220|      2|}
_ZN4absl12lts_2024011613base_internal12CallOnceImplIRFvvEJEEEvPNSt3__16atomicIjEENS1_14SchedulingModeEOT_DpOT0_:
  153|      2|    Args&&... args) {
  154|       |#ifndef NDEBUG
  155|       |  {
  156|       |    uint32_t old_control = control->load(std::memory_order_relaxed);
  157|       |    if (old_control != kOnceInit &&
  158|       |        old_control != kOnceRunning &&
  159|       |        old_control != kOnceWaiter &&
  160|       |        old_control != kOnceDone) {
  161|       |      ABSL_RAW_LOG(FATAL, "Unexpected value for control word: 0x%lx",
  162|       |                   static_cast<unsigned long>(old_control));  // NOLINT
  163|       |    }
  164|       |  }
  165|       |#endif  // NDEBUG
  166|      2|  static const base_internal::SpinLockWaitTransition trans[] = {
  167|      2|      {kOnceInit, kOnceRunning, true},
  168|      2|      {kOnceRunning, kOnceWaiter, false},
  169|      2|      {kOnceDone, kOnceDone, true}};
  170|       |
  171|       |  // Must do this before potentially modifying control word's state.
  172|      2|  base_internal::SchedulingHelper maybe_disable_scheduling(scheduling_mode);
  173|       |  // Short circuit the simplest case to avoid procedure call overhead.
  174|       |  // The base_internal::SpinLockWait() call returns either kOnceInit or
  175|       |  // kOnceDone. If it returns kOnceDone, it must have loaded the control word
  176|       |  // with std::memory_order_acquire and seen a value of kOnceDone.
  177|      2|  uint32_t old_control = kOnceInit;
  178|      2|  if (control->compare_exchange_strong(old_control, kOnceRunning,
  ------------------
  |  Branch (178:7): [True: 2, False: 0]
  ------------------
  179|      2|                                       std::memory_order_relaxed) ||
  180|      0|      base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans,
  ------------------
  |  |   45|      0|  (sizeof(::absl::macros_internal::ArraySizeHelper(array)))
  ------------------
  |  Branch (180:7): [True: 0, False: 0]
  ------------------
  181|      2|                                  scheduling_mode) == kOnceInit) {
  182|      2|    base_internal::invoke(std::forward<Callable>(fn),
  183|      2|                          std::forward<Args>(args)...);
  184|      2|    old_control =
  185|      2|        control->exchange(base_internal::kOnceDone, std::memory_order_release);
  186|      2|    if (old_control == base_internal::kOnceWaiter) {
  ------------------
  |  Branch (186:9): [True: 0, False: 2]
  ------------------
  187|      0|      base_internal::SpinLockWake(control, true);
  188|      0|    }
  189|      2|  }  // else *control is already kOnceDone
  190|      2|}

_ZN4absl12lts_202401168bit_castImlTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS5_EE5valuesr3std21is_trivially_copyableIS4_EE5valueEiE4typeELi0EEES4_RKS5_:
  163|  25.7k|inline constexpr Dest bit_cast(const Source& source) {
  164|  25.7k|  return __builtin_bit_cast(Dest, source);
  165|  25.7k|}
_ZN4absl12lts_202401168bit_castIlmTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS5_EE5valuesr3std21is_trivially_copyableIS4_EE5valueEiE4typeELi0EEES4_RKS5_:
  163|  12.8k|inline constexpr Dest bit_cast(const Source& source) {
  164|  12.8k|  return __builtin_bit_cast(Dest, source);
  165|  12.8k|}
_ZN4absl12lts_202401168bit_castINS0_14flags_internal19FlagValueAndInitBitIN8fuzztest8internal14TimeBudgetTypeEEElTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableISB_EE5valuesr3std21is_trivially_copyableISA_EE5valueEiE4typeELi0EEESA_RKSB_:
  163|      2|inline constexpr Dest bit_cast(const Source& source) {
  164|      2|  return __builtin_bit_cast(Dest, source);
  165|      2|}
_ZN4absl12lts_202401168bit_castINS0_14flags_internal19FlagValueAndInitBitIbEElTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS8_EE5valuesr3std21is_trivially_copyableIS7_EE5valueEiE4typeELi0EEES7_RKS8_:
  163|      6|inline constexpr Dest bit_cast(const Source& source) {
  164|      6|  return __builtin_bit_cast(Dest, source);
  165|      6|}
_ZN4absl12lts_202401168bit_castIlNSt3__15arrayIcLm8EEETnNS2_9enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS7_EE5valuesr3std21is_trivially_copyableIS6_EE5valueEiE4typeELi0EEES6_RKS7_:
  163|     10|inline constexpr Dest bit_cast(const Source& source) {
  164|     10|  return __builtin_bit_cast(Dest, source);
  165|     10|}
_ZN4absl12lts_202401168bit_castIdmTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS5_EE5valuesr3std21is_trivially_copyableIS4_EE5valueEiE4typeELi0EEES4_RKS5_:
  163|  17.7k|inline constexpr Dest bit_cast(const Source& source) {
  164|  17.7k|  return __builtin_bit_cast(Dest, source);
  165|  17.7k|}

_ZN4absl12lts_202401169gbswap_32Ej:
   48|     20|inline uint32_t gbswap_32(uint32_t host_int) {
   49|     20|#if ABSL_HAVE_BUILTIN(__builtin_bswap32) || defined(__GNUC__)
   50|     20|  return __builtin_bswap32(host_int);
   51|       |#elif defined(_MSC_VER)
   52|       |  return _byteswap_ulong(host_int);
   53|       |#else
   54|       |  return (((host_int & uint32_t{0xFF}) << 24) |
   55|       |          ((host_int & uint32_t{0xFF00}) << 8) |
   56|       |          ((host_int & uint32_t{0xFF0000}) >> 8) |
   57|       |          ((host_int & uint32_t{0xFF000000}) >> 24));
   58|       |#endif
   59|     20|}
_ZN4absl12lts_202401169gbswap_16Et:
   61|      2|inline uint16_t gbswap_16(uint16_t host_int) {
   62|      2|#if ABSL_HAVE_BUILTIN(__builtin_bswap16) || defined(__GNUC__)
   63|      2|  return __builtin_bswap16(host_int);
   64|       |#elif defined(_MSC_VER)
   65|       |  return _byteswap_ushort(host_int);
   66|       |#else
   67|       |  return (((host_int & uint16_t{0xFF}) << 8) |
   68|       |          ((host_int & uint16_t{0xFF00}) >> 8));
   69|       |#endif
   70|      2|}
_ZN4absl12lts_2024011613little_endian8ToHost64Em:
  114|     16|inline uint64_t ToHost64(uint64_t x) { return x; }
_ZN4absl12lts_2024011613little_endian6ToHostEm:
  140|     16|inline uint64_t ToHost(uint64_t x) { return ToHost64(x); }
_ZN4absl12lts_2024011610big_endian8ToHost16Et:
  198|      2|inline uint16_t ToHost16(uint16_t x) { return gbswap_16(x); }
_ZN4absl12lts_2024011610big_endian8ToHost32Ej:
  201|     20|inline uint32_t ToHost32(uint32_t x) { return gbswap_32(x); }
_ZN4absl12lts_2024011610big_endian6Load16EPKv:
  254|      2|inline uint16_t Load16(absl::Nonnull<const void *> p) {
  255|      2|  return ToHost16(ABSL_INTERNAL_UNALIGNED_LOAD16(p));
  ------------------
  |  |   74|      2|  (absl::base_internal::UnalignedLoad16(_p))
  ------------------
  256|      2|}
_ZN4absl12lts_2024011610big_endian6Load32EPKv:
  262|     20|inline uint32_t Load32(absl::Nonnull<const void *> p) {
  263|     20|  return ToHost32(ABSL_INTERNAL_UNALIGNED_LOAD32(p));
  ------------------
  |  |   76|     20|  (absl::base_internal::UnalignedLoad32(_p))
  ------------------
  264|     20|}

_ZN4absl12lts_2024011613base_internal10FastTypeIdIbEEPKvv:
   42|      4|constexpr inline FastTypeIdType FastTypeId() {
   43|      4|  return &FastTypeTag<Type>::dummy_var;
   44|      4|}
_ZN4absl12lts_2024011613base_internal10FastTypeIdINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEPKvv:
   42|      2|constexpr inline FastTypeIdType FastTypeId() {
   43|      2|  return &FastTypeTag<Type>::dummy_var;
   44|      2|}
_ZN4absl12lts_2024011613base_internal10FastTypeIdImEEPKvv:
   42|      2|constexpr inline FastTypeIdType FastTypeId() {
   43|      2|  return &FastTypeTag<Type>::dummy_var;
   44|      2|}

_ZN4absl12lts_2024011613base_internal8SpinLockC2Ev:
   58|     16|  SpinLock() : lockword_(kSpinLockCooperative) {
   59|     16|    ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static);
   60|     16|  }
_ZN4absl12lts_2024011613base_internal8SpinLock4LockEv:
   80|     18|  inline void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() {
   81|     18|    ABSL_TSAN_MUTEX_PRE_LOCK(this, 0);
   82|     18|    if (!TryLockImpl()) {
  ------------------
  |  Branch (82:9): [True: 0, False: 18]
  ------------------
   83|      0|      SlowLock();
   84|      0|    }
   85|     18|    ABSL_TSAN_MUTEX_POST_LOCK(this, 0, 0);
   86|     18|  }
_ZN4absl12lts_2024011613base_internal8SpinLock6UnlockEv:
  102|     18|  inline void Unlock() ABSL_UNLOCK_FUNCTION() {
  103|     18|    ABSL_TSAN_MUTEX_PRE_UNLOCK(this, 0);
  104|     18|    uint32_t lock_value = lockword_.load(std::memory_order_relaxed);
  105|     18|    lock_value = lockword_.exchange(lock_value & kSpinLockCooperative,
  106|     18|                                    std::memory_order_release);
  107|       |
  108|     18|    if ((lock_value & kSpinLockDisabledScheduling) != 0) {
  ------------------
  |  Branch (108:9): [True: 0, False: 18]
  ------------------
  109|      0|      base_internal::SchedulingGuard::EnableRescheduling(true);
  110|      0|    }
  111|     18|    if ((lock_value & kWaitTimeMask) != 0) {
  ------------------
  |  Branch (111:9): [True: 0, False: 18]
  ------------------
  112|       |      // Collect contentionz profile info, and speed the wakeup of any waiter.
  113|       |      // The wait_cycles value indicates how long this thread spent waiting
  114|       |      // for the lock.
  115|      0|      SlowUnlock(lock_value);
  116|      0|    }
  117|     18|    ABSL_TSAN_MUTEX_POST_UNLOCK(this, 0);
  118|     18|  }
_ZN4absl12lts_2024011613base_internal8SpinLock11TryLockImplEv:
  192|     18|  inline bool TryLockImpl() {
  193|     18|    uint32_t lock_value = lockword_.load(std::memory_order_relaxed);
  194|     18|    return (TryLockInternal(lock_value, 0) & kSpinLockHeld) == 0;
  195|     18|  }
_ZN4absl12lts_2024011613base_internal14SpinLockHolderC2EPNS1_8SpinLockE:
  208|     18|      : lock_(l) {
  209|     18|    l->Lock();
  210|     18|  }
_ZN4absl12lts_2024011613base_internal14SpinLockHolderD2Ev:
  211|     18|  inline ~SpinLockHolder() ABSL_UNLOCK_FUNCTION() { lock_->Unlock(); }
_ZN4absl12lts_2024011613base_internal8SpinLock15TryLockInternalEjj:
  237|     18|                                          uint32_t wait_cycles) {
  238|     18|  if ((lock_value & kSpinLockHeld) != 0) {
  ------------------
  |  Branch (238:7): [True: 0, False: 18]
  ------------------
  239|      0|    return lock_value;
  240|      0|  }
  241|       |
  242|     18|  uint32_t sched_disabled_bit = 0;
  243|     18|  if ((lock_value & kSpinLockCooperative) == 0) {
  ------------------
  |  Branch (243:7): [True: 0, False: 18]
  ------------------
  244|       |    // For non-cooperative locks we must make sure we mark ourselves as
  245|       |    // non-reschedulable before we attempt to CompareAndSwap.
  246|      0|    if (base_internal::SchedulingGuard::DisableRescheduling()) {
  ------------------
  |  Branch (246:9): [True: 0, False: 0]
  ------------------
  247|      0|      sched_disabled_bit = kSpinLockDisabledScheduling;
  248|      0|    }
  249|      0|  }
  250|       |
  251|     18|  if (!lockword_.compare_exchange_strong(
  ------------------
  |  Branch (251:7): [True: 0, False: 18]
  ------------------
  252|     18|          lock_value,
  253|     18|          kSpinLockHeld | lock_value | wait_cycles | sched_disabled_bit,
  254|     18|          std::memory_order_acquire, std::memory_order_relaxed)) {
  255|      0|    base_internal::SchedulingGuard::EnableRescheduling(sched_disabled_bit != 0);
  256|      0|  }
  257|       |
  258|     18|  return lock_value;
  259|     18|}

_ZN4absl12lts_2024011613base_internal15UnalignedLoad16EPKv:
   39|      2|inline uint16_t UnalignedLoad16(absl::Nonnull<const void *> p) {
   40|      2|  uint16_t t;
   41|      2|  memcpy(&t, p, sizeof t);
   42|      2|  return t;
   43|      2|}
_ZN4absl12lts_2024011613base_internal15UnalignedLoad32EPKv:
   45|    200|inline uint32_t UnalignedLoad32(absl::Nonnull<const void *> p) {
   46|    200|  uint32_t t;
   47|    200|  memcpy(&t, p, sizeof t);
   48|    200|  return t;
   49|    200|}
_ZN4absl12lts_2024011613base_internal15UnalignedLoad64EPKv:
   51|     84|inline uint64_t UnalignedLoad64(absl::Nonnull<const void *> p) {
   52|     84|  uint64_t t;
   53|     84|  memcpy(&t, p, sizeof t);
   54|     84|  return t;
   55|     84|}

_ZN4absl12lts_2024011612NoDestructorINS0_14flags_internal12FlagRegistryEEC2IJETnNSt3__19enable_ifIXntsr3std7is_sameIFvDpRu7__decayIT_EEFvRS4_EEE5valueEiE4typeELi0EEEDpOS8_:
  127|      2|      : impl_(std::forward<Ts>(args)...) {}
_ZN4absl12lts_2024011612NoDestructorINS0_14flags_internal12FlagRegistryEE13PlacementImplC2IJEEEDpOT_:
  165|      2|    explicit PlacementImpl(Args&&... args) {
  166|      2|      new (&space_) T(std::forward<Args>(args)...);
  167|      2|    }
_ZN4absl12lts_2024011612NoDestructorINS0_14flags_internal12FlagRegistryEEdeEv:
  142|     38|  T& operator*() { return *get(); }
_ZN4absl12lts_2024011612NoDestructorINS0_14flags_internal12FlagRegistryEE3getEv:
  144|     38|  T* get() { return impl_.get(); }
_ZN4absl12lts_2024011612NoDestructorINS0_14flags_internal12FlagRegistryEE13PlacementImpl3getEv:
  171|     38|    T* get() { return Launder(reinterpret_cast<T*>(&space_)); }
_ZN4absl12lts_2024011612NoDestructorINS0_14flags_internal12FlagRegistryEE13PlacementImpl7LaunderIS3_EEPT_S8_:
  175|     38|    static P* Launder(P* p) {
  176|     38|#if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606L
  177|     38|      return std::launder(p);
  178|       |#elif ABSL_HAVE_BUILTIN(__builtin_launder)
  179|       |      return __builtin_launder(p);
  180|       |#else
  181|       |      // When `std::launder` or equivalent are not available, we rely on
  182|       |      // undefined behavior, which works as intended on Abseil's officially
  183|       |      // supported platforms as of Q3 2023.
  184|       |#if defined(__GNUC__) && !defined(__clang__)
  185|       |#pragma GCC diagnostic push
  186|       |#pragma GCC diagnostic ignored "-Wstrict-aliasing"
  187|       |#endif
  188|       |      return p;
  189|       |#if defined(__GNUC__) && !defined(__clang__)
  190|       |#pragma GCC diagnostic pop
  191|       |#endif
  192|       |#endif
  193|     38|    }

_ZN4absl12lts_2024011620PrefetchToLocalCacheEPKv:
  146|     12|    const void* addr) {
  147|     12|  __builtin_prefetch(addr, 0, 3);
  148|     12|}

_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE7destroyINS3_9allocatorINS3_4pairIKS7_S9_EEEEEEvPT_PNS1_13map_slot_typeIS7_S9_EE:
  577|     32|  static void destroy(Allocator* alloc, slot_type* slot) {
  578|     32|    slot_policy::destroy(alloc, slot);
  579|     32|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE5applyINS1_12raw_hash_setISA_NS1_10StringHashENS1_8StringEqENS3_9allocatorINS3_4pairIKS7_S9_EEEEE12EqualElementIS7_EEJRSI_EEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSO_DpOSP_:
  590|      2|  apply(F&& f, Args&&... args) {
  591|      2|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  592|      2|                                                   std::forward<Args>(args)...);
  593|      2|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE7elementEPNS1_13map_slot_typeIS7_S9_EE:
  597|     62|  static std::pair<const K, V>& element(slot_type* slot) { return slot->value; }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE5applyINS1_12raw_hash_setISA_NS1_10StringHashENS1_8StringEqENS3_9allocatorINS3_4pairIKS7_S9_EEEEE19EmplaceDecomposableEJSI_EEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSM_DpOSN_:
  590|     32|  apply(F&& f, Args&&... args) {
  591|     32|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  592|     32|                                                   std::forward<Args>(args)...);
  593|     32|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE5applyINS1_12raw_hash_setISA_NS1_10StringHashENS1_8StringEqENS3_9allocatorINS3_4pairIKS7_S9_EEEEE11HashElementEJRSI_EEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSN_DpOSO_:
  590|     28|  apply(F&& f, Args&&... args) {
  591|     28|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  592|     28|                                                   std::forward<Args>(args)...);
  593|     28|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE8transferINS3_9allocatorINS3_4pairIKS7_S9_EEEEEEDaPT_PNS1_13map_slot_typeIS7_S9_EESL_:
  583|     28|                       slot_type* old_slot) {
  584|     28|    return slot_policy::transfer(alloc, new_slot, old_slot);
  585|     28|  }
_ZN4absl12lts_2024011618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE9constructINS3_9allocatorINS3_4pairIKS7_S9_EEEEJRKNS3_21piecewise_construct_tENS3_5tupleIJOSE_EEENSK_IJOS9_EEEEEEvPT_PNS1_13map_slot_typeIS7_S9_EEDpOT0_:
  572|     32|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  573|     32|    slot_policy::construct(alloc, slot, std::forward<Args>(args)...);
  574|     32|  }
_ZN4absl12lts_2024011613flat_hash_mapINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPNS0_15CommandLineFlagENS0_18container_internal10StringHashENS9_8StringEqENS2_9allocatorINS2_4pairIKS6_S8_EEEEEC2Ev:
  159|      2|  flat_hash_map() {}

_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE7destroyINS4_9allocatorINS4_4pairIKS8_SA_EEEEEEvPT_PNS1_13map_slot_typeIS8_SA_EE:
   49|     32|  static void destroy(Alloc* alloc, slot_type* slot) {
   50|     32|    Policy::destroy(alloc, slot);
   51|     32|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE7elementISB_EEDTclsrT_7elementfp_EEPNS1_13map_slot_typeIS8_SA_EE:
   75|     62|      -> decltype(P::element(slot)) {
   76|     62|    return P::element(slot);
   77|     62|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE8transferINS4_9allocatorINS4_4pairIKS8_SA_EEEEEEvPT_PNS1_13map_slot_typeIS8_SA_EESN_:
   65|     28|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   66|     28|    transfer_impl(alloc, new_slot, old_slot, Rank0{});
   67|     28|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE13transfer_implINS4_9allocatorINS4_4pairIKS8_SA_EEEESB_EEDTclsrT0_8transferfp_fp0_fp1_EEPT_PNS1_13map_slot_typeIS8_SA_EESP_NSC_5Rank0E:
  101|     28|      -> decltype(P::transfer(alloc, new_slot, old_slot)) {
  102|     28|    return P::transfer(alloc, new_slot, old_slot);
  103|     28|  }
_ZN4absl12lts_2024011618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE9constructINS4_9allocatorINS4_4pairIKS8_SA_EEEEJRKNS4_21piecewise_construct_tENS4_5tupleIJOSG_EEENSM_IJOSA_EEEEEEvPT_PNS1_13map_slot_typeIS8_SA_EEDpOT0_:
   42|     32|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   43|     32|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   44|     32|  }

_ZNKR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ELb0EE3getEv:
   91|    314|  constexpr const T& get() const& { return value; }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ELb0EE3getEv:
   92|    396|  T& get() & { return value; }
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ELb0EEC2IS4_EENSt3__110in_place_tEOT_:
   90|      2|      : value(absl::forward<V>(v)) {}
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ELb1EE3getEv:
  106|     60|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_8StringEqELm2ELb1EE3getEv:
  106|      2|  T& get() & { return *this; }
_ZNKR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_17basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemISI_XT_EE4typeEv:
  246|    314|  constexpr const ElemT<I>& get() const& {
  247|    314|    return StorageT<I>::get();
  248|    314|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_17basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemISI_XT_EE4typeEv:
  241|    104|  ElemT<I>& get() & {
  242|    104|    return StorageT<I>::get();
  243|    104|  }
_ZNR4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_17basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEELm3ELb1EE3getEv:
  106|    104|  T& get() & { return *this; }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_17basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemISI_XT_EE4typeEv:
  241|    396|  ElemT<I>& get() & {
  242|    396|    return StorageT<I>::get();
  243|    396|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_17basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEE3getILi2EEERNS1_25internal_compressed_tuple4ElemISI_XT_EE4typeEv:
  241|      2|  ElemT<I>& get() & {
  242|      2|    return StorageT<I>::get();
  243|      2|  }
_ZNR4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_17basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemISI_XT_EE4typeEv:
  241|     60|  ElemT<I>& get() & {
  242|     60|    return StorageT<I>::get();
  243|     60|  }
_ZN4absl12lts_2024011618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS6_4pairIKNS6_17basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEEC2IS3_JS4_S5_SH_ETnNS6_9enable_ifIXsr4absl11conjunctionINS0_8negationINS6_7is_sameIFvSI_EFvNS6_5decayIT_E4typeEEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleISI_JSP_DpT0_EEEEE5valueEbE4typeELb1EEEOSP_DpOSX_:
  236|      2|      : CompressedTuple::CompressedTupleImpl(absl::in_place,
  237|      2|                                             absl::forward<First>(first),
  238|      2|                                             absl::forward<Vs>(base)...) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorINS8_4pairIKNS8_17basic_string_viewIcNS8_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SJ_EEENS8_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I>(absl::in_place, absl::forward<Vs>(args))... {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ELb1EEC2IS4_EENSt3__110in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINS1_8StringEqELm2ELb1EEC2IS4_EENSt3__110in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}
_ZN4absl12lts_2024011618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS4_4pairIKNS4_17basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEELm3ELb1EEC2ISF_EENS4_10in_place_tEOT_:
  103|      2|      : T(absl::forward<V>(v)) {}

_ZN4absl12lts_2024011618container_internal27SanitizerPoisonMemoryRegionEPKvm:
  220|     34|inline void SanitizerPoisonMemoryRegion(const void* m, size_t s) {
  221|       |#ifdef ABSL_HAVE_ADDRESS_SANITIZER
  222|       |  ASAN_POISON_MEMORY_REGION(m, s);
  223|       |#endif
  224|       |#ifdef ABSL_HAVE_MEMORY_SANITIZER
  225|       |  __msan_poison(m, s);
  226|       |#endif
  227|     34|  (void)m;
  228|     34|  (void)s;
  229|     34|}
_ZN4absl12lts_2024011618container_internal29SanitizerUnpoisonMemoryRegionEPKvm:
  231|     74|inline void SanitizerUnpoisonMemoryRegion(const void* m, size_t s) {
  232|       |#ifdef ABSL_HAVE_ADDRESS_SANITIZER
  233|       |  ASAN_UNPOISON_MEMORY_REGION(m, s);
  234|       |#endif
  235|       |#ifdef ABSL_HAVE_MEMORY_SANITIZER
  236|       |  __msan_unpoison(m, s);
  237|       |#endif
  238|     74|  (void)m;
  239|     74|  (void)s;
  240|     74|}
_ZN4absl12lts_2024011618container_internal8AllocateILm8ENSt3__19allocatorIcEEEEPvPT0_m:
   55|     10|void* Allocate(Alloc* alloc, size_t n) {
   56|     10|  static_assert(Alignment > 0, "");
   57|     10|  assert(n && "n must be positive");
   58|     10|  using M = AlignedType<Alignment>;
   59|     10|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   60|     10|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   61|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   62|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   63|       |  // with the "foo(bar)" syntax.
   64|     10|  A my_mem_alloc(*alloc);
   65|     10|  void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M));
   66|       |  assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
   67|     10|         "allocator does not respect alignment");
   68|     10|  return p;
   69|     10|}
_ZN4absl12lts_2024011618container_internal10DeallocateILm8ENSt3__19allocatorIcEEEEvPT0_Pvm:
   74|      8|void Deallocate(Alloc* alloc, void* p, size_t n) {
   75|      8|  static_assert(Alignment > 0, "");
   76|      8|  assert(n && "n must be positive");
   77|      8|  using M = AlignedType<Alignment>;
   78|      8|  using A = typename absl::allocator_traits<Alloc>::template rebind_alloc<M>;
   79|      8|  using AT = typename absl::allocator_traits<Alloc>::template rebind_traits<M>;
   80|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   81|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   82|       |  // with the "foo(bar)" syntax.
   83|      8|  A my_mem_alloc(*alloc);
   84|      8|  AT::deallocate(my_mem_alloc, static_cast<M*>(p),
   85|      8|                 (n + sizeof(M) - 1) / sizeof(M));
   86|      8|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE7destroyINS3_9allocatorINS3_4pairIKS7_S9_EEEEEEvPT_PNS1_13map_slot_typeIS7_S9_EE:
  417|     32|  static void destroy(Allocator* alloc, slot_type* slot) {
  418|     32|    if (kMutableKeys::value) {
  ------------------
  |  Branch (418:9): [True: 32, Folded]
  ------------------
  419|     32|      absl::allocator_traits<Allocator>::destroy(*alloc, &slot->mutable_value);
  420|     32|    } else {
  421|      0|      absl::allocator_traits<Allocator>::destroy(*alloc, &slot->value);
  422|      0|    }
  423|     32|  }
_ZN4absl12lts_2024011618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS5_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS5_9allocatorINS5_4pairIKS9_SB_EEEEE12EqualElementIS9_EEJRSI_EEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSO_DpOSP_:
  206|      2|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  207|      2|  return memory_internal::DecomposePairImpl(
  208|      2|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  209|      2|}
_ZN4absl12lts_2024011618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS6_9allocatorINS6_4pairIKSA_SC_EEEEE12EqualElementISA_EERSI_NS6_5tupleIJRKSC_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_19piecewise_constructEEclsr3stdE7declvalINSP_IJSU_EEEEEclsr3stdE7declvalIT1_EEEEOST_NSH_ISX_SY_EE:
  138|      2|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  139|      2|  const auto& key = std::get<0>(p.first);
  140|      2|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  141|      2|                            std::move(p.second));
  142|      2|}
_ZN4absl12lts_2024011618container_internal8PairArgsIKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJRKT_EEENSC_IJRKT0_EEEEERKNSB_ISD_SH_EE:
  187|     30|    const std::pair<F, S>& p) {
  188|     30|  return PairArgs(p.first, p.second);
  189|     30|}
_ZN4absl12lts_2024011618container_internal8PairArgsIRKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERKPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJOT_EEENSF_IJOT0_EEEEESH_SK_:
  181|     30|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(F&& f, S&& s) {
  182|     30|  return {std::piecewise_construct, std::forward_as_tuple(std::forward<F>(f)),
  183|     30|          std::forward_as_tuple(std::forward<S>(s))};
  184|     30|}
_ZN4absl12lts_2024011618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS5_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS5_9allocatorINS5_4pairIKS9_SB_EEEEE19EmplaceDecomposableEJSI_EEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSM_DpOSN_:
  206|     32|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  207|     32|  return memory_internal::DecomposePairImpl(
  208|     32|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  209|     32|}
_ZN4absl12lts_2024011618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS6_9allocatorINS6_4pairIKSA_SC_EEEEE19EmplaceDecomposableEOSI_NS6_5tupleIJOSC_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_19piecewise_constructEEclsr3stdE7declvalINSO_IJSS_EEEEEclsr3stdE7declvalIT1_EEEEOSR_NSH_ISV_SW_EE:
  138|     32|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  139|     32|  const auto& key = std::get<0>(p.first);
  140|     32|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  141|     32|                            std::move(p.second));
  142|     32|}
_ZN4absl12lts_2024011618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS5_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS5_9allocatorINS5_4pairIKS9_SB_EEEEE11HashElementEJRSI_EEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSN_DpOSO_:
  206|     28|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  207|     28|  return memory_internal::DecomposePairImpl(
  208|     28|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  209|     28|}
_ZN4absl12lts_2024011618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS6_9allocatorINS6_4pairIKSA_SC_EEEEE11HashElementERSI_NS6_5tupleIJRKSC_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_19piecewise_constructEEclsr3stdE7declvalINSO_IJST_EEEEEclsr3stdE7declvalIT1_EEEEOSS_NSH_ISW_SX_EE:
  138|     28|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  139|     28|  const auto& key = std::get<0>(p.first);
  140|     28|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  141|     28|                            std::move(p.second));
  142|     28|}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE8transferINS3_9allocatorINS3_4pairIKS7_S9_EEEEEEDaPT_PNS1_13map_slot_typeIS7_S9_EESL_:
  427|     28|                       slot_type* old_slot) {
  428|     28|    auto is_relocatable =
  429|     28|        typename absl::is_trivially_relocatable<value_type>::type();
  430|       |
  431|     28|    emplace(new_slot);
  432|     28|#if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606
  433|     28|    if (is_relocatable) {
  ------------------
  |  Branch (433:9): [True: 28, Folded]
  ------------------
  434|       |      // TODO(b/247130232,b/251814870): remove casts after fixing warnings.
  435|     28|      std::memcpy(static_cast<void*>(std::launder(&new_slot->value)),
  436|     28|                  static_cast<const void*>(&old_slot->value),
  437|     28|                  sizeof(value_type));
  438|     28|      return is_relocatable;
  439|     28|    }
  440|      0|#endif
  441|       |
  442|      0|    if (kMutableKeys::value) {
  ------------------
  |  Branch (442:9): [True: 0, Folded]
  ------------------
  443|      0|      absl::allocator_traits<Allocator>::construct(
  444|      0|          *alloc, &new_slot->mutable_value, std::move(old_slot->mutable_value));
  445|      0|    } else {
  446|      0|      absl::allocator_traits<Allocator>::construct(*alloc, &new_slot->value,
  447|      0|                                                   std::move(old_slot->value));
  448|      0|    }
  449|      0|    destroy(alloc, old_slot);
  450|      0|    return is_relocatable;
  451|     28|  }
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE7emplaceEPNS1_13map_slot_typeIS7_S9_EE:
  348|     60|  static void emplace(slot_type* slot) {
  349|       |    // The construction of union doesn't do anything at runtime but it allows us
  350|       |    // to access its members without violating aliasing rules.
  351|     60|    new (slot) slot_type;
  352|     60|  }
_ZN4absl12lts_2024011618container_internal13map_slot_typeINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEC2Ev:
  329|     60|  map_slot_type() {}
_ZN4absl12lts_2024011618container_internal15map_slot_policyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE9constructINS3_9allocatorINS3_4pairIKS7_S9_EEEEJRKNS3_21piecewise_construct_tENS3_5tupleIJOSE_EEENSK_IJOS9_EEEEEEvPT_PNS1_13map_slot_typeIS7_S9_EEDpOT0_:
  383|     32|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  384|     32|    emplace(slot);
  385|     32|    if (kMutableKeys::value) {
  ------------------
  |  Branch (385:9): [True: 32, Folded]
  ------------------
  386|     32|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->mutable_value,
  387|     32|                                                   std::forward<Args>(args)...);
  388|     32|    } else {
  389|      0|      absl::allocator_traits<Allocator>::construct(*alloc, &slot->value,
  390|      0|                                                   std::forward<Args>(args)...);
  391|      0|    }
  392|     32|  }
_ZN4absl12lts_2024011618container_internal8PairArgsIKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJOT_EEENSC_IJOT0_EEEEEONSB_ISD_SG_EE:
  191|     32|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(std::pair<F, S>&& p) {
  192|     32|  return PairArgs(std::forward<F>(p.first), std::forward<S>(p.second));
  193|     32|}
_ZN4absl12lts_2024011618container_internal8PairArgsIKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJOT_EEENSC_IJOT0_EEEEESE_SH_:
  181|     32|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(F&& f, S&& s) {
  182|     32|  return {std::piecewise_construct, std::forward_as_tuple(std::forward<F>(f)),
  183|     32|          std::forward_as_tuple(std::forward<S>(s))};
  184|     32|}

_ZNK4absl12lts_2024011618container_internal10StringHashclENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   77|     60|  size_t operator()(absl::string_view v) const {
   78|     60|    return absl::Hash<absl::string_view>{}(v);
   79|     60|  }
_ZNK4absl12lts_2024011618container_internal8StringEqclENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_:
   87|      2|  bool operator()(absl::string_view lhs, absl::string_view rhs) const {
   88|      2|    return lhs == rhs;
   89|      2|  }

_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE5applyINS1_12raw_hash_setISB_NS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE12EqualElementIS8_EEJRSK_ESB_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSR_DpOSS_:
  133|      2|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|      2|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|      2|  }
_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE5applyINS1_12raw_hash_setISB_NS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE19EmplaceDecomposableEJSK_ESB_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSP_DpOSQ_:
  133|     32|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     32|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     32|  }
_ZN4absl12lts_2024011618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE5applyINS1_12raw_hash_setISB_NS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE11HashElementEJRSK_ESB_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSQ_DpOSR_:
  133|     28|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  134|     28|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  135|     28|  }

_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandleC2EDn:
  187|      2|  explicit HashtablezInfoHandle(std::nullptr_t) {}
_ZNK4absl12lts_2024011618container_internal20HashtablezInfoHandle9IsSampledEv:
  190|     10|  inline bool IsSampled() const { return false; }
_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandle20RecordStorageChangedEmm:
  191|      2|  inline void RecordStorageChanged(size_t /*size*/, size_t /*capacity*/) {}
_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandle12RecordRehashEm:
  192|      2|  inline void RecordRehash(size_t /*total_probe_length*/) {}
_ZN4absl12lts_2024011618container_internal20HashtablezInfoHandle12RecordInsertEmm:
  195|     32|  inline void RecordInsert(size_t /*hash*/, size_t /*distance_from_desired*/) {}
_ZN4absl12lts_2024011618container_internal6SampleEm:
  210|      2|    size_t inline_element_size ABSL_ATTRIBUTE_UNUSED) {
  211|       |#if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE)
  212|       |  if (ABSL_PREDICT_TRUE(--global_next_sample.next_sample > 0)) {
  213|       |    return HashtablezInfoHandle(nullptr);
  214|       |  }
  215|       |  return HashtablezInfoHandle(
  216|       |      SampleSlow(global_next_sample, inline_element_size));
  217|       |#else
  218|      2|  return HashtablezInfoHandle(nullptr);
  219|      2|#endif  // !ABSL_PER_THREAD_TLS
  220|      2|}

_ZN4absl12lts_2024011618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEEC2Ev:
   64|      2|  raw_hash_map() {}

_ZN4absl12lts_2024011618container_internal17ClearBackingArrayERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEb:
  256|      2|                       bool reuse) {
  257|      2|  c.set_size(0);
  258|      2|  if (reuse) {
  ------------------
  |  Branch (258:7): [True: 2, False: 0]
  ------------------
  259|      2|    ResetCtrl(c, policy.slot_size);
  260|      2|    ResetGrowthLeft(c);
  261|      2|    c.infoz().RecordStorageChanged(0, c.capacity());
  262|      2|  } else {
  263|       |    // We need to record infoz before calling dealloc, which will unregister
  264|       |    // infoz.
  265|      0|    c.infoz().RecordClearedReservation();
  266|      0|    c.infoz().RecordStorageChanged(0, 0);
  267|      0|    (*policy.dealloc)(c, policy);
  268|      0|    c.set_control(EmptyGroup());
  269|      0|    c.set_generation_ptr(EmptyGeneration());
  270|      0|    c.set_slots(nullptr);
  271|      0|    c.set_capacity(0);
  272|      0|  }
  273|      2|}
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper38GrowIntoSingleGroupShuffleControlBytesEPNS1_6ctrl_tEm:
  276|      6|    ctrl_t* new_ctrl, size_t new_capacity) const {
  277|      6|  assert(is_single_group(new_capacity));
  278|      6|  constexpr size_t kHalfWidth = Group::kWidth / 2;
  279|      6|  assert(old_capacity_ < kHalfWidth);
  280|       |
  281|      6|  const size_t half_old_capacity = old_capacity_ / 2;
  282|       |
  283|       |  // NOTE: operations are done with compile time known size = kHalfWidth.
  284|       |  // Compiler optimizes that into single ASM operation.
  285|       |
  286|       |  // Copy second half of bytes to the beginning.
  287|       |  // We potentially copy more bytes in order to have compile time known size.
  288|       |  // Mirrored bytes from the old_ctrl_ will also be copied.
  289|       |  // In case of old_capacity_ == 3, we will copy 1st element twice.
  290|       |  // Examples:
  291|       |  // old_ctrl = 0S0EEEEEEE...
  292|       |  // new_ctrl = S0EEEEEEEE...
  293|       |  //
  294|       |  // old_ctrl = 01S01EEEEE...
  295|       |  // new_ctrl = 1S01EEEEEE...
  296|       |  //
  297|       |  // old_ctrl = 0123456S0123456EE...
  298|       |  // new_ctrl = 456S0123?????????...
  299|      6|  std::memcpy(new_ctrl, old_ctrl_ + half_old_capacity + 1, kHalfWidth);
  300|       |  // Clean up copied kSentinel from old_ctrl.
  301|      6|  new_ctrl[half_old_capacity] = ctrl_t::kEmpty;
  302|       |
  303|       |  // Clean up damaged or uninitialized bytes.
  304|       |
  305|       |  // Clean bytes after the intended size of the copy.
  306|       |  // Example:
  307|       |  // new_ctrl = 1E01EEEEEEE????
  308|       |  // *new_ctrl= 1E0EEEEEEEE????
  309|       |  // position      /
  310|      6|  std::memset(new_ctrl + old_capacity_ + 1, static_cast<int8_t>(ctrl_t::kEmpty),
  311|      6|              kHalfWidth);
  312|       |  // Clean non-mirrored bytes that are not initialized.
  313|       |  // For small old_capacity that may be inside of mirrored bytes zone.
  314|       |  // Examples:
  315|       |  // new_ctrl = 1E0EEEEEEEE??????????....
  316|       |  // *new_ctrl= 1E0EEEEEEEEEEEEE?????....
  317|       |  // position           /
  318|       |  //
  319|       |  // new_ctrl = 456E0123???????????...
  320|       |  // *new_ctrl= 456E0123EEEEEEEE???...
  321|       |  // position           /
  322|      6|  std::memset(new_ctrl + kHalfWidth, static_cast<int8_t>(ctrl_t::kEmpty),
  323|      6|              kHalfWidth);
  324|       |  // Clean last mirrored bytes that are not initialized
  325|       |  // and will not be overwritten by mirroring.
  326|       |  // Examples:
  327|       |  // new_ctrl = 1E0EEEEEEEEEEEEE????????
  328|       |  // *new_ctrl= 1E0EEEEEEEEEEEEEEEEEEEEE
  329|       |  // position           S       /
  330|       |  //
  331|       |  // new_ctrl = 456E0123EEEEEEEE???????????????
  332|       |  // *new_ctrl= 456E0123EEEEEEEE???????EEEEEEEE
  333|       |  // position                  S       /
  334|      6|  std::memset(new_ctrl + new_capacity + kHalfWidth,
  335|      6|              static_cast<int8_t>(ctrl_t::kEmpty), kHalfWidth);
  336|       |
  337|       |  // Create mirrored bytes. old_capacity_ < kHalfWidth
  338|       |  // Example:
  339|       |  // new_ctrl = 456E0123EEEEEEEE???????EEEEEEEE
  340|       |  // *new_ctrl= 456E0123EEEEEEEE456E0123EEEEEEE
  341|       |  // position                  S/
  342|      6|  ctrl_t g[kHalfWidth];
  343|      6|  std::memcpy(g, new_ctrl, kHalfWidth);
  344|      6|  std::memcpy(new_ctrl + new_capacity + 1, g, kHalfWidth);
  345|       |
  346|       |  // Finally set sentinel to its place.
  347|      6|  new_ctrl[new_capacity] = ctrl_t::kSentinel;
  348|      6|}
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper43GrowIntoSingleGroupShuffleTransferableSlotsEPvS3_m:
  351|      6|    void* old_slots, void* new_slots, size_t slot_size) const {
  352|      6|  assert(old_capacity_ > 0);
  353|      6|  const size_t half_old_capacity = old_capacity_ / 2;
  354|       |
  355|      6|  SanitizerUnpoisonMemoryRegion(old_slots, slot_size * old_capacity_);
  356|      6|  std::memcpy(new_slots,
  357|      6|              SlotAddress(old_slots, half_old_capacity + 1, slot_size),
  358|      6|              slot_size * half_old_capacity);
  359|      6|  std::memcpy(SlotAddress(new_slots, half_old_capacity + 1, slot_size),
  360|      6|              old_slots, slot_size * (half_old_capacity + 1));
  361|      6|}
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper35GrowSizeIntoSingleGroupTransferableERNS1_12CommonFieldsEPvm:
  364|      6|    CommonFields& c, void* old_slots, size_t slot_size) {
  365|      6|  assert(old_capacity_ < Group::kWidth / 2);
  366|      6|  assert(is_single_group(c.capacity()));
  367|      6|  assert(IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity()));
  368|       |
  369|      6|  GrowIntoSingleGroupShuffleControlBytes(c.control(), c.capacity());
  370|      6|  GrowIntoSingleGroupShuffleTransferableSlots(old_slots, c.slot_array(),
  371|      6|                                              slot_size);
  372|       |
  373|       |  // We poison since GrowIntoSingleGroupShuffleTransferableSlots
  374|       |  // may leave empty slots unpoisoned.
  375|      6|  PoisonSingleGroupEmptySlots(c, slot_size);
  376|      6|}

_ZN4absl12lts_2024011618container_internal13GroupSse2ImplC2EPKNS1_6ctrl_tE:
  615|    109|  explicit GroupSse2Impl(const ctrl_t* pos) {
  616|    109|    ctrl = _mm_loadu_si128(reinterpret_cast<const __m128i*>(pos));
  617|    109|  }
_ZNK4absl12lts_2024011618container_internal13GroupSse2Impl5MatchEh:
  620|     32|  BitMask<uint16_t, kWidth> Match(h2_t hash) const {
  621|     32|    auto match = _mm_set1_epi8(static_cast<char>(hash));
  622|     32|    BitMask<uint16_t, kWidth> result = BitMask<uint16_t, kWidth>(0);
  623|     32|    result = BitMask<uint16_t, kWidth>(
  624|     32|        static_cast<uint16_t>(_mm_movemask_epi8(_mm_cmpeq_epi8(match, ctrl))));
  625|     32|    return result;
  626|     32|  }
_ZNK4absl12lts_2024011618container_internal13GroupSse2Impl9MaskEmptyEv:
  629|     32|  NonIterableBitMask<uint16_t, kWidth> MaskEmpty() const {
  630|       |#ifdef ABSL_INTERNAL_HAVE_SSSE3
  631|       |    // This only works because ctrl_t::kEmpty is -128.
  632|       |    return NonIterableBitMask<uint16_t, kWidth>(
  633|       |        static_cast<uint16_t>(_mm_movemask_epi8(_mm_sign_epi8(ctrl, ctrl))));
  634|       |#else
  635|     32|    auto match = _mm_set1_epi8(static_cast<char>(ctrl_t::kEmpty));
  636|     32|    return NonIterableBitMask<uint16_t, kWidth>(
  637|     32|        static_cast<uint16_t>(_mm_movemask_epi8(_mm_cmpeq_epi8(match, ctrl))));
  638|     32|#endif
  639|     32|  }
_ZNK4absl12lts_2024011618container_internal13GroupSse2Impl18MaskEmptyOrDeletedEv:
  650|     62|  NonIterableBitMask<uint16_t, kWidth> MaskEmptyOrDeleted() const {
  651|     62|    auto special = _mm_set1_epi8(static_cast<char>(ctrl_t::kSentinel));
  652|     62|    return NonIterableBitMask<uint16_t, kWidth>(static_cast<uint16_t>(
  653|     62|        _mm_movemask_epi8(_mm_cmpgt_epi8_fixed(special, ctrl))));
  654|     62|  }
_ZNK4absl12lts_2024011618container_internal13GroupSse2Impl26CountLeadingEmptyOrDeletedEv:
  657|     15|  uint32_t CountLeadingEmptyOrDeleted() const {
  658|     15|    auto special = _mm_set1_epi8(static_cast<char>(ctrl_t::kSentinel));
  659|     15|    return TrailingZeros(static_cast<uint32_t>(
  660|     15|        _mm_movemask_epi8(_mm_cmpgt_epi8_fixed(special, ctrl)) + 1));
  661|     15|  }
_ZNK4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled41should_rehash_for_bug_detection_on_insertEPKNS1_6ctrl_tEm:
  926|     32|  bool should_rehash_for_bug_detection_on_insert(const ctrl_t*, size_t) const {
  927|     32|    return false;
  928|     32|  }
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled36maybe_increment_generation_on_insertEv:
  932|     32|  void maybe_increment_generation_on_insert() {}
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled19set_reserved_growthEm:
  936|      2|  void set_reserved_growth(size_t) {}
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled20set_reservation_sizeEm:
  938|      2|  void set_reservation_size(size_t) {}
_ZNK4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled10generationEv:
  939|     10|  GenerationType generation() const { return 0; }
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled14set_generationEh:
  940|     10|  void set_generation(GenerationType) {}
_ZNK4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled14generation_ptrEv:
  941|     36|  GenerationType* generation_ptr() const { return nullptr; }
_ZN4absl12lts_2024011618container_internal34CommonFieldsGenerationInfoDisabled18set_generation_ptrEPh:
  942|     10|  void set_generation_ptr(GenerationType*) {}
_ZN4absl12lts_2024011618container_internal37HashSetIteratorGenerationInfoDisabledC2EPKh:
  965|     36|  explicit HashSetIteratorGenerationInfoDisabled(const GenerationType*) {}
_ZNK4absl12lts_2024011618container_internal37HashSetIteratorGenerationInfoDisabled10generationEv:
  967|    132|  GenerationType generation() const { return 0; }
_ZNK4absl12lts_2024011618container_internal37HashSetIteratorGenerationInfoDisabled14generation_ptrEv:
  969|    200|  const GenerationType* generation_ptr() const { return nullptr; }
_ZNK4absl12lts_2024011618container_internal12CommonFields7controlEv:
 1038|    578|  ctrl_t* control() const { return control_; }
_ZN4absl12lts_2024011618container_internal12CommonFields11set_controlEPNS1_6ctrl_tE:
 1039|     10|  void set_control(ctrl_t* c) { control_ = c; }
_ZNK4absl12lts_2024011618container_internal12CommonFields10slot_arrayEv:
 1047|    192|  void* slot_array() const { return slots_; }
_ZN4absl12lts_2024011618container_internal12CommonFields9set_slotsEPv:
 1048|     10|  void set_slots(void* s) { slots_ = s; }
_ZNK4absl12lts_2024011618container_internal12CommonFields4sizeEv:
 1051|     24|  size_t size() const { return size_ >> HasInfozShift(); }
_ZN4absl12lts_2024011618container_internal12CommonFields8set_sizeEm:
 1052|      2|  void set_size(size_t s) {
 1053|      2|    size_ = (s << HasInfozShift()) | (size_ & HasInfozMask());
 1054|      2|  }
_ZN4absl12lts_2024011618container_internal12CommonFields14increment_sizeEv:
 1055|     32|  void increment_size() {
 1056|       |    assert(size() < capacity());
 1057|     32|    size_ += size_t{1} << HasInfozShift();
 1058|     32|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields8capacityEv:
 1065|    340|  size_t capacity() const { return capacity_; }
_ZN4absl12lts_2024011618container_internal12CommonFields12set_capacityEm:
 1066|     10|  void set_capacity(size_t c) {
 1067|       |    assert(c == 0 || IsValidCapacity(c));
 1068|     10|    capacity_ = c;
 1069|     10|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields11growth_leftEv:
 1073|     64|  size_t growth_left() const {
 1074|     64|    const size_t* gl_ptr = reinterpret_cast<size_t*>(control()) - 1;
 1075|       |    assert(reinterpret_cast<uintptr_t>(gl_ptr) % alignof(size_t) == 0);
 1076|     64|    return *gl_ptr;
 1077|     64|  }
_ZN4absl12lts_2024011618container_internal12CommonFields15set_growth_leftEm:
 1078|     44|  void set_growth_left(size_t gl) {
 1079|     44|    size_t* gl_ptr = reinterpret_cast<size_t*>(control()) - 1;
 1080|       |    assert(reinterpret_cast<uintptr_t>(gl_ptr) % alignof(size_t) == 0);
 1081|     44|    *gl_ptr = gl;
 1082|     44|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields9has_infozEv:
 1084|     54|  bool has_infoz() const {
 1085|     54|    return ABSL_PREDICT_FALSE((size_ & HasInfozMask()) != 0);
  ------------------
  |  |  178|     54|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:49): [Folded, False: 54]
  |  |  |  Branch (178:58): [True: 0, False: 54]
  |  |  ------------------
  ------------------
 1086|     54|  }
_ZN4absl12lts_2024011618container_internal12CommonFields13set_has_infozEb:
 1087|     10|  void set_has_infoz(bool has_infoz) {
 1088|     10|    size_ = (size() << HasInfozShift()) | static_cast<size_t>(has_infoz);
 1089|     10|  }
_ZN4absl12lts_2024011618container_internal12CommonFields5infozEv:
 1091|     44|  HashtablezInfoHandle infoz() {
 1092|     44|    return has_infoz()
  ------------------
  |  Branch (1092:12): [True: 0, False: 44]
  ------------------
 1093|     44|               ? *reinterpret_cast<HashtablezInfoHandle*>(backing_array_start())
 1094|     44|               : HashtablezInfoHandle();
 1095|     44|  }
_ZNK4absl12lts_2024011618container_internal12CommonFields41should_rehash_for_bug_detection_on_insertEv:
 1101|     32|  bool should_rehash_for_bug_detection_on_insert() const {
 1102|     32|    return CommonFieldsGenerationInfo::
 1103|     32|        should_rehash_for_bug_detection_on_insert(control(), capacity());
 1104|     32|  }
_ZN4absl12lts_2024011618container_internal12CommonFields13HasInfozShiftEv:
 1130|    124|  static constexpr size_t HasInfozShift() { return 1; }
_ZN4absl12lts_2024011618container_internal12CommonFields12HasInfozMaskEv:
 1131|     56|  static constexpr size_t HasInfozMask() {
 1132|     56|    return (size_t{1} << HasInfozShift()) - 1;
 1133|     56|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelperC2ERNS1_12CommonFieldsE:
 1525|     10|      : old_ctrl_(c.control()),
 1526|     10|        old_capacity_(c.capacity()),
 1527|     10|        had_infoz_(c.has_infoz()) {}
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper27FindFirstNonFullAfterResizeERKNS1_12CommonFieldsEmm:
 1537|     10|                                              size_t hash) {
 1538|     10|    if (!IsGrowingIntoSingleGroupApplicable(old_capacity, c.capacity())) {
  ------------------
  |  Branch (1538:9): [True: 2, False: 8]
  ------------------
 1539|      2|      return find_first_non_full(c, hash);
 1540|      2|    }
 1541|       |    // Find a location for the new element non-deterministically.
 1542|       |    // Note that any position is correct.
 1543|       |    // It will located at `half_old_capacity` or one of the other
 1544|       |    // empty slots with approximately 50% probability each.
 1545|      8|    size_t offset = probe(c, hash).offset();
 1546|       |
 1547|       |    // Note that we intentionally use unsigned int underflow.
 1548|      8|    if (offset - (old_capacity + 1) >= old_capacity) {
  ------------------
  |  Branch (1548:9): [True: 5, False: 3]
  ------------------
 1549|       |      // Offset fall on kSentinel or into the mostly occupied first half.
 1550|      5|      offset = old_capacity / 2;
 1551|      5|    }
 1552|       |    assert(IsEmpty(c.control()[offset]));
 1553|      8|    return FindInfo{offset, 0};
 1554|     10|  }
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper8old_ctrlEv:
 1556|     30|  ctrl_t* old_ctrl() const { return old_ctrl_; }
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper12old_capacityEv:
 1557|     42|  size_t old_capacity() const { return old_capacity_; }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper34IsGrowingIntoSingleGroupApplicableEmm:
 1686|     20|                                                 size_t new_capacity) {
 1687|       |    // NOTE that `old_capacity < new_capacity` in order to have
 1688|       |    // `old_capacity < Group::kWidth / 2` to make faster copies of 8 bytes.
 1689|     20|    return is_single_group(new_capacity) && old_capacity < new_capacity;
  ------------------
  |  Branch (1689:12): [True: 16, False: 4]
  |  Branch (1689:45): [True: 16, False: 0]
  ------------------
 1690|     20|  }
_ZNK4absl12lts_2024011618container_internal19HashSetResizeHelper27PoisonSingleGroupEmptySlotsERNS1_12CommonFieldsEm:
 1753|      6|  void PoisonSingleGroupEmptySlots(CommonFields& c, size_t slot_size) const {
 1754|       |    // poison non full items
 1755|     56|    for (size_t i = 0; i < c.capacity(); ++i) {
  ------------------
  |  Branch (1755:24): [True: 50, False: 6]
  ------------------
 1756|     50|      if (!IsFull(c.control()[i])) {
  ------------------
  |  Branch (1756:11): [True: 28, False: 22]
  ------------------
 1757|     28|        SanitizerPoisonMemoryRegion(SlotAddress(c.slot_array(), i, slot_size),
 1758|     28|                                    slot_size);
 1759|     28|      }
 1760|     50|    }
 1761|      6|  }
_ZN4absl12lts_2024011618container_internal23SentinelEmptyGenerationEv:
  252|     10|constexpr GenerationType SentinelEmptyGeneration() { return 0; }
_ZN4absl12lts_2024011618container_internal14NextGenerationEh:
  254|     10|constexpr GenerationType NextGeneration(GenerationType generation) {
  255|     10|  return ++generation == SentinelEmptyGeneration() ? ++generation : generation;
  ------------------
  |  Branch (255:10): [True: 0, False: 10]
  ------------------
  256|     10|}
_ZN4absl12lts_2024011618container_internal18NumGenerationBytesEv:
  263|     28|constexpr size_t NumGenerationBytes() { return 0; }
_ZN4absl12lts_2024011618container_internal10EmptyGroupEv:
  521|      2|inline ctrl_t* EmptyGroup() {
  522|       |  // Const must be cast away here; no uses of this function will actually write
  523|       |  // to it, because it is only used for empty tables.
  524|      2|  return const_cast<ctrl_t*>(kEmptyGroup + 16);
  525|      2|}
_ZN4absl12lts_2024011618container_internal12PerTableSaltEPKNS1_6ctrl_tE:
  545|    102|inline size_t PerTableSalt(const ctrl_t* ctrl) {
  546|       |  // The low bits of the pointer have little or no entropy because of
  547|       |  // alignment. We shift the pointer to try to use higher entropy bits. A
  548|       |  // good number seems to be 12 bits, because that aligns with page size.
  549|    102|  return reinterpret_cast<uintptr_t>(ctrl) >> 12;
  550|    102|}
_ZN4absl12lts_2024011618container_internal2H1EmPKNS1_6ctrl_tE:
  552|    102|inline size_t H1(size_t hash, const ctrl_t* ctrl) {
  553|    102|  return (hash >> 7) ^ PerTableSalt(ctrl);
  554|    102|}
_ZN4absl12lts_2024011618container_internal2H2Em:
  559|     92|inline h2_t H2(size_t hash) { return hash & 0x7F; }
_ZN4absl12lts_2024011618container_internal7IsEmptyENS1_6ctrl_tE:
  562|     32|inline bool IsEmpty(ctrl_t c) { return c == ctrl_t::kEmpty; }
_ZN4absl12lts_2024011618container_internal6IsFullENS1_6ctrl_tE:
  563|    202|inline bool IsFull(ctrl_t c) { return c >= static_cast<ctrl_t>(0); }
_ZN4absl12lts_2024011618container_internal9IsDeletedENS1_6ctrl_tE:
  564|     10|inline bool IsDeleted(ctrl_t c) { return c == ctrl_t::kDeleted; }
_ZN4absl12lts_2024011618container_internal16IsEmptyOrDeletedENS1_6ctrl_tE:
  565|     49|inline bool IsEmptyOrDeleted(ctrl_t c) { return c < ctrl_t::kSentinel; }
_ZN4absl12lts_2024011618container_internal20_mm_cmpgt_epi8_fixedEDv2_xS2_:
  601|     77|inline __m128i _mm_cmpgt_epi8_fixed(__m128i a, __m128i b) {
  602|       |#if defined(__GNUC__) && !defined(__clang__)
  603|       |  if (std::is_unsigned<char>::value) {
  604|       |    const __m128i mask = _mm_set1_epi8(0x80);
  605|       |    const __m128i diff = _mm_subs_epi8(b, a);
  606|       |    return _mm_cmpeq_epi8(_mm_and_si128(diff, mask), mask);
  607|       |  }
  608|       |#endif
  609|     77|  return _mm_cmpgt_epi8(a, b);
  610|     77|}
_ZN4absl12lts_2024011618container_internal13ControlOffsetEb:
  988|     56|inline size_t ControlOffset(bool has_infoz) {
  989|     56|  return (has_infoz ? sizeof(HashtablezInfoHandle) : 0) + sizeof(size_t);
  ------------------
  |  Branch (989:11): [True: 0, False: 56]
  ------------------
  990|     56|}
_ZN4absl12lts_2024011618container_internal14NumClonedBytesEv:
  997|    164|constexpr size_t NumClonedBytes() { return Group::kWidth - 1; }
_ZN4absl12lts_2024011618container_internal16GenerationOffsetEmb:
 1001|     38|inline size_t GenerationOffset(size_t capacity, bool has_infoz) {
 1002|       |  assert(IsValidCapacity(capacity));
 1003|     38|  const size_t num_control_bytes = capacity + 1 + NumClonedBytes();
 1004|     38|  return ControlOffset(has_infoz) + num_control_bytes;
 1005|     38|}
_ZN4absl12lts_2024011618container_internal10SlotOffsetEmmb:
 1009|     28|inline size_t SlotOffset(size_t capacity, size_t slot_align, bool has_infoz) {
 1010|       |  assert(IsValidCapacity(capacity));
 1011|     28|  return (GenerationOffset(capacity, has_infoz) + NumGenerationBytes() +
 1012|     28|          slot_align - 1) &
 1013|     28|         (~slot_align + 1);
 1014|     28|}
_ZN4absl12lts_2024011618container_internal9AllocSizeEmmmb:
 1019|     18|                        bool has_infoz) {
 1020|     18|  return SlotOffset(capacity, slot_align, has_infoz) + capacity * slot_size;
 1021|     18|}
_ZN4absl12lts_2024011618container_internal12NextCapacityEm:
 1167|     10|inline size_t NextCapacity(size_t n) {
 1168|       |  assert(IsValidCapacity(n) || n == 0);
 1169|     10|  return n * 2 + 1;
 1170|     10|}
_ZN4absl12lts_2024011618container_internal16CapacityToGrowthEm:
 1197|     12|inline size_t CapacityToGrowth(size_t capacity) {
 1198|     12|  assert(IsValidCapacity(capacity));
 1199|       |  // `capacity*7/8`
 1200|     12|  if (Group::kWidth == 8 && capacity == 7) {
  ------------------
  |  Branch (1200:7): [Folded, False: 12]
  |  Branch (1200:29): [True: 0, False: 0]
  ------------------
 1201|       |    // x-x/8 does not work when x==7.
 1202|      0|    return 6;
 1203|      0|  }
 1204|     12|  return capacity - capacity / 8;
 1205|     12|}
_ZN4absl12lts_2024011618container_internal12AssertIsFullEPKNS1_6ctrl_tEhPKhPKc:
 1248|     64|                         const char* operation) {
 1249|     64|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1249:7): [True: 64, Folded]
  ------------------
 1250|       |  // `SwisstableDebugEnabled()` is also true for release builds with hardening
 1251|       |  // enabled. To minimize their impact in those builds:
 1252|       |  // - use `ABSL_PREDICT_FALSE()` to provide a compiler hint for code layout
 1253|       |  // - use `ABSL_RAW_LOG()` with a format string to reduce code size and improve
 1254|       |  //   the chances that the hot paths will be inlined.
 1255|      0|  if (ABSL_PREDICT_FALSE(ctrl == nullptr)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1256|      0|    ABSL_RAW_LOG(FATAL, "%s called on end() iterator.", operation);
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1257|      0|  }
 1258|      0|  if (ABSL_PREDICT_FALSE(ctrl == EmptyGroup())) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1259|      0|    ABSL_RAW_LOG(FATAL, "%s called on default-constructed iterator.",
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1260|      0|                 operation);
 1261|      0|  }
 1262|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1262:7): [Folded, False: 0]
  ------------------
 1263|      0|    if (ABSL_PREDICT_FALSE(generation != *generation_ptr)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1264|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1265|      0|                   "%s called on invalid iterator. The table could have "
 1266|      0|                   "rehashed or moved since this iterator was initialized.",
 1267|      0|                   operation);
 1268|      0|    }
 1269|      0|    if (ABSL_PREDICT_FALSE(!IsFull(*ctrl))) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1270|      0|      ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1271|      0|          FATAL,
 1272|      0|          "%s called on invalid iterator. The element was likely erased.",
 1273|      0|          operation);
 1274|      0|    }
 1275|      0|  } else {
 1276|      0|    if (ABSL_PREDICT_FALSE(!IsFull(*ctrl))) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1277|       |      ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1278|      0|          FATAL,
 1279|      0|          "%s called on invalid iterator. The element might have been erased "
 1280|      0|          "or the table might have rehashed. Consider running with "
 1281|      0|          "--config=asan to diagnose rehashing issues.",
 1282|      0|          operation);
 1283|      0|    }
 1284|      0|  }
 1285|      0|}
_ZN4absl12lts_2024011618container_internal26AssertIsValidForComparisonEPKNS1_6ctrl_tEhPKh:
 1290|     68|                                       const GenerationType* generation_ptr) {
 1291|     68|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1291:7): [True: 68, Folded]
  ------------------
 1292|      0|  const bool ctrl_is_valid_for_comparison =
 1293|      0|      ctrl == nullptr || ctrl == EmptyGroup() || IsFull(*ctrl);
  ------------------
  |  Branch (1293:7): [True: 0, False: 0]
  |  Branch (1293:26): [True: 0, False: 0]
  |  Branch (1293:50): [True: 0, False: 0]
  ------------------
 1294|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1294:7): [Folded, False: 0]
  ------------------
 1295|      0|    if (ABSL_PREDICT_FALSE(generation != *generation_ptr)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1296|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1297|      0|                   "Invalid iterator comparison. The table could have rehashed "
 1298|      0|                   "or moved since this iterator was initialized.");
 1299|      0|    }
 1300|      0|    if (ABSL_PREDICT_FALSE(!ctrl_is_valid_for_comparison)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1301|      0|      ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1302|      0|          FATAL, "Invalid iterator comparison. The element was likely erased.");
 1303|      0|    }
 1304|      0|  } else {
 1305|      0|    ABSL_HARDENING_ASSERT(
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1306|      0|        ctrl_is_valid_for_comparison &&
 1307|      0|        "Invalid iterator comparison. The element might have been erased or "
 1308|      0|        "the table might have rehashed. Consider running with --config=asan to "
 1309|      0|        "diagnose rehashing issues.");
 1310|      0|  }
 1311|      0|}
_ZN4absl12lts_2024011618container_internal19AssertSameContainerEPKNS1_6ctrl_tES4_RKPKvS8_PKhSA_:
 1339|     34|                                const GenerationType* generation_ptr_b) {
 1340|     34|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1340:7): [True: 34, Folded]
  ------------------
 1341|       |  // `SwisstableDebugEnabled()` is also true for release builds with hardening
 1342|       |  // enabled. To minimize their impact in those builds:
 1343|       |  // - use `ABSL_PREDICT_FALSE()` to provide a compiler hint for code layout
 1344|       |  // - use `ABSL_RAW_LOG()` with a format string to reduce code size and improve
 1345|       |  //   the chances that the hot paths will be inlined.
 1346|      0|  const bool a_is_default = ctrl_a == EmptyGroup();
 1347|      0|  const bool b_is_default = ctrl_b == EmptyGroup();
 1348|      0|  if (ABSL_PREDICT_FALSE(a_is_default != b_is_default)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1349|      0|    ABSL_RAW_LOG(
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1350|      0|        FATAL,
 1351|      0|        "Invalid iterator comparison. Comparing default-constructed iterator "
 1352|      0|        "with non-default-constructed iterator.");
 1353|      0|  }
 1354|      0|  if (a_is_default && b_is_default) return;
  ------------------
  |  Branch (1354:7): [True: 0, False: 0]
  |  Branch (1354:23): [True: 0, False: 0]
  ------------------
 1355|       |
 1356|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1356:7): [Folded, False: 0]
  ------------------
 1357|      0|    if (ABSL_PREDICT_TRUE(generation_ptr_a == generation_ptr_b)) return;
  ------------------
  |  |  179|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 0]
  |  |  |  Branch (179:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1358|      0|    const bool a_is_empty = IsEmptyGeneration(generation_ptr_a);
 1359|      0|    const bool b_is_empty = IsEmptyGeneration(generation_ptr_b);
 1360|      0|    if (a_is_empty != b_is_empty) {
  ------------------
  |  Branch (1360:9): [True: 0, False: 0]
  ------------------
 1361|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1362|      0|                   "Invalid iterator comparison. Comparing iterator from a "
 1363|      0|                   "non-empty hashtable with an iterator from an empty "
 1364|      0|                   "hashtable.");
 1365|      0|    }
 1366|      0|    if (a_is_empty && b_is_empty) {
  ------------------
  |  Branch (1366:9): [True: 0, False: 0]
  |  Branch (1366:23): [True: 0, False: 0]
  ------------------
 1367|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1368|      0|                   "Invalid iterator comparison. Comparing iterators from "
 1369|      0|                   "different empty hashtables.");
 1370|      0|    }
 1371|      0|    const bool a_is_end = ctrl_a == nullptr;
 1372|      0|    const bool b_is_end = ctrl_b == nullptr;
 1373|      0|    if (a_is_end || b_is_end) {
  ------------------
  |  Branch (1373:9): [True: 0, False: 0]
  |  Branch (1373:21): [True: 0, False: 0]
  ------------------
 1374|      0|      ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1375|      0|                   "Invalid iterator comparison. Comparing iterator with an "
 1376|      0|                   "end() iterator from a different hashtable.");
 1377|      0|    }
 1378|      0|    ABSL_RAW_LOG(FATAL,
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1379|      0|                 "Invalid iterator comparison. Comparing non-end() iterators "
 1380|      0|                 "from different hashtables.");
 1381|      0|  } else {
 1382|      0|    ABSL_HARDENING_ASSERT(
  ------------------
  |  |  128|      0|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, False: 0]
  |  |  |  |  |  Branch (95:30): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1383|      0|        AreItersFromSameContainer(ctrl_a, ctrl_b, slot_a, slot_b) &&
 1384|      0|        "Invalid iterator comparison. The iterators may be from different "
 1385|      0|        "containers or the container might have rehashed or moved. Consider "
 1386|      0|        "running with --config=asan to diagnose issues.");
 1387|      0|  }
 1388|      0|}
_ZN4absl12lts_2024011618container_internal15is_single_groupEm:
 1411|     20|inline bool is_single_group(size_t capacity) {
 1412|     20|  return capacity <= Group::kWidth;
 1413|     20|}
_ZN4absl12lts_2024011618container_internal5probeEPKNS1_6ctrl_tEmm:
 1417|    102|                                      size_t hash) {
 1418|    102|  return probe_seq<Group::kWidth>(H1(hash, ctrl), capacity);
 1419|    102|}
_ZN4absl12lts_2024011618container_internal5probeERKNS1_12CommonFieldsEm:
 1420|    102|inline probe_seq<Group::kWidth> probe(const CommonFields& common, size_t hash) {
 1421|    102|  return probe(common.control(), common.capacity(), hash);
 1422|    102|}
_ZN4absl12lts_2024011618container_internal15ResetGrowthLeftERNS1_12CommonFieldsE:
 1464|     12|inline void ResetGrowthLeft(CommonFields& common) {
 1465|     12|  common.set_growth_left(CapacityToGrowth(common.capacity()) - common.size());
 1466|     12|}
_ZN4absl12lts_2024011618container_internal9ResetCtrlERNS1_12CommonFieldsEm:
 1470|      6|inline void ResetCtrl(CommonFields& common, size_t slot_size) {
 1471|      6|  const size_t capacity = common.capacity();
 1472|      6|  ctrl_t* ctrl = common.control();
 1473|      6|  std::memset(ctrl, static_cast<int8_t>(ctrl_t::kEmpty),
 1474|      6|              capacity + 1 + NumClonedBytes());
 1475|      6|  ctrl[capacity] = ctrl_t::kSentinel;
 1476|      6|  SanitizerPoisonMemoryRegion(common.slot_array(), slot_size * capacity);
 1477|      6|}
_ZN4absl12lts_2024011618container_internal7SetCtrlERKNS1_12CommonFieldsEmNS1_6ctrl_tEm:
 1484|     60|                    size_t slot_size) {
 1485|     60|  const size_t capacity = common.capacity();
 1486|     60|  assert(i < capacity);
 1487|       |
 1488|     60|  auto* slot_i = static_cast<const char*>(common.slot_array()) + i * slot_size;
 1489|     60|  if (IsFull(h)) {
  ------------------
  |  Branch (1489:7): [True: 60, False: 0]
  ------------------
 1490|     60|    SanitizerUnpoisonMemoryRegion(slot_i, slot_size);
 1491|     60|  } else {
 1492|      0|    SanitizerPoisonMemoryRegion(slot_i, slot_size);
 1493|      0|  }
 1494|       |
 1495|     60|  ctrl_t* ctrl = common.control();
 1496|     60|  ctrl[i] = h;
 1497|     60|  ctrl[((i - NumClonedBytes()) & capacity) + (NumClonedBytes() & capacity)] = h;
 1498|     60|}
_ZN4absl12lts_2024011618container_internal7SetCtrlERKNS1_12CommonFieldsEmhm:
 1502|     60|                    size_t slot_size) {
 1503|     60|  SetCtrl(common, i, static_cast<ctrl_t>(h), slot_size);
 1504|     60|}
_ZN4absl12lts_2024011618container_internal11SlotAddressEPvmm:
 1513|     40|inline void* SlotAddress(void* slot_array, size_t slot, size_t slot_size) {
 1514|     40|  return reinterpret_cast<void*>(reinterpret_cast<char*>(slot_array) +
 1515|     40|                                 (slot * slot_size));
 1516|     40|}
_ZN4absl12lts_2024011618container_internal13TrailingZerosIjEEjT_:
  372|     15|uint32_t TrailingZeros(T x) {
  373|     15|  ABSL_ASSUME(x != 0);
  ------------------
  |  |  259|     15|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
  374|     15|  return static_cast<uint32_t>(countr_zero(x));
  375|     15|}
_ZN4absl12lts_2024011618container_internal19find_first_non_fullIvEENS1_8FindInfoERKNS1_12CommonFieldsEm:
 1432|     62|inline FindInfo find_first_non_full(const CommonFields& common, size_t hash) {
 1433|     62|  auto seq = probe(common, hash);
 1434|     62|  const ctrl_t* ctrl = common.control();
 1435|     62|  while (true) {
  ------------------
  |  Branch (1435:10): [True: 62, Folded]
  ------------------
 1436|     62|    GroupEmptyOrDeleted g{ctrl + seq.offset()};
 1437|     62|    auto mask = g.MaskEmptyOrDeleted();
 1438|     62|    if (mask) {
  ------------------
  |  Branch (1438:9): [True: 62, False: 0]
  ------------------
 1439|       |#if !defined(NDEBUG)
 1440|       |      // We want to add entropy even when ASLR is not enabled.
 1441|       |      // In debug build we will randomly insert in either the front or back of
 1442|       |      // the group.
 1443|       |      // TODO(kfm,sbenza): revisit after we do unconditional mixing
 1444|       |      if (!is_small(common.capacity()) && ShouldInsertBackwards(hash, ctrl)) {
 1445|       |        return {seq.offset(mask.HighestBitSet()), seq.index()};
 1446|       |      }
 1447|       |#endif
 1448|     62|      return {seq.offset(mask.LowestBitSet()), seq.index()};
 1449|     62|    }
 1450|      0|    seq.next();
 1451|       |    assert(seq.index() <= common.capacity() && "full table!");
 1452|      0|  }
 1453|     62|}
_ZNK4absl12lts_2024011618container_internal18NonIterableBitMaskItLi16ELi0EEcvbEv:
  391|     94|  explicit operator bool() const { return this->mask_ != 0; }
_ZNK4absl12lts_2024011618container_internal9probe_seqILm16EE6offsetEm:
  324|     64|  size_t offset(size_t i) const { return (offset_ + i) & mask_; }
_ZNK4absl12lts_2024011618container_internal18NonIterableBitMaskItLi16ELi0EE12LowestBitSetEv:
  394|     64|  uint32_t LowestBitSet() const {
  395|     64|    return container_internal::TrailingZeros(mask_) >> Shift;
  396|     64|  }
_ZN4absl12lts_2024011618container_internal13TrailingZerosItEEjT_:
  372|     64|uint32_t TrailingZeros(T x) {
  373|     64|  ABSL_ASSUME(x != 0);
  ------------------
  |  |  259|     64|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
  374|     64|  return static_cast<uint32_t>(countr_zero(x));
  375|     64|}
_ZNK4absl12lts_2024011618container_internal9probe_seqILm16EE5indexEv:
  332|     62|  size_t index() const { return index_; }
_ZNK4absl12lts_2024011618container_internal9probe_seqILm16EE6offsetEv:
  323|    102|  size_t offset() const { return offset_; }
_ZNK4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EE5beginEv:
  454|     32|  BitMask begin() const { return *this; }
_ZNK4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EE3endEv:
  455|     32|  BitMask end() const { return BitMask(0); }
_ZN4absl12lts_2024011618container_internalneERKNS1_7BitMaskItLi16ELi0EEES5_:
  461|     34|  friend bool operator!=(const BitMask& a, const BitMask& b) {
  462|     34|    return a.mask_ != b.mask_;
  463|     34|  }
_ZN4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EEppEv:
  443|      2|  BitMask& operator++() {
  444|      2|    if (Shift == 3) {
  ------------------
  |  Branch (444:9): [Folded, False: 2]
  ------------------
  445|      0|      constexpr uint64_t msbs = 0x8080808080808080ULL;
  446|      0|      this->mask_ &= msbs;
  447|      0|    }
  448|      2|    this->mask_ &= (this->mask_ - 1);
  449|      2|    return *this;
  450|      2|  }
_ZNK4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EEdeEv:
  452|      2|  uint32_t operator*() const { return Base::LowestBitSet(); }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper13DeallocateOldILm8ENSt3__19allocatorIcEEEEvT0_mPv:
 1676|      8|  void DeallocateOld(CharAlloc alloc_ref, size_t slot_size, void* old_slots) {
 1677|      8|    SanitizerUnpoisonMemoryRegion(old_slots, slot_size * old_capacity_);
 1678|      8|    Deallocate<BackingArrayAlignment(AlignOfSlot)>(
 1679|      8|        &alloc_ref, old_ctrl_ - ControlOffset(had_infoz_),
 1680|      8|        AllocSize(old_capacity_, slot_size, AlignOfSlot, had_infoz_));
 1681|      8|  }
_ZN4absl12lts_2024011618container_internal12CommonFieldsC2Ev:
 1028|      2|  CommonFields() = default;
_ZN4absl12lts_2024011618container_internal9probe_seqILm16EEC2Emm:
  316|    102|  probe_seq(size_t hash, size_t mask) {
  317|       |    assert(((mask + 1) & mask) == 0 && "not a mask");
  318|    102|    mask_ = mask;
  319|    102|    offset_ = hash & mask_;
  320|    102|  }
_ZN4absl12lts_2024011618container_internal7BitMaskItLi16ELi0EEC2Et:
  437|     96|  explicit BitMask(T mask) : Base(mask) {}
_ZN4absl12lts_2024011618container_internal18NonIterableBitMaskItLi16ELi0EEC2Et:
  389|    190|  explicit NonIterableBitMask(T mask) : mask_(mask) {}
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8capacityEv:
 2288|     24|  size_t capacity() const { return common().capacity(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE6commonEv:
 3194|    314|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE13destroy_slotsEv:
 2861|      2|  inline void destroy_slots() {
 2862|      2|    const size_t cap = capacity();
 2863|      2|    const ctrl_t* ctrl = control();
 2864|      2|    slot_type* slot = slot_array();
 2865|     64|    for (size_t i = 0; i != cap; ++i) {
  ------------------
  |  Branch (2865:24): [True: 62, False: 2]
  ------------------
 2866|     62|      if (IsFull(ctrl[i])) {
  ------------------
  |  Branch (2866:11): [True: 32, False: 30]
  ------------------
 2867|     32|        destroy(slot + i);
 2868|     32|      }
 2869|     62|    }
 2870|      2|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE7controlEv:
 3196|    142|  ctrl_t* control() const { return common().control(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE10slot_arrayEv:
 3197|     82|  slot_type* slot_array() const {
 3198|     82|    return static_cast<slot_type*>(common().slot_array());
 3199|     82|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE7destroyEPNS1_13map_slot_typeIS8_SA_EE:
 2854|     32|  inline void destroy(slot_type* slot) {
 2855|     32|    PolicyTraits::destroy(&alloc_ref(), slot);
 2856|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE9alloc_refEv:
 3206|    104|  allocator_type& alloc_ref() { return settings_.template get<3>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE5infozEv:
 3200|     34|  HashtablezInfoHandle infoz() { return common().infoz(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE6commonEv:
 3193|    396|  CommonFields& common() { return settings_.template get<0>(); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE19prefetch_heap_blockEv:
 3187|     32|  void prefetch_heap_block() const {
 3188|     32|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3189|     32|    __builtin_prefetch(control(), 0, 1);
 3190|     32|#endif
 3191|     32|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE12EqualElementIS8_EclIS8_JRKNS4_21piecewise_construct_tENS4_5tupleIJRSG_EEENSQ_IJRKSA_EEEEEEbRKT_DpOT0_:
 2813|      2|    bool operator()(const K2& lhs, Args&&...) const {
 2814|      2|      return eq(lhs, rhs);
 2815|      2|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE6eq_refEv:
 3204|      2|  key_equal& eq_ref() { return settings_.template get<2>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE11iterator_atEm:
 3159|     34|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3160|     34|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3161|     34|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iteratorC2EPNS1_6ctrl_tEPNS1_13map_slot_typeIS8_SA_EEPKh:
 1984|     34|        : HashSetIteratorGenerationInfo(generation_ptr),
 1985|     34|          ctrl_(ctrl),
 1986|     34|          slot_(slot) {
 1987|       |      // This assumption helps the compiler know that any non-end iterator is
 1988|       |      // not equal to any end iterator.
 1989|     34|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  259|     34|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1990|     34|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8hash_refEv:
 3202|     60|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE3endEv:
 2271|      2|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2272|      2|    return iterator(common().generation_ptr());
 2273|      2|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iteratorC2EPKh:
 1993|      2|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
_ZN4absl12lts_2024011618container_internalneERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iteratorESM_:
 1977|     34|    friend bool operator!=(const iterator& a, const iterator& b) {
 1978|     34|      return !(a == b);
 1979|     34|    }
_ZN4absl12lts_2024011618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iteratorESM_:
 1970|     34|    friend bool operator==(const iterator& a, const iterator& b) {
 1971|     34|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 1972|     34|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 1973|     34|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 1974|     34|                          a.generation_ptr(), b.generation_ptr());
 1975|     34|      return a.ctrl_ == b.ctrl_;
 1976|     34|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE6insertISH_TnNS4_9enable_ifIXsr4absl11disjunctionINS4_14is_convertibleIT_NSF_IS8_SA_EEEENSJ_22SameAsElementReferenceISN_EEEE5valueEiE4typeELi0ESH_TnNSL_IXsr14IsDecomposableIT1_EE5valueEiE4typeELi0ETnPSN_LPSH_0EEENSF_INSJ_8iteratorEbEEOSN_:
 2320|     32|  std::pair<iterator, bool> insert(T&& value) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2321|     32|    return emplace(std::forward<T>(value));
 2322|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE7emplaceIJSH_ETnNS4_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSF_INSJ_8iteratorEbEEDpOSM_:
 2422|     32|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2423|     32|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2424|     32|                               std::forward<Args>(args)...);
 2425|     32|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE19EmplaceDecomposableclIS8_JRKNS4_21piecewise_construct_tENS4_5tupleIJOSG_EEENSP_IJOSA_EEEEEENSF_INSJ_8iteratorEbEERKT_DpOT0_:
 2822|     32|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 2823|     32|      auto res = s.find_or_prepare_insert(key);
 2824|     32|      if (res.second) {
  ------------------
  |  Branch (2824:11): [True: 32, False: 0]
  ------------------
 2825|     32|        s.emplace_at(res.first, std::forward<Args>(args)...);
 2826|     32|      }
 2827|     32|      return {s.iterator_at(res.first), res.second};
 2828|     32|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE22find_or_prepare_insertIS8_EENSF_ImbEERKT_:
 3086|     32|  std::pair<size_t, bool> find_or_prepare_insert(const K& key) {
 3087|     32|    prefetch_heap_block();
 3088|     32|    auto hash = hash_ref()(key);
 3089|     32|    auto seq = probe(common(), hash);
 3090|     32|    const ctrl_t* ctrl = control();
 3091|     32|    while (true) {
  ------------------
  |  Branch (3091:12): [True: 32, Folded]
  ------------------
 3092|     32|      Group g{ctrl + seq.offset()};
 3093|     32|      for (uint32_t i : g.Match(H2(hash))) {
  ------------------
  |  Branch (3093:23): [True: 2, False: 32]
  ------------------
 3094|      2|        if (ABSL_PREDICT_TRUE(PolicyTraits::apply(
  ------------------
  |  |  179|      2|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 0, False: 2]
  |  |  |  Branch (179:48): [Folded, False: 2]
  |  |  |  Branch (179:57): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3095|      2|                EqualElement<K>{key, eq_ref()},
 3096|      2|                PolicyTraits::element(slot_array() + seq.offset(i)))))
 3097|      0|          return {seq.offset(i), false};
 3098|      2|      }
 3099|     32|      if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break;
  ------------------
  |  |  179|     32|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 32, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 32]
  |  |  |  Branch (179:57): [True: 32, False: 0]
  |  |  ------------------
  ------------------
 3100|      0|      seq.next();
 3101|      0|      assert(seq.index() <= capacity() && "full table!");
 3102|      0|    }
 3103|     32|    return {prepare_insert(hash), true};
 3104|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE14prepare_insertEm:
 3110|     32|  size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE {
 3111|     32|    const bool rehash_for_bug_detection =
 3112|     32|        common().should_rehash_for_bug_detection_on_insert();
 3113|     32|    if (rehash_for_bug_detection) {
  ------------------
  |  Branch (3113:9): [True: 0, False: 32]
  ------------------
 3114|       |      // Move to a different heap allocation in order to detect bugs.
 3115|      0|      const size_t cap = capacity();
 3116|      0|      resize(growth_left() > 0 ? cap : NextCapacity(cap));
  ------------------
  |  Branch (3116:14): [True: 0, False: 0]
  ------------------
 3117|      0|    }
 3118|     32|    auto target = find_first_non_full(common(), hash);
 3119|     32|    if (!rehash_for_bug_detection &&
  ------------------
  |  Branch (3119:9): [True: 32, False: 0]
  ------------------
 3120|     32|        ABSL_PREDICT_FALSE(growth_left() == 0 &&
  ------------------
  |  |  178|     42|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 10, False: 22]
  |  |  |  Branch (178:49): [Folded, False: 32]
  |  |  |  Branch (178:59): [True: 10, False: 22]
  |  |  |  Branch (178:59): [True: 10, False: 0]
  |  |  ------------------
  ------------------
 3121|     32|                           !IsDeleted(control()[target.offset]))) {
 3122|     10|      size_t old_capacity = capacity();
 3123|     10|      rehash_and_grow_if_necessary();
 3124|       |      // NOTE: It is safe to use `FindFirstNonFullAfterResize`.
 3125|       |      // `FindFirstNonFullAfterResize` must be called right after resize.
 3126|       |      // `rehash_and_grow_if_necessary` may *not* call `resize`
 3127|       |      // and perform `drop_deletes_without_resize` instead. But this
 3128|       |      // could happen only on big tables.
 3129|       |      // For big tables `FindFirstNonFullAfterResize` will always
 3130|       |      // fallback to normal `find_first_non_full`, so it is safe to use it.
 3131|     10|      target = HashSetResizeHelper::FindFirstNonFullAfterResize(
 3132|     10|          common(), old_capacity, hash);
 3133|     10|    }
 3134|     32|    common().increment_size();
 3135|     32|    set_growth_left(growth_left() - IsEmpty(control()[target.offset]));
 3136|     32|    SetCtrl(common(), target.offset, H2(hash), sizeof(slot_type));
 3137|     32|    common().maybe_increment_generation_on_insert();
 3138|     32|    infoz().RecordInsert(hash, target.probe_length);
 3139|     32|    return target.offset;
 3140|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE6resizeEm:
 2905|     10|  ABSL_ATTRIBUTE_NOINLINE void resize(size_t new_capacity) {
 2906|     10|    assert(IsValidCapacity(new_capacity));
 2907|     10|    HashSetResizeHelper resize_helper(common());
 2908|     10|    auto* old_slots = slot_array();
 2909|     10|    common().set_capacity(new_capacity);
 2910|       |    // Note that `InitializeSlots` does different number initialization steps
 2911|       |    // depending on the values of `transfer_uses_memcpy` and capacities.
 2912|       |    // Refer to the comment in `InitializeSlots` for more details.
 2913|     10|    const bool grow_single_group =
 2914|     10|        resize_helper.InitializeSlots<CharAlloc, sizeof(slot_type),
 2915|     10|                                      PolicyTraits::transfer_uses_memcpy(),
 2916|     10|                                      alignof(slot_type)>(
 2917|     10|            common(), const_cast<std::remove_const_t<slot_type>*>(old_slots),
 2918|     10|            CharAlloc(alloc_ref()));
 2919|       |
 2920|     10|    if (resize_helper.old_capacity() == 0) {
  ------------------
  |  Branch (2920:9): [True: 2, False: 8]
  ------------------
 2921|       |      // InitializeSlots did all the work including infoz().RecordRehash().
 2922|      2|      return;
 2923|      2|    }
 2924|       |
 2925|      8|    if (grow_single_group) {
  ------------------
  |  Branch (2925:9): [True: 6, False: 2]
  ------------------
 2926|      6|      if (PolicyTraits::transfer_uses_memcpy()) {
  ------------------
  |  Branch (2926:11): [True: 6, Folded]
  ------------------
 2927|       |        // InitializeSlots did all the work.
 2928|      6|        return;
 2929|      6|      }
 2930|       |      // We want GrowSizeIntoSingleGroup to be called here in order to make
 2931|       |      // InitializeSlots not depend on PolicyTraits.
 2932|      0|      resize_helper.GrowSizeIntoSingleGroup<PolicyTraits>(common(), alloc_ref(),
 2933|      0|                                                          old_slots);
 2934|      2|    } else {
 2935|       |      // InitializeSlots prepares control bytes to correspond to empty table.
 2936|      2|      auto* new_slots = slot_array();
 2937|      2|      size_t total_probe_length = 0;
 2938|     32|      for (size_t i = 0; i != resize_helper.old_capacity(); ++i) {
  ------------------
  |  Branch (2938:26): [True: 30, False: 2]
  ------------------
 2939|     30|        if (IsFull(resize_helper.old_ctrl()[i])) {
  ------------------
  |  Branch (2939:13): [True: 28, False: 2]
  ------------------
 2940|     28|          size_t hash = PolicyTraits::apply(
 2941|     28|              HashElement{hash_ref()}, PolicyTraits::element(old_slots + i));
 2942|     28|          auto target = find_first_non_full(common(), hash);
 2943|     28|          size_t new_i = target.offset;
 2944|     28|          total_probe_length += target.probe_length;
 2945|     28|          SetCtrl(common(), new_i, H2(hash), sizeof(slot_type));
 2946|     28|          transfer(new_slots + new_i, old_slots + i);
 2947|     28|        }
 2948|     30|      }
 2949|      2|      infoz().RecordRehash(total_probe_length);
 2950|      2|    }
 2951|      2|    resize_helper.DeallocateOld<alignof(slot_type)>(
 2952|      2|        CharAlloc(alloc_ref()), sizeof(slot_type),
 2953|      2|        const_cast<std::remove_const_t<slot_type>*>(old_slots));
 2954|      2|  }
_ZN4absl12lts_2024011618container_internal19HashSetResizeHelper15InitializeSlotsINSt3__19allocatorIcEELm24ELb1ELm8EEEbRNS1_12CommonFieldsEPvT_:
 1595|     10|                                               Alloc alloc) {
 1596|     10|    assert(c.capacity());
 1597|       |    // Folks with custom allocators often make unwarranted assumptions about the
 1598|       |    // behavior of their classes vis-a-vis trivial destructability and what
 1599|       |    // calls they will or won't make.  Avoid sampling for people with custom
 1600|       |    // allocators to get us out of this mess.  This is not a hard guarantee but
 1601|       |    // a workaround while we plan the exact guarantee we want to provide.
 1602|     10|    const size_t sample_size =
 1603|     10|        (std::is_same<Alloc, std::allocator<char>>::value &&
  ------------------
  |  Branch (1603:10): [True: 10, Folded]
  ------------------
 1604|     10|         c.slot_array() == nullptr)
  ------------------
  |  Branch (1604:10): [True: 2, False: 8]
  ------------------
 1605|     10|            ? SizeOfSlot
 1606|     10|            : 0;
 1607|     10|    HashtablezInfoHandle infoz =
 1608|     10|        sample_size > 0 ? Sample(sample_size) : c.infoz();
  ------------------
  |  Branch (1608:9): [True: 2, False: 8]
  ------------------
 1609|       |
 1610|     10|    const bool has_infoz = infoz.IsSampled();
 1611|     10|    const size_t cap = c.capacity();
 1612|     10|    const size_t alloc_size =
 1613|     10|        AllocSize(cap, SizeOfSlot, AlignOfSlot, has_infoz);
 1614|     10|    char* mem = static_cast<char*>(
 1615|     10|        Allocate<BackingArrayAlignment(AlignOfSlot)>(&alloc, alloc_size));
 1616|     10|    const GenerationType old_generation = c.generation();
 1617|     10|    c.set_generation_ptr(reinterpret_cast<GenerationType*>(
 1618|     10|        mem + GenerationOffset(cap, has_infoz)));
 1619|     10|    c.set_generation(NextGeneration(old_generation));
 1620|     10|    c.set_control(reinterpret_cast<ctrl_t*>(mem + ControlOffset(has_infoz)));
 1621|     10|    c.set_slots(mem + SlotOffset(cap, AlignOfSlot, has_infoz));
 1622|     10|    ResetGrowthLeft(c);
 1623|       |
 1624|     10|    const bool grow_single_group =
 1625|     10|        IsGrowingIntoSingleGroupApplicable(old_capacity_, c.capacity());
 1626|     10|    if (old_capacity_ != 0 && grow_single_group) {
  ------------------
  |  Branch (1626:9): [True: 8, False: 2]
  |  Branch (1626:31): [True: 6, False: 2]
  ------------------
 1627|      6|      if (TransferUsesMemcpy) {
  ------------------
  |  Branch (1627:11): [True: 6, Folded]
  ------------------
 1628|      6|        GrowSizeIntoSingleGroupTransferable(c, old_slots, SizeOfSlot);
 1629|      6|        DeallocateOld<AlignOfSlot>(alloc, SizeOfSlot, old_slots);
 1630|      6|      } else {
 1631|      0|        GrowIntoSingleGroupShuffleControlBytes(c.control(), c.capacity());
 1632|      0|      }
 1633|      6|    } else {
 1634|      4|      ResetCtrl(c, SizeOfSlot);
 1635|      4|    }
 1636|       |
 1637|     10|    c.set_has_infoz(has_infoz);
 1638|     10|    if (has_infoz) {
  ------------------
  |  Branch (1638:9): [True: 0, False: 10]
  ------------------
 1639|      0|      infoz.RecordStorageChanged(c.size(), cap);
 1640|      0|      if (grow_single_group || old_capacity_ == 0) {
  ------------------
  |  Branch (1640:11): [True: 0, False: 0]
  |  Branch (1640:32): [True: 0, False: 0]
  ------------------
 1641|      0|        infoz.RecordRehash(0);
 1642|      0|      }
 1643|      0|      c.set_infoz(infoz);
 1644|      0|    }
 1645|     10|    return grow_single_group;
 1646|     10|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE11HashElementclIS8_JRKNS4_21piecewise_construct_tENS4_5tupleIJRSG_EEENSP_IJRKSA_EEEEEEmRKT_DpOT0_:
 2804|     28|    size_t operator()(const K& key, Args&&...) const {
 2805|     28|      return h(key);
 2806|     28|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8transferEPNS1_13map_slot_typeIS8_SA_EESM_:
 2857|     28|  inline void transfer(slot_type* to, slot_type* from) {
 2858|     28|    PolicyTraits::transfer(&alloc_ref(), to, from);
 2859|     28|  }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE11growth_leftEv:
 3181|     64|  size_t growth_left() const { return common().growth_left(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE28rehash_and_grow_if_necessaryEv:
 2970|     10|  void rehash_and_grow_if_necessary() {
 2971|     10|    const size_t cap = capacity();
 2972|     10|    if (cap > Group::kWidth &&
  ------------------
  |  Branch (2972:9): [True: 0, False: 10]
  ------------------
 2973|       |        // Do these calculations in 64-bit to avoid overflow.
 2974|      0|        size() * uint64_t{32} <= cap * uint64_t{25}) {
  ------------------
  |  Branch (2974:9): [True: 0, False: 0]
  ------------------
 2975|       |      // Squash DELETED without growing if there is enough capacity.
 2976|       |      //
 2977|       |      // Rehash in place if the current size is <= 25/32 of capacity.
 2978|       |      // Rationale for such a high factor: 1) drop_deletes_without_resize() is
 2979|       |      // faster than resize, and 2) it takes quite a bit of work to add
 2980|       |      // tombstones.  In the worst case, seems to take approximately 4
 2981|       |      // insert/erase pairs to create a single tombstone and so if we are
 2982|       |      // rehashing because of tombstones, we can afford to rehash-in-place as
 2983|       |      // long as we are reclaiming at least 1/8 the capacity without doing more
 2984|       |      // than 2X the work.  (Where "work" is defined to be size() for rehashing
 2985|       |      // or rehashing in place, and 1 for an insert or erase.)  But rehashing in
 2986|       |      // place is faster per operation than inserting or even doubling the size
 2987|       |      // of the table, so we actually afford to reclaim even less space from a
 2988|       |      // resize-in-place.  The decision is to rehash in place if we can reclaim
 2989|       |      // at about 1/8th of the usable capacity (specifically 3/28 of the
 2990|       |      // capacity) which means that the total cost of rehashing will be a small
 2991|       |      // fraction of the total work.
 2992|       |      //
 2993|       |      // Here is output of an experiment using the BM_CacheInSteadyState
 2994|       |      // benchmark running the old case (where we rehash-in-place only if we can
 2995|       |      // reclaim at least 7/16*capacity) vs. this code (which rehashes in place
 2996|       |      // if we can recover 3/32*capacity).
 2997|       |      //
 2998|       |      // Note that although in the worst-case number of rehashes jumped up from
 2999|       |      // 15 to 190, but the number of operations per second is almost the same.
 3000|       |      //
 3001|       |      // Abridged output of running BM_CacheInSteadyState benchmark from
 3002|       |      // raw_hash_set_benchmark.   N is the number of insert/erase operations.
 3003|       |      //
 3004|       |      //      | OLD (recover >= 7/16        | NEW (recover >= 3/32)
 3005|       |      // size |    N/s LoadFactor NRehashes |    N/s LoadFactor NRehashes
 3006|       |      //  448 | 145284       0.44        18 | 140118       0.44        19
 3007|       |      //  493 | 152546       0.24        11 | 151417       0.48        28
 3008|       |      //  538 | 151439       0.26        11 | 151152       0.53        38
 3009|       |      //  583 | 151765       0.28        11 | 150572       0.57        50
 3010|       |      //  628 | 150241       0.31        11 | 150853       0.61        66
 3011|       |      //  672 | 149602       0.33        12 | 150110       0.66        90
 3012|       |      //  717 | 149998       0.35        12 | 149531       0.70       129
 3013|       |      //  762 | 149836       0.37        13 | 148559       0.74       190
 3014|       |      //  807 | 149736       0.39        14 | 151107       0.39        14
 3015|       |      //  852 | 150204       0.42        15 | 151019       0.42        15
 3016|      0|      drop_deletes_without_resize();
 3017|     10|    } else {
 3018|       |      // Otherwise grow the container.
 3019|     10|      resize(NextCapacity(cap));
 3020|     10|    }
 3021|     10|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE18GetPolicyFunctionsEv:
 3236|      2|  static const PolicyFunctions& GetPolicyFunctions() {
 3237|      2|    static constexpr PolicyFunctions value = {
 3238|      2|        sizeof(slot_type),
 3239|      2|        &raw_hash_set::hash_slot_fn,
 3240|      2|        PolicyTraits::transfer_uses_memcpy()
  ------------------
  |  Branch (3240:9): [True: 0, Folded]
  ------------------
 3241|      2|            ? TransferRelocatable<sizeof(slot_type)>
 3242|      2|            : &raw_hash_set::transfer_slot_fn,
 3243|      2|        (std::is_same<SlotAlloc, std::allocator<slot_type>>::value
  ------------------
  |  Branch (3243:10): [True: 0, Folded]
  ------------------
 3244|      2|             ? &DeallocateStandard<alignof(slot_type)>
 3245|      2|             : &raw_hash_set::dealloc_fn),
 3246|      2|    };
 3247|      2|    return value;
 3248|      2|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE15set_growth_leftEm:
 3182|     32|  void set_growth_left(size_t gl) { return common().set_growth_left(gl); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE10emplace_atIJRKNS4_21piecewise_construct_tENS4_5tupleIJOSG_EEENSO_IJOSA_EEEEEEvmDpOT_:
 3151|     32|  void emplace_at(size_t i, Args&&... args) {
 3152|     32|    construct(slot_array() + i, std::forward<Args>(args)...);
 3153|       |
 3154|       |    assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) ==
 3155|     32|               iterator_at(i) &&
 3156|     32|           "constructed value does not match the lookup key");
 3157|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE9constructIJRKNS4_21piecewise_construct_tENS4_5tupleIJOSG_EEENSO_IJOSA_EEEEEEvPNS1_13map_slot_typeIS8_SA_EEDpOT_:
 2851|     32|  inline void construct(slot_type* slot, Args&&... args) {
 2852|     32|    PolicyTraits::construct(&alloc_ref(), slot, std::forward<Args>(args)...);
 2853|     32|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE5beginEv:
 2266|      2|  iterator begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2267|      2|    auto it = iterator_at(0);
 2268|      2|    it.skip_empty_or_deleted();
 2269|      2|    return it;
 2270|      2|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iterator21skip_empty_or_deletedEv:
 1999|     34|    void skip_empty_or_deleted() {
 2000|     49|      while (IsEmptyOrDeleted(*ctrl_)) {
  ------------------
  |  Branch (2000:14): [True: 15, False: 34]
  ------------------
 2001|     15|        uint32_t shift =
 2002|     15|            GroupEmptyOrDeleted{ctrl_}.CountLeadingEmptyOrDeleted();
 2003|     15|        ctrl_ += shift;
 2004|     15|        slot_ += shift;
 2005|     15|      }
 2006|     34|      if (ABSL_PREDICT_FALSE(*ctrl_ == ctrl_t::kSentinel)) ctrl_ = nullptr;
  ------------------
  |  |  178|     34|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 32]
  |  |  |  Branch (178:49): [Folded, False: 34]
  |  |  |  Branch (178:58): [True: 2, False: 32]
  |  |  ------------------
  ------------------
 2007|     34|    }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iteratorppEv:
 1956|     32|    iterator& operator++() {
 1957|     32|      AssertIsFull(ctrl_, generation(), generation_ptr(), "operator++");
 1958|     32|      ++ctrl_;
 1959|     32|      ++slot_;
 1960|     32|      skip_empty_or_deleted();
 1961|     32|      return *this;
 1962|     32|    }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iteratordeEv:
 1944|     32|    reference operator*() const {
 1945|     32|      AssertIsFull(ctrl_, generation(), generation_ptr(), "operator*()");
 1946|     32|      return unchecked_deref();
 1947|     32|    }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE8iterator15unchecked_derefEv:
 2029|     32|    reference unchecked_deref() const { return PolicyTraits::element(slot_); }
_ZNK4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE4sizeEv:
 2287|      2|  size_t size() const { return common().size(); }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEE5clearEv:
 2291|      2|  ABSL_ATTRIBUTE_REINITIALIZES void clear() {
 2292|       |    // Iterating over this container is O(bucket_count()). When bucket_count()
 2293|       |    // is much greater than size(), iteration becomes prohibitively expensive.
 2294|       |    // For clear() it is more important to reuse the allocated array when the
 2295|       |    // container is small because allocation takes comparatively long time
 2296|       |    // compared to destruction of the elements of the container. So we pick the
 2297|       |    // largest bucket_count() threshold for which iteration is still fast and
 2298|       |    // past that we simply deallocate the array.
 2299|      2|    const size_t cap = capacity();
 2300|      2|    if (cap == 0) {
  ------------------
  |  Branch (2300:9): [True: 0, False: 2]
  ------------------
 2301|       |      // Already guaranteed to be empty; so nothing to do.
 2302|      2|    } else {
 2303|      2|      destroy_slots();
 2304|      2|      ClearBackingArray(common(), GetPolicyFunctions(), /*reuse=*/cap < 128);
 2305|      2|    }
 2306|      2|    common().set_reserved_growth(0);
 2307|      2|    common().set_reservation_size(0);
 2308|      2|  }
_ZN4absl12lts_2024011618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS1_10StringHashENS1_8StringEqENS4_9allocatorINS4_4pairIKS8_SA_EEEEEC2Ev:
 2088|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}

_ZNK4absl12lts_2024011615CommandLineFlag8IsOfTypeIbEEbv:
   74|      4|  inline bool IsOfType() const {
   75|      4|    return TypeId() == base_internal::FastTypeId<T>();
   76|      4|  }

_ZN25AbslFlagDefaultGenForfuzz3GenEPv:
  252|      4|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      4|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      4|    }                                                                         \
_ZN29AbslFlagDefaultGenForfuzz_for3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN36AbslFlagDefaultGenForcorpus_database3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN34AbslFlagDefaultGenForreplay_corpus3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN38AbslFlagDefaultGenForreplay_corpus_for3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN37AbslFlagDefaultGenFortime_budget_type3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN41AbslFlagDefaultGenFortime_limit_per_input3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN25AbslFlagDefaultGenForjobs3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN4absl12lts_202401167GetFlagINSt3__18optionalImEEEET_RKNS0_14flags_internal4FlagIS5_EE:
   95|      2|ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag<T>& flag) {
   96|      2|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
   97|      2|}
_ZN4absl12lts_202401167GetFlagImEET_RKNS0_14flags_internal4FlagIS2_EE:
   95|      4|ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag<T>& flag) {
   96|      4|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
   97|      4|}
_ZN4absl12lts_202401167GetFlagINS0_8DurationEEET_RKNS0_14flags_internal4FlagIS3_EE:
   95|     10|ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag<T>& flag) {
   96|     10|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
   97|     10|}
_ZN4absl12lts_202401167GetFlagIN8fuzztest8internal14TimeBudgetTypeEEET_RKNS0_14flags_internal4FlagIS5_EE:
   95|      2|ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag<T>& flag) {
   96|      2|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
   97|      2|}
_ZN4absl12lts_202401167GetFlagIbEET_RKNS0_14flags_internal4FlagIS2_EE:
   95|      6|ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag<T>& flag) {
   96|      6|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
   97|      6|}
_ZN4absl12lts_202401167GetFlagINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEET_RKNS0_14flags_internal4FlagIS9_EE:
   95|     14|ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag<T>& flag) {
   96|     14|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
   97|     14|}
_ZN29AbslFlagDefaultGenForflagfile3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN28AbslFlagDefaultGenForfromenv3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN31AbslFlagDefaultGenFortryfromenv3GenEPv:
  252|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  253|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  254|      2|    }                                                                         \
_ZN4absl12lts_202401167GetFlagINSt3__16vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEEEET_RKNS0_14flags_internal4FlagISC_EE:
   95|     10|ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag<T>& flag) {
   96|     10|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
   97|     10|}

_ZN4absl12lts_2024011614flags_internal15DynValueDeleterC2EPFPvNS1_6FlagOpEPKvS3_S3_E:
  135|      4|DynValueDeleter::DynValueDeleter(FlagOpFn op_arg) : op(op_arg) {}
_ZNK4absl12lts_2024011614flags_internal15DynValueDeleterclEPv:
  137|      4|void DynValueDeleter::operator()(void* ptr) const {
  138|      4|  if (op == nullptr) return;
  ------------------
  |  Branch (138:7): [True: 0, False: 4]
  ------------------
  139|       |
  140|      4|  Delete(op, ptr);
  141|      4|}
_ZN4absl12lts_2024011614flags_internal8FlagImpl4InitEv:
  143|     30|void FlagImpl::Init() {
  144|     30|  new (&data_guard_) absl::Mutex;
  145|       |
  146|     30|  auto def_kind = static_cast<FlagDefaultKind>(def_kind_);
  147|       |
  148|     30|  switch (ValueStorageKind()) {
  ------------------
  |  Branch (148:11): [True: 30, False: 0]
  ------------------
  149|      6|    case FlagValueStorageKind::kValueAndInitBit:
  ------------------
  |  Branch (149:5): [True: 6, False: 24]
  ------------------
  150|     10|    case FlagValueStorageKind::kOneWordAtomic: {
  ------------------
  |  Branch (150:5): [True: 4, False: 26]
  ------------------
  151|     10|      alignas(int64_t) std::array<char, sizeof(int64_t)> buf{};
  152|     10|      if (def_kind == FlagDefaultKind::kGenFunc) {
  ------------------
  |  Branch (152:11): [True: 2, False: 8]
  ------------------
  153|      2|        (*default_value_.gen_func)(buf.data());
  154|      8|      } else {
  155|      8|        assert(def_kind != FlagDefaultKind::kDynamicValue);
  156|      8|        std::memcpy(buf.data(), &default_value_, Sizeof(op_));
  157|      8|      }
  158|     10|      if (ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit) {
  ------------------
  |  Branch (158:11): [True: 6, False: 4]
  ------------------
  159|       |        // We presume here the memory layout of FlagValueAndInitBit struct.
  160|      6|        uint8_t initialized = 1;
  161|      6|        std::memcpy(buf.data() + Sizeof(op_), &initialized,
  162|      6|                    sizeof(initialized));
  163|      6|      }
  164|       |      // Type can contain valid uninitialized bits, e.g. padding.
  165|     10|      ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(buf.data(), buf.size());
  166|     10|      OneWordValue().store(absl::bit_cast<int64_t>(buf),
  167|     10|                           std::memory_order_release);
  168|     10|      break;
  169|      6|    }
  170|      8|    case FlagValueStorageKind::kSequenceLocked: {
  ------------------
  |  Branch (170:5): [True: 8, False: 22]
  ------------------
  171|       |      // For this storage kind the default_value_ always points to gen_func
  172|       |      // during initialization.
  173|      8|      assert(def_kind == FlagDefaultKind::kGenFunc);
  174|      8|      (*default_value_.gen_func)(AtomicBufferValue());
  175|      8|      break;
  176|      6|    }
  177|     12|    case FlagValueStorageKind::kAlignedBuffer:
  ------------------
  |  Branch (177:5): [True: 12, False: 18]
  ------------------
  178|       |      // For this storage kind the default_value_ always points to gen_func
  179|       |      // during initialization.
  180|     12|      assert(def_kind == FlagDefaultKind::kGenFunc);
  181|     12|      (*default_value_.gen_func)(AlignedBufferValue());
  182|     12|      break;
  183|     30|  }
  184|     30|  seq_lock_.MarkInitialized();
  185|     30|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl9DataGuardEv:
  187|     58|absl::Mutex* FlagImpl::DataGuard() const {
  188|     58|  absl::call_once(const_cast<FlagImpl*>(this)->init_control_, &FlagImpl::Init,
  189|     58|                  const_cast<FlagImpl*>(this));
  190|       |
  191|       |  // data_guard_ is initialized inside Init.
  192|     58|  return reinterpret_cast<absl::Mutex*>(&data_guard_);
  193|     58|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl13MakeInitValueEv:
  220|      4|std::unique_ptr<void, DynValueDeleter> FlagImpl::MakeInitValue() const {
  221|      4|  void* res = nullptr;
  222|      4|  switch (DefaultKind()) {
  223|      0|    case FlagDefaultKind::kDynamicValue:
  ------------------
  |  Branch (223:5): [True: 0, False: 4]
  ------------------
  224|      0|      res = flags_internal::Clone(op_, default_value_.dynamic_value);
  225|      0|      break;
  226|      2|    case FlagDefaultKind::kGenFunc:
  ------------------
  |  Branch (226:5): [True: 2, False: 2]
  ------------------
  227|      2|      res = flags_internal::Alloc(op_);
  228|      2|      (*default_value_.gen_func)(res);
  229|      2|      break;
  230|      2|    default:
  ------------------
  |  Branch (230:5): [True: 2, False: 2]
  ------------------
  231|      2|      res = flags_internal::Clone(op_, &default_value_);
  232|      2|      break;
  233|      4|  }
  234|      4|  return {res, DynValueDeleter{op_}};
  235|      4|}
_ZN4absl12lts_2024011614flags_internal8FlagImpl10StoreValueEPKv:
  237|      4|void FlagImpl::StoreValue(const void* src) {
  238|      4|  switch (ValueStorageKind()) {
  ------------------
  |  Branch (238:11): [True: 4, False: 0]
  ------------------
  239|      0|    case FlagValueStorageKind::kValueAndInitBit:
  ------------------
  |  Branch (239:5): [True: 0, False: 4]
  ------------------
  240|      2|    case FlagValueStorageKind::kOneWordAtomic: {
  ------------------
  |  Branch (240:5): [True: 2, False: 2]
  ------------------
  241|       |      // Load the current value to avoid setting 'init' bit manually.
  242|      2|      int64_t one_word_val = OneWordValue().load(std::memory_order_acquire);
  243|      2|      std::memcpy(&one_word_val, src, Sizeof(op_));
  244|      2|      OneWordValue().store(one_word_val, std::memory_order_release);
  245|      2|      seq_lock_.IncrementModificationCount();
  246|      2|      break;
  247|      0|    }
  248|      0|    case FlagValueStorageKind::kSequenceLocked: {
  ------------------
  |  Branch (248:5): [True: 0, False: 4]
  ------------------
  249|      0|      seq_lock_.Write(AtomicBufferValue(), src, Sizeof(op_));
  250|      0|      break;
  251|      0|    }
  252|      2|    case FlagValueStorageKind::kAlignedBuffer:
  ------------------
  |  Branch (252:5): [True: 2, False: 2]
  ------------------
  253|      2|      Copy(op_, src, AlignedBufferValue());
  254|      2|      seq_lock_.IncrementModificationCount();
  255|      2|      break;
  256|      4|  }
  257|      4|  modified_ = true;
  258|      4|  InvokeCallback();
  259|      4|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl4NameEv:
  261|    348|absl::string_view FlagImpl::Name() const { return name_; }
_ZNK4absl12lts_2024011614flags_internal8FlagImpl8FilenameEv:
  263|     32|std::string FlagImpl::Filename() const {
  264|     32|  return flags_internal::GetUsageConfig().normalize_filename(filename_);
  265|     32|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl6TypeIdEv:
  272|      4|FlagFastTypeId FlagImpl::TypeId() const {
  273|      4|  return flags_internal::FastTypeId(op_);
  274|      4|}
_ZN4absl12lts_2024011614flags_internal8FlagImpl11SetCallbackEPFvvE:
  317|      8|void FlagImpl::SetCallback(const FlagCallbackFunc mutation_callback) {
  318|      8|  absl::MutexLock l(DataGuard());
  319|       |
  320|      8|  if (callback_ == nullptr) {
  ------------------
  |  Branch (320:7): [True: 8, False: 0]
  ------------------
  321|      8|    callback_ = new FlagCallback;
  322|      8|  }
  323|      8|  callback_->func = mutation_callback;
  324|       |
  325|      8|  InvokeCallback();
  326|      8|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl14InvokeCallbackEv:
  328|     12|void FlagImpl::InvokeCallback() const {
  329|     12|  if (!callback_) return;
  ------------------
  |  Branch (329:7): [True: 4, False: 8]
  ------------------
  330|       |
  331|       |  // Make a copy of the C-style function pointer that we are about to invoke
  332|       |  // before we release the lock guarding it.
  333|      8|  FlagCallbackFunc cb = callback_->func;
  334|       |
  335|       |  // If the flag has a mutation callback this function invokes it. While the
  336|       |  // callback is being invoked the primary flag's mutex is unlocked and it is
  337|       |  // re-locked back after call to callback is completed. Callback invocation is
  338|       |  // guarded by flag's secondary mutex instead which prevents concurrent
  339|       |  // callback invocation. Note that it is possible for other thread to grab the
  340|       |  // primary lock and update flag's value at any time during the callback
  341|       |  // invocation. This is by design. Callback can get a value of the flag if
  342|       |  // necessary, but it might be different from the value initiated the callback
  343|       |  // and it also can be different by the time the callback invocation is
  344|       |  // completed. Requires that *primary_lock be held in exclusive mode; it may be
  345|       |  // released and reacquired by the implementation.
  346|      8|  MutexRelock relock(*DataGuard());
  347|      8|  absl::MutexLock lock(&callback_->guard);
  348|      8|  cb();
  349|      8|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl18AlignedBufferValueEv:
  414|     38|void* FlagImpl::AlignedBufferValue() const {
  415|       |  assert(ValueStorageKind() == FlagValueStorageKind::kAlignedBuffer);
  416|     38|  return OffsetValue<void>();
  417|     38|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl17AtomicBufferValueEv:
  419|     16|std::atomic<uint64_t>* FlagImpl::AtomicBufferValue() const {
  420|       |  assert(ValueStorageKind() == FlagValueStorageKind::kSequenceLocked);
  421|     16|  return OffsetValue<std::atomic<uint64_t>>();
  422|     16|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl12OneWordValueEv:
  424|     20|std::atomic<int64_t>& FlagImpl::OneWordValue() const {
  425|       |  assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic ||
  426|     20|         ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit);
  427|     20|  return OffsetValue<FlagOneWordValue>()->value;
  428|     20|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl8TryParseENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERNS3_12basic_stringIcS6_NS3_9allocatorIcEEEE:
  435|      4|    absl::string_view value, std::string& err) const {
  436|      4|  std::unique_ptr<void, DynValueDeleter> tentative_value = MakeInitValue();
  437|       |
  438|      4|  std::string parse_err;
  439|      4|  if (!flags_internal::Parse(op_, value, tentative_value.get(), &parse_err)) {
  ------------------
  |  Branch (439:7): [True: 0, False: 4]
  ------------------
  440|      0|    absl::string_view err_sep = parse_err.empty() ? "" : "; ";
  ------------------
  |  Branch (440:33): [True: 0, False: 0]
  ------------------
  441|      0|    err = absl::StrCat("Illegal value '", value, "' specified for flag '",
  442|      0|                       Name(), "'", err_sep, parse_err);
  443|      0|    return nullptr;
  444|      0|  }
  445|       |
  446|      4|  return tentative_value;
  447|      4|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl4ReadEPv:
  449|     32|void FlagImpl::Read(void* dst) const {
  450|     32|  auto* guard = DataGuard();  // Make sure flag initialized
  451|     32|  switch (ValueStorageKind()) {
  ------------------
  |  Branch (451:11): [True: 32, False: 0]
  ------------------
  452|      0|    case FlagValueStorageKind::kValueAndInitBit:
  ------------------
  |  Branch (452:5): [True: 0, False: 32]
  ------------------
  453|      0|    case FlagValueStorageKind::kOneWordAtomic: {
  ------------------
  |  Branch (453:5): [True: 0, False: 32]
  ------------------
  454|      0|      const int64_t one_word_val =
  455|      0|          OneWordValue().load(std::memory_order_acquire);
  456|      0|      std::memcpy(dst, &one_word_val, Sizeof(op_));
  457|      0|      break;
  458|      0|    }
  459|      8|    case FlagValueStorageKind::kSequenceLocked: {
  ------------------
  |  Branch (459:5): [True: 8, False: 24]
  ------------------
  460|      8|      ReadSequenceLockedData(dst);
  461|      8|      break;
  462|      0|    }
  463|     24|    case FlagValueStorageKind::kAlignedBuffer: {
  ------------------
  |  Branch (463:5): [True: 24, False: 8]
  ------------------
  464|     24|      absl::MutexLock l(guard);
  465|     24|      flags_internal::CopyConstruct(op_, AlignedBufferValue(), dst);
  466|     24|      break;
  467|      0|    }
  468|     32|  }
  469|     32|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl11ReadOneWordEv:
  471|      4|int64_t FlagImpl::ReadOneWord() const {
  472|       |  assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic ||
  473|      4|         ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit);
  474|      4|  auto* guard = DataGuard();  // Make sure flag initialized
  475|      4|  (void)guard;
  476|      4|  return OneWordValue().load(std::memory_order_acquire);
  477|      4|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl11ReadOneBoolEv:
  479|      2|bool FlagImpl::ReadOneBool() const {
  480|       |  assert(ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit);
  481|      2|  auto* guard = DataGuard();  // Make sure flag initialized
  482|      2|  (void)guard;
  483|      2|  return absl::bit_cast<FlagValueAndInitBit<bool>>(
  484|      2|             OneWordValue().load(std::memory_order_acquire))
  485|      2|      .value;
  486|      2|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl22ReadSequenceLockedDataEPv:
  488|      8|void FlagImpl::ReadSequenceLockedData(void* dst) const {
  489|      8|  size_t size = Sizeof(op_);
  490|       |  // Attempt to read using the sequence lock.
  491|      8|  if (ABSL_PREDICT_TRUE(seq_lock_.TryRead(dst, AtomicBufferValue(), size))) {
  ------------------
  |  |  179|      8|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:30): [True: 8, False: 0]
  |  |  |  Branch (179:48): [Folded, False: 8]
  |  |  |  Branch (179:57): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  492|      8|    return;
  493|      8|  }
  494|       |  // We failed due to contention. Acquire the lock to prevent contention
  495|       |  // and try again.
  496|      0|  absl::ReaderMutexLock l(DataGuard());
  497|      0|  bool success = seq_lock_.TryRead(dst, AtomicBufferValue(), size);
  498|       |  assert(success);
  499|      0|  static_cast<void>(success);
  500|      0|}
_ZN4absl12lts_2024011614flags_internal8FlagImpl9ParseFromENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEENS1_15FlagSettingModeENS1_11ValueSourceERNS3_12basic_stringIcS6_NS3_9allocatorIcEEEE:
  528|      4|                         ValueSource source, std::string& err) {
  529|      4|  absl::MutexLock l(DataGuard());
  530|       |
  531|      4|  switch (set_mode) {
  ------------------
  |  Branch (531:11): [True: 4, False: 0]
  ------------------
  532|      4|    case SET_FLAGS_VALUE: {
  ------------------
  |  Branch (532:5): [True: 4, False: 0]
  ------------------
  533|       |      // set or modify the flag's value
  534|      4|      auto tentative_value = TryParse(value, err);
  535|      4|      if (!tentative_value) return false;
  ------------------
  |  Branch (535:11): [True: 0, False: 4]
  ------------------
  536|       |
  537|      4|      StoreValue(tentative_value.get());
  538|       |
  539|      4|      if (source == kCommandLine) {
  ------------------
  |  Branch (539:11): [True: 4, False: 0]
  ------------------
  540|      4|        on_command_line_ = true;
  541|      4|      }
  542|      4|      break;
  543|      4|    }
  544|      0|    case SET_FLAG_IF_DEFAULT: {
  ------------------
  |  Branch (544:5): [True: 0, False: 4]
  ------------------
  545|       |      // set the flag's value, but only if it hasn't been set by someone else
  546|      0|      if (modified_) {
  ------------------
  |  Branch (546:11): [True: 0, False: 0]
  ------------------
  547|       |        // TODO(rogeeff): review and fix this semantic. Currently we do not fail
  548|       |        // in this case if flag is modified. This is misleading since the flag's
  549|       |        // value is not updated even though we return true.
  550|       |        // *err = absl::StrCat(Name(), " is already set to ",
  551|       |        //                     CurrentValue(), "\n");
  552|       |        // return false;
  553|      0|        return true;
  554|      0|      }
  555|      0|      auto tentative_value = TryParse(value, err);
  556|      0|      if (!tentative_value) return false;
  ------------------
  |  Branch (556:11): [True: 0, False: 0]
  ------------------
  557|       |
  558|      0|      StoreValue(tentative_value.get());
  559|      0|      break;
  560|      0|    }
  561|      0|    case SET_FLAGS_DEFAULT: {
  ------------------
  |  Branch (561:5): [True: 0, False: 4]
  ------------------
  562|      0|      auto tentative_value = TryParse(value, err);
  563|      0|      if (!tentative_value) return false;
  ------------------
  |  Branch (563:11): [True: 0, False: 0]
  ------------------
  564|       |
  565|      0|      if (DefaultKind() == FlagDefaultKind::kDynamicValue) {
  ------------------
  |  Branch (565:11): [True: 0, False: 0]
  ------------------
  566|      0|        void* old_value = default_value_.dynamic_value;
  567|      0|        default_value_.dynamic_value = tentative_value.release();
  568|      0|        tentative_value.reset(old_value);
  569|      0|      } else {
  570|      0|        default_value_.dynamic_value = tentative_value.release();
  571|      0|        def_kind_ = static_cast<uint8_t>(FlagDefaultKind::kDynamicValue);
  572|      0|      }
  573|       |
  574|      0|      if (!modified_) {
  ------------------
  |  Branch (574:11): [True: 0, False: 0]
  ------------------
  575|       |        // Need to set both default value *and* current, in this case.
  576|      0|        StoreValue(default_value_.dynamic_value);
  577|      0|        modified_ = false;
  578|      0|      }
  579|      0|      break;
  580|      0|    }
  581|      4|  }
  582|       |
  583|      4|  return true;
  584|      4|}
flag.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_111MutexRelockC2ERNS0_5MutexE:
   71|      8|  explicit MutexRelock(absl::Mutex& mu) : mu_(mu) { mu_.Unlock(); }
flag.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_111MutexRelockD2Ev:
   72|      8|  ~MutexRelock() { mu_.Lock(); }
_ZNK4absl12lts_2024011614flags_internal8FlagImpl11OffsetValueIvEEPT_v:
  406|     38|StorageT* FlagImpl::OffsetValue() const {
  407|     38|  char* p = reinterpret_cast<char*>(const_cast<FlagImpl*>(this));
  408|       |  // The offset is deduced via Flag value type specific op_.
  409|     38|  ptrdiff_t offset = flags_internal::ValueOffset(op_);
  410|       |
  411|     38|  return reinterpret_cast<StorageT*>(p + offset);
  412|     38|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl11OffsetValueINSt3__16atomicImEEEEPT_v:
  406|     16|StorageT* FlagImpl::OffsetValue() const {
  407|     16|  char* p = reinterpret_cast<char*>(const_cast<FlagImpl*>(this));
  408|       |  // The offset is deduced via Flag value type specific op_.
  409|     16|  ptrdiff_t offset = flags_internal::ValueOffset(op_);
  410|       |
  411|     16|  return reinterpret_cast<StorageT*>(p + offset);
  412|     16|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl11OffsetValueINS1_16FlagOneWordValueEEEPT_v:
  406|     20|StorageT* FlagImpl::OffsetValue() const {
  407|     20|  char* p = reinterpret_cast<char*>(const_cast<FlagImpl*>(this));
  408|       |  // The offset is deduced via Flag value type specific op_.
  409|     20|  ptrdiff_t offset = flags_internal::ValueOffset(op_);
  410|       |
  411|     20|  return reinterpret_cast<StorageT*>(p + offset);
  412|     20|}

_ZN4absl12lts_2024011614flags_internal16InitDefaultValueINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEET_SA_:
  277|      8|constexpr T InitDefaultValue(T t) {
  278|      8|  return t;
  279|      8|}
_ZN4absl12lts_2024011614flags_internal16InitDefaultValueINS0_8DurationEEET_S4_:
  277|      6|constexpr T InitDefaultValue(T t) {
  278|      6|  return t;
  279|      6|}
_ZN4absl12lts_2024011614flags_internal16InitDefaultValueIN8fuzztest8internal14TimeBudgetTypeEEET_S6_:
  277|      2|constexpr T InitDefaultValue(T t) {
  278|      2|  return t;
  279|      2|}
_ZN4absl12lts_2024011614flags_internal16InitDefaultValueINSt3__18optionalImEEEET_S6_:
  277|      2|constexpr T InitDefaultValue(T t) {
  278|      2|  return t;
  279|      2|}
_ZN4absl12lts_2024011614flags_internal12FlagImplPeer9InvokeGetINSt3__18optionalImEENS1_4FlagIS6_EEEET_RKT0_:
  697|      2|  static T InvokeGet(const FlagType& flag) {
  698|      2|    return flag.Get();
  699|      2|  }
_ZNK4absl12lts_2024011614flags_internal4FlagINSt3__18optionalImEEE3GetEv:
  657|      2|  T Get() const {
  658|       |    // See implementation notes in CommandLineFlag::Get().
  659|      2|    union U {
  660|      2|      T value;
  661|      2|      U() {}
  662|      2|      ~U() { value.~T(); }
  663|      2|    };
  664|      2|    U u;
  665|       |
  666|       |#if !defined(NDEBUG)
  667|       |    impl_.AssertValidType(base_internal::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  668|       |#endif
  669|       |
  670|      2|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 2]
  |  |  |  Branch (178:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  671|      2|      impl_.Read(&u.value);
  672|      2|    }
  673|      2|    return std::move(u.value);
  674|      2|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagINSt3__18optionalImEEE3GetEvEN1UC2Ev:
  661|      2|      U() {}
_ZNK4absl12lts_2024011614flags_internal9FlagValueINSt3__18optionalImEELNS1_20FlagValueStorageKindE2EE3GetERKNS1_12SequenceLockERS5_:
  384|      2|  bool Get(const SequenceLock& lock, T& dst) const {
  385|      2|    return lock.TryRead(&dst, value_words, sizeof(T));
  386|      2|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagINSt3__18optionalImEEE3GetEvEN1UD2Ev:
  662|      2|      ~U() { value.~T(); }
_ZN4absl12lts_2024011614flags_internal12FlagImplPeer9InvokeGetImNS1_4FlagImEEEET_RKT0_:
  697|      4|  static T InvokeGet(const FlagType& flag) {
  698|      4|    return flag.Get();
  699|      4|  }
_ZNK4absl12lts_2024011614flags_internal4FlagImE3GetEv:
  657|      4|  T Get() const {
  658|       |    // See implementation notes in CommandLineFlag::Get().
  659|      4|    union U {
  660|      4|      T value;
  661|      4|      U() {}
  662|      4|      ~U() { value.~T(); }
  663|      4|    };
  664|      4|    U u;
  665|       |
  666|       |#if !defined(NDEBUG)
  667|       |    impl_.AssertValidType(base_internal::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  668|       |#endif
  669|       |
  670|      4|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  178|      4|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 2]
  |  |  |  Branch (178:49): [Folded, False: 4]
  |  |  |  Branch (178:58): [True: 2, False: 2]
  |  |  ------------------
  ------------------
  671|      2|      impl_.Read(&u.value);
  672|      2|    }
  673|      4|    return std::move(u.value);
  674|      4|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagImE3GetEvEN1UC2Ev:
  661|      4|      U() {}
_ZNK4absl12lts_2024011614flags_internal9FlagValueImLNS1_20FlagValueStorageKindE1EE3GetERKNS1_12SequenceLockERm:
  372|      4|  bool Get(const SequenceLock&, T& dst) const {
  373|      4|    int64_t one_word_val = value.load(std::memory_order_acquire);
  374|      4|    if (ABSL_PREDICT_FALSE(one_word_val == UninitializedFlagValue())) {
  ------------------
  |  |  178|      4|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 2]
  |  |  |  Branch (178:49): [Folded, False: 4]
  |  |  |  Branch (178:58): [True: 2, False: 2]
  |  |  ------------------
  ------------------
  375|      2|      return false;
  376|      2|    }
  377|      2|    std::memcpy(&dst, static_cast<const void*>(&one_word_val), sizeof(T));
  378|      2|    return true;
  379|      4|  }
_ZN4absl12lts_2024011614flags_internal22UninitializedFlagValueEv:
  301|      4|constexpr int64_t UninitializedFlagValue() {
  302|      4|  return static_cast<int64_t>(0xababababababababll);
  303|      4|}
_ZNK4absl12lts_2024011614flags_internal8FlagImpl4ReadImTnNSt3__19enable_ifIXeqclsr14flags_internalE11StorageKindIT_EELNS1_20FlagValueStorageKindE1EEiE4typeELi0EEEvPS6_:
  457|      2|  void Read(T* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) {
  458|      2|    int64_t v = ReadOneWord();
  459|      2|    std::memcpy(value, static_cast<const void*>(&v), sizeof(T));
  460|      2|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagImE3GetEvEN1UD2Ev:
  662|      4|      ~U() { value.~T(); }
_ZN4absl12lts_2024011614flags_internal12FlagImplPeer9InvokeGetINS0_8DurationENS1_4FlagIS4_EEEET_RKT0_:
  697|     10|  static T InvokeGet(const FlagType& flag) {
  698|     10|    return flag.Get();
  699|     10|  }
_ZNK4absl12lts_2024011614flags_internal4FlagINS0_8DurationEE3GetEv:
  657|     10|  T Get() const {
  658|       |    // See implementation notes in CommandLineFlag::Get().
  659|     10|    union U {
  660|     10|      T value;
  661|     10|      U() {}
  662|     10|      ~U() { value.~T(); }
  663|     10|    };
  664|     10|    U u;
  665|       |
  666|       |#if !defined(NDEBUG)
  667|       |    impl_.AssertValidType(base_internal::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  668|       |#endif
  669|       |
  670|     10|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  178|     10|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 6, False: 4]
  |  |  |  Branch (178:49): [Folded, False: 10]
  |  |  |  Branch (178:58): [True: 6, False: 4]
  |  |  ------------------
  ------------------
  671|      6|      impl_.Read(&u.value);
  672|      6|    }
  673|     10|    return std::move(u.value);
  674|     10|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagINS0_8DurationEE3GetEvEN1UC2Ev:
  661|     10|      U() {}
_ZNK4absl12lts_2024011614flags_internal9FlagValueINS0_8DurationELNS1_20FlagValueStorageKindE2EE3GetERKNS1_12SequenceLockERS3_:
  384|     10|  bool Get(const SequenceLock& lock, T& dst) const {
  385|     10|    return lock.TryRead(&dst, value_words, sizeof(T));
  386|     10|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagINS0_8DurationEE3GetEvEN1UD2Ev:
  662|     10|      ~U() { value.~T(); }
_ZN4absl12lts_2024011614flags_internal12FlagImplPeer9InvokeGetIN8fuzztest8internal14TimeBudgetTypeENS1_4FlagIS6_EEEET_RKT0_:
  697|      2|  static T InvokeGet(const FlagType& flag) {
  698|      2|    return flag.Get();
  699|      2|  }
_ZNK4absl12lts_2024011614flags_internal4FlagIN8fuzztest8internal14TimeBudgetTypeEE3GetEv:
  657|      2|  T Get() const {
  658|       |    // See implementation notes in CommandLineFlag::Get().
  659|      2|    union U {
  660|      2|      T value;
  661|      2|      U() {}
  662|      2|      ~U() { value.~T(); }
  663|      2|    };
  664|      2|    U u;
  665|       |
  666|       |#if !defined(NDEBUG)
  667|       |    impl_.AssertValidType(base_internal::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  668|       |#endif
  669|       |
  670|      2|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 2]
  |  |  |  Branch (178:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  671|      2|      impl_.Read(&u.value);
  672|      2|    }
  673|      2|    return std::move(u.value);
  674|      2|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagIN8fuzztest8internal14TimeBudgetTypeEE3GetEvEN1UC2Ev:
  661|      2|      U() {}
_ZNK4absl12lts_2024011614flags_internal9FlagValueIN8fuzztest8internal14TimeBudgetTypeELNS1_20FlagValueStorageKindE0EE3GetERKNS1_12SequenceLockERS5_:
  359|      2|  bool Get(const SequenceLock&, T& dst) const {
  360|      2|    int64_t storage = value.load(std::memory_order_acquire);
  361|      2|    if (ABSL_PREDICT_FALSE(storage == 0)) {
  ------------------
  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 2]
  |  |  |  Branch (178:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  362|      2|      return false;
  363|      2|    }
  364|      0|    dst = absl::bit_cast<FlagValueAndInitBit<T>>(storage).value;
  365|      0|    return true;
  366|      2|  }
_ZNK4absl12lts_2024011614flags_internal8FlagImpl4ReadIN8fuzztest8internal14TimeBudgetTypeETnNSt3__19enable_ifIXeqclsr14flags_internalE11StorageKindIT_EELNS1_20FlagValueStorageKindE0EEiE4typeELi0EEEvPS9_:
  465|      2|  void Read(T* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) {
  466|      2|    *value = absl::bit_cast<FlagValueAndInitBit<T>>(ReadOneWord()).value;
  467|      2|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagIN8fuzztest8internal14TimeBudgetTypeEE3GetEvEN1UD2Ev:
  662|      2|      ~U() { value.~T(); }
_ZN4absl12lts_2024011614flags_internal7FlagOpsIbEEPvNS1_6FlagOpEPKvS3_S3_:
  713|     14|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  714|     14|  switch (op) {
  ------------------
  |  Branch (714:11): [True: 14, False: 0]
  ------------------
  715|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (715:5): [True: 0, False: 14]
  ------------------
  716|      0|      std::allocator<T> alloc;
  717|      0|      return std::allocator_traits<std::allocator<T>>::allocate(alloc, 1);
  718|      0|    }
  719|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (719:5): [True: 0, False: 14]
  ------------------
  720|      0|      T* p = static_cast<T*>(v2);
  721|      0|      p->~T();
  722|      0|      std::allocator<T> alloc;
  723|      0|      std::allocator_traits<std::allocator<T>>::deallocate(alloc, p, 1);
  724|      0|      return nullptr;
  725|      0|    }
  726|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (726:5): [True: 0, False: 14]
  ------------------
  727|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  728|      0|      return nullptr;
  729|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (729:5): [True: 0, False: 14]
  ------------------
  730|      0|      new (v2) T(*static_cast<const T*>(v1));
  731|      0|      return nullptr;
  732|      8|    case FlagOp::kSizeof:
  ------------------
  |  Branch (732:5): [True: 8, False: 6]
  ------------------
  733|      8|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  734|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (734:5): [True: 0, False: 14]
  ------------------
  735|      0|      return const_cast<void*>(base_internal::FastTypeId<T>());
  736|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (736:5): [True: 0, False: 14]
  ------------------
  737|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  738|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (738:5): [True: 0, False: 14]
  ------------------
  739|       |      // Initialize the temporary instance of type T based on current value in
  740|       |      // destination (which is going to be flag's default value).
  741|      0|      T temp(*static_cast<T*>(v2));
  742|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (742:11): [True: 0, False: 0]
  ------------------
  743|      0|                              static_cast<std::string*>(v3))) {
  744|      0|        return nullptr;
  745|      0|      }
  746|      0|      *static_cast<T*>(v2) = std::move(temp);
  747|      0|      return v2;
  748|      0|    }
  749|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (749:5): [True: 0, False: 14]
  ------------------
  750|      0|      *static_cast<std::string*>(v2) =
  751|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  752|      0|      return nullptr;
  753|      6|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (753:5): [True: 6, False: 8]
  ------------------
  754|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  755|       |      // offset of the data.
  756|      6|      size_t round_to = alignof(FlagValue<T>);
  757|      6|      size_t offset =
  758|      6|          (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  759|      6|      return reinterpret_cast<void*>(offset);
  760|      0|    }
  761|     14|  }
  762|      0|  return nullptr;
  763|     14|}
_ZN4absl12lts_2024011614flags_internal13FlagRegistrarIbLb1EEC2ERNS1_4FlagIbEEPKc:
  773|      4|  explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) {
  774|      4|    if (do_register)
  ------------------
  |  Branch (774:9): [True: 4, Folded]
  ------------------
  775|      4|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  776|      4|  }
_ZNO4absl12lts_2024011614flags_internal13FlagRegistrarIbLb1EE8OnUpdateEPFvvE:
  778|      2|  FlagRegistrar OnUpdate(FlagCallbackFunc cb) && {
  779|      2|    flag_.impl_.SetCallback(cb);
  780|      2|    return *this;
  781|      2|  }
_ZN4absl12lts_2024011614flags_internal12FlagImplPeer9InvokeGetIbNS1_4FlagIbEEEET_RKT0_:
  697|      6|  static T InvokeGet(const FlagType& flag) {
  698|      6|    return flag.Get();
  699|      6|  }
_ZNK4absl12lts_2024011614flags_internal4FlagIbE3GetEv:
  657|      6|  T Get() const {
  658|       |    // See implementation notes in CommandLineFlag::Get().
  659|      6|    union U {
  660|      6|      T value;
  661|      6|      U() {}
  662|      6|      ~U() { value.~T(); }
  663|      6|    };
  664|      6|    U u;
  665|       |
  666|       |#if !defined(NDEBUG)
  667|       |    impl_.AssertValidType(base_internal::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  668|       |#endif
  669|       |
  670|      6|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  178|      6|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 4]
  |  |  |  Branch (178:49): [Folded, False: 6]
  |  |  |  Branch (178:58): [True: 2, False: 4]
  |  |  ------------------
  ------------------
  671|      2|      impl_.Read(&u.value);
  672|      2|    }
  673|      6|    return std::move(u.value);
  674|      6|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagIbE3GetEvEN1UC2Ev:
  661|      6|      U() {}
_ZNK4absl12lts_2024011614flags_internal9FlagValueIbLNS1_20FlagValueStorageKindE0EE3GetERKNS1_12SequenceLockERb:
  359|      6|  bool Get(const SequenceLock&, T& dst) const {
  360|      6|    int64_t storage = value.load(std::memory_order_acquire);
  361|      6|    if (ABSL_PREDICT_FALSE(storage == 0)) {
  ------------------
  |  |  178|      6|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 4]
  |  |  |  Branch (178:49): [Folded, False: 6]
  |  |  |  Branch (178:58): [True: 2, False: 4]
  |  |  ------------------
  ------------------
  362|      2|      return false;
  363|      2|    }
  364|      4|    dst = absl::bit_cast<FlagValueAndInitBit<T>>(storage).value;
  365|      4|    return true;
  366|      6|  }
_ZNK4absl12lts_2024011614flags_internal8FlagImpl4ReadEPb:
  450|      2|  void Read(bool* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) {
  451|      2|    *value = ReadOneBool();
  452|      2|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagIbE3GetEvEN1UD2Ev:
  662|      6|      ~U() { value.~T(); }
_ZNK4absl12lts_2024011614flags_internal13FlagRegistrarIbLb1EEcvNS1_18FlagRegistrarEmptyEEv:
  786|      4|  operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2024011614flags_internal7FlagOpsINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEPvNS1_6FlagOpEPKvSA_SA_:
  713|     46|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  714|     46|  switch (op) {
  ------------------
  |  Branch (714:11): [True: 46, False: 0]
  ------------------
  715|      2|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (715:5): [True: 2, False: 44]
  ------------------
  716|      2|      std::allocator<T> alloc;
  717|      2|      return std::allocator_traits<std::allocator<T>>::allocate(alloc, 1);
  718|      0|    }
  719|      2|    case FlagOp::kDelete: {
  ------------------
  |  Branch (719:5): [True: 2, False: 44]
  ------------------
  720|      2|      T* p = static_cast<T*>(v2);
  721|      2|      p->~T();
  722|      2|      std::allocator<T> alloc;
  723|      2|      std::allocator_traits<std::allocator<T>>::deallocate(alloc, p, 1);
  724|      2|      return nullptr;
  725|      0|    }
  726|      2|    case FlagOp::kCopy:
  ------------------
  |  Branch (726:5): [True: 2, False: 44]
  ------------------
  727|      2|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  728|      2|      return nullptr;
  729|     14|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (729:5): [True: 14, False: 32]
  ------------------
  730|     14|      new (v2) T(*static_cast<const T*>(v1));
  731|     14|      return nullptr;
  732|      0|    case FlagOp::kSizeof:
  ------------------
  |  Branch (732:5): [True: 0, False: 46]
  ------------------
  733|      0|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  734|      2|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (734:5): [True: 2, False: 44]
  ------------------
  735|      2|      return const_cast<void*>(base_internal::FastTypeId<T>());
  736|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (736:5): [True: 0, False: 46]
  ------------------
  737|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  738|      2|    case FlagOp::kParse: {
  ------------------
  |  Branch (738:5): [True: 2, False: 44]
  ------------------
  739|       |      // Initialize the temporary instance of type T based on current value in
  740|       |      // destination (which is going to be flag's default value).
  741|      2|      T temp(*static_cast<T*>(v2));
  742|      2|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (742:11): [True: 0, False: 2]
  ------------------
  743|      2|                              static_cast<std::string*>(v3))) {
  744|      0|        return nullptr;
  745|      0|      }
  746|      2|      *static_cast<T*>(v2) = std::move(temp);
  747|      2|      return v2;
  748|      2|    }
  749|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (749:5): [True: 0, False: 46]
  ------------------
  750|      0|      *static_cast<std::string*>(v2) =
  751|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  752|      0|      return nullptr;
  753|     22|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (753:5): [True: 22, False: 24]
  ------------------
  754|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  755|       |      // offset of the data.
  756|     22|      size_t round_to = alignof(FlagValue<T>);
  757|     22|      size_t offset =
  758|     22|          (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  759|     22|      return reinterpret_cast<void*>(offset);
  760|      2|    }
  761|     46|  }
  762|      0|  return nullptr;
  763|     46|}
_ZN4absl12lts_2024011614flags_internal13FlagRegistrarINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELb1EEC2ERNS1_4FlagIS9_EEPKc:
  773|      6|  explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) {
  774|      6|    if (do_register)
  ------------------
  |  Branch (774:9): [True: 6, Folded]
  ------------------
  775|      6|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  776|      6|  }
_ZNK4absl12lts_2024011614flags_internal13FlagRegistrarINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  786|      6|  operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2024011614flags_internal7FlagOpsINS0_8DurationEEEPvNS1_6FlagOpEPKvS4_S4_:
  713|     18|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  714|     18|  switch (op) {
  ------------------
  |  Branch (714:11): [True: 18, False: 0]
  ------------------
  715|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (715:5): [True: 0, False: 18]
  ------------------
  716|      0|      std::allocator<T> alloc;
  717|      0|      return std::allocator_traits<std::allocator<T>>::allocate(alloc, 1);
  718|      0|    }
  719|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (719:5): [True: 0, False: 18]
  ------------------
  720|      0|      T* p = static_cast<T*>(v2);
  721|      0|      p->~T();
  722|      0|      std::allocator<T> alloc;
  723|      0|      std::allocator_traits<std::allocator<T>>::deallocate(alloc, p, 1);
  724|      0|      return nullptr;
  725|      0|    }
  726|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (726:5): [True: 0, False: 18]
  ------------------
  727|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  728|      0|      return nullptr;
  729|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (729:5): [True: 0, False: 18]
  ------------------
  730|      0|      new (v2) T(*static_cast<const T*>(v1));
  731|      0|      return nullptr;
  732|      6|    case FlagOp::kSizeof:
  ------------------
  |  Branch (732:5): [True: 6, False: 12]
  ------------------
  733|      6|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  734|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (734:5): [True: 0, False: 18]
  ------------------
  735|      0|      return const_cast<void*>(base_internal::FastTypeId<T>());
  736|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (736:5): [True: 0, False: 18]
  ------------------
  737|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  738|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (738:5): [True: 0, False: 18]
  ------------------
  739|       |      // Initialize the temporary instance of type T based on current value in
  740|       |      // destination (which is going to be flag's default value).
  741|      0|      T temp(*static_cast<T*>(v2));
  742|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (742:11): [True: 0, False: 0]
  ------------------
  743|      0|                              static_cast<std::string*>(v3))) {
  744|      0|        return nullptr;
  745|      0|      }
  746|      0|      *static_cast<T*>(v2) = std::move(temp);
  747|      0|      return v2;
  748|      0|    }
  749|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (749:5): [True: 0, False: 18]
  ------------------
  750|      0|      *static_cast<std::string*>(v2) =
  751|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  752|      0|      return nullptr;
  753|     12|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (753:5): [True: 12, False: 6]
  ------------------
  754|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  755|       |      // offset of the data.
  756|     12|      size_t round_to = alignof(FlagValue<T>);
  757|     12|      size_t offset =
  758|     12|          (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  759|     12|      return reinterpret_cast<void*>(offset);
  760|      0|    }
  761|     18|  }
  762|      0|  return nullptr;
  763|     18|}
_ZN4absl12lts_2024011614flags_internal13FlagRegistrarINS0_8DurationELb1EEC2ERNS1_4FlagIS3_EEPKc:
  773|      6|  explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) {
  774|      6|    if (do_register)
  ------------------
  |  Branch (774:9): [True: 6, Folded]
  ------------------
  775|      6|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  776|      6|  }
_ZNK4absl12lts_2024011614flags_internal13FlagRegistrarINS0_8DurationELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  786|      6|  operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2024011614flags_internal7FlagOpsIN8fuzztest8internal14TimeBudgetTypeEEEPvNS1_6FlagOpEPKvS6_S6_:
  713|      6|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  714|      6|  switch (op) {
  ------------------
  |  Branch (714:11): [True: 6, False: 0]
  ------------------
  715|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (715:5): [True: 0, False: 6]
  ------------------
  716|      0|      std::allocator<T> alloc;
  717|      0|      return std::allocator_traits<std::allocator<T>>::allocate(alloc, 1);
  718|      0|    }
  719|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (719:5): [True: 0, False: 6]
  ------------------
  720|      0|      T* p = static_cast<T*>(v2);
  721|      0|      p->~T();
  722|      0|      std::allocator<T> alloc;
  723|      0|      std::allocator_traits<std::allocator<T>>::deallocate(alloc, p, 1);
  724|      0|      return nullptr;
  725|      0|    }
  726|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (726:5): [True: 0, False: 6]
  ------------------
  727|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  728|      0|      return nullptr;
  729|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (729:5): [True: 0, False: 6]
  ------------------
  730|      0|      new (v2) T(*static_cast<const T*>(v1));
  731|      0|      return nullptr;
  732|      2|    case FlagOp::kSizeof:
  ------------------
  |  Branch (732:5): [True: 2, False: 4]
  ------------------
  733|      2|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  734|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (734:5): [True: 0, False: 6]
  ------------------
  735|      0|      return const_cast<void*>(base_internal::FastTypeId<T>());
  736|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (736:5): [True: 0, False: 6]
  ------------------
  737|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  738|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (738:5): [True: 0, False: 6]
  ------------------
  739|       |      // Initialize the temporary instance of type T based on current value in
  740|       |      // destination (which is going to be flag's default value).
  741|      0|      T temp(*static_cast<T*>(v2));
  742|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (742:11): [True: 0, False: 0]
  ------------------
  743|      0|                              static_cast<std::string*>(v3))) {
  744|      0|        return nullptr;
  745|      0|      }
  746|      0|      *static_cast<T*>(v2) = std::move(temp);
  747|      0|      return v2;
  748|      0|    }
  749|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (749:5): [True: 0, False: 6]
  ------------------
  750|      0|      *static_cast<std::string*>(v2) =
  751|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  752|      0|      return nullptr;
  753|      4|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (753:5): [True: 4, False: 2]
  ------------------
  754|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  755|       |      // offset of the data.
  756|      4|      size_t round_to = alignof(FlagValue<T>);
  757|      4|      size_t offset =
  758|      4|          (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  759|      4|      return reinterpret_cast<void*>(offset);
  760|      0|    }
  761|      6|  }
  762|      0|  return nullptr;
  763|      6|}
_ZN4absl12lts_2024011614flags_internal13FlagRegistrarIN8fuzztest8internal14TimeBudgetTypeELb1EEC2ERNS1_4FlagIS5_EEPKc:
  773|      2|  explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) {
  774|      2|    if (do_register)
  ------------------
  |  Branch (774:9): [True: 2, Folded]
  ------------------
  775|      2|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  776|      2|  }
_ZNK4absl12lts_2024011614flags_internal13FlagRegistrarIN8fuzztest8internal14TimeBudgetTypeELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  786|      2|  operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2024011614flags_internal7FlagOpsImEEPvNS1_6FlagOpEPKvS3_S3_:
  713|     26|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  714|     26|  switch (op) {
  ------------------
  |  Branch (714:11): [True: 26, False: 0]
  ------------------
  715|      2|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (715:5): [True: 2, False: 24]
  ------------------
  716|      2|      std::allocator<T> alloc;
  717|      2|      return std::allocator_traits<std::allocator<T>>::allocate(alloc, 1);
  718|      0|    }
  719|      2|    case FlagOp::kDelete: {
  ------------------
  |  Branch (719:5): [True: 2, False: 24]
  ------------------
  720|      2|      T* p = static_cast<T*>(v2);
  721|      2|      p->~T();
  722|      2|      std::allocator<T> alloc;
  723|      2|      std::allocator_traits<std::allocator<T>>::deallocate(alloc, p, 1);
  724|      2|      return nullptr;
  725|      0|    }
  726|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (726:5): [True: 0, False: 26]
  ------------------
  727|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  728|      0|      return nullptr;
  729|      2|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (729:5): [True: 2, False: 24]
  ------------------
  730|      2|      new (v2) T(*static_cast<const T*>(v1));
  731|      2|      return nullptr;
  732|      6|    case FlagOp::kSizeof:
  ------------------
  |  Branch (732:5): [True: 6, False: 20]
  ------------------
  733|      6|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  734|      2|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (734:5): [True: 2, False: 24]
  ------------------
  735|      2|      return const_cast<void*>(base_internal::FastTypeId<T>());
  736|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (736:5): [True: 0, False: 26]
  ------------------
  737|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  738|      2|    case FlagOp::kParse: {
  ------------------
  |  Branch (738:5): [True: 2, False: 24]
  ------------------
  739|       |      // Initialize the temporary instance of type T based on current value in
  740|       |      // destination (which is going to be flag's default value).
  741|      2|      T temp(*static_cast<T*>(v2));
  742|      2|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (742:11): [True: 0, False: 2]
  ------------------
  743|      2|                              static_cast<std::string*>(v3))) {
  744|      0|        return nullptr;
  745|      0|      }
  746|      2|      *static_cast<T*>(v2) = std::move(temp);
  747|      2|      return v2;
  748|      2|    }
  749|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (749:5): [True: 0, False: 26]
  ------------------
  750|      0|      *static_cast<std::string*>(v2) =
  751|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  752|      0|      return nullptr;
  753|     10|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (753:5): [True: 10, False: 16]
  ------------------
  754|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  755|       |      // offset of the data.
  756|     10|      size_t round_to = alignof(FlagValue<T>);
  757|     10|      size_t offset =
  758|     10|          (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  759|     10|      return reinterpret_cast<void*>(offset);
  760|      2|    }
  761|     26|  }
  762|      0|  return nullptr;
  763|     26|}
_ZN4absl12lts_2024011614flags_internal13FlagRegistrarImLb1EEC2ERNS1_4FlagImEEPKc:
  773|      4|  explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) {
  774|      4|    if (do_register)
  ------------------
  |  Branch (774:9): [True: 4, Folded]
  ------------------
  775|      4|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  776|      4|  }
_ZNK4absl12lts_2024011614flags_internal13FlagRegistrarImLb1EEcvNS1_18FlagRegistrarEmptyEEv:
  786|      4|  operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2024011614flags_internal7FlagOpsINSt3__18optionalImEEEEPvNS1_6FlagOpEPKvS6_S6_:
  713|      6|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  714|      6|  switch (op) {
  ------------------
  |  Branch (714:11): [True: 6, False: 0]
  ------------------
  715|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (715:5): [True: 0, False: 6]
  ------------------
  716|      0|      std::allocator<T> alloc;
  717|      0|      return std::allocator_traits<std::allocator<T>>::allocate(alloc, 1);
  718|      0|    }
  719|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (719:5): [True: 0, False: 6]
  ------------------
  720|      0|      T* p = static_cast<T*>(v2);
  721|      0|      p->~T();
  722|      0|      std::allocator<T> alloc;
  723|      0|      std::allocator_traits<std::allocator<T>>::deallocate(alloc, p, 1);
  724|      0|      return nullptr;
  725|      0|    }
  726|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (726:5): [True: 0, False: 6]
  ------------------
  727|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  728|      0|      return nullptr;
  729|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (729:5): [True: 0, False: 6]
  ------------------
  730|      0|      new (v2) T(*static_cast<const T*>(v1));
  731|      0|      return nullptr;
  732|      2|    case FlagOp::kSizeof:
  ------------------
  |  Branch (732:5): [True: 2, False: 4]
  ------------------
  733|      2|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  734|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (734:5): [True: 0, False: 6]
  ------------------
  735|      0|      return const_cast<void*>(base_internal::FastTypeId<T>());
  736|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (736:5): [True: 0, False: 6]
  ------------------
  737|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  738|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (738:5): [True: 0, False: 6]
  ------------------
  739|       |      // Initialize the temporary instance of type T based on current value in
  740|       |      // destination (which is going to be flag's default value).
  741|      0|      T temp(*static_cast<T*>(v2));
  742|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (742:11): [True: 0, False: 0]
  ------------------
  743|      0|                              static_cast<std::string*>(v3))) {
  744|      0|        return nullptr;
  745|      0|      }
  746|      0|      *static_cast<T*>(v2) = std::move(temp);
  747|      0|      return v2;
  748|      0|    }
  749|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (749:5): [True: 0, False: 6]
  ------------------
  750|      0|      *static_cast<std::string*>(v2) =
  751|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  752|      0|      return nullptr;
  753|      4|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (753:5): [True: 4, False: 2]
  ------------------
  754|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  755|       |      // offset of the data.
  756|      4|      size_t round_to = alignof(FlagValue<T>);
  757|      4|      size_t offset =
  758|      4|          (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  759|      4|      return reinterpret_cast<void*>(offset);
  760|      0|    }
  761|      6|  }
  762|      0|  return nullptr;
  763|      6|}
_ZN4absl12lts_2024011614flags_internal13FlagRegistrarINSt3__18optionalImEELb1EEC2ERNS1_4FlagIS5_EEPKc:
  773|      2|  explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) {
  774|      2|    if (do_register)
  ------------------
  |  Branch (774:9): [True: 2, Folded]
  ------------------
  775|      2|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  776|      2|  }
_ZNK4absl12lts_2024011614flags_internal13FlagRegistrarINSt3__18optionalImEELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  786|      2|  operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2024011614flags_internal12FlagImplPeer9InvokeGetINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS1_4FlagISA_EEEET_RKT0_:
  697|     14|  static T InvokeGet(const FlagType& flag) {
  698|     14|    return flag.Get();
  699|     14|  }
_ZNK4absl12lts_2024011614flags_internal4FlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEE3GetEv:
  657|     14|  T Get() const {
  658|       |    // See implementation notes in CommandLineFlag::Get().
  659|     14|    union U {
  660|     14|      T value;
  661|     14|      U() {}
  662|     14|      ~U() { value.~T(); }
  663|     14|    };
  664|     14|    U u;
  665|       |
  666|       |#if !defined(NDEBUG)
  667|       |    impl_.AssertValidType(base_internal::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  668|       |#endif
  669|       |
  670|     14|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  178|     14|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 14, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 14]
  |  |  |  Branch (178:58): [True: 14, False: 0]
  |  |  ------------------
  ------------------
  671|     14|      impl_.Read(&u.value);
  672|     14|    }
  673|     14|    return std::move(u.value);
  674|     14|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEE3GetEvEN1UC2Ev:
  661|     14|      U() {}
_ZNK4absl12lts_2024011614flags_internal9FlagValueINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELNS1_20FlagValueStorageKindE3EE3GetERKNS1_12SequenceLockERS9_:
  397|     14|  bool Get(const SequenceLock&, T&) const { return false; }
_ZZNK4absl12lts_2024011614flags_internal4FlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEE3GetEvEN1UD2Ev:
  662|     14|      ~U() { value.~T(); }
_ZNK4absl12lts_2024011614flags_internal8FlagImpl16ValueStorageKindEv:
  537|     76|  FlagValueStorageKind ValueStorageKind() const {
  538|     76|    return static_cast<FlagValueStorageKind>(value_storage_kind_);
  539|     76|  }
_ZNK4absl12lts_2024011614flags_internal8FlagImpl11DefaultKindEv:
  541|      4|      ABSL_EXCLUSIVE_LOCKS_REQUIRED(*DataGuard()) {
  542|      4|    return static_cast<FlagDefaultKind>(def_kind_);
  543|      4|  }
_ZN4absl12lts_2024011614flags_internal5AllocEPFPvNS1_6FlagOpEPKvS2_S2_E:
   97|      4|inline void* Alloc(FlagOpFn op) {
   98|      4|  return op(FlagOp::kAlloc, nullptr, nullptr, nullptr);
   99|      4|}
_ZN4absl12lts_2024011614flags_internal6DeleteEPFPvNS1_6FlagOpEPKvS2_S2_ES2_:
  101|      4|inline void Delete(FlagOpFn op, void* obj) {
  102|      4|  op(FlagOp::kDelete, nullptr, obj, nullptr);
  103|      4|}
_ZN4absl12lts_2024011614flags_internal4CopyEPFPvNS1_6FlagOpEPKvS2_S2_ES5_S2_:
  105|      2|inline void Copy(FlagOpFn op, const void* src, void* dst) {
  106|      2|  op(FlagOp::kCopy, src, dst, nullptr);
  107|      2|}
_ZN4absl12lts_2024011614flags_internal13CopyConstructEPFPvNS1_6FlagOpEPKvS2_S2_ES5_S2_:
  110|     26|inline void CopyConstruct(FlagOpFn op, const void* src, void* dst) {
  111|     26|  op(FlagOp::kCopyConstruct, src, dst, nullptr);
  112|     26|}
_ZN4absl12lts_2024011614flags_internal5CloneEPFPvNS1_6FlagOpEPKvS2_S2_ES5_:
  114|      2|inline void* Clone(FlagOpFn op, const void* obj) {
  115|      2|  void* res = flags_internal::Alloc(op);
  116|      2|  flags_internal::CopyConstruct(op, obj, res);
  117|      2|  return res;
  118|      2|}
_ZN4absl12lts_2024011614flags_internal5ParseEPFPvNS1_6FlagOpEPKvS2_S2_ENSt3__117basic_string_viewIcNS8_11char_traitsIcEEEES2_PNS8_12basic_stringIcSB_NS8_9allocatorIcEEEE:
  121|      4|                  std::string* error) {
  122|      4|  return op(FlagOp::kParse, &text, dst, error) != nullptr;
  123|      4|}
_ZN4absl12lts_2024011614flags_internal6SizeofEPFPvNS1_6FlagOpEPKvS2_S2_E:
  131|     24|inline size_t Sizeof(FlagOpFn op) {
  132|       |  // This sequence of casts reverses the sequence from
  133|       |  // `flags_internal::FlagOps()`
  134|     24|  return static_cast<size_t>(reinterpret_cast<intptr_t>(
  135|     24|      op(FlagOp::kSizeof, nullptr, nullptr, nullptr)));
  136|     24|}
_ZN4absl12lts_2024011614flags_internal10FastTypeIdEPFPvNS1_6FlagOpEPKvS2_S2_E:
  138|      4|inline FlagFastTypeId FastTypeId(FlagOpFn op) {
  139|      4|  return reinterpret_cast<FlagFastTypeId>(
  140|      4|      op(FlagOp::kFastTypeId, nullptr, nullptr, nullptr));
  141|      4|}
_ZN4absl12lts_2024011614flags_internal11ValueOffsetEPFPvNS1_6FlagOpEPKvS2_S2_E:
  151|     74|inline ptrdiff_t ValueOffset(FlagOpFn op) {
  152|       |  // This sequence of casts reverses the sequence from
  153|       |  // `flags_internal::FlagOps()`
  154|     74|  return static_cast<ptrdiff_t>(reinterpret_cast<intptr_t>(
  155|     74|      op(FlagOp::kValueOffset, nullptr, nullptr, nullptr)));
  156|     74|}
_ZN4absl12lts_2024011614flags_internal16InitDefaultValueINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEEET_NS1_11EmptyBracesE:
  282|      6|constexpr T InitDefaultValue(EmptyBraces) {
  283|      6|  return T{};
  284|      6|}
_ZN4absl12lts_2024011614flags_internal7FlagOpsINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEEEPvNS1_6FlagOpEPKvSD_SD_:
  713|     26|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  714|     26|  switch (op) {
  ------------------
  |  Branch (714:11): [True: 26, False: 0]
  ------------------
  715|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (715:5): [True: 0, False: 26]
  ------------------
  716|      0|      std::allocator<T> alloc;
  717|      0|      return std::allocator_traits<std::allocator<T>>::allocate(alloc, 1);
  718|      0|    }
  719|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (719:5): [True: 0, False: 26]
  ------------------
  720|      0|      T* p = static_cast<T*>(v2);
  721|      0|      p->~T();
  722|      0|      std::allocator<T> alloc;
  723|      0|      std::allocator_traits<std::allocator<T>>::deallocate(alloc, p, 1);
  724|      0|      return nullptr;
  725|      0|    }
  726|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (726:5): [True: 0, False: 26]
  ------------------
  727|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  728|      0|      return nullptr;
  729|     10|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (729:5): [True: 10, False: 16]
  ------------------
  730|     10|      new (v2) T(*static_cast<const T*>(v1));
  731|     10|      return nullptr;
  732|      0|    case FlagOp::kSizeof:
  ------------------
  |  Branch (732:5): [True: 0, False: 26]
  ------------------
  733|      0|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  734|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (734:5): [True: 0, False: 26]
  ------------------
  735|      0|      return const_cast<void*>(base_internal::FastTypeId<T>());
  736|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (736:5): [True: 0, False: 26]
  ------------------
  737|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  738|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (738:5): [True: 0, False: 26]
  ------------------
  739|       |      // Initialize the temporary instance of type T based on current value in
  740|       |      // destination (which is going to be flag's default value).
  741|      0|      T temp(*static_cast<T*>(v2));
  742|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (742:11): [True: 0, False: 0]
  ------------------
  743|      0|                              static_cast<std::string*>(v3))) {
  744|      0|        return nullptr;
  745|      0|      }
  746|      0|      *static_cast<T*>(v2) = std::move(temp);
  747|      0|      return v2;
  748|      0|    }
  749|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (749:5): [True: 0, False: 26]
  ------------------
  750|      0|      *static_cast<std::string*>(v2) =
  751|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  752|      0|      return nullptr;
  753|     16|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (753:5): [True: 16, False: 10]
  ------------------
  754|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  755|       |      // offset of the data.
  756|     16|      size_t round_to = alignof(FlagValue<T>);
  757|     16|      size_t offset =
  758|     16|          (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  759|     16|      return reinterpret_cast<void*>(offset);
  760|      0|    }
  761|     26|  }
  762|      0|  return nullptr;
  763|     26|}
_ZN4absl12lts_2024011614flags_internal13FlagRegistrarINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELb1EEC2ERNS1_4FlagISC_EEPKc:
  773|      8|  explicit FlagRegistrar(Flag<T>& flag, const char* filename) : flag_(flag) {
  774|      8|    if (do_register)
  ------------------
  |  Branch (774:9): [True: 8, Folded]
  ------------------
  775|      8|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  776|      8|  }
_ZNO4absl12lts_2024011614flags_internal13FlagRegistrarINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELb1EE8OnUpdateEPFvvE:
  778|      6|  FlagRegistrar OnUpdate(FlagCallbackFunc cb) && {
  779|      6|    flag_.impl_.SetCallback(cb);
  780|      6|    return *this;
  781|      6|  }
_ZN4absl12lts_2024011614flags_internal12FlagImplPeer9InvokeGetINSt3__16vectorINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS9_ISB_EEEENS1_4FlagISD_EEEET_RKT0_:
  697|     10|  static T InvokeGet(const FlagType& flag) {
  698|     10|    return flag.Get();
  699|     10|  }
_ZNK4absl12lts_2024011614flags_internal4FlagINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEE3GetEv:
  657|     10|  T Get() const {
  658|       |    // See implementation notes in CommandLineFlag::Get().
  659|     10|    union U {
  660|     10|      T value;
  661|     10|      U() {}
  662|     10|      ~U() { value.~T(); }
  663|     10|    };
  664|     10|    U u;
  665|       |
  666|       |#if !defined(NDEBUG)
  667|       |    impl_.AssertValidType(base_internal::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  668|       |#endif
  669|       |
  670|     10|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  178|     10|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 10, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 10]
  |  |  |  Branch (178:58): [True: 10, False: 0]
  |  |  ------------------
  ------------------
  671|     10|      impl_.Read(&u.value);
  672|     10|    }
  673|     10|    return std::move(u.value);
  674|     10|  }
_ZZNK4absl12lts_2024011614flags_internal4FlagINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEE3GetEvEN1UC2Ev:
  661|     10|      U() {}
_ZNK4absl12lts_2024011614flags_internal9FlagValueINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELNS1_20FlagValueStorageKindE3EE3GetERKNS1_12SequenceLockERSC_:
  397|     10|  bool Get(const SequenceLock&, T&) const { return false; }
_ZZNK4absl12lts_2024011614flags_internal4FlagINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEE3GetEvEN1UD2Ev:
  662|     10|      ~U() { value.~T(); }
_ZNK4absl12lts_2024011614flags_internal13FlagRegistrarINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  786|      8|  operator FlagRegistrarEmpty() const { return {}; }  // NOLINT

_ZN4absl12lts_2024011614flags_internal21PrivateHandleAccessor9ParseFromERNS0_15CommandLineFlagENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS1_15FlagSettingModeENS1_11ValueSourceERNS5_12basic_stringIcS8_NS5_9allocatorIcEEEE:
   58|      4|                                      std::string& error) {
   59|      4|  return flag.ParseFrom(value, set_mode, source, error);
   60|      4|}

_ZN4absl12lts_2024011614flags_internal21ProgramInvocationNameEv:
   36|      2|std::string ProgramInvocationName() {
   37|      2|  absl::MutexLock l(&program_name_guard);
   38|       |
   39|      2|  return program_name ? *program_name : "UNKNOWN";
  ------------------
  |  Branch (39:10): [True: 0, False: 2]
  ------------------
   40|      2|}
_ZN4absl12lts_2024011614flags_internal24SetProgramInvocationNameENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   49|      2|void SetProgramInvocationName(absl::string_view prog_name_str) {
   50|      2|  absl::MutexLock l(&program_name_guard);
   51|       |
   52|      2|  if (!program_name)
  ------------------
  |  Branch (52:7): [True: 2, False: 0]
  ------------------
   53|      2|    program_name = new std::string(prog_name_str);
   54|      0|  else
   55|      0|    program_name->assign(prog_name_str.data(), prog_name_str.size());
   56|      2|}

_ZNK4absl12lts_2024011614flags_internal12SequenceLock7TryReadEPvPKNSt3__16atomicImEEm:
   80|     20|  bool TryRead(void* dst, const std::atomic<uint64_t>* src, size_t size) const {
   81|       |    // Acquire barrier ensures that no loads done by f() are reordered
   82|       |    // above the first load of the sequence counter.
   83|     20|    int64_t seq_before = lock_.load(std::memory_order_acquire);
   84|     20|    if (ABSL_PREDICT_FALSE(seq_before & 1) == 1) return false;
  ------------------
  |  |  178|     20|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:49): [Folded, False: 20]
  |  |  |  Branch (178:58): [True: 8, False: 12]
  |  |  ------------------
  ------------------
  |  Branch (84:9): [True: 8, False: 12]
  ------------------
   85|     12|    RelaxedCopyFromAtomic(dst, src, size);
   86|       |    // Another acquire fence ensures that the load of 'lock_' below is
   87|       |    // strictly ordered after the RelaxedCopyToAtomic call above.
   88|     12|    std::atomic_thread_fence(std::memory_order_acquire);
   89|     12|    int64_t seq_after = lock_.load(std::memory_order_relaxed);
   90|     12|    return ABSL_PREDICT_TRUE(seq_before == seq_after);
  ------------------
  |  |  179|     12|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (179:48): [Folded, False: 12]
  |  |  |  Branch (179:57): [True: 12, False: 0]
  |  |  ------------------
  ------------------
   91|     20|  }
_ZN4absl12lts_2024011614flags_internal12SequenceLock21RelaxedCopyFromAtomicEPvPKNSt3__16atomicImEEm:
  144|     12|                                    size_t size) {
  145|     12|    char* dst_byte = static_cast<char*>(dst);
  146|     26|    while (size >= sizeof(uint64_t)) {
  ------------------
  |  Branch (146:12): [True: 14, False: 12]
  ------------------
  147|     14|      uint64_t word = src->load(std::memory_order_relaxed);
  148|     14|      std::memcpy(dst_byte, &word, sizeof(word));
  149|     14|      dst_byte += sizeof(word);
  150|     14|      src++;
  151|     14|      size -= sizeof(word);
  152|     14|    }
  153|     12|    if (size > 0) {
  ------------------
  |  Branch (153:9): [True: 10, False: 2]
  ------------------
  154|     10|      uint64_t word = src->load(std::memory_order_relaxed);
  155|     10|      std::memcpy(dst_byte, &word, size);
  156|     10|    }
  157|     12|  }
_ZN4absl12lts_2024011614flags_internal12SequenceLock15MarkInitializedEv:
   63|     30|  void MarkInitialized() {
   64|       |    assert(lock_.load(std::memory_order_relaxed) == kUninitialized);
   65|     30|    lock_.store(0, std::memory_order_release);
   66|     30|  }
_ZN4absl12lts_2024011614flags_internal12SequenceLock26IncrementModificationCountEv:
  134|      4|  void IncrementModificationCount() {
  135|      4|    int64_t val = lock_.load(std::memory_order_relaxed);
  136|       |    assert(val != kUninitialized);
  137|      4|    lock_.store(val + 2, std::memory_order_relaxed);
  138|      4|  }

_ZN4absl12lts_2024011614flags_internal16HandleUsageFlagsERNSt3__113basic_ostreamIcNS2_11char_traitsIcEEEENS2_17basic_string_viewIcS5_EE:
  373|      2|                          absl::string_view program_usage_message) {
  374|      2|  switch (GetFlagsHelpMode()) {
  ------------------
  |  Branch (374:11): [True: 2, False: 0]
  ------------------
  375|      2|    case HelpMode::kNone:
  ------------------
  |  Branch (375:5): [True: 2, False: 0]
  ------------------
  376|      2|      break;
  377|      0|    case HelpMode::kImportant:
  ------------------
  |  Branch (377:5): [True: 0, False: 2]
  ------------------
  378|      0|      flags_internal::FlagsHelpImpl(
  379|      0|          out, flags_internal::GetUsageConfig().contains_help_flags,
  380|      0|          GetFlagsHelpFormat(), program_usage_message);
  381|      0|      break;
  382|       |
  383|      0|    case HelpMode::kShort:
  ------------------
  |  Branch (383:5): [True: 0, False: 2]
  ------------------
  384|      0|      flags_internal::FlagsHelpImpl(
  385|      0|          out, flags_internal::GetUsageConfig().contains_helpshort_flags,
  386|      0|          GetFlagsHelpFormat(), program_usage_message);
  387|      0|      break;
  388|       |
  389|      0|    case HelpMode::kFull:
  ------------------
  |  Branch (389:5): [True: 0, False: 2]
  ------------------
  390|      0|      flags_internal::FlagsHelp(out, "", GetFlagsHelpFormat(),
  391|      0|                                program_usage_message);
  392|      0|      break;
  393|       |
  394|      0|    case HelpMode::kPackage:
  ------------------
  |  Branch (394:5): [True: 0, False: 2]
  ------------------
  395|      0|      flags_internal::FlagsHelpImpl(
  396|      0|          out, flags_internal::GetUsageConfig().contains_helppackage_flags,
  397|      0|          GetFlagsHelpFormat(), program_usage_message);
  398|      0|      break;
  399|       |
  400|      0|    case HelpMode::kMatch: {
  ------------------
  |  Branch (400:5): [True: 0, False: 2]
  ------------------
  401|      0|      std::string substr = GetFlagsHelpMatchSubstr();
  402|      0|      if (substr.empty()) {
  ------------------
  |  Branch (402:11): [True: 0, False: 0]
  ------------------
  403|       |        // show all options
  404|      0|        flags_internal::FlagsHelp(out, substr, GetFlagsHelpFormat(),
  405|      0|                                  program_usage_message);
  406|      0|      } else {
  407|      0|        auto filter_cb = [&substr](const absl::CommandLineFlag& flag) {
  408|      0|          if (absl::StrContains(flag.Name(), substr)) return true;
  409|      0|          if (absl::StrContains(flag.Filename(), substr)) return true;
  410|      0|          if (absl::StrContains(flag.Help(), substr)) return true;
  411|       |
  412|      0|          return false;
  413|      0|        };
  414|      0|        flags_internal::FlagsHelpImpl(
  415|      0|            out, filter_cb, HelpFormat::kHumanReadable, program_usage_message);
  416|      0|      }
  417|      0|      break;
  418|      0|    }
  419|      0|    case HelpMode::kVersion:
  ------------------
  |  Branch (419:5): [True: 0, False: 2]
  ------------------
  420|      0|      if (flags_internal::GetUsageConfig().version_string)
  ------------------
  |  Branch (420:11): [True: 0, False: 0]
  ------------------
  421|      0|        out << flags_internal::GetUsageConfig().version_string();
  422|       |      // Unlike help, we may be asking for version in a script, so return 0
  423|      0|      break;
  424|       |
  425|      0|    case HelpMode::kOnlyCheckArgs:
  ------------------
  |  Branch (425:5): [True: 0, False: 2]
  ------------------
  426|      0|      break;
  427|      2|  }
  428|       |
  429|      2|  return GetFlagsHelpMode();
  430|      2|}
_ZN4absl12lts_2024011614flags_internal16GetFlagsHelpModeEv:
  459|      4|HelpMode GetFlagsHelpMode() {
  460|      4|  absl::MutexLock l(&help_attributes_guard);
  461|      4|  return help_mode;
  462|      4|}
_ZN4absl12lts_2024011614flags_internal9MaybeExitENS1_8HelpModeE:
  539|      2|void MaybeExit(HelpMode mode) {
  540|      2|  switch (mode) {
  541|      2|    case flags_internal::HelpMode::kNone:
  ------------------
  |  Branch (541:5): [True: 2, False: 0]
  ------------------
  542|      2|      return;
  543|      0|    case flags_internal::HelpMode::kOnlyCheckArgs:
  ------------------
  |  Branch (543:5): [True: 0, False: 2]
  ------------------
  544|      0|    case flags_internal::HelpMode::kVersion:
  ------------------
  |  Branch (544:5): [True: 0, False: 2]
  ------------------
  545|      0|      std::exit(0);
  546|      0|    default:  // For all the other modes we exit with 1
  ------------------
  |  Branch (546:5): [True: 0, False: 2]
  ------------------
  547|      0|      std::exit(1);
  548|      2|  }
  549|      2|}

_ZN4absl12lts_2024011614flags_internal13AbslParseFlagENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPmPNS2_12basic_stringIcS5_NS2_9allocatorIcEEEE:
  119|      2|bool AbslParseFlag(absl::string_view text, unsigned long* dst, std::string*) {
  120|      2|  return ParseFlagImpl(text, *dst);
  121|      2|}
_ZN4absl12lts_2024011614flags_internal13AbslParseFlagENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPNS2_12basic_stringIcS5_NS2_9allocatorIcEEEESB_:
  172|      2|bool AbslParseFlag(absl::string_view text, std::string* dst, std::string*) {
  173|      2|  dst->assign(text.data(), text.size());
  174|      2|  return true;
  175|      2|}
marshalling.cc:_ZN4absl12lts_2024011614flags_internalL11NumericBaseENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   72|      2|static int NumericBase(absl::string_view text) {
   73|      2|  if (text.empty()) return 0;
  ------------------
  |  Branch (73:7): [True: 0, False: 2]
  ------------------
   74|      2|  size_t num_start = (text[0] == '-' || text[0] == '+') ? 1 : 0;
  ------------------
  |  Branch (74:23): [True: 0, False: 2]
  |  Branch (74:41): [True: 0, False: 2]
  ------------------
   75|      2|  const bool hex = (text.size() >= num_start + 2 && text[num_start] == '0' &&
  ------------------
  |  Branch (75:21): [True: 2, False: 0]
  |  Branch (75:53): [True: 0, False: 2]
  ------------------
   76|      0|                    (text[num_start + 1] == 'x' || text[num_start + 1] == 'X'));
  ------------------
  |  Branch (76:22): [True: 0, False: 0]
  |  Branch (76:52): [True: 0, False: 0]
  ------------------
   77|      2|  return hex ? 16 : 10;
  ------------------
  |  Branch (77:10): [True: 0, False: 2]
  ------------------
   78|      2|}
_ZN4absl12lts_2024011614flags_internal13ParseFlagImplImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERT_:
   81|      2|inline bool ParseFlagImpl(absl::string_view text, IntType& dst) {
   82|      2|  text = absl::StripAsciiWhitespace(text);
   83|       |
   84|      2|  return absl::numbers_internal::safe_strtoi_base(text, &dst,
   85|      2|                                                  NumericBase(text));
   86|      2|}

_ZN4absl12lts_202401169ParseFlagINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEbNS2_17basic_string_viewIcS5_EEPT_PS8_:
  333|      2|inline bool ParseFlag(absl::string_view input, T* dst, std::string* error) {
  334|      2|  return flags_internal::InvokeParseFlag(input, dst, error);
  335|      2|}
_ZN4absl12lts_2024011614flags_internal15InvokeParseFlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEbNS3_17basic_string_viewIcS6_EEPT_PS9_:
  275|      2|bool InvokeParseFlag(absl::string_view input, T* dst, std::string* err) {
  276|       |  // Comment on next line provides a good compiler error message if T
  277|       |  // does not have AbslParseFlag(absl::string_view, T*, std::string*).
  278|      2|  return AbslParseFlag(input, dst, err);  // Is T missing AbslParseFlag?
  279|      2|}
_ZN4absl12lts_202401169ParseFlagImEEbNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPT_PNS2_12basic_stringIcS5_NS2_9allocatorIcEEEE:
  333|      2|inline bool ParseFlag(absl::string_view input, T* dst, std::string* error) {
  334|      2|  return flags_internal::InvokeParseFlag(input, dst, error);
  335|      2|}
_ZN4absl12lts_2024011614flags_internal15InvokeParseFlagImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPT_PNS3_12basic_stringIcS6_NS3_9allocatorIcEEEE:
  275|      2|bool InvokeParseFlag(absl::string_view input, T* dst, std::string* err) {
  276|       |  // Comment on next line provides a good compiler error message if T
  277|       |  // does not have AbslParseFlag(absl::string_view, T*, std::string*).
  278|      2|  return AbslParseFlag(input, dst, err);  // Is T missing AbslParseFlag?
  279|      2|}

_ZN4absl12lts_2024011614flags_internal24ParseAbseilFlagsOnlyImplEiPPcRNSt3__16vectorIS2_NS4_9allocatorIS2_EEEERNS5_INS0_16UnrecognizedFlagENS6_ISA_EEEENS1_16UsageFlagsActionE:
  744|      2|    UsageFlagsAction usage_flag_action) {
  745|      2|  ABSL_INTERNAL_CHECK(argc > 0, "Missing argv[0]");
  ------------------
  |  |   85|      2|  do {                                                             \
  |  |   86|      2|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:31): [True: 0, False: 2]
  |  |  |  |  |  Branch (178:49): [Folded, False: 2]
  |  |  |  |  |  Branch (178:58): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   87|      0|      std::string death_message = "Check " #condition " failed: "; \
  |  |   88|      0|      death_message += std::string(message);                       \
  |  |   89|      0|      ABSL_INTERNAL_LOG(FATAL, death_message);                     \
  |  |  ------------------
  |  |  |  |   76|      0|  do {                                                                    \
  |  |  |  |   77|      0|    constexpr const char* absl_raw_log_internal_filename = __FILE__;      \
  |  |  |  |   78|      0|    ::absl::raw_log_internal::internal_log_function(                      \
  |  |  |  |   79|      0|        ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  |  |  ------------------
  |  |  |  |   80|      0|        __LINE__, message);                                               \
  |  |  |  |   81|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   82|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      0|    }                                                              \
  |  |   91|      2|  } while (0)
  |  |  ------------------
  |  |  |  Branch (91:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  746|       |
  747|      2|  using flags_internal::ArgsList;
  748|      2|  using flags_internal::specified_flags;
  749|       |
  750|      2|  std::vector<std::string> flagfile_value;
  751|      2|  std::vector<ArgsList> input_args;
  752|       |
  753|       |  // Once parsing has started we will not allow more flag registrations.
  754|      2|  flags_internal::FinalizeRegistry();
  755|       |
  756|       |  // This routine does not return anything since we abort on failure.
  757|      2|  flags_internal::CheckDefaultValuesParsingRoundtrip();
  758|       |
  759|      2|  input_args.push_back(ArgsList(argc, argv));
  760|       |
  761|       |  // Set program invocation name if it is not set before.
  762|      2|  if (flags_internal::ProgramInvocationName() == "UNKNOWN") {
  ------------------
  |  Branch (762:7): [True: 2, False: 0]
  ------------------
  763|      2|    flags_internal::SetProgramInvocationName(argv[0]);
  764|      2|  }
  765|      2|  positional_args.push_back(argv[0]);
  766|       |
  767|      2|  absl::MutexLock l(&flags_internal::specified_flags_guard);
  768|      2|  if (specified_flags == nullptr) {
  ------------------
  |  Branch (768:7): [True: 2, False: 0]
  ------------------
  769|      2|    specified_flags = new std::vector<const CommandLineFlag*>;
  770|      2|  } else {
  771|      0|    specified_flags->clear();
  772|      0|  }
  773|       |
  774|       |  // Iterate through the list of the input arguments. First level are
  775|       |  // arguments originated from argc/argv. Following levels are arguments
  776|       |  // originated from recursive parsing of flagfile(s).
  777|      2|  bool success = true;
  778|      6|  while (!input_args.empty()) {
  ------------------
  |  Branch (778:10): [True: 6, False: 0]
  ------------------
  779|       |    // First we process the built-in generator flags.
  780|      6|    success &= flags_internal::HandleGeneratorFlags(input_args, flagfile_value);
  781|       |
  782|       |    // Select top-most (most recent) arguments list. If it is empty drop it
  783|       |    // and re-try.
  784|      6|    ArgsList& curr_list = input_args.back();
  785|       |
  786|       |    // Every ArgsList starts with real or fake program name, so we can always
  787|       |    // start by skipping it.
  788|      6|    curr_list.PopFront();
  789|       |
  790|      6|    if (curr_list.Size() == 0) {
  ------------------
  |  Branch (790:9): [True: 0, False: 6]
  ------------------
  791|      0|      input_args.pop_back();
  792|      0|      continue;
  793|      0|    }
  794|       |
  795|       |    // Handle the next argument in the current list. If the stack of argument
  796|       |    // lists contains only one element - we are processing an argument from
  797|       |    // the original argv.
  798|      6|    absl::string_view arg(curr_list.Front());
  799|      6|    bool arg_from_argv = input_args.size() == 1;
  800|       |
  801|       |    // If argument does not start with '-' or is just "-" - this is
  802|       |    // positional argument.
  803|      6|    if (!absl::ConsumePrefix(&arg, "-") || arg.empty()) {
  ------------------
  |  Branch (803:9): [True: 0, False: 6]
  |  Branch (803:44): [True: 0, False: 6]
  ------------------
  804|      0|      ABSL_INTERNAL_CHECK(arg_from_argv,
  ------------------
  |  |   85|      0|  do {                                                             \
  |  |   86|      0|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   87|      0|      std::string death_message = "Check " #condition " failed: "; \
  |  |   88|      0|      death_message += std::string(message);                       \
  |  |   89|      0|      ABSL_INTERNAL_LOG(FATAL, death_message);                     \
  |  |  ------------------
  |  |  |  |   76|      0|  do {                                                                    \
  |  |  |  |   77|      0|    constexpr const char* absl_raw_log_internal_filename = __FILE__;      \
  |  |  |  |   78|      0|    ::absl::raw_log_internal::internal_log_function(                      \
  |  |  |  |   79|      0|        ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  |  |  ------------------
  |  |  |  |   80|      0|        __LINE__, message);                                               \
  |  |  |  |   81|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   82|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      0|    }                                                              \
  |  |   91|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (91:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  805|      0|                          "Flagfile cannot contain positional argument");
  806|       |
  807|      0|      positional_args.push_back(argv[curr_list.FrontIndex()]);
  808|      0|      continue;
  809|      0|    }
  810|       |
  811|       |    // Split the current argument on '=' to deduce the argument flag name and
  812|       |    // value. If flag name is empty it means we've got an "--" argument. Value
  813|       |    // can be empty either if there were no '=' in argument string at all or
  814|       |    // an argument looked like "--foo=". In a latter case is_empty_value is
  815|       |    // true.
  816|      6|    absl::string_view flag_name;
  817|      6|    absl::string_view value;
  818|      6|    bool is_empty_value = false;
  819|       |
  820|      6|    std::tie(flag_name, value, is_empty_value) =
  821|      6|        flags_internal::SplitNameAndValue(arg);
  822|       |
  823|       |    // Standalone "--" argument indicates that the rest of the arguments are
  824|       |    // positional. We do not support positional arguments in flagfiles.
  825|      6|    if (flag_name.empty()) {
  ------------------
  |  Branch (825:9): [True: 2, False: 4]
  ------------------
  826|      2|      ABSL_INTERNAL_CHECK(arg_from_argv,
  ------------------
  |  |   85|      2|  do {                                                             \
  |  |   86|      2|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:31): [True: 0, False: 2]
  |  |  |  |  |  Branch (178:49): [Folded, False: 2]
  |  |  |  |  |  Branch (178:58): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   87|      0|      std::string death_message = "Check " #condition " failed: "; \
  |  |   88|      0|      death_message += std::string(message);                       \
  |  |   89|      0|      ABSL_INTERNAL_LOG(FATAL, death_message);                     \
  |  |  ------------------
  |  |  |  |   76|      0|  do {                                                                    \
  |  |  |  |   77|      0|    constexpr const char* absl_raw_log_internal_filename = __FILE__;      \
  |  |  |  |   78|      0|    ::absl::raw_log_internal::internal_log_function(                      \
  |  |  |  |   79|      0|        ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  |  |  ------------------
  |  |  |  |   80|      0|        __LINE__, message);                                               \
  |  |  |  |   81|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                   \
  |  |  |  |  ------------------
  |  |  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   82|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      0|    }                                                              \
  |  |   91|      2|  } while (0)
  |  |  ------------------
  |  |  |  Branch (91:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  827|      2|                          "Flagfile cannot contain positional argument");
  828|       |
  829|      2|      curr_list.PopFront();
  830|      2|      break;
  831|      2|    }
  832|       |
  833|       |    // Locate the flag based on flag name. Handle both --foo and --nofoo.
  834|      4|    CommandLineFlag* flag = nullptr;
  835|      4|    bool is_negative = false;
  836|      4|    std::tie(flag, is_negative) = flags_internal::LocateFlag(flag_name);
  837|       |
  838|      4|    if (flag == nullptr) {
  ------------------
  |  Branch (838:9): [True: 0, False: 4]
  ------------------
  839|       |      // Usage flags are not modeled as Abseil flags. Locate them separately.
  840|      0|      if (flags_internal::DeduceUsageFlags(flag_name, value)) {
  ------------------
  |  Branch (840:11): [True: 0, False: 0]
  ------------------
  841|      0|        continue;
  842|      0|      }
  843|      0|      unrecognized_flags.emplace_back(arg_from_argv
  ------------------
  |  Branch (843:39): [True: 0, False: 0]
  ------------------
  844|      0|                                          ? UnrecognizedFlag::kFromArgv
  845|      0|                                          : UnrecognizedFlag::kFromFlagfile,
  846|      0|                                      flag_name);
  847|      0|      continue;
  848|      0|    }
  849|       |
  850|       |    // Deduce flag's value (from this or next argument).
  851|      4|    bool value_success = true;
  852|      4|    std::tie(value_success, value) = flags_internal::DeduceFlagValue(
  853|      4|        *flag, value, is_negative, is_empty_value, &curr_list);
  854|      4|    success &= value_success;
  855|       |
  856|       |    // Set the located flag to a new value, unless it is retired. Setting
  857|       |    // retired flag fails, but we ignoring it here while also reporting access
  858|       |    // to retired flag.
  859|      4|    std::string error;
  860|      4|    if (!flags_internal::PrivateHandleAccessor::ParseFrom(
  ------------------
  |  Branch (860:9): [True: 0, False: 4]
  ------------------
  861|      4|            *flag, value, flags_internal::SET_FLAGS_VALUE,
  862|      4|            flags_internal::kCommandLine, error)) {
  863|      0|      if (flag->IsRetired()) continue;
  ------------------
  |  Branch (863:11): [True: 0, False: 0]
  ------------------
  864|       |
  865|      0|      flags_internal::ReportUsageError(error, true);
  866|      0|      success = false;
  867|      4|    } else {
  868|      4|      specified_flags->push_back(flag);
  869|      4|    }
  870|      4|  }
  871|       |
  872|      2|  flags_internal::ResetGeneratorFlags(flagfile_value);
  873|       |
  874|       |  // All the remaining arguments are positional.
  875|      2|  if (!input_args.empty()) {
  ------------------
  |  Branch (875:7): [True: 2, False: 0]
  ------------------
  876|      2|    for (size_t arg_index = input_args.back().FrontIndex();
  877|     11|         arg_index < static_cast<size_t>(argc); ++arg_index) {
  ------------------
  |  Branch (877:10): [True: 9, False: 2]
  ------------------
  878|      9|      positional_args.push_back(argv[arg_index]);
  879|      9|    }
  880|      2|  }
  881|       |
  882|       |  // Trim and sort the vector.
  883|      2|  specified_flags->shrink_to_fit();
  884|      2|  std::sort(specified_flags->begin(), specified_flags->end(),
  885|      2|            flags_internal::SpecifiedFlagsCompare{});
  886|       |
  887|       |  // Filter out unrecognized flags, which are ok to ignore.
  888|      2|  std::vector<UnrecognizedFlag> filtered;
  889|      2|  filtered.reserve(unrecognized_flags.size());
  890|      2|  for (const auto& unrecognized : unrecognized_flags) {
  ------------------
  |  Branch (890:33): [True: 0, False: 2]
  ------------------
  891|      0|    if (flags_internal::CanIgnoreUndefinedFlag(unrecognized.flag_name))
  ------------------
  |  Branch (891:9): [True: 0, False: 0]
  ------------------
  892|      0|      continue;
  893|      0|    filtered.push_back(unrecognized);
  894|      0|  }
  895|       |
  896|      2|  std::swap(unrecognized_flags, filtered);
  897|       |
  898|      2|  if (!success) {
  ------------------
  |  Branch (898:7): [True: 0, False: 2]
  ------------------
  899|       |#if ABSL_FLAGS_STRIP_NAMES
  900|       |    flags_internal::ReportUsageError(
  901|       |        "NOTE: command line flags are disabled in this build", true);
  902|       |#else
  903|      0|    flags_internal::HandleUsageFlags(std::cerr, ProgramUsageMessage());
  904|      0|#endif
  905|      0|    return HelpMode::kFull;  // We just need to make sure the exit with
  906|       |                             // code 1.
  907|      0|  }
  908|       |
  909|      2|  return usage_flag_action == UsageFlagsAction::kHandleUsage
  ------------------
  |  Branch (909:10): [True: 2, False: 0]
  ------------------
  910|      2|             ? flags_internal::HandleUsageFlags(std::cout,
  911|      2|                                                ProgramUsageMessage())
  912|      2|             : HelpMode::kNone;
  913|      2|}
_ZN4absl12lts_2024011620ParseAbseilFlagsOnlyEiPPcRNSt3__16vectorIS1_NS3_9allocatorIS1_EEEERNS4_INS0_16UnrecognizedFlagENS5_IS9_EEEE:
  919|      2|                          std::vector<UnrecognizedFlag>& unrecognized_flags) {
  920|      2|  auto help_mode = flags_internal::ParseAbseilFlagsOnlyImpl(
  921|      2|      argc, argv, positional_args, unrecognized_flags,
  922|      2|      flags_internal::UsageFlagsAction::kHandleUsage);
  923|       |
  924|      2|  flags_internal::MaybeExit(help_mode);
  925|      2|}
parse.cc:_ZNK3$_0clEv:
  106|      2|    .OnUpdate([]() {
  107|      2|      if (absl::GetFlag(FLAGS_flagfile).empty()) return;
  ------------------
  |  Branch (107:11): [True: 2, False: 0]
  ------------------
  108|       |
  109|      0|      absl::MutexLock l(&absl::flags_internal::processing_checks_guard);
  110|       |
  111|       |      // Setting this flag twice before it is handled most likely an internal
  112|       |      // error and should be reviewed by developers.
  113|      0|      if (absl::flags_internal::flagfile_needs_processing) {
  ------------------
  |  Branch (113:11): [True: 0, False: 0]
  ------------------
  114|      0|        ABSL_INTERNAL_LOG(WARNING, "flagfile set twice before it is handled");
  ------------------
  |  |   76|      0|  do {                                                                    \
  |  |   77|      0|    constexpr const char* absl_raw_log_internal_filename = __FILE__;      \
  |  |   78|      0|    ::absl::raw_log_internal::internal_log_function(                      \
  |  |   79|      0|        ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
  |  |  ------------------
  |  |  |  |  108|      0|#define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning
  |  |  ------------------
  |  |   80|      0|        __LINE__, message);                                               \
  |  |   81|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                   \
  |  |   82|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  115|      0|      }
  116|       |
  117|      0|      absl::flags_internal::flagfile_needs_processing = true;
  118|      0|    });
parse.cc:_ZNK3$_1clEv:
  122|      2|    .OnUpdate([]() {
  123|      2|      if (absl::GetFlag(FLAGS_fromenv).empty()) return;
  ------------------
  |  Branch (123:11): [True: 2, False: 0]
  ------------------
  124|       |
  125|      0|      absl::MutexLock l(&absl::flags_internal::processing_checks_guard);
  126|       |
  127|       |      // Setting this flag twice before it is handled most likely an internal
  128|       |      // error and should be reviewed by developers.
  129|      0|      if (absl::flags_internal::fromenv_needs_processing) {
  ------------------
  |  Branch (129:11): [True: 0, False: 0]
  ------------------
  130|      0|        ABSL_INTERNAL_LOG(WARNING, "fromenv set twice before it is handled.");
  ------------------
  |  |   76|      0|  do {                                                                    \
  |  |   77|      0|    constexpr const char* absl_raw_log_internal_filename = __FILE__;      \
  |  |   78|      0|    ::absl::raw_log_internal::internal_log_function(                      \
  |  |   79|      0|        ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
  |  |  ------------------
  |  |  |  |  108|      0|#define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning
  |  |  ------------------
  |  |   80|      0|        __LINE__, message);                                               \
  |  |   81|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                   \
  |  |   82|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  131|      0|      }
  132|       |
  133|      0|      absl::flags_internal::fromenv_needs_processing = true;
  134|      0|    });
parse.cc:_ZNK3$_2clEv:
  138|      2|    .OnUpdate([]() {
  139|      2|      if (absl::GetFlag(FLAGS_tryfromenv).empty()) return;
  ------------------
  |  Branch (139:11): [True: 2, False: 0]
  ------------------
  140|       |
  141|      0|      absl::MutexLock l(&absl::flags_internal::processing_checks_guard);
  142|       |
  143|       |      // Setting this flag twice before it is handled most likely an internal
  144|       |      // error and should be reviewed by developers.
  145|      0|      if (absl::flags_internal::tryfromenv_needs_processing) {
  ------------------
  |  Branch (145:11): [True: 0, False: 0]
  ------------------
  146|      0|        ABSL_INTERNAL_LOG(WARNING,
  ------------------
  |  |   76|      0|  do {                                                                    \
  |  |   77|      0|    constexpr const char* absl_raw_log_internal_filename = __FILE__;      \
  |  |   78|      0|    ::absl::raw_log_internal::internal_log_function(                      \
  |  |   79|      0|        ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
  |  |  ------------------
  |  |  |  |  108|      0|#define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning
  |  |  ------------------
  |  |   80|      0|        __LINE__, message);                                               \
  |  |   81|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                   \
  |  |   82|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  147|      0|                          "tryfromenv set twice before it is handled.");
  148|      0|      }
  149|       |
  150|      0|      absl::flags_internal::tryfromenv_needs_processing = true;
  151|      0|    });
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_134CheckDefaultValuesParsingRoundtripEv:
  322|      2|void CheckDefaultValuesParsingRoundtrip() {
  323|       |#ifndef NDEBUG
  324|       |  flags_internal::ForEachFlag([&](CommandLineFlag& flag) {
  325|       |    if (flag.IsRetired()) return;
  326|       |
  327|       |#define ABSL_FLAGS_INTERNAL_IGNORE_TYPE(T, _) \
  328|       |  if (flag.IsOfType<T>()) return;
  329|       |
  330|       |    ABSL_FLAGS_INTERNAL_SUPPORTED_TYPES(ABSL_FLAGS_INTERNAL_IGNORE_TYPE)
  331|       |#undef ABSL_FLAGS_INTERNAL_IGNORE_TYPE
  332|       |
  333|       |    flags_internal::PrivateHandleAccessor::CheckDefaultValueParsingRoundtrip(
  334|       |        flag);
  335|       |  });
  336|       |#endif
  337|      2|}
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_18ArgsListC2EiPPc:
  169|      2|  ArgsList(int argc, char* argv[]) : args_(argv, argv + argc), next_arg_(0) {}
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_120HandleGeneratorFlagsERNSt3__16vectorINS2_8ArgsListENS3_9allocatorIS5_EEEERNS4_INS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEENS6_ISE_EEEE:
  415|      6|                          std::vector<std::string>& flagfile_value) {
  416|      6|  bool success = true;
  417|       |
  418|      6|  absl::MutexLock l(&flags_internal::processing_checks_guard);
  419|       |
  420|       |  // flagfile could have been set either on a command line or
  421|       |  // programmatically before invoking ParseCommandLine. Note that we do not
  422|       |  // actually process arguments specified in the flagfile, but instead
  423|       |  // create a secondary arguments list to be processed along with the rest
  424|       |  // of the command line arguments. Since we always the process most recently
  425|       |  // created list of arguments first, this will result in flagfile argument
  426|       |  // being processed before any other argument in the command line. If
  427|       |  // FLAGS_flagfile contains more than one file name we create multiple new
  428|       |  // levels of arguments in a reverse order of file names. Thus we always
  429|       |  // process arguments from first file before arguments containing in a
  430|       |  // second file, etc. If flagfile contains another
  431|       |  // --flagfile inside of it, it will produce new level of arguments and
  432|       |  // processed before the rest of the flagfile. We are also collecting all
  433|       |  // flagfiles set on original command line. Unlike the rest of the flags,
  434|       |  // this flag can be set multiple times and is expected to be handled
  435|       |  // multiple times. We are collecting them all into a single list and set
  436|       |  // the value of FLAGS_flagfile to that value at the end of the parsing.
  437|      6|  if (flags_internal::flagfile_needs_processing) {
  ------------------
  |  Branch (437:7): [True: 0, False: 6]
  ------------------
  438|      0|    auto flagfiles = absl::GetFlag(FLAGS_flagfile);
  439|       |
  440|      0|    if (input_args.size() == 1) {
  ------------------
  |  Branch (440:9): [True: 0, False: 0]
  ------------------
  441|      0|      flagfile_value.insert(flagfile_value.end(), flagfiles.begin(),
  442|      0|                            flagfiles.end());
  443|      0|    }
  444|       |
  445|      0|    success &= ReadFlagfiles(flagfiles, input_args);
  446|       |
  447|      0|    flags_internal::flagfile_needs_processing = false;
  448|      0|  }
  449|       |
  450|       |  // Similar to flagfile fromenv/tryfromemv can be set both
  451|       |  // programmatically and at runtime on a command line. Unlike flagfile these
  452|       |  // can't be recursive.
  453|      6|  if (flags_internal::fromenv_needs_processing) {
  ------------------
  |  Branch (453:7): [True: 0, False: 6]
  ------------------
  454|      0|    auto flags_list = absl::GetFlag(FLAGS_fromenv);
  455|       |
  456|      0|    success &= ReadFlagsFromEnv(flags_list, input_args, true);
  457|       |
  458|      0|    flags_internal::fromenv_needs_processing = false;
  459|      0|  }
  460|       |
  461|      6|  if (flags_internal::tryfromenv_needs_processing) {
  ------------------
  |  Branch (461:7): [True: 0, False: 6]
  ------------------
  462|      0|    auto flags_list = absl::GetFlag(FLAGS_tryfromenv);
  463|       |
  464|      0|    success &= ReadFlagsFromEnv(flags_list, input_args, false);
  465|       |
  466|      0|    flags_internal::tryfromenv_needs_processing = false;
  467|      0|  }
  468|       |
  469|      6|  return success;
  470|      6|}
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_18ArgsList8PopFrontEv:
  179|      8|  void PopFront() { next_arg_++; }
parse.cc:_ZNK4absl12lts_2024011614flags_internal12_GLOBAL__N_18ArgsList4SizeEv:
  176|      6|  size_t Size() const { return args_.size() - next_arg_; }
parse.cc:_ZNK4absl12lts_2024011614flags_internal12_GLOBAL__N_18ArgsList5FrontEv:
  178|      6|  absl::string_view Front() const { return args_[next_arg_]; }
parse.cc:_ZNK4absl12lts_2024011614flags_internal12_GLOBAL__N_18ArgsList10FrontIndexEv:
  177|      2|  size_t FrontIndex() const { return next_arg_; }
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_117SplitNameAndValueENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  278|      6|    absl::string_view arg) {
  279|       |  // Allow -foo and --foo
  280|      6|  absl::ConsumePrefix(&arg, "-");
  281|       |
  282|      6|  if (arg.empty()) {
  ------------------
  |  Branch (282:7): [True: 2, False: 4]
  ------------------
  283|      2|    return std::make_tuple("", "", false);
  284|      2|  }
  285|       |
  286|      4|  auto equal_sign_pos = arg.find('=');
  287|       |
  288|      4|  absl::string_view flag_name = arg.substr(0, equal_sign_pos);
  289|       |
  290|      4|  absl::string_view value;
  291|      4|  bool is_empty_value = false;
  292|       |
  293|      4|  if (equal_sign_pos != absl::string_view::npos) {
  ------------------
  |  Branch (293:7): [True: 4, False: 0]
  ------------------
  294|      4|    value = arg.substr(equal_sign_pos + 1);
  295|      4|    is_empty_value = value.empty();
  296|      4|  }
  297|       |
  298|      4|  return std::make_tuple(flag_name, value, is_empty_value);
  299|      6|}
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_110LocateFlagENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  306|      4|std::tuple<CommandLineFlag*, bool> LocateFlag(absl::string_view flag_name) {
  307|      4|  CommandLineFlag* flag = absl::FindCommandLineFlag(flag_name);
  308|      4|  bool is_negative = false;
  309|       |
  310|      4|  if (!flag && absl::ConsumePrefix(&flag_name, "no")) {
  ------------------
  |  Branch (310:7): [True: 0, False: 4]
  |  Branch (310:16): [True: 0, False: 0]
  ------------------
  311|      0|    flag = absl::FindCommandLineFlag(flag_name);
  312|      0|    is_negative = true;
  313|      0|  }
  314|       |
  315|      4|  return std::make_tuple(flag, is_negative);
  316|      4|}
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_115DeduceFlagValueERKNS0_15CommandLineFlagENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEbbPNS2_8ArgsListE:
  509|      4|                                                    ArgsList* curr_list) {
  510|       |  // Value is either an argument suffix after `=` in "--foo=<value>"
  511|       |  // or separate argument in case of "--foo" "<value>".
  512|       |
  513|       |  // boolean flags have these forms:
  514|       |  //   --foo
  515|       |  //   --nofoo
  516|       |  //   --foo=true
  517|       |  //   --foo=false
  518|       |  //   --nofoo=<value> is not supported
  519|       |  //   --foo <value> is not supported
  520|       |
  521|       |  // non boolean flags have these forms:
  522|       |  // --foo=<value>
  523|       |  // --foo <value>
  524|       |  // --nofoo is not supported
  525|       |
  526|      4|  if (flag.IsOfType<bool>()) {
  ------------------
  |  Branch (526:7): [True: 0, False: 4]
  ------------------
  527|      0|    if (value.empty()) {
  ------------------
  |  Branch (527:9): [True: 0, False: 0]
  ------------------
  528|      0|      if (is_empty_value) {
  ------------------
  |  Branch (528:11): [True: 0, False: 0]
  ------------------
  529|       |        // "--bool_flag=" case
  530|      0|        flags_internal::ReportUsageError(
  531|      0|            absl::StrCat(
  532|      0|                "Missing the value after assignment for the boolean flag '",
  533|      0|                flag.Name(), "'"),
  534|      0|            true);
  535|      0|        return std::make_tuple(false, "");
  536|      0|      }
  537|       |
  538|       |      // "--bool_flag" case
  539|      0|      value = is_negative ? "0" : "1";
  ------------------
  |  Branch (539:15): [True: 0, False: 0]
  ------------------
  540|      0|    } else if (is_negative) {
  ------------------
  |  Branch (540:16): [True: 0, False: 0]
  ------------------
  541|       |      // "--nobool_flag=Y" case
  542|      0|      flags_internal::ReportUsageError(
  543|      0|          absl::StrCat("Negative form with assignment is not valid for the "
  544|      0|                       "boolean flag '",
  545|      0|                       flag.Name(), "'"),
  546|      0|          true);
  547|      0|      return std::make_tuple(false, "");
  548|      0|    }
  549|      4|  } else if (is_negative) {
  ------------------
  |  Branch (549:14): [True: 0, False: 4]
  ------------------
  550|       |    // "--noint_flag=1" case
  551|      0|    flags_internal::ReportUsageError(
  552|      0|        absl::StrCat("Negative form is not valid for the flag '", flag.Name(),
  553|      0|                     "'"),
  554|      0|        true);
  555|      0|    return std::make_tuple(false, "");
  556|      4|  } else if (value.empty() && (!is_empty_value)) {
  ------------------
  |  Branch (556:14): [True: 0, False: 4]
  |  Branch (556:31): [True: 0, False: 0]
  ------------------
  557|      0|    if (curr_list->Size() == 1) {
  ------------------
  |  Branch (557:9): [True: 0, False: 0]
  ------------------
  558|       |      // "--int_flag" case
  559|      0|      flags_internal::ReportUsageError(
  560|      0|          absl::StrCat("Missing the value for the flag '", flag.Name(), "'"),
  561|      0|          true);
  562|      0|      return std::make_tuple(false, "");
  563|      0|    }
  564|       |
  565|       |    // "--int_flag" "10" case
  566|      0|    curr_list->PopFront();
  567|      0|    value = curr_list->Front();
  568|       |
  569|       |    // Heuristic to detect the case where someone treats a string arg
  570|       |    // like a bool or just forgets to pass a value:
  571|       |    // --my_string_var --foo=bar
  572|       |    // We look for a flag of string type, whose value begins with a
  573|       |    // dash and corresponds to known flag or standalone --.
  574|      0|    if (!value.empty() && value[0] == '-' && flag.IsOfType<std::string>()) {
  ------------------
  |  Branch (574:9): [True: 0, False: 0]
  |  Branch (574:27): [True: 0, False: 0]
  |  Branch (574:46): [True: 0, False: 0]
  ------------------
  575|      0|      auto maybe_flag_name = std::get<0>(SplitNameAndValue(value.substr(1)));
  576|       |
  577|      0|      if (maybe_flag_name.empty() ||
  ------------------
  |  Branch (577:11): [True: 0, False: 0]
  |  Branch (577:11): [True: 0, False: 0]
  ------------------
  578|      0|          std::get<0>(LocateFlag(maybe_flag_name)) != nullptr) {
  ------------------
  |  Branch (578:11): [True: 0, False: 0]
  ------------------
  579|       |        // "--string_flag" "--known_flag" case
  580|      0|        ABSL_INTERNAL_LOG(
  ------------------
  |  |   76|      0|  do {                                                                    \
  |  |   77|      0|    constexpr const char* absl_raw_log_internal_filename = __FILE__;      \
  |  |   78|      0|    ::absl::raw_log_internal::internal_log_function(                      \
  |  |   79|      0|        ABSL_RAW_LOG_INTERNAL_##severity, absl_raw_log_internal_filename, \
  |  |  ------------------
  |  |  |  |  108|      0|#define ABSL_RAW_LOG_INTERNAL_WARNING ::absl::LogSeverity::kWarning
  |  |  ------------------
  |  |   80|      0|        __LINE__, message);                                               \
  |  |   81|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                   \
  |  |   82|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  581|      0|            WARNING,
  582|      0|            absl::StrCat("Did you really mean to set flag '", flag.Name(),
  583|      0|                         "' to the value '", value, "'?"));
  584|      0|      }
  585|      0|    }
  586|      0|  }
  587|       |
  588|      4|  return std::make_tuple(true, value);
  589|      4|}
parse.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_119ResetGeneratorFlagsERKNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE:
  474|      2|void ResetGeneratorFlags(const std::vector<std::string>& flagfile_value) {
  475|       |  // Setting flagfile to the value which collates all the values set on a
  476|       |  // command line and programmatically. So if command line looked like
  477|       |  // --flagfile=f1 --flagfile=f2 the final value of the FLAGS_flagfile flag is
  478|       |  // going to be {"f1", "f2"}
  479|      2|  if (!flagfile_value.empty()) {
  ------------------
  |  Branch (479:7): [True: 0, False: 2]
  ------------------
  480|      0|    absl::SetFlag(&FLAGS_flagfile, flagfile_value);
  481|      0|    absl::MutexLock l(&flags_internal::processing_checks_guard);
  482|      0|    flags_internal::flagfile_needs_processing = false;
  483|      0|  }
  484|       |
  485|       |  // fromenv/tryfromenv are set to <undefined> value.
  486|      2|  if (!absl::GetFlag(FLAGS_fromenv).empty()) {
  ------------------
  |  Branch (486:7): [True: 0, False: 2]
  ------------------
  487|      0|    absl::SetFlag(&FLAGS_fromenv, {});
  488|      0|  }
  489|      2|  if (!absl::GetFlag(FLAGS_tryfromenv).empty()) {
  ------------------
  |  Branch (489:7): [True: 0, False: 2]
  ------------------
  490|      0|    absl::SetFlag(&FLAGS_tryfromenv, {});
  491|      0|  }
  492|       |
  493|      2|  absl::MutexLock l(&flags_internal::processing_checks_guard);
  494|      2|  flags_internal::fromenv_needs_processing = false;
  495|      2|  flags_internal::tryfromenv_needs_processing = false;
  496|      2|}
parse.cc:_ZNK4absl12lts_2024011614flags_internal12_GLOBAL__N_121SpecifiedFlagsCompareclEPKNS0_15CommandLineFlagES6_:
   86|      2|  bool operator()(const CommandLineFlag* a, const CommandLineFlag* b) const {
   87|      2|    return a->Name() < b->Name();
   88|      2|  }

_ZN4absl12lts_2024011614flags_internal12FlagRegistry8FindFlagENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   99|      4|CommandLineFlag* FlagRegistry::FindFlag(absl::string_view name) {
  100|      4|  if (finalized_flags_.load(std::memory_order_acquire)) {
  ------------------
  |  Branch (100:7): [True: 4, False: 0]
  ------------------
  101|       |    // We could save some gcus here if we make `Name()` be non-virtual.
  102|       |    // We could move the `const char*` name to the base class.
  103|      4|    auto it = std::partition_point(
  104|      4|        flat_flags_.begin(), flat_flags_.end(),
  105|      4|        [=](CommandLineFlag* f) { return f->Name() < name; });
  106|      4|    if (it != flat_flags_.end() && (*it)->Name() == name) return *it;
  ------------------
  |  Branch (106:9): [True: 4, False: 0]
  |  Branch (106:9): [True: 4, False: 0]
  |  Branch (106:36): [True: 4, False: 0]
  ------------------
  107|      4|  }
  108|       |
  109|      0|  FlagRegistryLock frl(*this);
  110|      0|  auto it = flags_.find(name);
  111|      0|  return it != flags_.end() ? it->second : nullptr;
  ------------------
  |  Branch (111:10): [True: 0, False: 0]
  ------------------
  112|      4|}
_ZN4absl12lts_2024011614flags_internal12FlagRegistry12RegisterFlagERNS0_15CommandLineFlagEPKc:
  114|     32|void FlagRegistry::RegisterFlag(CommandLineFlag& flag, const char* filename) {
  115|     32|  if (filename != nullptr &&
  ------------------
  |  Branch (115:7): [True: 32, False: 0]
  |  Branch (115:7): [True: 0, False: 32]
  ------------------
  116|     32|      flag.Filename() != GetUsageConfig().normalize_filename(filename)) {
  ------------------
  |  Branch (116:7): [True: 0, False: 32]
  ------------------
  117|      0|    flags_internal::ReportUsageError(
  118|      0|        absl::StrCat(
  119|      0|            "Inconsistency between flag object and registration for flag '",
  120|      0|            flag.Name(),
  121|      0|            "', likely due to duplicate flags or an ODR violation. Relevant "
  122|      0|            "files: ",
  123|      0|            flag.Filename(), " and ", filename),
  124|      0|        true);
  125|      0|    std::exit(1);
  126|      0|  }
  127|       |
  128|     32|  FlagRegistryLock registry_lock(*this);
  129|       |
  130|     32|  std::pair<FlagIterator, bool> ins =
  131|     32|      flags_.insert(FlagMap::value_type(flag.Name(), &flag));
  132|     32|  if (ins.second == false) {  // means the name was already in the map
  ------------------
  |  Branch (132:7): [True: 0, False: 32]
  ------------------
  133|      0|    CommandLineFlag& old_flag = *ins.first->second;
  134|      0|    if (flag.IsRetired() != old_flag.IsRetired()) {
  ------------------
  |  Branch (134:9): [True: 0, False: 0]
  ------------------
  135|       |      // All registrations must agree on the 'retired' flag.
  136|      0|      flags_internal::ReportUsageError(
  137|      0|          absl::StrCat(
  138|      0|              "Retired flag '", flag.Name(), "' was defined normally in file '",
  139|      0|              (flag.IsRetired() ? old_flag.Filename() : flag.Filename()), "'."),
  ------------------
  |  Branch (139:16): [True: 0, False: 0]
  ------------------
  140|      0|          true);
  141|      0|    } else if (flags_internal::PrivateHandleAccessor::TypeId(flag) !=
  ------------------
  |  Branch (141:16): [True: 0, False: 0]
  ------------------
  142|      0|               flags_internal::PrivateHandleAccessor::TypeId(old_flag)) {
  143|      0|      flags_internal::ReportUsageError(
  144|      0|          absl::StrCat("Flag '", flag.Name(),
  145|      0|                       "' was defined more than once but with "
  146|      0|                       "differing types. Defined in files '",
  147|      0|                       old_flag.Filename(), "' and '", flag.Filename(), "'."),
  148|      0|          true);
  149|      0|    } else if (old_flag.IsRetired()) {
  ------------------
  |  Branch (149:16): [True: 0, False: 0]
  ------------------
  150|      0|      return;
  151|      0|    } else if (old_flag.Filename() != flag.Filename()) {
  ------------------
  |  Branch (151:16): [True: 0, False: 0]
  ------------------
  152|      0|      flags_internal::ReportUsageError(
  153|      0|          absl::StrCat("Flag '", flag.Name(),
  154|      0|                       "' was defined more than once (in files '",
  155|      0|                       old_flag.Filename(), "' and '", flag.Filename(), "')."),
  156|      0|          true);
  157|      0|    } else {
  158|      0|      flags_internal::ReportUsageError(
  159|      0|          absl::StrCat(
  160|      0|              "Something is wrong with flag '", flag.Name(), "' in file '",
  161|      0|              flag.Filename(), "'. One possibility: file '", flag.Filename(),
  162|      0|              "' is being linked both statically and dynamically into this "
  163|      0|              "executable. e.g. some files listed as srcs to a test and also "
  164|      0|              "listed as srcs of some shared lib deps of the same test."),
  165|      0|          true);
  166|      0|    }
  167|       |    // All cases above are fatal, except for the retired flags.
  168|      0|    std::exit(1);
  169|      0|  }
  170|     32|}
_ZN4absl12lts_2024011614flags_internal12FlagRegistry14GlobalRegistryEv:
  172|     38|FlagRegistry& FlagRegistry::GlobalRegistry() {
  173|     38|  static absl::NoDestructor<FlagRegistry> global_registry;
  174|     38|  return *global_registry;
  175|     38|}
_ZN4absl12lts_2024011614flags_internal23RegisterCommandLineFlagERNS0_15CommandLineFlagEPKc:
  192|     32|bool RegisterCommandLineFlag(CommandLineFlag& flag, const char* filename) {
  193|     32|  FlagRegistry::GlobalRegistry().RegisterFlag(flag, filename);
  194|     32|  return true;
  195|     32|}
_ZN4absl12lts_2024011614flags_internal16FinalizeRegistryEv:
  197|      2|void FinalizeRegistry() {
  198|      2|  auto& registry = FlagRegistry::GlobalRegistry();
  199|      2|  FlagRegistryLock frl(registry);
  200|      2|  if (registry.finalized_flags_.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (200:7): [True: 0, False: 2]
  ------------------
  201|       |    // Was already finalized. Ignore the second time.
  202|      0|    return;
  203|      0|  }
  204|      2|  registry.flat_flags_.reserve(registry.flags_.size());
  205|     32|  for (const auto& f : registry.flags_) {
  ------------------
  |  Branch (205:22): [True: 32, False: 2]
  ------------------
  206|     32|    registry.flat_flags_.push_back(f.second);
  207|     32|  }
  208|      2|  std::sort(std::begin(registry.flat_flags_), std::end(registry.flat_flags_),
  209|      2|            [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) {
  210|      2|              return lhs->Name() < rhs->Name();
  211|      2|            });
  212|      2|  registry.flags_.clear();
  213|      2|  registry.finalized_flags_.store(true, std::memory_order_release);
  214|      2|}
_ZN4absl12lts_2024011619FindCommandLineFlagENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  337|      4|CommandLineFlag* FindCommandLineFlag(absl::string_view name) {
  338|      4|  if (name.empty()) return nullptr;
  ------------------
  |  Branch (338:7): [True: 0, False: 4]
  ------------------
  339|      4|  flags_internal::FlagRegistry& registry =
  340|      4|      flags_internal::FlagRegistry::GlobalRegistry();
  341|      4|  return registry.FindFlag(name);
  342|      4|}
reflection.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_116FlagRegistryLockC2ERNS1_12FlagRegistryE:
   90|     34|  explicit FlagRegistryLock(FlagRegistry& fr) : fr_(fr) { fr_.Lock(); }
_ZN4absl12lts_2024011614flags_internal12FlagRegistry4LockEv:
   56|     34|  void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION(lock_) { lock_.Lock(); }
reflection.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_116FlagRegistryLockD2Ev:
   91|     34|  ~FlagRegistryLock() { fr_.Unlock(); }
_ZN4absl12lts_2024011614flags_internal12FlagRegistry6UnlockEv:
   57|     34|  void Unlock() ABSL_UNLOCK_FUNCTION(lock_) { lock_.Unlock(); }
_ZN4absl12lts_2024011614flags_internal12FlagRegistryC2Ev:
   50|      2|  FlagRegistry() = default;
reflection.cc:_ZZN4absl12lts_2024011614flags_internal12FlagRegistry8FindFlagENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEENK3$_0clEPNS0_15CommandLineFlagE:
  105|     16|        [=](CommandLineFlag* f) { return f->Name() < name; });
reflection.cc:_ZZN4absl12lts_2024011614flags_internal16FinalizeRegistryEvENK3$_0clEPKNS0_15CommandLineFlagES5_:
  209|    146|            [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) {
  210|    146|              return lhs->Name() < rhs->Name();
  211|    146|            });

_ZN4absl12lts_2024011619ProgramUsageMessageEv:
   57|      2|absl::string_view ProgramUsageMessage() {
   58|      2|  absl::MutexLock l(&flags_internal::usage_message_guard);
   59|       |
   60|      2|  return flags_internal::program_usage_message != nullptr
  ------------------
  |  Branch (60:10): [True: 0, False: 2]
  ------------------
   61|      2|             ? absl::string_view(*flags_internal::program_usage_message)
   62|      2|             : "Warning: SetProgramUsageMessage() never called";
   63|      2|}

_ZN4absl12lts_2024011614flags_internal14GetUsageConfigEv:
  113|     64|FlagsUsageConfig GetUsageConfig() {
  114|     64|  absl::MutexLock l(&custom_usage_config_guard);
  115|       |
  116|     64|  if (custom_usage_config) return *custom_usage_config;
  ------------------
  |  Branch (116:7): [True: 0, False: 64]
  ------------------
  117|       |
  118|     64|  FlagsUsageConfig default_config;
  119|     64|  default_config.contains_helpshort_flags = &ContainsHelpshortFlags;
  120|     64|  default_config.contains_help_flags = &ContainsHelppackageFlags;
  121|     64|  default_config.contains_helppackage_flags = &ContainsHelppackageFlags;
  122|     64|  default_config.version_string = &VersionString;
  123|     64|  default_config.normalize_filename = &NormalizeFilename;
  124|       |
  125|     64|  return default_config;
  126|     64|}
usage_config.cc:_ZN4absl12lts_2024011614flags_internal12_GLOBAL__N_117NormalizeFilenameENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   96|     64|std::string NormalizeFilename(absl::string_view filename) {
   97|       |  // Skip any leading slashes
   98|     64|  auto pos = filename.find_first_not_of("\\/");
   99|     64|  if (pos == absl::string_view::npos) return "";
  ------------------
  |  Branch (99:7): [True: 0, False: 64]
  ------------------
  100|       |
  101|     64|  filename.remove_prefix(pos);
  102|     64|  return std::string(filename);
  103|     64|}

_ZN4absl12lts_2024011612AnyInvocableIKFNSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS2_14default_deleteIS6_EEEERKNS5_8FuzzTestEEEC2IZNS5_17RegistrationToken24GetFuzzTestFuzzerFactoryINS5_27RegistrationWithDomainsBaseIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEENS5_9NoFixtureEPFvRKSO_bbjbEPvEESE_ONS5_12RegistrationIT0_T1_T_T2_EEEUlSC_E_vEEOSZ_:
  186|      2|      : Impl(internal_any_invocable::ConversionConstruct(),
  187|      2|             std::forward<F>(f)) {}
_ZN4absl12lts_2024011612AnyInvocableIKFNSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS2_14default_deleteIS6_EEEERKNS5_8FuzzTestEEEC2EOSE_:
  176|      4|  AnyInvocable(AnyInvocable&& /*f*/) noexcept = default;

init_fuzztest.cc:_ZN4absl12lts_2024011611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEC2IZNS2_19ListRegisteredTestsEvE3$_0vEERKT_:
  105|      6|      : invoker_(&absl::functional_internal::InvokeObject<F, R, Args...>) {
  106|      6|    absl::functional_internal::AssertNonNull(f);
  107|      6|    ptr_.obj = &f;
  108|      6|  }
googletest_adaptor.cc:_ZN4absl12lts_2024011611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEC2IZNS3_30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS3_13ConfigurationEE3$_0vEERKT_:
  105|      2|      : invoker_(&absl::functional_internal::InvokeObject<F, R, Args...>) {
  106|      2|    absl::functional_internal::AssertNonNull(f);
  107|      2|    ptr_.obj = &f;
  108|      2|  }
_ZNK4absl12lts_2024011611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEclES5_:
  131|      8|  R operator()(Args... args) const {
  132|      8|    return invoker_(ptr_, std::forward<Args>(args)...);
  133|      8|  }
status.cc:_ZN4absl12lts_2024011611FunctionRefIFvNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS0_4CordEEEC2IZ10SetMessageRKNS0_6StatusES6_E3$_0vEERKT_:
  105|     38|      : invoker_(&absl::functional_internal::InvokeObject<F, R, Args...>) {
  106|     38|    absl::functional_internal::AssertNonNull(f);
  107|     38|    ptr_.obj = &f;
  108|     38|  }

_ZN4absl12lts_2024011622internal_any_invocable12EmptyManagerENS1_14FunctionToCallEPNS1_15TypeErasedStateES4_:
  246|      4|                         TypeErasedState* /*to*/) noexcept {}
_ZNK4absl12lts_2024011622internal_any_invocable4ImplIKFNSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEERKNS6_8FuzzTestEEE14ExtractInvokerEv:
  831|      2|    InvokerType<noex, ReturnType, P...>* ExtractInvoker() cv {                 \
  832|      2|      using QualifiedTestType = int cv ref;                                    \
  833|      2|      auto* invoker = this->invoker_;                                          \
  834|      2|      if (!std::is_const<QualifiedTestType>::value &&                          \
  ------------------
  |  Branch (834:11): [Folded, False: 2]
  ------------------
  835|      2|          std::is_rvalue_reference<QualifiedTestType>::value) {                \
  ------------------
  |  Branch (835:11): [Folded, False: 0]
  ------------------
  836|      0|        ABSL_ASSERT([this]() {                                                 \
  ------------------
  |  |   95|      0|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  ------------------
  |  |  |  Branch (95:4): [Folded, False: 0]
  |  |  ------------------
  ------------------
  837|      0|          /* We checked that this isn't const above, so const_cast is safe */  \
  838|      0|          const_cast<Impl*>(this)->invoker_ = InvokedAfterMove;                \
  839|      0|          return this->HasValue();                                             \
  840|      0|        }());                                                                  \
  841|      0|      }                                                                        \
  842|      2|      return invoker;                                                          \
  843|      2|    }                                                                          \
_ZN4absl12lts_2024011622internal_any_invocable4ImplIKFNSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEERKNS6_8FuzzTestEEEC2IZNS6_17RegistrationToken24GetFuzzTestFuzzerFactoryINS6_27RegistrationWithDomainsBaseIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEENS6_9NoFixtureEPFvRKSP_bbjbEPvEENS0_12AnyInvocableISE_EEONS6_12RegistrationIT0_T1_T_T2_EEEUlSD_E_EENS1_19ConversionConstructEOS12_:
  813|      2|        : Core(TypedConversionConstruct<                                       \
  814|      2|                   typename std::decay<F>::type inv_quals>(),                  \
  815|      2|               std::forward<F>(f)) {}                                          \
_ZN4absl12lts_2024011622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEEC2IRKZNS6_17RegistrationToken24GetFuzzTestFuzzerFactoryINS6_27RegistrationWithDomainsBaseIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEENS6_9NoFixtureEPFvRKSO_bbjbEPvEENS0_12AnyInvocableIKFSA_SD_EEEONS6_12RegistrationIT0_T1_T_T2_EEEUlSD_E_S16_EENS1_24TypedConversionConstructIS12_EEOS10_:
  454|      2|  explicit CoreImpl(TypedConversionConstruct<QualDecayedTRef>, F&& f) {
  455|      2|    using DecayedT = RemoveCVRef<QualDecayedTRef>;
  456|       |
  457|      2|    constexpr TargetType kTargetType =
  458|      2|        (std::is_pointer<DecayedT>::value ||
  ------------------
  |  Branch (458:10): [Folded, False: 0]
  ------------------
  459|      0|         std::is_member_pointer<DecayedT>::value)
  ------------------
  |  Branch (459:10): [Folded, False: 0]
  ------------------
  460|      2|            ? TargetType::kPointer
  461|      2|        : IsCompatibleAnyInvocable<DecayedT>::value
  ------------------
  |  Branch (461:11): [Folded, False: 2]
  ------------------
  462|      2|            ? TargetType::kCompatibleAnyInvocable
  463|      2|        : IsAnyInvocable<DecayedT>::value
  ------------------
  |  Branch (463:11): [Folded, False: 2]
  ------------------
  464|      2|            ? TargetType::kIncompatibleAnyInvocable
  465|      2|            : TargetType::kOther;
  466|       |    // NOTE: We only use integers instead of enums as template parameters in
  467|       |    // order to work around a bug on C++14 under MSVC 2017.
  468|       |    // See b/236131881.
  469|      2|    Initialize<kTargetType, QualDecayedTRef>(std::forward<F>(f));
  470|      2|  }
_ZN4absl12lts_2024011622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEE10InitializeILNSE_10TargetTypeE3ERKZNS6_17RegistrationToken24GetFuzzTestFuzzerFactoryINS6_27RegistrationWithDomainsBaseIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEENS6_9NoFixtureEPFvRKSP_bbjbEPvEENS0_12AnyInvocableIKFSA_SD_EEEONS6_12RegistrationIT0_T1_T_T2_EEEUlSD_E_S17_vEEvOS12_:
  572|      2|  void Initialize(F&& f) {
  573|      2|    InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  574|      2|  }
_ZN4absl12lts_2024011622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEE17InitializeStorageIRKZNS6_17RegistrationToken24GetFuzzTestFuzzerFactoryINS6_27RegistrationWithDomainsBaseIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEENS6_9NoFixtureEPFvRKSO_bbjbEPvEENS0_12AnyInvocableIKFSA_SD_EEEONS6_12RegistrationIT0_T1_T_T2_EEEUlSD_E_JS16_ETnNS3_9enable_ifIXntsr15IsStoredLocallyINS3_9remove_cvINS3_16remove_referenceIS12_E4typeEE4typeEEE5valueEiE4typeELi0EEEvDpOT0_:
  594|      2|  void InitializeStorage(Args&&... args) {
  595|      2|    InitializeRemoteManager<RemoveCVRef<QualTRef>>(std::forward<Args>(args)...);
  596|       |    // This is set after everything else in case an exception is thrown in an
  597|       |    // earlier step of the initialization.
  598|      2|    invoker_ = RemoteInvoker<SigIsNoexcept, ReturnType, QualTRef, P...>;
  599|      2|  }
_ZN4absl12lts_2024011622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEE23InitializeRemoteManagerIZNS6_17RegistrationToken24GetFuzzTestFuzzerFactoryINS6_27RegistrationWithDomainsBaseIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEENS6_9NoFixtureEPFvRKSO_bbjbEPvEENS0_12AnyInvocableIKFSA_SD_EEEONS6_12RegistrationIT0_T1_T_T2_EEEUlSD_E_JS16_ETnNS3_9enable_ifIXntsr23HasTrivialRemoteStorageIS12_EE5valueEiE4typeELi0EEEvDpOT0_:
  633|      2|  void InitializeRemoteManager(Args&&... args) {
  634|      2|    state_.remote.target = ::new T(std::forward<Args>(args)...);
  635|      2|    manager_ = RemoteManagerNontrivial<T>;
  636|      2|  }
_ZN4absl12lts_2024011622internal_any_invocable23RemoteManagerNontrivialIZN8fuzztest8internal17RegistrationToken24GetFuzzTestFuzzerFactoryINS4_27RegistrationWithDomainsBaseIJNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEEbbjbEEENS4_9NoFixtureEPFvRKSE_bbjbEPvEENS0_12AnyInvocableIKFNS8_10unique_ptrINS4_14FuzzTestFuzzerENS8_14default_deleteISO_EEEERKNS4_8FuzzTestEEEEONS4_12RegistrationIT0_T1_T_T2_EEEUlSU_E_EEvNS1_14FunctionToCallEPNS1_15TypeErasedStateES17_:
  340|      4|                             TypeErasedState* const to) noexcept {
  341|      4|  static_assert(!IsStoredLocally<T>::value,
  342|      4|                "Remote storage must only be used for types that do not "
  343|      4|                "qualify for local storage.");
  344|       |
  345|      4|  switch (operation) {
  ------------------
  |  Branch (345:11): [True: 4, False: 0]
  ------------------
  346|      4|    case FunctionToCall::relocate_from_to:
  ------------------
  |  Branch (346:5): [True: 4, False: 0]
  ------------------
  347|       |      // NOTE: Requires that the left-hand operand is already empty.
  348|      4|      to->remote.target = from->remote.target;
  349|      4|      return;
  350|      0|    case FunctionToCall::dispose:
  ------------------
  |  Branch (350:5): [True: 0, False: 4]
  ------------------
  351|      0|      ::delete static_cast<T*>(from->remote.target);  // Must not throw.
  352|      0|      return;
  353|      4|  }
  354|      0|  ABSL_UNREACHABLE();
  ------------------
  |  |  225|      0|  do {                                           \
  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  ------------------
  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  ------------------
  |  |  229|      0|  } while (false)
  |  |  ------------------
  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  355|      0|}
_ZN4absl12lts_2024011622internal_any_invocable13RemoteInvokerILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEERKZNS6_17RegistrationToken24GetFuzzTestFuzzerFactoryINS6_27RegistrationWithDomainsBaseIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEENS6_9NoFixtureEPFvRKSJ_bbjbEPvEENS0_12AnyInvocableIKFSA_RKNS6_8FuzzTestEEEEONS6_12RegistrationIT0_T1_T_T2_EEEUlSU_E_JSU_EEESY_PNS1_15TypeErasedStateEDpNS1_18ForwardedParameterIT2_E4typeE:
  361|      2|    ForwardedParameterType<P>... args) noexcept(SigIsNoexcept) {
  362|      2|  using RawT = RemoveCVRef<QualTRef>;
  363|      2|  static_assert(!IsStoredLocally<RawT>::value,
  364|      2|                "Target object must be in remote storage in order to be "
  365|      2|                "invoked from it.");
  366|       |
  367|      2|  auto& f = *static_cast<RawT*>(state->remote.target);
  368|      2|  return (InvokeR<ReturnType>)(static_cast<QualTRef>(f),
  369|      2|                               static_cast<ForwardedParameterType<P>>(args)...);
  370|      2|}
_ZN4absl12lts_2024011622internal_any_invocable7InvokeRINSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEERKZNS6_17RegistrationToken24GetFuzzTestFuzzerFactoryINS6_27RegistrationWithDomainsBaseIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEENS6_9NoFixtureEPFvRKSJ_bbjbEPvEENS0_12AnyInvocableIKFSA_RKNS6_8FuzzTestEEEEONS6_12RegistrationIT0_T1_T_T2_EEEUlSU_E_JSU_ETnNS3_9enable_ifIXntsr3std7is_voidIS10_EE5valueEiE4typeELi0EEES10_OSY_DpOT1_:
  137|      2|ReturnType InvokeR(F&& f, P&&... args) {
  138|       |  // GCC 12 has a false-positive -Wmaybe-uninitialized warning here.
  139|       |#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
  140|       |#pragma GCC diagnostic push
  141|       |#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
  142|       |#endif
  143|      2|  return absl::base_internal::invoke(std::forward<F>(f),
  144|      2|                                     std::forward<P>(args)...);
  145|       |#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(12, 0)
  146|       |#pragma GCC diagnostic pop
  147|       |#endif
  148|      2|}
_ZN4absl12lts_2024011622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEED2Ev:
  508|      4|  ~CoreImpl() { manager_(FunctionToCall::dispose, &state_, &state_); }
_ZN4absl12lts_2024011622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEEC2EOSE_:
  480|      4|  CoreImpl(CoreImpl&& other) noexcept {
  481|      4|    other.manager_(FunctionToCall::relocate_from_to, &other.state_, &state_);
  482|      4|    manager_ = other.manager_;
  483|      4|    invoker_ = other.invoker_;
  484|      4|    other.manager_ = EmptyManager;
  485|      4|    other.invoker_ = nullptr;
  486|      4|  }

init_fuzztest.cc:_ZN4absl12lts_2024011619functional_internal12InvokeObjectIZN8fuzztest19ListRegisteredTestsEvE3$_0vJRNS3_8internal8FuzzTestEEEET0_NS1_7VoidPtrEDpNS1_8ForwardTIT1_E4typeE:
   75|      6|R InvokeObject(VoidPtr ptr, typename ForwardT<Args>::type... args) {
   76|      6|  auto o = static_cast<const Obj*>(ptr.obj);
   77|      6|  return static_cast<R>(
   78|      6|      absl::base_internal::invoke(*o, std::forward<Args>(args)...));
   79|      6|}
init_fuzztest.cc:_ZN4absl12lts_2024011619functional_internal13AssertNonNullIZN8fuzztest19ListRegisteredTestsEvE3$_0EEvRKT_:
  101|      6|void AssertNonNull(const F&) {}
googletest_adaptor.cc:_ZN4absl12lts_2024011619functional_internal12InvokeObjectIZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS4_13ConfigurationEE3$_0vJRNS4_8FuzzTestEEEET0_NS1_7VoidPtrEDpNS1_8ForwardTIT1_E4typeE:
   75|      2|R InvokeObject(VoidPtr ptr, typename ForwardT<Args>::type... args) {
   76|      2|  auto o = static_cast<const Obj*>(ptr.obj);
   77|      2|  return static_cast<R>(
   78|      2|      absl::base_internal::invoke(*o, std::forward<Args>(args)...));
   79|      2|}
googletest_adaptor.cc:_ZN4absl12lts_2024011619functional_internal13AssertNonNullIZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS4_13ConfigurationEE3$_0EEvRKT_:
  101|      2|void AssertNonNull(const F&) {}
status.cc:_ZN4absl12lts_2024011619functional_internal13AssertNonNullIZ10SetMessageRKNS0_6StatusENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEE3$_0EEvRKT_:
  101|     38|void AssertNonNull(const F&) {}

_ZN4absl12lts_2024011613hash_internal15MixingHashState16LowLevelHashImplEPKhm:
   63|     12|                                           size_t len) {
   64|     12|  return LowLevelHash(data, len, Seed(), kHashSalt);
   65|     12|}

_ZN4absl12lts_2024011613hash_internal15MixingHashState18combine_contiguousES2_PKhm:
 1023|    120|                                            size_t size) {
 1024|    120|    return MixingHashState(
 1025|    120|        CombineContiguousImpl(hash_state.state_, first, size,
 1026|    120|                              std::integral_constant<int, sizeof(size_t)>{}));
 1027|    120|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashStateC2Ev:
 1052|     60|  MixingHashState() : state_(Seed()) {}
_ZN4absl12lts_2024011613hash_internal15MixingHashStateC2Em:
 1085|    120|  explicit MixingHashState(uint64_t state) : state_(state) {}
_ZN4absl12lts_2024011613hash_internal15MixingHashState9Read9To16EPKhm:
 1114|     26|                                                 size_t len) {
 1115|     26|    uint64_t low_mem = absl::base_internal::UnalignedLoad64(p);
 1116|     26|    uint64_t high_mem = absl::base_internal::UnalignedLoad64(p + len - 8);
 1117|     26|#ifdef ABSL_IS_LITTLE_ENDIAN
 1118|     26|    uint64_t most_significant = high_mem;
 1119|     26|    uint64_t least_significant = low_mem;
 1120|       |#else
 1121|       |    uint64_t most_significant = low_mem;
 1122|       |    uint64_t least_significant = high_mem;
 1123|       |#endif
 1124|     26|    return {least_significant, most_significant};
 1125|     26|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState8Read4To8EPKhm:
 1128|     82|  static uint64_t Read4To8(const unsigned char* p, size_t len) {
 1129|     82|    uint32_t low_mem = absl::base_internal::UnalignedLoad32(p);
 1130|     82|    uint32_t high_mem = absl::base_internal::UnalignedLoad32(p + len - 4);
 1131|     82|#ifdef ABSL_IS_LITTLE_ENDIAN
 1132|     82|    uint32_t most_significant = high_mem;
 1133|     82|    uint32_t least_significant = low_mem;
 1134|       |#else
 1135|       |    uint32_t most_significant = low_mem;
 1136|       |    uint32_t least_significant = high_mem;
 1137|       |#endif
 1138|     82|    return (static_cast<uint64_t>(most_significant) << (len - 4) * 8) |
 1139|     82|           least_significant;
 1140|     82|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState3MixEmm:
 1162|     94|  ABSL_ATTRIBUTE_ALWAYS_INLINE static uint64_t Mix(uint64_t state, uint64_t v) {
 1163|       |    // Though the 128-bit product on AArch64 needs two instructions, it is
 1164|       |    // still a good balance between speed and hash quality.
 1165|     94|    using MultType =
 1166|     94|        absl::conditional_t<sizeof(size_t) == 4, uint64_t, uint128>;
 1167|       |    // We do the addition in 64-bit space to make sure the 128-bit
 1168|       |    // multiplication is fast. If we were to do it as MultType the compiler has
 1169|       |    // to assume that the high word is non-zero and needs to perform 2
 1170|       |    // multiplications instead of one.
 1171|     94|    MultType m = state + v;
 1172|     94|    m *= kMul;
 1173|     94|    return static_cast<uint64_t>(m ^ (m >> (sizeof(m) * 8 / 2)));
 1174|     94|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState6Hash64EPKhm:
 1181|     12|                                                      size_t len) {
 1182|     12|#ifdef ABSL_HAVE_INTRINSIC_INT128
 1183|     12|    return LowLevelHashImpl(data, len);
 1184|       |#else
 1185|       |    return hash_internal::CityHash64(reinterpret_cast<const char*>(data), len);
 1186|       |#endif
 1187|     12|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4SeedEv:
 1205|     72|  ABSL_ATTRIBUTE_ALWAYS_INLINE static uint64_t Seed() {
 1206|     72|#if (!defined(__clang__) || __clang_major__ > 11) && \
 1207|     72|    (!defined(__apple_build_version__) ||            \
 1208|     72|     __apple_build_version__ >= 19558921)  // Xcode 12
 1209|     72|    return static_cast<uint64_t>(reinterpret_cast<uintptr_t>(&kSeed));
 1210|       |#else
 1211|       |    // Workaround the absence of
 1212|       |    // https://github.com/llvm/llvm-project/commit/bc15bf66dcca76cc06fe71fca35b74dc4d521021.
 1213|       |    return static_cast<uint64_t>(reinterpret_cast<uintptr_t>(kSeed));
 1214|       |#endif
 1215|     72|  }
_ZN4absl12lts_2024011613hash_internal18PiecewiseChunkSizeEv:
   82|     12|constexpr size_t PiecewiseChunkSize() { return 1024; }
_ZN4absl12lts_2024011613hash_internal15MixingHashState21CombineContiguousImplEmPKhmNSt3__117integral_constantIiLi8EEE:
 1247|    120|    std::integral_constant<int, 8> /* sizeof_size_t */) {
 1248|       |  // For large values we use LowLevelHash or CityHash depending on the platform,
 1249|       |  // for small ones we just use a multiplicative hash.
 1250|    120|  uint64_t v;
 1251|    120|  if (len > 16) {
  ------------------
  |  Branch (1251:7): [True: 12, False: 108]
  ------------------
 1252|     12|    if (ABSL_PREDICT_FALSE(len > PiecewiseChunkSize())) {
  ------------------
  |  |  178|     12|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 12]
  |  |  |  Branch (178:49): [Folded, False: 12]
  |  |  |  Branch (178:58): [True: 0, False: 12]
  |  |  ------------------
  ------------------
 1253|      0|      return CombineLargeContiguousImpl64(state, first, len);
 1254|      0|    }
 1255|     12|    v = Hash64(first, len);
 1256|    108|  } else if (len > 8) {
  ------------------
  |  Branch (1256:14): [True: 26, False: 82]
  ------------------
 1257|       |    // This hash function was constructed by the ML-driven algorithm discovery
 1258|       |    // using reinforcement learning. We fed the agent lots of inputs from
 1259|       |    // microbenchmarks, SMHasher, low hamming distance from generated inputs and
 1260|       |    // picked up the one that was good on micro and macrobenchmarks.
 1261|     26|    auto p = Read9To16(first, len);
 1262|     26|    uint64_t lo = p.first;
 1263|     26|    uint64_t hi = p.second;
 1264|       |    // Rotation by 53 was found to be most often useful when discovering these
 1265|       |    // hashing algorithms with ML techniques.
 1266|     26|    lo = absl::rotr(lo, 53);
 1267|     26|    state += kMul;
 1268|     26|    lo += state;
 1269|     26|    state ^= hi;
 1270|     26|    uint128 m = state;
 1271|     26|    m *= lo;
 1272|     26|    return static_cast<uint64_t>(m ^ (m >> 64));
 1273|     82|  } else if (len >= 4) {
  ------------------
  |  Branch (1273:14): [True: 82, False: 0]
  ------------------
 1274|     82|    v = Read4To8(first, len);
 1275|     82|  } else if (len > 0) {
  ------------------
  |  Branch (1275:14): [True: 0, False: 0]
  ------------------
 1276|      0|    v = Read1To3(first, len);
 1277|      0|  } else {
 1278|       |    // Empty ranges have no effect.
 1279|      0|    return state;
 1280|      0|  }
 1281|     94|  return Mix(state, v);
 1282|    120|}
_ZNK4absl12lts_2024011613hash_internal8HashImplINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEEclERKS7_:
 1299|     60|  size_t operator()(const T& value) const {
 1300|     60|    return MixingHashState::hash(value);
 1301|     60|  }
_ZN4absl12lts_2024011613hash_internal15MixingHashState4hashINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEETnNS4_9enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSA_:
 1045|     60|  static size_t hash(const T& value) {
 1046|     60|    return static_cast<size_t>(combine(MixingHashState{}, value).state_);
 1047|     60|  }
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEJEEES3_S3_RKT_DpRKT0_:
 1310|     60|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|     60|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|     60|                        std::move(state), value),
 1313|     60|                    values...);
 1314|     60|}
_ZN4absl12lts_2024011613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESC_E4typeESC_RKT0_:
  937|     60|        H> {
  938|     60|      return AbslHashValue(std::move(state), value);
  939|     60|    }
_ZN4absl12lts_2024011613hash_internal13AbslHashValueINS1_15MixingHashStateEEET_S4_NSt3__117basic_string_viewIcNS5_11char_traitsIcEEEE:
  557|     60|H AbslHashValue(H hash_state, absl::string_view str) {
  558|     60|  return H::combine(
  559|     60|      H::combine_contiguous(std::move(hash_state), str.data(), str.size()),
  560|     60|      str.size());
  561|     60|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE18combine_contiguousIcEES3_S3_PKT_m:
 1319|     60|H HashStateBase<H>::combine_contiguous(H state, const T* data, size_t size) {
 1320|     60|  return hash_internal::hash_range_or_bytes(std::move(state), data, size);
 1321|     60|}
_ZN4absl12lts_2024011613hash_internal19hash_range_or_bytesINS1_15MixingHashStateEcEENSt3__19enable_ifIXsr23is_uniquely_representedIT0_EE5valueET_E4typeES7_PKS6_m:
  885|     60|hash_range_or_bytes(H hash_state, const T* data, size_t size) {
  886|     60|  const auto* bytes = reinterpret_cast<const unsigned char*>(data);
  887|     60|  return H::combine_contiguous(std::move(hash_state), bytes, sizeof(T) * size);
  888|     60|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineImJEEES3_S3_RKT_DpRKT0_:
 1310|     60|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1311|     60|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1312|     60|                        std::move(state), value),
 1313|     60|                    values...);
 1314|     60|}
_ZN4absl12lts_2024011613hash_internal10HashSelect24UniquelyRepresentedProbe6InvokeINS1_15MixingHashStateEmEENSt3__19enable_ifIXsr23is_uniquely_representedIT0_EE5valueET_E4typeES9_RKS8_:
  927|     60|        -> absl::enable_if_t<is_uniquely_represented<T>::value, H> {
  928|     60|      return hash_internal::hash_bytes(std::move(state), value);
  929|     60|    }
_ZN4absl12lts_2024011613hash_internal10hash_bytesINS1_15MixingHashStateEmEET_S4_RKT0_:
  340|     60|H hash_bytes(H hash_state, const T& value) {
  341|     60|  const unsigned char* start = reinterpret_cast<const unsigned char*>(&value);
  342|     60|  return H::combine_contiguous(std::move(hash_state), start, sizeof(value));
  343|     60|}
_ZN4absl12lts_2024011613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineES3_:
  234|    120|  static H combine(H state) { return state; }

_ZN4absl12lts_2024011613hash_internal12LowLevelHashEPKvmmPKm:
   32|     12|                      const uint64_t salt[5]) {
   33|       |  // Prefetch the cacheline that data resides in.
   34|     12|  PrefetchToLocalCache(data);
   35|     12|  const uint8_t* ptr = static_cast<const uint8_t*>(data);
   36|     12|  uint64_t starting_length = static_cast<uint64_t>(len);
   37|     12|  uint64_t current_state = seed ^ salt[0];
   38|       |
   39|     12|  if (len > 64) {
  ------------------
  |  Branch (39:7): [True: 0, False: 12]
  ------------------
   40|       |    // If we have more than 64 bytes, we're going to handle chunks of 64
   41|       |    // bytes at a time. We're going to build up two separate hash states
   42|       |    // which we will then hash together.
   43|      0|    uint64_t duplicated_state = current_state;
   44|       |
   45|      0|    do {
   46|       |      // Always prefetch the next cacheline.
   47|      0|      PrefetchToLocalCache(ptr + ABSL_CACHELINE_SIZE);
  ------------------
  |  |   77|      0|#define ABSL_CACHELINE_SIZE 64
  ------------------
   48|       |
   49|      0|      uint64_t a = absl::base_internal::UnalignedLoad64(ptr);
   50|      0|      uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
   51|      0|      uint64_t c = absl::base_internal::UnalignedLoad64(ptr + 16);
   52|      0|      uint64_t d = absl::base_internal::UnalignedLoad64(ptr + 24);
   53|      0|      uint64_t e = absl::base_internal::UnalignedLoad64(ptr + 32);
   54|      0|      uint64_t f = absl::base_internal::UnalignedLoad64(ptr + 40);
   55|      0|      uint64_t g = absl::base_internal::UnalignedLoad64(ptr + 48);
   56|      0|      uint64_t h = absl::base_internal::UnalignedLoad64(ptr + 56);
   57|       |
   58|      0|      uint64_t cs0 = Mix(a ^ salt[1], b ^ current_state);
   59|      0|      uint64_t cs1 = Mix(c ^ salt[2], d ^ current_state);
   60|      0|      current_state = (cs0 ^ cs1);
   61|       |
   62|      0|      uint64_t ds0 = Mix(e ^ salt[3], f ^ duplicated_state);
   63|      0|      uint64_t ds1 = Mix(g ^ salt[4], h ^ duplicated_state);
   64|      0|      duplicated_state = (ds0 ^ ds1);
   65|       |
   66|      0|      ptr += 64;
   67|      0|      len -= 64;
   68|      0|    } while (len > 64);
  ------------------
  |  Branch (68:14): [True: 0, False: 0]
  ------------------
   69|       |
   70|      0|    current_state = current_state ^ duplicated_state;
   71|      0|  }
   72|       |
   73|       |  // We now have a data `ptr` with at most 64 bytes and the current state
   74|       |  // of the hashing state machine stored in current_state.
   75|     28|  while (len > 16) {
  ------------------
  |  Branch (75:10): [True: 16, False: 12]
  ------------------
   76|     16|    uint64_t a = absl::base_internal::UnalignedLoad64(ptr);
   77|     16|    uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
   78|       |
   79|     16|    current_state = Mix(a ^ salt[1], b ^ current_state);
   80|       |
   81|     16|    ptr += 16;
   82|     16|    len -= 16;
   83|     16|  }
   84|       |
   85|       |  // We now have a data `ptr` with at most 16 bytes.
   86|     12|  uint64_t a = 0;
   87|     12|  uint64_t b = 0;
   88|     12|  if (len > 8) {
  ------------------
  |  Branch (88:7): [True: 0, False: 12]
  ------------------
   89|       |    // When we have at least 9 and at most 16 bytes, set A to the first 64
   90|       |    // bits of the input and B to the last 64 bits of the input. Yes, they will
   91|       |    // overlap in the middle if we are working with less than the full 16
   92|       |    // bytes.
   93|      0|    a = absl::base_internal::UnalignedLoad64(ptr);
   94|      0|    b = absl::base_internal::UnalignedLoad64(ptr + len - 8);
   95|     12|  } else if (len > 3) {
  ------------------
  |  Branch (95:14): [True: 8, False: 4]
  ------------------
   96|       |    // If we have at least 4 and at most 8 bytes, set A to the first 32
   97|       |    // bits and B to the last 32 bits.
   98|      8|    a = absl::base_internal::UnalignedLoad32(ptr);
   99|      8|    b = absl::base_internal::UnalignedLoad32(ptr + len - 4);
  100|      8|  } else if (len > 0) {
  ------------------
  |  Branch (100:14): [True: 4, False: 0]
  ------------------
  101|       |    // If we have at least 1 and at most 3 bytes, read all of the provided
  102|       |    // bits into A, with some adjustments.
  103|      4|    a = static_cast<uint64_t>((ptr[0] << 16) | (ptr[len >> 1] << 8) |
  104|      4|                              ptr[len - 1]);
  105|      4|    b = 0;
  106|      4|  } else {
  107|      0|    a = 0;
  108|      0|    b = 0;
  109|      0|  }
  110|       |
  111|     12|  uint64_t w = Mix(a ^ salt[1], b ^ current_state);
  112|     12|  uint64_t z = salt[1] ^ starting_length;
  113|     12|  return Mix(w, z);
  114|     12|}
low_level_hash.cc:_ZN4absl12lts_2024011613hash_internalL3MixEmm:
   25|     40|static uint64_t Mix(uint64_t v0, uint64_t v1) {
   26|     40|  absl::uint128 p = v0;
   27|     40|  p *= v1;
   28|     40|  return absl::Uint128Low64(p) ^ absl::Uint128High64(p);
   29|     40|}

_ZN4absl12lts_202401164rotrImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueES4_E4typeES4_i:
   75|     26|    rotr(T x, int s) noexcept {
   76|     26|  return numeric_internal::RotateRight(x, s);
   77|     26|}
_ZN4absl12lts_2024011611countl_zeroImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  103|  24.8k|    countl_zero(T x) noexcept {
  104|  24.8k|  return numeric_internal::CountLeadingZeroes(x);
  105|  24.8k|}
_ZN4absl12lts_202401169bit_widthImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  160|  5.06k|    bit_width(T x) noexcept {
  161|  5.06k|  return std::numeric_limits<T>::digits - countl_zero(x);
  162|  5.06k|}
_ZN4absl12lts_2024011611countr_zeroIjEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  118|     15|    countr_zero(T x) noexcept {
  119|     15|  return numeric_internal::CountTrailingZeroes(x);
  120|     15|}
_ZN4absl12lts_2024011611countr_zeroItEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  118|     64|    countr_zero(T x) noexcept {
  119|     64|  return numeric_internal::CountTrailingZeroes(x);
  120|     64|}

_ZN4absl12lts_202401167uint128rSEi:
  613|  26.2k|inline uint128& uint128::operator>>=(int amount) {
  614|  26.2k|  *this = *this >> amount;
  615|  26.2k|  return *this;
  616|  26.2k|}
_ZN4absl12lts_202401167uint128pLES1_:
  618|  2.53k|inline uint128& uint128::operator+=(uint128 other) {
  619|  2.53k|  *this = *this + other;
  620|  2.53k|  return *this;
  621|  2.53k|}
_ZN4absl12lts_202401167uint128mLES1_:
  628|  12.8k|inline uint128& uint128::operator*=(uint128 other) {
  629|  12.8k|  *this = *this * other;
  630|  12.8k|  return *this;
  631|  12.8k|}
_ZN4absl12lts_2024011612Uint128Low64ENS0_7uint128E:
  643|  13.7k|constexpr uint64_t Uint128Low64(uint128 v) { return v.lo_; }
_ZN4absl12lts_2024011613Uint128High64ENS0_7uint128E:
  645|  53.5k|constexpr uint64_t Uint128High64(uint128 v) { return v.hi_; }
_ZNK4absl12lts_202401167uint128cvmEv:
  759|  16.3k|constexpr uint128::operator unsigned long() const {  // NOLINT(runtime/int)
  760|  16.3k|  return static_cast<unsigned long>(lo_);            // NOLINT(runtime/int)
  761|  16.3k|}
_ZNK4absl12lts_202401167uint128cvoEv:
  776|   269k|constexpr uint128::operator unsigned __int128() const {
  777|   269k|  return (static_cast<unsigned __int128>(hi_) << 64) + lo_;
  778|   269k|}
_ZN4absl12lts_20240116eqENS0_7uint128ES1_:
  798|  23.7k|constexpr bool operator==(uint128 lhs, uint128 rhs) {
  799|  23.7k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  800|  23.7k|  return static_cast<unsigned __int128>(lhs) ==
  801|  23.7k|         static_cast<unsigned __int128>(rhs);
  802|       |#else
  803|       |  return (Uint128Low64(lhs) == Uint128Low64(rhs) &&
  804|       |          Uint128High64(lhs) == Uint128High64(rhs));
  805|       |#endif
  806|  23.7k|}
_ZN4absl12lts_20240116ltENS0_7uint128ES1_:
  810|  14.3k|constexpr bool operator<(uint128 lhs, uint128 rhs) {
  811|  14.3k|#ifdef ABSL_HAVE_INTRINSIC_INT128
  812|  14.3k|  return static_cast<unsigned __int128>(lhs) <
  813|  14.3k|         static_cast<unsigned __int128>(rhs);
  814|       |#else
  815|       |  return (Uint128High64(lhs) == Uint128High64(rhs))
  816|       |             ? (Uint128Low64(lhs) < Uint128Low64(rhs))
  817|       |             : (Uint128High64(lhs) < Uint128High64(rhs));
  818|       |#endif
  819|  14.3k|}
_ZN4absl12lts_20240116gtENS0_7uint128ES1_:
  821|  14.3k|constexpr bool operator>(uint128 lhs, uint128 rhs) { return rhs < lhs; }
_ZN4absl12lts_20240116anENS0_7uint128ES1_:
  871|  16.2k|constexpr inline uint128 operator&(uint128 lhs, uint128 rhs) {
  872|  16.2k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  873|  16.2k|  return static_cast<unsigned __int128>(lhs) &
  874|  16.2k|         static_cast<unsigned __int128>(rhs);
  875|       |#else
  876|       |  return MakeUint128(Uint128High64(lhs) & Uint128High64(rhs),
  877|       |                     Uint128Low64(lhs) & Uint128Low64(rhs));
  878|       |#endif
  879|  16.2k|}
_ZN4absl12lts_20240116lsENS0_7uint128Ei:
  908|  30.7k|constexpr uint128 operator<<(uint128 lhs, int amount) {
  909|  30.7k|#ifdef ABSL_HAVE_INTRINSIC_INT128
  910|  30.7k|  return static_cast<unsigned __int128>(lhs) << amount;
  911|       |#else
  912|       |  // uint64_t shifts of >= 64 are undefined, so we will need some
  913|       |  // special-casing.
  914|       |  return amount >= 64  ? MakeUint128(Uint128Low64(lhs) << (amount - 64), 0)
  915|       |         : amount == 0 ? lhs
  916|       |                       : MakeUint128((Uint128High64(lhs) << amount) |
  917|       |                                         (Uint128Low64(lhs) >> (64 - amount)),
  918|       |                                     Uint128Low64(lhs) << amount);
  919|       |#endif
  920|  30.7k|}
_ZN4absl12lts_20240116rsENS0_7uint128Ei:
  922|  26.2k|constexpr uint128 operator>>(uint128 lhs, int amount) {
  923|  26.2k|#ifdef ABSL_HAVE_INTRINSIC_INT128
  924|  26.2k|  return static_cast<unsigned __int128>(lhs) >> amount;
  925|       |#else
  926|       |  // uint64_t shifts of >= 64 are undefined, so we will need some
  927|       |  // special-casing.
  928|       |  return amount >= 64  ? MakeUint128(0, Uint128High64(lhs) >> (amount - 64))
  929|       |         : amount == 0 ? lhs
  930|       |                       : MakeUint128(Uint128High64(lhs) >> amount,
  931|       |                                     (Uint128Low64(lhs) >> amount) |
  932|       |                                         (Uint128High64(lhs) << (64 - amount)));
  933|       |#endif
  934|  26.2k|}
_ZN4absl12lts_20240116plENS0_7uint128ES1_:
  947|  4.66k|constexpr uint128 operator+(uint128 lhs, uint128 rhs) {
  948|  4.66k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  949|  4.66k|  return static_cast<unsigned __int128>(lhs) +
  950|  4.66k|         static_cast<unsigned __int128>(rhs);
  951|       |#else
  952|       |  return int128_internal::AddResult(
  953|       |      MakeUint128(Uint128High64(lhs) + Uint128High64(rhs),
  954|       |                  Uint128Low64(lhs) + Uint128Low64(rhs)),
  955|       |      lhs);
  956|       |#endif
  957|  4.66k|}
_ZN4absl12lts_20240116miENS0_7uint128ES1_:
  970|  24.0k|constexpr uint128 operator-(uint128 lhs, uint128 rhs) {
  971|  24.0k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  972|  24.0k|  return static_cast<unsigned __int128>(lhs) -
  973|  24.0k|         static_cast<unsigned __int128>(rhs);
  974|       |#else
  975|       |  return int128_internal::SubstructResult(
  976|       |      MakeUint128(Uint128High64(lhs) - Uint128High64(rhs),
  977|       |                  Uint128Low64(lhs) - Uint128Low64(rhs)),
  978|       |      lhs, rhs);
  979|       |#endif
  980|  24.0k|}
_ZN4absl12lts_20240116mlENS0_7uint128ES1_:
  982|  22.9k|inline uint128 operator*(uint128 lhs, uint128 rhs) {
  983|  22.9k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  984|       |  // TODO(strel) Remove once alignment issues are resolved and unsigned __int128
  985|       |  // can be used for uint128 storage.
  986|  22.9k|  return static_cast<unsigned __int128>(lhs) *
  987|  22.9k|         static_cast<unsigned __int128>(rhs);
  988|       |#elif defined(_MSC_VER) && defined(_M_X64) && !defined(_M_ARM64EC)
  989|       |  uint64_t carry;
  990|       |  uint64_t low = _umul128(Uint128Low64(lhs), Uint128Low64(rhs), &carry);
  991|       |  return MakeUint128(Uint128Low64(lhs) * Uint128High64(rhs) +
  992|       |                         Uint128High64(lhs) * Uint128Low64(rhs) + carry,
  993|       |                     low);
  994|       |#else   // ABSL_HAVE_INTRINSIC128
  995|       |  uint64_t a32 = Uint128Low64(lhs) >> 32;
  996|       |  uint64_t a00 = Uint128Low64(lhs) & 0xffffffff;
  997|       |  uint64_t b32 = Uint128Low64(rhs) >> 32;
  998|       |  uint64_t b00 = Uint128Low64(rhs) & 0xffffffff;
  999|       |  uint128 result =
 1000|       |      MakeUint128(Uint128High64(lhs) * Uint128Low64(rhs) +
 1001|       |                      Uint128Low64(lhs) * Uint128High64(rhs) + a32 * b32,
 1002|       |                  a00 * b00);
 1003|       |  result += uint128(a32 * b00) << 32;
 1004|       |  result += uint128(a00 * b32) << 32;
 1005|       |  return result;
 1006|       |#endif  // ABSL_HAVE_INTRINSIC128
 1007|  22.9k|}
_ZN4absl12lts_202401167uint128ppEv:
 1035|    628|inline uint128& uint128::operator++() {
 1036|    628|  *this += 1;
 1037|    628|  return *this;
 1038|    628|}
_ZN4absl12lts_202401167uint128C2Eo:
  674|   124k|    : lo_{static_cast<uint64_t>(v & ~uint64_t{0})},
  675|   124k|      hi_{static_cast<uint64_t>(v >> 64)} {}
_ZN4absl12lts_202401167uint128C2Em:
  665|  51.6k|constexpr uint128::uint128(unsigned long v) : lo_{v}, hi_{0} {}
_ZN4absl12lts_202401167uint128C2Ei:
  654|  59.2k|    : lo_{static_cast<uint64_t>(v)},
  655|  59.2k|      hi_{v < 0 ? (std::numeric_limits<uint64_t>::max)() : 0} {}
  ------------------
  |  Branch (655:11): [True: 0, False: 59.2k]
  ------------------

_ZN4absl12lts_2024011616numeric_internal20CountLeadingZeroes64Em:
  180|  24.8k|CountLeadingZeroes64(uint64_t x) {
  181|  24.8k|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_clzll)
  182|       |  // Use __builtin_clzll, which uses the following instructions:
  183|       |  //  x86: bsr, lzcnt
  184|       |  //  ARM64: clz
  185|       |  //  PPC: cntlzd
  186|  24.8k|  static_assert(sizeof(unsigned long long) == sizeof(x),  // NOLINT(runtime/int)
  187|  24.8k|                "__builtin_clzll does not take 64-bit arg");
  188|       |
  189|       |  // Handle 0 as a special case because __builtin_clzll(0) is undefined.
  190|  24.8k|  return x == 0 ? 64 : __builtin_clzll(x);
  ------------------
  |  Branch (190:10): [True: 0, False: 24.8k]
  ------------------
  191|       |#elif defined(_MSC_VER) && !defined(__clang__) && \
  192|       |    (defined(_M_X64) || defined(_M_ARM64))
  193|       |  // MSVC does not have __buitin_clzll. Use _BitScanReverse64.
  194|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  195|       |  if (_BitScanReverse64(&result, x)) {
  196|       |    return 63 - result;
  197|       |  }
  198|       |  return 64;
  199|       |#elif defined(_MSC_VER) && !defined(__clang__)
  200|       |  // MSVC does not have __buitin_clzll. Compose two calls to _BitScanReverse
  201|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  202|       |  if ((x >> 32) &&
  203|       |      _BitScanReverse(&result, static_cast<unsigned long>(x >> 32))) {
  204|       |    return 31 - result;
  205|       |  }
  206|       |  if (_BitScanReverse(&result, static_cast<unsigned long>(x))) {
  207|       |    return 63 - result;
  208|       |  }
  209|       |  return 64;
  210|       |#else
  211|       |  int zeroes = 60;
  212|       |  if (x >> 32) {
  213|       |    zeroes -= 32;
  214|       |    x >>= 32;
  215|       |  }
  216|       |  if (x >> 16) {
  217|       |    zeroes -= 16;
  218|       |    x >>= 16;
  219|       |  }
  220|       |  if (x >> 8) {
  221|       |    zeroes -= 8;
  222|       |    x >>= 8;
  223|       |  }
  224|       |  if (x >> 4) {
  225|       |    zeroes -= 4;
  226|       |    x >>= 4;
  227|       |  }
  228|       |  return "\4\3\2\2\1\1\1\1\0\0\0\0\0\0\0"[x] + zeroes;
  229|       |#endif
  230|  24.8k|}
_ZN4absl12lts_2024011616numeric_internal28CountTrailingZeroesNonzero32Ej:
  251|     15|CountTrailingZeroesNonzero32(uint32_t x) {
  252|     15|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_ctz)
  253|     15|  static_assert(sizeof(unsigned int) == sizeof(x),
  254|     15|                "__builtin_ctz does not take 32-bit arg");
  255|     15|  return __builtin_ctz(x);
  256|       |#elif defined(_MSC_VER) && !defined(__clang__)
  257|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  258|       |  _BitScanForward(&result, x);
  259|       |  return result;
  260|       |#else
  261|       |  int c = 31;
  262|       |  x &= ~x + 1;
  263|       |  if (x & 0x0000FFFF) c -= 16;
  264|       |  if (x & 0x00FF00FF) c -= 8;
  265|       |  if (x & 0x0F0F0F0F) c -= 4;
  266|       |  if (x & 0x33333333) c -= 2;
  267|       |  if (x & 0x55555555) c -= 1;
  268|       |  return c;
  269|       |#endif
  270|     15|}
_ZN4absl12lts_2024011616numeric_internal28CountTrailingZeroesNonzero16Et:
  305|     64|CountTrailingZeroesNonzero16(uint16_t x) {
  306|     64|#if ABSL_HAVE_BUILTIN(__builtin_ctzs)
  307|     64|  static_assert(sizeof(unsigned short) == sizeof(x),  // NOLINT(runtime/int)
  308|     64|                "__builtin_ctzs does not take 16-bit arg");
  309|     64|  return __builtin_ctzs(x);
  310|       |#else
  311|       |  return CountTrailingZeroesNonzero32(x);
  312|       |#endif
  313|     64|}
_ZN4absl12lts_2024011616numeric_internal11RotateRightImEET_S3_i:
   75|     26|    T x, int s) noexcept {
   76|     26|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
   77|     26|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
   78|     26|                "T must have a power-of-2 size");
   79|       |
   80|     26|  return static_cast<T>(x >> (s & (std::numeric_limits<T>::digits - 1))) |
   81|     26|         static_cast<T>(x << ((-s) & (std::numeric_limits<T>::digits - 1)));
   82|     26|}
_ZN4absl12lts_2024011616numeric_internal18CountLeadingZeroesImEEiT_:
  234|  24.8k|CountLeadingZeroes(T x) {
  235|  24.8k|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  236|  24.8k|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  237|  24.8k|                "T must have a power-of-2 size");
  238|  24.8k|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  239|  24.8k|  return sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (239:10): [Folded, False: 24.8k]
  ------------------
  240|  24.8k|             ? CountLeadingZeroes16(static_cast<uint16_t>(x)) -
  241|      0|                   (std::numeric_limits<uint16_t>::digits -
  242|      0|                    std::numeric_limits<T>::digits)
  243|  24.8k|             : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (243:17): [Folded, False: 24.8k]
  ------------------
  244|  24.8k|                    ? CountLeadingZeroes32(static_cast<uint32_t>(x)) -
  245|      0|                          (std::numeric_limits<uint32_t>::digits -
  246|      0|                           std::numeric_limits<T>::digits)
  247|  24.8k|                    : CountLeadingZeroes64(x));
  248|  24.8k|}
_ZN4absl12lts_2024011616numeric_internal19CountTrailingZeroesIjEEiT_:
  317|     15|CountTrailingZeroes(T x) noexcept {
  318|     15|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  319|     15|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  320|     15|                "T must have a power-of-2 size");
  321|     15|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  322|     15|  return x == 0 ? std::numeric_limits<T>::digits
  ------------------
  |  Branch (322:10): [True: 0, False: 15]
  ------------------
  323|     15|                : (sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (323:20): [Folded, False: 15]
  ------------------
  324|     15|                       ? CountTrailingZeroesNonzero16(static_cast<uint16_t>(x))
  325|     15|                       : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (325:27): [True: 15, Folded]
  ------------------
  326|     15|                              ? CountTrailingZeroesNonzero32(
  327|     15|                                    static_cast<uint32_t>(x))
  328|     15|                              : CountTrailingZeroesNonzero64(x)));
  329|     15|}
_ZN4absl12lts_2024011616numeric_internal19CountTrailingZeroesItEEiT_:
  317|     64|CountTrailingZeroes(T x) noexcept {
  318|     64|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  319|     64|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  320|     64|                "T must have a power-of-2 size");
  321|     64|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  322|     64|  return x == 0 ? std::numeric_limits<T>::digits
  ------------------
  |  Branch (322:10): [True: 0, False: 64]
  ------------------
  323|     64|                : (sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (323:20): [True: 64, Folded]
  ------------------
  324|     64|                       ? CountTrailingZeroesNonzero16(static_cast<uint16_t>(x))
  325|     64|                       : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (325:27): [True: 0, Folded]
  ------------------
  326|      0|                              ? CountTrailingZeroesNonzero32(
  327|      0|                                    static_cast<uint32_t>(x))
  328|      0|                              : CountTrailingZeroesNonzero64(x)));
  329|     64|}

_ZN4absl12lts_2024011615random_internal24InitDiscreteDistributionEPNSt3__16vectorIdNS2_9allocatorIdEEEE:
   24|      2|    std::vector<double>* probabilities) {
   25|       |  // The empty-case should already be handled by the constructor.
   26|      2|  assert(probabilities);
   27|      2|  assert(!probabilities->empty());
   28|       |
   29|       |  // Step 1. Normalize the input probabilities to 1.0.
   30|      2|  double sum = std::accumulate(std::begin(*probabilities),
   31|      2|                               std::end(*probabilities), 0.0);
   32|      2|  if (std::fabs(sum - 1.0) > 1e-6) {
  ------------------
  |  Branch (32:7): [True: 2, False: 0]
  ------------------
   33|       |    // Scale `probabilities` only when the sum is too far from 1.0.  Scaling
   34|       |    // unconditionally will alter the probabilities slightly.
   35|      2|    for (double& item : *probabilities) {
  ------------------
  |  Branch (35:23): [True: 2, False: 2]
  ------------------
   36|      2|      item = item / sum;
   37|      2|    }
   38|      2|  }
   39|       |
   40|       |  // Step 2. At this point `probabilities` is set to the conditional
   41|       |  // probabilities of each element which sum to 1.0, to within reasonable error.
   42|       |  // These values are used to construct the proportional probability tables for
   43|       |  // the selection phases of Walker's Aliasing algorithm.
   44|       |  //
   45|       |  // To construct the table, pick an element which is under-full (i.e., an
   46|       |  // element for which `(*probabilities)[i] < 1.0/n`), and pair it with an
   47|       |  // element which is over-full (i.e., an element for which
   48|       |  // `(*probabilities)[i] > 1.0/n`). The smaller value can always be retired.
   49|       |  // The larger may still be greater than 1.0/n, or may now be less than 1.0/n,
   50|       |  // and put back onto the appropriate collection.
   51|      2|  const size_t n = probabilities->size();
   52|      2|  std::vector<std::pair<double, size_t>> q;
   53|      2|  q.reserve(n);
   54|       |
   55|      2|  std::vector<size_t> over;
   56|      2|  std::vector<size_t> under;
   57|      2|  size_t idx = 0;
   58|      2|  for (const double item : *probabilities) {
  ------------------
  |  Branch (58:26): [True: 2, False: 2]
  ------------------
   59|      2|    assert(item >= 0);
   60|      2|    const double v = item * n;
   61|      2|    q.emplace_back(v, 0);
   62|      2|    if (v < 1.0) {
  ------------------
  |  Branch (62:9): [True: 0, False: 2]
  ------------------
   63|      0|      under.push_back(idx++);
   64|      2|    } else {
   65|      2|      over.push_back(idx++);
   66|      2|    }
   67|      2|  }
   68|      2|  while (!over.empty() && !under.empty()) {
  ------------------
  |  Branch (68:10): [True: 2, False: 0]
  |  Branch (68:27): [True: 0, False: 2]
  ------------------
   69|      0|    auto lo = under.back();
   70|      0|    under.pop_back();
   71|      0|    auto hi = over.back();
   72|      0|    over.pop_back();
   73|       |
   74|      0|    q[lo].second = hi;
   75|      0|    const double r = q[hi].first - (1.0 - q[lo].first);
   76|      0|    q[hi].first = r;
   77|      0|    if (r < 1.0) {
  ------------------
  |  Branch (77:9): [True: 0, False: 0]
  ------------------
   78|      0|      under.push_back(hi);
   79|      0|    } else {
   80|      0|      over.push_back(hi);
   81|      0|    }
   82|      0|  }
   83|       |
   84|       |  // Due to rounding errors, there may be un-paired elements in either
   85|       |  // collection; these should all be values near 1.0.  For these values, set `q`
   86|       |  // to 1.0 and set the alternate to the identity.
   87|      2|  for (auto i : over) {
  ------------------
  |  Branch (87:15): [True: 2, False: 2]
  ------------------
   88|      2|    q[i] = {1.0, i};
   89|      2|  }
   90|      2|  for (auto i : under) {
  ------------------
  |  Branch (90:15): [True: 0, False: 2]
  ------------------
   91|      0|    q[i] = {1.0, i};
   92|      0|  }
   93|      2|  return q;
   94|      2|}

_ZN4absl12lts_2024011621discrete_distributionIiEC2Ev:
  111|      2|  discrete_distribution() : param_() {}
_ZN4absl12lts_2024011621discrete_distributionIiE10param_typeC2Ev:
   60|      2|    param_type() { init(); }
_ZN4absl12lts_2024011621discrete_distributionIiE10param_type4initEv:
  183|      4|void discrete_distribution<IntType>::param_type::init() {
  184|      4|  if (p_.empty()) {
  ------------------
  |  Branch (184:7): [True: 2, False: 2]
  ------------------
  185|      2|    p_.push_back(1.0);
  186|      2|    q_.emplace_back(1.0, 0);
  187|      2|  } else {
  188|       |    assert(n() <= (std::numeric_limits<IntType>::max)());
  189|      2|    q_ = random_internal::InitDiscreteDistribution(&p_);
  190|      2|  }
  191|      4|}
_ZN4absl12lts_2024011621discrete_distributionIiEC2INSt3__111__wrap_iterIPdEEEET_S8_:
  117|      2|      : param_(begin, end) {}
_ZN4absl12lts_2024011621discrete_distributionIiE10param_typeC2INSt3__111__wrap_iterIPdEEEET_S9_:
   64|      2|        : p_(begin, end) {
   65|      2|      init();
   66|      2|    }

_ZN4absl12lts_202401167UniformIjRNS0_15random_internal17NonsecureURBGBaseINS2_13randen_engineImEENS2_17RandenPoolSeedSeqEEEEENSt3__19enable_ifIXntsr3std9is_signedIT_EE5valueESB_E4typeEOT0_:
  212|     16|Uniform(URBG&& urbg) {  // NOLINT(runtime/references)
  213|     16|  using gen_t = absl::decay_t<URBG>;
  214|     16|  using distribution_t = random_internal::UniformDistributionWrapper<R>;
  215|       |
  216|     16|  return random_internal::DistributionCaller<gen_t>::template Call<
  217|     16|      distribution_t>(&urbg);
  218|     16|}

_ZN4absl12lts_2024011615random_internal18DistributionCallerINS1_17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEEE4CallINS1_26UniformDistributionWrapperIjEEJEEENT_11result_typeEPS7_DpOT0_:
   85|     16|  static typename DistrT::result_type Call(URBG* urbg, Args&&... args) {
   86|     16|    return Impl<DistrT, Args...>(HasInvokeMock{}, urbg,
   87|     16|                                 std::forward<Args>(args)...);
   88|     16|  }
_ZN4absl12lts_2024011615random_internal18DistributionCallerINS1_17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEEE4ImplINS1_26UniformDistributionWrapperIjEEJEEENT_11result_typeENSt3__117integral_constantIbLb0EEEPS7_DpOT0_:
   59|     16|                                           Args&&... args) {
   60|     16|    DistrT dist(std::forward<Args>(args)...);
   61|     16|    return dist(*urbg);
   62|     16|  }

_ZN4absl12lts_2024011615random_internal15FastUniformBitsIjEclINS1_17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEEEEjRT_:
  122|     16|FastUniformBits<UIntType>::operator()(URBG& g) {  // NOLINT(runtime/references)
  123|       |  // kRangeMask is the mask used when sampling variates from the URBG when the
  124|       |  // width of the URBG range is not a power of 2.
  125|       |  // Y = (2 ^ kRange) - 1
  126|     16|  static_assert((URBG::max)() > (URBG::min)(),
  127|     16|                "URBG::max and URBG::min may not be equal.");
  128|       |
  129|     16|  using tag = absl::conditional_t<IsPowerOfTwoOrZero(RangeSize<URBG>()),
  130|     16|                                  SimplifiedLoopTag, RejectionLoopTag>;
  131|     16|  return Generate(g, tag{});
  132|     16|}
_ZN4absl12lts_2024011615random_internal15FastUniformBitsIjE8GenerateINS1_17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEEEEjRT_NS1_17SimplifiedLoopTagE:
  138|     16|                                    SimplifiedLoopTag) {
  139|       |  // The simplified version of FastUniformBits works only on URBGs that have
  140|       |  // a range that is a power of 2. In this case we simply loop and shift without
  141|       |  // attempting to balance the bits across calls.
  142|     16|  static_assert(IsPowerOfTwoOrZero(RangeSize<URBG>()),
  143|     16|                "incorrect Generate tag for URBG instance");
  144|       |
  145|     16|  static constexpr size_t kResultBits =
  146|     16|      std::numeric_limits<result_type>::digits;
  147|     16|  static constexpr size_t kUrbgBits = NumBits<URBG>();
  148|     16|  static constexpr size_t kIters =
  149|     16|      (kResultBits / kUrbgBits) + (kResultBits % kUrbgBits != 0);
  150|     16|  static constexpr size_t kShift = (kIters == 1) ? 0 : kUrbgBits;
  ------------------
  |  Branch (150:36): [True: 0, Folded]
  ------------------
  151|     16|  static constexpr auto kMin = (URBG::min)();
  152|       |
  153|     16|  result_type r = static_cast<result_type>(g() - kMin);
  154|     16|  for (size_t n = 1; n < kIters; ++n) {
  ------------------
  |  Branch (154:22): [True: 0, False: 16]
  ------------------
  155|      0|    r = static_cast<result_type>(r << kShift) +
  156|      0|        static_cast<result_type>(g() - kMin);
  157|      0|  }
  158|     16|  return r;
  159|     16|}

_ZN4absl12lts_2024011615random_internal17RandenPoolSeedSeq4sizeEv:
   67|      2|  size_t size() { return 0; }
_ZN4absl12lts_2024011615random_internal17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEC2Ev:
  101|      2|  NonsecureURBGBase() : urbg_(ConstructURBG()) {}
_ZN4absl12lts_2024011615random_internal17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEE13ConstructURBGEv:
  142|      2|  static URBG ConstructURBG() {
  143|      2|    Seeder seeder;
  144|      2|    return URBG(seeder);
  145|      2|  }
_ZN4absl12lts_2024011615random_internal17RandenPoolSeedSeq8generateIPjEEvT_S5_:
   73|      2|  void generate(RandomAccessIterator begin, RandomAccessIterator end) {
   74|       |    // RandomAccessIterator must be assignable from uint32_t
   75|      2|    if (begin != end) {
  ------------------
  |  Branch (75:9): [True: 2, False: 0]
  ------------------
   76|      2|      using U = typename std::iterator_traits<RandomAccessIterator>::value_type;
   77|       |      // ContiguousTag indicates the common case of a known contiguous buffer,
   78|       |      // which allows directly filling the buffer. In C++20,
   79|       |      // std::contiguous_iterator_tag provides a mechanism for testing this
   80|       |      // capability, however until Abseil's support requirements allow us to
   81|       |      // assume C++20, limit checks to a few common cases.
   82|      2|      using TagType = absl::conditional_t<
   83|      2|          (std::is_pointer<RandomAccessIterator>::value ||
   84|      2|           std::is_same<RandomAccessIterator,
   85|      2|                        typename std::vector<U>::iterator>::value),
   86|      2|          ContiguousTag, BufferTag>;
   87|       |
   88|      2|      generate_impl(TagType{}, begin, end);
   89|      2|    }
   90|      2|  }
_ZN4absl12lts_2024011615random_internal17RandenPoolSeedSeq13generate_implIPjEEvNS2_13ContiguousTagET_S6_:
   46|      2|  void generate_impl(ContiguousTag, Contiguous begin, Contiguous end) {
   47|      2|    const size_t n = static_cast<size_t>(std::distance(begin, end));
   48|      2|    auto* a = &(*begin);
   49|      2|    RandenPool<uint8_t>::Fill(
   50|      2|        absl::MakeSpan(reinterpret_cast<uint8_t*>(a), sizeof(*a) * n));
   51|      2|  }
_ZN4absl12lts_2024011615random_internal17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEclEv:
  126|     16|  result_type operator()() { return urbg_(); }

_ZN4absl12lts_2024011615random_internal10RandenPoolIhE4FillENS0_4SpanIhEE:
  240|      2|void RandenPool<T>::Fill(absl::Span<result_type> data) {
  241|      2|  auto* pool = GetPoolForCurrentThread();
  242|      2|  pool->Fill(reinterpret_cast<uint8_t*>(data.data()),
  243|      2|             data.size() * sizeof(result_type));
  244|      2|}
pool_urbg.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_115RandenPoolEntry11MaybeRefillEv:
   69|      2|  inline void MaybeRefill() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) {
   70|      2|    if (next_ >= kState) {
  ------------------
  |  Branch (70:9): [True: 2, False: 0]
  ------------------
   71|      2|      next_ = kCapacity;
   72|      2|      impl_.Generate(state_);
   73|      2|    }
   74|      2|  }
pool_urbg.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_115RandenPoolEntry4FillEPhm:
  120|      2|void RandenPoolEntry::Fill(uint8_t* out, size_t bytes) {
  121|      2|  SpinLockHolder l(&mu_);
  122|      4|  while (bytes > 0) {
  ------------------
  |  Branch (122:10): [True: 2, False: 2]
  ------------------
  123|      2|    MaybeRefill();
  124|      2|    size_t remaining = (kState - next_) * sizeof(state_[0]);
  125|      2|    size_t to_copy = std::min(bytes, remaining);
  126|      2|    std::memcpy(out, &state_[next_], to_copy);
  127|      2|    out += to_copy;
  128|      2|    bytes -= to_copy;
  129|      2|    next_ += (to_copy + sizeof(state_[0]) - 1) / sizeof(state_[0]);
  130|      2|  }
  131|      2|}
pool_urbg.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_123GetPoolForCurrentThreadEv:
  226|      2|RandenPoolEntry* GetPoolForCurrentThread() {
  227|      2|  absl::call_once(pool_once, InitPoolURBG);
  228|      2|  return shared_pools[GetPoolID()];
  229|      2|}
pool_urbg.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_112InitPoolURBGEv:
  209|      2|void InitPoolURBG() {
  210|      2|  static constexpr size_t kSeedSize =
  211|      2|      RandenTraits::kStateBytes / sizeof(uint32_t);
  212|       |  // Read the seed data from OS entropy once.
  213|      2|  uint32_t seed_material[kPoolSize * kSeedSize];
  214|      2|  if (!random_internal::ReadSeedMaterialFromOSEntropy(
  ------------------
  |  Branch (214:7): [True: 0, False: 2]
  ------------------
  215|      2|          absl::MakeSpan(seed_material))) {
  216|      0|    random_internal::ThrowSeedGenException();
  217|      0|  }
  218|     18|  for (size_t i = 0; i < kPoolSize; i++) {
  ------------------
  |  Branch (218:22): [True: 16, False: 2]
  ------------------
  219|     16|    shared_pools[i] = PoolAlignedAlloc();
  220|     16|    shared_pools[i]->Init(
  221|     16|        absl::MakeSpan(&seed_material[i * kSeedSize], kSeedSize));
  222|     16|  }
  223|      2|}
pool_urbg.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_116PoolAlignedAllocEv:
  190|     16|RandenPoolEntry* PoolAlignedAlloc() {
  191|     16|  constexpr size_t kAlignment =
  192|     16|      ABSL_CACHELINE_SIZE > 32 ? ABSL_CACHELINE_SIZE : 32;
  ------------------
  |  |   77|     16|#define ABSL_CACHELINE_SIZE 64
  ------------------
                    ABSL_CACHELINE_SIZE > 32 ? ABSL_CACHELINE_SIZE : 32;
  ------------------
  |  |   77|      0|#define ABSL_CACHELINE_SIZE 64
  ------------------
  |  Branch (192:7): [True: 0, Folded]
  ------------------
  193|       |
  194|       |  // Not all the platforms that we build for have std::aligned_alloc, however
  195|       |  // since we never free these objects, we can over allocate and munge the
  196|       |  // pointers to the correct alignment.
  197|     16|  uintptr_t x = reinterpret_cast<uintptr_t>(
  198|     16|      new char[sizeof(RandenPoolEntry) + kAlignment]);
  199|     16|  auto y = x % kAlignment;
  200|     16|  void* aligned = reinterpret_cast<void*>(y == 0 ? x : (x + kAlignment - y));
  ------------------
  |  Branch (200:43): [True: 6, False: 10]
  ------------------
  201|     16|  return new (aligned) RandenPoolEntry();
  202|     16|}
pool_urbg.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_115RandenPoolEntry4InitENS0_4SpanIKjEE:
   56|     16|  void Init(absl::Span<const uint32_t> data) {
   57|     16|    SpinLockHolder l(&mu_);  // Always uncontested.
   58|     16|    std::copy(data.begin(), data.end(), std::begin(state_));
   59|     16|    next_ = kState;
   60|     16|  }
pool_urbg.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_19GetPoolIDEv:
  150|      2|size_t GetPoolID() {
  151|      2|  static_assert(kPoolSize >= 1,
  152|      2|                "At least one urbg instance is required for PoolURBG");
  153|       |
  154|      2|  ABSL_CONST_INIT static std::atomic<uint64_t> sequence{0};
  ------------------
  |  |  745|      2|#define ABSL_CONST_INIT [[clang::require_constant_initialization]]
  ------------------
  155|       |
  156|      2|#ifdef ABSL_HAVE_THREAD_LOCAL
  157|      2|  static thread_local size_t my_pool_id = kPoolSize;
  158|      2|  if (ABSL_PREDICT_FALSE(my_pool_id == kPoolSize)) {
  ------------------
  |  |  178|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 2, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 2]
  |  |  |  Branch (178:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  159|      2|    my_pool_id = (sequence++ % kPoolSize);
  160|      2|  }
  161|      2|  return my_pool_id;
  162|       |#else
  163|       |  static pthread_key_t tid_key = [] {
  164|       |    pthread_key_t tmp_key;
  165|       |    int err = pthread_key_create(&tmp_key, nullptr);
  166|       |    if (err) {
  167|       |      ABSL_RAW_LOG(FATAL, "pthread_key_create failed with %d", err);
  168|       |    }
  169|       |    return tmp_key;
  170|       |  }();
  171|       |
  172|       |  // Store the value in the pthread_{get/set}specific. However an uninitialized
  173|       |  // value is 0, so add +1 to distinguish from the null value.
  174|       |  uintptr_t my_pool_id =
  175|       |      reinterpret_cast<uintptr_t>(pthread_getspecific(tid_key));
  176|       |  if (ABSL_PREDICT_FALSE(my_pool_id == 0)) {
  177|       |    // No allocated ID, allocate the next value, cache it, and return.
  178|       |    my_pool_id = (sequence++ % kPoolSize) + 1;
  179|       |    int err = pthread_setspecific(tid_key, reinterpret_cast<void*>(my_pool_id));
  180|       |    if (err) {
  181|       |      ABSL_RAW_LOG(FATAL, "pthread_setspecific failed with %d", err);
  182|       |    }
  183|       |  }
  184|       |  return my_pool_id - 1;
  185|       |#endif
  186|      2|}

_ZN4absl12lts_2024011615random_internal6RandenC2Ev:
   81|     18|Randen::Randen() {
   82|     18|  auto tmp = GetRandenState();
   83|     18|  keys_ = tmp.keys;
   84|     18|#if ABSL_RANDOM_INTERNAL_AES_DISPATCH
   85|     18|  has_crypto_ = tmp.has_crypto;
   86|     18|#endif
   87|     18|}
randen.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_114GetRandenStateEv:
   53|     18|RandenState GetRandenState() {
   54|     18|  static const RandenState state = []() {
   55|     18|    RandenState tmp;
   56|     18|#if ABSL_RANDOM_INTERNAL_AES_DISPATCH
   57|       |    // HW AES Dispatch.
   58|     18|    if (HasRandenHwAesImplementation() && CPUSupportsRandenHwAes()) {
   59|     18|      tmp.has_crypto = true;
   60|     18|      tmp.keys = RandenHwAes::GetKeys();
   61|     18|    } else {
   62|     18|      tmp.has_crypto = false;
   63|     18|      tmp.keys = RandenSlow::GetKeys();
   64|     18|    }
   65|       |#elif ABSL_HAVE_ACCELERATED_AES
   66|       |    // HW AES is enabled.
   67|       |    tmp.has_crypto = true;
   68|       |    tmp.keys = RandenHwAes::GetKeys();
   69|       |#else
   70|       |    // HW AES is disabled.
   71|       |    tmp.has_crypto = false;
   72|       |    tmp.keys = RandenSlow::GetKeys();
   73|       |#endif
   74|     18|    return tmp;
   75|     18|  }();
   76|     18|  return state;
   77|     18|}
randen.cc:_ZZN4absl12lts_2024011615random_internal12_GLOBAL__N_114GetRandenStateEvENK3$_0clEv:
   54|      2|  static const RandenState state = []() {
   55|      2|    RandenState tmp;
   56|      2|#if ABSL_RANDOM_INTERNAL_AES_DISPATCH
   57|       |    // HW AES Dispatch.
   58|      2|    if (HasRandenHwAesImplementation() && CPUSupportsRandenHwAes()) {
  ------------------
  |  Branch (58:9): [True: 2, False: 0]
  |  Branch (58:43): [True: 2, False: 0]
  ------------------
   59|      2|      tmp.has_crypto = true;
   60|      2|      tmp.keys = RandenHwAes::GetKeys();
   61|      2|    } else {
   62|      0|      tmp.has_crypto = false;
   63|      0|      tmp.keys = RandenSlow::GetKeys();
   64|      0|    }
   65|       |#elif ABSL_HAVE_ACCELERATED_AES
   66|       |    // HW AES is enabled.
   67|       |    tmp.has_crypto = true;
   68|       |    tmp.keys = RandenHwAes::GetKeys();
   69|       |#else
   70|       |    // HW AES is disabled.
   71|       |    tmp.has_crypto = false;
   72|       |    tmp.keys = RandenSlow::GetKeys();
   73|       |#endif
   74|      2|    return tmp;
   75|      2|  }();

_ZNK4absl12lts_2024011615random_internal6Randen8GenerateEPv:
   47|      4|  inline void Generate(void* state) const {
   48|      4|#if ABSL_RANDOM_INTERNAL_AES_DISPATCH
   49|       |    // HW AES Dispatch.
   50|      4|    if (has_crypto_) {
  ------------------
  |  Branch (50:9): [True: 4, False: 0]
  ------------------
   51|      4|      RandenHwAes::Generate(keys_, state);
   52|      4|    } else {
   53|      0|      RandenSlow::Generate(keys_, state);
   54|      0|    }
   55|       |#elif ABSL_HAVE_ACCELERATED_AES
   56|       |    // HW AES is enabled.
   57|       |    RandenHwAes::Generate(keys_, state);
   58|       |#else
   59|       |    // HW AES is disabled.
   60|       |    RandenSlow::Generate(keys_, state);
   61|       |#endif
   62|      4|  }
_ZNK4absl12lts_2024011615random_internal6Randen6AbsorbEPKvPv:
   68|      2|  inline void Absorb(const void* seed, void* state) const {
   69|      2|#if ABSL_RANDOM_INTERNAL_AES_DISPATCH
   70|       |    // HW AES Dispatch.
   71|      2|    if (has_crypto_) {
  ------------------
  |  Branch (71:9): [True: 2, False: 0]
  ------------------
   72|      2|      RandenHwAes::Absorb(seed, state);
   73|      2|    } else {
   74|      0|      RandenSlow::Absorb(seed, state);
   75|      0|    }
   76|       |#elif ABSL_HAVE_ACCELERATED_AES
   77|       |    // HW AES is enabled.
   78|       |    RandenHwAes::Absorb(seed, state);
   79|       |#else
   80|       |    // HW AES is disabled.
   81|       |    RandenSlow::Absorb(seed, state);
   82|       |#endif
   83|      2|  }

_ZN4absl12lts_2024011615random_internal22CPUSupportsRandenHwAesEv:
  135|      2|bool CPUSupportsRandenHwAes() {
  136|      2|#if defined(ABSL_INTERNAL_USE_X86_CPUID)
  137|       |  // 1. For x86: Use CPUID to detect the required AES instruction set.
  138|      2|  int regs[4];
  139|      2|  __cpuid(reinterpret_cast<int*>(regs), 1);
  140|      2|  return regs[2] & (1 << 25);  // AES
  141|       |
  142|       |#elif defined(ABSL_INTERNAL_USE_GETAUXVAL)
  143|       |  // 2. Use getauxval() to read the hardware bits and determine
  144|       |  // cpu capabilities.
  145|       |
  146|       |#define AT_HWCAP 16
  147|       |#define AT_HWCAP2 26
  148|       |#if defined(ABSL_ARCH_PPC)
  149|       |  // For Power / PPC: Expect that the cpu supports VCRYPTO
  150|       |  // See https://members.openpowerfoundation.org/document/dl/576
  151|       |  // VCRYPTO should be present in POWER8 >= 2.07.
  152|       |  // Uses Linux kernel constants from arch/powerpc/include/uapi/asm/cputable.h
  153|       |  static const uint32_t kVCRYPTO = 0x02000000;
  154|       |  const uint32_t hwcap = GetAuxval(AT_HWCAP2);
  155|       |  return (hwcap & kVCRYPTO) != 0;
  156|       |
  157|       |#elif defined(ABSL_ARCH_ARM)
  158|       |  // For ARM: Require crypto+neon
  159|       |  // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500f/CIHBIBBA.html
  160|       |  // Uses Linux kernel constants from arch/arm64/include/asm/hwcap.h
  161|       |  static const uint32_t kNEON = 1 << 12;
  162|       |  uint32_t hwcap = GetAuxval(AT_HWCAP);
  163|       |  if ((hwcap & kNEON) == 0) {
  164|       |    return false;
  165|       |  }
  166|       |
  167|       |  // And use it again to detect AES.
  168|       |  static const uint32_t kAES = 1 << 0;
  169|       |  const uint32_t hwcap2 = GetAuxval(AT_HWCAP2);
  170|       |  return (hwcap2 & kAES) != 0;
  171|       |
  172|       |#elif defined(ABSL_ARCH_AARCH64)
  173|       |  // For AARCH64: Require crypto+neon
  174|       |  // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0500f/CIHBIBBA.html
  175|       |  static const uint32_t kNEON = 1 << 1;
  176|       |  static const uint32_t kAES = 1 << 3;
  177|       |  const uint32_t hwcap = GetAuxval(AT_HWCAP);
  178|       |  return ((hwcap & kNEON) != 0) && ((hwcap & kAES) != 0);
  179|       |#endif
  180|       |
  181|       |#else  // ABSL_INTERNAL_USE_GETAUXVAL
  182|       |  // 3. By default, assume that the compiler default.
  183|       |  return ABSL_HAVE_ACCELERATED_AES ? true : false;
  184|       |
  185|       |#endif
  186|       |  // NOTE: There are some other techniques that may be worth trying:
  187|       |  //
  188|       |  // * Use an environment variable: ABSL_RANDOM_USE_HWAES
  189|       |  //
  190|       |  // * Rely on compiler-generated target-based dispatch.
  191|       |  // Using x86/gcc it might look something like this:
  192|       |  //
  193|       |  // int __attribute__((target("aes"))) HasAes() { return 1; }
  194|       |  // int __attribute__((target("default"))) HasAes() { return 0; }
  195|       |  //
  196|       |  // This does not work on all architecture/compiler combinations.
  197|       |  //
  198|       |  // * On Linux consider reading /proc/cpuinfo and/or /proc/self/auxv.
  199|       |  // These files have lines which are easy to parse; for ARM/AARCH64 it is quite
  200|       |  // easy to find the Features: line and extract aes / neon. Likewise for
  201|       |  // PPC.
  202|       |  //
  203|       |  // * Fork a process and test for SIGILL:
  204|       |  //
  205|       |  // * Many architectures have instructions to read the ISA. Unfortunately
  206|       |  //   most of those require that the code is running in ring 0 /
  207|       |  //   protected-mode.
  208|       |  //
  209|       |  //   There are several examples. e.g. Valgrind detects PPC ISA 2.07:
  210|       |  //   https://github.com/lu-zero/valgrind/blob/master/none/tests/ppc64/test_isa_2_07_part1.c
  211|       |  //
  212|       |  //   MRS <Xt>, ID_AA64ISAR0_EL1 ; Read ID_AA64ISAR0_EL1 into Xt
  213|       |  //
  214|       |  //   uint64_t val;
  215|       |  //   __asm __volatile("mrs %0, id_aa64isar0_el1" :"=&r" (val));
  216|       |  //
  217|       |  // * Use a CPUID-style heuristic database.
  218|       |  //
  219|       |  // * On Apple (__APPLE__), AES is available on Arm v8.
  220|       |  //   https://stackoverflow.com/questions/45637888/how-to-determine-armv8-features-at-runtime-on-ios
  221|      2|}
randen_detect.cc:_ZL7__cpuidPii:
   54|      2|static void __cpuid(int cpu_info[4], int info_type) {
   55|      2|  __asm__ volatile("cpuid \n\t"
   56|      2|                   : "=a"(cpu_info[0]), "=b"(cpu_info[1]), "=c"(cpu_info[2]),
   57|      2|                     "=d"(cpu_info[3])
   58|      2|                   : "a"(info_type), "c"(0));
   59|      2|}

_ZN4absl12lts_2024011615random_internal13randen_engineImEC2IRNS1_17RandenPoolSeedSeqEvEEOT_:
   67|      2|  explicit randen_engine(SeedSequence&& seq) {
   68|      2|    seed(seq);
   69|      2|  }
_ZN4absl12lts_2024011615random_internal13randen_engineImE4seedIRNS1_17RandenPoolSeedSeqEEENSt3__19enable_ifIXntsr3std14is_convertibleIT_mEE5valueEvE4typeEOS9_:
   97|      2|  seed(SeedSequence&& seq) {
   98|       |    // Zeroes the state.
   99|      2|    seed();
  100|      2|    reseed(seq);
  101|      2|  }
_ZN4absl12lts_2024011615random_internal13randen_engineImE4seedEm:
  103|      2|  void seed(result_type seed_value = 0) {
  104|      2|    next_ = kStateSizeT;
  105|       |    // Zeroes the inner state and fills the outer state with seed_value to
  106|       |    // mimic the behaviour of reseed
  107|      2|    auto* begin = state();
  108|      2|    std::fill(begin, begin + kCapacityT, 0);
  109|      2|    std::fill(begin + kCapacityT, begin + kStateSizeT, seed_value);
  110|      2|  }
_ZN4absl12lts_2024011615random_internal13randen_engineImE5stateEv:
  244|     20|  result_type* state() {
  245|     20|    return reinterpret_cast<result_type*>(
  246|     20|        (reinterpret_cast<uintptr_t>(&raw_state_) & 0xf) ? (raw_state_ + 8)
  ------------------
  |  Branch (246:9): [True: 0, False: 20]
  ------------------
  247|     20|                                                         : raw_state_);
  248|     20|  }
_ZN4absl12lts_2024011615random_internal13randen_engineImE6reseedINS1_17RandenPoolSeedSeqEEEvRT_:
  116|      2|  void reseed(SeedSequence& seq) {
  117|      2|    using sequence_result_type = typename SeedSequence::result_type;
  118|      2|    static_assert(sizeof(sequence_result_type) == 4,
  119|      2|                  "SeedSequence::result_type must be 32-bit");
  120|      2|    constexpr size_t kBufferSize =
  121|      2|        Randen::kSeedBytes / sizeof(sequence_result_type);
  122|      2|    alignas(16) sequence_result_type buffer[kBufferSize];
  123|       |
  124|       |    // Randen::Absorb XORs the seed into state, which is then mixed by a call
  125|       |    // to Randen::Generate. Seeding with only the provided entropy is preferred
  126|       |    // to using an arbitrary generate() call, so use [rand.req.seed_seq]
  127|       |    // size as a proxy for the number of entropy units that can be generated
  128|       |    // without relying on seed sequence mixing...
  129|      2|    const size_t entropy_size = seq.size();
  130|      2|    if (entropy_size < kBufferSize) {
  ------------------
  |  Branch (130:9): [True: 2, False: 0]
  ------------------
  131|       |      // ... and only request that many values, or 256-bits, when unspecified.
  132|      2|      const size_t requested_entropy = (entropy_size == 0) ? 8u : entropy_size;
  ------------------
  |  Branch (132:40): [True: 2, False: 0]
  ------------------
  133|      2|      std::fill(buffer + requested_entropy, buffer + kBufferSize, 0);
  134|      2|      seq.generate(buffer, buffer + requested_entropy);
  135|       |#ifdef ABSL_IS_BIG_ENDIAN
  136|       |      // Randen expects the seed buffer to be in Little Endian; reverse it on
  137|       |      // Big Endian platforms.
  138|       |      for (sequence_result_type& e : buffer) {
  139|       |        e = absl::little_endian::FromHost(e);
  140|       |      }
  141|       |#endif
  142|       |      // The Randen paper suggests preferentially initializing even-numbered
  143|       |      // 128-bit vectors of the randen state (there are 16 such vectors).
  144|       |      // The seed data is merged into the state offset by 128-bits, which
  145|       |      // implies preferring seed bytes [16..31, ..., 208..223]. Since the
  146|       |      // buffer is 32-bit values, we swap the corresponding buffer positions in
  147|       |      // 128-bit chunks.
  148|      2|      size_t dst = kBufferSize;
  149|     16|      while (dst > 7) {
  ------------------
  |  Branch (149:14): [True: 14, False: 2]
  ------------------
  150|       |        // leave the odd bucket as-is.
  151|     14|        dst -= 4;
  152|     14|        size_t src = dst >> 1;
  153|       |        // swap 128-bits into the even bucket
  154|     14|        std::swap(buffer[--dst], buffer[--src]);
  155|     14|        std::swap(buffer[--dst], buffer[--src]);
  156|     14|        std::swap(buffer[--dst], buffer[--src]);
  157|     14|        std::swap(buffer[--dst], buffer[--src]);
  158|     14|      }
  159|      2|    } else {
  160|      0|      seq.generate(buffer, buffer + kBufferSize);
  161|      0|    }
  162|      2|    impl_.Absorb(buffer, state());
  163|       |
  164|       |    // Generate will be called when operator() is called
  165|      2|    next_ = kStateSizeT;
  166|      2|  }
_ZN4absl12lts_2024011615random_internal13randen_engineImEclEv:
   84|     16|  result_type operator()() {
   85|       |    // Refill the buffer if needed (unlikely).
   86|     16|    auto* begin = state();
   87|     16|    if (next_ >= kStateSizeT) {
  ------------------
  |  Branch (87:9): [True: 2, False: 14]
  ------------------
   88|      2|      next_ = kCapacityT;
   89|      2|      impl_.Generate(begin);
   90|      2|    }
   91|     16|    return little_endian::ToHost(begin[next_++]);
   92|     16|  }

_ZN4absl12lts_2024011615random_internal28HasRandenHwAesImplementationEv:
  408|      2|bool HasRandenHwAesImplementation() { return true; }
_ZN4absl12lts_2024011615random_internal11RandenHwAes7GetKeysEv:
  410|      2|const void* ABSL_TARGET_CRYPTO RandenHwAes::GetKeys() {
  411|       |  // Round keys for one AES per Feistel round and branch.
  412|       |  // The canonical implementation uses first digits of Pi.
  413|       |#if defined(ABSL_ARCH_PPC)
  414|       |  return kRandenRoundKeysBE;
  415|       |#else
  416|      2|  return kRandenRoundKeys;
  417|      2|#endif
  418|      2|}
_ZN4absl12lts_2024011615random_internal11RandenHwAes6AbsorbEPKvPv:
  422|      2|                                            void* state_void) {
  423|      2|  static_assert(RandenTraits::kCapacityBytes / sizeof(Vector128) == 1,
  424|      2|                "Unexpected Randen kCapacityBlocks");
  425|      2|  static_assert(RandenTraits::kStateBytes / sizeof(Vector128) == 16,
  426|      2|                "Unexpected Randen kStateBlocks");
  427|       |
  428|      2|  auto* state = reinterpret_cast<absl::uint128 * ABSL_RANDOM_INTERNAL_RESTRICT>(
  429|      2|      state_void);
  430|      2|  const auto* seed =
  431|      2|      reinterpret_cast<const absl::uint128 * ABSL_RANDOM_INTERNAL_RESTRICT>(
  432|      2|          seed_void);
  433|       |
  434|      2|  Vector128 b1 = Vector128Load(state + 1);
  435|      2|  b1 ^= Vector128Load(seed + 0);
  436|      2|  Vector128Store(b1, state + 1);
  437|       |
  438|      2|  Vector128 b2 = Vector128Load(state + 2);
  439|      2|  b2 ^= Vector128Load(seed + 1);
  440|      2|  Vector128Store(b2, state + 2);
  441|       |
  442|      2|  Vector128 b3 = Vector128Load(state + 3);
  443|      2|  b3 ^= Vector128Load(seed + 2);
  444|      2|  Vector128Store(b3, state + 3);
  445|       |
  446|      2|  Vector128 b4 = Vector128Load(state + 4);
  447|      2|  b4 ^= Vector128Load(seed + 3);
  448|      2|  Vector128Store(b4, state + 4);
  449|       |
  450|      2|  Vector128 b5 = Vector128Load(state + 5);
  451|      2|  b5 ^= Vector128Load(seed + 4);
  452|      2|  Vector128Store(b5, state + 5);
  453|       |
  454|      2|  Vector128 b6 = Vector128Load(state + 6);
  455|      2|  b6 ^= Vector128Load(seed + 5);
  456|      2|  Vector128Store(b6, state + 6);
  457|       |
  458|      2|  Vector128 b7 = Vector128Load(state + 7);
  459|      2|  b7 ^= Vector128Load(seed + 6);
  460|      2|  Vector128Store(b7, state + 7);
  461|       |
  462|      2|  Vector128 b8 = Vector128Load(state + 8);
  463|      2|  b8 ^= Vector128Load(seed + 7);
  464|      2|  Vector128Store(b8, state + 8);
  465|       |
  466|      2|  Vector128 b9 = Vector128Load(state + 9);
  467|      2|  b9 ^= Vector128Load(seed + 8);
  468|      2|  Vector128Store(b9, state + 9);
  469|       |
  470|      2|  Vector128 b10 = Vector128Load(state + 10);
  471|      2|  b10 ^= Vector128Load(seed + 9);
  472|      2|  Vector128Store(b10, state + 10);
  473|       |
  474|      2|  Vector128 b11 = Vector128Load(state + 11);
  475|      2|  b11 ^= Vector128Load(seed + 10);
  476|      2|  Vector128Store(b11, state + 11);
  477|       |
  478|      2|  Vector128 b12 = Vector128Load(state + 12);
  479|      2|  b12 ^= Vector128Load(seed + 11);
  480|      2|  Vector128Store(b12, state + 12);
  481|       |
  482|      2|  Vector128 b13 = Vector128Load(state + 13);
  483|      2|  b13 ^= Vector128Load(seed + 12);
  484|      2|  Vector128Store(b13, state + 13);
  485|       |
  486|      2|  Vector128 b14 = Vector128Load(state + 14);
  487|      2|  b14 ^= Vector128Load(seed + 13);
  488|      2|  Vector128Store(b14, state + 14);
  489|       |
  490|      2|  Vector128 b15 = Vector128Load(state + 15);
  491|      2|  b15 ^= Vector128Load(seed + 14);
  492|      2|  Vector128Store(b15, state + 15);
  493|      2|}
_ZN4absl12lts_2024011615random_internal11RandenHwAes8GenerateEPKvPv:
  497|      4|                                              void* state_void) {
  498|      4|  static_assert(RandenTraits::kCapacityBytes == sizeof(Vector128),
  499|      4|                "Capacity mismatch");
  500|       |
  501|      4|  auto* state = reinterpret_cast<absl::uint128*>(state_void);
  502|      4|  const auto* keys = reinterpret_cast<const absl::uint128*>(keys_void);
  503|       |
  504|      4|  const Vector128 prev_inner = Vector128Load(state);
  505|       |
  506|      4|  SwapEndian(state);
  507|       |
  508|      4|  Permute(state, keys);
  509|       |
  510|      4|  SwapEndian(state);
  511|       |
  512|       |  // Ensure backtracking resistance.
  513|      4|  Vector128 inner = Vector128Load(state);
  514|      4|  inner ^= prev_inner;
  515|      4|  Vector128Store(inner, state);
  516|      4|}
randen_hwaes.cc:_ZN12_GLOBAL__N_113Vector128LoadEPKv:
  236|  2.78k|inline ABSL_TARGET_CRYPTO Vector128 Vector128Load(const void* from) {
  237|  2.78k|  return Vector128(_mm_load_si128(reinterpret_cast<const __m128i*>(from)));
  238|  2.78k|}
randen_hwaes.cc:_ZN12_GLOBAL__N_19Vector128C2ERKDv2_x:
  223|  3.87k|  inline explicit Vector128(const __m128i& v) : data_(v) {}
randen_hwaes.cc:_ZN12_GLOBAL__N_19Vector128eOERKS0_:
  227|     34|  inline Vector128& operator^=(const Vector128& other) {
  228|     34|    data_ = _mm_xor_si128(data_, other.data());
  229|     34|    return *this;
  230|     34|  }
randen_hwaes.cc:_ZNK12_GLOBAL__N_19Vector1284dataEv:
  225|  3.87k|  inline __m128i data() const { return data_; }
randen_hwaes.cc:_ZN12_GLOBAL__N_114Vector128StoreERKNS_9Vector128EPv:
  240|  1.66k|inline ABSL_TARGET_CRYPTO void Vector128Store(const Vector128& v, void* to) {
  241|  1.66k|  _mm_store_si128(reinterpret_cast<__m128i*>(to), v.data());
  242|  1.66k|}
randen_hwaes.cc:_ZN12_GLOBAL__N_110SwapEndianEPv:
  254|      8|inline ABSL_TARGET_CRYPTO void SwapEndian(void*) {}
randen_hwaes.cc:_ZN12_GLOBAL__N_17PermuteEPN4absl12lts_202401167uint128EPKS2_:
  391|      4|    const absl::uint128* ABSL_RANDOM_INTERNAL_RESTRICT keys) {
  392|       |  // (Successfully unrolled; the first iteration jumps into the second half)
  393|      4|#ifdef __clang__
  394|      4|#pragma clang loop unroll_count(2)
  395|      4|#endif
  396|     72|  for (size_t round = 0; round < RandenTraits::kFeistelRounds; ++round) {
  ------------------
  |  Branch (396:26): [True: 68, False: 4]
  ------------------
  397|     68|    keys = FeistelRound(state, keys);
  398|     68|    BlockShuffle(state);
  399|     68|  }
  400|      4|}
randen_hwaes.cc:_ZN12_GLOBAL__N_112FeistelRoundEPN4absl12lts_202401167uint128EPKS2_:
  329|     68|    const absl::uint128* ABSL_RANDOM_INTERNAL_RESTRICT keys) {
  330|     68|  static_assert(RandenTraits::kFeistelBlocks == 16,
  331|     68|                "Expecting 16 FeistelBlocks.");
  332|       |
  333|       |  // MSVC does a horrible job at unrolling loops.
  334|       |  // So we unroll the loop by hand to improve the performance.
  335|     68|  const Vector128 s0 = Vector128Load(state + 0);
  336|     68|  const Vector128 s1 = Vector128Load(state + 1);
  337|     68|  const Vector128 s2 = Vector128Load(state + 2);
  338|     68|  const Vector128 s3 = Vector128Load(state + 3);
  339|     68|  const Vector128 s4 = Vector128Load(state + 4);
  340|     68|  const Vector128 s5 = Vector128Load(state + 5);
  341|     68|  const Vector128 s6 = Vector128Load(state + 6);
  342|     68|  const Vector128 s7 = Vector128Load(state + 7);
  343|     68|  const Vector128 s8 = Vector128Load(state + 8);
  344|     68|  const Vector128 s9 = Vector128Load(state + 9);
  345|     68|  const Vector128 s10 = Vector128Load(state + 10);
  346|     68|  const Vector128 s11 = Vector128Load(state + 11);
  347|     68|  const Vector128 s12 = Vector128Load(state + 12);
  348|     68|  const Vector128 s13 = Vector128Load(state + 13);
  349|     68|  const Vector128 s14 = Vector128Load(state + 14);
  350|     68|  const Vector128 s15 = Vector128Load(state + 15);
  351|       |
  352|       |  // Encode even blocks with keys.
  353|     68|  const Vector128 e0 = AesRound(s0, Vector128Load(keys + 0));
  354|     68|  const Vector128 e2 = AesRound(s2, Vector128Load(keys + 1));
  355|     68|  const Vector128 e4 = AesRound(s4, Vector128Load(keys + 2));
  356|     68|  const Vector128 e6 = AesRound(s6, Vector128Load(keys + 3));
  357|     68|  const Vector128 e8 = AesRound(s8, Vector128Load(keys + 4));
  358|     68|  const Vector128 e10 = AesRound(s10, Vector128Load(keys + 5));
  359|     68|  const Vector128 e12 = AesRound(s12, Vector128Load(keys + 6));
  360|     68|  const Vector128 e14 = AesRound(s14, Vector128Load(keys + 7));
  361|       |
  362|       |  // Encode odd blocks with even output from above.
  363|     68|  const Vector128 o1 = AesRound(e0, s1);
  364|     68|  const Vector128 o3 = AesRound(e2, s3);
  365|     68|  const Vector128 o5 = AesRound(e4, s5);
  366|     68|  const Vector128 o7 = AesRound(e6, s7);
  367|     68|  const Vector128 o9 = AesRound(e8, s9);
  368|     68|  const Vector128 o11 = AesRound(e10, s11);
  369|     68|  const Vector128 o13 = AesRound(e12, s13);
  370|     68|  const Vector128 o15 = AesRound(e14, s15);
  371|       |
  372|       |  // Store odd blocks. (These will be shuffled later).
  373|     68|  Vector128Store(o1, state + 1);
  374|     68|  Vector128Store(o3, state + 3);
  375|     68|  Vector128Store(o5, state + 5);
  376|     68|  Vector128Store(o7, state + 7);
  377|     68|  Vector128Store(o9, state + 9);
  378|     68|  Vector128Store(o11, state + 11);
  379|     68|  Vector128Store(o13, state + 13);
  380|     68|  Vector128Store(o15, state + 15);
  381|       |
  382|     68|  return keys + 8;
  383|     68|}
randen_hwaes.cc:_ZN12_GLOBAL__N_18AesRoundERKNS_9Vector128ES2_:
  247|  1.08k|                                             const Vector128& round_key) {
  248|       |  // It is important to always use the full round function - omitting the
  249|       |  // final MixColumns reduces security [https://eprint.iacr.org/2010/041.pdf]
  250|       |  // and does not help because we never decrypt.
  251|  1.08k|  return Vector128(_mm_aesenc_si128(state.data(), round_key.data()));
  252|  1.08k|}
randen_hwaes.cc:_ZN12_GLOBAL__N_112BlockShuffleEPN4absl12lts_202401167uint128E:
  280|     68|inline ABSL_TARGET_CRYPTO void BlockShuffle(absl::uint128* state) {
  281|     68|  static_assert(RandenTraits::kFeistelBlocks == 16,
  282|     68|                "Expecting 16 FeistelBlocks.");
  283|       |
  284|     68|  constexpr size_t shuffle[RandenTraits::kFeistelBlocks] = {
  285|     68|      7, 2, 13, 4, 11, 8, 3, 6, 15, 0, 9, 10, 1, 14, 5, 12};
  286|       |
  287|     68|  const Vector128 v0 = Vector128Load(state + shuffle[0]);
  288|     68|  const Vector128 v1 = Vector128Load(state + shuffle[1]);
  289|     68|  const Vector128 v2 = Vector128Load(state + shuffle[2]);
  290|     68|  const Vector128 v3 = Vector128Load(state + shuffle[3]);
  291|     68|  const Vector128 v4 = Vector128Load(state + shuffle[4]);
  292|     68|  const Vector128 v5 = Vector128Load(state + shuffle[5]);
  293|     68|  const Vector128 v6 = Vector128Load(state + shuffle[6]);
  294|     68|  const Vector128 v7 = Vector128Load(state + shuffle[7]);
  295|     68|  const Vector128 w0 = Vector128Load(state + shuffle[8]);
  296|     68|  const Vector128 w1 = Vector128Load(state + shuffle[9]);
  297|     68|  const Vector128 w2 = Vector128Load(state + shuffle[10]);
  298|     68|  const Vector128 w3 = Vector128Load(state + shuffle[11]);
  299|     68|  const Vector128 w4 = Vector128Load(state + shuffle[12]);
  300|     68|  const Vector128 w5 = Vector128Load(state + shuffle[13]);
  301|     68|  const Vector128 w6 = Vector128Load(state + shuffle[14]);
  302|     68|  const Vector128 w7 = Vector128Load(state + shuffle[15]);
  303|       |
  304|     68|  Vector128Store(v0, state + 0);
  305|     68|  Vector128Store(v1, state + 1);
  306|     68|  Vector128Store(v2, state + 2);
  307|     68|  Vector128Store(v3, state + 3);
  308|     68|  Vector128Store(v4, state + 4);
  309|     68|  Vector128Store(v5, state + 5);
  310|     68|  Vector128Store(v6, state + 6);
  311|     68|  Vector128Store(v7, state + 7);
  312|     68|  Vector128Store(w0, state + 8);
  313|     68|  Vector128Store(w1, state + 9);
  314|     68|  Vector128Store(w2, state + 10);
  315|     68|  Vector128Store(w3, state + 11);
  316|     68|  Vector128Store(w4, state + 12);
  317|     68|  Vector128Store(w5, state + 13);
  318|     68|  Vector128Store(w6, state + 14);
  319|     68|  Vector128Store(w7, state + 15);
  320|     68|}

_ZN4absl12lts_2024011615random_internal29ReadSeedMaterialFromOSEntropyENS0_4SpanIjEE:
  205|      2|bool ReadSeedMaterialFromOSEntropy(absl::Span<uint32_t> values) {
  206|      2|  assert(values.data() != nullptr);
  207|      2|  if (values.data() == nullptr) {
  ------------------
  |  Branch (207:7): [True: 0, False: 2]
  ------------------
  208|      0|    return false;
  209|      0|  }
  210|      2|  if (values.empty()) {
  ------------------
  |  Branch (210:7): [True: 0, False: 2]
  ------------------
  211|      0|    return true;
  212|      0|  }
  213|      2|  return ReadSeedMaterialFromOSEntropyImpl(values);
  214|      2|}
seed_material.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_133ReadSeedMaterialFromOSEntropyImplENS0_4SpanIjEE:
  190|      2|bool ReadSeedMaterialFromOSEntropyImpl(absl::Span<uint32_t> values) {
  191|      2|#if defined(ABSL_RANDOM_USE_GET_ENTROPY)
  192|      2|  if (ReadSeedMaterialFromGetEntropy(values)) {
  ------------------
  |  Branch (192:7): [True: 2, False: 0]
  ------------------
  193|      2|    return true;
  194|      2|  }
  195|      0|#endif
  196|       |  // Libc may support getentropy, but the kernel may not, so we still have
  197|       |  // to fallback to ReadSeedMaterialFromDevURandom().
  198|      0|  return ReadSeedMaterialFromDevURandom(values);
  199|      2|}
seed_material.cc:_ZN4absl12lts_2024011615random_internal12_GLOBAL__N_130ReadSeedMaterialFromGetEntropyENS0_4SpanIjEE:
  142|      2|bool ReadSeedMaterialFromGetEntropy(absl::Span<uint32_t> values) {
  143|      2|  auto buffer = reinterpret_cast<uint8_t*>(values.data());
  144|      2|  size_t buffer_size = sizeof(uint32_t) * values.size();
  145|     18|  while (buffer_size > 0) {
  ------------------
  |  Branch (145:10): [True: 16, False: 2]
  ------------------
  146|       |    // getentropy() has a maximum permitted length of 256.
  147|     16|    size_t to_read = std::min<size_t>(buffer_size, 256);
  148|     16|    int result = getentropy(buffer, to_read);
  149|     16|    if (result < 0) {
  ------------------
  |  Branch (149:9): [True: 0, False: 16]
  ------------------
  150|      0|      return false;
  151|      0|    }
  152|       |    // https://github.com/google/sanitizers/issues/1173
  153|       |    // MemorySanitizer can't see through getentropy().
  154|     16|    ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(buffer, to_read);
  155|     16|    buffer += to_read;
  156|     16|    buffer_size -= to_read;
  157|     16|  }
  158|      2|  return true;
  159|      2|}

_ZN4absl12lts_2024011615random_internal26UniformDistributionWrapperIjEC2Ev:
  236|     16|      : UniformDistribution<NumType>(std::numeric_limits<NumType>::lowest(),
  237|     16|                                     (std::numeric_limits<NumType>::max)()) {}

_ZNK4absl12lts_2024011624uniform_int_distributionIjE5paramEv:
  134|     16|  param_type param() const { return param_; }
_ZNK4absl12lts_2024011624uniform_int_distributionIjE10param_type1aEv:
   80|     16|    result_type a() const { return lo_; }
_ZNK4absl12lts_2024011624uniform_int_distributionIjE10param_type5rangeEv:
   95|     16|    unsigned_type range() const { return range_; }
_ZN4absl12lts_2024011624uniform_int_distributionIjEC2Ejj:
  110|     16|      : param_(lo, hi) {}
_ZN4absl12lts_2024011624uniform_int_distributionIjE10param_typeC2Ejj:
   73|     16|        : lo_(lo),
   74|     16|          range_(static_cast<unsigned_type>(hi) -
   75|     16|                 static_cast<unsigned_type>(lo)) {
   76|       |      // [rand.dist.uni.int] precondition 2
   77|       |      assert(lo <= hi);
   78|     16|    }
_ZN4absl12lts_2024011624uniform_int_distributionIjEclINS0_15random_internal17NonsecureURBGBaseINS4_13randen_engineImEENS4_17RandenPoolSeedSeqEEEEEjRT_:
  121|     16|  result_type operator()(URBG& gen) {  // NOLINT(runtime/references)
  122|     16|    return (*this)(gen, param());
  123|     16|  }
_ZN4absl12lts_2024011624uniform_int_distributionIjEclINS0_15random_internal17NonsecureURBGBaseINS4_13randen_engineImEENS4_17RandenPoolSeedSeqEEEEEjRT_RKNS2_10param_typeE:
  127|     16|      URBG& gen, const param_type& param) {  // NOLINT(runtime/references)
  128|     16|    return static_cast<result_type>(param.a() + Generate(gen, param.range()));
  129|     16|  }
_ZN4absl12lts_2024011624uniform_int_distributionIjE8GenerateINS0_15random_internal17NonsecureURBGBaseINS4_13randen_engineImEENS4_17RandenPoolSeedSeqEEEEEjRT_j:
  198|     16|    typename random_internal::make_unsigned_bits<IntType>::type R) {
  199|     16|  random_internal::FastUniformBits<unsigned_type> fast_bits;
  200|     16|  unsigned_type bits = fast_bits(g);
  201|     16|  const unsigned_type Lim = R + 1;
  202|     16|  if ((R & Lim) == 0) {
  ------------------
  |  Branch (202:7): [True: 16, False: 0]
  ------------------
  203|       |    // If the interval's length is a power of two range, just take the low bits.
  204|     16|    return bits & R;
  205|     16|  }
  206|       |
  207|       |  // Generates a uniform variate on [0, Lim) using fixed-point multiplication.
  208|       |  // The above fast-path guarantees that Lim is representable in unsigned_type.
  209|       |  //
  210|       |  // Algorithm adapted from
  211|       |  // http://lemire.me/blog/2016/06/30/fast-random-shuffling/, with added
  212|       |  // explanation.
  213|       |  //
  214|       |  // The algorithm creates a uniform variate `bits` in the interval [0, 2^N),
  215|       |  // and treats it as the fractional part of a fixed-point real value in [0, 1),
  216|       |  // multiplied by 2^N.  For example, 0.25 would be represented as 2^(N - 2),
  217|       |  // because 2^N * 0.25 == 2^(N - 2).
  218|       |  //
  219|       |  // Next, `bits` and `Lim` are multiplied with a wide-multiply to bring the
  220|       |  // value into the range [0, Lim).  The integral part (the high word of the
  221|       |  // multiplication result) is then very nearly the desired result.  However,
  222|       |  // this is not quite accurate; viewing the multiplication result as one
  223|       |  // double-width integer, the resulting values for the sample are mapped as
  224|       |  // follows:
  225|       |  //
  226|       |  // If the result lies in this interval:       Return this value:
  227|       |  //        [0, 2^N)                                    0
  228|       |  //        [2^N, 2 * 2^N)                              1
  229|       |  //        ...                                         ...
  230|       |  //        [K * 2^N, (K + 1) * 2^N)                    K
  231|       |  //        ...                                         ...
  232|       |  //        [(Lim - 1) * 2^N, Lim * 2^N)                Lim - 1
  233|       |  //
  234|       |  // While all of these intervals have the same size, the result of `bits * Lim`
  235|       |  // must be a multiple of `Lim`, and not all of these intervals contain the
  236|       |  // same number of multiples of `Lim`.  In particular, some contain
  237|       |  // `F = floor(2^N / Lim)` and some contain `F + 1 = ceil(2^N / Lim)`.  This
  238|       |  // difference produces a small nonuniformity, which is corrected by applying
  239|       |  // rejection sampling to one of the values in the "larger intervals" (i.e.,
  240|       |  // the intervals containing `F + 1` multiples of `Lim`.
  241|       |  //
  242|       |  // An interval contains `F + 1` multiples of `Lim` if and only if its smallest
  243|       |  // value modulo 2^N is less than `2^N % Lim`.  The unique value satisfying
  244|       |  // this property is used as the one for rejection.  That is, a value of
  245|       |  // `bits * Lim` is rejected if `(bit * Lim) % 2^N < (2^N % Lim)`.
  246|       |
  247|      0|  using helper = random_internal::wide_multiply<unsigned_type>;
  248|      0|  auto product = helper::multiply(bits, Lim);
  249|       |
  250|       |  // Two optimizations here:
  251|       |  // * Rejection occurs with some probability less than 1/2, and for reasonable
  252|       |  //   ranges considerably less (in particular, less than 1/(F+1)), so
  253|       |  //   ABSL_PREDICT_FALSE is apt.
  254|       |  // * `Lim` is an overestimate of `threshold`, and doesn't require a divide.
  255|      0|  if (ABSL_PREDICT_FALSE(helper::lo(product) < Lim)) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  256|       |    // This quantity is exactly equal to `2^N % Lim`, but does not require high
  257|       |    // precision calculations: `2^N % Lim` is congruent to `(2^N - Lim) % Lim`.
  258|       |    // Ideally this could be expressed simply as `-X` rather than `2^N - X`, but
  259|       |    // for types smaller than int, this calculation is incorrect due to integer
  260|       |    // promotion rules.
  261|      0|    const unsigned_type threshold =
  262|      0|        ((std::numeric_limits<unsigned_type>::max)() - Lim + 1) % Lim;
  263|      0|    while (helper::lo(product) < threshold) {
  ------------------
  |  Branch (263:12): [True: 0, False: 0]
  ------------------
  264|      0|      bits = fast_bits(g);
  265|      0|      product = helper::multiply(bits, Lim);
  266|      0|    }
  267|      0|  }
  268|       |
  269|      0|  return helper::hi(product);
  270|     16|}

_ZNK4absl12lts_2024011615status_internal9StatusRep5UnrefEv:
   48|  3.10k|void StatusRep::Unref() const {
   49|       |  // Fast path: if ref==1, there is no need for a RefCountDec (since
   50|       |  // this is the only reference and therefore no other thread is
   51|       |  // allowed to be mucking with r).
   52|  3.10k|  if (ref_.load(std::memory_order_acquire) == 1 ||
  ------------------
  |  Branch (52:7): [True: 3.10k, False: 0]
  ------------------
   53|  3.10k|      ref_.fetch_sub(1, std::memory_order_acq_rel) - 1 == 0) {
  ------------------
  |  Branch (53:7): [True: 0, False: 0]
  ------------------
   54|  3.10k|    delete this;
   55|  3.10k|  }
   56|  3.10k|}
_ZNK4absl12lts_2024011615status_internal9StatusRep14ForEachPayloadENS0_11FunctionRefIFvNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEERKNS0_4CordEEEE:
  110|     38|    const {
  111|     38|  if (auto* payloads = payloads_.get()) {
  ------------------
  |  Branch (111:13): [True: 0, False: 38]
  ------------------
  112|      0|    bool in_reverse =
  113|      0|        payloads->size() > 1 && reinterpret_cast<uintptr_t>(payloads) % 13 > 6;
  ------------------
  |  Branch (113:9): [True: 0, False: 0]
  |  Branch (113:33): [True: 0, False: 0]
  ------------------
  114|       |
  115|      0|    for (size_t index = 0; index < payloads->size(); ++index) {
  ------------------
  |  Branch (115:28): [True: 0, False: 0]
  ------------------
  116|      0|      const auto& elem =
  117|      0|          (*payloads)[in_reverse ? payloads->size() - 1 - index : index];
  ------------------
  |  Branch (117:23): [True: 0, False: 0]
  ------------------
  118|       |
  119|      0|#ifdef NDEBUG
  120|      0|      visitor(elem.type_url, elem.payload);
  121|       |#else
  122|       |      // In debug mode invalidate the type url to prevent users from relying on
  123|       |      // this string lifetime.
  124|       |
  125|       |      // NOLINTNEXTLINE intentional extra conversion to force temporary.
  126|       |      visitor(std::string(elem.type_url), elem.payload);
  127|       |#endif  // NDEBUG
  128|      0|    }
  129|      0|  }
  130|     38|}
_ZN4absl12lts_2024011615status_internal14MapToLocalCodeEi:
  211|     38|absl::StatusCode MapToLocalCode(int value) {
  212|     38|  absl::StatusCode code = static_cast<absl::StatusCode>(value);
  213|     38|  switch (code) {
  214|      0|    case absl::StatusCode::kOk:
  ------------------
  |  Branch (214:5): [True: 0, False: 38]
  ------------------
  215|      0|    case absl::StatusCode::kCancelled:
  ------------------
  |  Branch (215:5): [True: 0, False: 38]
  ------------------
  216|      0|    case absl::StatusCode::kUnknown:
  ------------------
  |  Branch (216:5): [True: 0, False: 38]
  ------------------
  217|     38|    case absl::StatusCode::kInvalidArgument:
  ------------------
  |  Branch (217:5): [True: 38, False: 0]
  ------------------
  218|     38|    case absl::StatusCode::kDeadlineExceeded:
  ------------------
  |  Branch (218:5): [True: 0, False: 38]
  ------------------
  219|     38|    case absl::StatusCode::kNotFound:
  ------------------
  |  Branch (219:5): [True: 0, False: 38]
  ------------------
  220|     38|    case absl::StatusCode::kAlreadyExists:
  ------------------
  |  Branch (220:5): [True: 0, False: 38]
  ------------------
  221|     38|    case absl::StatusCode::kPermissionDenied:
  ------------------
  |  Branch (221:5): [True: 0, False: 38]
  ------------------
  222|     38|    case absl::StatusCode::kResourceExhausted:
  ------------------
  |  Branch (222:5): [True: 0, False: 38]
  ------------------
  223|     38|    case absl::StatusCode::kFailedPrecondition:
  ------------------
  |  Branch (223:5): [True: 0, False: 38]
  ------------------
  224|     38|    case absl::StatusCode::kAborted:
  ------------------
  |  Branch (224:5): [True: 0, False: 38]
  ------------------
  225|     38|    case absl::StatusCode::kOutOfRange:
  ------------------
  |  Branch (225:5): [True: 0, False: 38]
  ------------------
  226|     38|    case absl::StatusCode::kUnimplemented:
  ------------------
  |  Branch (226:5): [True: 0, False: 38]
  ------------------
  227|     38|    case absl::StatusCode::kInternal:
  ------------------
  |  Branch (227:5): [True: 0, False: 38]
  ------------------
  228|     38|    case absl::StatusCode::kUnavailable:
  ------------------
  |  Branch (228:5): [True: 0, False: 38]
  ------------------
  229|     38|    case absl::StatusCode::kDataLoss:
  ------------------
  |  Branch (229:5): [True: 0, False: 38]
  ------------------
  230|     38|    case absl::StatusCode::kUnauthenticated:
  ------------------
  |  Branch (230:5): [True: 0, False: 38]
  ------------------
  231|     38|      return code;
  232|      0|    default:
  ------------------
  |  Branch (232:5): [True: 0, False: 38]
  ------------------
  233|      0|      return absl::StatusCode::kUnknown;
  234|     38|  }
  235|     38|}

_ZN4absl12lts_2024011615status_internal9StatusRepC2ENS0_10StatusCodeENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEENS4_10unique_ptrINS0_13InlinedVectorINS1_7PayloadELm1ENS4_9allocatorISB_EEEENS4_14default_deleteISE_EEEE:
   70|  3.10k|      : ref_(int32_t{1}),
   71|  3.10k|        code_(code_arg),
   72|  3.10k|        message_(message_arg),
   73|  3.10k|        payloads_(std::move(payloads_arg)) {}
_ZNK4absl12lts_2024011615status_internal9StatusRep4codeEv:
   75|     38|  absl::StatusCode code() const { return code_; }
_ZNK4absl12lts_2024011615status_internal9StatusRep7messageEv:
   76|     38|  const std::string& message() const { return message_; }

_ZN4absl12lts_2024011617internal_statusor12PlacementNewINS0_6StatusEJEEEvPvDpOT0_:
  138|  12.8k|void PlacementNew(absl::Nonnull<void*> p, Args&&... args) {
  139|  12.8k|  new (p) T(std::forward<Args>(args)...);
  140|  12.8k|}
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEED2Ev:
  229|  15.9k|  ~StatusOrData() {
  230|  15.9k|    if (ok()) {
  ------------------
  |  Branch (230:9): [True: 12.8k, False: 3.06k]
  ------------------
  231|  12.8k|      status_.~Status();
  232|  12.8k|      data_.~T();
  233|  12.8k|    } else {
  234|  3.06k|      status_.~Status();
  235|  3.06k|    }
  236|  15.9k|  }
_ZNK4absl12lts_2024011617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE2okEv:
  255|  31.8k|  bool ok() const { return status_.ok(); }
_ZNK4absl12lts_2024011617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE8EnsureOkEv:
  280|  12.8k|  void EnsureOk() const {
  281|  12.8k|    if (ABSL_PREDICT_FALSE(!ok())) Helper::Crash(status_);
  ------------------
  |  |  178|  12.8k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 12.8k]
  |  |  |  Branch (178:49): [Folded, False: 12.8k]
  |  |  |  Branch (178:58): [True: 0, False: 12.8k]
  |  |  ------------------
  ------------------
  282|  12.8k|  }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEEC2INS0_6StatusETnNSt3__19enable_ifIXsr3std16is_constructibleIS8_OT_EE5valueEiE4typeELi0EEESC_:
  207|  3.06k|  explicit StatusOrData(U&& v) : status_(std::forward<U>(v)) {
  208|  3.06k|    EnsureNotOk();
  209|  3.06k|  }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE11EnsureNotOkEv:
  284|  3.06k|  void EnsureNotOk() {
  285|  3.06k|    if (ABSL_PREDICT_FALSE(ok())) Helper::HandleInvalidStatusCtorArg(&status_);
  ------------------
  |  |  178|  3.06k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 3.06k]
  |  |  |  Branch (178:49): [Folded, False: 3.06k]
  |  |  |  Branch (178:58): [True: 0, False: 3.06k]
  |  |  ------------------
  ------------------
  286|  3.06k|  }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEEC2IJRS5_EEENSt3__110in_place_tEDpOT_:
  193|  12.8k|      : data_(std::forward<Args>(args)...) {
  194|  12.8k|    MakeStatus();
  195|  12.8k|  }
_ZN4absl12lts_2024011617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE10MakeStatusIJEEEvDpOT_:
  298|  12.8k|  void MakeStatus(Args&&... args) {
  299|  12.8k|    internal_statusor::PlacementNew<Status>(&status_,
  300|  12.8k|                                            std::forward<Args>(args)...);
  301|  12.8k|  }

_ZN4absl12lts_202401166StatusC2ENS0_10StatusCodeENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  109|  3.10k|    : rep_(CodeToInlinedRep(code)) {
  110|  3.10k|  if (code != absl::StatusCode::kOk && !msg.empty()) {
  ------------------
  |  Branch (110:7): [True: 3.10k, False: 0]
  |  Branch (110:40): [True: 3.10k, False: 0]
  ------------------
  111|  3.10k|    rep_ = PointerToRep(new status_internal::StatusRep(code, msg, nullptr));
  112|  3.10k|  }
  113|  3.10k|}
_ZN4absl12lts_2024011620InvalidArgumentErrorENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  164|  3.06k|Status InvalidArgumentError(absl::string_view message) {
  165|  3.06k|  return Status(absl::StatusCode::kInvalidArgument, message);
  166|  3.06k|}

_ZN4absl12lts_202401166StatusC2Em:
  619|  19.7M|  explicit Status(uintptr_t rep) : rep_(rep) {}
_ZN4absl12lts_202401166StatusaSEOS1_:
  792|  64.2k|inline Status& Status::operator=(Status&& x) {
  793|  64.2k|  uintptr_t old_rep = rep_;
  794|  64.2k|  if (x.rep_ != old_rep) {
  ------------------
  |  Branch (794:7): [True: 19, False: 64.2k]
  ------------------
  795|     19|    rep_ = x.rep_;
  796|     19|    x.rep_ = MovedFromRep();
  797|     19|    Unref(old_rep);
  798|     19|  }
  799|  64.2k|  return *this;
  800|  64.2k|}
_ZNK4absl12lts_202401166Status2okEv:
  816|  19.7M|inline bool Status::ok() const {
  817|  19.7M|  return rep_ == CodeToInlinedRep(absl::StatusCode::kOk);
  818|  19.7M|}
_ZNK4absl12lts_202401166Status4codeEv:
  820|     38|inline absl::StatusCode Status::code() const {
  821|     38|  return status_internal::MapToLocalCode(raw_code());
  822|     38|}
_ZNK4absl12lts_202401166Status8raw_codeEv:
  824|     38|inline int Status::raw_code() const {
  825|     38|  if (IsInlined(rep_)) return static_cast<int>(InlinedRepToCode(rep_));
  ------------------
  |  Branch (825:7): [True: 0, False: 38]
  ------------------
  826|     38|  return static_cast<int>(RepToPointer(rep_)->code());
  827|     38|}
_ZNK4absl12lts_202401166Status7messageEv:
  829|     38|inline absl::string_view Status::message() const {
  830|     38|  return !IsInlined(rep_)
  ------------------
  |  Branch (830:10): [True: 38, False: 0]
  ------------------
  831|     38|             ? RepToPointer(rep_)->message()
  832|     38|             : (IsMovedFrom(rep_) ? absl::string_view(kMovedFromString)
  ------------------
  |  Branch (832:17): [True: 0, False: 0]
  ------------------
  833|      0|                                  : absl::string_view());
  834|     38|}
_ZNK4absl12lts_202401166Status14ForEachPayloadENS0_11FunctionRefIFvNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERKNS0_4CordEEEE:
  883|     38|    const {
  884|     38|  if (IsInlined(rep_)) return;
  ------------------
  |  Branch (884:7): [True: 0, False: 38]
  ------------------
  885|     38|  RepToPointer(rep_)->ForEachPayload(visitor);
  886|     38|}
_ZN4absl12lts_202401166Status9IsInlinedEm:
  888|  19.8M|constexpr bool Status::IsInlined(uintptr_t rep) { return (rep & 1) != 0; }
_ZN4absl12lts_202401166Status16CodeToInlinedRepENS0_10StatusCodeE:
  892|  39.4M|constexpr uintptr_t Status::CodeToInlinedRep(absl::StatusCode code) {
  893|  39.4M|  return (static_cast<uintptr_t>(code) << 2) + 1;
  894|  39.4M|}
_ZN4absl12lts_202401166Status12MovedFromRepEv:
  901|  3.08k|constexpr uintptr_t Status::MovedFromRep() {
  902|  3.08k|  return CodeToInlinedRep(absl::StatusCode::kInternal) | 2;
  903|  3.08k|}
_ZN4absl12lts_202401166Status12RepToPointerEm:
  906|  3.21k|    uintptr_t rep) {
  907|       |  assert(!IsInlined(rep));
  908|  3.21k|  return reinterpret_cast<const status_internal::StatusRep*>(rep);
  909|  3.21k|}
_ZN4absl12lts_202401166Status12PointerToRepEPNS0_15status_internal9StatusRepE:
  912|  3.10k|    absl::Nonnull<status_internal::StatusRep*> rep) {
  913|  3.10k|  return reinterpret_cast<uintptr_t>(rep);
  914|  3.10k|}
_ZN4absl12lts_202401166Status3RefEm:
  916|  64.2k|inline void Status::Ref(uintptr_t rep) {
  917|  64.2k|  if (!IsInlined(rep)) RepToPointer(rep)->Ref();
  ------------------
  |  Branch (917:7): [True: 0, False: 64.2k]
  ------------------
  918|  64.2k|}
_ZN4absl12lts_202401166Status5UnrefEm:
  920|  19.7M|inline void Status::Unref(uintptr_t rep) {
  921|  19.7M|  if (!IsInlined(rep)) RepToPointer(rep)->Unref();
  ------------------
  |  Branch (921:7): [True: 3.10k, False: 19.7M]
  ------------------
  922|  19.7M|}
_ZN4absl12lts_202401168OkStatusEv:
  924|  19.6M|inline Status OkStatus() { return Status(); }
_ZN4absl12lts_202401166StatusD2Ev:
  814|  19.7M|inline Status::~Status() { Unref(rep_); }
_ZN4absl12lts_202401166StatusC2Ev:
  772|  19.6M|inline Status::Status() : Status(absl::StatusCode::kOk) {}
_ZN4absl12lts_202401166StatusC2ENS0_10StatusCodeE:
  774|  19.6M|inline Status::Status(absl::StatusCode code) : Status(CodeToInlinedRep(code)) {}
_ZN4absl12lts_202401166StatusC2EOS1_:
  788|  3.06k|inline Status::Status(Status&& x) noexcept : Status(x.rep_) {
  789|  3.06k|  x.rep_ = MovedFromRep();
  790|  3.06k|}
_ZN4absl12lts_202401166StatusC2ERKS1_:
  776|  64.2k|inline Status::Status(const Status& x) : Status(x.rep_) { Ref(rep_); }

_ZNK4absl12lts_202401168StatusOrIN8fuzztest8internal11CopyableAnyEE2okEv:
  494|  15.9k|  ABSL_MUST_USE_RESULT bool ok() const { return this->status_.ok(); }
_ZNO4absl12lts_202401168StatusOrIN8fuzztest8internal11CopyableAnyEEdeEv:
  787|  12.8k|T&& StatusOr<T>::operator*() && {
  788|  12.8k|  this->EnsureOk();
  789|  12.8k|  return std::move(this->data_);
  790|  12.8k|}
_ZN4absl12lts_202401168StatusOrIN8fuzztest8internal11CopyableAnyEEC2INS0_6StatusETnNSt3__19enable_ifIXsr4absl11conjunctionINS8_14is_convertibleIOT_S7_EENS8_16is_constructibleIS7_JSC_EEENS0_8negationINS8_7is_sameINS8_5decayISB_E4typeES5_EEEENSG_INSH_ISK_S4_EEEENSG_INSH_ISK_NS8_10in_place_tEEEEENSG_INS0_17internal_statusor31HasConversionOperatorToStatusOrIS4_SC_vEEEEEE5valueEiE4typeELi0EEESC_:
  365|  3.06k|  StatusOr(U&& v) : Base(std::forward<U>(v)) {}
_ZN4absl12lts_202401168StatusOrIN8fuzztest8internal11CopyableAnyEEC2IRS4_TnNSt3__19enable_ifIXsr4absl11conjunctionINS0_11disjunctionIJNS8_7is_sameIS4_NS0_12remove_cvrefIOT_E4typeEEENS0_8negationINSA_IJNSB_IS5_SG_EENSB_INS0_6StatusESG_EENSB_INS8_10in_place_tESG_EENS0_17internal_statusor31IsDirectInitializationAmbiguousIS4_SE_EEEEEEEEEENS8_16is_constructibleIS4_JSE_EEENS8_14is_convertibleISE_S4_EENSA_IJNSB_INSC_ISD_E4typeES4_EENS0_11conjunctionIJNSI_INSW_ISE_SK_EEEENSI_INSO_31HasConversionOperatorToStatusOrIS4_SE_vEEEEEEEEEEEE5valueEiE4typeELi0EEESE_:
  460|  12.8k|      : StatusOr(absl::in_place, std::forward<U>(u)) {}
_ZN4absl12lts_202401168StatusOrIN8fuzztest8internal11CopyableAnyEEC2IJRS4_EEENSt3__110in_place_tEDpOT_:
  723|  12.8k|    : Base(absl::in_place, std::forward<Args>(args)...) {}

_ZN4absl12lts_2024011613ascii_isspaceEh:
   97|  51.9k|inline bool ascii_isspace(unsigned char c) {
   98|  51.9k|  return (ascii_internal::kPropertyBits[c] & 0x08) != 0;
   99|  51.9k|}
_ZN4absl12lts_2024011627StripLeadingAsciiWhitespaceENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  200|  24.7k|    absl::string_view str) {
  201|  24.7k|  auto it = std::find_if_not(str.begin(), str.end(), absl::ascii_isspace);
  202|  24.7k|  return str.substr(static_cast<size_t>(it - str.begin()));
  203|  24.7k|}
_ZN4absl12lts_2024011628StripTrailingAsciiWhitespaceENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  214|  24.7k|    absl::string_view str) {
  215|  24.7k|  auto it = std::find_if_not(str.rbegin(), str.rend(), absl::ascii_isspace);
  216|  24.7k|  return str.substr(0, static_cast<size_t>(str.rend() - it));
  217|  24.7k|}
_ZN4absl12lts_2024011620StripAsciiWhitespaceENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  228|  24.7k|    absl::string_view str) {
  229|  24.7k|  return StripTrailingAsciiWhitespace(StripLeadingAsciiWhitespace(str));
  230|  24.7k|}

_ZN4absl12lts_2024011610from_charsEPKcS2_RdNS0_12chars_formatE:
  953|  24.7k|                             chars_format fmt) {
  954|  24.7k|  return FromCharsImpl(first, last, value, fmt);
  955|  24.7k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_113FromCharsImplIdEENS0_17from_chars_resultEPKcS5_RT_NS0_12chars_formatE:
  866|  24.7k|                                FloatType& value, chars_format fmt_flags) {
  867|  24.7k|  from_chars_result result;
  868|  24.7k|  result.ptr = first;  // overwritten on successful parse
  869|  24.7k|  result.ec = std::errc();
  870|       |
  871|  24.7k|  bool negative = false;
  872|  24.7k|  if (first != last && *first == '-') {
  ------------------
  |  Branch (872:7): [True: 24.7k, False: 4]
  |  Branch (872:24): [True: 2.22k, False: 22.5k]
  ------------------
  873|  2.22k|    ++first;
  874|  2.22k|    negative = true;
  875|  2.22k|  }
  876|       |  // If the `hex` flag is *not* set, then we will accept a 0x prefix and try
  877|       |  // to parse a hexadecimal float.
  878|  24.7k|  if ((fmt_flags & chars_format::hex) == chars_format{} && last - first >= 2 &&
  ------------------
  |  Branch (878:7): [True: 24.7k, False: 0]
  |  Branch (878:60): [True: 23.0k, False: 1.73k]
  ------------------
  879|  23.0k|      *first == '0' && (first[1] == 'x' || first[1] == 'X')) {
  ------------------
  |  Branch (879:7): [True: 5.60k, False: 17.4k]
  |  Branch (879:25): [True: 2.06k, False: 3.54k]
  |  Branch (879:44): [True: 2.69k, False: 848]
  ------------------
  880|  4.75k|    const char* hex_first = first + 2;
  881|  4.75k|    strings_internal::ParsedFloat hex_parse =
  882|  4.75k|        strings_internal::ParseFloat<16>(hex_first, last, fmt_flags);
  883|  4.75k|    if (hex_parse.end == nullptr ||
  ------------------
  |  Branch (883:9): [True: 21, False: 4.73k]
  ------------------
  884|  4.73k|        hex_parse.type != strings_internal::FloatType::kNumber) {
  ------------------
  |  Branch (884:9): [True: 0, False: 4.73k]
  ------------------
  885|       |      // Either we failed to parse a hex float after the "0x", or we read
  886|       |      // "0xinf" or "0xnan" which we don't want to match.
  887|       |      //
  888|       |      // However, a string that begins with "0x" also begins with "0", which
  889|       |      // is normally a valid match for the number zero.  So we want these
  890|       |      // strings to match zero unless fmt_flags is `scientific`.  (This flag
  891|       |      // means an exponent is required, which the string "0" does not have.)
  892|     21|      if (fmt_flags == chars_format::scientific) {
  ------------------
  |  Branch (892:11): [True: 0, False: 21]
  ------------------
  893|      0|        result.ec = std::errc::invalid_argument;
  894|     21|      } else {
  895|     21|        result.ptr = first + 1;
  896|     21|        value = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (896:17): [True: 3, False: 18]
  ------------------
  897|     21|      }
  898|     21|      return result;
  899|     21|    }
  900|       |    // We matched a value.
  901|  4.73k|    result.ptr = hex_parse.end;
  902|  4.73k|    if (HandleEdgeCase(hex_parse, negative, &value)) {
  ------------------
  |  Branch (902:9): [True: 850, False: 3.88k]
  ------------------
  903|    850|      return result;
  904|    850|    }
  905|  3.88k|    CalculatedFloat calculated =
  906|  3.88k|        CalculateFromParsedHexadecimal<FloatType>(hex_parse);
  907|  3.88k|    EncodeResult(calculated, negative, &result, &value);
  908|  3.88k|    return result;
  909|  4.73k|  }
  910|       |  // Otherwise, we choose the number base based on the flags.
  911|  20.0k|  if ((fmt_flags & chars_format::hex) == chars_format::hex) {
  ------------------
  |  Branch (911:7): [True: 0, False: 20.0k]
  ------------------
  912|      0|    strings_internal::ParsedFloat hex_parse =
  913|      0|        strings_internal::ParseFloat<16>(first, last, fmt_flags);
  914|      0|    if (hex_parse.end == nullptr) {
  ------------------
  |  Branch (914:9): [True: 0, False: 0]
  ------------------
  915|      0|      result.ec = std::errc::invalid_argument;
  916|      0|      return result;
  917|      0|    }
  918|      0|    result.ptr = hex_parse.end;
  919|      0|    if (HandleEdgeCase(hex_parse, negative, &value)) {
  ------------------
  |  Branch (919:9): [True: 0, False: 0]
  ------------------
  920|      0|      return result;
  921|      0|    }
  922|      0|    CalculatedFloat calculated =
  923|      0|        CalculateFromParsedHexadecimal<FloatType>(hex_parse);
  924|      0|    EncodeResult(calculated, negative, &result, &value);
  925|      0|    return result;
  926|  20.0k|  } else {
  927|  20.0k|    strings_internal::ParsedFloat decimal_parse =
  928|  20.0k|        strings_internal::ParseFloat<10>(first, last, fmt_flags);
  929|  20.0k|    if (decimal_parse.end == nullptr) {
  ------------------
  |  Branch (929:9): [True: 103, False: 19.9k]
  ------------------
  930|    103|      result.ec = std::errc::invalid_argument;
  931|    103|      return result;
  932|    103|    }
  933|  19.9k|    result.ptr = decimal_parse.end;
  934|  19.9k|    if (HandleEdgeCase(decimal_parse, negative, &value)) {
  ------------------
  |  Branch (934:9): [True: 2.61k, False: 17.2k]
  ------------------
  935|  2.61k|      return result;
  936|  2.61k|    }
  937|       |    // A nullptr subrange_begin means that the decimal_parse.mantissa is exact
  938|       |    // (not truncated), a precondition of the Eisel-Lemire algorithm.
  939|  17.2k|    if ((decimal_parse.subrange_begin == nullptr) &&
  ------------------
  |  Branch (939:9): [True: 8.87k, False: 8.41k]
  ------------------
  940|  8.87k|        EiselLemire<FloatType>(decimal_parse, negative, &value, &result.ec)) {
  ------------------
  |  Branch (940:9): [True: 4.16k, False: 4.71k]
  ------------------
  941|  4.16k|      return result;
  942|  4.16k|    }
  943|  13.1k|    CalculatedFloat calculated =
  944|  13.1k|        CalculateFromParsedDecimal<FloatType>(decimal_parse);
  945|  13.1k|    EncodeResult(calculated, negative, &result, &value);
  946|  13.1k|    return result;
  947|  17.2k|  }
  948|  20.0k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_114HandleEdgeCaseIdEEbRKNS0_16strings_internal11ParsedFloatEbPT_:
  360|  24.6k|                    absl::Nonnull<FloatType*> value) {
  361|  24.6k|  if (input.type == strings_internal::FloatType::kNan) {
  ------------------
  |  Branch (361:7): [True: 579, False: 24.0k]
  ------------------
  362|       |    // A bug in both clang < 7 and gcc would cause the compiler to optimize
  363|       |    // away the buffer we are building below.  Declaring the buffer volatile
  364|       |    // avoids the issue, and has no measurable performance impact in
  365|       |    // microbenchmarks.
  366|       |    //
  367|       |    // https://bugs.llvm.org/show_bug.cgi?id=37778
  368|       |    // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86113
  369|    579|    constexpr ptrdiff_t kNanBufferSize = 128;
  370|       |#if (defined(__GNUC__) && !defined(__clang__)) || \
  371|       |    (defined(__clang__) && __clang_major__ < 7)
  372|       |    volatile char n_char_sequence[kNanBufferSize];
  373|       |#else
  374|    579|    char n_char_sequence[kNanBufferSize];
  375|    579|#endif
  376|    579|    if (input.subrange_begin == nullptr) {
  ------------------
  |  Branch (376:9): [True: 579, False: 0]
  ------------------
  377|    579|      n_char_sequence[0] = '\0';
  378|    579|    } else {
  379|      0|      ptrdiff_t nan_size = input.subrange_end - input.subrange_begin;
  380|      0|      nan_size = std::min(nan_size, kNanBufferSize - 1);
  381|      0|      std::copy_n(input.subrange_begin, nan_size, n_char_sequence);
  382|      0|      n_char_sequence[nan_size] = '\0';
  383|      0|    }
  384|    579|    char* nan_argument = const_cast<char*>(n_char_sequence);
  385|    579|    *value = negative ? -FloatTraits<FloatType>::MakeNan(nan_argument)
  ------------------
  |  Branch (385:14): [True: 67, False: 512]
  ------------------
  386|    579|                      : FloatTraits<FloatType>::MakeNan(nan_argument);
  387|    579|    return true;
  388|    579|  }
  389|  24.0k|  if (input.type == strings_internal::FloatType::kInfinity) {
  ------------------
  |  Branch (389:7): [True: 700, False: 23.3k]
  ------------------
  390|    700|    *value = negative ? -std::numeric_limits<FloatType>::infinity()
  ------------------
  |  Branch (390:14): [True: 0, False: 700]
  ------------------
  391|    700|                      : std::numeric_limits<FloatType>::infinity();
  392|    700|    return true;
  393|    700|  }
  394|  23.3k|  if (input.mantissa == 0) {
  ------------------
  |  Branch (394:7): [True: 2.18k, False: 21.1k]
  ------------------
  395|  2.18k|    *value = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (395:14): [True: 431, False: 1.75k]
  ------------------
  396|  2.18k|    return true;
  397|  2.18k|  }
  398|  21.1k|  return false;
  399|  23.3k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_111FloatTraitsIdE7MakeNanEPKc:
  123|    579|  static double MakeNan(absl::Nonnull<const char*> tagp) {
  124|    579|#if ABSL_HAVE_BUILTIN(__builtin_nan)
  125|       |    // Use __builtin_nan() if available since it has a fix for
  126|       |    // https://bugs.llvm.org/show_bug.cgi?id=37778
  127|       |    // std::nan may use the glibc implementation.
  128|    579|    return __builtin_nan(tagp);
  129|       |#else
  130|       |    // Support nan no matter which namespace it's in.  Some platforms
  131|       |    // incorrectly don't put it in namespace std.
  132|       |    using namespace std;  // NOLINT
  133|       |    return nan(tagp);
  134|       |#endif
  135|    579|  }
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_130CalculateFromParsedHexadecimalIdEENS1_15CalculatedFloatERKNS0_16strings_internal11ParsedFloatE:
  602|  3.88k|    const strings_internal::ParsedFloat& parsed_hex) {
  603|  3.88k|  uint64_t mantissa = parsed_hex.mantissa;
  604|  3.88k|  int exponent = parsed_hex.exponent;
  605|       |  // This static_cast is only needed when using a std::bit_width()
  606|       |  // implementation that does not have the fix for LWG 3656 applied.
  607|  3.88k|  int mantissa_width = static_cast<int>(bit_width(mantissa));
  608|  3.88k|  const int shift = NormalizedShiftSize<FloatType>(mantissa_width, exponent);
  609|  3.88k|  bool result_exact;
  610|  3.88k|  exponent += shift;
  611|  3.88k|  mantissa = ShiftRightAndRound(mantissa, shift,
  612|  3.88k|                                /* input exact= */ true, &result_exact);
  613|       |  // ParseFloat handles rounding in the hexadecimal case, so we don't have to
  614|       |  // check `result_exact` here.
  615|  3.88k|  return CalculatedFloatFromRawValues<FloatType>(mantissa, exponent);
  616|  3.88k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_119NormalizedShiftSizeIdEEiii:
  335|  16.6k|int NormalizedShiftSize(int mantissa_width, int binary_exponent) {
  336|  16.6k|  const int normal_shift =
  337|  16.6k|      mantissa_width - FloatTraits<FloatType>::kTargetMantissaBits;
  338|  16.6k|  const int minimum_shift =
  339|  16.6k|      FloatTraits<FloatType>::kMinNormalExponent - binary_exponent;
  340|  16.6k|  return std::max(normal_shift, minimum_shift);
  341|  16.6k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_118ShiftRightAndRoundENS0_7uint128EibPb:
  456|  16.6k|                            absl::Nonnull<bool*> output_exact) {
  457|  16.6k|  if (shift <= 0) {
  ------------------
  |  Branch (457:7): [True: 2.01k, False: 14.6k]
  ------------------
  458|  2.01k|    *output_exact = input_exact;
  459|  2.01k|    return static_cast<uint64_t>(value << -shift);
  460|  2.01k|  }
  461|  14.6k|  if (shift >= 128) {
  ------------------
  |  Branch (461:7): [True: 310, False: 14.3k]
  ------------------
  462|       |    // Exponent is so small that we are shifting away all significant bits.
  463|       |    // Answer will not be representable, even as a subnormal, so return a zero
  464|       |    // mantissa (which represents underflow).
  465|    310|    *output_exact = true;
  466|    310|    return 0;
  467|    310|  }
  468|       |
  469|  14.3k|  *output_exact = true;
  470|  14.3k|  const uint128 shift_mask = (uint128(1) << shift) - 1;
  471|  14.3k|  const uint128 halfway_point = uint128(1) << (shift - 1);
  472|       |
  473|  14.3k|  const uint128 shifted_bits = value & shift_mask;
  474|  14.3k|  value >>= shift;
  475|  14.3k|  if (shifted_bits > halfway_point) {
  ------------------
  |  Branch (475:7): [True: 2.13k, False: 12.2k]
  ------------------
  476|       |    // Shifted bits greater than 10000... require rounding up.
  477|  2.13k|    return static_cast<uint64_t>(value + 1);
  478|  2.13k|  }
  479|  12.2k|  if (shifted_bits == halfway_point) {
  ------------------
  |  Branch (479:7): [True: 1.85k, False: 10.3k]
  ------------------
  480|       |    // In exact mode, shifted bits of 10000... mean we're exactly halfway
  481|       |    // between two numbers, and we must round to even.  So only round up if
  482|       |    // the low bit of `value` is set.
  483|       |    //
  484|       |    // In inexact mode, the nonzero error means the actual value is greater
  485|       |    // than the halfway point and we must always round up.
  486|  1.85k|    if ((value & 1) == 1 || !input_exact) {
  ------------------
  |  Branch (486:9): [True: 412, False: 1.44k]
  |  Branch (486:29): [True: 216, False: 1.23k]
  ------------------
  487|    628|      ++value;
  488|    628|    }
  489|  1.85k|    return static_cast<uint64_t>(value);
  490|  1.85k|  }
  491|  10.3k|  if (!input_exact && shifted_bits == halfway_point - 1) {
  ------------------
  |  Branch (491:7): [True: 9.65k, False: 725]
  |  Branch (491:23): [True: 8.74k, False: 910]
  ------------------
  492|       |    // Rounding direction is unclear, due to error.
  493|  8.74k|    *output_exact = false;
  494|  8.74k|  }
  495|       |  // Otherwise, round down.
  496|  10.3k|  return static_cast<uint64_t>(value);
  497|  12.2k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_128CalculatedFloatFromRawValuesIdEENS1_15CalculatedFloatEmi:
  583|  16.6k|CalculatedFloat CalculatedFloatFromRawValues(uint64_t mantissa, int exponent) {
  584|  16.6k|  CalculatedFloat result;
  585|  16.6k|  if (mantissa == uint64_t{1} << FloatTraits<FloatType>::kTargetMantissaBits) {
  ------------------
  |  Branch (585:7): [True: 784, False: 15.9k]
  ------------------
  586|    784|    mantissa >>= 1;
  587|    784|    exponent += 1;
  588|    784|  }
  589|  16.6k|  if (exponent > FloatTraits<FloatType>::kMaxExponent) {
  ------------------
  |  Branch (589:7): [True: 1.40k, False: 15.2k]
  ------------------
  590|  1.40k|    result.exponent = kOverflow;
  591|  15.2k|  } else if (mantissa == 0) {
  ------------------
  |  Branch (591:14): [True: 982, False: 14.3k]
  ------------------
  592|    982|    result.exponent = kUnderflow;
  593|  14.3k|  } else {
  594|  14.3k|    result.exponent = exponent;
  595|  14.3k|    result.mantissa = mantissa;
  596|  14.3k|  }
  597|  16.6k|  return result;
  598|  16.6k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_112EncodeResultIdEEvRKNS1_15CalculatedFloatEbPNS0_17from_chars_resultEPT_:
  410|  17.0k|                  absl::Nonnull<FloatType*> value) {
  411|  17.0k|  if (calculated.exponent == kOverflow) {
  ------------------
  |  Branch (411:7): [True: 1.61k, False: 15.3k]
  ------------------
  412|  1.61k|    result->ec = std::errc::result_out_of_range;
  413|  1.61k|    *value = negative ? -std::numeric_limits<FloatType>::max()
  ------------------
  |  Branch (413:14): [True: 30, False: 1.58k]
  ------------------
  414|  1.61k|                      : std::numeric_limits<FloatType>::max();
  415|  1.61k|    return;
  416|  15.3k|  } else if (calculated.mantissa == 0 || calculated.exponent == kUnderflow) {
  ------------------
  |  Branch (416:14): [True: 1.08k, False: 14.3k]
  |  Branch (416:42): [True: 0, False: 14.3k]
  ------------------
  417|  1.08k|    result->ec = std::errc::result_out_of_range;
  418|  1.08k|    *value = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (418:14): [True: 164, False: 918]
  ------------------
  419|  1.08k|    return;
  420|  1.08k|  }
  421|  14.3k|  *value = FloatTraits<FloatType>::Make(
  422|  14.3k|      static_cast<typename FloatTraits<FloatType>::mantissa_t>(
  423|  14.3k|          calculated.mantissa),
  424|  14.3k|      calculated.exponent, negative);
  425|  14.3k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_111FloatTraitsIdE4MakeEmib:
  150|  14.3k|  static double Make(mantissa_t mantissa, int exponent, bool sign) {
  151|       |#ifndef ABSL_BIT_PACK_FLOATS
  152|       |    // Support ldexp no matter which namespace it's in.  Some platforms
  153|       |    // incorrectly don't put it in namespace std.
  154|       |    using namespace std;  // NOLINT
  155|       |    return sign ? -ldexp(mantissa, exponent) : ldexp(mantissa, exponent);
  156|       |#else
  157|  14.3k|    constexpr uint64_t kMantissaMask =
  158|  14.3k|        (uint64_t{1} << (kTargetMantissaBits - 1)) - 1;
  159|  14.3k|    uint64_t dbl = static_cast<uint64_t>(sign) << 63;
  160|  14.3k|    if (mantissa > kMantissaMask) {
  ------------------
  |  Branch (160:9): [True: 12.9k, False: 1.33k]
  ------------------
  161|       |      // Normal value.
  162|       |      // Adjust by 1023 for the exponent representation bias, and an additional
  163|       |      // 52 due to the implied decimal point in the IEEE mantissa
  164|       |      // representation.
  165|  12.9k|      dbl += static_cast<uint64_t>(exponent + 1023 + kTargetMantissaBits - 1)
  166|  12.9k|             << 52;
  167|  12.9k|      mantissa &= kMantissaMask;
  168|  12.9k|    } else {
  169|       |      // subnormal value
  170|       |      assert(exponent == kMinNormalExponent);
  171|  1.33k|    }
  172|  14.3k|    dbl += mantissa;
  173|  14.3k|    return absl::bit_cast<double>(dbl);
  174|  14.3k|#endif  // ABSL_BIT_PACK_FLOATS
  175|  14.3k|  }
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_111EiselLemireIdEEbRKNS0_16strings_internal11ParsedFloatEbPT_PNSt3__14errcE:
  691|  8.87k|                 absl::Nonnull<std::errc*> ec) {
  692|  8.87k|  uint64_t man = input.mantissa;
  693|  8.87k|  int exp10 = input.exponent;
  694|  8.87k|  if (exp10 < FloatTraits<FloatType>::kEiselLemireMinInclusiveExp10) {
  ------------------
  |  Branch (694:7): [True: 351, False: 8.52k]
  ------------------
  695|    351|    *value = negative ? -0.0 : 0.0;
  ------------------
  |  Branch (695:14): [True: 2, False: 349]
  ------------------
  696|    351|    *ec = std::errc::result_out_of_range;
  697|    351|    return true;
  698|  8.52k|  } else if (exp10 >= FloatTraits<FloatType>::kEiselLemireMaxExclusiveExp10) {
  ------------------
  |  Branch (698:14): [True: 334, False: 8.19k]
  ------------------
  699|       |    // Return max (a finite value) consistent with from_chars and DR 3081. For
  700|       |    // SimpleAtod and SimpleAtof, post-processing will return infinity.
  701|    334|    *value = negative ? -std::numeric_limits<FloatType>::max()
  ------------------
  |  Branch (701:14): [True: 93, False: 241]
  ------------------
  702|    334|                      : std::numeric_limits<FloatType>::max();
  703|    334|    *ec = std::errc::result_out_of_range;
  704|    334|    return true;
  705|    334|  }
  706|       |
  707|       |  // Assert kPower10TableMinInclusive <= exp10 < kPower10TableMaxExclusive.
  708|       |  // Equivalently, !Power10Underflow(exp10) and !Power10Overflow(exp10).
  709|  8.19k|  static_assert(
  710|  8.19k|      FloatTraits<FloatType>::kEiselLemireMinInclusiveExp10 >=
  711|  8.19k|          kPower10TableMinInclusive,
  712|  8.19k|      "(exp10-kPower10TableMinInclusive) in kPower10MantissaHighTable bounds");
  713|  8.19k|  static_assert(
  714|  8.19k|      FloatTraits<FloatType>::kEiselLemireMaxExclusiveExp10 <=
  715|  8.19k|          kPower10TableMaxExclusive,
  716|  8.19k|      "(exp10-kPower10TableMinInclusive) in kPower10MantissaHighTable bounds");
  717|       |
  718|       |  // The terse (+) comments in this function body refer to sections of the
  719|       |  // https://nigeltao.github.io/blog/2020/eisel-lemire.html blog post.
  720|       |  //
  721|       |  // That blog post discusses double precision (11 exponent bits with a -1023
  722|       |  // bias, 52 mantissa bits), but the same approach applies to single precision
  723|       |  // (8 exponent bits with a -127 bias, 23 mantissa bits). Either way, the
  724|       |  // computation here happens with 64-bit values (e.g. man) or 128-bit values
  725|       |  // (e.g. x) before finally converting to 64- or 32-bit floating point.
  726|       |  //
  727|       |  // See also "Number Parsing at a Gigabyte per Second, Software: Practice and
  728|       |  // Experience 51 (8), 2021" (https://arxiv.org/abs/2101.11408) for detail.
  729|       |
  730|       |  // (+) Normalization.
  731|  8.19k|  int clz = countl_zero(man);
  732|  8.19k|  man <<= static_cast<unsigned int>(clz);
  733|       |  // The 217706 etc magic numbers are from the Power10Exponent function.
  734|  8.19k|  uint64_t ret_exp2 =
  735|  8.19k|      static_cast<uint64_t>((217706 * exp10 >> 16) + 64 +
  736|  8.19k|                            FloatTraits<FloatType>::kExponentBias - clz);
  737|       |
  738|       |  // (+) Multiplication.
  739|  8.19k|  uint128 x = static_cast<uint128>(man) *
  740|  8.19k|              static_cast<uint128>(
  741|  8.19k|                  kPower10MantissaHighTable[exp10 - kPower10TableMinInclusive]);
  742|       |
  743|       |  // (+) Wider Approximation.
  744|  8.19k|  static constexpr uint64_t high64_mask =
  745|  8.19k|      FloatTraits<FloatType>::kEiselLemireMask;
  746|  8.19k|  if (((Uint128High64(x) & high64_mask) == high64_mask) &&
  ------------------
  |  Branch (746:7): [True: 2.44k, False: 5.74k]
  ------------------
  747|  2.44k|      (man > (std::numeric_limits<uint64_t>::max() - Uint128Low64(x)))) {
  ------------------
  |  Branch (747:7): [True: 1.90k, False: 537]
  ------------------
  748|  1.90k|    uint128 y =
  749|  1.90k|        static_cast<uint128>(man) *
  750|  1.90k|        static_cast<uint128>(
  751|  1.90k|            kPower10MantissaLowTable[exp10 - kPower10TableMinInclusive]);
  752|  1.90k|    x += Uint128High64(y);
  753|       |    // For example, parsing "4503599627370497.5" will take the if-true
  754|       |    // branch here (for double precision), since:
  755|       |    //  - x   = 0x8000000000000BFF_FFFFFFFFFFFFFFFF
  756|       |    //  - y   = 0x8000000000000BFF_7FFFFFFFFFFFF400
  757|       |    //  - man = 0xA000000000000F00
  758|       |    // Likewise, when parsing "0.0625" for single precision:
  759|       |    //  - x   = 0x7FFFFFFFFFFFFFFF_FFFFFFFFFFFFFFFF
  760|       |    //  - y   = 0x813FFFFFFFFFFFFF_8A00000000000000
  761|       |    //  - man = 0x9C40000000000000
  762|  1.90k|    if (((Uint128High64(x) & high64_mask) == high64_mask) &&
  ------------------
  |  Branch (762:9): [True: 1.85k, False: 52]
  ------------------
  763|  1.85k|        ((Uint128Low64(x) + 1) == 0) &&
  ------------------
  |  Branch (763:9): [True: 1.55k, False: 300]
  ------------------
  764|  1.55k|        (man > (std::numeric_limits<uint64_t>::max() - Uint128Low64(y)))) {
  ------------------
  |  Branch (764:9): [True: 1.55k, False: 0]
  ------------------
  765|  1.55k|      return false;
  766|  1.55k|    }
  767|  1.90k|  }
  768|       |
  769|       |  // (+) Shifting to 54 Bits (or for single precision, to 25 bits).
  770|  6.63k|  uint64_t msb = Uint128High64(x) >> 63;
  771|  6.63k|  uint64_t ret_man =
  772|  6.63k|      Uint128High64(x) >> (msb + FloatTraits<FloatType>::kEiselLemireShift);
  773|  6.63k|  ret_exp2 -= 1 ^ msb;
  774|       |
  775|       |  // (+) Half-way Ambiguity.
  776|       |  //
  777|       |  // For example, parsing "1e+23" will take the if-true branch here (for double
  778|       |  // precision), since:
  779|       |  //  - x       = 0x54B40B1F852BDA00_0000000000000000
  780|       |  //  - ret_man = 0x002A5A058FC295ED
  781|       |  // Likewise, when parsing "20040229.0" for single precision:
  782|       |  //  - x       = 0x4C72894000000000_0000000000000000
  783|       |  //  - ret_man = 0x000000000131CA25
  784|  6.63k|  if ((Uint128Low64(x) == 0) && ((Uint128High64(x) & high64_mask) == 0) &&
  ------------------
  |  Branch (784:7): [True: 3.82k, False: 2.81k]
  |  Branch (784:33): [True: 2.77k, False: 1.04k]
  ------------------
  785|  2.77k|      ((ret_man & 3) == 1)) {
  ------------------
  |  Branch (785:7): [True: 926, False: 1.84k]
  ------------------
  786|    926|    return false;
  787|    926|  }
  788|       |
  789|       |  // (+) From 54 to 53 Bits (or for single precision, from 25 to 24 bits).
  790|  5.71k|  ret_man += ret_man & 1;  // Line From54a.
  791|  5.71k|  ret_man >>= 1;           // Line From54b.
  792|       |  // Incrementing ret_man (at line From54a) may have overflowed 54 bits (53
  793|       |  // bits after the right shift by 1 at line From54b), so adjust for that.
  794|       |  //
  795|       |  // For example, parsing "9223372036854775807" will take the if-true branch
  796|       |  // here (for double precision), since:
  797|       |  //  - ret_man = 0x0020000000000000 = (1 << 53)
  798|       |  // Likewise, when parsing "2147483647.0" for single precision:
  799|       |  //  - ret_man = 0x0000000001000000 = (1 << 24)
  800|  5.71k|  if ((ret_man >> FloatTraits<FloatType>::kTargetMantissaBits) > 0) {
  ------------------
  |  Branch (800:7): [True: 329, False: 5.38k]
  ------------------
  801|    329|    ret_exp2 += 1;
  802|       |    // Conceptually, we need a "ret_man >>= 1" in this if-block to balance
  803|       |    // incrementing ret_exp2 in the line immediately above. However, we only
  804|       |    // get here when line From54a overflowed (after adding a 1), so ret_man
  805|       |    // here is (1 << 53). Its low 53 bits are therefore all zeroes. The only
  806|       |    // remaining use of ret_man is to mask it with ((1 << 52) - 1), so only its
  807|       |    // low 52 bits matter. A "ret_man >>= 1" would have no effect in practice.
  808|       |    //
  809|       |    // We omit the "ret_man >>= 1", even if it is cheap (and this if-branch is
  810|       |    // rarely taken) and technically 'more correct', so that mutation tests
  811|       |    // that would otherwise modify or omit that "ret_man >>= 1" don't complain
  812|       |    // that such code mutations have no observable effect.
  813|    329|  }
  814|       |
  815|       |  // ret_exp2 is a uint64_t. Zero or underflow means that we're in subnormal
  816|       |  // space. max_exp2 (0x7FF for double precision, 0xFF for single precision) or
  817|       |  // above means that we're in Inf/NaN space.
  818|       |  //
  819|       |  // The if block is equivalent to (but has fewer branches than):
  820|       |  //   if ((ret_exp2 <= 0) || (ret_exp2 >= max_exp2)) { etc }
  821|       |  //
  822|       |  // For example, parsing "4.9406564584124654e-324" will take the if-true
  823|       |  // branch here, since ret_exp2 = -51.
  824|  5.71k|  static constexpr uint64_t max_exp2 =
  825|  5.71k|      (1 << FloatTraits<FloatType>::kTargetExponentBits) - 1;
  826|  5.71k|  if ((ret_exp2 - 1) >= (max_exp2 - 1)) {
  ------------------
  |  Branch (826:7): [True: 2.23k, False: 3.48k]
  ------------------
  827|  2.23k|    return false;
  828|  2.23k|  }
  829|       |
  830|       |#ifndef ABSL_BIT_PACK_FLOATS
  831|       |  if (FloatTraits<FloatType>::kTargetBits == 64) {
  832|       |    *value = FloatTraits<FloatType>::Make(
  833|       |        (ret_man & 0x000FFFFFFFFFFFFFu) | 0x0010000000000000u,
  834|       |        static_cast<int>(ret_exp2) - 1023 - 52, negative);
  835|       |    return true;
  836|       |  } else if (FloatTraits<FloatType>::kTargetBits == 32) {
  837|       |    *value = FloatTraits<FloatType>::Make(
  838|       |        (static_cast<uint32_t>(ret_man) & 0x007FFFFFu) | 0x00800000u,
  839|       |        static_cast<int>(ret_exp2) - 127 - 23, negative);
  840|       |    return true;
  841|       |  }
  842|       |#else
  843|  3.48k|  if (FloatTraits<FloatType>::kTargetBits == 64) {
  ------------------
  |  Branch (843:7): [True: 3.48k, Folded]
  ------------------
  844|  3.48k|    uint64_t ret_bits = (ret_exp2 << 52) | (ret_man & 0x000FFFFFFFFFFFFFu);
  845|  3.48k|    if (negative) {
  ------------------
  |  Branch (845:9): [True: 530, False: 2.95k]
  ------------------
  846|    530|      ret_bits |= 0x8000000000000000u;
  847|    530|    }
  848|  3.48k|    *value = absl::bit_cast<double>(ret_bits);
  849|  3.48k|    return true;
  850|  3.48k|  } else if (FloatTraits<FloatType>::kTargetBits == 32) {
  ------------------
  |  Branch (850:14): [Folded, False: 0]
  ------------------
  851|      0|    uint32_t ret_bits = (static_cast<uint32_t>(ret_exp2) << 23) |
  852|      0|                        (static_cast<uint32_t>(ret_man) & 0x007FFFFFu);
  853|      0|    if (negative) {
  ------------------
  |  Branch (853:9): [True: 0, False: 0]
  ------------------
  854|      0|      ret_bits |= 0x80000000u;
  855|      0|    }
  856|      0|    *value = absl::bit_cast<float>(ret_bits);
  857|      0|    return true;
  858|      0|  }
  859|      0|#endif  // ABSL_BIT_PACK_FLOATS
  860|      0|  return false;
  861|  3.48k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_126CalculateFromParsedDecimalIdEENS1_15CalculatedFloatERKNS0_16strings_internal11ParsedFloatE:
  620|  13.1k|    const strings_internal::ParsedFloat& parsed_decimal) {
  621|  13.1k|  CalculatedFloat result;
  622|       |
  623|       |  // Large or small enough decimal exponents will always result in overflow
  624|       |  // or underflow.
  625|  13.1k|  if (Power10Underflow(parsed_decimal.exponent)) {
  ------------------
  |  Branch (625:7): [True: 100, False: 13.0k]
  ------------------
  626|    100|    result.exponent = kUnderflow;
  627|    100|    return result;
  628|  13.0k|  } else if (Power10Overflow(parsed_decimal.exponent)) {
  ------------------
  |  Branch (628:14): [True: 218, False: 12.8k]
  ------------------
  629|    218|    result.exponent = kOverflow;
  630|    218|    return result;
  631|    218|  }
  632|       |
  633|       |  // Otherwise convert our power of 10 into a power of 2 times an integer
  634|       |  // mantissa, and multiply this by our parsed decimal mantissa.
  635|  12.8k|  uint128 wide_binary_mantissa = parsed_decimal.mantissa;
  636|  12.8k|  wide_binary_mantissa *= Power10Mantissa(parsed_decimal.exponent);
  637|  12.8k|  int binary_exponent = Power10Exponent(parsed_decimal.exponent);
  638|       |
  639|       |  // Discard bits that are inaccurate due to truncation error.  The magic
  640|       |  // `mantissa_width` constants below are justified in
  641|       |  // https://abseil.io/about/design/charconv. They represent the number of bits
  642|       |  // in `wide_binary_mantissa` that are guaranteed to be unaffected by error
  643|       |  // propagation.
  644|  12.8k|  bool mantissa_exact;
  645|  12.8k|  int mantissa_width;
  646|  12.8k|  if (parsed_decimal.subrange_begin) {
  ------------------
  |  Branch (646:7): [True: 8.09k, False: 4.71k]
  ------------------
  647|       |    // Truncated mantissa
  648|  8.09k|    mantissa_width = 58;
  649|  8.09k|    mantissa_exact = false;
  650|  8.09k|    binary_exponent +=
  651|  8.09k|        TruncateToBitWidth(mantissa_width, &wide_binary_mantissa);
  652|  8.09k|  } else if (!Power10Exact(parsed_decimal.exponent)) {
  ------------------
  |  Branch (652:14): [True: 3.78k, False: 926]
  ------------------
  653|       |    // Exact mantissa, truncated power of ten
  654|  3.78k|    mantissa_width = 63;
  655|  3.78k|    mantissa_exact = false;
  656|  3.78k|    binary_exponent +=
  657|  3.78k|        TruncateToBitWidth(mantissa_width, &wide_binary_mantissa);
  658|  3.78k|  } else {
  659|       |    // Product is exact
  660|    926|    mantissa_width = BitWidth(wide_binary_mantissa);
  661|    926|    mantissa_exact = true;
  662|    926|  }
  663|       |
  664|       |  // Shift into an FloatType-sized mantissa, and round to nearest.
  665|  12.8k|  const int shift =
  666|  12.8k|      NormalizedShiftSize<FloatType>(mantissa_width, binary_exponent);
  667|  12.8k|  bool result_exact;
  668|  12.8k|  binary_exponent += shift;
  669|  12.8k|  uint64_t binary_mantissa = ShiftRightAndRound(wide_binary_mantissa, shift,
  670|  12.8k|                                                mantissa_exact, &result_exact);
  671|  12.8k|  if (!result_exact) {
  ------------------
  |  Branch (671:7): [True: 8.74k, False: 4.05k]
  ------------------
  672|       |    // We could not determine the rounding direction using int128 math.  Use
  673|       |    // full resolution math instead.
  674|  8.74k|    if (MustRoundUp(binary_mantissa, binary_exponent, parsed_decimal)) {
  ------------------
  |  Branch (674:9): [True: 1.89k, False: 6.85k]
  ------------------
  675|  1.89k|      binary_mantissa += 1;
  676|  1.89k|    }
  677|  8.74k|  }
  678|       |
  679|  12.8k|  return CalculatedFloatFromRawValues<FloatType>(binary_mantissa,
  680|  12.8k|                                                 binary_exponent);
  681|  13.1k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_116Power10UnderflowEi:
  288|  13.1k|bool Power10Underflow(int n) { return n < kPower10TableMinInclusive; }
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_115Power10OverflowEi:
  284|  13.0k|bool Power10Overflow(int n) { return n >= kPower10TableMaxExclusive; }
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_115Power10MantissaEi:
  270|  12.8k|uint64_t Power10Mantissa(int n) {
  271|  12.8k|  return kPower10MantissaHighTable[n - kPower10TableMinInclusive];
  272|  12.8k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_115Power10ExponentEi:
  274|  12.8k|int Power10Exponent(int n) {
  275|       |  // The 217706 etc magic numbers encode the results as a formula instead of a
  276|       |  // table. Their equivalence (over the kPower10TableMinInclusive ..
  277|       |  // kPower10TableMaxExclusive range) is confirmed by
  278|       |  // https://github.com/google/wuffs/blob/315b2e52625ebd7b02d8fac13e3cd85ea374fb80/script/print-mpb-powers-of-10.go
  279|  12.8k|  return (217706 * n >> 16) - 63;
  280|  12.8k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_118TruncateToBitWidthEiPNS0_7uint128E:
  348|  11.8k|int TruncateToBitWidth(int bit_width, absl::Nonnull<uint128*> value) {
  349|  11.8k|  const int current_bit_width = BitWidth(*value);
  350|  11.8k|  const int shift = current_bit_width - bit_width;
  351|  11.8k|  *value >>= shift;
  352|  11.8k|  return shift;
  353|  11.8k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_112Power10ExactEi:
  293|  4.71k|bool Power10Exact(int n) { return n >= 0 && n <= 27; }
  ------------------
  |  Branch (293:35): [True: 2.04k, False: 2.66k]
  |  Branch (293:45): [True: 926, False: 1.11k]
  ------------------
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_18BitWidthENS0_7uint128E:
  317|  12.8k|int BitWidth(uint128 value) {
  318|  12.8k|  if (Uint128High64(value) == 0) {
  ------------------
  |  Branch (318:7): [True: 1.17k, False: 11.6k]
  ------------------
  319|       |    // This static_cast is only needed when using a std::bit_width()
  320|       |    // implementation that does not have the fix for LWG 3656 applied.
  321|  1.17k|    return static_cast<int>(bit_width(Uint128Low64(value)));
  322|  1.17k|  }
  323|  11.6k|  return 128 - countl_zero(Uint128High64(value));
  324|  12.8k|}
charconv.cc:_ZN4absl12lts_2024011612_GLOBAL__N_111MustRoundUpEmiRKNS0_16strings_internal11ParsedFloatE:
  513|  8.74k|                 const strings_internal::ParsedFloat& parsed_decimal) {
  514|       |  // 768 is the number of digits needed in the worst case.  We could determine a
  515|       |  // better limit dynamically based on the value of parsed_decimal.exponent.
  516|       |  // This would optimize pathological input cases only.  (Sane inputs won't have
  517|       |  // hundreds of digits of mantissa.)
  518|  8.74k|  absl::strings_internal::BigUnsigned<84> exact_mantissa;
  519|  8.74k|  int exact_exponent = exact_mantissa.ReadFloatMantissa(parsed_decimal, 768);
  520|       |
  521|       |  // Adjust the `guess` arguments to be halfway between A and B.
  522|  8.74k|  guess_mantissa = guess_mantissa * 2 + 1;
  523|  8.74k|  guess_exponent -= 1;
  524|       |
  525|       |  // In our comparison:
  526|       |  // lhs = exact = exact_mantissa * 10**exact_exponent
  527|       |  //             = exact_mantissa * 5**exact_exponent * 2**exact_exponent
  528|       |  // rhs = guess = guess_mantissa * 2**guess_exponent
  529|       |  //
  530|       |  // Because we are doing integer math, we can't directly deal with negative
  531|       |  // exponents.  We instead move these to the other side of the inequality.
  532|  8.74k|  absl::strings_internal::BigUnsigned<84>& lhs = exact_mantissa;
  533|  8.74k|  int comparison;
  534|  8.74k|  if (exact_exponent >= 0) {
  ------------------
  |  Branch (534:7): [True: 3.52k, False: 5.22k]
  ------------------
  535|  3.52k|    lhs.MultiplyByFiveToTheNth(exact_exponent);
  536|  3.52k|    absl::strings_internal::BigUnsigned<84> rhs(guess_mantissa);
  537|       |    // There are powers of 2 on both sides of the inequality; reduce this to
  538|       |    // a single bit-shift.
  539|  3.52k|    if (exact_exponent > guess_exponent) {
  ------------------
  |  Branch (539:9): [True: 0, False: 3.52k]
  ------------------
  540|      0|      lhs.ShiftLeft(exact_exponent - guess_exponent);
  541|  3.52k|    } else {
  542|  3.52k|      rhs.ShiftLeft(guess_exponent - exact_exponent);
  543|  3.52k|    }
  544|  3.52k|    comparison = Compare(lhs, rhs);
  545|  5.22k|  } else {
  546|       |    // Move the power of 5 to the other side of the equation, giving us:
  547|       |    // lhs = exact_mantissa * 2**exact_exponent
  548|       |    // rhs = guess_mantissa * 5**(-exact_exponent) * 2**guess_exponent
  549|  5.22k|    absl::strings_internal::BigUnsigned<84> rhs =
  550|  5.22k|        absl::strings_internal::BigUnsigned<84>::FiveToTheNth(-exact_exponent);
  551|  5.22k|    rhs.MultiplyBy(guess_mantissa);
  552|  5.22k|    if (exact_exponent > guess_exponent) {
  ------------------
  |  Branch (552:9): [True: 2.00k, False: 3.22k]
  ------------------
  553|  2.00k|      lhs.ShiftLeft(exact_exponent - guess_exponent);
  554|  3.22k|    } else {
  555|  3.22k|      rhs.ShiftLeft(guess_exponent - exact_exponent);
  556|  3.22k|    }
  557|  5.22k|    comparison = Compare(lhs, rhs);
  558|  5.22k|  }
  559|  8.74k|  if (comparison < 0) {
  ------------------
  |  Branch (559:7): [True: 6.63k, False: 2.11k]
  ------------------
  560|  6.63k|    return false;
  561|  6.63k|  } else if (comparison > 0) {
  ------------------
  |  Branch (561:14): [True: 1.46k, False: 656]
  ------------------
  562|  1.46k|    return true;
  563|  1.46k|  } else {
  564|       |    // When lhs == rhs, the decimal input is exactly between A and B.
  565|       |    // Round towards even -- round up only if the low bit of the initial
  566|       |    // `guess_mantissa` was a 1.  We shifted guess_mantissa left 1 bit at
  567|       |    // the beginning of this function, so test the 2nd bit here.
  568|    656|    return (guess_mantissa & 2) == 2;
  569|    656|  }
  570|  8.74k|}

_ZN4absl12lts_20240116anENS0_12chars_formatES1_:
   92|   117k|inline constexpr chars_format operator&(chars_format lhs, chars_format rhs) {
   93|   117k|  return static_cast<chars_format>(static_cast<int>(lhs) &
   94|   117k|                                   static_cast<int>(rhs));
   95|   117k|}

_ZN4absl12lts_2024011619WebSafeBase64EscapeENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  914|      2|std::string WebSafeBase64Escape(absl::string_view src) {
  915|      2|  std::string dest;
  916|      2|  strings_internal::Base64EscapeInternal(
  917|      2|      reinterpret_cast<const unsigned char*>(src.data()), src.size(), &dest,
  918|      2|      false, strings_internal::kWebSafeBase64Chars);
  919|      2|  return dest;
  920|      2|}

_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE17ReadFloatMantissaERKNS1_11ParsedFloatEi:
  172|  8.74k|                                              int significant_digits) {
  173|  8.74k|  SetToZero();
  174|  8.74k|  assert(fp.type == FloatType::kNumber);
  175|       |
  176|  8.74k|  if (fp.subrange_begin == nullptr) {
  ------------------
  |  Branch (176:7): [True: 1.48k, False: 7.26k]
  ------------------
  177|       |    // We already exactly parsed the mantissa, so no more work is necessary.
  178|  1.48k|    words_[0] = fp.mantissa & 0xffffffffu;
  179|  1.48k|    words_[1] = fp.mantissa >> 32;
  180|  1.48k|    if (words_[1]) {
  ------------------
  |  Branch (180:9): [True: 460, False: 1.02k]
  ------------------
  181|    460|      size_ = 2;
  182|  1.02k|    } else if (words_[0]) {
  ------------------
  |  Branch (182:16): [True: 1.02k, False: 0]
  ------------------
  183|  1.02k|      size_ = 1;
  184|  1.02k|    }
  185|  1.48k|    return fp.exponent;
  186|  1.48k|  }
  187|  7.26k|  int exponent_adjust =
  188|  7.26k|      ReadDigits(fp.subrange_begin, fp.subrange_end, significant_digits);
  189|  7.26k|  return fp.literal_exponent + exponent_adjust;
  190|  8.74k|}
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE12FiveToTheNthEi:
  289|  5.22k|    int n) {
  290|  5.22k|  BigUnsigned answer(1u);
  291|       |
  292|       |  // Seed from the table of large powers, if possible.
  293|  5.22k|  bool first_pass = true;
  294|  10.6k|  while (n >= kLargePowerOfFiveStep) {
  ------------------
  |  Branch (294:10): [True: 5.37k, False: 5.22k]
  ------------------
  295|  5.37k|    int big_power =
  296|  5.37k|        std::min(n / kLargePowerOfFiveStep, kLargestPowerOfFiveIndex);
  297|  5.37k|    if (first_pass) {
  ------------------
  |  Branch (297:9): [True: 3.17k, False: 2.20k]
  ------------------
  298|       |      // just copy, rather than multiplying by 1
  299|  3.17k|      std::copy_n(LargePowerOfFiveData(big_power),
  300|  3.17k|                  LargePowerOfFiveSize(big_power), answer.words_);
  301|  3.17k|      answer.size_ = LargePowerOfFiveSize(big_power);
  302|  3.17k|      first_pass = false;
  303|  3.17k|    } else {
  304|  2.20k|      answer.MultiplyBy(LargePowerOfFiveSize(big_power),
  305|  2.20k|                        LargePowerOfFiveData(big_power));
  306|  2.20k|    }
  307|  5.37k|    n -= kLargePowerOfFiveStep * big_power;
  308|  5.37k|  }
  309|  5.22k|  answer.MultiplyByFiveToTheNth(n);
  310|  5.22k|  return answer;
  311|  5.22k|}
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE10ReadDigitsEPKcS5_i:
  194|  7.26k|                                       int significant_digits) {
  195|  7.26k|  assert(significant_digits <= Digits10() + 1);
  196|  7.26k|  SetToZero();
  197|       |
  198|  7.26k|  bool after_decimal_point = false;
  199|       |  // Discard any leading zeroes before the decimal point
  200|  7.78k|  while (begin < end && *begin == '0') {
  ------------------
  |  Branch (200:10): [True: 7.78k, False: 0]
  |  Branch (200:25): [True: 525, False: 7.26k]
  ------------------
  201|    525|    ++begin;
  202|    525|  }
  203|  7.26k|  int dropped_digits = 0;
  204|       |  // Discard any trailing zeroes.  These may or may not be after the decimal
  205|       |  // point.
  206|  8.86k|  while (begin < end && *std::prev(end) == '0') {
  ------------------
  |  Branch (206:10): [True: 8.86k, False: 0]
  |  Branch (206:25): [True: 1.60k, False: 7.26k]
  ------------------
  207|  1.60k|    --end;
  208|  1.60k|    ++dropped_digits;
  209|  1.60k|  }
  210|  7.26k|  if (begin < end && *std::prev(end) == '.') {
  ------------------
  |  Branch (210:7): [True: 7.26k, False: 0]
  |  Branch (210:22): [True: 214, False: 7.04k]
  ------------------
  211|       |    // If the string ends in '.', either before or after dropping zeroes, then
  212|       |    // drop the decimal point and look for more digits to drop.
  213|    214|    dropped_digits = 0;
  214|    214|    --end;
  215|    472|    while (begin < end && *std::prev(end) == '0') {
  ------------------
  |  Branch (215:12): [True: 472, False: 0]
  |  Branch (215:27): [True: 258, False: 214]
  ------------------
  216|    258|      --end;
  217|    258|      ++dropped_digits;
  218|    258|    }
  219|  7.04k|  } else if (dropped_digits) {
  ------------------
  |  Branch (219:14): [True: 974, False: 6.07k]
  ------------------
  220|       |    // We dropped digits, and aren't sure if they're before or after the decimal
  221|       |    // point.  Figure that out now.
  222|    974|    const char* dp = std::find(begin, end, '.');
  223|    974|    if (dp != end) {
  ------------------
  |  Branch (223:9): [True: 764, False: 210]
  ------------------
  224|       |      // The dropped trailing digits were after the decimal point, so don't
  225|       |      // count them.
  226|    764|      dropped_digits = 0;
  227|    764|    }
  228|    974|  }
  229|       |  // Any non-fraction digits we dropped need to be accounted for in our exponent
  230|       |  // adjustment.
  231|  7.26k|  int exponent_adjust = dropped_digits;
  232|       |
  233|  7.26k|  uint32_t queued = 0;
  234|  7.26k|  int digits_queued = 0;
  235|  1.73M|  for (; begin != end && significant_digits > 0; ++begin) {
  ------------------
  |  Branch (235:10): [True: 1.73M, False: 6.43k]
  |  Branch (235:26): [True: 1.73M, False: 830]
  ------------------
  236|  1.73M|    if (*begin == '.') {
  ------------------
  |  Branch (236:9): [True: 4.84k, False: 1.72M]
  ------------------
  237|  4.84k|      after_decimal_point = true;
  238|  4.84k|      continue;
  239|  4.84k|    }
  240|  1.72M|    if (after_decimal_point) {
  ------------------
  |  Branch (240:9): [True: 1.61M, False: 110k]
  ------------------
  241|       |      // For each fractional digit we emit in our parsed integer, adjust our
  242|       |      // decimal exponent to compensate.
  243|  1.61M|      --exponent_adjust;
  244|  1.61M|    }
  245|  1.72M|    char digit = (*begin - '0');
  246|  1.72M|    --significant_digits;
  247|  1.72M|    if (significant_digits == 0 && std::next(begin) != end &&
  ------------------
  |  Branch (247:9): [True: 1.34k, False: 1.72M]
  |  Branch (247:36): [True: 830, False: 519]
  ------------------
  248|    830|        (digit == 0 || digit == 5)) {
  ------------------
  |  Branch (248:10): [True: 245, False: 585]
  |  Branch (248:24): [True: 357, False: 228]
  ------------------
  249|       |      // If this is the very last significant digit, but insignificant digits
  250|       |      // remain, we know that the last of those remaining significant digits is
  251|       |      // nonzero.  (If it wasn't, we would have stripped it before we got here.)
  252|       |      // So if this final digit is a 0 or 5, adjust it upward by 1.
  253|       |      //
  254|       |      // This adjustment is what allows incredibly large mantissas ending in
  255|       |      // 500000...000000000001 to correctly round up, rather than to nearest.
  256|    602|      ++digit;
  257|    602|    }
  258|  1.72M|    queued = 10 * queued + static_cast<uint32_t>(digit);
  259|  1.72M|    ++digits_queued;
  260|  1.72M|    if (digits_queued == kMaxSmallPowerOfTen) {
  ------------------
  |  Branch (260:9): [True: 189k, False: 1.53M]
  ------------------
  261|   189k|      MultiplyBy(kTenToNth[kMaxSmallPowerOfTen]);
  262|   189k|      AddWithCarry(0, queued);
  263|   189k|      queued = digits_queued = 0;
  264|   189k|    }
  265|  1.72M|  }
  266|       |  // Encode any remaining digits.
  267|  7.26k|  if (digits_queued) {
  ------------------
  |  Branch (267:7): [True: 6.24k, False: 1.01k]
  ------------------
  268|  6.24k|    MultiplyBy(kTenToNth[digits_queued]);
  269|  6.24k|    AddWithCarry(0, queued);
  270|  6.24k|  }
  271|       |
  272|       |  // If any insignificant digits remain, we will drop them.  But if we have not
  273|       |  // yet read the decimal point, then we have to adjust the exponent to account
  274|       |  // for the dropped digits.
  275|  7.26k|  if (begin < end && !after_decimal_point) {
  ------------------
  |  Branch (275:7): [True: 830, False: 6.43k]
  |  Branch (275:22): [True: 2, False: 828]
  ------------------
  276|       |    // This call to std::find will result in a pointer either to the decimal
  277|       |    // point, or to the end of our buffer if there was none.
  278|       |    //
  279|       |    // Either way, [begin, decimal_point) will contain the set of dropped digits
  280|       |    // that require an exponent adjustment.
  281|      2|    const char* decimal_point = std::find(begin, end, '.');
  282|      2|    exponent_adjust += (decimal_point - begin);
  283|      2|  }
  284|  7.26k|  return exponent_adjust;
  285|  7.26k|}
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE12MultiplyStepEiPKjii:
  316|   248k|                                          int other_size, int step) {
  317|   248k|  int this_i = std::min(original_size - 1, step);
  318|   248k|  int other_i = step - this_i;
  319|       |
  320|   248k|  uint64_t this_word = 0;
  321|   248k|  uint64_t carry = 0;
  322|  1.54M|  for (; this_i >= 0 && other_i < other_size; --this_i, ++other_i) {
  ------------------
  |  Branch (322:10): [True: 1.51M, False: 36.3k]
  |  Branch (322:25): [True: 1.29M, False: 212k]
  ------------------
  323|  1.29M|    uint64_t product = words_[this_i];
  324|  1.29M|    product *= other_words[other_i];
  325|  1.29M|    this_word += product;
  326|  1.29M|    carry += (this_word >> 32);
  327|  1.29M|    this_word &= 0xffffffff;
  328|  1.29M|  }
  329|   248k|  AddWithCarry(step + 1, carry);
  330|   248k|  words_[step] = this_word & 0xffffffff;
  331|   248k|  if (this_word > 0 && size_ <= step) {
  ------------------
  |  Branch (331:7): [True: 248k, False: 0]
  |  Branch (331:24): [True: 3.56k, False: 245k]
  ------------------
  332|  3.56k|    size_ = step + 1;
  333|  3.56k|  }
  334|   248k|}
charconv_bigint.cc:_ZN4absl12lts_2024011616strings_internal12_GLOBAL__N_120LargePowerOfFiveDataEi:
  152|  5.37k|const uint32_t* LargePowerOfFiveData(int i) {
  153|  5.37k|  return kLargePowersOfFive + i * (i - 1);
  154|  5.37k|}
charconv_bigint.cc:_ZN4absl12lts_2024011616strings_internal12_GLOBAL__N_120LargePowerOfFiveSizeEi:
  158|  8.54k|int LargePowerOfFiveSize(int i) { return 2 * i; }

_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EEC2Ev:
   62|  8.74k|  BigUnsigned() : size_(0), words_{} {}
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE22MultiplyByFiveToTheNthEi:
  164|  8.74k|  void MultiplyByFiveToTheNth(int n) {
  165|  36.9k|    while (n >= kMaxSmallPowerOfFive) {
  ------------------
  |  Branch (165:12): [True: 28.2k, False: 8.74k]
  ------------------
  166|  28.2k|      MultiplyBy(kFiveToNth[kMaxSmallPowerOfFive]);
  167|  28.2k|      n -= kMaxSmallPowerOfFive;
  168|  28.2k|    }
  169|  8.74k|    if (n > 0) {
  ------------------
  |  Branch (169:9): [True: 6.70k, False: 2.04k]
  ------------------
  170|  6.70k|      MultiplyBy(kFiveToNth[n]);
  171|  6.70k|    }
  172|  8.74k|  }
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE10MultiplyByEj:
  130|   230k|  void MultiplyBy(uint32_t v) {
  131|   230k|    if (size_ == 0 || v == 1) {
  ------------------
  |  Branch (131:9): [True: 7.26k, False: 223k]
  |  Branch (131:23): [True: 0, False: 223k]
  ------------------
  132|  7.26k|      return;
  133|  7.26k|    }
  134|   223k|    if (v == 0) {
  ------------------
  |  Branch (134:9): [True: 0, False: 223k]
  ------------------
  135|      0|      SetToZero();
  136|      0|      return;
  137|      0|    }
  138|   223k|    const uint64_t factor = v;
  139|   223k|    uint64_t window = 0;
  140|  7.32M|    for (int i = 0; i < size_; ++i) {
  ------------------
  |  Branch (140:21): [True: 7.09M, False: 223k]
  ------------------
  141|  7.09M|      window += factor * words_[i];
  142|  7.09M|      words_[i] = window & 0xffffffff;
  143|  7.09M|      window >>= 32;
  144|  7.09M|    }
  145|       |    // If carry bits remain and there's space for them, grow size_.
  146|   223k|    if (window && size_ < max_words) {
  ------------------
  |  Branch (146:9): [True: 204k, False: 18.7k]
  |  Branch (146:19): [True: 204k, False: 0]
  ------------------
  147|   204k|      words_[size_] = window & 0xffffffff;
  148|   204k|      ++size_;
  149|   204k|    }
  150|   223k|  }
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE9SetToZeroEv:
  199|  16.0k|  void SetToZero() {
  200|  16.0k|    std::fill_n(words_, size_, 0u);
  201|  16.0k|    size_ = 0;
  202|  16.0k|  }
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EEC2Em:
   64|  8.74k|      : size_((v >> 32) ? 2 : v ? 1 : 0),
  ------------------
  |  Branch (64:15): [True: 3.52k, False: 5.22k]
  |  Branch (64:31): [True: 5.22k, False: 0]
  ------------------
   65|  8.74k|        words_{static_cast<uint32_t>(v & 0xffffffffu),
   66|  8.74k|               static_cast<uint32_t>(v >> 32)} {}
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE9ShiftLeftEi:
  102|  8.74k|  void ShiftLeft(int count) {
  103|  8.74k|    if (count > 0) {
  ------------------
  |  Branch (103:9): [True: 8.30k, False: 445]
  ------------------
  104|  8.30k|      const int word_shift = count / 32;
  105|  8.30k|      if (word_shift >= max_words) {
  ------------------
  |  Branch (105:11): [True: 0, False: 8.30k]
  ------------------
  106|      0|        SetToZero();
  107|      0|        return;
  108|      0|      }
  109|  8.30k|      size_ = (std::min)(size_ + word_shift, max_words);
  110|  8.30k|      count %= 32;
  111|  8.30k|      if (count == 0) {
  ------------------
  |  Branch (111:11): [True: 663, False: 7.64k]
  ------------------
  112|    663|        std::copy_backward(words_, words_ + size_ - word_shift, words_ + size_);
  113|  7.64k|      } else {
  114|   138k|        for (int i = (std::min)(size_, max_words - 1); i > word_shift; --i) {
  ------------------
  |  Branch (114:56): [True: 130k, False: 7.64k]
  ------------------
  115|   130k|          words_[i] = (words_[i - word_shift] << count) |
  116|   130k|                      (words_[i - word_shift - 1] >> (32 - count));
  117|   130k|        }
  118|  7.64k|        words_[word_shift] = words_[0] << count;
  119|       |        // Grow size_ if necessary.
  120|  7.64k|        if (size_ < max_words && words_[size_]) {
  ------------------
  |  Branch (120:13): [True: 7.64k, False: 0]
  |  Branch (120:34): [True: 4.00k, False: 3.63k]
  ------------------
  121|  4.00k|          ++size_;
  122|  4.00k|        }
  123|  7.64k|      }
  124|  8.30k|      std::fill_n(words_, word_shift, 0u);
  125|  8.30k|    }
  126|  8.74k|  }
_ZN4absl12lts_2024011616strings_internal7CompareILi84ELi84EEEiRKNS1_11BigUnsignedIXT_EEERKNS3_IXT0_EEE:
  353|  8.74k|int Compare(const BigUnsigned<N>& lhs, const BigUnsigned<M>& rhs) {
  354|  8.74k|  int limit = (std::max)(lhs.size(), rhs.size());
  355|  25.5k|  for (int i = limit - 1; i >= 0; --i) {
  ------------------
  |  Branch (355:27): [True: 24.8k, False: 656]
  ------------------
  356|  24.8k|    const uint32_t lhs_word = lhs.GetWord(i);
  357|  24.8k|    const uint32_t rhs_word = rhs.GetWord(i);
  358|  24.8k|    if (lhs_word < rhs_word) {
  ------------------
  |  Branch (358:9): [True: 6.63k, False: 18.2k]
  ------------------
  359|  6.63k|      return -1;
  360|  18.2k|    } else if (lhs_word > rhs_word) {
  ------------------
  |  Branch (360:16): [True: 1.46k, False: 16.7k]
  ------------------
  361|  1.46k|      return 1;
  362|  1.46k|    }
  363|  24.8k|  }
  364|    656|  return 0;
  365|  8.74k|}
_ZNK4absl12lts_2024011616strings_internal11BigUnsignedILi84EE4sizeEv:
  217|  17.4k|  int size() const { return size_; }
_ZNK4absl12lts_2024011616strings_internal11BigUnsignedILi84EE7GetWordEi:
  206|  49.6k|  uint32_t GetWord(int index) const {
  207|  49.6k|    if (index < 0 || index >= size_) {
  ------------------
  |  Branch (207:9): [True: 0, False: 49.6k]
  |  Branch (207:22): [True: 66, False: 49.6k]
  ------------------
  208|     66|      return 0;
  209|     66|    }
  210|  49.6k|    return words_[index];
  211|  49.6k|  }
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE10MultiplyByEm:
  152|  5.22k|  void MultiplyBy(uint64_t v) {
  153|  5.22k|    uint32_t words[2];
  154|  5.22k|    words[0] = static_cast<uint32_t>(v);
  155|  5.22k|    words[1] = static_cast<uint32_t>(v >> 32);
  156|  5.22k|    if (words[1] == 0) {
  ------------------
  |  Branch (156:9): [True: 0, False: 5.22k]
  ------------------
  157|      0|      MultiplyBy(words[0]);
  158|  5.22k|    } else {
  159|  5.22k|      MultiplyBy(2, words);
  160|  5.22k|    }
  161|  5.22k|  }
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE10MultiplyByEiPKj:
  270|  7.43k|  void MultiplyBy(int other_size, const uint32_t* other_words) {
  271|  7.43k|    const int original_size = size_;
  272|  7.43k|    const int first_step =
  273|  7.43k|        (std::min)(original_size + other_size - 2, max_words - 1);
  274|   256k|    for (int step = first_step; step >= 0; --step) {
  ------------------
  |  Branch (274:33): [True: 248k, False: 7.43k]
  ------------------
  275|   248k|      MultiplyStep(original_size, other_words, other_size, step);
  276|   248k|    }
  277|  7.43k|  }
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE12AddWithCarryEij:
  280|   315k|  void AddWithCarry(int index, uint32_t value) {
  281|   315k|    if (value) {
  ------------------
  |  Branch (281:9): [True: 314k, False: 714]
  ------------------
  282|   653k|      while (index < max_words && value > 0) {
  ------------------
  |  Branch (282:14): [True: 653k, False: 0]
  |  Branch (282:35): [True: 338k, False: 314k]
  ------------------
  283|   338k|        words_[index] += value;
  284|       |        // carry if we overflowed in this word:
  285|   338k|        if (value > words_[index]) {
  ------------------
  |  Branch (285:13): [True: 24.1k, False: 314k]
  ------------------
  286|  24.1k|          value = 1;
  287|  24.1k|          ++index;
  288|   314k|        } else {
  289|   314k|          value = 0;
  290|   314k|        }
  291|   338k|      }
  292|   314k|      size_ = (std::min)(max_words, (std::max)(index + 1, size_));
  293|   314k|    }
  294|   315k|  }
_ZN4absl12lts_2024011616strings_internal11BigUnsignedILi84EE12AddWithCarryEim:
  296|   248k|  void AddWithCarry(int index, uint64_t value) {
  297|   248k|    if (value && index < max_words) {
  ------------------
  |  Branch (297:9): [True: 245k, False: 3.84k]
  |  Branch (297:18): [True: 245k, False: 0]
  ------------------
  298|   245k|      uint32_t high = value >> 32;
  299|   245k|      uint32_t low = value & 0xffffffff;
  300|   245k|      words_[index] += low;
  301|   245k|      if (words_[index] < low) {
  ------------------
  |  Branch (301:11): [True: 82.9k, False: 162k]
  ------------------
  302|  82.9k|        ++high;
  303|  82.9k|        if (high == 0) {
  ------------------
  |  Branch (303:13): [True: 0, False: 82.9k]
  ------------------
  304|       |          // Carry from the low word caused our high word to overflow.
  305|       |          // Short circuit here to do the right thing.
  306|      0|          AddWithCarry(index + 2, static_cast<uint32_t>(1));
  307|      0|          return;
  308|      0|        }
  309|  82.9k|      }
  310|   245k|      if (high > 0) {
  ------------------
  |  Branch (310:11): [True: 119k, False: 125k]
  ------------------
  311|   119k|        AddWithCarry(index + 1, high);
  312|   125k|      } else {
  313|       |        // Normally 32-bit AddWithCarry() sets size_, but since we don't call
  314|       |        // it when `high` is 0, do it ourselves here.
  315|   125k|        size_ = (std::min)(max_words, (std::max)(index + 1, size_));
  316|   125k|      }
  317|   245k|    }
  318|   248k|  }

_ZN4absl12lts_2024011616strings_internal10ParseFloatILi10EEENS1_11ParsedFloatEPKcS5_NS0_12chars_formatE:
  356|  20.0k|                                         chars_format format_flags) {
  357|  20.0k|  strings_internal::ParsedFloat result;
  358|       |
  359|       |  // Exit early if we're given an empty range.
  360|  20.0k|  if (begin == end) return result;
  ------------------
  |  Branch (360:7): [True: 5, False: 19.9k]
  ------------------
  361|       |
  362|       |  // Handle the infinity and NaN cases.
  363|  19.9k|  if (ParseInfinityOrNan(begin, end, &result)) {
  ------------------
  |  Branch (363:7): [True: 1.27k, False: 18.7k]
  ------------------
  364|  1.27k|    return result;
  365|  1.27k|  }
  366|       |
  367|  18.7k|  const char* const mantissa_begin = begin;
  368|  20.4k|  while (begin < end && *begin == '0') {
  ------------------
  |  Branch (368:10): [True: 19.9k, False: 520]
  |  Branch (368:25): [True: 1.74k, False: 18.2k]
  ------------------
  369|  1.74k|    ++begin;  // skip leading zeros
  370|  1.74k|  }
  371|  18.7k|  uint64_t mantissa = 0;
  372|       |
  373|  18.7k|  int exponent_adjustment = 0;
  374|  18.7k|  bool mantissa_is_inexact = false;
  375|  18.7k|  int pre_decimal_digits = ConsumeDigits<base>(
  376|  18.7k|      begin, end, MantissaDigitsMax<base>(), &mantissa, &mantissa_is_inexact);
  377|  18.7k|  begin += pre_decimal_digits;
  378|  18.7k|  int digits_left;
  379|  18.7k|  if (pre_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (379:7): [True: 0, False: 18.7k]
  ------------------
  380|       |    // refuse to parse pathological inputs
  381|      0|    return result;
  382|  18.7k|  } else if (pre_decimal_digits > MantissaDigitsMax<base>()) {
  ------------------
  |  Branch (382:14): [True: 4.60k, False: 14.1k]
  ------------------
  383|       |    // We dropped some non-fraction digits on the floor.  Adjust our exponent
  384|       |    // to compensate.
  385|  4.60k|    exponent_adjustment =
  386|  4.60k|        static_cast<int>(pre_decimal_digits - MantissaDigitsMax<base>());
  387|  4.60k|    digits_left = 0;
  388|  14.1k|  } else {
  389|  14.1k|    digits_left =
  390|  14.1k|        static_cast<int>(MantissaDigitsMax<base>() - pre_decimal_digits);
  391|  14.1k|  }
  392|  18.7k|  if (begin < end && *begin == '.') {
  ------------------
  |  Branch (392:7): [True: 14.7k, False: 3.96k]
  |  Branch (392:22): [True: 7.79k, False: 6.95k]
  ------------------
  393|  7.79k|    ++begin;
  394|  7.79k|    if (mantissa == 0) {
  ------------------
  |  Branch (394:9): [True: 3.73k, False: 4.06k]
  ------------------
  395|       |      // If we haven't seen any nonzero digits yet, keep skipping zeros.  We
  396|       |      // have to adjust the exponent to reflect the changed place value.
  397|  3.73k|      const char* begin_zeros = begin;
  398|  4.40k|      while (begin < end && *begin == '0') {
  ------------------
  |  Branch (398:14): [True: 4.11k, False: 288]
  |  Branch (398:29): [True: 666, False: 3.44k]
  ------------------
  399|    666|        ++begin;
  400|    666|      }
  401|  3.73k|      int zeros_skipped = static_cast<int>(begin - begin_zeros);
  402|  3.73k|      if (zeros_skipped >= DigitLimit<base>()) {
  ------------------
  |  Branch (402:11): [True: 0, False: 3.73k]
  ------------------
  403|       |        // refuse to parse pathological inputs
  404|      0|        return result;
  405|      0|      }
  406|  3.73k|      exponent_adjustment -= static_cast<int>(zeros_skipped);
  407|  3.73k|    }
  408|  7.79k|    int post_decimal_digits = ConsumeDigits<base>(
  409|  7.79k|        begin, end, digits_left, &mantissa, &mantissa_is_inexact);
  410|  7.79k|    begin += post_decimal_digits;
  411|       |
  412|       |    // Since `mantissa` is an integer, each significant digit we read after
  413|       |    // the decimal point requires an adjustment to the exponent. "1.23e0" will
  414|       |    // be stored as `mantissa` == 123 and `exponent` == -2 (that is,
  415|       |    // "123e-2").
  416|  7.79k|    if (post_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (416:9): [True: 0, False: 7.79k]
  ------------------
  417|       |      // refuse to parse pathological inputs
  418|      0|      return result;
  419|  7.79k|    } else if (post_decimal_digits > digits_left) {
  ------------------
  |  Branch (419:16): [True: 5.38k, False: 2.41k]
  ------------------
  420|  5.38k|      exponent_adjustment -= digits_left;
  421|  5.38k|    } else {
  422|  2.41k|      exponent_adjustment -= post_decimal_digits;
  423|  2.41k|    }
  424|  7.79k|  }
  425|       |  // If we've found no mantissa whatsoever, this isn't a number.
  426|  18.7k|  if (mantissa_begin == begin) {
  ------------------
  |  Branch (426:7): [True: 79, False: 18.6k]
  ------------------
  427|     79|    return result;
  428|     79|  }
  429|       |  // A bare "." doesn't count as a mantissa either.
  430|  18.6k|  if (begin - mantissa_begin == 1 && *mantissa_begin == '.') {
  ------------------
  |  Branch (430:7): [True: 4.77k, False: 13.8k]
  |  Branch (430:38): [True: 19, False: 4.75k]
  ------------------
  431|     19|    return result;
  432|     19|  }
  433|       |
  434|  18.6k|  if (mantissa_is_inexact) {
  ------------------
  |  Branch (434:7): [True: 8.41k, False: 10.2k]
  ------------------
  435|       |    // We dropped significant digits on the floor.  Handle this appropriately.
  436|  8.41k|    if (base == 10) {
  ------------------
  |  Branch (436:9): [True: 8.41k, Folded]
  ------------------
  437|       |      // If we truncated significant decimal digits, store the full range of the
  438|       |      // mantissa for future big integer math for exact rounding.
  439|  8.41k|      result.subrange_begin = mantissa_begin;
  440|  8.41k|      result.subrange_end = begin;
  441|  8.41k|    } else if (base == 16) {
  ------------------
  |  Branch (441:16): [Folded, False: 0]
  ------------------
  442|       |      // If we truncated hex digits, reflect this fact by setting the low
  443|       |      // ("sticky") bit.  This allows for correct rounding in all cases.
  444|      0|      mantissa |= 1;
  445|      0|    }
  446|  8.41k|  }
  447|  18.6k|  result.mantissa = mantissa;
  448|       |
  449|  18.6k|  const char* const exponent_begin = begin;
  450|  18.6k|  result.literal_exponent = 0;
  451|  18.6k|  bool found_exponent = false;
  452|  18.6k|  if (AllowExponent(format_flags) && begin < end &&
  ------------------
  |  Branch (452:7): [True: 18.6k, False: 0]
  |  Branch (452:38): [True: 8.26k, False: 10.3k]
  ------------------
  453|  8.26k|      IsExponentCharacter<base>(*begin)) {
  ------------------
  |  Branch (453:7): [True: 8.19k, False: 70]
  ------------------
  454|  8.19k|    bool negative_exponent = false;
  455|  8.19k|    ++begin;
  456|  8.19k|    if (begin < end && *begin == '-') {
  ------------------
  |  Branch (456:9): [True: 8.18k, False: 7]
  |  Branch (456:24): [True: 3.19k, False: 4.98k]
  ------------------
  457|  3.19k|      negative_exponent = true;
  458|  3.19k|      ++begin;
  459|  4.99k|    } else if (begin < end && *begin == '+') {
  ------------------
  |  Branch (459:16): [True: 4.98k, False: 7]
  |  Branch (459:31): [True: 1.13k, False: 3.85k]
  ------------------
  460|  1.13k|      ++begin;
  461|  1.13k|    }
  462|  8.19k|    const char* const exponent_digits_begin = begin;
  463|       |    // Exponent is always expressed in decimal, even for hexadecimal floats.
  464|  8.19k|    begin += ConsumeDigits<10>(begin, end, kDecimalExponentDigitsMax,
  465|  8.19k|                               &result.literal_exponent, nullptr);
  466|  8.19k|    if (begin == exponent_digits_begin) {
  ------------------
  |  Branch (466:9): [True: 31, False: 8.15k]
  ------------------
  467|       |      // there were no digits where we expected an exponent.  We failed to read
  468|       |      // an exponent and should not consume the 'e' after all.  Rewind 'begin'.
  469|     31|      found_exponent = false;
  470|     31|      begin = exponent_begin;
  471|  8.15k|    } else {
  472|  8.15k|      found_exponent = true;
  473|  8.15k|      if (negative_exponent) {
  ------------------
  |  Branch (473:11): [True: 3.18k, False: 4.97k]
  ------------------
  474|  3.18k|        result.literal_exponent = -result.literal_exponent;
  475|  3.18k|      }
  476|  8.15k|    }
  477|  8.19k|  }
  478|       |
  479|  18.6k|  if (!found_exponent && RequireExponent(format_flags)) {
  ------------------
  |  Branch (479:7): [True: 10.4k, False: 8.15k]
  |  Branch (479:26): [True: 0, False: 10.4k]
  ------------------
  480|       |    // Provided flags required an exponent, but none was found.  This results
  481|       |    // in a failure to scan.
  482|      0|    return result;
  483|      0|  }
  484|       |
  485|       |  // Success!
  486|  18.6k|  result.type = strings_internal::FloatType::kNumber;
  487|  18.6k|  if (result.mantissa > 0) {
  ------------------
  |  Branch (487:7): [True: 17.2k, False: 1.33k]
  ------------------
  488|  17.2k|    result.exponent = result.literal_exponent +
  489|  17.2k|                      (DigitMagnitude<base>() * exponent_adjustment);
  490|  17.2k|  } else {
  491|  1.33k|    result.exponent = 0;
  492|  1.33k|  }
  493|  18.6k|  result.end = begin;
  494|  18.6k|  return result;
  495|  18.6k|}
_ZN4absl12lts_2024011616strings_internal10ParseFloatILi16EEENS1_11ParsedFloatEPKcS5_NS0_12chars_formatE:
  356|  4.75k|                                         chars_format format_flags) {
  357|  4.75k|  strings_internal::ParsedFloat result;
  358|       |
  359|       |  // Exit early if we're given an empty range.
  360|  4.75k|  if (begin == end) return result;
  ------------------
  |  Branch (360:7): [True: 3, False: 4.75k]
  ------------------
  361|       |
  362|       |  // Handle the infinity and NaN cases.
  363|  4.75k|  if (ParseInfinityOrNan(begin, end, &result)) {
  ------------------
  |  Branch (363:7): [True: 0, False: 4.75k]
  ------------------
  364|      0|    return result;
  365|      0|  }
  366|       |
  367|  4.75k|  const char* const mantissa_begin = begin;
  368|  5.74k|  while (begin < end && *begin == '0') {
  ------------------
  |  Branch (368:10): [True: 5.67k, False: 69]
  |  Branch (368:25): [True: 992, False: 4.68k]
  ------------------
  369|    992|    ++begin;  // skip leading zeros
  370|    992|  }
  371|  4.75k|  uint64_t mantissa = 0;
  372|       |
  373|  4.75k|  int exponent_adjustment = 0;
  374|  4.75k|  bool mantissa_is_inexact = false;
  375|  4.75k|  int pre_decimal_digits = ConsumeDigits<base>(
  376|  4.75k|      begin, end, MantissaDigitsMax<base>(), &mantissa, &mantissa_is_inexact);
  377|  4.75k|  begin += pre_decimal_digits;
  378|  4.75k|  int digits_left;
  379|  4.75k|  if (pre_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (379:7): [True: 0, False: 4.75k]
  ------------------
  380|       |    // refuse to parse pathological inputs
  381|      0|    return result;
  382|  4.75k|  } else if (pre_decimal_digits > MantissaDigitsMax<base>()) {
  ------------------
  |  Branch (382:14): [True: 649, False: 4.10k]
  ------------------
  383|       |    // We dropped some non-fraction digits on the floor.  Adjust our exponent
  384|       |    // to compensate.
  385|    649|    exponent_adjustment =
  386|    649|        static_cast<int>(pre_decimal_digits - MantissaDigitsMax<base>());
  387|    649|    digits_left = 0;
  388|  4.10k|  } else {
  389|  4.10k|    digits_left =
  390|  4.10k|        static_cast<int>(MantissaDigitsMax<base>() - pre_decimal_digits);
  391|  4.10k|  }
  392|  4.75k|  if (begin < end && *begin == '.') {
  ------------------
  |  Branch (392:7): [True: 3.86k, False: 894]
  |  Branch (392:22): [True: 2.10k, False: 1.75k]
  ------------------
  393|  2.10k|    ++begin;
  394|  2.10k|    if (mantissa == 0) {
  ------------------
  |  Branch (394:9): [True: 1.20k, False: 899]
  ------------------
  395|       |      // If we haven't seen any nonzero digits yet, keep skipping zeros.  We
  396|       |      // have to adjust the exponent to reflect the changed place value.
  397|  1.20k|      const char* begin_zeros = begin;
  398|  1.96k|      while (begin < end && *begin == '0') {
  ------------------
  |  Branch (398:14): [True: 1.53k, False: 431]
  |  Branch (398:29): [True: 755, False: 778]
  ------------------
  399|    755|        ++begin;
  400|    755|      }
  401|  1.20k|      int zeros_skipped = static_cast<int>(begin - begin_zeros);
  402|  1.20k|      if (zeros_skipped >= DigitLimit<base>()) {
  ------------------
  |  Branch (402:11): [True: 0, False: 1.20k]
  ------------------
  403|       |        // refuse to parse pathological inputs
  404|      0|        return result;
  405|      0|      }
  406|  1.20k|      exponent_adjustment -= static_cast<int>(zeros_skipped);
  407|  1.20k|    }
  408|  2.10k|    int post_decimal_digits = ConsumeDigits<base>(
  409|  2.10k|        begin, end, digits_left, &mantissa, &mantissa_is_inexact);
  410|  2.10k|    begin += post_decimal_digits;
  411|       |
  412|       |    // Since `mantissa` is an integer, each significant digit we read after
  413|       |    // the decimal point requires an adjustment to the exponent. "1.23e0" will
  414|       |    // be stored as `mantissa` == 123 and `exponent` == -2 (that is,
  415|       |    // "123e-2").
  416|  2.10k|    if (post_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (416:9): [True: 0, False: 2.10k]
  ------------------
  417|       |      // refuse to parse pathological inputs
  418|      0|      return result;
  419|  2.10k|    } else if (post_decimal_digits > digits_left) {
  ------------------
  |  Branch (419:16): [True: 658, False: 1.45k]
  ------------------
  420|    658|      exponent_adjustment -= digits_left;
  421|  1.45k|    } else {
  422|  1.45k|      exponent_adjustment -= post_decimal_digits;
  423|  1.45k|    }
  424|  2.10k|  }
  425|       |  // If we've found no mantissa whatsoever, this isn't a number.
  426|  4.75k|  if (mantissa_begin == begin) {
  ------------------
  |  Branch (426:7): [True: 4, False: 4.75k]
  ------------------
  427|      4|    return result;
  428|      4|  }
  429|       |  // A bare "." doesn't count as a mantissa either.
  430|  4.75k|  if (begin - mantissa_begin == 1 && *mantissa_begin == '.') {
  ------------------
  |  Branch (430:7): [True: 2.07k, False: 2.67k]
  |  Branch (430:38): [True: 14, False: 2.05k]
  ------------------
  431|     14|    return result;
  432|     14|  }
  433|       |
  434|  4.73k|  if (mantissa_is_inexact) {
  ------------------
  |  Branch (434:7): [True: 756, False: 3.98k]
  ------------------
  435|       |    // We dropped significant digits on the floor.  Handle this appropriately.
  436|    756|    if (base == 10) {
  ------------------
  |  Branch (436:9): [Folded, False: 756]
  ------------------
  437|       |      // If we truncated significant decimal digits, store the full range of the
  438|       |      // mantissa for future big integer math for exact rounding.
  439|      0|      result.subrange_begin = mantissa_begin;
  440|      0|      result.subrange_end = begin;
  441|    756|    } else if (base == 16) {
  ------------------
  |  Branch (441:16): [True: 756, Folded]
  ------------------
  442|       |      // If we truncated hex digits, reflect this fact by setting the low
  443|       |      // ("sticky") bit.  This allows for correct rounding in all cases.
  444|    756|      mantissa |= 1;
  445|    756|    }
  446|    756|  }
  447|  4.73k|  result.mantissa = mantissa;
  448|       |
  449|  4.73k|  const char* const exponent_begin = begin;
  450|  4.73k|  result.literal_exponent = 0;
  451|  4.73k|  bool found_exponent = false;
  452|  4.73k|  if (AllowExponent(format_flags) && begin < end &&
  ------------------
  |  Branch (452:7): [True: 4.73k, False: 0]
  |  Branch (452:38): [True: 2.11k, False: 2.62k]
  ------------------
  453|  2.11k|      IsExponentCharacter<base>(*begin)) {
  ------------------
  |  Branch (453:7): [True: 2.09k, False: 21]
  ------------------
  454|  2.09k|    bool negative_exponent = false;
  455|  2.09k|    ++begin;
  456|  2.09k|    if (begin < end && *begin == '-') {
  ------------------
  |  Branch (456:9): [True: 2.08k, False: 9]
  |  Branch (456:24): [True: 1.27k, False: 805]
  ------------------
  457|  1.27k|      negative_exponent = true;
  458|  1.27k|      ++begin;
  459|  1.27k|    } else if (begin < end && *begin == '+') {
  ------------------
  |  Branch (459:16): [True: 805, False: 9]
  |  Branch (459:31): [True: 208, False: 597]
  ------------------
  460|    208|      ++begin;
  461|    208|    }
  462|  2.09k|    const char* const exponent_digits_begin = begin;
  463|       |    // Exponent is always expressed in decimal, even for hexadecimal floats.
  464|  2.09k|    begin += ConsumeDigits<10>(begin, end, kDecimalExponentDigitsMax,
  465|  2.09k|                               &result.literal_exponent, nullptr);
  466|  2.09k|    if (begin == exponent_digits_begin) {
  ------------------
  |  Branch (466:9): [True: 23, False: 2.07k]
  ------------------
  467|       |      // there were no digits where we expected an exponent.  We failed to read
  468|       |      // an exponent and should not consume the 'e' after all.  Rewind 'begin'.
  469|     23|      found_exponent = false;
  470|     23|      begin = exponent_begin;
  471|  2.07k|    } else {
  472|  2.07k|      found_exponent = true;
  473|  2.07k|      if (negative_exponent) {
  ------------------
  |  Branch (473:11): [True: 1.27k, False: 792]
  ------------------
  474|  1.27k|        result.literal_exponent = -result.literal_exponent;
  475|  1.27k|      }
  476|  2.07k|    }
  477|  2.09k|  }
  478|       |
  479|  4.73k|  if (!found_exponent && RequireExponent(format_flags)) {
  ------------------
  |  Branch (479:7): [True: 2.66k, False: 2.07k]
  |  Branch (479:26): [True: 0, False: 2.66k]
  ------------------
  480|       |    // Provided flags required an exponent, but none was found.  This results
  481|       |    // in a failure to scan.
  482|      0|    return result;
  483|      0|  }
  484|       |
  485|       |  // Success!
  486|  4.73k|  result.type = strings_internal::FloatType::kNumber;
  487|  4.73k|  if (result.mantissa > 0) {
  ------------------
  |  Branch (487:7): [True: 3.88k, False: 850]
  ------------------
  488|  3.88k|    result.exponent = result.literal_exponent +
  489|  3.88k|                      (DigitMagnitude<base>() * exponent_adjustment);
  490|  3.88k|  } else {
  491|    850|    result.exponent = 0;
  492|    850|  }
  493|  4.73k|  result.end = begin;
  494|  4.73k|  return result;
  495|  4.73k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_113AllowExponentENS0_12chars_formatE:
  122|  23.3k|bool AllowExponent(chars_format flags) {
  123|  23.3k|  bool fixed = (flags & chars_format::fixed) == chars_format::fixed;
  124|  23.3k|  bool scientific =
  125|  23.3k|      (flags & chars_format::scientific) == chars_format::scientific;
  126|  23.3k|  return scientific || !fixed;
  ------------------
  |  Branch (126:10): [True: 23.3k, False: 0]
  |  Branch (126:24): [True: 0, False: 0]
  ------------------
  127|  23.3k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_115RequireExponentENS0_12chars_formatE:
  130|  13.1k|bool RequireExponent(chars_format flags) {
  131|  13.1k|  bool fixed = (flags & chars_format::fixed) == chars_format::fixed;
  132|  13.1k|  bool scientific =
  133|  13.1k|      (flags & chars_format::scientific) == chars_format::scientific;
  134|  13.1k|  return scientific && !fixed;
  ------------------
  |  Branch (134:10): [True: 13.1k, False: 0]
  |  Branch (134:24): [True: 0, False: 13.1k]
  ------------------
  135|  13.1k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_119IsExponentCharacterILi10EEEbc:
  201|  8.26k|bool IsExponentCharacter<10>(char ch) {
  202|  8.26k|  return ch == 'e' || ch == 'E';
  ------------------
  |  Branch (202:10): [True: 7.56k, False: 691]
  |  Branch (202:23): [True: 621, False: 70]
  ------------------
  203|  8.26k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_119IsExponentCharacterILi16EEEbc:
  206|  2.11k|bool IsExponentCharacter<16>(char ch) {
  207|  2.11k|  return ch == 'p' || ch == 'P';
  ------------------
  |  Branch (207:10): [True: 556, False: 1.55k]
  |  Branch (207:23): [True: 1.53k, False: 21]
  ------------------
  208|  2.11k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_117MantissaDigitsMaxILi10EEEiv:
  211|  56.1k|constexpr int MantissaDigitsMax<10>() {
  212|  56.1k|  return kDecimalMantissaDigitsMax;
  213|  56.1k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_117MantissaDigitsMaxILi16EEEiv:
  215|  14.2k|constexpr int MantissaDigitsMax<16>() {
  216|  14.2k|  return kHexadecimalMantissaDigitsMax;
  217|  14.2k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_110DigitLimitILi10EEEiv:
  220|  30.2k|constexpr int DigitLimit<10>() {
  221|  30.2k|  return kDecimalDigitLimit;
  222|  30.2k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_110DigitLimitILi16EEEiv:
  224|  8.07k|constexpr int DigitLimit<16>() {
  225|  8.07k|  return kHexadecimalDigitLimit;
  226|  8.07k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_114DigitMagnitudeILi10EEEiv:
  229|  17.2k|constexpr int DigitMagnitude<10>() {
  230|  17.2k|  return 1;
  231|  17.2k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_114DigitMagnitudeILi16EEEiv:
  233|  3.88k|constexpr int DigitMagnitude<16>() {
  234|  3.88k|  return 4;
  235|  3.88k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_118ParseInfinityOrNanEPKcS3_PNS0_16strings_internal11ParsedFloatE:
  298|  24.7k|                        strings_internal::ParsedFloat* out) {
  299|  24.7k|  if (end - begin < 3) {
  ------------------
  |  Branch (299:7): [True: 3.92k, False: 20.8k]
  ------------------
  300|  3.92k|    return false;
  301|  3.92k|  }
  302|  20.8k|  switch (*begin) {
  303|    513|    case 'i':
  ------------------
  |  Branch (303:5): [True: 513, False: 20.3k]
  ------------------
  304|    718|    case 'I': {
  ------------------
  |  Branch (304:5): [True: 205, False: 20.6k]
  ------------------
  305|       |      // An infinity string consists of the characters "inf" or "infinity",
  306|       |      // case insensitive.
  307|    718|      if (strings_internal::memcasecmp(begin + 1, "nf", 2) != 0) {
  ------------------
  |  Branch (307:11): [True: 18, False: 700]
  ------------------
  308|     18|        return false;
  309|     18|      }
  310|    700|      out->type = strings_internal::FloatType::kInfinity;
  311|    700|      if (end - begin >= 8 &&
  ------------------
  |  Branch (311:11): [True: 22, False: 678]
  ------------------
  312|     22|          strings_internal::memcasecmp(begin + 3, "inity", 5) == 0) {
  ------------------
  |  Branch (312:11): [True: 1, False: 21]
  ------------------
  313|      1|        out->end = begin + 8;
  314|    699|      } else {
  315|    699|        out->end = begin + 3;
  316|    699|      }
  317|    700|      return true;
  318|    718|    }
  319|    206|    case 'n':
  ------------------
  |  Branch (319:5): [True: 206, False: 20.6k]
  ------------------
  320|    594|    case 'N': {
  ------------------
  |  Branch (320:5): [True: 388, False: 20.4k]
  ------------------
  321|       |      // A NaN consists of the characters "nan", case insensitive, optionally
  322|       |      // followed by a parenthesized sequence of zero or more alphanumeric
  323|       |      // characters and/or underscores.
  324|    594|      if (strings_internal::memcasecmp(begin + 1, "an", 2) != 0) {
  ------------------
  |  Branch (324:11): [True: 15, False: 579]
  ------------------
  325|     15|        return false;
  326|     15|      }
  327|    579|      out->type = strings_internal::FloatType::kNan;
  328|    579|      out->end = begin + 3;
  329|       |      // NaN is allowed to be followed by a parenthesized string, consisting of
  330|       |      // only the characters [a-zA-Z0-9_].  Match that if it's present.
  331|    579|      begin += 3;
  332|    579|      if (begin < end && *begin == '(') {
  ------------------
  |  Branch (332:11): [True: 1, False: 578]
  |  Branch (332:26): [True: 0, False: 1]
  ------------------
  333|      0|        const char* nan_begin = begin + 1;
  334|      0|        while (nan_begin < end && IsNanChar(*nan_begin)) {
  ------------------
  |  Branch (334:16): [True: 0, False: 0]
  |  Branch (334:35): [True: 0, False: 0]
  ------------------
  335|      0|          ++nan_begin;
  336|      0|        }
  337|      0|        if (nan_begin < end && *nan_begin == ')') {
  ------------------
  |  Branch (337:13): [True: 0, False: 0]
  |  Branch (337:32): [True: 0, False: 0]
  ------------------
  338|       |          // We found an extra NaN specifier range
  339|      0|          out->subrange_begin = begin + 1;
  340|      0|          out->subrange_end = nan_begin;
  341|      0|          out->end = nan_begin + 1;
  342|      0|        }
  343|      0|      }
  344|    579|      return true;
  345|    594|    }
  346|  19.5k|    default:
  ------------------
  |  Branch (346:5): [True: 19.5k, False: 1.31k]
  ------------------
  347|  19.5k|      return false;
  348|  20.8k|  }
  349|  20.8k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_113ConsumeDigitsILi10EmEEiPKcS4_iPT0_Pb:
  250|  26.5k|                  bool* dropped_nonzero_digit) {
  251|  26.5k|  if (base == 10) {
  ------------------
  |  Branch (251:7): [True: 26.5k, Folded]
  ------------------
  252|  26.5k|    assert(max_digits <= std::numeric_limits<T>::digits10);
  253|  26.5k|  } else if (base == 16) {
  ------------------
  |  Branch (253:14): [Folded, False: 0]
  ------------------
  254|      0|    assert(max_digits * 4 <= std::numeric_limits<T>::digits);
  255|      0|  }
  256|  26.5k|  const char* const original_begin = begin;
  257|       |
  258|       |  // Skip leading zeros, but only if *out is zero.
  259|       |  // They don't cause an overflow so we don't have to count them for
  260|       |  // `max_digits`.
  261|  26.5k|  while (!*out && end != begin && *begin == '0') ++begin;
  ------------------
  |  Branch (261:10): [True: 22.4k, False: 4.06k]
  |  Branch (261:19): [True: 21.6k, False: 808]
  |  Branch (261:35): [True: 0, False: 21.6k]
  ------------------
  262|       |
  263|  26.5k|  T accumulator = *out;
  264|  26.5k|  const char* significant_digits_end =
  265|  26.5k|      (end - begin > max_digits) ? begin + max_digits : end;
  ------------------
  |  Branch (265:7): [True: 14.5k, False: 12.0k]
  ------------------
  266|   226k|  while (begin < significant_digits_end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (266:10): [True: 211k, False: 15.0k]
  |  Branch (266:44): [True: 199k, False: 11.5k]
  ------------------
  267|       |    // Do not guard against *out overflow; max_digits was chosen to avoid this.
  268|       |    // Do assert against it, to detect problems in debug builds.
  269|   199k|    auto digit = static_cast<T>(ToDigit<base>(*begin));
  270|   199k|    assert(accumulator * base >= accumulator);
  271|   199k|    accumulator *= base;
  272|   199k|    assert(accumulator + digit >= accumulator);
  273|   199k|    accumulator += digit;
  274|   199k|    ++begin;
  275|   199k|  }
  276|  26.5k|  bool dropped_nonzero = false;
  277|  1.65M|  while (begin < end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (277:10): [True: 1.64M, False: 10.3k]
  |  Branch (277:25): [True: 1.63M, False: 16.1k]
  ------------------
  278|  1.63M|    dropped_nonzero = dropped_nonzero || (*begin != '0');
  ------------------
  |  Branch (278:23): [True: 1.61M, False: 13.8k]
  |  Branch (278:42): [True: 9.77k, False: 4.02k]
  ------------------
  279|  1.63M|    ++begin;
  280|  1.63M|  }
  281|  26.5k|  if (dropped_nonzero && dropped_nonzero_digit != nullptr) {
  ------------------
  |  Branch (281:7): [True: 9.77k, False: 16.7k]
  |  Branch (281:26): [True: 9.77k, False: 0]
  ------------------
  282|  9.77k|    *dropped_nonzero_digit = true;
  283|  9.77k|  }
  284|  26.5k|  *out = accumulator;
  285|  26.5k|  return static_cast<int>(begin - original_begin);
  286|  26.5k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_17IsDigitILi10EEEbc:
  183|  1.89M|bool IsDigit<10>(char ch) {
  184|  1.89M|  return ch >= '0' && ch <= '9';
  ------------------
  |  Branch (184:10): [True: 1.87M, False: 13.6k]
  |  Branch (184:23): [True: 1.86M, False: 14.1k]
  ------------------
  185|  1.89M|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_17ToDigitILi10EEEjc:
  192|   227k|unsigned ToDigit<10>(char ch) {
  193|   227k|  return static_cast<unsigned>(ch - '0');
  194|   227k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_113ConsumeDigitsILi10EiEEiPKcS4_iPT0_Pb:
  250|  10.2k|                  bool* dropped_nonzero_digit) {
  251|  10.2k|  if (base == 10) {
  ------------------
  |  Branch (251:7): [True: 10.2k, Folded]
  ------------------
  252|  10.2k|    assert(max_digits <= std::numeric_limits<T>::digits10);
  253|  10.2k|  } else if (base == 16) {
  ------------------
  |  Branch (253:14): [Folded, False: 0]
  ------------------
  254|      0|    assert(max_digits * 4 <= std::numeric_limits<T>::digits);
  255|      0|  }
  256|  10.2k|  const char* const original_begin = begin;
  257|       |
  258|       |  // Skip leading zeros, but only if *out is zero.
  259|       |  // They don't cause an overflow so we don't have to count them for
  260|       |  // `max_digits`.
  261|  11.4k|  while (!*out && end != begin && *begin == '0') ++begin;
  ------------------
  |  Branch (261:10): [True: 11.4k, False: 0]
  |  Branch (261:19): [True: 10.6k, False: 837]
  |  Branch (261:35): [True: 1.15k, False: 9.44k]
  ------------------
  262|       |
  263|  10.2k|  T accumulator = *out;
  264|  10.2k|  const char* significant_digits_end =
  265|  10.2k|      (end - begin > max_digits) ? begin + max_digits : end;
  ------------------
  |  Branch (265:7): [True: 442, False: 9.84k]
  ------------------
  266|  37.8k|  while (begin < significant_digits_end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (266:10): [True: 27.6k, False: 10.2k]
  |  Branch (266:44): [True: 27.5k, False: 51]
  ------------------
  267|       |    // Do not guard against *out overflow; max_digits was chosen to avoid this.
  268|       |    // Do assert against it, to detect problems in debug builds.
  269|  27.5k|    auto digit = static_cast<T>(ToDigit<base>(*begin));
  270|  27.5k|    assert(accumulator * base >= accumulator);
  271|  27.5k|    accumulator *= base;
  272|  27.5k|    assert(accumulator + digit >= accumulator);
  273|  27.5k|    accumulator += digit;
  274|  27.5k|    ++begin;
  275|  27.5k|  }
  276|  10.2k|  bool dropped_nonzero = false;
  277|  15.7k|  while (begin < end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (277:10): [True: 5.52k, False: 10.2k]
  |  Branch (277:25): [True: 5.46k, False: 59]
  ------------------
  278|  5.46k|    dropped_nonzero = dropped_nonzero || (*begin != '0');
  ------------------
  |  Branch (278:23): [True: 4.91k, False: 552]
  |  Branch (278:42): [True: 434, False: 118]
  ------------------
  279|  5.46k|    ++begin;
  280|  5.46k|  }
  281|  10.2k|  if (dropped_nonzero && dropped_nonzero_digit != nullptr) {
  ------------------
  |  Branch (281:7): [True: 434, False: 9.84k]
  |  Branch (281:26): [True: 0, False: 434]
  ------------------
  282|      0|    *dropped_nonzero_digit = true;
  283|      0|  }
  284|  10.2k|  *out = accumulator;
  285|  10.2k|  return static_cast<int>(begin - original_begin);
  286|  10.2k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_113ConsumeDigitsILi16EmEEiPKcS4_iPT0_Pb:
  250|  6.86k|                  bool* dropped_nonzero_digit) {
  251|  6.86k|  if (base == 10) {
  ------------------
  |  Branch (251:7): [Folded, False: 6.86k]
  ------------------
  252|      0|    assert(max_digits <= std::numeric_limits<T>::digits10);
  253|  6.86k|  } else if (base == 16) {
  ------------------
  |  Branch (253:14): [True: 6.86k, Folded]
  ------------------
  254|  6.86k|    assert(max_digits * 4 <= std::numeric_limits<T>::digits);
  255|  6.86k|  }
  256|  6.86k|  const char* const original_begin = begin;
  257|       |
  258|       |  // Skip leading zeros, but only if *out is zero.
  259|       |  // They don't cause an overflow so we don't have to count them for
  260|       |  // `max_digits`.
  261|  6.86k|  while (!*out && end != begin && *begin == '0') ++begin;
  ------------------
  |  Branch (261:10): [True: 5.96k, False: 899]
  |  Branch (261:19): [True: 5.46k, False: 500]
  |  Branch (261:35): [True: 0, False: 5.46k]
  ------------------
  262|       |
  263|  6.86k|  T accumulator = *out;
  264|  6.86k|  const char* significant_digits_end =
  265|  6.86k|      (end - begin > max_digits) ? begin + max_digits : end;
  ------------------
  |  Branch (265:7): [True: 1.75k, False: 5.11k]
  ------------------
  266|  27.8k|  while (begin < significant_digits_end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (266:10): [True: 24.5k, False: 3.26k]
  |  Branch (266:44): [True: 20.9k, False: 3.59k]
  ------------------
  267|       |    // Do not guard against *out overflow; max_digits was chosen to avoid this.
  268|       |    // Do assert against it, to detect problems in debug builds.
  269|  20.9k|    auto digit = static_cast<T>(ToDigit<base>(*begin));
  270|  20.9k|    assert(accumulator * base >= accumulator);
  271|  20.9k|    accumulator *= base;
  272|  20.9k|    assert(accumulator + digit >= accumulator);
  273|  20.9k|    accumulator += digit;
  274|  20.9k|    ++begin;
  275|  20.9k|  }
  276|  6.86k|  bool dropped_nonzero = false;
  277|  16.1k|  while (begin < end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (277:10): [True: 13.4k, False: 2.63k]
  |  Branch (277:25): [True: 9.23k, False: 4.23k]
  ------------------
  278|  9.23k|    dropped_nonzero = dropped_nonzero || (*begin != '0');
  ------------------
  |  Branch (278:23): [True: 7.50k, False: 1.73k]
  |  Branch (278:42): [True: 1.28k, False: 456]
  ------------------
  279|  9.23k|    ++begin;
  280|  9.23k|  }
  281|  6.86k|  if (dropped_nonzero && dropped_nonzero_digit != nullptr) {
  ------------------
  |  Branch (281:7): [True: 1.28k, False: 5.58k]
  |  Branch (281:26): [True: 1.28k, False: 0]
  ------------------
  282|  1.28k|    *dropped_nonzero_digit = true;
  283|  1.28k|  }
  284|  6.86k|  *out = accumulator;
  285|  6.86k|  return static_cast<int>(begin - original_begin);
  286|  6.86k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_17IsDigitILi16EEEbc:
  187|  38.0k|bool IsDigit<16>(char ch) {
  188|  38.0k|  return kAsciiToInt[static_cast<unsigned char>(ch)] >= 0;
  189|  38.0k|}
charconv_parse.cc:_ZN4absl12lts_2024011612_GLOBAL__N_17ToDigitILi16EEEjc:
  196|  20.9k|unsigned ToDigit<16>(char ch) {
  197|  20.9k|  return static_cast<unsigned>(kAsciiToInt[static_cast<unsigned char>(ch)]);
  198|  20.9k|}

_ZN4absl12lts_2024011616strings_internal33CalculateBase64EscapedLenInternalEmb:
   35|      2|size_t CalculateBase64EscapedLenInternal(size_t input_len, bool do_padding) {
   36|       |  // Base64 encodes three bytes of input at a time. If the input is not
   37|       |  // divisible by three, we pad as appropriate.
   38|       |  //
   39|       |  // Base64 encodes each three bytes of input into four bytes of output.
   40|      2|  size_t len = (input_len / 3) * 4;
   41|       |
   42|       |  // Since all base 64 input is an integral number of octets, only the following
   43|       |  // cases can arise:
   44|      2|  if (input_len % 3 == 0) {
  ------------------
  |  Branch (44:7): [True: 0, False: 2]
  ------------------
   45|       |    // (from https://tools.ietf.org/html/rfc3548)
   46|       |    // (1) the final quantum of encoding input is an integral multiple of 24
   47|       |    // bits; here, the final unit of encoded output will be an integral
   48|       |    // multiple of 4 characters with no "=" padding,
   49|      2|  } else if (input_len % 3 == 1) {
  ------------------
  |  Branch (49:14): [True: 0, False: 2]
  ------------------
   50|       |    // (from https://tools.ietf.org/html/rfc3548)
   51|       |    // (2) the final quantum of encoding input is exactly 8 bits; here, the
   52|       |    // final unit of encoded output will be two characters followed by two
   53|       |    // "=" padding characters, or
   54|      0|    len += 2;
   55|      0|    if (do_padding) {
  ------------------
  |  Branch (55:9): [True: 0, False: 0]
  ------------------
   56|      0|      len += 2;
   57|      0|    }
   58|      2|  } else {  // (input_len % 3 == 2)
   59|       |    // (from https://tools.ietf.org/html/rfc3548)
   60|       |    // (3) the final quantum of encoding input is exactly 16 bits; here, the
   61|       |    // final unit of encoded output will be three characters followed by one
   62|       |    // "=" padding character.
   63|      2|    len += 3;
   64|      2|    if (do_padding) {
  ------------------
  |  Branch (64:9): [True: 0, False: 2]
  ------------------
   65|      0|      len += 1;
   66|      0|    }
   67|      2|  }
   68|       |
   69|       |  assert(len >= input_len);  // make sure we didn't overflow
   70|      2|  return len;
   71|      2|}
_ZN4absl12lts_2024011616strings_internal20Base64EscapeInternalEPKhmPcmPKcb:
   90|      2|                            bool do_padding) {
   91|      2|  static const char kPad64 = '=';
   92|       |
   93|      2|  if (szsrc * 4 > szdest * 3) return 0;
  ------------------
  |  Branch (93:7): [True: 0, False: 2]
  ------------------
   94|       |
   95|      2|  char* cur_dest = dest;
   96|      2|  const unsigned char* cur_src = src;
   97|       |
   98|      2|  char* const limit_dest = dest + szdest;
   99|      2|  const unsigned char* const limit_src = src + szsrc;
  100|       |
  101|       |  // (from https://tools.ietf.org/html/rfc3548)
  102|       |  // Special processing is performed if fewer than 24 bits are available
  103|       |  // at the end of the data being encoded.  A full encoding quantum is
  104|       |  // always completed at the end of a quantity.  When fewer than 24 input
  105|       |  // bits are available in an input group, zero bits are added (on the
  106|       |  // right) to form an integral number of 6-bit groups.
  107|       |  //
  108|       |  // If do_padding is true, padding at the end of the data is performed. This
  109|       |  // output padding uses the '=' character.
  110|       |
  111|       |  // Three bytes of data encodes to four characters of cyphertext.
  112|       |  // So we can pump through three-byte chunks atomically.
  113|      2|  if (szsrc >= 3) {                    // "limit_src - 3" is UB if szsrc < 3.
  ------------------
  |  Branch (113:7): [True: 2, False: 0]
  ------------------
  114|     22|    while (cur_src < limit_src - 3) {  // While we have >= 32 bits.
  ------------------
  |  Branch (114:12): [True: 20, False: 2]
  ------------------
  115|     20|      uint32_t in = absl::big_endian::Load32(cur_src) >> 8;
  116|       |
  117|     20|      cur_dest[0] = base64[in >> 18];
  118|     20|      in &= 0x3FFFF;
  119|     20|      cur_dest[1] = base64[in >> 12];
  120|     20|      in &= 0xFFF;
  121|     20|      cur_dest[2] = base64[in >> 6];
  122|     20|      in &= 0x3F;
  123|     20|      cur_dest[3] = base64[in];
  124|       |
  125|     20|      cur_dest += 4;
  126|     20|      cur_src += 3;
  127|     20|    }
  128|      2|  }
  129|       |  // To save time, we didn't update szdest or szsrc in the loop.  So do it now.
  130|      2|  szdest = static_cast<size_t>(limit_dest - cur_dest);
  131|      2|  szsrc = static_cast<size_t>(limit_src - cur_src);
  132|       |
  133|       |  /* now deal with the tail (<=3 bytes) */
  134|      2|  switch (szsrc) {
  135|      0|    case 0:
  ------------------
  |  Branch (135:5): [True: 0, False: 2]
  ------------------
  136|       |      // Nothing left; nothing more to do.
  137|      0|      break;
  138|      0|    case 1: {
  ------------------
  |  Branch (138:5): [True: 0, False: 2]
  ------------------
  139|       |      // One byte left: this encodes to two characters, and (optionally)
  140|       |      // two pad characters to round out the four-character cypherblock.
  141|      0|      if (szdest < 2) return 0;
  ------------------
  |  Branch (141:11): [True: 0, False: 0]
  ------------------
  142|      0|      uint32_t in = cur_src[0];
  143|      0|      cur_dest[0] = base64[in >> 2];
  144|      0|      in &= 0x3;
  145|      0|      cur_dest[1] = base64[in << 4];
  146|      0|      cur_dest += 2;
  147|      0|      szdest -= 2;
  148|      0|      if (do_padding) {
  ------------------
  |  Branch (148:11): [True: 0, False: 0]
  ------------------
  149|      0|        if (szdest < 2) return 0;
  ------------------
  |  Branch (149:13): [True: 0, False: 0]
  ------------------
  150|      0|        cur_dest[0] = kPad64;
  151|      0|        cur_dest[1] = kPad64;
  152|      0|        cur_dest += 2;
  153|      0|        szdest -= 2;
  154|      0|      }
  155|      0|      break;
  156|      0|    }
  157|      2|    case 2: {
  ------------------
  |  Branch (157:5): [True: 2, False: 0]
  ------------------
  158|       |      // Two bytes left: this encodes to three characters, and (optionally)
  159|       |      // one pad character to round out the four-character cypherblock.
  160|      2|      if (szdest < 3) return 0;
  ------------------
  |  Branch (160:11): [True: 0, False: 2]
  ------------------
  161|      2|      uint32_t in = absl::big_endian::Load16(cur_src);
  162|      2|      cur_dest[0] = base64[in >> 10];
  163|      2|      in &= 0x3FF;
  164|      2|      cur_dest[1] = base64[in >> 4];
  165|      2|      in &= 0x00F;
  166|      2|      cur_dest[2] = base64[in << 2];
  167|      2|      cur_dest += 3;
  168|      2|      szdest -= 3;
  169|      2|      if (do_padding) {
  ------------------
  |  Branch (169:11): [True: 0, False: 2]
  ------------------
  170|      0|        if (szdest < 1) return 0;
  ------------------
  |  Branch (170:13): [True: 0, False: 0]
  ------------------
  171|      0|        cur_dest[0] = kPad64;
  172|      0|        cur_dest += 1;
  173|      0|        szdest -= 1;
  174|      0|      }
  175|      2|      break;
  176|      2|    }
  177|      2|    case 3: {
  ------------------
  |  Branch (177:5): [True: 0, False: 2]
  ------------------
  178|       |      // Three bytes left: same as in the big loop above.  We can't do this in
  179|       |      // the loop because the loop above always reads 4 bytes, and the fourth
  180|       |      // byte is past the end of the input.
  181|      0|      if (szdest < 4) return 0;
  ------------------
  |  Branch (181:11): [True: 0, False: 0]
  ------------------
  182|      0|      uint32_t in =
  183|      0|          (uint32_t{cur_src[0]} << 16) + absl::big_endian::Load16(cur_src + 1);
  184|      0|      cur_dest[0] = base64[in >> 18];
  185|      0|      in &= 0x3FFFF;
  186|      0|      cur_dest[1] = base64[in >> 12];
  187|      0|      in &= 0xFFF;
  188|      0|      cur_dest[2] = base64[in >> 6];
  189|      0|      in &= 0x3F;
  190|      0|      cur_dest[3] = base64[in];
  191|      0|      cur_dest += 4;
  192|      0|      szdest -= 4;
  193|      0|      break;
  194|      0|    }
  195|      0|    default:
  ------------------
  |  Branch (195:5): [True: 0, False: 2]
  ------------------
  196|       |      // Should not be reached: blocks of 4 bytes are handled
  197|       |      // in the while loop before this switch statement.
  198|      0|      ABSL_RAW_LOG(FATAL, "Logic problem? szsrc = %zu", szsrc);
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  199|      0|      break;
  200|      2|  }
  201|      2|  return static_cast<size_t>(cur_dest - dest);
  202|      2|}

_ZN4absl12lts_2024011616strings_internal20Base64EscapeInternalINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEvPKhmPT_bPKc:
   42|      2|                          bool do_padding, const char* base64_chars) {
   43|      2|  const size_t calc_escaped_size =
   44|      2|      CalculateBase64EscapedLenInternal(szsrc, do_padding);
   45|      2|  STLStringResizeUninitialized(dest, calc_escaped_size);
   46|       |
   47|      2|  const size_t escaped_len = Base64EscapeInternal(
   48|      2|      src, szsrc, &(*dest)[0], dest->size(), base64_chars, do_padding);
   49|       |  assert(calc_escaped_size == escaped_len);
   50|      2|  dest->erase(escaped_len);
   51|      2|}

_ZN4absl12lts_2024011616strings_internal10memcasecmpEPKcS3_m:
   25|  1.33k|int memcasecmp(const char* s1, const char* s2, size_t len) {
   26|  1.33k|  const unsigned char* us1 = reinterpret_cast<const unsigned char*>(s1);
   27|  1.33k|  const unsigned char* us2 = reinterpret_cast<const unsigned char*>(s2);
   28|       |
   29|  3.94k|  for (size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29:22): [True: 2.66k, False: 1.28k]
  ------------------
   30|  2.66k|    unsigned char c1 = us1[i];
   31|  2.66k|    unsigned char c2 = us2[i];
   32|       |    // If bytes are the same, they will be the same when converted to lower.
   33|       |    // So we only need to convert if bytes are not equal.
   34|       |    // NOTE(b/308193381): We do not use `absl::ascii_tolower` here in order
   35|       |    // to avoid its lookup table and improve performance.
   36|  2.66k|    if (c1 != c2) {
  ------------------
  |  Branch (36:9): [True: 450, False: 2.21k]
  ------------------
   37|    450|      c1 = c1 >= 'A' && c1 <= 'Z' ? c1 - 'A' + 'a' : c1;
  ------------------
  |  Branch (37:12): [True: 436, False: 14]
  |  Branch (37:25): [True: 408, False: 28]
  ------------------
   38|    450|      c2 = c2 >= 'A' && c2 <= 'Z' ? c2 - 'A' + 'a' : c2;
  ------------------
  |  Branch (38:12): [True: 450, False: 0]
  |  Branch (38:25): [True: 0, False: 450]
  ------------------
   39|    450|      const int diff = int{c1} - int{c2};
   40|    450|      if (diff != 0) return diff;
  ------------------
  |  Branch (40:11): [True: 54, False: 396]
  ------------------
   41|    450|    }
   42|  2.66k|  }
   43|  1.28k|  return 0;
   44|  1.33k|}

_ZN4absl12lts_2024011616strings_internal28STLStringResizeUninitializedINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEvEEvPT_m:
   67|     54|inline void STLStringResizeUninitialized(string_type* s, size_t new_size) {
   68|     54|  ResizeUninitializedTraits<string_type>::Resize(s, new_size);
   69|     54|}
_ZN4absl12lts_2024011616strings_internal25ResizeUninitializedTraitsINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEvE6ResizeEPS9_m:
   47|     54|  static void Resize(string_type* s, size_t new_size) {
   48|     54|    s->__resize_default_init(new_size);
   49|     54|  }

_ZN4absl12lts_2024011611StrContainsENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   47|      2|                        absl::string_view needle) noexcept {
   48|      2|  return haystack.find(needle, 0) != haystack.npos;
   49|      2|}
_ZN4absl12lts_2024011610StartsWithENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   59|     14|                       absl::string_view prefix) noexcept {
   60|     14|  return prefix.empty() ||
  ------------------
  |  Branch (60:10): [True: 0, False: 14]
  ------------------
   61|     14|         (text.size() >= prefix.size() &&
  ------------------
  |  Branch (61:11): [True: 14, False: 0]
  ------------------
   62|     14|          memcmp(text.data(), prefix.data(), prefix.size()) == 0);
  ------------------
  |  Branch (62:11): [True: 12, False: 2]
  ------------------
   63|     14|}

_ZN4absl12lts_2024011610SimpleAtodENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEPd:
   83|  24.7k|bool SimpleAtod(absl::string_view str, absl::Nonnull<double*> out) {
   84|  24.7k|  *out = 0.0;
   85|  24.7k|  str = StripAsciiWhitespace(str);
   86|       |  // std::from_chars doesn't accept an initial +, but SimpleAtod does, so if one
   87|       |  // is present, skip it, while avoiding accepting "+-0" as valid.
   88|  24.7k|  if (!str.empty() && str[0] == '+') {
  ------------------
  |  Branch (88:7): [True: 24.7k, False: 3]
  |  Branch (88:23): [True: 734, False: 24.0k]
  ------------------
   89|    734|    str.remove_prefix(1);
   90|    734|    if (!str.empty() && str[0] == '-') {
  ------------------
  |  Branch (90:9): [True: 733, False: 1]
  |  Branch (90:25): [True: 3, False: 730]
  ------------------
   91|      3|      return false;
   92|      3|    }
   93|    734|  }
   94|  24.7k|  auto result = absl::from_chars(str.data(), str.data() + str.size(), *out);
   95|  24.7k|  if (result.ec == std::errc::invalid_argument) {
  ------------------
  |  Branch (95:7): [True: 103, False: 24.6k]
  ------------------
   96|    103|    return false;
   97|    103|  }
   98|  24.6k|  if (result.ptr != str.data() + str.size()) {
  ------------------
  |  Branch (98:7): [True: 230, False: 24.4k]
  ------------------
   99|       |    // not all non-whitespace characters consumed
  100|    230|    return false;
  101|    230|  }
  102|       |  // from_chars() with DR 3081's current wording will return max() on
  103|       |  // overflow.  SimpleAtod returns infinity instead.
  104|  24.4k|  if (result.ec == std::errc::result_out_of_range) {
  ------------------
  |  Branch (104:7): [True: 3.36k, False: 21.0k]
  ------------------
  105|  3.36k|    if (*out > 1.0) {
  ------------------
  |  Branch (105:9): [True: 1.82k, False: 1.54k]
  ------------------
  106|  1.82k|      *out = std::numeric_limits<double>::infinity();
  107|  1.82k|    } else if (*out < -1.0) {
  ------------------
  |  Branch (107:16): [True: 115, False: 1.42k]
  ------------------
  108|    115|      *out = -std::numeric_limits<double>::infinity();
  109|    115|    }
  110|  3.36k|  }
  111|  24.4k|  return true;
  112|  24.6k|}
_ZN4absl12lts_2024011616numbers_internal18safe_strtou64_baseENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPmi:
 1360|    976|                        int base) {
 1361|    976|  return safe_uint_internal<uint64_t>(text, value, base);
 1362|    976|}
numbers.cc:_ZN4absl12lts_2024011612_GLOBAL__N_124safe_parse_sign_and_baseEPNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPiPb:
  923|    976|    absl::Nonnull<bool*> negative_ptr /*output*/) {
  924|    976|  if (text->data() == nullptr) {
  ------------------
  |  Branch (924:7): [True: 0, False: 976]
  ------------------
  925|      0|    return false;
  926|      0|  }
  927|       |
  928|    976|  const char* start = text->data();
  929|    976|  const char* end = start + text->size();
  930|    976|  int base = *base_ptr;
  931|       |
  932|       |  // Consume whitespace.
  933|    976|  while (start < end &&
  ------------------
  |  Branch (933:10): [True: 975, False: 1]
  ------------------
  934|    975|         absl::ascii_isspace(static_cast<unsigned char>(start[0]))) {
  ------------------
  |  Branch (934:10): [True: 0, False: 975]
  ------------------
  935|      0|    ++start;
  936|      0|  }
  937|  1.17k|  while (start < end &&
  ------------------
  |  Branch (937:10): [True: 1.17k, False: 1]
  ------------------
  938|  1.17k|         absl::ascii_isspace(static_cast<unsigned char>(end[-1]))) {
  ------------------
  |  Branch (938:10): [True: 200, False: 975]
  ------------------
  939|    200|    --end;
  940|    200|  }
  941|    976|  if (start >= end) {
  ------------------
  |  Branch (941:7): [True: 1, False: 975]
  ------------------
  942|      1|    return false;
  943|      1|  }
  944|       |
  945|       |  // Consume sign.
  946|    975|  *negative_ptr = (start[0] == '-');
  947|    975|  if (*negative_ptr || start[0] == '+') {
  ------------------
  |  Branch (947:7): [True: 3, False: 972]
  |  Branch (947:24): [True: 350, False: 622]
  ------------------
  948|    353|    ++start;
  949|    353|    if (start >= end) {
  ------------------
  |  Branch (949:9): [True: 8, False: 345]
  ------------------
  950|      8|      return false;
  951|      8|    }
  952|    353|  }
  953|       |
  954|       |  // Consume base-dependent prefix.
  955|       |  //  base 0: "0x" -> base 16, "0" -> base 8, default -> base 10
  956|       |  //  base 16: "0x" -> base 16
  957|       |  // Also validate the base.
  958|    967|  if (base == 0) {
  ------------------
  |  Branch (958:7): [True: 0, False: 967]
  ------------------
  959|      0|    if (end - start >= 2 && start[0] == '0' &&
  ------------------
  |  Branch (959:9): [True: 0, False: 0]
  |  Branch (959:29): [True: 0, False: 0]
  ------------------
  960|      0|        (start[1] == 'x' || start[1] == 'X')) {
  ------------------
  |  Branch (960:10): [True: 0, False: 0]
  |  Branch (960:29): [True: 0, False: 0]
  ------------------
  961|      0|      base = 16;
  962|      0|      start += 2;
  963|      0|      if (start >= end) {
  ------------------
  |  Branch (963:11): [True: 0, False: 0]
  ------------------
  964|       |        // "0x" with no digits after is invalid.
  965|      0|        return false;
  966|      0|      }
  967|      0|    } else if (end - start >= 1 && start[0] == '0') {
  ------------------
  |  Branch (967:16): [True: 0, False: 0]
  |  Branch (967:36): [True: 0, False: 0]
  ------------------
  968|      0|      base = 8;
  969|      0|      start += 1;
  970|      0|    } else {
  971|      0|      base = 10;
  972|      0|    }
  973|    967|  } else if (base == 16) {
  ------------------
  |  Branch (973:14): [True: 0, False: 967]
  ------------------
  974|      0|    if (end - start >= 2 && start[0] == '0' &&
  ------------------
  |  Branch (974:9): [True: 0, False: 0]
  |  Branch (974:29): [True: 0, False: 0]
  ------------------
  975|      0|        (start[1] == 'x' || start[1] == 'X')) {
  ------------------
  |  Branch (975:10): [True: 0, False: 0]
  |  Branch (975:29): [True: 0, False: 0]
  ------------------
  976|      0|      start += 2;
  977|      0|      if (start >= end) {
  ------------------
  |  Branch (977:11): [True: 0, False: 0]
  ------------------
  978|       |        // "0x" with no digits after is invalid.
  979|      0|        return false;
  980|      0|      }
  981|      0|    }
  982|    967|  } else if (base >= 2 && base <= 36) {
  ------------------
  |  Branch (982:14): [True: 967, False: 0]
  |  Branch (982:27): [True: 967, False: 0]
  ------------------
  983|       |    // okay
  984|    967|  } else {
  985|      0|    return false;
  986|      0|  }
  987|    967|  *text = absl::string_view(start, static_cast<size_t>(end - start));
  988|    967|  *base_ptr = base;
  989|    967|  return true;
  990|    967|}
numbers.cc:_ZN4absl12lts_2024011612_GLOBAL__N_118safe_uint_internalImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPT_i:
 1305|    976|                               absl::Nonnull<IntType*> value_p, int base) {
 1306|    976|  *value_p = 0;
 1307|    976|  bool negative;
 1308|    976|  if (!safe_parse_sign_and_base(&text, &base, &negative) || negative) {
  ------------------
  |  Branch (1308:7): [True: 9, False: 967]
  |  Branch (1308:61): [True: 3, False: 964]
  ------------------
 1309|     12|    return false;
 1310|     12|  }
 1311|    964|  return safe_parse_positive_int(text, base, value_p);
 1312|    976|}
numbers.cc:_ZN4absl12lts_2024011612_GLOBAL__N_123safe_parse_positive_intImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEiPT_:
 1208|    964|                                    absl::Nonnull<IntType*> value_p) {
 1209|    964|  IntType value = 0;
 1210|    964|  const IntType vmax = std::numeric_limits<IntType>::max();
 1211|    964|  assert(vmax > 0);
 1212|    964|  assert(base >= 0);
 1213|    964|  const IntType base_inttype = static_cast<IntType>(base);
 1214|    964|  assert(vmax >= base_inttype);
 1215|    964|  const IntType vmax_over_base = LookupTables<IntType>::kVmaxOverBase[base];
 1216|    964|  assert(base < 2 ||
 1217|    964|         std::numeric_limits<IntType>::max() / base_inttype == vmax_over_base);
 1218|    964|  const char* start = text.data();
 1219|    964|  const char* end = start + text.size();
 1220|       |  // loop over digits
 1221|  4.43k|  for (; start < end; ++start) {
  ------------------
  |  Branch (1221:10): [True: 3.55k, False: 878]
  ------------------
 1222|  3.55k|    unsigned char c = static_cast<unsigned char>(start[0]);
 1223|  3.55k|    IntType digit = static_cast<IntType>(kAsciiToInt[c]);
 1224|  3.55k|    if (digit >= base_inttype) {
  ------------------
  |  Branch (1224:9): [True: 21, False: 3.53k]
  ------------------
 1225|     21|      *value_p = value;
 1226|     21|      return false;
 1227|     21|    }
 1228|  3.53k|    if (value > vmax_over_base) {
  ------------------
  |  Branch (1228:9): [True: 64, False: 3.46k]
  ------------------
 1229|     64|      *value_p = vmax;
 1230|     64|      return false;
 1231|     64|    }
 1232|  3.46k|    value *= base_inttype;
 1233|  3.46k|    if (value > vmax - digit) {
  ------------------
  |  Branch (1233:9): [True: 1, False: 3.46k]
  ------------------
 1234|      1|      *value_p = vmax;
 1235|      1|      return false;
 1236|      1|    }
 1237|  3.46k|    value += digit;
 1238|  3.46k|  }
 1239|    878|  *value_p = value;
 1240|    878|  return true;
 1241|    964|}

_ZN4absl12lts_2024011616numbers_internal16safe_strtoi_baseImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPT_i:
  354|    976|                                           int base) {
  355|    976|  static_assert(sizeof(*out) == 4 || sizeof(*out) == 8,
  356|    976|                "SimpleAtoi works only with 32-bit or 64-bit integers.");
  357|    976|  static_assert(!std::is_floating_point<int_type>::value,
  358|    976|                "Use SimpleAtof or SimpleAtod instead.");
  359|    976|  bool parsed;
  360|       |  // TODO(jorg): This signed-ness check is used because it works correctly
  361|       |  // with enums, and it also serves to check that int_type is not a pointer.
  362|       |  // If one day something like std::is_signed<enum E> works, switch to it.
  363|       |  // These conditions are constexpr bools to suppress MSVC warning C4127.
  364|    976|  constexpr bool kIsSigned = static_cast<int_type>(1) - 2 < 0;
  365|    976|  constexpr bool kUse64Bit = sizeof(*out) == 64 / 8;
  366|    976|  if (kIsSigned) {
  ------------------
  |  Branch (366:7): [Folded, False: 976]
  ------------------
  367|      0|    if (kUse64Bit) {
  ------------------
  |  Branch (367:9): [True: 0, Folded]
  ------------------
  368|      0|      int64_t val;
  369|      0|      parsed = numbers_internal::safe_strto64_base(s, &val, base);
  370|      0|      *out = static_cast<int_type>(val);
  371|      0|    } else {
  372|      0|      int32_t val;
  373|      0|      parsed = numbers_internal::safe_strto32_base(s, &val, base);
  374|      0|      *out = static_cast<int_type>(val);
  375|      0|    }
  376|    976|  } else {
  377|    976|    if (kUse64Bit) {
  ------------------
  |  Branch (377:9): [True: 976, Folded]
  ------------------
  378|    976|      uint64_t val;
  379|    976|      parsed = numbers_internal::safe_strtou64_base(s, &val, base);
  380|    976|      *out = static_cast<int_type>(val);
  381|    976|    } else {
  382|      0|      uint32_t val;
  383|      0|      parsed = numbers_internal::safe_strtou32_base(s, &val, base);
  384|      0|      *out = static_cast<int_type>(val);
  385|      0|    }
  386|    976|  }
  387|    976|  return parsed;
  388|    976|}
_ZN4absl12lts_2024011610SimpleAtoiImEEbNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPT_:
  423|    974|                                     absl::Nonnull<int_type*> out) {
  424|    974|  return numbers_internal::safe_strtoi_base(str, out, 10);
  425|    974|}

_ZN4absl12lts_202401166StrCatERKNS0_8AlphaNumES3_:
   58|      2|std::string StrCat(const AlphaNum& a, const AlphaNum& b) {
   59|      2|  std::string result;
   60|      2|  absl::strings_internal::STLStringResizeUninitialized(&result,
   61|      2|                                                       a.size() + b.size());
   62|      2|  char* const begin = &result[0];
   63|      2|  char* out = begin;
   64|      2|  out = Append(out, a);
   65|      2|  out = Append(out, b);
   66|       |  assert(out == begin + result.size());
   67|      2|  return result;
   68|      2|}
_ZN4absl12lts_202401166StrCatERKNS0_8AlphaNumES3_S3_:
   70|     50|std::string StrCat(const AlphaNum& a, const AlphaNum& b, const AlphaNum& c) {
   71|     50|  std::string result;
   72|     50|  strings_internal::STLStringResizeUninitialized(
   73|     50|      &result, a.size() + b.size() + c.size());
   74|     50|  char* const begin = &result[0];
   75|     50|  char* out = begin;
   76|     50|  out = Append(out, a);
   77|     50|  out = Append(out, b);
   78|     50|  out = Append(out, c);
   79|       |  assert(out == begin + result.size());
   80|     50|  return result;
   81|     50|}
str_cat.cc:_ZN4absl12lts_2024011612_GLOBAL__N_16AppendEPcRKNS0_8AlphaNumE:
   46|    154|absl::Nonnull<char*> Append(absl::Nonnull<char*> out, const AlphaNum& x) {
   47|       |  // memcpy is allowed to overwrite arbitrary memory, so doing this after the
   48|       |  // call would force an extra fetch of x.size().
   49|    154|  char* after = out + x.size();
   50|    154|  if (x.size() != 0) {
  ------------------
  |  Branch (50:7): [True: 152, False: 2]
  ------------------
   51|    152|    memcpy(out, x.data(), x.size());
   52|    152|  }
   53|    154|  return after;
   54|    154|}

_ZN4absl12lts_202401168AlphaNumC2EPKc:
  353|     54|      : piece_(NullSafeStringView(c_str)) {}
_ZN4absl12lts_202401168AlphaNumC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  356|     82|      : piece_(pc) {}
_ZNK4absl12lts_202401168AlphaNum4sizeEv:
  377|    614|  absl::string_view::size_type size() const { return piece_.size(); }
_ZNK4absl12lts_202401168AlphaNum4dataEv:
  378|    152|  absl::Nullable<const char*> data() const { return piece_.data(); }
_ZN4absl12lts_202401168AlphaNumC2INSt3__19allocatorIcEEEERKNS3_12basic_stringIcNS3_11char_traitsIcEET_EE:
  369|     18|      : piece_(str) {}

_ZN4absl12lts_2024011618NullSafeStringViewEPKc:
  762|     54|constexpr string_view NullSafeStringView(absl::Nullable<const char*> p) {
  763|     54|  return p ? string_view(p) : string_view();
  ------------------
  |  Branch (763:10): [True: 54, False: 0]
  ------------------
  764|     54|}

_ZN4absl12lts_2024011613ConsumePrefixEPNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   48|     12|                          absl::string_view expected) {
   49|     12|  if (!absl::StartsWith(*str, expected)) return false;
  ------------------
  |  Branch (49:7): [True: 0, False: 12]
  ------------------
   50|     12|  str->remove_prefix(expected.size());
   51|     12|  return true;
   52|     12|}

_ZN4absl12lts_2024011624synchronization_internal14InvalidGraphIdEv:
   58|    172|inline GraphId InvalidGraphId() {
   59|    172|  return GraphId{0};
   60|    172|}

_ZN4absl12lts_202401165Mutex4LockEv:
 1524|    172|void Mutex::Lock() {
 1525|    172|  ABSL_TSAN_MUTEX_PRE_LOCK(this, 0);
 1526|    172|  GraphId id = DebugOnlyDeadlockCheck(this);
 1527|    172|  intptr_t v = mu_.load(std::memory_order_relaxed);
 1528|       |  // try fast acquire, then spin loop
 1529|    172|  if (ABSL_PREDICT_FALSE((v & (kMuWriter | kMuReader | kMuEvent)) != 0) ||
  ------------------
  |  |  178|    344|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 172]
  |  |  |  Branch (178:49): [Folded, False: 172]
  |  |  |  Branch (178:58): [True: 0, False: 172]
  |  |  ------------------
  ------------------
 1530|    172|      ABSL_PREDICT_FALSE(!mu_.compare_exchange_strong(
  ------------------
  |  |  178|    172|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 172]
  |  |  |  Branch (178:49): [Folded, False: 172]
  |  |  |  Branch (178:58): [True: 0, False: 172]
  |  |  ------------------
  ------------------
 1531|    172|          v, kMuWriter | v, std::memory_order_acquire,
 1532|    172|          std::memory_order_relaxed))) {
 1533|       |    // try spin acquire, then slow loop
 1534|      0|    if (ABSL_PREDICT_FALSE(!TryAcquireWithSpinning(&this->mu_))) {
  ------------------
  |  |  178|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (178:31): [True: 0, False: 0]
  |  |  |  Branch (178:49): [Folded, False: 0]
  |  |  |  Branch (178:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1535|      0|      this->LockSlow(kExclusive, nullptr, 0);
 1536|      0|    }
 1537|      0|  }
 1538|    172|  DebugOnlyLockEnter(this, id);
 1539|    172|  ABSL_TSAN_MUTEX_POST_LOCK(this, 0, 0);
 1540|    172|}
_ZN4absl12lts_202401165Mutex6UnlockEv:
 1702|    172|void Mutex::Unlock() {
 1703|    172|  ABSL_TSAN_MUTEX_PRE_UNLOCK(this, 0);
 1704|    172|  DebugOnlyLockLeave(this);
 1705|    172|  intptr_t v = mu_.load(std::memory_order_relaxed);
 1706|       |
 1707|    172|  if (kDebugMode && ((v & (kMuWriter | kMuReader)) != kMuWriter)) {
  ------------------
  |  Branch (1707:7): [Folded, False: 172]
  |  Branch (1707:21): [True: 0, False: 0]
  ------------------
 1708|      0|    ABSL_RAW_LOG(FATAL, "Mutex unlocked when destroyed or not locked: v=0x%x",
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1709|      0|                 static_cast<unsigned>(v));
 1710|      0|  }
 1711|       |
 1712|       |  // should_try_cas is whether we'll try a compare-and-swap immediately.
 1713|       |  // NOTE: optimized out when kDebugMode is false.
 1714|    172|  bool should_try_cas = ((v & (kMuEvent | kMuWriter)) == kMuWriter &&
  ------------------
  |  Branch (1714:26): [True: 172, False: 0]
  ------------------
 1715|    172|                         (v & (kMuWait | kMuDesig)) != kMuWait);
  ------------------
  |  Branch (1715:26): [True: 172, False: 0]
  ------------------
 1716|       |  // But, we can use an alternate computation of it, that compilers
 1717|       |  // currently don't find on their own.  When that changes, this function
 1718|       |  // can be simplified.
 1719|    172|  intptr_t x = (v ^ (kMuWriter | kMuWait)) & (kMuWriter | kMuEvent);
 1720|    172|  intptr_t y = (v ^ (kMuWriter | kMuWait)) & (kMuWait | kMuDesig);
 1721|       |  // Claim: "x == 0 && y > 0" is equal to should_try_cas.
 1722|       |  // Also, because kMuWriter and kMuEvent exceed kMuDesig and kMuWait,
 1723|       |  // all possible non-zero values for x exceed all possible values for y.
 1724|       |  // Therefore, (x == 0 && y > 0) == (x < y).
 1725|    172|  if (kDebugMode && should_try_cas != (x < y)) {
  ------------------
  |  Branch (1725:7): [Folded, False: 172]
  |  Branch (1725:21): [True: 0, False: 0]
  ------------------
 1726|       |    // We would usually use PRIdPTR here, but is not correctly implemented
 1727|       |    // within the android toolchain.
 1728|      0|    ABSL_RAW_LOG(FATAL, "internal logic error %llx %llx %llx\n",
  ------------------
  |  |   45|      0|  do {                                                                         \
  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  ------------------
  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  ------------------
  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  ------------------
  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  ------------------
  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1729|      0|                 static_cast<long long>(v), static_cast<long long>(x),
 1730|      0|                 static_cast<long long>(y));
 1731|      0|  }
 1732|    172|  if (x < y && mu_.compare_exchange_strong(v, v & ~(kMuWrWait | kMuWriter),
  ------------------
  |  Branch (1732:7): [True: 172, False: 0]
  |  Branch (1732:16): [True: 172, False: 0]
  ------------------
 1733|    172|                                           std::memory_order_release,
 1734|    172|                                           std::memory_order_relaxed)) {
 1735|       |    // fast writer release (writer with no waiters or with designated waker)
 1736|    172|  } else {
 1737|      0|    this->UnlockSlow(nullptr /*no waitp*/);  // take slow path
 1738|      0|  }
 1739|    172|  ABSL_TSAN_MUTEX_POST_UNLOCK(this, 0);
 1740|    172|}
mutex.cc:_ZN4absl12lts_20240116L22DebugOnlyDeadlockCheckEPNS0_5MutexE:
 1466|    172|static inline GraphId DebugOnlyDeadlockCheck(Mutex* mu) {
 1467|    172|  if (kDebugMode && synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1467:7): [Folded, False: 172]
  |  Branch (1467:21): [True: 0, False: 0]
  ------------------
 1468|      0|                        OnDeadlockCycle::kIgnore) {
 1469|      0|    return DeadlockCheck(mu);
 1470|    172|  } else {
 1471|    172|    return InvalidGraphId();
 1472|    172|  }
 1473|    172|}
mutex.cc:_ZN4absl12lts_20240116L18DebugOnlyLockEnterEPNS0_5MutexENS0_24synchronization_internal7GraphIdE:
 1298|    172|static inline void DebugOnlyLockEnter(Mutex* mu, GraphId id) {
 1299|    172|  if (kDebugMode) {
  ------------------
  |  Branch (1299:7): [Folded, False: 172]
  ------------------
 1300|      0|    if (synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1300:9): [True: 0, False: 0]
  ------------------
 1301|      0|        OnDeadlockCycle::kIgnore) {
 1302|      0|      LockEnter(mu, id, Synch_GetAllLocks());
 1303|      0|    }
 1304|      0|  }
 1305|    172|}
mutex.cc:_ZN4absl12lts_20240116L18DebugOnlyLockLeaveEPNS0_5MutexE:
 1308|    172|static inline void DebugOnlyLockLeave(Mutex* mu) {
 1309|    172|  if (kDebugMode) {
  ------------------
  |  Branch (1309:7): [Folded, False: 172]
  ------------------
 1310|      0|    if (synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1310:9): [True: 0, False: 0]
  ------------------
 1311|      0|        OnDeadlockCycle::kIgnore) {
 1312|      0|      LockLeave(mu, GetGraphId(mu), Synch_GetAllLocks());
 1313|      0|    }
 1314|      0|  }
 1315|    172|}

_ZN4absl12lts_202401169MutexLockC2EPNS0_5MutexE:
  583|    130|  explicit MutexLock(Mutex* mu) ABSL_EXCLUSIVE_LOCK_FUNCTION(mu) : mu_(mu) {
  584|    130|    this->mu_->Lock();
  585|    130|  }
_ZN4absl12lts_202401169MutexLockD2Ev:
  601|    130|  ~MutexLock() ABSL_UNLOCK_FUNCTION() { this->mu_->Unlock(); }
_ZN4absl12lts_202401165MutexC2Ev:
 1061|     40|inline Mutex::Mutex() : mu_(0) {
 1062|     40|  ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static);
 1063|     40|}

_ZN4absl12lts_202401163NowEv:
   39|  25.6k|Time Now() {
   40|       |  // TODO(bww): Get a timespec instead so we don't have to divide.
   41|  25.6k|  int64_t n = absl::GetCurrentTimeNanos();
   42|  25.6k|  if (n >= 0) {
  ------------------
  |  Branch (42:7): [True: 25.6k, False: 0]
  ------------------
   43|  25.6k|    return time_internal::FromUnixDuration(
   44|  25.6k|        time_internal::MakeDuration(n / 1000000000, n % 1000000000 * 4));
   45|  25.6k|  }
   46|      0|  return time_internal::FromUnixDuration(absl::Nanoseconds(n));
   47|  25.6k|}
_ZN4absl12lts_2024011619GetCurrentTimeNanosEv:
   77|  25.6k|int64_t GetCurrentTimeNanos() { return GET_CURRENT_TIME_NANOS_FROM_SYSTEM(); }
  ------------------
  |  |   71|  25.6k|  ::absl::time_internal::GetCurrentTimeNanosFromSystem()
  ------------------

_ZN4absl12lts_202401168DurationmIES1_:
  419|  12.8k|Duration& Duration::operator-=(Duration rhs) {
  420|  12.8k|  if (time_internal::IsInfiniteDuration(*this)) return *this;
  ------------------
  |  Branch (420:7): [True: 0, False: 12.8k]
  ------------------
  421|  12.8k|  if (time_internal::IsInfiniteDuration(rhs)) {
  ------------------
  |  Branch (421:7): [True: 0, False: 12.8k]
  ------------------
  422|      0|    return *this = rhs.rep_hi_.Get() >= 0 ? -InfiniteDuration()
  ------------------
  |  Branch (422:20): [True: 0, False: 0]
  ------------------
  423|      0|                                          : InfiniteDuration();
  424|      0|  }
  425|  12.8k|  const int64_t orig_rep_hi = rep_hi_.Get();
  426|  12.8k|  rep_hi_ = DecodeTwosComp(EncodeTwosComp(rep_hi_.Get()) -
  427|  12.8k|                           EncodeTwosComp(rhs.rep_hi_.Get()));
  428|  12.8k|  if (rep_lo_ < rhs.rep_lo_) {
  ------------------
  |  Branch (428:7): [True: 22, False: 12.8k]
  ------------------
  429|     22|    rep_hi_ = DecodeTwosComp(EncodeTwosComp(rep_hi_.Get()) - 1);
  430|     22|    rep_lo_ += kTicksPerSecond;
  431|     22|  }
  432|  12.8k|  rep_lo_ -= rhs.rep_lo_;
  433|  12.8k|  if (rhs.rep_hi_.Get() < 0 ? rep_hi_.Get() < orig_rep_hi
  ------------------
  |  Branch (433:7): [True: 0, False: 12.8k]
  |  Branch (433:7): [True: 0, False: 12.8k]
  ------------------
  434|  12.8k|                            : rep_hi_.Get() > orig_rep_hi) {
  435|      0|    return *this = rhs.rep_hi_.Get() >= 0 ? -InfiniteDuration()
  ------------------
  |  Branch (435:20): [True: 0, False: 0]
  ------------------
  436|      0|                                          : InfiniteDuration();
  437|      0|  }
  438|  12.8k|  return *this;
  439|  12.8k|}
duration.cc:_ZN4absl12lts_2024011612_GLOBAL__N_114DecodeTwosCompEm:
  187|  12.8k|inline int64_t DecodeTwosComp(uint64_t v) { return absl::bit_cast<int64_t>(v); }
duration.cc:_ZN4absl12lts_2024011612_GLOBAL__N_114EncodeTwosCompEl:
  184|  25.7k|inline uint64_t EncodeTwosComp(int64_t v) {
  185|  25.7k|  return absl::bit_cast<uint64_t>(v);
  186|  25.7k|}

clock.cc:_ZN4absl12lts_2024011613time_internalL29GetCurrentTimeNanosFromSystemEv:
   13|  25.6k|static int64_t GetCurrentTimeNanosFromSystem() {
   14|  25.6k|  const int64_t kNanosPerSecond = 1000 * 1000 * 1000;
   15|  25.6k|  struct timespec ts;
   16|  25.6k|  ABSL_RAW_CHECK(clock_gettime(CLOCK_REALTIME, &ts) == 0,
  ------------------
  |  |   60|  25.6k|  do {                                                                 \
  |  |   61|  25.6k|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  178|  25.6k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (178:31): [True: 0, False: 25.6k]
  |  |  |  |  |  Branch (178:49): [Folded, False: 25.6k]
  |  |  |  |  |  Branch (178:58): [True: 0, False: 25.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|      0|      ABSL_RAW_LOG(FATAL, "Check %s failed: %s", #condition, message); \
  |  |  ------------------
  |  |  |  |   45|      0|  do {                                                                         \
  |  |  |  |   46|      0|    constexpr const char* absl_raw_log_internal_basename =                     \
  |  |  |  |   47|      0|        ::absl::raw_log_internal::Basename(__FILE__, sizeof(__FILE__) - 1);    \
  |  |  |  |   48|      0|    ::absl::raw_log_internal::RawLog(ABSL_RAW_LOG_INTERNAL_##severity,         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  110|      0|#define ABSL_RAW_LOG_INTERNAL_FATAL ::absl::LogSeverity::kFatal
  |  |  |  |  ------------------
  |  |  |  |   49|      0|                                     absl_raw_log_internal_basename, __LINE__, \
  |  |  |  |   50|      0|                                     __VA_ARGS__);                             \
  |  |  |  |   51|      0|    ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_##severity;                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  118|      0|#define ABSL_RAW_LOG_INTERNAL_MAYBE_UNREACHABLE_FATAL ABSL_UNREACHABLE()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  225|      0|  do {                                           \
  |  |  |  |  |  |  |  |  226|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  227|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  228|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  203|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  229|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (229:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|  25.6k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 25.6k]
  |  |  ------------------
  ------------------
   17|  25.6k|                 "Failed to read real-time clock.");
   18|  25.6k|  return (int64_t{ts.tv_sec} * kNanosPerSecond +
   19|  25.6k|          int64_t{ts.tv_nsec});
   20|  25.6k|}

_ZN4absl12lts_202401168DurationC2Ev:
  169|  12.8k|  constexpr Duration() : rep_hi_(0), rep_lo_(0) {}  // zero-length duration
_ZN4absl12lts_202401168DurationC2Elj:
  231|  41.5k|  constexpr Duration(int64_t hi, uint32_t lo) : rep_hi_(hi), rep_lo_(lo) {}
_ZN4absl12lts_202401168Duration5HiRepC2El:
  251|  54.4k|          lo_(0),
  252|  54.4k|          hi_(0)
  253|       |#endif
  254|  54.4k|    {
  255|  54.4k|      *this = value;
  256|  54.4k|    }
_ZNK4absl12lts_202401168Duration5HiRep3GetEv:
  258|  96.0k|    constexpr int64_t Get() const {
  259|  96.0k|      const uint64_t unsigned_value =
  260|  96.0k|          (static_cast<uint64_t>(hi_) << 32) | static_cast<uint64_t>(lo_);
  261|       |      // `static_cast<int64_t>(unsigned_value)` is implementation-defined
  262|       |      // before c++20. On all supported platforms the behaviour is that mandated
  263|       |      // by c++20, i.e. "If the destination type is signed, [...] the result is
  264|       |      // the unique value of the destination type equal to the source value
  265|       |      // modulo 2^n, where n is the number of bits used to represent the
  266|       |      // destination type."
  267|  96.0k|      static_assert(
  268|  96.0k|          (static_cast<int64_t>((std::numeric_limits<uint64_t>::max)()) ==
  269|  96.0k|           int64_t{-1}) &&
  270|  96.0k|              (static_cast<int64_t>(static_cast<uint64_t>(
  271|  96.0k|                                        (std::numeric_limits<int64_t>::max)()) +
  272|  96.0k|                                    1) ==
  273|  96.0k|               (std::numeric_limits<int64_t>::min)()),
  274|  96.0k|          "static_cast<int64_t>(uint64_t) does not have c++20 semantics");
  275|  96.0k|      return static_cast<int64_t>(unsigned_value);
  276|  96.0k|    }
_ZN4absl12lts_202401168Duration5HiRepaSEl:
  278|  67.3k|    constexpr HiRep& operator=(const int64_t value) {
  279|       |      // "If the destination type is unsigned, the resulting value is the
  280|       |      // smallest unsigned value equal to the source value modulo 2^n
  281|       |      // where `n` is the number of bits used to represent the destination
  282|       |      // type".
  283|  67.3k|      const auto unsigned_value = static_cast<uint64_t>(value);
  284|  67.3k|      hi_ = static_cast<uint32_t>(unsigned_value >> 32);
  285|  67.3k|      lo_ = static_cast<uint32_t>(unsigned_value);
  286|  67.3k|      return *this;
  287|  67.3k|    }
_ZN4absl12lts_202401164TimeC2ENS0_8DurationE:
  850|  41.5k|  constexpr explicit Time(Duration rep) : rep_(rep) {}
_ZN4absl12lts_20240116leENS0_8DurationES1_:
  320|      8|                                                        Duration rhs) {
  321|      8|  return !(rhs < lhs);
  322|      8|}
_ZN4absl12lts_20240116miENS0_8DurationES1_:
  337|  12.8k|                                                        Duration rhs) {
  338|  12.8k|  return lhs -= rhs;
  339|  12.8k|}
_ZN4absl12lts_2024011612ZeroDurationEv:
  416|  12.8k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Duration ZeroDuration() {
  417|  12.8k|  return Duration();
  418|  12.8k|}
_ZN4absl12lts_20240116eqENS0_4TimeES1_:
  867|  15.9k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator==(Time lhs, Time rhs) {
  868|  15.9k|  return lhs.rep_ == rhs.rep_;
  869|  15.9k|}
_ZN4absl12lts_20240116neENS0_4TimeES1_:
  870|  15.9k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator!=(Time lhs, Time rhs) {
  871|  15.9k|  return !(lhs == rhs);
  872|  15.9k|}
_ZN4absl12lts_20240116miENS0_4TimeES1_:
  884|  12.8k|ABSL_ATTRIBUTE_CONST_FUNCTION inline Duration operator-(Time lhs, Time rhs) {
  885|  12.8k|  return lhs.rep_ - rhs.rep_;
  886|  12.8k|}
_ZN4absl12lts_2024011614InfiniteFutureEv:
  907|  15.9k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Time InfiniteFuture() {
  908|  15.9k|  return Time(time_internal::MakeDuration((std::numeric_limits<int64_t>::max)(),
  909|  15.9k|                                          ~uint32_t{0}));
  910|  15.9k|}
_ZN4absl12lts_2024011613time_internal12MakeDurationElj:
 1561|  41.5k|                                                              uint32_t lo = 0) {
 1562|  41.5k|  return Duration(hi, lo);
 1563|  41.5k|}
_ZN4absl12lts_2024011613time_internal12MakeDurationEll:
 1566|  25.6k|                                                              int64_t lo) {
 1567|  25.6k|  return MakeDuration(hi, static_cast<uint32_t>(lo));
 1568|  25.6k|}
_ZN4absl12lts_2024011613time_internal8GetRepHiENS0_8DurationE:
 1593|  31.8k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t GetRepHi(Duration d) {
 1594|  31.8k|  return d.rep_hi_.Get();
 1595|  31.8k|}
_ZN4absl12lts_2024011613time_internal8GetRepLoENS0_8DurationE:
 1596|  57.5k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr uint32_t GetRepLo(Duration d) {
 1597|  57.5k|  return d.rep_lo_;
 1598|  57.5k|}
_ZN4absl12lts_2024011613time_internal18IsInfiniteDurationENS0_8DurationE:
 1601|  25.6k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool IsInfiniteDuration(Duration d) {
 1602|  25.6k|  return GetRepLo(d) == ~uint32_t{0};
 1603|  25.6k|}
_ZN4absl12lts_2024011613time_internal16FromUnixDurationENS0_8DurationE:
 1626|  25.6k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Time FromUnixDuration(Duration d) {
 1627|  25.6k|  return Time(d);
 1628|  25.6k|}
_ZN4absl12lts_20240116ltENS0_8DurationES1_:
 1721|      8|                                                       Duration rhs) {
 1722|      8|  return time_internal::GetRepHi(lhs) != time_internal::GetRepHi(rhs)
  ------------------
  |  Branch (1722:10): [True: 4, False: 4]
  ------------------
 1723|      8|             ? time_internal::GetRepHi(lhs) < time_internal::GetRepHi(rhs)
 1724|      8|         : time_internal::GetRepHi(lhs) == (std::numeric_limits<int64_t>::min)()
  ------------------
  |  Branch (1724:12): [True: 0, False: 4]
  ------------------
 1725|      4|             ? time_internal::GetRepLo(lhs) + 1 <
 1726|      0|                   time_internal::GetRepLo(rhs) + 1
 1727|      4|             : time_internal::GetRepLo(lhs) < time_internal::GetRepLo(rhs);
 1728|      8|}
_ZN4absl12lts_20240116eqENS0_8DurationES1_:
 1731|  15.9k|                                                        Duration rhs) {
 1732|  15.9k|  return time_internal::GetRepHi(lhs) == time_internal::GetRepHi(rhs) &&
  ------------------
  |  Branch (1732:10): [True: 15.9k, False: 0]
  ------------------
 1733|  15.9k|         time_internal::GetRepLo(lhs) == time_internal::GetRepLo(rhs);
  ------------------
  |  Branch (1733:10): [True: 15.9k, False: 0]
  ------------------
 1734|  15.9k|}
_ZN4absl12lts_2024011616InfiniteDurationEv:
 1762|      4|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Duration InfiniteDuration() {
 1763|      4|  return time_internal::MakeDuration((std::numeric_limits<int64_t>::max)(),
 1764|      4|                                     ~uint32_t{0});
 1765|      4|}
_ZN4absl12lts_202401164TimeC2Ev:
  780|      4|  constexpr Time() = default;

_ZN4absl12lts_2024011613span_internal11GetDataImplIKNSt3__16vectorIN8fuzztest8internal8IRObjectENS3_9allocatorIS7_EEEEEEDTcldtfp_4dataEERT_c:
   38|  13.0k|    -> decltype(c.data()) {
   39|  13.0k|  return c.data();
   40|  13.0k|}
_ZN4absl12lts_2024011613span_internal7GetDataIKNSt3__16vectorIN8fuzztest8internal8IRObjectENS3_9allocatorIS7_EEEEEEDTcl11GetDataImplfp_Li0EEERT_:
   50|  13.0k|    -> decltype(GetDataImpl(c, 0)) {
   51|  13.0k|  return GetDataImpl(c, 0);
   52|  13.0k|}
_ZN4absl12lts_2024011613span_internal7GetDataIKNSt3__16vectorIjNS3_9allocatorIjEEEEEEDTcl11GetDataImplfp_Li0EEERT_:
   50|      2|    -> decltype(GetDataImpl(c, 0)) {
   51|      2|  return GetDataImpl(c, 0);
   52|      2|}
_ZN4absl12lts_2024011613span_internal11GetDataImplIKNSt3__16vectorIjNS3_9allocatorIjEEEEEEDTcldtfp_4dataEERT_c:
   38|      2|    -> decltype(c.data()) {
   39|      2|  return c.data();
   40|      2|}
_ZN4absl12lts_2024011613span_internal7GetDataIKNS0_4SpanIjEEEEDTcl11GetDataImplfp_Li0EEERT_:
   50|     16|    -> decltype(GetDataImpl(c, 0)) {
   51|     16|  return GetDataImpl(c, 0);
   52|     16|}
_ZN4absl12lts_2024011613span_internal11GetDataImplIKNS0_4SpanIjEEEEDTcldtfp_4dataEERT_c:
   38|     16|    -> decltype(c.data()) {
   39|     16|  return c.data();
   40|     16|}

_ZNK4absl12lts_202401164SpanIKN8fuzztest8internal8IRObjectEE4sizeEv:
  286|  13.0k|  constexpr size_type size() const noexcept { return len_; }
_ZNK4absl12lts_202401164SpanIKN8fuzztest8internal8IRObjectEE4dataEv:
  281|  12.8k|  constexpr pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_202401164SpanIKN8fuzztest8internal8IRObjectEE5beginEv:
  336|  12.8k|  constexpr iterator begin() const noexcept { return data(); }
_ZNK4absl12lts_202401164SpanIjE4dataEv:
  281|     20|  constexpr pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_202401164SpanIjE4sizeEv:
  286|     20|  constexpr size_type size() const noexcept { return len_; }
_ZN4absl12lts_202401168MakeSpanITpTnRiJEhEENS0_4SpanIT0_EEPS4_m:
  685|      2|constexpr Span<T> MakeSpan(absl::Nullable<T*> ptr, size_t size) noexcept {
  686|      2|  return Span<T>(ptr, size);
  687|      2|}
_ZNK4absl12lts_202401164SpanIhE4dataEv:
  281|      2|  constexpr pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_202401164SpanIhE4sizeEv:
  286|      2|  constexpr size_type size() const noexcept { return len_; }
_ZN4absl12lts_202401168MakeSpanITpTnRiJEKjEENS0_4SpanIT0_EEPS5_S7_:
  690|      2|Span<T> MakeSpan(absl::Nullable<T*> begin, absl::Nullable<T*> end) noexcept {
  691|      2|  return ABSL_HARDENING_ASSERT(begin <= end),
  ------------------
  |  |  128|      2|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|      2|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  692|      2|         Span<T>(begin, static_cast<size_t>(end - begin));
  693|      2|}
_ZNK4absl12lts_202401164SpanIKjE4dataEv:
  281|     38|  constexpr pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_202401164SpanIKjE5beginEv:
  336|     18|  constexpr iterator begin() const noexcept { return data(); }
_ZNK4absl12lts_202401164SpanIKjE4sizeEv:
  286|     42|  constexpr size_type size() const noexcept { return len_; }
_ZNK4absl12lts_202401164SpanIKjE3endEv:
  349|     18|  constexpr iterator end() const noexcept { return data() + size(); }
_ZNK4absl12lts_202401164SpanIKjE5emptyEv:
  296|      2|  constexpr bool empty() const noexcept { return size() == 0; }
_ZNK4absl12lts_202401164SpanIKjEixEm:
  301|     12|  constexpr reference operator[](size_type i) const noexcept {
  302|     12|    return ABSL_HARDENING_ASSERT(i < size()), ptr_[i];
  ------------------
  |  |  128|     12|#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |   95|     12|  (false ? static_cast<void>(expr) : static_cast<void>(0))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (95:4): [Folded, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  303|     12|  }
_ZN4absl12lts_202401164SpanIKN8fuzztest8internal8IRObjectEEC2INSt3__16vectorIS4_NS8_9allocatorIS4_EEEEvSC_iEERKT_:
  217|  13.0k|      : Span(span_internal::GetData(v), v.size()) {}
_ZN4absl12lts_202401164SpanIKN8fuzztest8internal8IRObjectEEC2EPS5_m:
  193|  13.0k|      : ptr_(array), len_(length) {}
_ZN4absl12lts_202401164SpanIKN8fuzztest8internal8IRObjectEEC2Ev:
  191|      2|  constexpr Span() noexcept : Span(nullptr, 0) {}
_ZN4absl12lts_202401164SpanIKjEC2EPS2_m:
  193|     20|      : ptr_(array), len_(length) {}
_ZN4absl12lts_202401164SpanIhEC2EPhm:
  193|      2|      : ptr_(array), len_(length) {}
_ZN4absl12lts_202401164SpanIKjEC2INSt3__16vectorIjNS5_9allocatorIjEEEEvS9_iEERKT_:
  217|      2|      : Span(span_internal::GetData(v), v.size()) {}
_ZN4absl12lts_202401168MakeSpanITpTnRiJEjLm512EEENS0_4SpanIT0_EERAT1__S4_:
  702|      2|constexpr Span<T> MakeSpan(T (&array)[N]) noexcept {
  703|      2|  return Span<T>(array, N);
  704|      2|}
_ZN4absl12lts_202401164SpanIjEC2EPjm:
  193|     18|      : ptr_(array), len_(length) {}
_ZN4absl12lts_202401168MakeSpanITpTnRiJEjEENS0_4SpanIT0_EEPS4_m:
  685|     16|constexpr Span<T> MakeSpan(absl::Nullable<T*> ptr, size_t size) noexcept {
  686|     16|  return Span<T>(ptr, size);
  687|     16|}
_ZN4absl12lts_202401164SpanIKjEC2INS1_IjEEvS5_TnNSt3__19enable_ifIXsr6IsViewIT_EE5valueEiE4typeELi0EEERKS8_:
  232|     16|      : Span(span_internal::GetData(v), v.size()) {}
_ZNK4absl12lts_202401164SpanIjE5emptyEv:
  296|      2|  constexpr bool empty() const noexcept { return size() == 0; }

_ZN4absl12lts_202401167forwardINS0_18container_internal12CommonFieldsEEEOT_RNSt3__116remove_referenceIS4_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINS0_18container_internal10StringHashEEEOT_RNSt3__116remove_referenceIS4_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINS0_18container_internal8StringEqEEEOT_RNSt3__116remove_referenceIS4_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}
_ZN4absl12lts_202401167forwardINSt3__19allocatorINS2_4pairIKNS2_17basic_string_viewIcNS2_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEEOT_RNS2_16remove_referenceISE_E4typeE:
  149|      6|    absl::remove_reference_t<T>& t) noexcept {  // NOLINT(runtime/references)
  150|      6|  return static_cast<T&&>(t);
  151|      6|}

_ZN8fuzztest15internal_no_adl9ArbitraryINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEDav:
  283|      2|auto Arbitrary() {
  284|      2|  return internal::ArbitraryImpl<T>{};
  285|      2|}
_ZN8fuzztest15internal_no_adl9ArbitraryIbEEDav:
  283|      6|auto Arbitrary() {
  284|      6|  return internal::ArbitraryImpl<T>{};
  285|      6|}
_ZN8fuzztest15internal_no_adl20BitFlagCombinationOfIjEEDaSt16initializer_listIT_E:
  461|      2|auto BitFlagCombinationOf(std::initializer_list<T> flags) {
  462|      2|  return internal::BitFlagCombinationOfImpl<T>(
  463|      2|      absl::MakeSpan(flags.begin(), flags.end()));
  464|      2|}
_ZN8fuzztest15internal_no_adl7TupleOfITpTnRiJEJNS_8internal23SequenceContainerOfImplINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS3_13ArbitraryImplIcvEEEENSC_IbvEESF_NS3_24BitFlagCombinationOfImplIjEESF_EEEDaDpT0_:
  584|      2|auto TupleOf(Inner... inner) {
  585|      2|  return internal::AggregateOfImpl<std::tuple<internal::value_type_t<Inner>...>,
  586|      2|                                   internal::RequireCustomCorpusType::kNo,
  587|      2|                                   Inner...>(std::in_place,
  588|      2|                                             std::move(inner)...);
  589|      2|}

main:
   21|      2|int main(int argc, char** argv) {
   22|      2|  testing::InitGoogleTest(&argc, argv);
   23|       |  // We call fuzztest::ParseAbslFlagsrather than absl::ParseCommandLine
   24|       |  // since the latter would complain about any unknown flags that need
   25|       |  // to be passed to legacy fuzzing engines (e.g. libfuzzer).
   26|      2|  fuzztest::ParseAbslFlags(argc, argv);
   27|      2|  fuzztest::InitFuzzTest(&argc, &argv);
   28|      2|  return RUN_ALL_TESTS();
   29|      2|}

_ZN8fuzztest22ReadFilesFromDirectoryENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   67|      2|    std::string_view dir) {
   68|      2|  std::vector<std::tuple<std::string>> out;
   69|      2|  const std::filesystem::path fs_dir(dir);
   70|      2|  if (!std::filesystem::is_directory(fs_dir)) return out;
  ------------------
  |  Branch (70:7): [True: 0, False: 2]
  ------------------
   71|      2|  for (const auto& entry :
  ------------------
  |  Branch (71:26): [True: 202, False: 2]
  ------------------
   72|    202|       std::filesystem::recursive_directory_iterator(fs_dir)) {
   73|    202|    if (std::filesystem::is_directory(entry)) continue;
  ------------------
  |  Branch (73:9): [True: 0, False: 202]
  ------------------
   74|    202|    std::ifstream stream(entry.path().string());
   75|    202|    if (!stream.good()) {
  ------------------
  |  Branch (75:9): [True: 0, False: 202]
  ------------------
   76|       |      // Using stderr instead of GetStderr() to avoid
   77|       |      // initialization-order-fiasco when reading files at static init time with
   78|       |      // `.WithSeeds(fuzztest::ReadFilesFromDirectory(...))`.
   79|      0|      absl::FPrintF(stderr, "[!] %s:%d: Error reading %s: (%d) %s\n", __FILE__,
   80|      0|                    __LINE__, entry.path().string(), errno, strerror(errno));
   81|      0|      continue;
   82|      0|    }
   83|    202|    std::stringstream buffer;
   84|    202|    buffer << stream.rdbuf();
   85|    202|    out.push_back({buffer.str()});
   86|    202|  }
   87|      2|  return out;
   88|      2|}

_ZN8fuzztest19ListRegisteredTestsEv:
  168|      6|std::vector<std::string> ListRegisteredTests() {
  169|      6|  std::vector<std::string> result;
  170|      6|  internal::ForEachTest(
  171|      6|      [&](const auto& test) { result.push_back(test.full_name()); });
  172|      6|  return result;
  173|      6|}
_ZN8fuzztest25GetMatchingFuzzTestOrExitENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  175|      2|std::string GetMatchingFuzzTestOrExit(std::string_view name) {
  176|      2|  const std::string partial_name(name);
  177|      2|  const std::vector<std::string> full_names = ListRegisteredTests();
  178|      2|  std::vector<const std::string*> matches;
  179|      2|  for (const std::string& full_name : full_names) {
  ------------------
  |  Branch (179:37): [True: 2, False: 0]
  ------------------
  180|      2|    if (absl::StrContains(full_name, partial_name)) {
  ------------------
  |  Branch (180:9): [True: 2, False: 0]
  ------------------
  181|      2|      if (full_name == partial_name) {
  ------------------
  |  Branch (181:11): [True: 2, False: 0]
  ------------------
  182|       |        // In case of an exact match, we end the search and use it. This is to
  183|       |        // handle the case when we want to select `MySuite.MyTest`, but the
  184|       |        // binary has both `MySuite.MyTest` and `MySuite.MyTestX`.
  185|      2|        return full_name;
  186|      2|      } else {
  187|      0|        matches.push_back(&full_name);
  188|      0|      }
  189|      2|    }
  190|      2|  }
  191|       |
  192|      0|  if (matches.empty()) {
  ------------------
  |  Branch (192:7): [True: 0, False: 0]
  ------------------
  193|      0|    absl::FPrintF(stderr, "\n\nNo FUZZ_TEST matches the name: %s\n\n",
  194|      0|                  partial_name);
  195|      0|    absl::FPrintF(stderr, "Valid tests:\n");
  196|      0|    for (const std::string& full_name : full_names) {
  ------------------
  |  Branch (196:39): [True: 0, False: 0]
  ------------------
  197|      0|      absl::FPrintF(stderr, " %s\n", full_name);
  198|      0|    }
  199|      0|    exit(1);
  200|      0|  } else if (matches.size() > 1) {
  ------------------
  |  Branch (200:14): [True: 0, False: 0]
  ------------------
  201|      0|    absl::FPrintF(stderr, "\n\nMultiple FUZZ_TESTs match the name: %s\n\n",
  202|      0|                  partial_name);
  203|      0|    absl::FPrintF(stderr, "Please select one. Matching tests:\n");
  204|      0|    for (const std::string* full_name : matches) {
  ------------------
  |  Branch (204:39): [True: 0, False: 0]
  ------------------
  205|      0|      absl::FPrintF(stderr, " %s\n", *full_name);
  206|      0|    }
  207|      0|    exit(1);
  208|      0|  }
  209|      0|  return *matches[0];
  210|      0|}
_ZN8fuzztest12InitFuzzTestEPiPPPcNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
  283|      2|void InitFuzzTest(int* argc, char*** argv, std::string_view binary_id) {
  284|      2|  const bool is_listing = absl::GetFlag(FUZZTEST_FLAG(list_fuzz_tests));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  285|      2|  if (is_listing) {
  ------------------
  |  Branch (285:7): [True: 0, False: 2]
  ------------------
  286|      0|    for (const auto& name : ListRegisteredTests()) {
  ------------------
  |  Branch (286:27): [True: 0, False: 0]
  ------------------
  287|      0|      std::cout << "[*] Fuzz test: " << name << '\n';
  288|      0|    }
  289|      0|    std::exit(0);
  290|      0|  }
  291|      2|  std::optional<absl::Duration> fuzzing_time_limit = GetFuzzingTime();
  292|      2|  std::optional<absl::Duration> replay_corpus_time_limit =
  293|      2|      GetReplayCorpusTime();
  294|      2|  FUZZTEST_INTERNAL_CHECK(
  ------------------
  |  |   48|      4|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:5): [True: 0, False: 2]
  |  |  |  Branch (48:5): [True: 2, False: 0]
  |  |  ------------------
  |  |   49|      2|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
  295|      2|      !fuzzing_time_limit || !replay_corpus_time_limit,
  296|      2|      "Cannot run in fuzzing and corpus replay mode at the same time.");
  297|      2|  const auto test_to_fuzz = absl::GetFlag(FUZZTEST_FLAG(fuzz));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  298|      2|  const auto test_to_replay_corpus =
  299|      2|      absl::GetFlag(FUZZTEST_FLAG(replay_corpus));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  300|      2|  const auto specified_test =
  301|      2|      test_to_fuzz != kUnspecified ? test_to_fuzz : test_to_replay_corpus;
  ------------------
  |  Branch (301:7): [True: 2, False: 0]
  ------------------
  302|      2|  const bool is_test_specified = specified_test != kUnspecified;
  303|      2|  if (is_test_specified) {
  ------------------
  |  Branch (303:7): [True: 2, False: 0]
  ------------------
  304|      2|    const std::string matching_fuzz_test =
  305|      2|        GetMatchingFuzzTestOrExit(specified_test);
  306|       |    // Delegate the test to GoogleTest.
  307|      2|    GTEST_FLAG_SET(filter, matching_fuzz_test);
  308|      2|  }
  309|       |
  310|      2|  std::string derived_binary_id =
  311|      2|      binary_id.empty() ? std::string(internal::Basename(*argv[0]))
  ------------------
  |  Branch (311:7): [True: 2, False: 0]
  ------------------
  312|      2|                        : std::string(binary_id);
  313|      2|  std::optional<std::string> reproduction_command_template;
  314|      2|  internal::Configuration configuration =
  315|      2|      CreateConfigurationsFromFlags(derived_binary_id);
  316|      2|  configuration.reproduction_command_template = reproduction_command_template;
  317|      2|  internal::RegisterFuzzTestsAsGoogleTests(argc, argv, configuration);
  318|       |
  319|      2|  const bool is_fuzzing_or_replaying =
  320|      2|      (fuzzing_time_limit || replay_corpus_time_limit);
  ------------------
  |  Branch (320:8): [True: 2, False: 0]
  |  Branch (320:30): [True: 0, False: 0]
  ------------------
  321|      2|  if (is_fuzzing_or_replaying && !is_test_specified) {
  ------------------
  |  Branch (321:7): [True: 2, False: 0]
  |  Branch (321:34): [True: 0, False: 2]
  ------------------
  322|      0|    absl::flat_hash_set<std::string> fuzz_tests = {
  323|      0|        configuration.fuzz_tests.begin(), configuration.fuzz_tests.end()};
  324|      0|    std::vector<std::string> non_fuzz_tests;
  325|      0|    for (const auto* test : internal::GetRegisteredTests()) {
  ------------------
  |  Branch (325:27): [True: 0, False: 0]
  ------------------
  326|      0|      const std::string test_name =
  327|      0|          absl::StrCat(test->test_suite_name(), ".", test->name());
  328|      0|      if (!fuzz_tests.contains(test_name)) {
  ------------------
  |  Branch (328:11): [True: 0, False: 0]
  ------------------
  329|      0|        non_fuzz_tests.push_back(test_name);
  330|      0|      }
  331|      0|    }
  332|      0|    if (!non_fuzz_tests.empty()) {
  ------------------
  |  Branch (332:9): [True: 0, False: 0]
  ------------------
  333|       |      // Run only the fuzz tests, and not the unit tests.
  334|       |      // TODO: b/340232436 -- This is needed because we currently rely on a fuzz
  335|       |      // test being the first test to run so that Centipede can get the
  336|       |      // serialized configuration from the binary.
  337|      0|      std::string filter = absl::StrCat(
  338|      0|          GTEST_FLAG_GET(filter),
  339|       |          // When the filter already includes the negative patterns, append to
  340|       |          // the negative patterns.
  341|      0|          absl::StrContains(GTEST_FLAG_GET(filter), '-') ? ":" : "-",
  ------------------
  |  Branch (341:11): [True: 0, False: 0]
  ------------------
  342|      0|          absl::StrJoin(non_fuzz_tests, ":"));
  343|      0|      GTEST_FLAG_SET(filter, filter);
  344|      0|    }
  345|      0|  }
  346|      2|  const bool is_runner_mode = std::getenv("CENTIPEDE_RUNNER_FLAGS") != nullptr;
  347|      2|  const bool is_fuzzing_mode = (is_runner_mode && is_fuzzing_or_replaying) ||
  ------------------
  |  Branch (347:33): [True: 0, False: 2]
  |  Branch (347:51): [True: 0, False: 0]
  ------------------
  348|      2|                               fuzzing_time_limit.has_value();
  ------------------
  |  Branch (348:32): [True: 2, False: 0]
  ------------------
  349|      2|  const RunMode run_mode =
  350|      2|      is_fuzzing_mode ? RunMode::kFuzz : RunMode::kUnitTest;
  ------------------
  |  Branch (350:7): [True: 2, False: 0]
  ------------------
  351|       |  // TODO(b/307513669): Use the Configuration class instead of Runtime.
  352|      2|  internal::Runtime::instance().SetRunMode(run_mode);
  353|      2|}
_ZN8fuzztest14ParseAbslFlagsEiPPc:
  355|      2|void ParseAbslFlags(int argc, char** argv) {
  356|      2|  std::vector<char*> positional_args;
  357|      2|  std::vector<absl::UnrecognizedFlag> unrecognized_flags;
  358|      2|  absl::ParseAbseilFlagsOnly(argc, argv, positional_args, unrecognized_flags);
  359|      2|}
init_fuzztest.cc:_ZNK3$_0clEv:
   49|      2|    .OnUpdate([]() {
   50|      2|      fuzztest::internal::SetFuzzTestListingModeValidatorForGoogleTest(
   51|      2|          absl::GetFlag(FUZZTEST_FLAG(list_fuzz_tests)));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
   52|      2|    });
init_fuzztest.cc:_ZN8fuzztest12_GLOBAL__N_129CreateConfigurationsFromFlagsENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  241|      2|    absl::string_view binary_identifier) {
  242|      2|  bool reproduce_findings_as_separate_tests =
  243|      2|      absl::GetFlag(FUZZTEST_FLAG(reproduce_findings_as_separate_tests));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  244|      2|  std::optional<absl::Duration> fuzzing_time_limit = GetFuzzingTime();
  245|      2|  std::optional<absl::Duration> replay_corpus_time_limit =
  246|      2|      GetReplayCorpusTime();
  247|      2|  absl::Duration time_limit = fuzzing_time_limit ? *fuzzing_time_limit
  ------------------
  |  Branch (247:31): [True: 2, False: 0]
  ------------------
  248|      2|                              : replay_corpus_time_limit
  ------------------
  |  Branch (248:33): [True: 0, False: 0]
  ------------------
  249|      0|                                  ? *replay_corpus_time_limit
  250|      0|                                  : absl::ZeroDuration();
  251|      2|  std::optional<size_t> jobs = absl::GetFlag(FUZZTEST_FLAG(jobs));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  252|      2|  FUZZTEST_INTERNAL_CHECK(!jobs.has_value() || *jobs > 0, "If specified, --",
  ------------------
  |  |   48|      2|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:5): [True: 2, False: 0]
  |  |  |  Branch (48:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      2|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
  253|      2|                          FUZZTEST_FLAG(jobs).Name(), " must be positive.");
  254|      2|  return internal::Configuration{
  255|      2|      absl::GetFlag(FUZZTEST_FLAG(corpus_database)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  256|      2|      /*stats_root=*/"",
  257|      2|      std::string(binary_identifier),
  258|      2|      /*fuzz_tests=*/ListRegisteredTests(),
  259|      2|      /*fuzz_tests_in_current_shard=*/ListRegisteredTests(),
  260|      2|      reproduce_findings_as_separate_tests,
  261|       |      /*only_replay_corpus=*/
  262|      2|      replay_corpus_time_limit.has_value(),
  263|      2|      /*stack_limit=*/absl::GetFlag(FUZZTEST_FLAG(stack_limit_kb)) * 1024,
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  264|      2|      /*rss_limit=*/absl::GetFlag(FUZZTEST_FLAG(rss_limit_mb)) * 1024 * 1024,
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  265|      2|      absl::GetFlag(FUZZTEST_FLAG(time_limit_per_input)), time_limit,
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  266|      2|      absl::GetFlag(FUZZTEST_FLAG(time_budget_type)), jobs.value_or(0)};
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  267|      2|}
init_fuzztest.cc:_ZN8fuzztest12_GLOBAL__N_114GetFuzzingTimeEv:
  214|      4|std::optional<absl::Duration> GetFuzzingTime() {
  215|      4|  absl::Duration fuzz_time_limit = absl::GetFlag(FUZZTEST_FLAG(fuzz_for));
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  216|      4|  if (fuzz_time_limit <= absl::ZeroDuration()) {
  ------------------
  |  Branch (216:7): [True: 0, False: 4]
  ------------------
  217|      0|    fuzz_time_limit = absl::InfiniteDuration();
  218|      0|  }
  219|      4|  if (absl::GetFlag(FUZZTEST_FLAG(fuzz)) == kUnspecified &&
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  |  Branch (219:7): [True: 0, False: 4]
  |  Branch (219:7): [True: 0, False: 4]
  ------------------
  220|      0|      fuzz_time_limit == absl::InfiniteDuration()) {
  ------------------
  |  Branch (220:7): [True: 0, False: 0]
  ------------------
  221|      0|    return std::nullopt;
  222|      0|  }
  223|      4|  return fuzz_time_limit;
  224|      4|}
init_fuzztest.cc:_ZN8fuzztest12_GLOBAL__N_119GetReplayCorpusTimeEv:
  226|      4|std::optional<absl::Duration> GetReplayCorpusTime() {
  227|      4|  absl::Duration replay_corpus_time_limit =
  228|      4|      absl::GetFlag(FUZZTEST_FLAG(replay_corpus_for));
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  229|      4|  if (absl::GetFlag(FUZZTEST_FLAG(replay_corpus)) == kUnspecified &&
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  |  Branch (229:7): [True: 4, False: 0]
  |  Branch (229:7): [True: 4, False: 0]
  ------------------
  230|      4|      replay_corpus_time_limit <= absl::ZeroDuration()) {
  ------------------
  |  Branch (230:7): [True: 4, False: 0]
  ------------------
  231|      4|    return std::nullopt;
  232|      4|  }
  233|      0|  if (absl::GetFlag(FUZZTEST_FLAG(replay_corpus)) != kUnspecified &&
  ------------------
  |  |   20|      0|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  |  Branch (233:7): [True: 0, False: 0]
  |  Branch (233:7): [True: 0, False: 0]
  ------------------
  234|      0|      replay_corpus_time_limit <= absl::ZeroDuration()) {
  ------------------
  |  Branch (234:7): [True: 0, False: 0]
  ------------------
  235|      0|    replay_corpus_time_limit = absl::InfiniteDuration();
  236|      0|  }
  237|      0|  return replay_corpus_time_limit;
  238|      4|}
init_fuzztest.cc:_ZZN8fuzztest19ListRegisteredTestsEvENK3$_0clINS_8internal8FuzzTestEEEDaRKT_:
  171|      6|      [&](const auto& test) { result.push_back(test.full_name()); });

_ZNK8fuzztest8internal7AnyBase9has_valueEv:
   46|   167k|  bool has_value() const {
   47|   167k|    FUZZTEST_INTERNAL_CHECK((vtable_ == nullptr) == (value_ == nullptr),
  ------------------
  |  |   48|   167k|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 167k, False: 0]
  |  |  ------------------
  |  |   49|   167k|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
   48|   167k|                            "Inconsistent state between value and vtable.");
   49|   167k|    return value_ != nullptr;
   50|   167k|  }
_ZN8fuzztest8internal7AnyBaseC2Ev:
   86|  12.8k|  AnyBase() : vtable_(nullptr), value_(nullptr) {}
_ZN8fuzztest8internal7AnyBaseC2EOS1_:
   89|  25.7k|      : vtable_(std::exchange(other.vtable_, nullptr)),
   90|  25.7k|        value_(std::exchange(other.value_, nullptr)) {}
_ZN8fuzztest8internal7AnyBaseD2Ev:
  100|  64.2k|  ~AnyBase() { Destroy(); }
_ZN8fuzztest8internal7AnyBase7DestroyEv:
  102|  64.2k|  void Destroy() {
  103|  64.2k|    if (has_value()) vtable_->destroy(value_);
  ------------------
  |  Branch (103:9): [True: 38.5k, False: 25.7k]
  ------------------
  104|  64.2k|  }
_ZN8fuzztest8internal7AnyBase8CopyFromERKS1_:
  106|  12.8k|  void CopyFrom(const AnyBase& other) {
  107|  12.8k|    FUZZTEST_INTERNAL_CHECK(!has_value(), "CopyFrom called on a full object");
  ------------------
  |  |   48|  12.8k|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 12.8k, False: 0]
  |  |  ------------------
  |  |   49|  12.8k|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
  108|  12.8k|    if (other.has_value()) {
  ------------------
  |  Branch (108:9): [True: 12.8k, False: 0]
  ------------------
  109|  12.8k|      vtable_ = other.vtable_;
  110|  12.8k|      value_ = vtable_->copy(other.value_);
  111|  12.8k|    }
  112|  12.8k|  }
_ZN8fuzztest8internal11CopyableAnyC2ERKS1_:
  173|  12.8k|  CopyableAny(const CopyableAny& other) { CopyFrom(other); }
_ZN8fuzztest8internal11CopyableAnyC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEJSB_EEENS3_15in_place_type_tIT_EEDpOT0_:
  169|  12.8k|      : AnyBase(std::in_place, std::true_type{},
  170|  12.8k|                new T(std::forward<U>(args)...)) {}
_ZN8fuzztest8internal7AnyBaseC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS3_10in_place_tENS3_17integral_constantIbLb1EEEPT_:
   34|  12.8k|  explicit AnyBase(std::in_place_t, std::true_type, T* value) {
   35|  12.8k|    static constexpr VTable kVTable = {type_id<T>, DestroyImpl<T>, CopyImpl<T>};
   36|  12.8k|    vtable_ = &kVTable;
   37|  12.8k|    value_ = const_cast<void*>(static_cast<const void*>(value));
   38|  12.8k|  }
_ZN8fuzztest8internal7AnyBase11DestroyImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEEvPv:
  122|  38.5k|  static void DestroyImpl(void* p) {
  123|  38.5k|    delete static_cast<T*>(p);
  124|  38.5k|  }
_ZN8fuzztest8internal7AnyBase8CopyImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEEPvSC_:
  127|  12.8k|  static void* CopyImpl(void* p) {
  128|  12.8k|    return new T(*static_cast<T*>(p));
  129|  12.8k|  }
_ZNR8fuzztest8internal7AnyBase5GetAsINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEERT_v:
   58|  12.8k|  T& GetAs() & {
   59|  12.8k|    FUZZTEST_INTERNAL_CHECK_PRECONDITION(has_value(), "Object is empty!");
  ------------------
  |  |   42|  12.8k|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 12.8k, False: 0]
  |  |  ------------------
  |  |   43|  12.8k|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   60|  12.8k|    FUZZTEST_INTERNAL_CHECK_PRECONDITION(Has<T>(), "Wrong type!");
  ------------------
  |  |   42|  12.8k|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 12.8k, False: 0]
  |  |  ------------------
  |  |   43|  12.8k|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   61|  12.8k|    return *static_cast<T*>(value_);
   62|  12.8k|  }
_ZNK8fuzztest8internal7AnyBase3HasINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEEbv:
   53|  38.5k|  bool Has() const {
   54|  38.5k|    return has_value() && vtable_->type_id == type_id<T>;
  ------------------
  |  Branch (54:12): [True: 38.5k, False: 0]
  |  Branch (54:27): [True: 38.5k, False: 0]
  ------------------
   55|  38.5k|  }
_ZNKR8fuzztest8internal7AnyBase5GetAsINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEERKT_v:
   65|  25.7k|  const T& GetAs() const& {
   66|  25.7k|    FUZZTEST_INTERNAL_CHECK_PRECONDITION(has_value(), "Object is empty!");
  ------------------
  |  |   42|  25.7k|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 25.7k, False: 0]
  |  |  ------------------
  |  |   43|  25.7k|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   67|  25.7k|    FUZZTEST_INTERNAL_CHECK_PRECONDITION(Has<T>(), "Wrong type!");
  ------------------
  |  |   42|  25.7k|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 25.7k, False: 0]
  |  |  ------------------
  |  |   43|  25.7k|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   68|  25.7k|    return *static_cast<T*>(value_);
   69|  25.7k|  }
_ZN8fuzztest8internal11CopyableAnyC2EOS1_:
  174|  25.7k|  CopyableAny(CopyableAny&& other) = default;
_ZN8fuzztest8internal11MoveOnlyAnyC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEJSB_EEENS3_15in_place_type_tIT_EEDpOT0_:
  150|  12.8k|      : AnyBase(std::in_place, std::false_type{},
  151|  12.8k|                new T(std::forward<U>(args)...)) {}
_ZN8fuzztest8internal7AnyBaseC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS3_10in_place_tENS3_17integral_constantIbLb0EEEPT_:
   40|  12.8k|  explicit AnyBase(std::in_place_t, std::false_type, T* value) {
   41|  12.8k|    static constexpr VTable kVTable = {type_id<T>, DestroyImpl<T>, nullptr};
   42|  12.8k|    vtable_ = &kVTable;
   43|  12.8k|    value_ = const_cast<void*>(static_cast<const void*>(value));
   44|  12.8k|  }

_ZN8fuzztest8internal25SetExternalEngineCallbackEPNS0_22ExternalEngineCallbackE:
   33|      2|void SetExternalEngineCallback(ExternalEngineCallback* callback) {
   34|      2|  external_engine_callback = callback;
   35|      2|}
_ZN8fuzztest8internal25GetExternalEngineCallbackEv:
   37|  15.9k|ExternalEngineCallback* GetExternalEngineCallback() {
   38|  15.9k|  return external_engine_callback;
   39|  15.9k|}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptorC2ERKNS0_8FuzzTestENSt3__110unique_ptrINS0_20UntypedFixtureDriverENS5_14default_deleteIS7_EEEE:
   66|      2|    : test_(test), fixture_driver_staging_(std::move(fixture_driver)) {}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS0_13ConfigurationE:
   74|      2|    int* argc, char*** argv, const Configuration& configuration) {
   75|      2|  FUZZTEST_INTERNAL_CHECK(&LLVMFuzzerRunDriver,
  ------------------
  |  |   48|      2|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 2, Folded]
  |  |  ------------------
  |  |   49|      2|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
   76|      2|                          "LibFuzzer Driver API not defined.");
   77|      2|  FUZZTEST_INTERNAL_CHECK(
  ------------------
  |  |   48|      2|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 2, False: 0]
  |  |  ------------------
  |  |   49|      2|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
   78|      2|      GetExternalEngineCallback() == nullptr,
   79|      2|      "External engine callback is already set while running a fuzz test.");
   80|      2|  SetExternalEngineCallback(this);
   81|      2|  runtime_.SetRunMode(RunMode::kFuzz);
   82|      2|  auto& impl = GetFuzzerImpl();
   83|      2|  runtime_.EnableReporter(&impl.stats_, [] { return absl::Now(); });
   84|       |
   85|      2|  FUZZTEST_INTERNAL_CHECK(impl.fixture_driver_ != nullptr,
  ------------------
  |  |   48|      2|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 2, False: 0]
  |  |  ------------------
  |  |   49|      2|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
   86|      2|                          "Invalid fixture driver!");
   87|      2|  impl.fixture_driver_->SetUpFuzzTest();
   88|       |
   89|      2|  static bool driver_started = false;
   90|      2|  FUZZTEST_INTERNAL_CHECK(!driver_started, "Driver started more than once!");
  ------------------
  |  |   48|      2|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 2, False: 0]
  |  |  ------------------
  |  |   49|      2|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
   91|      2|  driver_started = true;
   92|      2|  LLVMFuzzerRunDriver(argc, argv, [](const uint8_t* data, size_t size) -> int {
   93|      2|    GetExternalEngineCallback()->RunOneInputData(
   94|      2|        absl::string_view(reinterpret_cast<const char*>(data), size));
   95|      2|    return 0;
   96|      2|  });
   97|       |
   98|       |  // If we're here, we didn't exit from RunOneInputData(), and hence we didn't
   99|       |  // tear down the fixture.
  100|      2|  FUZZTEST_INTERNAL_CHECK(impl.fixture_driver_ != nullptr,
  ------------------
  |  |   48|      2|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 0, False: 2]
  |  |  ------------------
  |  |   49|      2|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      2|                __FILE__, __LINE__,                            \
  |  |   51|      2|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      2|                             ") failed: ", __VA_ARGS__)))
  ------------------
  101|      2|                          "Invalid fixture driver!");
  102|      2|  impl.fixture_driver_->TearDownFuzzTest();
  103|       |
  104|      2|  return 0;
  105|      2|}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptor15RunOneInputDataENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  117|  15.9k|void FuzzTestExternalEngineAdaptor::RunOneInputData(absl::string_view data) {
  118|  15.9k|  auto& impl = GetFuzzerImpl();
  119|  15.9k|  if (impl.ShouldStop()) {
  ------------------
  |  Branch (119:7): [True: 0, False: 15.9k]
  ------------------
  120|      0|    FUZZTEST_INTERNAL_CHECK(impl.fixture_driver_ != nullptr,
  ------------------
  |  |   48|      0|  ((cond) ? (void)0                                            \
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|          : ::fuzztest::internal::Abort(                       \
  |  |   50|      0|                __FILE__, __LINE__,                            \
  |  |   51|      0|                absl::StrCat("Internal error! Check (", #cond, \
  |  |   52|      0|                             ") failed: ", __VA_ARGS__)))
  ------------------
  121|      0|                            "Invalid fixture driver!");
  122|      0|    impl.fixture_driver_->TearDownFuzzTest();
  123|      0|    runtime_.PrintFinalStatsOnDefaultSink();
  124|       |    // Use _Exit instead of exit so libFuzzer does not treat it as a crash.
  125|      0|    std::_Exit(0);
  126|      0|  }
  127|  15.9k|  runtime_.SetCurrentTest(&impl.test_, nullptr);
  128|  15.9k|  if (data.size() == 0) return;
  ------------------
  |  Branch (128:7): [True: 0, False: 15.9k]
  ------------------
  129|  15.9k|  auto input = impl.TryParse(data);
  130|  15.9k|  if (!input.ok()) return;
  ------------------
  |  Branch (130:7): [True: 3.06k, False: 12.8k]
  ------------------
  131|  12.8k|  impl.RunOneInput({*std::move(input)});
  132|  12.8k|}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptor13GetFuzzerImplEv:
  164|  15.9k|FuzzTestExternalEngineAdaptor::GetFuzzerImpl() {
  165|       |  // Postpone the creation to override libFuzzer signal setup.
  166|  15.9k|  if (!fuzzer_impl_) {
  ------------------
  |  Branch (166:7): [True: 2, False: 15.9k]
  ------------------
  167|      2|    fuzzer_impl_ =
  168|      2|        std::make_unique<FuzzerImpl>(test_, std::move(fixture_driver_staging_));
  169|      2|    fixture_driver_staging_ = nullptr;
  170|      2|  }
  171|  15.9k|  return *fuzzer_impl_;
  172|  15.9k|}
compatibility_mode.cc:_ZZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS0_13ConfigurationEENK3$_1clEPKhm:
   92|  15.9k|  LLVMFuzzerRunDriver(argc, argv, [](const uint8_t* data, size_t size) -> int {
   93|  15.9k|    GetExternalEngineCallback()->RunOneInputData(
   94|  15.9k|        absl::string_view(reinterpret_cast<const char*>(data), size));
   95|  15.9k|    return 0;
   96|  15.9k|  });

_ZN8fuzztest8internal14CorpusDatabaseC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEES6_b:
   44|      2|    : corpus_path_for_test_binary_([=] () -> std::string {
   45|      2|        if (database_path.empty()) return "";
   46|      2|        std::string corpus_path_for_test_binary =
   47|      2|            absl::StrCat(database_path, "/", binary_identifier);
   48|      2|        if (!absl::StartsWith(corpus_path_for_test_binary, "/") &&
   49|      2|            std::getenv("TEST_SRCDIR")) {
   50|      2|          corpus_path_for_test_binary = absl::StrCat(
   51|      2|              std::getenv("TEST_SRCDIR"), "/", corpus_path_for_test_binary);
   52|      2|        }
   53|      2|        return corpus_path_for_test_binary;
   54|      2|      }()),
   55|      2|      use_crashing_inputs_(use_crashing_inputs) {}
_ZN8fuzztest8internal14CorpusDatabaseC2ERKNS0_13ConfigurationE:
   58|      2|    : CorpusDatabase(configuration.corpus_database,
   59|      2|                     configuration.binary_identifier,
   60|       |                     /*use_crashing_inputs=*/
   61|      2|                     configuration.reproduce_findings_as_separate_tests) {}
_ZNK8fuzztest8internal14CorpusDatabase22GetCrashingInputsIfAnyENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   69|      2|    absl::string_view test_name) const {
   70|      2|  if (!use_crashing_inputs_) return {};
  ------------------
  |  Branch (70:7): [True: 2, False: 0]
  ------------------
   71|      0|  return GetInputs(corpus_path_for_test_binary_, test_name, "crashing");
   72|      2|}
corpus_database.cc:_ZZN8fuzztest8internal14CorpusDatabaseC1ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEES6_bENK3$_0clEv:
   44|      2|    : corpus_path_for_test_binary_([=] () -> std::string {
   45|      2|        if (database_path.empty()) return "";
  ------------------
  |  Branch (45:13): [True: 0, False: 2]
  ------------------
   46|      2|        std::string corpus_path_for_test_binary =
   47|      2|            absl::StrCat(database_path, "/", binary_identifier);
   48|      2|        if (!absl::StartsWith(corpus_path_for_test_binary, "/") &&
  ------------------
  |  Branch (48:13): [True: 2, False: 0]
  ------------------
   49|      2|            std::getenv("TEST_SRCDIR")) {
  ------------------
  |  Branch (49:13): [True: 0, False: 2]
  ------------------
   50|      0|          corpus_path_for_test_binary = absl::StrCat(
   51|      0|              std::getenv("TEST_SRCDIR"), "/", corpus_path_for_test_binary);
   52|      0|        }
   53|      2|        return corpus_path_for_test_binary;
   54|      2|      }()),

_ZN8fuzztest8internal20GetExecutionCoverageEv:
   86|      2|ExecutionCoverage* GetExecutionCoverage() {
   87|      2|  return execution_coverage_instance;
   88|      2|}
_ZN8fuzztest8internal14CorpusCoverageC2Em:
  264|      2|CorpusCoverage::CorpusCoverage(size_t map_size) {
  265|      2|  size_t alignment = alignof(Vector);
  266|       |  // Round up to a multiple of alignment.
  267|      2|  map_size += alignment - 1;
  268|      2|  map_size -= map_size % alignment;
  269|       |  // And allocate an extra step to make sure the alignment logic has the
  270|       |  // necessary space.
  271|      2|  map_size += alignment;
  272|      2|  corpus_map_size_ = map_size;
  273|      2|  corpus_map_ = static_cast<uint8_t*>(std::aligned_alloc(alignment, map_size));
  274|      2|  std::fill(corpus_map_, corpus_map_ + corpus_map_size_, 0);
  275|      2|}

_ZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_:
  173|  12.8k|  absl::Status ValidateCorpusValue(const corpus_type& corpus_value) const {
  174|  12.8k|    absl::Status result = absl::OkStatus();
  175|  12.8k|    ApplyIndex<sizeof...(Inner)>([&](auto... I) {
  176|  12.8k|      (
  177|  12.8k|          [&] {
  178|  12.8k|            if (!result.ok()) return;
  179|  12.8k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  12.8k|                std::get<I>(corpus_value));
  181|  12.8k|            result = Prefix(s, "Invalid value in aggregate");
  182|  12.8k|          }(),
  183|  12.8k|          ...);
  184|  12.8k|    });
  185|  12.8k|    return result;
  186|  12.8k|  }
_ZZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_ENKUlDpT_E_clIJNS2_17integral_constantImLm0EEENSQ_ImLm1EEENSQ_ImLm2EEENSQ_ImLm3EEENSQ_ImLm4EEEEEEDaSN_:
  175|  12.8k|    ApplyIndex<sizeof...(Inner)>([&](auto... I) {
  176|  12.8k|      (
  177|  12.8k|          [&] {
  178|  12.8k|            if (!result.ok()) return;
  179|  12.8k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  12.8k|                std::get<I>(corpus_value));
  181|  12.8k|            result = Prefix(s, "Invalid value in aggregate");
  182|  12.8k|          }(),
  183|  12.8k|          ...);
  184|  12.8k|    });
_ZZZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_ENKUlDpT_E_clIJNS2_17integral_constantImLm0EEENSQ_ImLm1EEENSQ_ImLm2EEENSQ_ImLm3EEENSQ_ImLm4EEEEEEDaSN_ENKUlvE3_clEv:
  177|  12.8k|          [&] {
  178|  12.8k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 12.8k]
  ------------------
  179|  12.8k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  12.8k|                std::get<I>(corpus_value));
  181|  12.8k|            result = Prefix(s, "Invalid value in aggregate");
  182|  12.8k|          }(),
_ZZZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_ENKUlDpT_E_clIJNS2_17integral_constantImLm0EEENSQ_ImLm1EEENSQ_ImLm2EEENSQ_ImLm3EEENSQ_ImLm4EEEEEEDaSN_ENKUlvE2_clEv:
  177|  12.8k|          [&] {
  178|  12.8k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 12.8k]
  ------------------
  179|  12.8k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  12.8k|                std::get<I>(corpus_value));
  181|  12.8k|            result = Prefix(s, "Invalid value in aggregate");
  182|  12.8k|          }(),
_ZZZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_ENKUlDpT_E_clIJNS2_17integral_constantImLm0EEENSQ_ImLm1EEENSQ_ImLm2EEENSQ_ImLm3EEENSQ_ImLm4EEEEEEDaSN_ENKUlvE1_clEv:
  177|  12.8k|          [&] {
  178|  12.8k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 12.8k]
  ------------------
  179|  12.8k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  12.8k|                std::get<I>(corpus_value));
  181|  12.8k|            result = Prefix(s, "Invalid value in aggregate");
  182|  12.8k|          }(),
_ZZZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_ENKUlDpT_E_clIJNS2_17integral_constantImLm0EEENSQ_ImLm1EEENSQ_ImLm2EEENSQ_ImLm3EEENSQ_ImLm4EEEEEEDaSN_ENKUlvE0_clEv:
  177|  12.8k|          [&] {
  178|  12.8k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 12.8k]
  ------------------
  179|  12.8k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  12.8k|                std::get<I>(corpus_value));
  181|  12.8k|            result = Prefix(s, "Invalid value in aggregate");
  182|  12.8k|          }(),
_ZZZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_ENKUlDpT_E_clIJNS2_17integral_constantImLm0EEENSQ_ImLm1EEENSQ_ImLm2EEENSQ_ImLm3EEENSQ_ImLm4EEEEEEDaSN_ENKUlvE_clEv:
  177|  12.8k|          [&] {
  178|  12.8k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 19, False: 12.8k]
  ------------------
  179|  12.8k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  12.8k|                std::get<I>(corpus_value));
  181|  12.8k|            result = Prefix(s, "Invalid value in aggregate");
  182|  12.8k|          }(),
_ZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE11ParseCorpusERKNS0_8IRObjectE:
  157|  14.6k|  std::optional<corpus_type> ParseCorpus(const IRObject& obj) const {
  158|       |    if constexpr (has_custom_corpus_type) {
  159|       |      return ParseWithDomainTuple(inner_, obj);
  160|  14.6k|    } else {
  161|  14.6k|      return obj.ToCorpus<corpus_type>();
  162|  14.6k|    }
  163|  14.6k|  }
_ZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE8GetValueERKSA_:
  115|  12.8k|  value_type GetValue(const corpus_type& value) const {
  116|       |    if constexpr (has_custom_corpus_type) {
  117|       |      if constexpr (DetectBindableFieldCount<value_type>() ==
  118|       |                    DetectBraceInitCount<value_type>()) {
  119|       |        return ApplyIndex<sizeof...(Inner)>([&](auto... I) {
  120|       |          return T{std::get<I>(inner_).GetValue(std::get<I>(value))...};
  121|       |        });
  122|       |      } else {
  123|       |        // Right now the only other possibility is that the bindable field count
  124|       |        // is one less than the brace init field count. In that case, that extra
  125|       |        // field is used to initialize an empty base class. We'll need to update
  126|       |        // this if that ever changes.
  127|       |        return ApplyIndex<sizeof...(Inner)>([&](auto... I) {
  128|       |          return T{{}, std::get<I>(inner_).GetValue(std::get<I>(value))...};
  129|       |        });
  130|       |      }
  131|  12.8k|    } else {
  132|  12.8k|      return value;
  133|  12.8k|    }
  134|  12.8k|  }
_ZN8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EEC2ENS2_10in_place_tESF_SG_SG_SI_SG_:
   58|      2|      : inner_(std::move(inner)...) {}

_ZNK8fuzztest8internal13ArbitraryImplIbvE19ValidateCorpusValueERKb:
  110|  38.5k|  absl::Status ValidateCorpusValue(const value_type&) const {
  111|  38.5k|    return absl::OkStatus();  // Nothing to validate.
  112|  38.5k|  }
_ZNK8fuzztest8internal13ArbitraryImplIcvE19ValidateCorpusValueERKc:
  188|  19.5M|  absl::Status ValidateCorpusValue(const value_type&) const {
  189|  19.5M|    return absl::OkStatus();  // Nothing to validate.
  190|  19.5M|  }

_ZNK8fuzztest8internal24BitFlagCombinationOfImplIjE19ValidateCorpusValueERKj:
   70|  12.8k|  absl::Status ValidateCorpusValue(const value_type& val) const {
   71|  12.8k|    if (BitOr(val, all_flags_combo_) != all_flags_combo_) {
  ------------------
  |  Branch (71:9): [True: 19, False: 12.8k]
  ------------------
   72|     19|      return absl::InvalidArgumentError("Invalid bit flag combination.");
   73|     19|    }
   74|  12.8k|    return absl::OkStatus();
   75|  12.8k|  }
_ZN8fuzztest8internal24BitFlagCombinationOfImplIjE6BitAndIjEEjT_S4_:
   81|      6|  static value_type BitAnd(U a, U b) {
   82|       |    if constexpr (std::is_enum_v<U>) {
   83|       |      return BitAnd(static_cast<std::underlying_type_t<U>>(a),
   84|       |                    static_cast<std::underlying_type_t<U>>(b));
   85|      6|    } else {
   86|      6|      return static_cast<value_type>(a & b);
   87|      6|    }
   88|      6|  }
_ZN8fuzztest8internal24BitFlagCombinationOfImplIjE5BitOrIjEEjT_S4_:
   91|  12.8k|  static value_type BitOr(U a, U b) {
   92|       |    if constexpr (std::is_enum_v<U>) {
   93|       |      return BitOr(static_cast<std::underlying_type_t<U>>(a),
   94|       |                   static_cast<std::underlying_type_t<U>>(b));
   95|  12.8k|    } else {
   96|  12.8k|      return static_cast<value_type>(a | b);
   97|  12.8k|    }
   98|  12.8k|  }
_ZN8fuzztest8internal24BitFlagCombinationOfImplIjEC2EN4absl12lts_202401164SpanIKjEE:
   37|      2|      : flags_(flags.begin(), flags.end()), all_flags_combo_{} {
   38|      2|    FUZZTEST_INTERNAL_CHECK_PRECONDITION(
  ------------------
  |  |   42|      2|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 2, False: 0]
  |  |  ------------------
  |  |   43|      2|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   39|      2|        !flags.empty(), "BitFlagCombinationOf requires a non empty list.");
   40|       |    // Make sure they are mutually exclusive metadata, only_shrink and none are
   41|       |    // empty.
   42|      8|    for (int i = 0; i < flags.size(); ++i) {
  ------------------
  |  Branch (42:21): [True: 6, False: 2]
  ------------------
   43|      6|      T v1 = flags[i];
   44|      6|      FUZZTEST_INTERNAL_CHECK_PRECONDITION(
  ------------------
  |  |   42|      6|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 6, False: 0]
  |  |  ------------------
  |  |   43|      6|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   45|      6|          v1 != T{}, "BitFlagCombinationOf requires non zero flags.");
   46|     12|      for (int j = i + 1; j < flags.size(); ++j) {
  ------------------
  |  Branch (46:27): [True: 6, False: 6]
  ------------------
   47|      6|        T v2 = flags[j];
   48|      6|        FUZZTEST_INTERNAL_CHECK_PRECONDITION(
  ------------------
  |  |   42|      6|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 6, False: 0]
  |  |  ------------------
  |  |   43|      6|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   49|      6|            BitAnd(v1, v2) == T{},
   50|      6|            "BitFlagCombinationOf requires flags to be mutually exclusive.");
   51|      6|      }
   52|      6|      all_flags_combo_ = BitOr(all_flags_combo_, v1);
   53|      6|    }
   54|      2|  }

_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E8min_sizeEv:
  371|  12.9k|  size_t min_size() const { return min_size_; }
_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E8max_sizeEv:
  372|  12.9k|  size_t max_size() const {
  373|  12.9k|    return max_size_.value_or(std::max(min_size_, kDefaultContainerMaxSize));
  374|  12.9k|  }
_ZN8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E4SelfEv:
  377|      2|  Derived& Self() { return static_cast<Derived&>(*this); }
_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E19ValidateCorpusValueERKS9_:
  317|  12.9k|  absl::Status ValidateCorpusValue(const corpus_type& corpus_value) const {
  318|       |    // Check size.
  319|  12.9k|    if (corpus_value.size() < min_size()) {
  ------------------
  |  Branch (319:9): [True: 0, False: 12.9k]
  ------------------
  320|      0|      return absl::InvalidArgumentError(absl::StrCat(
  321|      0|          "Invalid size: ", corpus_value.size(), ". Min size: ", min_size()));
  322|      0|    }
  323|  12.9k|    if (corpus_value.size() > max_size()) {
  ------------------
  |  Branch (323:9): [True: 0, False: 12.9k]
  ------------------
  324|      0|      return absl::InvalidArgumentError(absl::StrCat(
  325|      0|          "Invalid size: ", corpus_value.size(), ". Max size: ", max_size()));
  326|      0|    }
  327|       |    // Check elements.
  328|  12.9k|    int i = 0;
  329|  19.5M|    for (const auto& elem : corpus_value) {
  ------------------
  |  Branch (329:27): [True: 19.5M, False: 12.9k]
  ------------------
  330|  19.5M|      const absl::Status s = inner_.ValidateCorpusValue(elem);
  331|  19.5M|      if (!s.ok()) {
  ------------------
  |  Branch (331:11): [True: 0, False: 19.5M]
  ------------------
  332|      0|        return Prefix(s,
  333|      0|                      absl::StrCat("Invalid value in container at index ", i));
  334|      0|      }
  335|  19.5M|      i++;
  336|  19.5M|    }
  337|  12.9k|    return absl::OkStatus();
  338|  12.9k|  }
_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E9FromValueERKS9_:
  269|    128|  std::optional<corpus_type> FromValue(const value_type& value) const {
  270|    128|    if constexpr (!has_custom_corpus_type) {
  271|    128|      return value;
  272|       |    } else {
  273|       |      corpus_type copus_value;
  274|       |      for (const auto& elem : value) {
  275|       |        auto inner_value = inner_.FromValue(elem);
  276|       |        if (!inner_value) return std::nullopt;
  277|       |        copus_value.push_back(*std::move(inner_value));
  278|       |      }
  279|       |      return copus_value;
  280|       |    }
  281|    128|  }
_ZN8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E11WithMaxSizeEm:
  222|      2|  Derived& WithMaxSize(size_t s) {
  223|      2|    FUZZTEST_INTERNAL_CHECK_PRECONDITION(
  ------------------
  |  |   42|      2|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 2, False: 0]
  |  |  ------------------
  |  |   43|      2|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
  224|      2|        min_size_ <= s, "Maximal size ", s,
  225|      2|        " cannot be smaller than minimal size ", min_size_);
  226|      2|    max_size_ = s;
  227|      2|    return Self();
  228|      2|  }
_ZN8fuzztest8internal27SequenceContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_EC2Ev:
  536|      2|  SequenceContainerOfImplBase() = default;
_ZN8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_EC2Ev:
  109|      2|  ContainerOfImplBase() = default;

_ZNK8fuzztest13UntypedDomain8GetValueERKNS_8internal11CopyableAnyE:
  330|  12.8k|  value_type GetValue(const corpus_type& corpus_value) const {
  331|  12.8k|    return inner_->UntypedGetValue(corpus_value);
  332|  12.8k|  }
_ZNK8fuzztest13UntypedDomain11ParseCorpusERKNS_8internal8IRObjectE:
  334|  14.6k|  std::optional<corpus_type> ParseCorpus(const internal::IRObject& obj) const {
  335|  14.6k|    return inner_->UntypedParseCorpus(obj);
  336|  14.6k|  }
_ZNK8fuzztest13UntypedDomain19ValidateCorpusValueERKNS_8internal11CopyableAnyE:
  342|  12.8k|  absl::Status ValidateCorpusValue(const corpus_type& corpus_value) const {
  343|  12.8k|    return inner_->UntypedValidateCorpusValue(corpus_value);
  344|  12.8k|  }
_ZN8fuzztest6DomainINSt3__15tupleIJNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEEC2INS_8internal15AggregateOfImplIS9_LNSC_23RequireCustomCorpusTypeE0EJNSC_23SequenceContainerOfImplIS8_NSC_13ArbitraryImplIcvEEEENSG_IbvEESJ_NSC_24BitFlagCombinationOfImplIjEESJ_EEES9_EEONS_18domain_implementor10DomainBaseIT_S9_T0_EE:
  109|      2|      : inner_(std::make_unique<internal::DomainModel<Inner>>(
  110|      2|            static_cast<Inner&&>(inner))) {}
_ZN8fuzztest6DomainINSt3__15tupleIJNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEEC2ERKSA_:
  112|     12|  Domain(const Domain& other) { *this = other; }
_ZN8fuzztest6DomainINSt3__15tupleIJNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEEaSERKSA_:
  113|     12|  Domain& operator=(const Domain& other) {
  114|     12|    inner_ = other.inner_->TypedClone();
  115|     12|    return *this;
  116|     12|  }
_ZN8fuzztest13UntypedDomainC2INSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEEERKNS_6DomainIT_EE:
  315|      2|      : inner_(domain.inner_->UntypedClone()) {}

_ZN8fuzztest18domain_implementor10DomainBaseINS_8internal23SequenceContainerOfImplINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS2_13ArbitraryImplIcvEEEESA_SA_E7derivedEv:
  252|    258|  Derived& derived() { return static_cast<Derived&>(*this); }
_ZN8fuzztest18domain_implementor10DomainBaseINS_8internal23SequenceContainerOfImplINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS2_13ArbitraryImplIcvEEEESA_SA_E9WithSeedsERKNS4_6vectorISA_NS8_ISA_EEEE:
  185|      2|  WithSeeds(const std::vector<ValueType>& seeds) {
  186|      2|    seeds_.reserve(seeds_.size() + seeds.size());
  187|    128|    for (const ValueType& seed : seeds) {
  ------------------
  |  Branch (187:32): [True: 128, False: 2]
  ------------------
  188|    128|      std::optional<CorpusType> corpus_value = derived().FromValue(seed);
  189|    128|      if (!corpus_value.has_value()) {
  ------------------
  |  Branch (189:11): [True: 0, False: 128]
  ------------------
  190|      0|        ReportBadSeedAndExit(
  191|      0|            seed,
  192|      0|            absl::InvalidArgumentError(
  193|      0|                "Seed could not be converted to the internal corpus value"));
  194|      0|      }
  195|       |
  196|    128|      absl::Status valid = derived().ValidateCorpusValue(*corpus_value);
  197|    128|      if (!valid.ok()) ReportBadSeedAndExit(seed, valid);
  ------------------
  |  Branch (197:11): [True: 0, False: 128]
  ------------------
  198|       |
  199|    128|      seeds_.push_back(*std::move(corpus_value));
  200|    128|    }
  201|      2|    return derived();
  202|      2|  }
_ZN8fuzztest18domain_implementor10DomainBaseINS_8internal15AggregateOfImplINSt3__15tupleIJNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEELNS2_23RequireCustomCorpusTypeE0EJNS2_23SequenceContainerOfImplISB_NS2_13ArbitraryImplIcvEEEENSF_IbvEESI_NS2_24BitFlagCombinationOfImplIjEESI_EEESC_SC_EC2Ev:
  115|      2|  DomainBase() {
  116|       |    // Check that the interface of `Derived` matches the requirements for a
  117|       |    // domain implementation. We check these inside the constructor of
  118|       |    // `DomainBase`, where `Derived` is already fully defined. If we try to
  119|       |    // check them at class scope we would see an incomplete `Derived` class and
  120|       |    // the checks would not work.
  121|      2|    fuzztest::internal::CheckIsSame<
  122|      2|        ValueType, fuzztest::internal::value_type_t<Derived>>();
  123|      2|    fuzztest::internal::CheckIsSame<
  124|      2|        CorpusType, fuzztest::internal::corpus_type_t<Derived>>();
  125|      2|    static_assert(has_custom_corpus_type == Derived::has_custom_corpus_type);
  126|       |
  127|       |    // Check that `Derived` type-checks against the type-erased `Domain<T>`
  128|       |    // interface by forcing the `DomainModel` template specialization.
  129|      2|    if (Derived* domain = nullptr) {
  ------------------
  |  Branch (129:18): [True: 0, False: 2]
  ------------------
  130|      0|      (void)fuzztest::internal::DomainModel<Derived>{*domain};
  131|      0|    }
  132|      2|  }
_ZN8fuzztest18domain_implementor10DomainBaseINS_8internal23SequenceContainerOfImplINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS2_13ArbitraryImplIcvEEEESA_SA_EC2Ev:
  115|      2|  DomainBase() {
  116|       |    // Check that the interface of `Derived` matches the requirements for a
  117|       |    // domain implementation. We check these inside the constructor of
  118|       |    // `DomainBase`, where `Derived` is already fully defined. If we try to
  119|       |    // check them at class scope we would see an incomplete `Derived` class and
  120|       |    // the checks would not work.
  121|      2|    fuzztest::internal::CheckIsSame<
  122|      2|        ValueType, fuzztest::internal::value_type_t<Derived>>();
  123|      2|    fuzztest::internal::CheckIsSame<
  124|      2|        CorpusType, fuzztest::internal::corpus_type_t<Derived>>();
  125|      2|    static_assert(has_custom_corpus_type == Derived::has_custom_corpus_type);
  126|       |
  127|       |    // Check that `Derived` type-checks against the type-erased `Domain<T>`
  128|       |    // interface by forcing the `DomainModel` template specialization.
  129|      2|    if (Derived* domain = nullptr) {
  ------------------
  |  Branch (129:18): [True: 0, False: 2]
  ------------------
  130|      0|      (void)fuzztest::internal::DomainModel<Derived>{*domain};
  131|      0|    }
  132|      2|  }
_ZN8fuzztest18domain_implementor10DomainBaseINS_8internal13ArbitraryImplIcvEEccEC2Ev:
  115|      2|  DomainBase() {
  116|       |    // Check that the interface of `Derived` matches the requirements for a
  117|       |    // domain implementation. We check these inside the constructor of
  118|       |    // `DomainBase`, where `Derived` is already fully defined. If we try to
  119|       |    // check them at class scope we would see an incomplete `Derived` class and
  120|       |    // the checks would not work.
  121|      2|    fuzztest::internal::CheckIsSame<
  122|      2|        ValueType, fuzztest::internal::value_type_t<Derived>>();
  123|      2|    fuzztest::internal::CheckIsSame<
  124|      2|        CorpusType, fuzztest::internal::corpus_type_t<Derived>>();
  125|      2|    static_assert(has_custom_corpus_type == Derived::has_custom_corpus_type);
  126|       |
  127|       |    // Check that `Derived` type-checks against the type-erased `Domain<T>`
  128|       |    // interface by forcing the `DomainModel` template specialization.
  129|      2|    if (Derived* domain = nullptr) {
  ------------------
  |  Branch (129:18): [True: 0, False: 2]
  ------------------
  130|      0|      (void)fuzztest::internal::DomainModel<Derived>{*domain};
  131|      0|    }
  132|      2|  }
_ZN8fuzztest18domain_implementor10DomainBaseINS_8internal13ArbitraryImplIbvEEbbEC2Ev:
  115|      6|  DomainBase() {
  116|       |    // Check that the interface of `Derived` matches the requirements for a
  117|       |    // domain implementation. We check these inside the constructor of
  118|       |    // `DomainBase`, where `Derived` is already fully defined. If we try to
  119|       |    // check them at class scope we would see an incomplete `Derived` class and
  120|       |    // the checks would not work.
  121|      6|    fuzztest::internal::CheckIsSame<
  122|      6|        ValueType, fuzztest::internal::value_type_t<Derived>>();
  123|      6|    fuzztest::internal::CheckIsSame<
  124|      6|        CorpusType, fuzztest::internal::corpus_type_t<Derived>>();
  125|      6|    static_assert(has_custom_corpus_type == Derived::has_custom_corpus_type);
  126|       |
  127|       |    // Check that `Derived` type-checks against the type-erased `Domain<T>`
  128|       |    // interface by forcing the `DomainModel` template specialization.
  129|      6|    if (Derived* domain = nullptr) {
  ------------------
  |  Branch (129:18): [True: 0, False: 6]
  ------------------
  130|      0|      (void)fuzztest::internal::DomainModel<Derived>{*domain};
  131|      0|    }
  132|      6|  }
_ZN8fuzztest18domain_implementor10DomainBaseINS_8internal24BitFlagCombinationOfImplIjEEjjEC2Ev:
  115|      2|  DomainBase() {
  116|       |    // Check that the interface of `Derived` matches the requirements for a
  117|       |    // domain implementation. We check these inside the constructor of
  118|       |    // `DomainBase`, where `Derived` is already fully defined. If we try to
  119|       |    // check them at class scope we would see an incomplete `Derived` class and
  120|       |    // the checks would not work.
  121|      2|    fuzztest::internal::CheckIsSame<
  122|      2|        ValueType, fuzztest::internal::value_type_t<Derived>>();
  123|      2|    fuzztest::internal::CheckIsSame<
  124|      2|        CorpusType, fuzztest::internal::corpus_type_t<Derived>>();
  125|      2|    static_assert(has_custom_corpus_type == Derived::has_custom_corpus_type);
  126|       |
  127|       |    // Check that `Derived` type-checks against the type-erased `Domain<T>`
  128|       |    // interface by forcing the `DomainModel` template specialization.
  129|      2|    if (Derived* domain = nullptr) {
  ------------------
  |  Branch (129:18): [True: 0, False: 2]
  ------------------
  130|      0|      (void)fuzztest::internal::DomainModel<Derived>{*domain};
  131|      0|    }
  132|      2|  }

_ZN8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEEC2EOSK_:
  130|      2|  explicit DomainModel(D&& domain) : domain_(std::forward<D>(domain)) {}
_ZN8fuzztest8internal20UntypedDomainConceptD2Ev:
   56|     10|  virtual ~UntypedDomainConcept() = default;
_ZNK8fuzztest8internal18TypedDomainConceptINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEE12UntypedCloneEv:
  108|      2|  std::unique_ptr<UntypedDomainConcept> UntypedClone() const final {
  109|      2|    return TypedClone();
  110|      2|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE18UntypedParseCorpusERKNS0_8IRObjectE:
  172|  14.6k|      const IRObject& obj) const final {
  173|  14.6k|    if (auto res = domain_.ParseCorpus(obj)) {
  ------------------
  |  Branch (173:14): [True: 12.8k, False: 1.77k]
  ------------------
  174|  12.8k|      return GenericDomainCorpusType(std::in_place_type<CorpusType>,
  175|  12.8k|                                     *std::move(res));
  176|  12.8k|    } else {
  177|  1.77k|      return std::nullopt;
  178|  1.77k|    }
  179|  14.6k|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE26UntypedValidateCorpusValueERKNS0_11CopyableAnyE:
  187|  12.8k|      const GenericDomainCorpusType& corpus_value) const final {
  188|  12.8k|    return domain_.ValidateCorpusValue(corpus_value.GetAs<CorpusType>());
  189|  12.8k|  }
_ZNK8fuzztest8internal18TypedDomainConceptINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEE15UntypedGetValueERKNS0_11CopyableAnyE:
  113|  12.8k|      const GenericDomainCorpusType& v) const final {
  114|  12.8k|    return GenericDomainValueType(std::in_place_type<ValueType>,
  115|  12.8k|                                  TypedGetValue(v));
  116|  12.8k|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE10TypedCloneEv:
  132|     14|  std::unique_ptr<TypedDomainConcept<ValueType>> TypedClone() const final {
  133|     14|    return std::make_unique<DomainModel>(*this);
  134|     14|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE13TypedGetValueERKNS0_11CopyableAnyE:
  157|  12.8k|  ValueType TypedGetValue(const GenericDomainCorpusType& v) const final {
  158|  12.8k|    return domain_.GetValue(v.GetAs<CorpusType>());
  159|  12.8k|  }

_ZN8fuzztest8internal20UntypedFixtureDriver13SetUpFuzzTestEv:
   20|      2|void UntypedFixtureDriver::SetUpFuzzTest() {}
_ZN8fuzztest8internal20UntypedFixtureDriver14SetUpIterationEv:
   21|  12.8k|void UntypedFixtureDriver::SetUpIteration() {}
_ZN8fuzztest8internal20UntypedFixtureDriver17TearDownIterationEv:
   22|  12.8k|void UntypedFixtureDriver::TearDownIteration() {}

_ZN8fuzztest8internal13FixtureDriverINS_6DomainINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS0_9NoFixtureEPFvRKSA_bbjbEPvEC2ESH_SC_NS3_6vectorINS0_11CopyableAnyENS8_ISL_EEEERKSI_:
  287|      2|      : FixtureDriver::TypedFixtureDriver(std::move(domain), std::move(seeds),
  288|      2|                                          seed_provider),
  289|      2|        target_function_(target_function) {}
_ZN8fuzztest8internal18TypedFixtureDriverINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEPvEC2ENS_6DomainISA_EENS2_6vectorINS0_11CopyableAnyENS7_ISG_EEEERKSB_:
  104|      2|      : domain_(std::move(domain)),
  105|      2|        seeds_(std::move(seeds)),
  106|      2|        seed_provider_(seed_provider) {}
_ZNK8fuzztest8internal13FixtureDriverINS_6DomainINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS0_9NoFixtureEPFvRKSA_bbjbEPvE4TestEONS0_11MoveOnlyAnyE:
  291|  12.8k|  void Test(MoveOnlyAny&& args_untyped) const override {
  292|  12.8k|    std::apply(
  293|  12.8k|        [&](auto&&... args) {
  294|  12.8k|          target_function_(ForceVectorForStringView<Args>(std::move(args))...);
  295|  12.8k|        },
  296|  12.8k|        args_untyped.GetAs<value_type_t<DomainT>>());
  297|  12.8k|  }
_ZZNK8fuzztest8internal13FixtureDriverINS_6DomainINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS0_9NoFixtureEPFvRKSA_bbjbEPvE4TestEONS0_11MoveOnlyAnyEENKUlDpOT_E_clIJRSA_RbSS_RjSS_EEEDaSO_:
  293|  12.8k|        [&](auto&&... args) {
  294|  12.8k|          target_function_(ForceVectorForStringView<Args>(std::move(args))...);
  295|  12.8k|        },
_ZN8fuzztest8internal24ForceVectorForStringViewIRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_EEDcOT0_:
  181|  12.8k|decltype(auto) ForceVectorForStringView(Src&& src) {
  182|       |  // We only do this when Src is a std::string. If it's a string view it is
  183|       |  // handled by the string view domain itself.
  184|       |  if constexpr (std::is_same_v<void(std::decay_t<Dest>, std::decay_t<Src>),
  185|       |                               void(std::string_view, std::string)>) {
  186|       |    return ForceVector{std::vector<char>(src.begin(), src.end())};
  187|  12.8k|  } else {
  188|  12.8k|    return std::forward<Src>(src);
  189|  12.8k|  }
  190|  12.8k|}
_ZN8fuzztest8internal24ForceVectorForStringViewIbbEEDcOT0_:
  181|  38.5k|decltype(auto) ForceVectorForStringView(Src&& src) {
  182|       |  // We only do this when Src is a std::string. If it's a string view it is
  183|       |  // handled by the string view domain itself.
  184|       |  if constexpr (std::is_same_v<void(std::decay_t<Dest>, std::decay_t<Src>),
  185|       |                               void(std::string_view, std::string)>) {
  186|       |    return ForceVector{std::vector<char>(src.begin(), src.end())};
  187|  38.5k|  } else {
  188|  38.5k|    return std::forward<Src>(src);
  189|  38.5k|  }
  190|  38.5k|}
_ZN8fuzztest8internal24ForceVectorForStringViewIjjEEDcOT0_:
  181|  12.8k|decltype(auto) ForceVectorForStringView(Src&& src) {
  182|       |  // We only do this when Src is a std::string. If it's a string view it is
  183|       |  // handled by the string view domain itself.
  184|       |  if constexpr (std::is_same_v<void(std::decay_t<Dest>, std::decay_t<Src>),
  185|       |                               void(std::string_view, std::string)>) {
  186|       |    return ForceVector{std::vector<char>(src.begin(), src.end())};
  187|  12.8k|  } else {
  188|  12.8k|    return std::forward<Src>(src);
  189|  12.8k|  }
  190|  12.8k|}
_ZNK8fuzztest8internal18TypedFixtureDriverINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEPvE10GetDomainsEv:
  120|      2|  UntypedDomain GetDomains() const final { return domain_; }

_ZNK8fuzztest8internal17GTest_TestAdaptor26GetFuzzTestsInCurrentShardEv:
   23|      2|std::vector<std::string> GTest_TestAdaptor::GetFuzzTestsInCurrentShard() const {
   24|      2|  std::vector<std::string> result;
   25|      2|  for (const auto* test : GetRegisteredTests()) {
  ------------------
  |  Branch (25:25): [True: 2, False: 2]
  ------------------
   26|      2|    if (!test->should_run()) continue;
  ------------------
  |  Branch (26:9): [True: 0, False: 2]
  ------------------
   27|      2|    if (test->is_in_another_shard()) continue;
  ------------------
  |  Branch (27:9): [True: 0, False: 2]
  ------------------
   28|      2|    for (const auto& fuzztest : configuration_.fuzz_tests) {
  ------------------
  |  Branch (28:31): [True: 2, False: 0]
  ------------------
   29|      2|      if (fuzztest ==
  ------------------
  |  Branch (29:11): [True: 2, False: 0]
  ------------------
   30|      2|          absl::StrCat(test->test_suite_name(), ".", test->name())) {
   31|      2|        result.push_back(fuzztest);
   32|      2|        break;
   33|      2|      }
   34|      2|    }
   35|      2|  }
   36|      2|  return result;
   37|      2|}
_ZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS0_13ConfigurationE:
   82|      2|                                    const Configuration& configuration) {
   83|      2|  ::fuzztest::internal::ForEachTest([&](auto& test) {
   84|      2|    if (test.uses_fixture()) {
   85|      2|      RegisterTests<::fuzztest::internal::GTest_TestAdaptor>(argc, argv, test,
   86|      2|                                                             configuration);
   87|      2|    } else {
   88|      2|      RegisterTests<::testing::Test>(argc, argv, test, configuration);
   89|      2|    }
   90|      2|  });
   91|       |
   92|      2|  ::testing::UnitTest::GetInstance()->listeners().Append(
   93|      2|      new ::fuzztest::internal::GTest_EventListener<
   94|      2|          ::testing::EmptyTestEventListener, ::testing::TestPartResult>());
   95|      2|}
_ZN8fuzztest8internal28FuzzTestListingModeValidator26RegisterGoogleTestListenerEv:
  151|      2|void FuzzTestListingModeValidator::RegisterGoogleTestListener() {
  152|      2|  testing::UnitTest::GetInstance()->listeners().Append(
  153|      2|      new ValidatorProxyListener(this));
  154|      2|}
_ZN8fuzztest8internal44SetFuzzTestListingModeValidatorForGoogleTestEb:
  156|      2|void SetFuzzTestListingModeValidatorForGoogleTest(bool listing_mode) {
  157|      2|  FuzzTestListingModeValidator::GetInstance().set_listing_mode(listing_mode);
  158|      2|}
_ZN8fuzztest8internal18GetRegisteredTestsEv:
  160|      2|std::vector<const testing::TestInfo*> GetRegisteredTests() {
  161|      2|  std::vector<const testing::TestInfo*> result;
  162|      2|  auto& unit_test = *testing::UnitTest::GetInstance();
  163|      4|  for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {
  ------------------
  |  Branch (163:19): [True: 2, False: 2]
  ------------------
  164|      4|    for (int j = 0; j < unit_test.GetTestSuite(i)->total_test_count(); ++j) {
  ------------------
  |  Branch (164:21): [True: 2, False: 2]
  ------------------
  165|      2|      result.push_back(unit_test.GetTestSuite(i)->GetTestInfo(j));
  166|      2|    }
  167|      2|  }
  168|      2|  return result;
  169|      2|}
_ZN8fuzztest8internal22ValidatorProxyListenerC2EPNS0_28FuzzTestListingModeValidatorE:
  146|      2|      : validator_(validator) {}
_ZN8fuzztest8internal22ValidatorProxyListener18OnTestProgramStartERKN7testing8UnitTestE:
  138|      2|  void OnTestProgramStart(const testing::UnitTest& unit_test) override {
  139|      2|    validator_->Run();
  140|      2|  }
_ZN8fuzztest8internal28FuzzTestListingModeValidator3RunEv:
  101|      2|  void Run() {
  102|      2|    if (listing_mode_) {
  ------------------
  |  Branch (102:9): [True: 0, False: 2]
  ------------------
  103|       |      // Since InitFuzzTest calls std::exit after listing the fuzz tests, we
  104|       |      // would not reach here if InitFuzzTest is called before.
  105|       |      absl::FPrintF(stderr,
  106|      0|                    "[!] --" FUZZTEST_FLAG_PREFIX
  107|      0|                    "list_fuzz_tests not handled by InitFuzzTest - fuzz tests "
  108|      0|                    "would not be listed even if defined.\n");
  109|      0|      std::exit(0);
  110|      0|    }
  111|      2|  }
_ZN8fuzztest8internal28FuzzTestListingModeValidator11GetInstanceEv:
  115|      2|  static FuzzTestListingModeValidator& GetInstance() {
  116|      2|    static auto* instance = [] {
  117|      2|      static_assert(
  118|      2|          std::is_trivially_destructible_v<FuzzTestListingModeValidator>);
  119|      2|      static FuzzTestListingModeValidator instance;
  120|      2|      instance.RegisterGoogleTestListener();
  121|      2|      return &instance;
  122|      2|    }();
  123|      2|    return *instance;
  124|      2|  }
_ZZN8fuzztest8internal28FuzzTestListingModeValidator11GetInstanceEvENKUlvE_clEv:
  116|      2|    static auto* instance = [] {
  117|      2|      static_assert(
  118|      2|          std::is_trivially_destructible_v<FuzzTestListingModeValidator>);
  119|      2|      static FuzzTestListingModeValidator instance;
  120|      2|      instance.RegisterGoogleTestListener();
  121|      2|      return &instance;
  122|      2|    }();
_ZN8fuzztest8internal28FuzzTestListingModeValidator16set_listing_modeEb:
  113|      2|  void set_listing_mode(bool listing_mode) { listing_mode_ = listing_mode; }
googletest_adaptor.cc:_ZZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS0_13ConfigurationEENK3$_0clINS0_8FuzzTestEEEDaRT_:
   83|      2|  ::fuzztest::internal::ForEachTest([&](auto& test) {
   84|      2|    if (test.uses_fixture()) {
  ------------------
  |  Branch (84:9): [True: 0, False: 2]
  ------------------
   85|      0|      RegisterTests<::fuzztest::internal::GTest_TestAdaptor>(argc, argv, test,
   86|      0|                                                             configuration);
   87|      2|    } else {
   88|      2|      RegisterTests<::testing::Test>(argc, argv, test, configuration);
   89|      2|    }
   90|      2|  });
googletest_adaptor.cc:_ZN8fuzztest8internal12_GLOBAL__N_113RegisterTestsIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationE:
   73|      2|                   const Configuration& configuration) {
   74|      2|  RegisterFuzzTestAsGTest<T>(argc, argv, test, configuration);
   75|      2|  RegisterSeparateRegressionTestForEachCrashingInput<T>(argc, argv, test,
   76|      2|                                                        configuration);
   77|      2|}
googletest_adaptor.cc:_ZN8fuzztest8internal12_GLOBAL__N_123RegisterFuzzTestAsGTestIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationENSt3__117basic_string_viewIcNSE_11char_traitsIcEEEE:
   43|      2|                             absl::string_view suffix = "") {
   44|      2|  auto fixture_factory = [argc, argv, &test,
   45|      2|                          configuration = configuration]() -> T* {
   46|      2|    return new ::fuzztest::internal::GTest_TestAdaptor(test, argc, argv,
   47|      2|                                                       configuration);
   48|      2|  };
   49|      2|  const std::string test_name_with_suffix =
   50|      2|      absl::StrCat(test.test_name(), suffix);
   51|      2|  ::testing::RegisterTest(
   52|      2|      test.suite_name().c_str(), test_name_with_suffix.c_str(), nullptr,
   53|      2|      nullptr, test.file().c_str(), test.line(), std::move(fixture_factory));
   54|      2|}
googletest_adaptor.cc:_ZZN8fuzztest8internal12_GLOBAL__N_123RegisterFuzzTestAsGTestIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationENSt3__117basic_string_viewIcNSE_11char_traitsIcEEEEENKUlvE_clEv:
   45|      2|                          configuration = configuration]() -> T* {
   46|      2|    return new ::fuzztest::internal::GTest_TestAdaptor(test, argc, argv,
   47|      2|                                                       configuration);
   48|      2|  };
googletest_adaptor.cc:_ZN8fuzztest8internal12_GLOBAL__N_150RegisterSeparateRegressionTestForEachCrashingInputIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationE:
   59|      2|    const Configuration& configuration) {
   60|      2|  CorpusDatabase corpus_database(configuration);
   61|      2|  for (const std::string& input :
  ------------------
  |  Branch (61:33): [True: 0, False: 2]
  ------------------
   62|      2|       corpus_database.GetCrashingInputsIfAny(test.full_name())) {
   63|      0|    Configuration updated_configuration = configuration;
   64|      0|    updated_configuration.crashing_input_to_reproduce = input;
   65|      0|    const std::string suffix =
   66|      0|        absl::StrCat("/Regression/", std::string(Basename(input)));
   67|      0|    RegisterFuzzTestAsGTest<T>(argc, argv, test, updated_configuration, suffix);
   68|      0|  }
   69|      2|}

_ZN8fuzztest8internal17GTest_TestAdaptorC2ERNS0_8FuzzTestEPiPPPcNS0_13ConfigurationE:
   35|      2|      : test_(test),
   36|      2|        argc_(argc),
   37|      2|        argv_(argv),
   38|      2|        configuration_(std::move(configuration)) {}
_ZN8fuzztest8internal17GTest_TestAdaptor8TestBodyEv:
   40|      2|  void TestBody() override {
   41|      2|    auto test = test_.make();
   42|      2|    configuration_.fuzz_tests_in_current_shard = GetFuzzTestsInCurrentShard();
   43|      2|    if (Runtime::instance().run_mode() == RunMode::kUnitTest) {
  ------------------
  |  Branch (43:9): [True: 0, False: 2]
  ------------------
   44|       |      // In "bug reproduction" mode, sometimes we need to reproduce multiple
   45|       |      // bugs, i.e., run multiple tests that lead to a crash.
   46|      0|      bool needs_subprocess = false;
   47|      0|#ifdef GTEST_HAS_DEATH_TEST
   48|      0|      needs_subprocess =
   49|      0|          configuration_.crashing_input_to_reproduce.has_value() &&
  ------------------
  |  Branch (49:11): [True: 0, False: 0]
  ------------------
   50|      0|          (
   51|       |              // When only a single test runs, it's okay to crash the process on
   52|       |              // error, as we don't need to run other tests.
   53|      0|              testing::UnitTest::GetInstance()->test_to_run_count() > 1 ||
  ------------------
  |  Branch (53:15): [True: 0, False: 0]
  ------------------
   54|       |              // EXPECT_EXIT is required in the death-test subprocess, but in
   55|       |              // the subprocess there's only one test to run.
   56|      0|              testing::internal::InDeathTestChild());
  ------------------
  |  Branch (56:15): [True: 0, False: 0]
  ------------------
   57|      0|#endif
   58|      0|      if (needs_subprocess) {
  ------------------
  |  Branch (58:11): [True: 0, False: 0]
  ------------------
   59|      0|        configuration_.preprocess_crash_reproducing = [] {
   60|       |          // EXPECT_EXIT disables event forwarding in gtest and as a result,
   61|       |          // EXPECT/ASSERT-s are disabled. Here, we overwrite this option.
   62|      0|          testing::UnitTest::GetInstance()->listeners().SuppressEventForwarding(
   63|      0|              false);
   64|      0|        };
   65|       |        // `RunInUnitTestMode` is supposed to fail and we wish to show the
   66|       |        // failure to the user. Directly running the test would terminate the
   67|       |        // process and using `EXPECT_DEATH` causes the test to pass. We use
   68|       |        // `EXPECT_EXIT` so that the test exit unsuccessfully, meaning that the
   69|       |        // test below fails without terminating the process.
   70|      0|#ifdef GTEST_HAS_DEATH_TEST
   71|      0|        EXPECT_EXIT(
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|            (test->RunInUnitTestMode(configuration_),
   73|      0|             void(
   74|      0|                 R"( FuzzTest failure! Please see 'actual message' below for the crash report. )"),
   75|      0|             std::exit(0)),
   76|      0|            ::testing::ExitedWithCode(0), "");
   77|       |#else
   78|       |        EXPECT_TRUE(false) << "Death test is not supported.";
   79|       |#endif
   80|      0|      } else {
   81|      0|        test->RunInUnitTestMode(configuration_);
   82|      0|      }
   83|      2|    } else {
   84|       |      // TODO(b/245753736): Consider using `tolerate_failure` when FuzzTest can
   85|       |      // tolerate crashes in fuzzing mode.
   86|      6|      ASSERT_EQ(0, test->RunInFuzzingMode(argc_, argv_, configuration_))
  ------------------
  |  Branch (86:7): [True: 0, False: 2]
  |  Branch (86:7): [True: 0, False: 2]
  |  Branch (86:7): [True: 2, False: 0]
  ------------------
   87|      6|          << "Fuzzing failure.";
   88|      2|    }
   89|      2|  }

_ZN8fuzztest8internal8BasenameENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  183|      2|absl::string_view Basename(absl::string_view filename) {
  184|      2|  auto last_slash_pos = filename.find_last_of("/\\");
  185|       |
  186|      2|  return last_slash_pos == absl::string_view::npos
  ------------------
  |  Branch (186:10): [True: 0, False: 2]
  ------------------
  187|      2|             ? filename
  188|      2|             : filename.substr(last_slash_pos + 1);
  189|      2|}

_ZN8fuzztest8internal9GetStderrEv:
  125|      2|FILE* GetStderr() {
  126|      2|  absl::MutexLock lock(&stderr_file_guard_);
  127|      2|  if (!stderr_file_) {
  ------------------
  |  Branch (127:7): [True: 2, False: 0]
  ------------------
  128|       |    stderr_file_ = stderr;
  129|      2|  }
  130|      2|  return stderr_file_;
  131|      2|}

_ZN8fuzztest8internal11CheckIsSameIjjEEvv:
  806|      4|constexpr void CheckIsSame() {
  807|      4|  static_assert(std::is_same_v<T, U>);
  808|      4|}
_ZN8fuzztest8internal11CheckIsSameIccEEvv:
  806|      4|constexpr void CheckIsSame() {
  807|      4|  static_assert(std::is_same_v<T, U>);
  808|      4|}
_ZN8fuzztest8internal11CheckIsSameINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_EEvv:
  806|      4|constexpr void CheckIsSame() {
  807|      4|  static_assert(std::is_same_v<T, U>);
  808|      4|}
_ZN8fuzztest8internal11CheckIsSameIbbEEvv:
  806|     12|constexpr void CheckIsSame() {
  807|     12|  static_assert(std::is_same_v<T, U>);
  808|     12|}
_ZN8fuzztest8internal10ApplyIndexILm5EZNKS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EE19ValidateCorpusValueERKSB_EUlDpT_E_EEDaT0_:
   54|  12.8k|constexpr auto ApplyIndex(F f) {
   55|  12.8k|  return ApplyIndexImpl(f, std::make_index_sequence<N>{});
   56|  12.8k|}
_ZN8fuzztest8internal14ApplyIndexImplIJLm0ELm1ELm2ELm3ELm4EEZNKS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EE19ValidateCorpusValueERKSB_EUlDpT_E_EEDaT0_NS3_16integer_sequenceImJXspT_EEEE:
   39|  12.8k|constexpr auto ApplyIndexImpl(F f, std::index_sequence<I...>) {
   40|  12.8k|  return f(std::integral_constant<size_t, I>{}...);
   41|  12.8k|}
_ZN8fuzztest8internal10ApplyIndexILm5EZNKS0_8IRObject8ToCorpusINSt3__15tupleIJNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEEEENS4_8optionalIT_EEvEUlDpT_E_EEDaT0_:
   54|  12.8k|constexpr auto ApplyIndex(F f) {
   55|  12.8k|  return ApplyIndexImpl(f, std::make_index_sequence<N>{});
   56|  12.8k|}
_ZN8fuzztest8internal14ApplyIndexImplIJLm0ELm1ELm2ELm3ELm4EEZNKS0_8IRObject8ToCorpusINSt3__15tupleIJNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEEEENS4_8optionalIT_EEvEUlDpT_E_EEDaT0_NS4_16integer_sequenceImJXspT_EEEE:
   39|  12.8k|constexpr auto ApplyIndexImpl(F f, std::index_sequence<I...>) {
   40|  12.8k|  return f(std::integral_constant<size_t, I>{}...);
   41|  12.8k|}
_ZN8fuzztest8internal11CheckIsSameINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEESA_EEvv:
  806|      4|constexpr void CheckIsSame() {
  807|      4|  static_assert(std::is_same_v<T, U>);
  808|      4|}

_ZN8fuzztest15GetRegistrationIPFvRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEDaS7_S7_S7_iT_:
  339|      2|                     TargetFunction target_function) {
  340|      2|  return ::fuzztest::internal::Registration<::fuzztest::internal::NoFixture,
  341|      2|                                            TargetFunction>(
  342|      2|      ::fuzztest::internal::BasicTestInfo{std::move(suite_name),
  343|      2|                                          std::move(test_name), std::move(file),
  344|      2|                                          line, false},
  345|      2|      target_function);
  346|      2|}
_ZN8fuzztest8internal12RegistrationINS0_9NoFixtureEPFvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbENS0_23DefaultRegistrationBaseIJS9_bbjbEEEPvEC2ENS0_13BasicTestInfoESD_:
  134|      2|      : test_info_(std::move(info)), target_function_(target_function) {}
_ZNO8fuzztest8internal12RegistrationINS0_9NoFixtureEPFvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbENS0_23DefaultRegistrationBaseIJS9_bbjbEEEPvE11WithDomainsIJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSK_IbvEESN_NS0_24BitFlagCombinationOfImplIjEESN_EEEDaDpOT_:
  172|      2|  auto WithDomains(NewDomains&&... domains) && {
  173|      2|    return std::move(*this).WithDomains(
  174|      2|        TupleOf(std::forward<NewDomains>(domains)...));
  175|      2|  }
_ZNO8fuzztest8internal12RegistrationINS0_9NoFixtureEPFvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbENS0_23DefaultRegistrationBaseIJS9_bbjbEEEPvE11WithDomainsIJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSK_IbvEESN_NS0_24BitFlagCombinationOfImplIjEESN_EEEDaNS0_15AggregateOfImplINS3_5tupleIJDpNT_10value_typeEEEELNS0_23RequireCustomCorpusTypeE0EJDpSS_EEE:
  149|      2|                       domain) && {
  150|      2|    static_assert(!Registration::kHasDomain,
  151|      2|                  "WithDomains can only be called once.");
  152|      2|    static_assert(!Registration::kHasSeeds,
  153|      2|                  "WithDomains can not be called after WithSeeds.");
  154|      2|    static_assert(!Registration::kHasSeedProvider,
  155|      2|                  "WithDomains can not be called after WithSeedProvider.");
  156|      2|    static_assert(
  157|      2|        Base::kNumArgs == sizeof...(NewDomains),
  158|      2|        "Number of domains specified in .WithDomains() does not match "
  159|      2|        "the number of function parameters.");
  160|      2|    using NewBase = RegistrationWithDomainsBase<value_type_t<NewDomains>...>;
  161|      2|    return Registration<Fixture, TargetFunction, NewBase, SeedProvider>(
  162|      2|        std::move(test_info_), target_function_, NewBase{std::move(domain)});
  163|      2|  }
_ZN8fuzztest8internal12RegistrationINS0_9NoFixtureEPFvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbENS0_27RegistrationWithDomainsBaseIJS9_bbjbEEEPvEC2ENS0_13BasicTestInfoESD_SF_:
  294|      2|      : Base(std::move(base)),
  295|      2|        test_info_(std::move(info)),
  296|      2|        target_function_(target_function) {}
_ZNK8fuzztest8internal27RegistrationWithDomainsBaseIJNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEE10GetDomainsEv:
   95|      2|  const auto& GetDomains() const { return domains_; }
_ZNK8fuzztest8internal12RegistrationINS0_9NoFixtureEPFvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbENS0_27RegistrationWithDomainsBaseIJS9_bbjbEEEPvE5seedsEv:
  272|      2|  std::vector<GenericDomainCorpusType> seeds() const {
  273|       |    if constexpr (Base::kHasSeeds) {
  274|       |      return this->seeds_;
  275|      2|    } else {
  276|      2|      return {};
  277|      2|    }
  278|      2|  }
_ZN8fuzztest8internal12RegistrationINS0_9NoFixtureEPFvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbENS0_27RegistrationWithDomainsBaseIJS9_bbjbEEEPvE13seed_providerEv:
  280|      2|  SeedProvider seed_provider() {
  281|       |    if constexpr (Base::kHasSeedProvider) {
  282|       |      return std::move(this->seed_provider_);
  283|      2|    } else {
  284|      2|      return {};
  285|      2|    }
  286|      2|  }

_ZN8fuzztest8internal11ForEachTestEN4absl12lts_2024011611FunctionRefIFvRNS0_8FuzzTestEEEE:
   56|      8|void ForEachTest(absl::FunctionRef<void(FuzzTest&)> func) {
   57|      8|  for (auto& t : Regs()) func(t);
  ------------------
  |  Branch (57:16): [True: 8, False: 8]
  ------------------
   58|      8|}
_ZN8fuzztest8internal12RegisterImplENS0_13BasicTestInfoEN4absl12lts_2024011612AnyInvocableIKFNSt3__110unique_ptrINS0_14FuzzTestFuzzerENS5_14default_deleteIS7_EEEERKNS0_8FuzzTestEEEE:
   60|      2|void RegisterImpl(BasicTestInfo test_info, FuzzTestFuzzerFactory factory) {
   61|      2|  Regs().emplace_back(std::move(test_info), std::move(factory));
   62|      2|}
registry.cc:_ZN8fuzztest8internal12_GLOBAL__N_14RegsEv:
   30|     10|auto& Regs() {
   31|       |  // We use a deque because FuzzTest is not copyable/movable.
   32|     10|  static auto* reg = new std::deque<FuzzTest>;
   33|     10|  return *reg;
   34|     10|}

_ZN8fuzztest8internal17RegistrationTokenaSINS0_27RegistrationWithDomainsBaseIJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEENS0_9NoFixtureEPFvRKSA_bbjbEPvEERS1_ONS0_12RegistrationIT0_T1_T_T2_EE:
   57|      2|      Registration<Fixture, TargetFunction, RegBase, SeedProvider>&& reg) {
   58|       |    if constexpr (std::is_base_of_v<FixtureWithExplicitSetUp, Fixture>) {
   59|       |      RegisterSetUpTearDownTestSuiteFunctions(reg.test_info_.suite_name,
   60|       |                                              &Fixture::SetUpTestSuite,
   61|       |                                              &Fixture::TearDownTestSuite);
   62|       |    }
   63|      2|    BasicTestInfo test_info = reg.test_info_;
   64|      2|    RegisterImpl(std::move(test_info),
   65|      2|                 GetFuzzTestFuzzerFactory(std::move(reg)));
   66|      2|    return *this;
   67|      2|  }
_ZN8fuzztest8internal17RegistrationToken24GetFuzzTestFuzzerFactoryINS0_27RegistrationWithDomainsBaseIJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEENS0_9NoFixtureEPFvRKSA_bbjbEPvEEN4absl12lts_2024011612AnyInvocableIKFNS4_10unique_ptrINS0_14FuzzTestFuzzerENS4_14default_deleteISM_EEEERKNS0_8FuzzTestEEEEONS0_12RegistrationIT0_T1_T_T2_EE:
   72|      2|      Registration<Fixture, TargetFunction, RegBase, SeedProvider>&& reg) {
   73|       |#if defined(FUZZTEST_COMPATIBILITY_MODE) && defined(FUZZTEST_USE_CENTIPEDE)
   74|       |#error FuzzTest compatibility mode cannot work together with Centipede.
   75|       |#endif
   76|      2|#if defined(FUZZTEST_COMPATIBILITY_MODE)
   77|      2|    using FuzzerImpl = FuzzTestExternalEngineAdaptor;
   78|       |#elif defined(FUZZTEST_USE_CENTIPEDE)
   79|       |    using FuzzerImpl = CentipedeFuzzerAdaptor;
   80|       |#else
   81|       |    using FuzzerImpl = FuzzTestFuzzerImpl;
   82|       |#endif
   83|       |
   84|      2|    return [target_function = reg.target_function_, domain = reg.GetDomains(),
   85|      2|            seeds = reg.seeds(), seed_provider = reg.seed_provider()](
   86|      2|               const FuzzTest& test) -> std::unique_ptr<FuzzTestFuzzer> {
   87|      2|      return std::make_unique<FuzzerImpl>(
   88|      2|          test,
   89|      2|          std::make_unique<FixtureDriverImpl<decltype(domain), Fixture,
   90|      2|                                             TargetFunction, SeedProvider>>(
   91|      2|              target_function, domain, seeds, seed_provider));
   92|      2|    };
   93|      2|  }
_ZZN8fuzztest8internal17RegistrationToken24GetFuzzTestFuzzerFactoryINS0_27RegistrationWithDomainsBaseIJNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEENS0_9NoFixtureEPFvRKSA_bbjbEPvEEN4absl12lts_2024011612AnyInvocableIKFNS4_10unique_ptrINS0_14FuzzTestFuzzerENS4_14default_deleteISM_EEEERKNS0_8FuzzTestEEEEONS0_12RegistrationIT0_T1_T_T2_EEENKUlSS_E_clESS_:
   86|      2|               const FuzzTest& test) -> std::unique_ptr<FuzzTestFuzzer> {
   87|      2|      return std::make_unique<FuzzerImpl>(
   88|      2|          test,
   89|      2|          std::make_unique<FixtureDriverImpl<decltype(domain), Fixture,
   90|      2|                                             TargetFunction, SeedProvider>>(
   91|      2|              target_function, domain, seeds, seed_provider));
   92|      2|    };

_ZN8fuzztest8internal7RuntimeC2Ev:
  226|      2|Runtime::Runtime() {
  227|      2|  if (const char* crash_metadata_path =
  228|      2|          std::getenv("FUZZTEST_CRASH_METADATA_PATH");
  229|      2|      crash_metadata_path != nullptr) {
  ------------------
  |  Branch (229:7): [True: 0, False: 2]
  ------------------
  230|      0|    RegisterCrashMetadataListener(
  231|      0|        [=](absl::string_view crash_type,
  232|      0|            absl::Span<const std::string> /*stack_frames*/) {
  233|      0|          WriteFile(crash_metadata_path, crash_type);
  234|      0|        });
  235|      0|  }
  236|      2|}
_ZN8fuzztest8internal7Runtime19CheckWatchdogLimitsEv:
  374|  12.8k|void Runtime::CheckWatchdogLimits() {
  375|       |  // Centipede runner has its own watchdog.
  376|  12.8k|#ifndef FUZZTEST_USE_CENTIPEDE
  377|  12.8k|  if (current_configuration_ == nullptr) return;
  ------------------
  |  Branch (377:7): [True: 12.8k, False: 0]
  ------------------
  378|      0|  const absl::Duration run_duration =
  379|      0|      clock_fn_() - current_iteration_start_time_;
  380|      0|  if (current_configuration_->time_limit_per_input > absl::ZeroDuration() &&
  ------------------
  |  Branch (380:7): [True: 0, False: 0]
  ------------------
  381|      0|      run_duration > current_configuration_->time_limit_per_input) {
  ------------------
  |  Branch (381:7): [True: 0, False: 0]
  ------------------
  382|      0|    absl::FPrintF(
  383|      0|        GetStderr(), "[!] Per-input timeout exceeded: %s > %s - aborting\n",
  384|      0|        absl::FormatDuration(run_duration),
  385|      0|        absl::FormatDuration(current_configuration_->time_limit_per_input));
  386|      0|    std::abort();
  387|      0|  }
  388|      0|  const size_t rss_usage = GetPeakRSSBytes();
  389|      0|  if (current_configuration_->rss_limit > 0 &&
  ------------------
  |  Branch (389:7): [True: 0, False: 0]
  ------------------
  390|      0|      rss_usage > current_configuration_->rss_limit) {
  ------------------
  |  Branch (390:7): [True: 0, False: 0]
  ------------------
  391|      0|    absl::FPrintF(GetStderr(),
  392|      0|                  "[!] RSS limit exceeded: %zu > %zu (bytes) - aborting\n",
  393|      0|                  rss_usage, current_configuration_->rss_limit);
  394|      0|    std::abort();
  395|      0|  }
  396|      0|#endif
  397|      0|}
_ZN8fuzztest8internal7Runtime18OnTestIterationEndEv:
  399|  12.8k|void Runtime::OnTestIterationEnd() {
  400|  12.8k|  test_iteration_started_ = false;
  401|  12.8k|  while (watchdog_spinlock_.test_and_set()) std::this_thread::yield();
  ------------------
  |  Branch (401:10): [True: 0, False: 12.8k]
  ------------------
  402|  12.8k|  CheckWatchdogLimits();
  403|  12.8k|  watchdog_spinlock_.clear();
  404|  12.8k|}
_ZN8fuzztest8internal21InstallSignalHandlersEP8_IO_FILE:
  517|      2|void InstallSignalHandlers(FILE* out) {
  518|      2|  if (signal_out != nullptr) {
  ------------------
  |  Branch (518:7): [True: 0, False: 2]
  ------------------
  519|       |    // Already installed. Noop.
  520|      0|    return;
  521|      0|  }
  522|      2|  signal_out = out;
  523|       |
  524|       |#if defined(FUZZTEST_HAS_SANITIZER)
  525|       |  // An ASan failure might come without a signal.
  526|       |  // Eg a divide by zero is intercepted by ASan and it terminates the process
  527|       |  // after printing its output. This handler helps us print our output
  528|       |  // afterwards.
  529|       |  __sanitizer_set_death_callback([](auto...) {
  530|       |    Runtime& runtime = Runtime::instance();
  531|       |#if defined(ADDRESS_SANITIZER)
  532|       |    runtime.SetCrashTypeIfUnset(__asan_get_report_description());
  533|       |#else
  534|       |    runtime.SetCrashTypeIfUnset("Sanitizer crash");
  535|       |#endif
  536|       |    runtime.PrintReport(&signal_out_sink);
  537|       |  });
  538|       |#endif
  539|       |
  540|     12|  for (OldSignalHandler& h : crash_handlers) {
  ------------------
  |  Branch (540:28): [True: 12, False: 2]
  ------------------
  541|     12|    SetNewSigAction(h.signum, &HandleCrash, &h.action);
  542|     12|  }
  543|       |
  544|      6|  for (OldSignalHandler& h : termination_handlers) {
  ------------------
  |  Branch (544:28): [True: 6, False: 2]
  ------------------
  545|      6|    SetNewSigAction(h.signum, &HandleTermination, nullptr);
  546|      6|  }
  547|      2|}
_ZN8fuzztest8internal18FuzzTestFuzzerImplC2ERKNS0_8FuzzTestENSt3__110unique_ptrINS0_20UntypedFixtureDriverENS5_14default_deleteIS7_EEEE:
  570|      2|    : test_(test),
  571|      2|      fixture_driver_(std::move(fixture_driver)),
  572|      2|      params_domain_(fixture_driver_->GetDomains()),
  573|      2|      execution_coverage_(internal::GetExecutionCoverage()),
  574|      2|      corpus_coverage_(execution_coverage_ != nullptr
  ------------------
  |  Branch (574:24): [True: 0, False: 2]
  ------------------
  575|      2|                           ? execution_coverage_->GetCounterMap().size()
  576|      2|                           : 0) {
  577|      2|  FUZZTEST_INTERNAL_CHECK_PRECONDITION(fixture_driver_ != nullptr,
  ------------------
  |  |   42|      2|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 2, False: 0]
  |  |  ------------------
  |  |   43|      2|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
  578|      2|                                       "Invalid fixture driver!");
  579|      2|  stats_.start_time = absl::Now();
  580|      2|  const char* corpus_out_dir_chars = getenv("FUZZTEST_TESTSUITE_OUT_DIR");
  581|      2|  if (corpus_out_dir_chars) corpus_out_dir_ = corpus_out_dir_chars;
  ------------------
  |  Branch (581:7): [True: 0, False: 2]
  ------------------
  582|       |
  583|      2|  std::vector<double> weights = {100.};
  584|      2|  corpus_distribution_ =
  585|      2|      absl::discrete_distribution<>(weights.begin(), weights.end());
  586|      2|}
_ZN8fuzztest8internal18FuzzTestFuzzerImpl8TryParseENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  593|  15.9k|    absl::string_view data) {
  594|  15.9k|  auto ir_value = IRObject::FromString(data);
  595|  15.9k|  if (!ir_value) {
  ------------------
  |  Branch (595:7): [True: 1.27k, False: 14.6k]
  ------------------
  596|  1.27k|    return absl::InvalidArgumentError("Unexpected file format");
  597|  1.27k|  }
  598|  14.6k|  auto corpus_value = params_domain_.ParseCorpus(*ir_value);
  599|  14.6k|  if (!corpus_value) {
  ------------------
  |  Branch (599:7): [True: 1.77k, False: 12.8k]
  ------------------
  600|  1.77k|    return absl::InvalidArgumentError("Unexpected intermediate representation");
  601|  1.77k|  }
  602|  12.8k|  absl::Status is_valid = params_domain_.ValidateCorpusValue(*corpus_value);
  603|  12.8k|  if (!is_valid.ok()) {
  ------------------
  |  Branch (603:7): [True: 19, False: 12.8k]
  ------------------
  604|     19|    return Prefix(is_valid, "Invalid corpus value");
  605|     19|  }
  606|  12.8k|  return *corpus_value;
  607|  12.8k|}
_ZN8fuzztest8internal18FuzzTestFuzzerImpl10ShouldStopEv:
  882|  15.9k|bool FuzzTestFuzzerImpl::ShouldStop() {
  883|  15.9k|  if (runs_limit_.has_value() && stats_.runs >= *runs_limit_) return true;
  ------------------
  |  Branch (883:7): [True: 0, False: 15.9k]
  |  Branch (883:34): [True: 0, False: 0]
  ------------------
  884|  15.9k|  if (time_limit_ != absl::InfiniteFuture() && absl::Now() > time_limit_)
  ------------------
  |  Branch (884:7): [True: 0, False: 15.9k]
  |  Branch (884:48): [True: 0, False: 0]
  ------------------
  885|      0|    return true;
  886|  15.9k|  return runtime_.termination_requested();
  887|  15.9k|}
_ZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS1_5InputE:
 1020|  12.8k|    const Input& input) {
 1021|  12.8k|  ++stats_.runs;
 1022|  12.8k|  auto untyped_args = params_domain_.GetValue(input.args);
 1023|  12.8k|  Runtime::Args debug_args{input.args, params_domain_};
 1024|  12.8k|  runtime_.SetCurrentArgs(&debug_args);
 1025|       |
 1026|       |  // Reset and observe the coverage map and start tracing in
 1027|       |  // the tightest scope possible. In particular, we can't include the call
 1028|       |  // to GetValue in the scope as it will run user code.
 1029|  12.8k|  if (execution_coverage_ != nullptr) {
  ------------------
  |  Branch (1029:7): [True: 0, False: 12.8k]
  ------------------
 1030|      0|    execution_coverage_->ResetState();
 1031|      0|  }
 1032|  12.8k|  absl::Time start = absl::Now();
 1033|  12.8k|  runtime_.OnTestIterationStart(start);
 1034|       |  // Set tracing after absl::Now(), otherwise it will make
 1035|       |  // FuzzingModeTest.MinimizesDuplicatedCorpustest flaky because
 1036|       |  // randomness in absl::Now() being traced by cmp coverage.
 1037|  12.8k|  if (execution_coverage_ != nullptr) {
  ------------------
  |  Branch (1037:7): [True: 0, False: 12.8k]
  ------------------
 1038|      0|    execution_coverage_->SetIsTracing(true);
 1039|      0|  }
 1040|       |
 1041|  12.8k|  runtime_.SetSkippingRequested(false);
 1042|  12.8k|  fixture_driver_->SetUpIteration();
 1043|  12.8k|  if (!runtime_.skipping_requested()) {
  ------------------
  |  Branch (1043:7): [True: 12.8k, False: 0]
  ------------------
 1044|  12.8k|    fixture_driver_->Test(std::move(untyped_args));
 1045|  12.8k|  }
 1046|  12.8k|  fixture_driver_->TearDownIteration();
 1047|  12.8k|  if (execution_coverage_ != nullptr) {
  ------------------
  |  Branch (1047:7): [True: 0, False: 12.8k]
  ------------------
 1048|      0|    execution_coverage_->SetIsTracing(false);
 1049|      0|  }
 1050|  12.8k|  const absl::Duration run_time = absl::Now() - start;
 1051|       |
 1052|  12.8k|  bool new_coverage = false;
 1053|  12.8k|  if (execution_coverage_ != nullptr && !runtime_.skipping_requested()) {
  ------------------
  |  Branch (1053:7): [True: 0, False: 12.8k]
  |  Branch (1053:41): [True: 0, False: 0]
  ------------------
 1054|      0|    new_coverage = corpus_coverage_.Update(execution_coverage_);
 1055|      0|    stats_.max_stack_used =
 1056|      0|        std::max(stats_.max_stack_used, execution_coverage_->MaxStackUsed());
 1057|      0|  }
 1058|       |
 1059|  12.8k|  runtime_.OnTestIterationEnd();
 1060|  12.8k|  runtime_.UnsetCurrentArgs();
 1061|  12.8k|  return {new_coverage, run_time};
 1062|  12.8k|}
runtime.cc:_ZN8fuzztest8internalL15SetNewSigActionEiPFviP9siginfo_tPvEP9sigaction:
  500|     18|                            struct sigaction* old_sigact) {
  501|     18|  struct sigaction new_sigact = {};
  502|     18|  sigemptyset(&new_sigact.sa_mask);
  503|     18|  new_sigact.sa_sigaction = handler;
  504|       |
  505|       |  // We make use of the SA_ONSTACK flag so that signal handlers are executed on
  506|       |  // a separate stack. This is needed to properly handle cases where stack space
  507|       |  // is limited and the delivery of a signal needs to be properly handled.
  508|     18|  new_sigact.sa_flags = SA_SIGINFO | SA_ONSTACK;
  509|       |
  510|     18|  if (sigaction(signum, &new_sigact, old_sigact) == -1) {
  ------------------
  |  Branch (510:7): [True: 0, False: 18]
  ------------------
  511|      0|    fprintf(GetStderr(), "Error installing signal handler: %s\n",
  512|       |            strerror(errno));
  513|      0|    exit(1);
  514|      0|  }
  515|     18|}

_ZN8fuzztest8internal8FuzzTestC2ENS0_13BasicTestInfoEN4absl12lts_2024011612AnyInvocableIKFNSt3__110unique_ptrINS0_14FuzzTestFuzzerENS6_14default_deleteIS8_EEEERKS1_EEE:
   80|      2|      : test_info_(std::move(test_info)), make_(std::move(factory)) {}
_ZNK8fuzztest8internal8FuzzTest10suite_nameEv:
   82|      2|  const std::string& suite_name() const { return test_info_.suite_name; }
_ZNK8fuzztest8internal8FuzzTest9test_nameEv:
   83|      2|  const std::string& test_name() const { return test_info_.test_name; }
_ZNK8fuzztest8internal8FuzzTest9full_nameEv:
   84|      8|  std::string full_name() const {
   85|      8|    return absl::StrCat(test_info_.suite_name, ".", test_info_.test_name);
   86|      8|  }
_ZNK8fuzztest8internal8FuzzTest4fileEv:
   87|      2|  const std::string& file() const { return test_info_.file; }
_ZNK8fuzztest8internal8FuzzTest4lineEv:
   88|      2|  int line() const { return test_info_.line; }
_ZNK8fuzztest8internal8FuzzTest12uses_fixtureEv:
   89|      2|  bool uses_fixture() const { return test_info_.uses_fixture; }
_ZNK8fuzztest8internal8FuzzTest4makeEv:
   90|      2|  auto make() const { return make_(*this); }
_ZN8fuzztest8internal7Runtime8instanceEv:
  122|      8|  static Runtime& instance() {
  123|      8|    static auto* runtime = new Runtime();
  124|      8|    return *runtime;
  125|      8|  }
_ZN8fuzztest8internal7Runtime20SetSkippingRequestedEb:
  134|  12.8k|  void SetSkippingRequested(bool requested) {
  135|  12.8k|    skipping_requested_.store(requested, std::memory_order_relaxed);
  136|  12.8k|  }
_ZNK8fuzztest8internal7Runtime18skipping_requestedEv:
  138|  12.8k|  bool skipping_requested() const {
  139|  12.8k|    return skipping_requested_.load(std::memory_order_relaxed);
  140|  12.8k|  }
_ZNK8fuzztest8internal7Runtime21termination_requestedEv:
  154|  15.9k|  bool termination_requested() const {
  155|  15.9k|    return termination_requested_.load(std::memory_order_relaxed);
  156|  15.9k|  }
_ZN8fuzztest8internal7Runtime10SetRunModeENS_7RunModeE:
  160|      4|  void SetRunMode(RunMode run_mode) { run_mode_ = run_mode; }
_ZNK8fuzztest8internal7Runtime8run_modeEv:
  161|      2|  RunMode run_mode() const { return run_mode_; }
_ZN8fuzztest8internal7Runtime14EnableReporterEPKNS0_12RuntimeStatsEPFN4absl12lts_202401164TimeEvE:
  163|      2|  void EnableReporter(const RuntimeStats* stats, absl::Time (*clock_fn)()) {
  164|      2|    reporter_enabled_ = true;
  165|      2|    stats_ = stats;
  166|      2|    clock_fn_ = clock_fn;
  167|       |    // In case we have not installed them yet, do so now.
  168|      2|    InstallSignalHandlers(GetStderr());
  169|      2|    ResetCrashType();
  170|      2|  }
_ZN8fuzztest8internal7Runtime14SetCurrentTestEPKNS0_8FuzzTestEPKNS0_13ConfigurationE:
  179|  15.9k|                      const Configuration* configuration) {
  180|  15.9k|    current_test_ = test;
  181|  15.9k|    current_configuration_ = configuration;
  182|  15.9k|  }
_ZN8fuzztest8internal7Runtime20OnTestIterationStartERKN4absl12lts_202401164TimeE:
  183|  12.8k|  void OnTestIterationStart(const absl::Time& start_time) {
  184|  12.8k|    current_iteration_start_time_ = start_time;
  185|  12.8k|    test_iteration_started_ = true;
  186|  12.8k|  }
_ZN8fuzztest8internal7Runtime14SetCurrentArgsEPNS1_4ArgsE:
  189|  12.8k|  void SetCurrentArgs(Args* args) { current_args_ = args; }
_ZN8fuzztest8internal7Runtime16UnsetCurrentArgsEv:
  190|  12.8k|  void UnsetCurrentArgs() { current_args_ = nullptr; }
_ZN8fuzztest8internal7Runtime14ResetCrashTypeEv:
  207|      2|  void ResetCrashType() { crash_type_ = std::nullopt; }

_ZN8fuzztest8internal23GetFromEnvOrMakeSeedSeqERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS1_17basic_string_viewIcS4_EE:
   63|      2|                                      absl::string_view env_var) {
   64|      2|  const std::vector<uint32_t> seed_material =
   65|      2|      GetFromEnvOrMakeSeedMaterial(env_var);
   66|      2|  const std::string encoded_seed_material = EncodeSeedMaterial(seed_material);
   67|      2|  out << env_var << "=" << encoded_seed_material << '\n';
   68|      2|  return std::seed_seq(seed_material.begin(), seed_material.end());
   69|      2|}
_ZN8fuzztest8internal18EncodeSeedMaterialEN4absl12lts_202401164SpanIKjEE:
   71|      2|std::string EncodeSeedMaterial(absl::Span<const uint32_t> seed_material) {
   72|      2|  return absl::WebSafeBase64Escape(
   73|      2|      absl::string_view(reinterpret_cast<const char*>(seed_material.data()),
   74|      2|                        seed_material.size() * sizeof(uint32_t)));
   75|      2|}
seed_seq.cc:_ZN8fuzztest8internal12_GLOBAL__N_128GetFromEnvOrMakeSeedMaterialENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   47|      2|std::vector<uint32_t> GetFromEnvOrMakeSeedMaterial(absl::string_view env_var) {
   48|      2|  const char* encoded_seed_material = std::getenv(env_var.data());
   49|      2|  if (encoded_seed_material == nullptr) {
  ------------------
  |  Branch (49:7): [True: 2, False: 0]
  ------------------
   50|      2|    return MakeSeedMaterial();
   51|      2|  }
   52|      0|  std::optional<std::vector<uint32_t>> seed_material =
   53|      0|      DecodeSeedMaterial(encoded_seed_material);
   54|      0|  FUZZTEST_INTERNAL_CHECK_PRECONDITION(
  ------------------
  |  |   42|      0|  ((P) ? (void)0                                     \
  |  |  ------------------
  |  |  |  Branch (42:4): [True: 0, False: 0]
  |  |  ------------------
  |  |   43|      0|       : ::fuzztest::internal::Abort(                \
  |  |   44|      0|             __FILE__, __LINE__,                     \
  |  |   45|      0|             absl::StrCat("Failed precondition (", #P, "): ", __VA_ARGS__)))
  ------------------
   55|      0|      seed_material.has_value(),
   56|      0|      "Failed to decode seed material from the environment variable ", env_var);
   57|      0|  return *std::move(seed_material);
   58|      2|}
seed_seq.cc:_ZN8fuzztest8internal12_GLOBAL__N_116MakeSeedMaterialEv:
   37|      2|std::vector<uint32_t> MakeSeedMaterial() {
   38|      2|  absl::BitGen gen;
   39|      2|  static constexpr int kNumberOfEntropyBits = 256;
   40|      2|  std::vector<uint32_t> seed_material(kNumberOfEntropyBits /
   41|      2|                                      (8 * sizeof(uint32_t)));
   42|      2|  std::generate(seed_material.begin(), seed_material.end(),
   43|      2|                [&gen] { return absl::Uniform<uint32_t>(gen); });
   44|      2|  return seed_material;
   45|      2|}
seed_seq.cc:_ZZN8fuzztest8internal12_GLOBAL__N_116MakeSeedMaterialEvENK3$_0clEv:
   43|     16|                [&gen] { return absl::Uniform<uint32_t>(gen); });

_ZN8fuzztest8internal8IRObject10FromStringENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  331|  15.9k|std::optional<IRObject> IRObject::FromString(absl::string_view str) {
  332|  15.9k|  IRObject object;
  333|  15.9k|  if (IsInBinaryFormat(str)) {
  ------------------
  |  Branch (333:7): [True: 12.9k, False: 3.00k]
  ------------------
  334|  12.9k|    BinaryParseBuf buf = {str.data(), str.size()};
  335|  12.9k|    buf.Advance(kBinaryHeader.size());
  336|  12.9k|    if (!BinaryParse(object, buf, /*recursion_depth=*/0) || !buf.empty())
  ------------------
  |  Branch (336:9): [True: 24, False: 12.8k]
  |  Branch (336:61): [True: 1, False: 12.8k]
  ------------------
  337|     25|      return std::nullopt;
  338|  12.9k|  } else {
  339|  3.00k|    if (ReadToken(str) != kHeader) return std::nullopt;
  ------------------
  |  Branch (339:9): [True: 80, False: 2.92k]
  ------------------
  340|  2.92k|    if (!ParseImpl(object, str, /*recursion_depth=*/0) ||
  ------------------
  |  Branch (340:9): [True: 1.02k, False: 1.89k]
  |  Branch (340:9): [True: 1.17k, False: 1.74k]
  ------------------
  341|  1.89k|        !ReadToken(str).empty())
  ------------------
  |  Branch (341:9): [True: 143, False: 1.74k]
  ------------------
  342|  1.17k|      return std::nullopt;
  343|  2.92k|  }
  344|  14.6k|  return object;
  345|  15.9k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_116IsInBinaryFormatENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  302|  15.9k|bool IsInBinaryFormat(absl::string_view str) {
  303|       |  // Not using absl::string_view or std::memcmp because they could be
  304|       |  // instrumented and using them could pollute coverage.
  305|  15.9k|  return str.size() >= kBinaryHeader.size() &&
  ------------------
  |  Branch (305:10): [True: 15.8k, False: 50]
  ------------------
  306|  15.8k|         __builtin_memcmp(str.data(), kBinaryHeader.data(),
  ------------------
  |  Branch (306:10): [True: 12.9k, False: 2.95k]
  ------------------
  307|  15.8k|                          kBinaryHeader.size()) == 0;
  308|  15.9k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_114BinaryParseBuf7AdvanceEm:
  242|   182k|  inline void Advance(size_t s) {
  243|   182k|    if (s > size) s = size;
  ------------------
  |  Branch (243:9): [True: 0, False: 182k]
  ------------------
  244|   182k|    str += s;
  245|   182k|    size -= s;
  246|   182k|  }
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_111BinaryParseERNS0_8IRObjectERNS1_14BinaryParseBufEi:
  249|  78.9k|bool BinaryParse(IRObject& obj, BinaryParseBuf& buf, int recursion_depth) {
  250|  78.9k|  if (recursion_depth > kMaxParseRecursionDepth) return false;
  ------------------
  |  Branch (250:7): [True: 1, False: 78.9k]
  ------------------
  251|  78.9k|  if (buf.empty()) return false;
  ------------------
  |  Branch (251:7): [True: 6, False: 78.9k]
  ------------------
  252|  78.9k|  const auto h = static_cast<BinaryFormatHeader>(buf.str[0]);
  253|  78.9k|  buf.Advance(1);
  254|  78.9k|  switch (h) {
  ------------------
  |  Branch (254:11): [True: 78.9k, False: 8]
  ------------------
  255|  1.40k|    case BinaryFormatHeader::kEmpty: {
  ------------------
  |  Branch (255:5): [True: 1.40k, False: 77.5k]
  ------------------
  256|  1.40k|      return true;
  257|      0|    }
  258|  51.5k|    case BinaryFormatHeader::kUInt64: {
  ------------------
  |  Branch (258:5): [True: 51.5k, False: 27.4k]
  ------------------
  259|  51.5k|      if (buf.size < sizeof(uint64_t)) return false;
  ------------------
  |  Branch (259:11): [True: 0, False: 51.5k]
  ------------------
  260|  51.5k|      auto& t = obj.value.emplace<uint64_t>();
  261|  51.5k|      std::memcpy(&t, buf.str, sizeof(uint64_t));
  262|  51.5k|      buf.Advance(sizeof(uint64_t));
  263|  51.5k|      return true;
  264|  51.5k|    }
  265|      0|    case BinaryFormatHeader::kDouble: {
  ------------------
  |  Branch (265:5): [True: 0, False: 78.9k]
  ------------------
  266|      0|      if (buf.size < sizeof(double)) return false;
  ------------------
  |  Branch (266:11): [True: 0, False: 0]
  ------------------
  267|      0|      auto& t = obj.value.emplace<double>();
  268|      0|      std::memcpy(&t, buf.str, sizeof(t));
  269|      0|      buf.Advance(sizeof(double));
  270|      0|      return true;
  271|      0|    }
  272|  12.8k|    case BinaryFormatHeader::kString: {
  ------------------
  |  Branch (272:5): [True: 12.8k, False: 66.0k]
  ------------------
  273|  12.8k|      if (buf.size < sizeof(uint64_t)) return false;
  ------------------
  |  Branch (273:11): [True: 1, False: 12.8k]
  ------------------
  274|  12.8k|      uint64_t str_size;
  275|  12.8k|      std::memcpy(&str_size, buf.str, sizeof(str_size));
  276|  12.8k|      buf.Advance(sizeof(uint64_t));
  277|  12.8k|      if (buf.size < str_size) return false;
  ------------------
  |  Branch (277:11): [True: 3, False: 12.8k]
  ------------------
  278|  12.8k|      obj.value.emplace<std::string>() = {buf.str,
  279|  12.8k|                                          static_cast<size_t>(str_size)};
  280|  12.8k|      buf.Advance(str_size);
  281|  12.8k|      return true;
  282|  12.8k|    }
  283|  13.1k|    case BinaryFormatHeader::kObject: {
  ------------------
  |  Branch (283:5): [True: 13.1k, False: 65.8k]
  ------------------
  284|  13.1k|      if (buf.size < sizeof(uint64_t)) return false;
  ------------------
  |  Branch (284:11): [True: 0, False: 13.1k]
  ------------------
  285|  13.1k|      uint64_t vec_size;
  286|  13.1k|      std::memcpy(&vec_size, buf.str, sizeof(vec_size));
  287|  13.1k|      buf.Advance(sizeof(vec_size));
  288|       |      // This could happen for malformed inputs.
  289|  13.1k|      if (vec_size > buf.size) return false;
  ------------------
  |  Branch (289:11): [True: 5, False: 13.1k]
  ------------------
  290|  13.1k|      auto& v = obj.value.emplace<std::vector<IRObject>>();
  291|  13.1k|      v.reserve(vec_size);
  292|  78.9k|      for (uint64_t i = 0; i < vec_size; ++i) {
  ------------------
  |  Branch (292:28): [True: 66.0k, False: 12.8k]
  ------------------
  293|  66.0k|        if (!BinaryParse(v.emplace_back(), buf, recursion_depth + 1))
  ------------------
  |  Branch (293:13): [True: 262, False: 65.8k]
  ------------------
  294|    262|          return false;
  295|  66.0k|      }
  296|  12.8k|      return true;
  297|  13.1k|    }
  298|  78.9k|  }
  299|      8|  return false;
  300|  78.9k|}
serialization.cc:_ZNK8fuzztest8internal12_GLOBAL__N_114BinaryParseBuf5emptyEv:
  241|  91.8k|  inline bool empty() const { return size == 0; }
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_19ReadTokenERNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   78|   163k|absl::string_view ReadToken(absl::string_view& in) {
   79|   192k|  while (!in.empty() && std::isspace(in[0])) in.remove_prefix(1);
  ------------------
  |  Branch (79:10): [True: 190k, False: 2.42k]
  |  Branch (79:25): [True: 29.4k, False: 160k]
  ------------------
   80|   163k|  if (in.empty()) return in;
  ------------------
  |  Branch (80:7): [True: 2.42k, False: 160k]
  ------------------
   81|   160k|  size_t end = 1;
   82|   160k|  const auto is_literal = [](char c) {
   83|   160k|    return std::isalnum(c) != 0 || c == '+' || c == '-' || c == '.';
   84|   160k|  };
   85|   160k|  if (is_literal(in[0])) {
  ------------------
  |  Branch (85:7): [True: 82.0k, False: 78.8k]
  ------------------
   86|  2.08M|    while (end < in.size() && is_literal(in[end])) ++end;
  ------------------
  |  Branch (86:12): [True: 2.08M, False: 2.44k]
  |  Branch (86:31): [True: 2.00M, False: 79.6k]
  ------------------
   87|  82.0k|  } else if (in[0] == '"') {
  ------------------
  |  Branch (87:14): [True: 414, False: 78.4k]
  ------------------
   88|  22.2k|    while (end < in.size() && in[end] != '"') ++end;
  ------------------
  |  Branch (88:12): [True: 22.1k, False: 26]
  |  Branch (88:31): [True: 21.7k, False: 388]
  ------------------
   89|    414|    if (end < in.size()) ++end;
  ------------------
  |  Branch (89:9): [True: 388, False: 26]
  ------------------
   90|    414|  }
   91|   160k|  absl::string_view res = in.substr(0, end);
   92|   160k|  in.remove_prefix(end);
   93|   160k|  return res;
   94|   163k|}
serialization.cc:_ZZN8fuzztest8internal12_GLOBAL__N_19ReadTokenERNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEENK3$_0clEc:
   82|  2.24M|  const auto is_literal = [](char c) {
   83|  2.24M|    return std::isalnum(c) != 0 || c == '+' || c == '-' || c == '.';
  ------------------
  |  Branch (83:12): [True: 2.06M, False: 177k]
  |  Branch (83:36): [True: 2.44k, False: 175k]
  |  Branch (83:48): [True: 6.80k, False: 168k]
  |  Branch (83:60): [True: 9.95k, False: 158k]
  ------------------
   84|  2.24M|  };
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_19ParseImplERNS0_8IRObjectERNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEi:
  136|  29.9k|bool ParseImpl(IRObject& obj, absl::string_view& str, int recursion_depth) {
  137|  29.9k|  if (recursion_depth > kMaxParseRecursionDepth) return false;
  ------------------
  |  Branch (137:7): [True: 0, False: 29.9k]
  ------------------
  138|  29.9k|  absl::string_view key = ReadToken(str);
  139|  29.9k|  if (key.empty() || key == "}") {
  ------------------
  |  Branch (139:7): [True: 32, False: 29.8k]
  |  Branch (139:22): [True: 651, False: 29.2k]
  ------------------
  140|       |    // The object is empty. Put the token back and return.
  141|    683|    str = absl::string_view(key.data(), str.data() + str.size() - key.data());
  142|    683|    return true;
  143|    683|  }
  144|       |
  145|  29.2k|  if (key == "sub") {
  ------------------
  |  Branch (145:7): [True: 3.07k, False: 26.1k]
  ------------------
  146|  3.07k|    auto& v = obj.value.emplace<std::vector<IRObject>>();
  147|  27.0k|    do {
  148|  27.0k|      if (ReadToken(str) != "{") return false;
  ------------------
  |  Branch (148:11): [True: 52, False: 27.0k]
  ------------------
  149|  27.0k|      if (!ParseImpl(v.emplace_back(), str, recursion_depth + 1)) return false;
  ------------------
  |  Branch (149:11): [True: 2.18k, False: 24.8k]
  ------------------
  150|  24.8k|      if (ReadToken(str) != "}") return false;
  ------------------
  |  Branch (150:11): [True: 496, False: 24.3k]
  ------------------
  151|  24.3k|      key = ReadToken(str);
  152|  24.3k|    } while (key == "sub");
  ------------------
  |  Branch (152:14): [True: 23.9k, False: 341]
  ------------------
  153|       |    // We are done reading this repeated sub.
  154|       |    // Put the token back for the caller.
  155|    341|    str = absl::string_view(key.data(), str.data() + str.size() - key.data());
  156|    341|    return true;
  157|  26.1k|  } else {
  158|  26.1k|    if (ReadToken(str) != ":") return false;
  ------------------
  |  Branch (158:9): [True: 37, False: 26.1k]
  ------------------
  159|  26.1k|    auto value = ReadToken(str);
  160|  26.1k|    auto& v = obj.value;
  161|  26.1k|    if (key == "i") {
  ------------------
  |  Branch (161:9): [True: 974, False: 25.1k]
  ------------------
  162|    974|      return ReadScalar(v.emplace<uint64_t>(), value);
  163|  25.1k|    } else if (key == "d") {
  ------------------
  |  Branch (163:16): [True: 24.7k, False: 395]
  ------------------
  164|  24.7k|      return ReadScalar(v.emplace<double>(), value);
  165|  24.7k|    } else if (key == "s") {
  ------------------
  |  Branch (165:16): [True: 395, False: 0]
  ------------------
  166|    395|      return ReadScalar(v.emplace<std::string>(), value);
  167|    395|    } else {
  168|       |      // Unrecognized key
  169|      0|      return false;
  170|      0|    }
  171|  26.1k|  }
  172|  29.2k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_110ReadScalarERmNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   96|    974|bool ReadScalar(uint64_t& out, absl::string_view value) {
   97|    974|  return absl::SimpleAtoi(value, &out);
   98|    974|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_110ReadScalarERdNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  100|  24.7k|bool ReadScalar(double& out, absl::string_view value) {
  101|  24.7k|  return absl::SimpleAtod(value, &out);
  102|  24.7k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_110ReadScalarERNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EE:
  104|    395|bool ReadScalar(std::string& out, absl::string_view value) {
  105|    395|  if (value.empty() || value[0] != '"') return false;
  ------------------
  |  Branch (105:7): [True: 0, False: 395]
  |  Branch (105:24): [True: 2, False: 393]
  ------------------
  106|    393|  value.remove_prefix(1);
  107|       |
  108|    393|  if (value.empty() || value.back() != '"') return false;
  ------------------
  |  Branch (108:7): [True: 1, False: 392]
  |  Branch (108:24): [True: 6, False: 386]
  ------------------
  109|    386|  value.remove_suffix(1);
  110|       |
  111|  11.6k|  while (!value.empty()) {
  ------------------
  |  Branch (111:10): [True: 11.2k, False: 386]
  ------------------
  112|  11.2k|    if (value[0] != '\\') {
  ------------------
  |  Branch (112:9): [True: 7.90k, False: 3.31k]
  ------------------
  113|  7.90k|      out += value[0];
  114|  7.90k|      value.remove_prefix(1);
  115|  7.90k|    } else {
  116|  3.31k|      uint32_t v = 0;
  117|       |
  118|  3.31k|      if (value.size() < 4) return false;
  ------------------
  |  Branch (118:11): [True: 0, False: 3.31k]
  ------------------
  119|  13.2k|      for (int i = 1; i < 4; ++i) {
  ------------------
  |  Branch (119:23): [True: 9.93k, False: 3.31k]
  ------------------
  120|  9.93k|        if (value[i] < '0' || value[i] > '7') {
  ------------------
  |  Branch (120:13): [True: 0, False: 9.93k]
  |  Branch (120:31): [True: 0, False: 9.93k]
  ------------------
  121|      0|          return false;
  122|      0|        }
  123|  9.93k|        v = 8 * v + value[i] - '0';
  124|  9.93k|      }
  125|  3.31k|      if (v > 255) return false;
  ------------------
  |  Branch (125:11): [True: 0, False: 3.31k]
  ------------------
  126|       |
  127|  3.31k|      out += static_cast<char>(v);
  128|  3.31k|      value.remove_prefix(4);
  129|  3.31k|    }
  130|  11.2k|  }
  131|    386|  return true;
  132|    386|}

_ZNK8fuzztest8internal8IRObject4SubsEv:
  130|  14.6k|  std::optional<absl::Span<const IRObject>> Subs() const {
  131|  14.6k|    if (const auto* i = std::get_if<std::vector<IRObject>>(&value)) {
  ------------------
  |  Branch (131:21): [True: 13.0k, False: 1.60k]
  ------------------
  132|  13.0k|      return *i;
  133|  13.0k|    }
  134|       |    // The empty vector is serialized the same way as the monostate: nothing.
  135|       |    // Handle that case too.
  136|  1.60k|    if (std::holds_alternative<std::monostate>(value)) {
  ------------------
  |  Branch (136:9): [True: 2, False: 1.60k]
  ------------------
  137|      2|      return absl::Span<const IRObject>{};
  138|      2|    }
  139|  1.60k|    return std::nullopt;
  140|  1.60k|  }
_ZNK8fuzztest8internal8IRObject9GetScalarINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEDav:
   90|  12.8k|  auto GetScalar() const {
   91|       |    if constexpr (std::is_enum_v<T>) {
   92|       |      auto inner = GetScalar<std::underlying_type_t<T>>();
   93|       |      return inner ? std::optional(static_cast<T>(*inner)) : std::nullopt;
   94|       |    } else if constexpr (std::is_integral_v<T>) {
   95|       |      const uint64_t* i = std::get_if<uint64_t>(&value);
   96|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
   97|       |    } else if constexpr (std::is_same_v<float, T> ||
   98|       |                         std::is_same_v<double, T>) {
   99|       |      const double* i = std::get_if<double>(&value);
  100|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  101|  12.8k|    } else if constexpr (std::is_same_v<std::string, T>) {
  102|  12.8k|      std::optional<absl::string_view> out;
  103|  12.8k|      if (const auto* s = std::get_if<std::string>(&value)) {
  ------------------
  |  Branch (103:23): [True: 12.8k, False: 17]
  ------------------
  104|  12.8k|        out = *s;
  105|  12.8k|      }
  106|  12.8k|      return out;
  107|  12.8k|    }
  108|  12.8k|  }
_ZNK8fuzztest8internal8IRObject9GetScalarIjEEDav:
   90|  12.8k|  auto GetScalar() const {
   91|       |    if constexpr (std::is_enum_v<T>) {
   92|       |      auto inner = GetScalar<std::underlying_type_t<T>>();
   93|       |      return inner ? std::optional(static_cast<T>(*inner)) : std::nullopt;
   94|  12.8k|    } else if constexpr (std::is_integral_v<T>) {
   95|  12.8k|      const uint64_t* i = std::get_if<uint64_t>(&value);
   96|  12.8k|      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  ------------------
  |  Branch (96:14): [True: 12.8k, False: 23]
  ------------------
   97|       |    } else if constexpr (std::is_same_v<float, T> ||
   98|       |                         std::is_same_v<double, T>) {
   99|       |      const double* i = std::get_if<double>(&value);
  100|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  101|       |    } else if constexpr (std::is_same_v<std::string, T>) {
  102|       |      std::optional<absl::string_view> out;
  103|       |      if (const auto* s = std::get_if<std::string>(&value)) {
  104|       |        out = *s;
  105|       |      }
  106|       |      return out;
  107|       |    }
  108|  12.8k|  }
_ZNK8fuzztest8internal8IRObject8ToCorpusIjEENSt3__18optionalIT_EEv:
  219|  12.8k|  std::optional<T> ToCorpus() const {
  220|       |    if constexpr (std::is_const_v<T>) {
  221|       |      return ToCorpus<std::remove_const_t<T>>();
  222|       |    } else if constexpr (is_monostate_v<T>) {
  223|       |      if (std::holds_alternative<std::monostate>(value)) return T{};
  224|       |      return std::nullopt;
  225|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  226|       |      return *this;
  227|  12.8k|    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  228|  12.8k|      if (auto v = GetScalar<T>()) {
  ------------------
  |  Branch (228:16): [True: 12.8k, False: 23]
  ------------------
  229|  12.8k|        return static_cast<T>(*v);
  230|  12.8k|      }
  231|     23|      return std::nullopt;
  232|       |    } else if constexpr (is_variant_v<T>) {
  233|       |      auto elems = Subs();
  234|       |      if (!elems || elems->size() != 2) return std::nullopt;
  235|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  236|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  237|       |      return Switch<std::variant_size_v<T>>(
  238|       |          *index, [&](auto I) -> std::optional<T> {
  239|       |            auto inner =
  240|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  241|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  242|       |            return std::nullopt;
  243|       |          });
  244|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  245|       |                         std::is_same_v<T, absl::uint128>) {
  246|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  247|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  248|       |      }
  249|       |      return std::nullopt;
  250|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  251|       |      const std::string* v = std::get_if<std::string>(&value);
  252|       |      T out;
  253|       |      if (v && out.ParseFromString(*v)) return out;
  254|       |      return std::nullopt;
  255|       |    } else if constexpr (is_dynamic_container_v<T>) {
  256|       |      if constexpr (is_bytevector_v<T>) {
  257|       |        const std::string* v = std::get_if<std::string>(&value);
  258|       |        if (v) {
  259|       |          T out;
  260|       |          out.resize(v->size());
  261|       |          std::memcpy(out.data(), v->data(), v->size());
  262|       |          return out;
  263|       |        }
  264|       |      }
  265|       |
  266|       |      auto elems = Subs();
  267|       |      if (!elems) return std::nullopt;
  268|       |
  269|       |      T out;
  270|       |      for (const auto& elem : *elems) {
  271|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  272|       |          out.insert(out.end(), *std::move(inner));
  273|       |        } else {
  274|       |          return std::nullopt;
  275|       |        }
  276|       |      }
  277|       |      return out;
  278|       |    } else {
  279|       |      // Must be a tuple like object.
  280|       |      auto elems = Subs();
  281|       |      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  282|       |      auto it = elems->begin();
  283|       |      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  284|       |        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  285|       |      });
  286|       |      return std::apply(
  287|       |          [&](auto&... part) -> std::optional<T> {
  288|       |            if ((!part || ...)) return std::nullopt;
  289|       |            return T{*std::move(part)...};
  290|       |          },
  291|       |          parts);
  292|       |    }
  293|  12.8k|  }
_ZNK8fuzztest8internal8IRObject8ToCorpusINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEENS3_8optionalIT_EEv:
  219|  12.8k|  std::optional<T> ToCorpus() const {
  220|       |    if constexpr (std::is_const_v<T>) {
  221|       |      return ToCorpus<std::remove_const_t<T>>();
  222|       |    } else if constexpr (is_monostate_v<T>) {
  223|       |      if (std::holds_alternative<std::monostate>(value)) return T{};
  224|       |      return std::nullopt;
  225|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  226|       |      return *this;
  227|  12.8k|    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  228|  12.8k|      if (auto v = GetScalar<T>()) {
  ------------------
  |  Branch (228:16): [True: 12.8k, False: 17]
  ------------------
  229|  12.8k|        return static_cast<T>(*v);
  230|  12.8k|      }
  231|     17|      return std::nullopt;
  232|       |    } else if constexpr (is_variant_v<T>) {
  233|       |      auto elems = Subs();
  234|       |      if (!elems || elems->size() != 2) return std::nullopt;
  235|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  236|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  237|       |      return Switch<std::variant_size_v<T>>(
  238|       |          *index, [&](auto I) -> std::optional<T> {
  239|       |            auto inner =
  240|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  241|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  242|       |            return std::nullopt;
  243|       |          });
  244|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  245|       |                         std::is_same_v<T, absl::uint128>) {
  246|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  247|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  248|       |      }
  249|       |      return std::nullopt;
  250|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  251|       |      const std::string* v = std::get_if<std::string>(&value);
  252|       |      T out;
  253|       |      if (v && out.ParseFromString(*v)) return out;
  254|       |      return std::nullopt;
  255|       |    } else if constexpr (is_dynamic_container_v<T>) {
  256|       |      if constexpr (is_bytevector_v<T>) {
  257|       |        const std::string* v = std::get_if<std::string>(&value);
  258|       |        if (v) {
  259|       |          T out;
  260|       |          out.resize(v->size());
  261|       |          std::memcpy(out.data(), v->data(), v->size());
  262|       |          return out;
  263|       |        }
  264|       |      }
  265|       |
  266|       |      auto elems = Subs();
  267|       |      if (!elems) return std::nullopt;
  268|       |
  269|       |      T out;
  270|       |      for (const auto& elem : *elems) {
  271|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  272|       |          out.insert(out.end(), *std::move(inner));
  273|       |        } else {
  274|       |          return std::nullopt;
  275|       |        }
  276|       |      }
  277|       |      return out;
  278|       |    } else {
  279|       |      // Must be a tuple like object.
  280|       |      auto elems = Subs();
  281|       |      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  282|       |      auto it = elems->begin();
  283|       |      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  284|       |        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  285|       |      });
  286|       |      return std::apply(
  287|       |          [&](auto&... part) -> std::optional<T> {
  288|       |            if ((!part || ...)) return std::nullopt;
  289|       |            return T{*std::move(part)...};
  290|       |          },
  291|       |          parts);
  292|       |    }
  293|  12.8k|  }
_ZNK8fuzztest8internal8IRObject9GetScalarIbEEDav:
   90|  38.6k|  auto GetScalar() const {
   91|       |    if constexpr (std::is_enum_v<T>) {
   92|       |      auto inner = GetScalar<std::underlying_type_t<T>>();
   93|       |      return inner ? std::optional(static_cast<T>(*inner)) : std::nullopt;
   94|  38.6k|    } else if constexpr (std::is_integral_v<T>) {
   95|  38.6k|      const uint64_t* i = std::get_if<uint64_t>(&value);
   96|  38.6k|      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  ------------------
  |  Branch (96:14): [True: 38.6k, False: 68]
  ------------------
   97|       |    } else if constexpr (std::is_same_v<float, T> ||
   98|       |                         std::is_same_v<double, T>) {
   99|       |      const double* i = std::get_if<double>(&value);
  100|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  101|       |    } else if constexpr (std::is_same_v<std::string, T>) {
  102|       |      std::optional<absl::string_view> out;
  103|       |      if (const auto* s = std::get_if<std::string>(&value)) {
  104|       |        out = *s;
  105|       |      }
  106|       |      return out;
  107|       |    }
  108|  38.6k|  }
_ZNK8fuzztest8internal8IRObject8ToCorpusIbEENSt3__18optionalIT_EEv:
  219|  38.6k|  std::optional<T> ToCorpus() const {
  220|       |    if constexpr (std::is_const_v<T>) {
  221|       |      return ToCorpus<std::remove_const_t<T>>();
  222|       |    } else if constexpr (is_monostate_v<T>) {
  223|       |      if (std::holds_alternative<std::monostate>(value)) return T{};
  224|       |      return std::nullopt;
  225|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  226|       |      return *this;
  227|  38.6k|    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  228|  38.6k|      if (auto v = GetScalar<T>()) {
  ------------------
  |  Branch (228:16): [True: 38.6k, False: 68]
  ------------------
  229|  38.6k|        return static_cast<T>(*v);
  230|  38.6k|      }
  231|     68|      return std::nullopt;
  232|       |    } else if constexpr (is_variant_v<T>) {
  233|       |      auto elems = Subs();
  234|       |      if (!elems || elems->size() != 2) return std::nullopt;
  235|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  236|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  237|       |      return Switch<std::variant_size_v<T>>(
  238|       |          *index, [&](auto I) -> std::optional<T> {
  239|       |            auto inner =
  240|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  241|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  242|       |            return std::nullopt;
  243|       |          });
  244|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  245|       |                         std::is_same_v<T, absl::uint128>) {
  246|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  247|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  248|       |      }
  249|       |      return std::nullopt;
  250|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  251|       |      const std::string* v = std::get_if<std::string>(&value);
  252|       |      T out;
  253|       |      if (v && out.ParseFromString(*v)) return out;
  254|       |      return std::nullopt;
  255|       |    } else if constexpr (is_dynamic_container_v<T>) {
  256|       |      if constexpr (is_bytevector_v<T>) {
  257|       |        const std::string* v = std::get_if<std::string>(&value);
  258|       |        if (v) {
  259|       |          T out;
  260|       |          out.resize(v->size());
  261|       |          std::memcpy(out.data(), v->data(), v->size());
  262|       |          return out;
  263|       |        }
  264|       |      }
  265|       |
  266|       |      auto elems = Subs();
  267|       |      if (!elems) return std::nullopt;
  268|       |
  269|       |      T out;
  270|       |      for (const auto& elem : *elems) {
  271|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  272|       |          out.insert(out.end(), *std::move(inner));
  273|       |        } else {
  274|       |          return std::nullopt;
  275|       |        }
  276|       |      }
  277|       |      return out;
  278|       |    } else {
  279|       |      // Must be a tuple like object.
  280|       |      auto elems = Subs();
  281|       |      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  282|       |      auto it = elems->begin();
  283|       |      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  284|       |        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  285|       |      });
  286|       |      return std::apply(
  287|       |          [&](auto&... part) -> std::optional<T> {
  288|       |            if ((!part || ...)) return std::nullopt;
  289|       |            return T{*std::move(part)...};
  290|       |          },
  291|       |          parts);
  292|       |    }
  293|  38.6k|  }
_ZNK8fuzztest8internal8IRObject8ToCorpusINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS3_8optionalIT_EEv:
  219|  14.6k|  std::optional<T> ToCorpus() const {
  220|       |    if constexpr (std::is_const_v<T>) {
  221|       |      return ToCorpus<std::remove_const_t<T>>();
  222|       |    } else if constexpr (is_monostate_v<T>) {
  223|       |      if (std::holds_alternative<std::monostate>(value)) return T{};
  224|       |      return std::nullopt;
  225|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  226|       |      return *this;
  227|       |    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  228|       |      if (auto v = GetScalar<T>()) {
  229|       |        return static_cast<T>(*v);
  230|       |      }
  231|       |      return std::nullopt;
  232|       |    } else if constexpr (is_variant_v<T>) {
  233|       |      auto elems = Subs();
  234|       |      if (!elems || elems->size() != 2) return std::nullopt;
  235|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  236|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  237|       |      return Switch<std::variant_size_v<T>>(
  238|       |          *index, [&](auto I) -> std::optional<T> {
  239|       |            auto inner =
  240|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  241|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  242|       |            return std::nullopt;
  243|       |          });
  244|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  245|       |                         std::is_same_v<T, absl::uint128>) {
  246|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  247|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  248|       |      }
  249|       |      return std::nullopt;
  250|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  251|       |      const std::string* v = std::get_if<std::string>(&value);
  252|       |      T out;
  253|       |      if (v && out.ParseFromString(*v)) return out;
  254|       |      return std::nullopt;
  255|       |    } else if constexpr (is_dynamic_container_v<T>) {
  256|       |      if constexpr (is_bytevector_v<T>) {
  257|       |        const std::string* v = std::get_if<std::string>(&value);
  258|       |        if (v) {
  259|       |          T out;
  260|       |          out.resize(v->size());
  261|       |          std::memcpy(out.data(), v->data(), v->size());
  262|       |          return out;
  263|       |        }
  264|       |      }
  265|       |
  266|       |      auto elems = Subs();
  267|       |      if (!elems) return std::nullopt;
  268|       |
  269|       |      T out;
  270|       |      for (const auto& elem : *elems) {
  271|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  272|       |          out.insert(out.end(), *std::move(inner));
  273|       |        } else {
  274|       |          return std::nullopt;
  275|       |        }
  276|       |      }
  277|       |      return out;
  278|  14.6k|    } else {
  279|       |      // Must be a tuple like object.
  280|  14.6k|      auto elems = Subs();
  281|  14.6k|      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  ------------------
  |  Branch (281:11): [True: 1.60k, False: 13.0k]
  |  Branch (281:21): [True: 132, False: 12.8k]
  ------------------
  282|  12.8k|      auto it = elems->begin();
  283|  12.8k|      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  284|  12.8k|        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  285|  12.8k|      });
  286|  12.8k|      return std::apply(
  287|  12.8k|          [&](auto&... part) -> std::optional<T> {
  288|  12.8k|            if ((!part || ...)) return std::nullopt;
  289|  12.8k|            return T{*std::move(part)...};
  290|  12.8k|          },
  291|  12.8k|          parts);
  292|  14.6k|    }
  293|  14.6k|  }
_ZZNK8fuzztest8internal8IRObject8ToCorpusINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS3_8optionalIT_EEvENKUlDpT_E_clIJNS3_17integral_constantImLm0EEENSJ_ImLm1EEENSJ_ImLm2EEENSJ_ImLm3EEENSJ_ImLm4EEEEEEDaSG_:
  283|  12.8k|      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  284|  12.8k|        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  285|  12.8k|      });
_ZZNK8fuzztest8internal8IRObject8ToCorpusINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS3_8optionalIT_EEvENKUlDpRT_E_clIJNSC_ISA_EENSC_IbEESL_NSC_IjEESL_EEENSC_ISB_EESH_:
  287|  12.8k|          [&](auto&... part) -> std::optional<T> {
  288|   115k|            if ((!part || ...)) return std::nullopt;
  ------------------
  |  Branch (288:18): [True: 3, False: 12.8k]
  |  Branch (288:18): [True: 1, False: 12.8k]
  |  Branch (288:18): [True: 2, False: 12.8k]
  |  Branch (288:18): [True: 9, False: 12.8k]
  |  Branch (288:18): [True: 17, False: 12.8k]
  ------------------
  289|  12.8k|            return T{*std::move(part)...};
  290|  12.8k|          },
_ZN8fuzztest8internal8IRObjectC2Ev:
   76|   108k|  IRObject() = default;

_Z10SetMessageRKN4absl12lts_202401166StatusENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
    8|     38|absl::Status SetMessage(const absl::Status& status, absl::string_view message) {
    9|     38|  absl::Status result(status.code(), message);
   10|     38|  status.ForEachPayload(
   11|     38|      [&](absl::string_view type_url, const absl::Cord& payload) {
   12|     38|        result.SetPayload(type_url, payload);
   13|     38|      });
   14|     38|  return result;
   15|     38|}
_Z6PrefixRKN4absl12lts_202401166StatusENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
   17|  64.3k|absl::Status Prefix(const absl::Status& status, absl::string_view prefix) {
   18|  64.3k|  if (status.ok() || prefix.empty()) return status;
  ------------------
  |  Branch (18:7): [True: 64.2k, False: 38]
  |  Branch (18:22): [True: 0, False: 38]
  ------------------
   19|     38|  return SetMessage(status, absl::StrCat(prefix, " >> ", status.message()));
   20|  64.3k|}

_ZN7testing15AssertionResultC2IbEERKT_PNSt3__19enable_ifIXntsr3std14is_convertibleIS2_S0_EE5valueEvE4typeE:
  161|  1.24M|      : success_(success) {}

_ZN7testing7MessagelsIKcEERS0_RKPT_:
  182|     42|  inline Message& operator<<(T* const& pointer) {  // NOLINT
  183|     42|    if (pointer == nullptr) {
  ------------------
  |  Branch (183:9): [True: 0, False: 42]
  ------------------
  184|      0|      *ss_ << "(null)";
  185|     42|    } else {
  186|     42|      *ss_ << pointer;
  187|     42|    }
  188|     42|    return *this;
  189|     42|  }
_ZN7testing8internal18StreamableToStringIiEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKT_:
  243|      6|std::string StreamableToString(const T& streamable) {
  244|      6|  return (Message() << streamable).GetString();
  245|      6|}
_ZN7testing7MessagelsIiEERS0_RKT_:
  132|      6|  inline Message& operator<<(const T& val) {
  133|       |        // Some libraries overload << for STL containers.  These
  134|       |    // overloads are defined in the global namespace instead of ::std.
  135|       |    //
  136|       |    // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
  137|       |    // overloads are visible in either the std namespace or the global
  138|       |    // namespace, but not other namespaces, including the testing
  139|       |    // namespace which Google Test's Message class is in.
  140|       |    //
  141|       |    // To allow STL containers (and other types that has a << operator
  142|       |    // defined in the global namespace) to be used in Google Test
  143|       |    // assertions, testing::Message must access the custom << operator
  144|       |    // from the global namespace.  With this using declaration,
  145|       |    // overloads of << defined in the global namespace and those
  146|       |    // visible via Koenig lookup are both exposed in this function.
  147|      6|    using ::operator<<;
  148|      6|    *ss_ << val;
  149|      6|    return *this;
  150|      6|  }
_ZN7testing7MessagelsIA7_cEERS0_RKT_:
  132|     42|  inline Message& operator<<(const T& val) {
  133|       |        // Some libraries overload << for STL containers.  These
  134|       |    // overloads are defined in the global namespace instead of ::std.
  135|       |    //
  136|       |    // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
  137|       |    // overloads are visible in either the std namespace or the global
  138|       |    // namespace, but not other namespaces, including the testing
  139|       |    // namespace which Google Test's Message class is in.
  140|       |    //
  141|       |    // To allow STL containers (and other types that has a << operator
  142|       |    // defined in the global namespace) to be used in Google Test
  143|       |    // assertions, testing::Message must access the custom << operator
  144|       |    // from the global namespace.  With this using declaration,
  145|       |    // overloads of << defined in the global namespace and those
  146|       |    // visible via Koenig lookup are both exposed in this function.
  147|     42|    using ::operator<<;
  148|     42|    *ss_ << val;
  149|     42|    return *this;
  150|     42|  }
_ZN7testing7MessagelsIcEERS0_RKT_:
  132|    828|  inline Message& operator<<(const T& val) {
  133|       |        // Some libraries overload << for STL containers.  These
  134|       |    // overloads are defined in the global namespace instead of ::std.
  135|       |    //
  136|       |    // C++'s symbol lookup rule (i.e. Koenig lookup) says that these
  137|       |    // overloads are visible in either the std namespace or the global
  138|       |    // namespace, but not other namespaces, including the testing
  139|       |    // namespace which Google Test's Message class is in.
  140|       |    //
  141|       |    // To allow STL containers (and other types that has a << operator
  142|       |    // defined in the global namespace) to be used in Google Test
  143|       |    // assertions, testing::Message must access the custom << operator
  144|       |    // from the global namespace.  With this using declaration,
  145|       |    // overloads of << defined in the global namespace and those
  146|       |    // visible via Koenig lookup are both exposed in this function.
  147|    828|    using ::operator<<;
  148|    828|    *ss_ << val;
  149|    828|    return *this;
  150|    828|  }
_ZN7testing8internal18StreamableToStringIPcEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_:
  243|     32|std::string StreamableToString(const T& streamable) {
  244|     32|  return (Message() << streamable).GetString();
  245|     32|}
_ZN7testing7MessagelsIcEERS0_RKPT_:
  182|     32|  inline Message& operator<<(T* const& pointer) {  // NOLINT
  183|     32|    if (pointer == nullptr) {
  ------------------
  |  Branch (183:9): [True: 0, False: 32]
  ------------------
  184|      0|      *ss_ << "(null)";
  185|     32|    } else {
  186|     32|      *ss_ << pointer;
  187|     32|    }
  188|     32|    return *this;
  189|     32|  }

_ZNK7testing8TestInfo15test_suite_nameEv:
  541|      4|  const char* test_suite_name() const { return test_suite_name_.c_str(); }
_ZNK7testing8TestInfo4nameEv:
  549|      8|  const char* name() const { return name_.c_str(); }
_ZN7testing8UnitTest4implEv:
 1267|     48|  internal::UnitTestImpl* impl() { return impl_; }
_ZNK7testing9TestSuite14test_info_listEv:
  762|      2|  const std::vector<TestInfo*>& test_info_list() const {
  763|      2|    return test_info_list_;
  764|      2|  }
_ZN7testing10TestResult19set_start_timestampEl:
  468|      2|  void set_start_timestamp(TimeInMillis start) { start_timestamp_ = start; }
_ZN7testing9TestSuite13ShouldRunTestEPKNS_8TestInfoE:
  839|      4|  static bool ShouldRunTest(const TestInfo* test_info) {
  840|      4|    return test_info->should_run();
  841|      4|  }
_ZN7testing9TestSuite17RunSetUpTestSuiteEv:
  793|      2|  void RunSetUpTestSuite() {
  794|      2|    if (set_up_tc_ != nullptr) {
  ------------------
  |  Branch (794:9): [True: 0, False: 2]
  ------------------
  795|      0|      (*set_up_tc_)();
  796|      0|    }
  797|      2|  }
_ZNK7testing9TestSuite18ad_hoc_test_resultEv:
  752|      4|  const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; }
_ZN7testing8TestInfo15ClearTestResultEPS0_:
  639|      2|  static void ClearTestResult(TestInfo* test_info) {
  640|      2|    test_info->result_.Clear();
  641|      2|  }
_ZNK7testing9TestSuite4nameEv:
  695|      4|  const char* name() const { return name_.c_str(); }
_ZNK7testing9TestSuite10type_paramEv:
  699|      2|  const char* type_param() const {
  700|      2|    if (type_param_ != nullptr) return type_param_->c_str();
  ------------------
  |  Branch (700:9): [True: 0, False: 2]
  ------------------
  701|      2|    return nullptr;
  702|      2|  }
_ZNK7testing9TestSuite10should_runEv:
  705|      4|  bool should_run() const { return should_run_; }
_ZNK7testing8TestInfo10should_runEv:
  590|      4|  bool should_run() const { return should_run_; }
_ZNK7testing8TestInfo10type_paramEv:
  553|      2|  const char* type_param() const {
  554|      2|    if (type_param_ != nullptr) return type_param_->c_str();
  ------------------
  |  Branch (554:9): [True: 0, False: 2]
  ------------------
  555|      2|    return nullptr;
  556|      2|  }
_ZNK7testing8UnitTest4implEv:
 1268|     14|  const internal::UnitTestImpl* impl() const { return impl_; }
_ZN7testing9TestSuite20ClearTestSuiteResultEPS0_:
  781|      2|  static void ClearTestSuiteResult(TestSuite* test_suite) {
  782|      2|    test_suite->ClearResult();
  783|      2|  }
_ZN7testing9TestSuite14set_should_runEb:
  771|      4|  void set_should_run(bool should) { should_run_ = should; }
_ZN7testing9TestSuite14test_info_listEv:
  759|      6|  std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
_ZN7testing17TestEventListener16OnTestSuiteStartERKNS_9TestSuiteE:
  946|      2|  virtual void OnTestSuiteStart(const TestSuite& /*test_suite*/) {}

_ZN7testing8internal8FilePathC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   74|      2|  explicit FilePath(const std::string& pathname) : pathname_(pathname) {
   75|      2|    Normalize();
   76|      2|  }
_ZNK7testing8internal8FilePath7IsEmptyEv:
  118|      4|  bool IsEmpty() const { return pathname_.empty(); }
_ZN7testing8internal8FilePathC2Ev:
   71|      2|  FilePath() : pathname_("") {}
_ZN7testing8internal8FilePath3SetERKS1_:
   83|      2|  void Set(const FilePath& rhs) { pathname_ = rhs.pathname_; }

_ZN7testing8internal6RandomC2Ej:
  859|      2|  explicit Random(uint32_t seed) : state_(seed) {}
_ZN7testing8internal9GetTypeIdINS_4TestEEEPKvv:
  419|      2|TypeId GetTypeId() {
  420|       |  // The compiler is required to allocate a different
  421|       |  // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
  422|       |  // the template.  Therefore, the address of dummy_ is guaranteed to
  423|       |  // be unique.
  424|      2|  return &(TypeIdHelper<T>::dummy_);
  425|      2|}

_ZN7testing8internal30ParameterizedTestSuiteRegistry13RegisterTestsEv:
  732|      2|  void RegisterTests() {
  733|      2|    for (auto& test_suite_info : test_suite_infos_) {
  ------------------
  |  Branch (733:32): [True: 0, False: 2]
  ------------------
  734|      0|      test_suite_info->RegisterTests();
  735|      0|    }
  736|      2|  }
_ZN7testing8internal30ParameterizedTestSuiteRegistryC2Ev:
  694|      2|  ParameterizedTestSuiteRegistry() = default;

_ZN7testing8internal7ToUpperEc:
 1971|    828|inline char ToUpper(char ch) {
 1972|    828|  return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
 1973|    828|}
_ZN7testing8internal5posix6GetEnvEPKc:
 2122|     62|inline const char* GetEnv(const char* name) {
 2123|       |#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
 2124|       |    defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) ||               \
 2125|       |    defined(GTEST_OS_QURT)
 2126|       |  // We are on an embedded platform, which has no environment variables.
 2127|       |  static_cast<void>(name);  // To prevent 'unused argument' warning.
 2128|       |  return nullptr;
 2129|       |#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
 2130|       |  // Environment variables which we programmatically clear will be set to the
 2131|       |  // empty string rather than unset (NULL).  Handle that case.
 2132|       |  const char* const env = getenv(name);
 2133|       |  return (env != nullptr && env[0] != '\0') ? env : nullptr;
 2134|       |#else
 2135|     62|  return getenv(name);
 2136|     62|#endif
 2137|     62|}
_ZN7testing8internal5posix10StrCaseCmpEPKcS3_:
 2059|      2|inline int StrCaseCmp(const char* s1, const char* s2) {
 2060|      2|  return strcasecmp(s1, s2);
 2061|      2|}
_ZN7testing8internal5MutexC2Ev:
 1706|     10|  Mutex() {
 1707|     10|    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));
  ------------------
  |  | 1092|     10|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1092:17): [True: 0, False: 10]
  |  |  ------------------
  |  | 1093|     10|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1054|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1055|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1056|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1708|     10|    has_owner_ = false;
 1709|     10|  }
_ZN7testing8internal5posix6IsATTYEi:
 2065|      2|inline int IsATTY(int fd) {
 2066|       |  // DoIsATTY might change errno (for example ENOTTY in case you redirect stdout
 2067|       |  // to a file on Linux), which is unexpected, so save the previous value, and
 2068|       |  // restore it after the call.
 2069|      2|  int savedErrno = errno;
 2070|      2|  int isAttyValue = DoIsATTY(fd);
 2071|      2|  errno = savedErrno;
 2072|       |
 2073|      2|  return isAttyValue;
 2074|      2|}
_ZN7testing8internal5posix8DoIsATTYEi:
 2058|      2|inline int DoIsATTY(int fd) { return isatty(fd); }
_ZN7testing8internal5posix6FileNoEP8_IO_FILE:
 2021|      2|inline int FileNo(FILE* file) { return fileno(file); }
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEEC2ERKS3_:
 1761|      2|      : key_(CreateKey()),
 1762|      2|        default_factory_(new InstanceValueHolderFactory(value)) {}
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv:
 1793|      2|  static pthread_key_t CreateKey() {
 1794|      2|    pthread_key_t key;
 1795|       |    // When a thread exits, DeleteThreadLocalValue() will be called on
 1796|       |    // the object managed for that thread.
 1797|      2|    GTEST_CHECK_POSIX_SUCCESS_(
  ------------------
  |  | 1092|      2|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1092:17): [True: 0, False: 2]
  |  |  ------------------
  |  | 1093|      2|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1054|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1055|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1056|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1798|      2|        pthread_key_create(&key, &DeleteThreadLocalValue));
 1799|      2|    return key;
 1800|      2|  }
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE26InstanceValueHolderFactoryC2ERKS3_:
 1839|      2|    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE18ValueHolderFactoryC2Ev:
 1817|      2|    ValueHolderFactory() = default;
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEEC2Ev:
 1759|      2|      : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {}
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEE9CreateKeyEv:
 1793|      2|  static pthread_key_t CreateKey() {
 1794|      2|    pthread_key_t key;
 1795|       |    // When a thread exits, DeleteThreadLocalValue() will be called on
 1796|       |    // the object managed for that thread.
 1797|      2|    GTEST_CHECK_POSIX_SUCCESS_(
  ------------------
  |  | 1092|      2|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1092:17): [True: 0, False: 2]
  |  |  ------------------
  |  | 1093|      2|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1054|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1055|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1056|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1798|      2|        pthread_key_create(&key, &DeleteThreadLocalValue));
 1799|      2|    return key;
 1800|      2|  }
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEE25DefaultValueHolderFactoryC2Ev:
 1828|      2|    DefaultValueHolderFactory() = default;
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEE18ValueHolderFactoryC2Ev:
 1817|      2|    ValueHolderFactory() = default;

_ZN7testing16AssertionSuccessEv:
   66|  1.24M|AssertionResult AssertionSuccess() { return AssertionResult(true); }

_ZN7testing8internal29ParseInternalRunDeathTestFlagEv:
 1531|      2|InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
 1532|      2|  if (GTEST_FLAG_GET(internal_run_death_test).empty()) return nullptr;
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  |  Branch (1532:7): [True: 2, False: 0]
  ------------------
 1533|       |
 1534|       |  // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we
 1535|       |  // can use it here.
 1536|      0|  int line = -1;
 1537|      0|  int index = -1;
 1538|      0|  ::std::vector< ::std::string> fields;
 1539|      0|  SplitString(GTEST_FLAG_GET(internal_run_death_test), '|', &fields);
  ------------------
  |  | 2293|      0|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 1540|      0|  int write_fd = -1;
 1541|       |
 1542|       |#ifdef GTEST_OS_WINDOWS
 1543|       |
 1544|       |  unsigned int parent_process_id = 0;
 1545|       |  size_t write_handle_as_size_t = 0;
 1546|       |  size_t event_handle_as_size_t = 0;
 1547|       |
 1548|       |  if (fields.size() != 6 || !ParseNaturalNumber(fields[1], &line) ||
 1549|       |      !ParseNaturalNumber(fields[2], &index) ||
 1550|       |      !ParseNaturalNumber(fields[3], &parent_process_id) ||
 1551|       |      !ParseNaturalNumber(fields[4], &write_handle_as_size_t) ||
 1552|       |      !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {
 1553|       |    DeathTestAbort("Bad --gtest_internal_run_death_test flag: " +
 1554|       |                   GTEST_FLAG_GET(internal_run_death_test));
 1555|       |  }
 1556|       |  write_fd = GetStatusFileDescriptor(parent_process_id, write_handle_as_size_t,
 1557|       |                                     event_handle_as_size_t);
 1558|       |
 1559|       |#elif defined(GTEST_OS_FUCHSIA)
 1560|       |
 1561|       |  if (fields.size() != 3 || !ParseNaturalNumber(fields[1], &line) ||
 1562|       |      !ParseNaturalNumber(fields[2], &index)) {
 1563|       |    DeathTestAbort("Bad --gtest_internal_run_death_test flag: " +
 1564|       |                   GTEST_FLAG_GET(internal_run_death_test));
 1565|       |  }
 1566|       |
 1567|       |#else
 1568|       |
 1569|      0|  if (fields.size() != 4 || !ParseNaturalNumber(fields[1], &line) ||
  ------------------
  |  Branch (1569:7): [True: 0, False: 0]
  |  Branch (1569:29): [True: 0, False: 0]
  ------------------
 1570|      0|      !ParseNaturalNumber(fields[2], &index) ||
  ------------------
  |  Branch (1570:7): [True: 0, False: 0]
  ------------------
 1571|      0|      !ParseNaturalNumber(fields[3], &write_fd)) {
  ------------------
  |  Branch (1571:7): [True: 0, False: 0]
  ------------------
 1572|      0|    DeathTestAbort("Bad --gtest_internal_run_death_test flag: " +
 1573|      0|                   GTEST_FLAG_GET(internal_run_death_test));
  ------------------
  |  | 2293|      0|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 1574|      0|  }
 1575|       |
 1576|      0|#endif  // GTEST_OS_WINDOWS
 1577|       |
 1578|      0|  return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);
 1579|      2|}

_ZN7testing8internal8FilePath13GetCurrentDirEv:
  101|      2|FilePath FilePath::GetCurrentDir() {
  102|       |#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
  103|       |    defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) ||           \
  104|       |    defined(GTEST_OS_ESP32) || defined(GTEST_OS_XTENSA) ||                 \
  105|       |    defined(GTEST_OS_QURT) || defined(GTEST_OS_NXP_QN9090) ||              \
  106|       |    defined(GTEST_OS_NRF52)
  107|       |  // These platforms do not have a current directory, so we just return
  108|       |  // something reasonable.
  109|       |  return FilePath(kCurrentDirectoryString);
  110|       |#elif defined(GTEST_OS_WINDOWS)
  111|       |  char cwd[GTEST_PATH_MAX_ + 1] = {'\0'};
  112|       |  return FilePath(_getcwd(cwd, sizeof(cwd)) == nullptr ? "" : cwd);
  113|       |#else
  114|      2|  char cwd[GTEST_PATH_MAX_ + 1] = {'\0'};
  115|      2|  char* result = getcwd(cwd, sizeof(cwd));
  116|       |#ifdef GTEST_OS_NACL
  117|       |  // getcwd will likely fail in NaCl due to the sandbox, so return something
  118|       |  // reasonable. The user may have provided a shim implementation for getcwd,
  119|       |  // however, so fallback only when failure is detected.
  120|       |  return FilePath(result == nullptr ? kCurrentDirectoryString : cwd);
  121|       |#endif  // GTEST_OS_NACL
  122|      2|  return FilePath(result == nullptr ? "" : cwd);
  ------------------
  |  Branch (122:19): [True: 0, False: 2]
  ------------------
  123|      2|#endif  // GTEST_OS_WINDOWS_MOBILE
  124|      2|}
_ZN7testing8internal8FilePath9NormalizeEv:
  386|      2|void FilePath::Normalize() {
  387|      2|  auto out = pathname_.begin();
  388|       |
  389|      2|  auto i = pathname_.cbegin();
  390|       |#ifdef GTEST_OS_WINDOWS
  391|       |  // UNC paths are treated specially
  392|       |  if (pathname_.end() - i >= 3 && IsPathSeparator(*i) &&
  393|       |      IsPathSeparator(*(i + 1)) && !IsPathSeparator(*(i + 2))) {
  394|       |    *(out++) = kPathSeparator;
  395|       |    *(out++) = kPathSeparator;
  396|       |  }
  397|       |#endif
  398|     82|  while (i != pathname_.end()) {
  ------------------
  |  Branch (398:10): [True: 80, False: 2]
  ------------------
  399|     80|    const char character = *i;
  400|     80|    if (!IsPathSeparator(character)) {
  ------------------
  |  Branch (400:9): [True: 74, False: 6]
  ------------------
  401|     74|      *(out++) = character;
  402|     74|    } else if (out == pathname_.begin() || *std::prev(out) != kPathSeparator) {
  ------------------
  |  Branch (402:16): [True: 2, False: 4]
  |  Branch (402:16): [True: 6, False: 0]
  |  Branch (402:44): [True: 4, False: 0]
  ------------------
  403|      6|      *(out++) = kPathSeparator;
  404|      6|    }
  405|     80|    ++i;
  406|     80|  }
  407|       |
  408|      2|  pathname_.erase(out, pathname_.end());
  409|      2|}
gtest-all.cc:_ZN7testing8internalL15IsPathSeparatorEc:
   92|     80|static bool IsPathSeparator(char c) {
   93|       |#if GTEST_HAS_ALT_PATH_SEP_
   94|       |  return (c == kPathSeparator) || (c == kAlternatePathSeparator);
   95|       |#else
   96|     80|  return c == kPathSeparator;
   97|     80|#endif
   98|     80|}

_ZN7testing8internal15GetUnitTestImplEv:
  966|     34|inline UnitTestImpl* GetUnitTestImpl() {
  967|     34|  return UnitTest::GetInstance()->impl();
  968|     34|}
_ZN7testing8internal12UnitTestImpl17current_test_infoEv:
  766|      2|  TestInfo* current_test_info() { return current_test_info_; }
_ZN7testing8internal12UnitTestImpl9listenersEv:
  608|     12|  TestEventListeners* listeners() { return &listeners_; }
_ZN7testing8internal12UnitTestImpl33ignored_parameterized_test_suitesEv:
  701|      2|  std::set<std::string>* ignored_parameterized_test_suites() {
  702|      2|    return &ignored_parameterized_test_suites_;
  703|      2|  }
_ZN7testing8internal14GTestFlagSaverC2Ev:
  143|      2|  GTestFlagSaver() {
  144|      2|    also_run_disabled_tests_ = GTEST_FLAG_GET(also_run_disabled_tests);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  145|      2|    break_on_failure_ = GTEST_FLAG_GET(break_on_failure);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  146|      2|    catch_exceptions_ = GTEST_FLAG_GET(catch_exceptions);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  147|      2|    color_ = GTEST_FLAG_GET(color);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  148|      2|    death_test_style_ = GTEST_FLAG_GET(death_test_style);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  149|      2|    death_test_use_fork_ = GTEST_FLAG_GET(death_test_use_fork);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  150|      2|    fail_fast_ = GTEST_FLAG_GET(fail_fast);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  151|      2|    filter_ = GTEST_FLAG_GET(filter);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  152|      2|    internal_run_death_test_ = GTEST_FLAG_GET(internal_run_death_test);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  153|      2|    list_tests_ = GTEST_FLAG_GET(list_tests);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  154|      2|    output_ = GTEST_FLAG_GET(output);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  155|      2|    brief_ = GTEST_FLAG_GET(brief);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  156|      2|    print_time_ = GTEST_FLAG_GET(print_time);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  157|      2|    print_utf8_ = GTEST_FLAG_GET(print_utf8);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  158|      2|    random_seed_ = GTEST_FLAG_GET(random_seed);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  159|      2|    repeat_ = GTEST_FLAG_GET(repeat);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  160|      2|    recreate_environments_when_repeating_ =
  161|      2|        GTEST_FLAG_GET(recreate_environments_when_repeating);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  162|      2|    shuffle_ = GTEST_FLAG_GET(shuffle);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  163|      2|    stack_trace_depth_ = GTEST_FLAG_GET(stack_trace_depth);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  164|      2|    stream_result_to_ = GTEST_FLAG_GET(stream_result_to);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  165|      2|    throw_on_failure_ = GTEST_FLAG_GET(throw_on_failure);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  166|      2|  }
_ZNK7testing8internal12UnitTestImpl18current_test_suiteEv:
  765|      2|  const TestSuite* current_test_suite() const { return current_test_suite_; }
_ZN7testing8internal12UnitTestImpl11AddTestInfoEPFvvES3_PNS_8TestInfoE:
  674|      2|                   TestInfo* test_info) {
  675|      2|#if GTEST_HAS_FILE_SYSTEM
  676|       |    // In order to support thread-safe death tests, we need to
  677|       |    // remember the original working directory when the test program
  678|       |    // was first invoked.  We cannot do this in RUN_ALL_TESTS(), as
  679|       |    // the user may have changed the current directory before calling
  680|       |    // RUN_ALL_TESTS().  Therefore we capture the current directory in
  681|       |    // AddTestInfo(), which is called to register a TEST or TEST_F
  682|       |    // before main() is reached.
  683|      2|    if (original_working_dir_.IsEmpty()) {
  ------------------
  |  Branch (683:9): [True: 2, False: 0]
  ------------------
  684|      2|      original_working_dir_.Set(FilePath::GetCurrentDir());
  685|      4|      GTEST_CHECK_(!original_working_dir_.IsEmpty())
  ------------------
  |  | 1079|      2|  GTEST_AMBIGUOUS_ELSE_BLOCKER_               \
  |  |  ------------------
  |  |  |  |  712|      4|  switch (0)                          \
  |  |  |  |  713|      4|  case 0:                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (713:3): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  714|      2|  default:  // NOLINT
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (714:3): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1080|      2|  if (::testing::internal::IsTrue(condition)) \
  |  |  ------------------
  |  |  |  Branch (1080:7): [True: 2, False: 0]
  |  |  ------------------
  |  | 1081|      2|    ;                                         \
  |  | 1082|      2|  else                                        \
  |  | 1083|      2|    GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
  |  |  ------------------
  |  |  |  | 1054|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1055|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1056|      0|      .GetStream()
  |  |  ------------------
  ------------------
  686|      4|          << "Failed to get the current working directory.";
  687|      2|    }
  688|      2|#endif  // GTEST_HAS_FILE_SYSTEM
  689|       |
  690|      2|    GetTestSuite(test_info->test_suite_name(), test_info->type_param(),
  691|      2|                 set_up_tc, tear_down_tc)
  692|      2|        ->AddTestInfo(test_info);
  693|      2|  }
_ZN7testing8internal12UnitTestImpl21set_current_test_infoEPNS_8TestInfoE:
  720|      2|  void set_current_test_info(TestInfo* a_current_test_info) {
  721|      2|    current_test_info_ = a_current_test_info;
  722|      2|  }
_ZN7testing8internal12UnitTestImpl22set_current_test_suiteEPNS_9TestSuiteE:
  713|      2|  void set_current_test_suite(TestSuite* a_current_test_suite) {
  714|      2|    current_test_suite_ = a_current_test_suite;
  715|      2|  }
_ZNK7testing8internal12UnitTestImpl12GetTestSuiteEi:
  590|      6|  const TestSuite* GetTestSuite(int i) const {
  591|      6|    const int index = GetElementOr(test_suite_indices_, i, -1);
  592|      6|    return index < 0 ? nullptr : test_suites_[static_cast<size_t>(i)];
  ------------------
  |  Branch (592:12): [True: 0, False: 6]
  ------------------
  593|      6|  }
_ZN7testing8internal12UnitTestImpl19GetMutableSuiteCaseEi:
  602|      2|  TestSuite* GetMutableSuiteCase(int i) {
  603|      2|    const int index = GetElementOr(test_suite_indices_, i, -1);
  604|      2|    return index < 0 ? nullptr : test_suites_[static_cast<size_t>(index)];
  ------------------
  |  Branch (604:12): [True: 0, False: 2]
  ------------------
  605|      2|  }
_ZN7testing8internal12UnitTestImpl20set_catch_exceptionsEb:
  842|      2|  void set_catch_exceptions(bool value) { catch_exceptions_ = value; }
_ZN7testing8internal12UnitTestImpl34InitDeathTestSubprocessControlInfoEv:
  782|      2|  void InitDeathTestSubprocessControlInfo() {
  783|      2|    internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
  784|      2|  }
_ZN7testing8internal21GetRandomSeedFromFlagEi:
  113|      2|inline int GetRandomSeedFromFlag(int32_t random_seed_flag) {
  114|      2|  const unsigned int raw_seed =
  115|      2|      (random_seed_flag == 0) ? static_cast<unsigned int>(GetTimeInMillis())
  ------------------
  |  Branch (115:7): [True: 2, False: 0]
  ------------------
  116|      2|                              : static_cast<unsigned int>(random_seed_flag);
  117|       |
  118|       |  // Normalizes the actual seed to range [1, kMaxRandomSeed] such that
  119|       |  // it's easy to type.
  120|      2|  const int normalized_seed =
  121|      2|      static_cast<int>((raw_seed - 1U) %
  122|      2|                       static_cast<unsigned int>(kMaxRandomSeed)) +
  123|      2|      1;
  124|      2|  return normalized_seed;
  125|      2|}
_ZN7testing8internal12UnitTestImpl23ClearNonAdHocTestResultEv:
  739|      2|  void ClearNonAdHocTestResult() {
  740|      2|    ForEach(test_suites_, TestSuite::ClearTestSuiteResult);
  741|      2|  }
_ZN7testing8internal18OsStackTraceGetterC2Ev:
  439|      2|  OsStackTraceGetter() = default;
_ZN7testing8internal27OsStackTraceGetterInterfaceC2Ev:
  410|      2|  OsStackTraceGetterInterface() = default;
_ZN7testing8internal12GetElementOrIiEET_RKNSt3__16vectorIS2_NS3_9allocatorIS2_EEEEiS2_:
  294|     12|inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
  295|     12|  return (i < 0 || i >= static_cast<int>(v.size())) ? default_value
  ------------------
  |  Branch (295:11): [True: 0, False: 12]
  |  Branch (295:20): [True: 0, False: 12]
  ------------------
  296|     12|                                                    : v[static_cast<size_t>(i)];
  297|     12|}
_ZN7testing8internal7ForEachINSt3__16vectorIPNS_9TestSuiteENS2_9allocatorIS5_EEEEPFvS5_EEEvRKT_T0_:
  287|      2|void ForEach(const Container& c, Functor functor) {
  288|      2|  std::for_each(c.begin(), c.end(), functor);
  289|      2|}
_ZN7testing8internal7CountIfINSt3__16vectorIPNS_9TestSuiteENS2_9allocatorIS5_EEEEPFbPKS4_EEEiRKT_T0_:
  275|      2|inline int CountIf(const Container& c, Predicate predicate) {
  276|       |  // Implemented as an explicit loop since std::count_if() in libCstd on
  277|       |  // Solaris has a non-standard signature.
  278|      2|  int count = 0;
  279|      4|  for (auto it = c.begin(); it != c.end(); ++it) {
  ------------------
  |  Branch (279:29): [True: 2, False: 2]
  ------------------
  280|      2|    if (predicate(*it)) ++count;
  ------------------
  |  Branch (280:9): [True: 2, False: 0]
  ------------------
  281|      2|  }
  282|      2|  return count;
  283|      2|}
_ZN7testing8internal7CountIfINSt3__16vectorINS_14TestPartResultENS2_9allocatorIS4_EEEEPFbRKS4_EEEiRKT_T0_:
  275|     14|inline int CountIf(const Container& c, Predicate predicate) {
  276|       |  // Implemented as an explicit loop since std::count_if() in libCstd on
  277|       |  // Solaris has a non-standard signature.
  278|     14|  int count = 0;
  279|     14|  for (auto it = c.begin(); it != c.end(); ++it) {
  ------------------
  |  Branch (279:29): [True: 0, False: 14]
  ------------------
  280|      0|    if (predicate(*it)) ++count;
  ------------------
  |  Branch (280:9): [True: 0, False: 0]
  ------------------
  281|      0|  }
  282|     14|  return count;
  283|     14|}
_ZNK7testing8internal12UnitTestImpl16catch_exceptionsEv:
  835|     10|  bool catch_exceptions() const { return catch_exceptions_; }
_ZN7testing8internal7CountIfINSt3__16vectorIPNS_8TestInfoENS2_9allocatorIS5_EEEEPFbPKS4_EEEiRKT_T0_:
  275|      4|inline int CountIf(const Container& c, Predicate predicate) {
  276|       |  // Implemented as an explicit loop since std::count_if() in libCstd on
  277|       |  // Solaris has a non-standard signature.
  278|      4|  int count = 0;
  279|      8|  for (auto it = c.begin(); it != c.end(); ++it) {
  ------------------
  |  Branch (279:29): [True: 4, False: 4]
  ------------------
  280|      4|    if (predicate(*it)) ++count;
  ------------------
  |  Branch (280:9): [True: 4, False: 0]
  ------------------
  281|      4|  }
  282|      4|  return count;
  283|      4|}
_ZN7testing8internal7ForEachINSt3__16vectorIPNS_8TestInfoENS2_9allocatorIS5_EEEEPFvS5_EEEvRKT_T0_:
  287|      2|void ForEach(const Container& c, Functor functor) {
  288|      2|  std::for_each(c.begin(), c.end(), functor);
  289|      2|}
_ZN7testing8internal7ForEachINSt3__16vectorIPNS_11EnvironmentENS2_9allocatorIS5_EEEEPFvS5_EEEvRKT_T0_:
  287|      2|void ForEach(const Container& c, Functor functor) {
  288|      2|  std::for_each(c.begin(), c.end(), functor);
  289|      2|}

_ZN7testing8internal16BoolFromGTestEnvEPKcb:
 1324|     24|bool BoolFromGTestEnv(const char* flag, bool default_value) {
 1325|       |#if defined(GTEST_GET_BOOL_FROM_ENV_)
 1326|       |  return GTEST_GET_BOOL_FROM_ENV_(flag, default_value);
 1327|       |#else
 1328|     24|  const std::string env_var = FlagToEnvVar(flag);
 1329|     24|  const char* const string_value = posix::GetEnv(env_var.c_str());
 1330|     24|  return string_value == nullptr ? default_value
  ------------------
  |  Branch (1330:10): [True: 24, False: 0]
  ------------------
 1331|     24|                                 : strcmp(string_value, "0") != 0;
 1332|     24|#endif  // defined(GTEST_GET_BOOL_FROM_ENV_)
 1333|     24|}
_ZN7testing8internal17Int32FromGTestEnvEPKci:
 1338|      6|int32_t Int32FromGTestEnv(const char* flag, int32_t default_value) {
 1339|       |#if defined(GTEST_GET_INT32_FROM_ENV_)
 1340|       |  return GTEST_GET_INT32_FROM_ENV_(flag, default_value);
 1341|       |#else
 1342|      6|  const std::string env_var = FlagToEnvVar(flag);
 1343|      6|  const char* const string_value = posix::GetEnv(env_var.c_str());
 1344|      6|  if (string_value == nullptr) {
  ------------------
  |  Branch (1344:7): [True: 6, False: 0]
  ------------------
 1345|       |    // The environment variable is not set.
 1346|      6|    return default_value;
 1347|      6|  }
 1348|       |
 1349|      0|  int32_t result = default_value;
 1350|      0|  if (!ParseInt32(Message() << "Environment variable " << env_var, string_value,
  ------------------
  |  Branch (1350:7): [True: 0, False: 0]
  ------------------
 1351|      0|                  &result)) {
 1352|      0|    printf("The default value %s is used.\n",
 1353|      0|           (Message() << default_value).GetString().c_str());
 1354|      0|    fflush(stdout);
 1355|      0|    return default_value;
 1356|      0|  }
 1357|       |
 1358|      0|  return result;
 1359|      0|#endif  // defined(GTEST_GET_INT32_FROM_ENV_)
 1360|      0|}
_ZN7testing8internal25OutputFlagAlsoCheckEnvVarEv:
 1370|      2|std::string OutputFlagAlsoCheckEnvVar() {
 1371|      2|  std::string default_value_for_output_flag = "";
 1372|      2|  const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE");
 1373|      2|  if (nullptr != xml_output_file_env) {
  ------------------
  |  Branch (1373:7): [True: 0, False: 2]
  ------------------
 1374|      0|    default_value_for_output_flag = std::string("xml:") + xml_output_file_env;
 1375|      0|  }
 1376|      2|  return default_value_for_output_flag;
 1377|      2|}
_ZN7testing8internal18StringFromGTestEnvEPKcS2_:
 1381|     12|const char* StringFromGTestEnv(const char* flag, const char* default_value) {
 1382|       |#if defined(GTEST_GET_STRING_FROM_ENV_)
 1383|       |  return GTEST_GET_STRING_FROM_ENV_(flag, default_value);
 1384|       |#else
 1385|     12|  const std::string env_var = FlagToEnvVar(flag);
 1386|     12|  const char* const value = posix::GetEnv(env_var.c_str());
 1387|     12|  return value == nullptr ? default_value : value;
  ------------------
  |  Branch (1387:10): [True: 12, False: 0]
  ------------------
 1388|     12|#endif  // defined(GTEST_GET_STRING_FROM_ENV_)
 1389|     12|}
gtest-all.cc:_ZN7testing8internalL12FlagToEnvVarEPKc:
 1267|     42|static std::string FlagToEnvVar(const char* flag) {
 1268|     42|  const std::string full_flag =
 1269|     42|      (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
  ------------------
  |  |  331|     42|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
 1270|       |
 1271|     42|  Message env_var;
 1272|    870|  for (size_t i = 0; i != full_flag.length(); i++) {
  ------------------
  |  Branch (1272:22): [True: 828, False: 42]
  ------------------
 1273|    828|    env_var << ToUpper(full_flag.c_str()[i]);
 1274|    828|  }
 1275|       |
 1276|     42|  return env_var.GetString();
 1277|     42|}

_ZN7testing8internal33GetIgnoredParameterizedTestSuitesEv:
  502|      2|std::set<std::string>* GetIgnoredParameterizedTestSuites() {
  503|      2|  return UnitTest::GetInstance()->impl()->ignored_parameterized_test_suites();
  504|      2|}
_ZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEv:
  585|      2|void TypeParameterizedTestSuiteRegistry::CheckForInstantiations() {
  586|      2|  const auto& ignored = *GetIgnoredParameterizedTestSuites();
  587|      2|  for (const auto& testcase : suites_) {
  ------------------
  |  Branch (587:29): [True: 0, False: 2]
  ------------------
  588|      0|    if (testcase.second.instantiated) continue;
  ------------------
  |  Branch (588:9): [True: 0, False: 0]
  ------------------
  589|      0|    if (ignored.find(testcase.first) != ignored.end()) continue;
  ------------------
  |  Branch (589:9): [True: 0, False: 0]
  ------------------
  590|       |
  591|      0|    std::string message =
  592|      0|        "Type parameterized test suite " + testcase.first +
  593|      0|        " is defined via REGISTER_TYPED_TEST_SUITE_P, but never instantiated "
  594|      0|        "via INSTANTIATE_TYPED_TEST_SUITE_P. None of the test cases will run."
  595|      0|        "\n\n"
  596|      0|        "Ideally, TYPED_TEST_P definitions should only ever be included as "
  597|      0|        "part of binaries that intend to use them. (As opposed to, for "
  598|      0|        "example, being placed in a library that may be linked in to get other "
  599|      0|        "utilities.)"
  600|      0|        "\n\n"
  601|      0|        "To suppress this error for this test suite, insert the following line "
  602|      0|        "(in a non-header) in the namespace it is defined in:"
  603|      0|        "\n\n"
  604|      0|        "GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(" +
  605|      0|        testcase.first + ");";
  606|       |
  607|      0|    std::string full_name =
  608|      0|        "UninstantiatedTypeParameterizedTestSuite<" + testcase.first + ">";
  609|      0|    RegisterTest(  //
  610|      0|        "GoogleTestVerification", full_name.c_str(),
  611|      0|        nullptr,  // No type parameter.
  612|      0|        nullptr,  // No value parameter.
  613|      0|        testcase.second.code_location.file.c_str(),
  614|      0|        testcase.second.code_location.line, [message, testcase] {
  615|      0|          return new FailureTest(testcase.second.code_location, message,
  616|      0|                                 kErrorOnUninstantiatedTypeParameterizedTest);
  617|      0|        });
  618|      0|  }
  619|      2|}
_ZN7testing8internal8GetArgvsEv:
  624|      4|::std::vector<std::string> GetArgvs() {
  625|       |#if defined(GTEST_CUSTOM_GET_ARGVS_)
  626|       |  // GTEST_CUSTOM_GET_ARGVS_() may return a container of std::string or
  627|       |  // ::string. This code converts it to the appropriate type.
  628|       |  const auto& custom = GTEST_CUSTOM_GET_ARGVS_();
  629|       |  return ::std::vector<std::string>(custom.begin(), custom.end());
  630|       |#else   // defined(GTEST_CUSTOM_GET_ARGVS_)
  631|      4|  return g_argvs;
  632|      4|#endif  // defined(GTEST_CUSTOM_GET_ARGVS_)
  633|      4|}
_ZN7testing8internal15UnitTestOptions15GetOutputFormatEv:
  654|      2|std::string UnitTestOptions::GetOutputFormat() {
  655|      2|  std::string s = GTEST_FLAG_GET(output);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  656|      2|  const char* const gtest_output_flag = s.c_str();
  657|      2|  const char* const colon = strchr(gtest_output_flag, ':');
  658|      2|  return (colon == nullptr)
  ------------------
  |  Branch (658:10): [True: 2, False: 0]
  ------------------
  659|      2|             ? std::string(gtest_output_flag)
  660|      2|             : std::string(gtest_output_flag,
  661|      0|                           static_cast<size_t>(colon - gtest_output_flag));
  662|      2|}
_ZN7testing8internal13GetTestTypeIdEv:
  962|      2|TypeId GetTestTypeId() { return GetTypeId<Test>(); }
_ZN7testing8internal35DefaultGlobalTestPartResultReporterC2EPNS0_12UnitTestImplE:
 1025|      2|    : unit_test_(unit_test) {}
_ZN7testing8internal38DefaultPerThreadTestPartResultReporterC2EPNS0_12UnitTestImplE:
 1035|      2|    : unit_test_(unit_test) {}
_ZNK7testing8internal12UnitTestImpl22total_test_suite_countEv:
 1079|      6|int UnitTestImpl::total_test_suite_count() const {
 1080|      6|  return static_cast<int>(test_suites_.size());
 1081|      6|}
_ZNK7testing8internal12UnitTestImpl23test_suite_to_run_countEv:
 1085|      2|int UnitTestImpl::test_suite_to_run_count() const {
 1086|      2|  return CountIf(test_suites_, ShouldRunTestSuite);
 1087|      2|}
_ZNK7testing8internal12UnitTestImpl17test_to_run_countEv:
 1126|      2|int UnitTestImpl::test_to_run_count() const {
 1127|      2|  return SumOverTestSuiteList(test_suites_, &TestSuite::test_to_run_count);
 1128|      2|}
_ZN7testing8internal15GetTimeInMillisEv:
 1174|      8|TimeInMillis GetTimeInMillis() {
 1175|      8|  return std::chrono::duration_cast<std::chrono::milliseconds>(
 1176|      8|             std::chrono::system_clock::now() -
 1177|      8|             std::chrono::system_clock::from_time_t(0))
 1178|      8|      .count();
 1179|      8|}
_ZN7testing8internal6String13CStringEqualsEPKcS3_:
 1224|      2|bool String::CStringEquals(const char* lhs, const char* rhs) {
 1225|      2|  if (lhs == nullptr) return rhs == nullptr;
  ------------------
  |  Branch (1225:7): [True: 0, False: 2]
  ------------------
 1226|       |
 1227|      2|  if (rhs == nullptr) return false;
  ------------------
  |  Branch (1227:7): [True: 0, False: 2]
  ------------------
 1228|       |
 1229|      2|  return strcmp(lhs, rhs) == 0;
 1230|      2|}
_ZN7testing8internal11SplitStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEcPNS1_6vectorIS7_NS5_IS7_EEEE:
 1252|      8|                 ::std::vector< ::std::string>* dest) {
 1253|      8|  ::std::vector< ::std::string> parsed;
 1254|      8|  ::std::string::size_type pos = 0;
 1255|     12|  while (::testing::internal::AlwaysTrue()) {
  ------------------
  |  Branch (1255:10): [True: 12, False: 0]
  ------------------
 1256|     12|    const ::std::string::size_type colon = str.find(delimiter, pos);
 1257|     12|    if (colon == ::std::string::npos) {
  ------------------
  |  Branch (1257:9): [True: 8, False: 4]
  ------------------
 1258|      8|      parsed.push_back(str.substr(pos));
 1259|      8|      break;
 1260|      8|    } else {
 1261|      4|      parsed.push_back(str.substr(pos, colon - pos));
 1262|      4|      pos = colon + 1;
 1263|      4|    }
 1264|     12|  }
 1265|      8|  dest->swap(parsed);
 1266|      8|}
_ZN7testing7MessageC2Ev:
 1275|    122|Message::Message() : ss_(new ::std::stringstream) {
 1276|       |  // By default, we want there to be enough precision when printing
 1277|       |  // a double to a Message.
 1278|    122|  *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);
 1279|    122|}
_ZNK7testing7Message9GetStringEv:
 1301|    122|std::string Message::GetString() const {
 1302|    122|  return internal::StringStreamToString(ss_.get());
 1303|    122|}
_ZN7testing8internal6String28CaseInsensitiveCStringEqualsEPKcS3_:
 2131|      2|bool String::CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
 2132|      2|  if (lhs == nullptr) return rhs == nullptr;
  ------------------
  |  Branch (2132:7): [True: 0, False: 2]
  ------------------
 2133|      2|  if (rhs == nullptr) return false;
  ------------------
  |  Branch (2133:7): [True: 0, False: 2]
  ------------------
 2134|      2|  return posix::StrCaseCmp(lhs, rhs) == 0;
 2135|      2|}
_ZN7testing8internal20StringStreamToStringEPNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2216|    122|std::string StringStreamToString(::std::stringstream* ss) {
 2217|    122|  const ::std::string& str = ss->str();
 2218|    122|  const char* const start = str.c_str();
 2219|    122|  const char* const end = start + str.length();
 2220|       |
 2221|    122|  std::string result;
 2222|    122|  result.reserve(static_cast<size_t>(2 * (end - start)));
 2223|  3.03k|  for (const char* ch = start; ch != end; ++ch) {
  ------------------
  |  Branch (2223:32): [True: 2.91k, False: 122]
  ------------------
 2224|  2.91k|    if (*ch == '\0') {
  ------------------
  |  Branch (2224:9): [True: 0, False: 2.91k]
  ------------------
 2225|      0|      result += "\\0";  // Replaces NUL with "\\0";
 2226|  2.91k|    } else {
 2227|  2.91k|      result += *ch;
 2228|  2.91k|    }
 2229|  2.91k|  }
 2230|       |
 2231|    122|  return result;
 2232|    122|}
_ZN7testing10TestResultC2Ev:
 2254|      6|    : death_test_count_(0), start_timestamp_(0), elapsed_time_(0) {}
_ZN7testing10TestResult5ClearEv:
 2400|      4|void TestResult::Clear() {
 2401|      4|  test_part_results_.clear();
 2402|      4|  test_properties_.clear();
 2403|      4|  death_test_count_ = 0;
 2404|      4|  elapsed_time_ = 0;
 2405|      4|}
_ZNK7testing10TestResult7SkippedEv:
 2413|      8|bool TestResult::Skipped() const {
 2414|      8|  return !Failed() && CountIf(test_part_results_, TestPartSkipped) > 0;
  ------------------
  |  Branch (2414:10): [True: 8, False: 0]
  |  Branch (2414:23): [True: 0, False: 8]
  ------------------
 2415|      8|}
_ZNK7testing10TestResult6FailedEv:
 2418|     10|bool TestResult::Failed() const {
 2419|     10|  for (int i = 0; i < total_part_count(); ++i) {
  ------------------
  |  Branch (2419:19): [True: 0, False: 10]
  ------------------
 2420|      0|    if (GetTestPartResult(i).failed()) return true;
  ------------------
  |  Branch (2420:9): [True: 0, False: 0]
  ------------------
 2421|      0|  }
 2422|     10|  return false;
 2423|     10|}
_ZNK7testing10TestResult15HasFatalFailureEv:
 2431|      6|bool TestResult::HasFatalFailure() const {
 2432|      6|  return CountIf(test_part_results_, TestPartFatallyFailed) > 0;
 2433|      6|}
_ZNK7testing10TestResult16total_part_countEv:
 2447|     10|int TestResult::total_part_count() const {
 2448|     10|  return static_cast<int>(test_part_results_.size());
 2449|     10|}
_ZN7testing4TestC2Ev:
 2461|      2|Test::Test() : gtest_flag_saver_(new GTEST_FLAG_SAVER_) {}
  ------------------
  |  | 2291|      2|#define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver
  ------------------
_ZN7testing4Test5SetUpEv:
 2471|      2|void Test::SetUp() {}
_ZN7testing4Test19HasSameFixtureClassEv:
 2504|      2|bool Test::HasSameFixtureClass() {
 2505|      2|  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
 2506|      2|  const TestSuite* const test_suite = impl->current_test_suite();
 2507|       |
 2508|       |  // Info about the first test in the current test suite.
 2509|      2|  const TestInfo* const first_test_info = test_suite->test_info_list()[0];
 2510|      2|  const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_;
 2511|      2|  const char* const first_test_name = first_test_info->name();
 2512|       |
 2513|       |  // Info about the current test.
 2514|      2|  const TestInfo* const this_test_info = impl->current_test_info();
 2515|      2|  const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_;
 2516|      2|  const char* const this_test_name = this_test_info->name();
 2517|       |
 2518|      2|  if (this_fixture_id != first_fixture_id) {
  ------------------
  |  Branch (2518:7): [True: 0, False: 2]
  ------------------
 2519|       |    // Is the first test defined using TEST?
 2520|      0|    const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId();
 2521|       |    // Is this test defined using TEST?
 2522|      0|    const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId();
 2523|       |
 2524|      0|    if (first_is_TEST || this_is_TEST) {
  ------------------
  |  Branch (2524:9): [True: 0, False: 0]
  |  Branch (2524:26): [True: 0, False: 0]
  ------------------
 2525|       |      // Both TEST and TEST_F appear in same test suite, which is incorrect.
 2526|       |      // Tell the user how to fix this.
 2527|       |
 2528|       |      // Gets the name of the TEST and the name of the TEST_F.  Note
 2529|       |      // that first_is_TEST and this_is_TEST cannot both be true, as
 2530|       |      // the fixture IDs are different for the two tests.
 2531|      0|      const char* const TEST_name =
 2532|      0|          first_is_TEST ? first_test_name : this_test_name;
  ------------------
  |  Branch (2532:11): [True: 0, False: 0]
  ------------------
 2533|      0|      const char* const TEST_F_name =
 2534|      0|          first_is_TEST ? this_test_name : first_test_name;
  ------------------
  |  Branch (2534:11): [True: 0, False: 0]
  ------------------
 2535|       |
 2536|      0|      ADD_FAILURE()
  ------------------
  |  | 1735|      0|#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
  |  |  ------------------
  |  |  |  | 1339|      0|  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1333|      0|  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1329|      0|  ::testing::internal::AssertHelper(result_type, file, line, message) = \
  |  |  |  |  |  |  |  | 1330|      0|      ::testing::Message()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2537|      0|          << "All tests in the same test suite must use the same test fixture\n"
 2538|      0|          << "class, so mixing TEST_F and TEST in the same test suite is\n"
 2539|      0|          << "illegal.  In test suite " << this_test_info->test_suite_name()
 2540|      0|          << ",\n"
 2541|      0|          << "test " << TEST_F_name << " is defined using TEST_F but\n"
 2542|      0|          << "test " << TEST_name << " is defined using TEST.  You probably\n"
 2543|      0|          << "want to change the TEST to TEST_F or move it to another test\n"
 2544|      0|          << "case.";
 2545|      0|    } else {
 2546|       |      // Two fixture classes with the same name appear in two different
 2547|       |      // namespaces, which is not allowed. Tell the user how to fix this.
 2548|      0|      ADD_FAILURE()
  ------------------
  |  | 1735|      0|#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
  |  |  ------------------
  |  |  |  | 1339|      0|  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1333|      0|  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1329|      0|  ::testing::internal::AssertHelper(result_type, file, line, message) = \
  |  |  |  |  |  |  |  | 1330|      0|      ::testing::Message()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2549|      0|          << "All tests in the same test suite must use the same test fixture\n"
 2550|      0|          << "class.  However, in test suite "
 2551|      0|          << this_test_info->test_suite_name() << ",\n"
 2552|      0|          << "you defined test " << first_test_name << " and test "
 2553|      0|          << this_test_name << "\n"
 2554|      0|          << "using two different test fixture classes.  This can happen if\n"
 2555|      0|          << "the two classes are from different namespaces or translation\n"
 2556|      0|          << "units and have the same name.  You should probably rename one\n"
 2557|      0|          << "of the classes to put the tests into different test suites.";
 2558|      0|    }
 2559|      0|    return false;
 2560|      0|  }
 2561|       |
 2562|      2|  return true;
 2563|      2|}
_ZN7testing4Test3RunEv:
 2677|      2|void Test::Run() {
 2678|      2|  if (!HasSameFixtureClass()) return;
  ------------------
  |  Branch (2678:7): [True: 0, False: 2]
  ------------------
 2679|       |
 2680|      2|  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
 2681|      2|  impl->os_stack_trace_getter()->UponLeavingGTest();
 2682|      2|  internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()");
 2683|       |  // We will run the test only if SetUp() was successful and didn't call
 2684|       |  // GTEST_SKIP().
 2685|      2|  if (!HasFatalFailure() && !IsSkipped()) {
  ------------------
  |  Branch (2685:7): [True: 2, False: 0]
  |  Branch (2685:29): [True: 2, False: 0]
  ------------------
 2686|      2|    impl->os_stack_trace_getter()->UponLeavingGTest();
 2687|      2|    internal::HandleExceptionsInMethodIfSupported(this, &Test::TestBody,
 2688|      2|                                                  "the test body");
 2689|      2|  }
 2690|       |
 2691|       |  // However, we want to clean up as much as possible.  Hence we will
 2692|       |  // always call TearDown(), even if SetUp() or the test body has
 2693|       |  // failed.
 2694|      2|  impl->os_stack_trace_getter()->UponLeavingGTest();
 2695|      2|  internal::HandleExceptionsInMethodIfSupported(this, &Test::TearDown,
 2696|      2|                                                "TearDown()");
 2697|      2|}
_ZN7testing4Test15HasFatalFailureEv:
 2700|      6|bool Test::HasFatalFailure() {
 2701|      6|  return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();
 2702|      6|}
_ZN7testing4Test9IsSkippedEv:
 2712|      6|bool Test::IsSkipped() {
 2713|      6|  return internal::GetUnitTestImpl()->current_test_result()->Skipped();
 2714|      6|}
_ZN7testing8TestInfoC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_PKcSB_NS_8internal12CodeLocationEPKvPNSC_15TestFactoryBaseE:
 2726|      2|    : test_suite_name_(a_test_suite_name),
 2727|       |      // begin()/end() is MSVC 17.3.3 ASAN crash workaround (GitHub issue #3997)
 2728|      2|      name_(a_name.begin(), a_name.end()),
 2729|      2|      type_param_(a_type_param ? new std::string(a_type_param) : nullptr),
  ------------------
  |  Branch (2729:19): [True: 0, False: 2]
  ------------------
 2730|      2|      value_param_(a_value_param ? new std::string(a_value_param) : nullptr),
  ------------------
  |  Branch (2730:20): [True: 0, False: 2]
  ------------------
 2731|      2|      location_(a_code_location),
 2732|      2|      fixture_class_id_(fixture_class_id),
 2733|      2|      should_run_(false),
 2734|      2|      is_disabled_(false),
 2735|      2|      matches_filter_(false),
 2736|      2|      is_in_another_shard_(false),
 2737|      2|      factory_(factory),
 2738|      2|      result_() {}
_ZN7testing8internal23MakeAndRegisterTestInfoEPKcS2_S2_S2_NS0_12CodeLocationEPKvPFvvES7_PNS0_15TestFactoryBaseE:
 2767|      2|    TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory) {
 2768|      2|  TestInfo* const test_info =
 2769|      2|      new TestInfo(test_suite_name, name, type_param, value_param,
 2770|      2|                   code_location, fixture_class_id, factory);
 2771|      2|  GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);
 2772|      2|  return test_info;
 2773|      2|}
_ZN7testing8internal12UnitTestImpl26RegisterParameterizedTestsEv:
 2796|      2|void UnitTestImpl::RegisterParameterizedTests() {
 2797|      2|  if (!parameterized_tests_registered_) {
  ------------------
  |  Branch (2797:7): [True: 2, False: 0]
  ------------------
 2798|      2|    parameterized_test_registry_.RegisterTests();
 2799|      2|    type_parameterized_test_registry_.CheckForInstantiations();
 2800|      2|    parameterized_tests_registered_ = true;
 2801|      2|  }
 2802|      2|}
_ZN7testing8TestInfo3RunEv:
 2808|      2|void TestInfo::Run() {
 2809|      2|  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
 2810|      2|  if (!should_run_) {
  ------------------
  |  Branch (2810:7): [True: 0, False: 2]
  ------------------
 2811|      0|    if (is_disabled_ && matches_filter_) repeater->OnTestDisabled(*this);
  ------------------
  |  Branch (2811:9): [True: 0, False: 0]
  |  Branch (2811:25): [True: 0, False: 0]
  ------------------
 2812|      0|    return;
 2813|      0|  }
 2814|       |
 2815|       |  // Tells UnitTest where to store test result.
 2816|      2|  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
 2817|      2|  impl->set_current_test_info(this);
 2818|       |
 2819|       |  // Notifies the unit test event listeners that a test is about to start.
 2820|      2|  repeater->OnTestStart(*this);
 2821|      2|  result_.set_start_timestamp(internal::GetTimeInMillis());
 2822|      2|  internal::Timer timer;
 2823|      2|  impl->os_stack_trace_getter()->UponLeavingGTest();
 2824|       |
 2825|       |  // Creates the test object.
 2826|      2|  Test* const test = internal::HandleExceptionsInMethodIfSupported(
 2827|      2|      factory_, &internal::TestFactoryBase::CreateTest,
 2828|      2|      "the test fixture's constructor");
 2829|       |
 2830|       |  // Runs the test if the constructor didn't generate a fatal failure or invoke
 2831|       |  // GTEST_SKIP().
 2832|       |  // Note that the object will not be null
 2833|      2|  if (!Test::HasFatalFailure() && !Test::IsSkipped()) {
  ------------------
  |  Branch (2833:7): [True: 2, False: 0]
  |  Branch (2833:35): [True: 2, False: 0]
  ------------------
 2834|       |    // This doesn't throw as all user code that can throw are wrapped into
 2835|       |    // exception handling code.
 2836|      2|    test->Run();
 2837|      2|  }
 2838|       |
 2839|      2|  if (test != nullptr) {
  ------------------
  |  Branch (2839:7): [True: 0, False: 2]
  ------------------
 2840|       |    // Deletes the test object.
 2841|      0|    impl->os_stack_trace_getter()->UponLeavingGTest();
 2842|      0|    internal::HandleExceptionsInMethodIfSupported(
 2843|      0|        test, &Test::DeleteSelf_, "the test fixture's destructor");
 2844|      0|  }
 2845|       |
 2846|      2|  result_.set_elapsed_time(timer.Elapsed());
 2847|       |
 2848|       |  // Notifies the unit test event listener that a test has just finished.
 2849|      2|  repeater->OnTestEnd(*this);
 2850|       |
 2851|       |  // Tells UnitTest to stop associating assertion results to this
 2852|       |  // test.
 2853|      2|  impl->set_current_test_info(nullptr);
 2854|      2|}
_ZNK7testing9TestSuite17test_to_run_countEv:
 2911|      4|int TestSuite::test_to_run_count() const {
 2912|      4|  return CountIf(test_info_list_, ShouldRunTest);
 2913|      4|}
_ZNK7testing9TestSuite16total_test_countEv:
 2916|      6|int TestSuite::total_test_count() const {
 2917|      6|  return static_cast<int>(test_info_list_.size());
 2918|      6|}
_ZN7testing9TestSuiteC2EPKcS2_PFvvES4_:
 2932|      2|    : name_(a_name),
 2933|      2|      type_param_(a_type_param ? new std::string(a_type_param) : nullptr),
  ------------------
  |  Branch (2933:19): [True: 0, False: 2]
  ------------------
 2934|      2|      set_up_tc_(set_up_tc),
 2935|      2|      tear_down_tc_(tear_down_tc),
 2936|      2|      should_run_(false),
 2937|      2|      start_timestamp_(0),
 2938|      2|      elapsed_time_(0) {}
_ZNK7testing9TestSuite11GetTestInfoEi:
 2948|      2|const TestInfo* TestSuite::GetTestInfo(int i) const {
 2949|      2|  const int index = GetElementOr(test_indices_, i, -1);
 2950|      2|  return index < 0 ? nullptr : test_info_list_[static_cast<size_t>(index)];
  ------------------
  |  Branch (2950:10): [True: 0, False: 2]
  ------------------
 2951|      2|}
_ZN7testing9TestSuite18GetMutableTestInfoEi:
 2955|      2|TestInfo* TestSuite::GetMutableTestInfo(int i) {
 2956|      2|  const int index = GetElementOr(test_indices_, i, -1);
 2957|      2|  return index < 0 ? nullptr : test_info_list_[static_cast<size_t>(index)];
  ------------------
  |  Branch (2957:10): [True: 0, False: 2]
  ------------------
 2958|      2|}
_ZN7testing9TestSuite11AddTestInfoEPNS_8TestInfoE:
 2962|      2|void TestSuite::AddTestInfo(TestInfo* test_info) {
 2963|      2|  test_info_list_.push_back(test_info);
 2964|      2|  test_indices_.push_back(static_cast<int>(test_indices_.size()));
 2965|      2|}
_ZN7testing9TestSuite3RunEv:
 2968|      2|void TestSuite::Run() {
 2969|      2|  if (!should_run_) return;
  ------------------
  |  Branch (2969:7): [True: 0, False: 2]
  ------------------
 2970|       |
 2971|      2|  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
 2972|      2|  impl->set_current_test_suite(this);
 2973|       |
 2974|      2|  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
 2975|       |
 2976|       |  // Ensure our tests are in a deterministic order.
 2977|       |  //
 2978|       |  // We do this by sorting lexicographically on (file, line number), providing
 2979|       |  // an order matching what the user can see in the source code.
 2980|       |  //
 2981|       |  // In the common case the line number comparison shouldn't be necessary,
 2982|       |  // because the registrations made by the TEST macro are executed in order
 2983|       |  // within a translation unit. But this is not true of the manual registration
 2984|       |  // API, and in more exotic scenarios a single file may be part of multiple
 2985|       |  // translation units.
 2986|      2|  std::stable_sort(test_info_list_.begin(), test_info_list_.end(),
 2987|      2|                   [](const TestInfo* const a, const TestInfo* const b) {
 2988|      2|                     if (const int result = std::strcmp(a->file(), b->file())) {
 2989|      2|                       return result < 0;
 2990|      2|                     }
 2991|       |
 2992|      2|                     return a->line() < b->line();
 2993|      2|                   });
 2994|       |
 2995|       |  // Call both legacy and the new API
 2996|      2|  repeater->OnTestSuiteStart(*this);
 2997|       |//  Legacy API is deprecated but still available
 2998|      2|#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 2999|      2|  repeater->OnTestCaseStart(*this);
 3000|      2|#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 3001|       |
 3002|      2|  impl->os_stack_trace_getter()->UponLeavingGTest();
 3003|      2|  internal::HandleExceptionsInMethodIfSupported(
 3004|      2|      this, &TestSuite::RunSetUpTestSuite, "SetUpTestSuite()");
 3005|       |
 3006|      2|  const bool skip_all =
 3007|      2|      ad_hoc_test_result().Failed() || ad_hoc_test_result().Skipped();
  ------------------
  |  Branch (3007:7): [True: 0, False: 2]
  |  Branch (3007:40): [True: 0, False: 2]
  ------------------
 3008|       |
 3009|      2|  start_timestamp_ = internal::GetTimeInMillis();
 3010|      2|  internal::Timer timer;
 3011|      4|  for (int i = 0; i < total_test_count(); i++) {
  ------------------
  |  Branch (3011:19): [True: 2, False: 2]
  ------------------
 3012|      2|    if (skip_all) {
  ------------------
  |  Branch (3012:9): [True: 0, False: 2]
  ------------------
 3013|      0|      GetMutableTestInfo(i)->Skip();
 3014|      2|    } else {
 3015|      2|      GetMutableTestInfo(i)->Run();
 3016|      2|    }
 3017|      2|    if (GTEST_FLAG_GET(fail_fast) &&
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3018|      0|        GetMutableTestInfo(i)->result()->Failed()) {
  ------------------
  |  Branch (3018:9): [True: 0, False: 0]
  ------------------
 3019|      0|      for (int j = i + 1; j < total_test_count(); j++) {
  ------------------
  |  Branch (3019:27): [True: 0, False: 0]
  ------------------
 3020|      0|        GetMutableTestInfo(j)->Skip();
 3021|      0|      }
 3022|      0|      break;
 3023|      0|    }
 3024|      2|  }
 3025|      2|  elapsed_time_ = timer.Elapsed();
 3026|       |
 3027|      2|  impl->os_stack_trace_getter()->UponLeavingGTest();
 3028|      2|  internal::HandleExceptionsInMethodIfSupported(
 3029|      2|      this, &TestSuite::RunTearDownTestSuite, "TearDownTestSuite()");
 3030|       |
 3031|       |  // Call both legacy and the new API
 3032|      2|  repeater->OnTestSuiteEnd(*this);
 3033|       |//  Legacy API is deprecated but still available
 3034|      2|#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 3035|      2|  repeater->OnTestCaseEnd(*this);
 3036|      2|#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 3037|       |
 3038|      2|  impl->set_current_test_suite(nullptr);
 3039|      2|}
_ZN7testing9TestSuite11ClearResultEv:
 3072|      2|void TestSuite::ClearResult() {
 3073|      2|  ad_hoc_test_result_.Clear();
 3074|      2|  ForEach(test_info_list_, TestInfo::ClearTestResult);
 3075|      2|}
_ZN7testing8internal14ShouldUseColorEb:
 3238|      2|bool ShouldUseColor(bool stdout_is_tty) {
 3239|      2|  std::string c = GTEST_FLAG_GET(color);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 3240|      2|  const char* const gtest_color = c.c_str();
 3241|       |
 3242|      2|  if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
  ------------------
  |  Branch (3242:7): [True: 2, False: 0]
  ------------------
 3243|       |#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
 3244|       |    // On Windows the TERM variable is usually not set, but the
 3245|       |    // console there does support colors.
 3246|       |    return stdout_is_tty;
 3247|       |#else
 3248|       |    // On non-Windows platforms, we rely on the TERM variable.
 3249|      2|    const char* const term = posix::GetEnv("TERM");
 3250|      2|    const bool term_supports_color =
 3251|      2|        term != nullptr && (String::CStringEquals(term, "xterm") ||
  ------------------
  |  Branch (3251:9): [True: 0, False: 2]
  |  Branch (3251:29): [True: 0, False: 0]
  ------------------
 3252|      0|                            String::CStringEquals(term, "xterm-color") ||
  ------------------
  |  Branch (3252:29): [True: 0, False: 0]
  ------------------
 3253|      0|                            String::CStringEquals(term, "xterm-kitty") ||
  ------------------
  |  Branch (3253:29): [True: 0, False: 0]
  ------------------
 3254|      0|                            String::CStringEquals(term, "screen") ||
  ------------------
  |  Branch (3254:29): [True: 0, False: 0]
  ------------------
 3255|      0|                            String::CStringEquals(term, "tmux") ||
  ------------------
  |  Branch (3255:29): [True: 0, False: 0]
  ------------------
 3256|      0|                            String::CStringEquals(term, "rxvt-unicode") ||
  ------------------
  |  Branch (3256:29): [True: 0, False: 0]
  ------------------
 3257|      0|                            String::CStringEquals(term, "linux") ||
  ------------------
  |  Branch (3257:29): [True: 0, False: 0]
  ------------------
 3258|      0|                            String::CStringEquals(term, "cygwin") ||
  ------------------
  |  Branch (3258:29): [True: 0, False: 0]
  ------------------
 3259|      0|                            String::EndsWithCaseInsensitive(term, "-256color"));
  ------------------
  |  Branch (3259:29): [True: 0, False: 0]
  ------------------
 3260|      2|    return stdout_is_tty && term_supports_color;
  ------------------
  |  Branch (3260:12): [True: 0, False: 2]
  |  Branch (3260:29): [True: 0, False: 0]
  ------------------
 3261|      2|#endif  // GTEST_OS_WINDOWS
 3262|      2|  }
 3263|       |
 3264|      0|  return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
  ------------------
  |  Branch (3264:10): [True: 0, False: 0]
  ------------------
 3265|      0|         String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
  ------------------
  |  Branch (3265:10): [True: 0, False: 0]
  ------------------
 3266|      0|         String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
  ------------------
  |  Branch (3266:10): [True: 0, False: 0]
  ------------------
 3267|      0|         String::CStringEquals(gtest_color, "1");
  ------------------
  |  Branch (3267:10): [True: 0, False: 0]
  ------------------
 3268|       |  // We take "yes", "true", "t", and "1" as meaning "yes".  If the
 3269|       |  // value is neither one of these nor "auto", we treat it as "no" to
 3270|       |  // be conservative.
 3271|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter20OnTestIterationStartERKNS_8UnitTestEi:
 3394|      2|    const UnitTest& unit_test, int iteration) {
 3395|      2|  if (GTEST_FLAG_GET(repeat) != 1)
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  |  Branch (3395:7): [True: 0, False: 2]
  ------------------
 3396|      0|    printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
 3397|       |
 3398|      2|  std::string f = GTEST_FLAG_GET(filter);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 3399|      2|  const char* const filter = f.c_str();
 3400|       |
 3401|       |  // Prints the filter if it's not *.  This reminds the user that some
 3402|       |  // tests may be skipped.
 3403|      2|  if (!String::CStringEquals(filter, kUniversalFilter)) {
  ------------------
  |  Branch (3403:7): [True: 2, False: 0]
  ------------------
 3404|      2|    ColoredPrintf(GTestColor::kYellow, "Note: %s filter = %s\n", GTEST_NAME_,
  ------------------
  |  |  334|      2|#define GTEST_NAME_ "Google Test"
  ------------------
 3405|      2|                  filter);
 3406|      2|  }
 3407|       |
 3408|      2|  if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
  ------------------
  |  Branch (3408:7): [True: 0, False: 2]
  ------------------
 3409|      0|    const int32_t shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
 3410|      0|    ColoredPrintf(GTestColor::kYellow, "Note: This is test shard %d of %s.\n",
 3411|      0|                  static_cast<int>(shard_index) + 1,
 3412|      0|                  internal::posix::GetEnv(kTestTotalShards));
 3413|      0|  }
 3414|       |
 3415|      2|  if (GTEST_FLAG_GET(shuffle)) {
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3416|      0|    ColoredPrintf(GTestColor::kYellow,
 3417|      0|                  "Note: Randomizing tests' orders with a seed of %d .\n",
 3418|      0|                  unit_test.random_seed());
 3419|      0|  }
 3420|       |
 3421|      2|  ColoredPrintf(GTestColor::kGreen, "[==========] ");
 3422|      2|  printf("Running %s from %s.\n",
 3423|      2|         FormatTestCount(unit_test.test_to_run_count()).c_str(),
 3424|      2|         FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());
 3425|       |  fflush(stdout);
 3426|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter24OnEnvironmentsSetUpStartERKNS_8UnitTestE:
 3429|      2|    const UnitTest& /*unit_test*/) {
 3430|      2|  ColoredPrintf(GTestColor::kGreen, "[----------] ");
 3431|      2|  printf("Global test environment set-up.\n");
 3432|       |  fflush(stdout);
 3433|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter15OnTestCaseStartERKNS_9TestSuiteE:
 3436|      2|void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
 3437|      2|  const std::string counts =
 3438|      2|      FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
 3439|      2|  ColoredPrintf(GTestColor::kGreen, "[----------] ");
 3440|      2|  printf("%s from %s", counts.c_str(), test_case.name());
 3441|      2|  if (test_case.type_param() == nullptr) {
  ------------------
  |  Branch (3441:7): [True: 2, False: 0]
  ------------------
 3442|      2|    printf("\n");
 3443|      2|  } else {
 3444|      0|    printf(", where %s = %s\n", kTypeParamLabel, test_case.type_param());
 3445|      0|  }
 3446|       |  fflush(stdout);
 3447|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter11OnTestStartERKNS_8TestInfoE:
 3464|      2|void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) {
 3465|      2|  ColoredPrintf(GTestColor::kGreen, "[ RUN      ] ");
 3466|      2|  PrintTestName(test_info.test_suite_name(), test_info.name());
 3467|      2|  printf("\n");
 3468|       |  fflush(stdout);
 3469|      2|}
_ZN7testing8internal17TestEventRepeater6AppendEPNS_17TestEventListenerE:
 3815|      6|void TestEventRepeater::Append(TestEventListener* listener) {
 3816|      6|  listeners_.push_back(listener);
 3817|      6|}
_ZN7testing8internal17TestEventRepeater7ReleaseEPNS_17TestEventListenerE:
 3819|      2|TestEventListener* TestEventRepeater::Release(TestEventListener* listener) {
 3820|      2|  for (size_t i = 0; i < listeners_.size(); ++i) {
  ------------------
  |  Branch (3820:22): [True: 0, False: 2]
  ------------------
 3821|      0|    if (listeners_[i] == listener) {
  ------------------
  |  Branch (3821:9): [True: 0, False: 0]
  ------------------
 3822|      0|      listeners_.erase(listeners_.begin() + static_cast<int>(i));
 3823|      0|      return listener;
 3824|      0|    }
 3825|      0|  }
 3826|       |
 3827|      2|  return nullptr;
 3828|      2|}
_ZN7testing8internal17TestEventRepeater18OnTestProgramStartERKNS_8UnitTestE:
 3833|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3834|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3834:9): [True: 2, False: 0]
  ------------------
 3835|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3835:26): [True: 6, False: 2]
  ------------------
 3836|      6|        listeners_[i]->Name(parameter);                 \
 3837|      6|      }                                                 \
 3838|      2|    }                                                   \
 3839|      2|  }
_ZN7testing8internal17TestEventRepeater24OnEnvironmentsSetUpStartERKNS_8UnitTestE:
 3833|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3834|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3834:9): [True: 2, False: 0]
  ------------------
 3835|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3835:26): [True: 6, False: 2]
  ------------------
 3836|      6|        listeners_[i]->Name(parameter);                 \
 3837|      6|      }                                                 \
 3838|      2|    }                                                   \
 3839|      2|  }
_ZN7testing8internal17TestEventRepeater15OnTestCaseStartERKNS_9TestSuiteE:
 3833|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3834|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3834:9): [True: 2, False: 0]
  ------------------
 3835|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3835:26): [True: 6, False: 2]
  ------------------
 3836|      6|        listeners_[i]->Name(parameter);                 \
 3837|      6|      }                                                 \
 3838|      2|    }                                                   \
 3839|      2|  }
_ZN7testing8internal17TestEventRepeater16OnTestSuiteStartERKNS_9TestSuiteE:
 3833|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3834|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3834:9): [True: 2, False: 0]
  ------------------
 3835|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3835:26): [True: 6, False: 2]
  ------------------
 3836|      6|        listeners_[i]->Name(parameter);                 \
 3837|      6|      }                                                 \
 3838|      2|    }                                                   \
 3839|      2|  }
_ZN7testing8internal17TestEventRepeater11OnTestStartERKNS_8TestInfoE:
 3833|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3834|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3834:9): [True: 2, False: 0]
  ------------------
 3835|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3835:26): [True: 6, False: 2]
  ------------------
 3836|      6|        listeners_[i]->Name(parameter);                 \
 3837|      6|      }                                                 \
 3838|      2|    }                                                   \
 3839|      2|  }
_ZN7testing8internal17TestEventRepeater22OnEnvironmentsSetUpEndERKNS_8UnitTestE:
 3843|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3844|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3844:9): [True: 2, False: 0]
  ------------------
 3845|      8|      for (size_t i = listeners_.size(); i != 0; i--) { \
  ------------------
  |  Branch (3845:42): [True: 6, False: 2]
  ------------------
 3846|      6|        listeners_[i - 1]->Name(parameter);             \
 3847|      6|      }                                                 \
 3848|      2|    }                                                   \
 3849|      2|  }
_ZN7testing8internal17TestEventRepeater20OnTestIterationStartERKNS_8UnitTestEi:
 3876|      2|                                             int iteration) {
 3877|      2|  if (forwarding_enabled_) {
  ------------------
  |  Branch (3877:7): [True: 2, False: 0]
  ------------------
 3878|      8|    for (size_t i = 0; i < listeners_.size(); i++) {
  ------------------
  |  Branch (3878:24): [True: 6, False: 2]
  ------------------
 3879|      6|      listeners_[i]->OnTestIterationStart(unit_test, iteration);
 3880|      6|    }
 3881|      2|  }
 3882|      2|}
_ZN7testing8internal18OsStackTraceGetter16UponLeavingGTestEv:
 5021|      8|void OsStackTraceGetter::UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_) {
 5022|       |#ifdef GTEST_HAS_ABSL
 5023|       |  void* caller_frame = nullptr;
 5024|       |  if (absl::GetStackTrace(&caller_frame, 1, 3) <= 0) {
 5025|       |    caller_frame = nullptr;
 5026|       |  }
 5027|       |
 5028|       |  MutexLock lock(&mutex_);
 5029|       |  caller_frame_ = caller_frame;
 5030|       |#endif  // GTEST_HAS_ABSL
 5031|      8|}
_ZN7testing18TestEventListenersC2Ev:
 5078|      2|    : repeater_(new internal::TestEventRepeater()),
 5079|      2|      default_result_printer_(nullptr),
 5080|      2|      default_xml_generator_(nullptr) {}
_ZN7testing18TestEventListeners6AppendEPNS_17TestEventListenerE:
 5088|      6|void TestEventListeners::Append(TestEventListener* listener) {
 5089|      6|  repeater_->Append(listener);
 5090|      6|}
_ZN7testing18TestEventListeners7ReleaseEPNS_17TestEventListenerE:
 5095|      2|TestEventListener* TestEventListeners::Release(TestEventListener* listener) {
 5096|      2|  if (listener == default_result_printer_)
  ------------------
  |  Branch (5096:7): [True: 2, False: 0]
  ------------------
 5097|      2|    default_result_printer_ = nullptr;
 5098|      0|  else if (listener == default_xml_generator_)
  ------------------
  |  Branch (5098:12): [True: 0, False: 0]
  ------------------
 5099|      0|    default_xml_generator_ = nullptr;
 5100|      2|  return repeater_->Release(listener);
 5101|      2|}
_ZN7testing18TestEventListeners8repeaterEv:
 5105|      6|TestEventListener* TestEventListeners::repeater() { return repeater_; }
_ZN7testing18TestEventListeners23SetDefaultResultPrinterEPNS_17TestEventListenerE:
 5112|      2|void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) {
 5113|      2|  if (default_result_printer_ != listener) {
  ------------------
  |  Branch (5113:7): [True: 2, False: 0]
  ------------------
 5114|       |    // It is an error to pass this method a listener that is already in the
 5115|       |    // list.
 5116|      2|    delete Release(default_result_printer_);
 5117|      2|    default_result_printer_ = listener;
 5118|      2|    if (listener != nullptr) Append(listener);
  ------------------
  |  Branch (5118:9): [True: 2, False: 0]
  ------------------
 5119|      2|  }
 5120|      2|}
_ZN7testing8UnitTest11GetInstanceEv:
 5156|     48|UnitTest* UnitTest::GetInstance() {
 5157|       |  // CodeGear C++Builder insists on a public destructor for the
 5158|       |  // default implementation.  Use this implementation to keep good OO
 5159|       |  // design with private destructor.
 5160|       |
 5161|       |#if defined(__BORLANDC__)
 5162|       |  static UnitTest* const instance = new UnitTest;
 5163|       |  return instance;
 5164|       |#else
 5165|     48|  static UnitTest instance;
 5166|     48|  return &instance;
 5167|     48|#endif  // defined(__BORLANDC__)
 5168|     48|}
_ZNK7testing8UnitTest22total_test_suite_countEv:
 5181|      4|int UnitTest::total_test_suite_count() const {
 5182|      4|  return impl()->total_test_suite_count();
 5183|      4|}
_ZNK7testing8UnitTest23test_suite_to_run_countEv:
 5187|      2|int UnitTest::test_suite_to_run_count() const {
 5188|      2|  return impl()->test_suite_to_run_count();
 5189|      2|}
_ZNK7testing8UnitTest17test_to_run_countEv:
 5239|      2|int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); }
_ZNK7testing8UnitTest12GetTestSuiteEi:
 5262|      6|const TestSuite* UnitTest::GetTestSuite(int i) const {
 5263|      6|  return impl()->GetTestSuite(i);
 5264|      6|}
_ZN7testing8UnitTest9listenersEv:
 5287|      8|TestEventListeners& UnitTest::listeners() { return *impl()->listeners(); }
_ZN7testing8UnitTest3RunEv:
 5399|      2|int UnitTest::Run() {
 5400|      2|#ifdef GTEST_HAS_DEATH_TEST
 5401|      2|  const bool in_death_test_child_process =
 5402|      2|      GTEST_FLAG_GET(internal_run_death_test).length() > 0;
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5403|       |
 5404|       |  // Google Test implements this protocol for catching that a test
 5405|       |  // program exits before returning control to Google Test:
 5406|       |  //
 5407|       |  //   1. Upon start, Google Test creates a file whose absolute path
 5408|       |  //      is specified by the environment variable
 5409|       |  //      TEST_PREMATURE_EXIT_FILE.
 5410|       |  //   2. When Google Test has finished its work, it deletes the file.
 5411|       |  //
 5412|       |  // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before
 5413|       |  // running a Google-Test-based test program and check the existence
 5414|       |  // of the file at the end of the test execution to see if it has
 5415|       |  // exited prematurely.
 5416|       |
 5417|       |  // If we are in the child process of a death test, don't
 5418|       |  // create/delete the premature exit file, as doing so is unnecessary
 5419|       |  // and will confuse the parent process.  Otherwise, create/delete
 5420|       |  // the file upon entering/leaving this function.  If the program
 5421|       |  // somehow exits before this function has a chance to return, the
 5422|       |  // premature-exit file will be left undeleted, causing a test runner
 5423|       |  // that understands the premature-exit-file protocol to report the
 5424|       |  // test as having failed.
 5425|      2|  const internal::ScopedPrematureExitFile premature_exit_file(
 5426|      2|      in_death_test_child_process
  ------------------
  |  Branch (5426:7): [True: 0, False: 2]
  ------------------
 5427|      2|          ? nullptr
 5428|      2|          : internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE"));
 5429|       |#else
 5430|       |  const bool in_death_test_child_process = false;
 5431|       |#endif  // GTEST_HAS_DEATH_TEST
 5432|       |
 5433|       |  // Captures the value of GTEST_FLAG(catch_exceptions).  This value will be
 5434|       |  // used for the duration of the program.
 5435|      2|  impl()->set_catch_exceptions(GTEST_FLAG_GET(catch_exceptions));
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5436|       |
 5437|       |#ifdef GTEST_OS_WINDOWS
 5438|       |  // Either the user wants Google Test to catch exceptions thrown by the
 5439|       |  // tests or this is executing in the context of death test child
 5440|       |  // process. In either case the user does not want to see pop-up dialogs
 5441|       |  // about crashes - they are expected.
 5442|       |  if (impl()->catch_exceptions() || in_death_test_child_process) {
 5443|       |#if !defined(GTEST_OS_WINDOWS_MOBILE) && !defined(GTEST_OS_WINDOWS_PHONE) && \
 5444|       |    !defined(GTEST_OS_WINDOWS_RT)
 5445|       |    // SetErrorMode doesn't exist on CE.
 5446|       |    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |
 5447|       |                 SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
 5448|       |#endif  // !GTEST_OS_WINDOWS_MOBILE
 5449|       |
 5450|       |#if (defined(_MSC_VER) || defined(GTEST_OS_WINDOWS_MINGW)) && \
 5451|       |    !defined(GTEST_OS_WINDOWS_MOBILE)
 5452|       |    // Death test children can be terminated with _abort().  On Windows,
 5453|       |    // _abort() can show a dialog with a warning message.  This forces the
 5454|       |    // abort message to go to stderr instead.
 5455|       |    _set_error_mode(_OUT_TO_STDERR);
 5456|       |#endif
 5457|       |
 5458|       |#if defined(_MSC_VER) && !defined(GTEST_OS_WINDOWS_MOBILE)
 5459|       |    // In the debug version, Visual Studio pops up a separate dialog
 5460|       |    // offering a choice to debug the aborted program. We need to suppress
 5461|       |    // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement
 5462|       |    // executed. Google Test will notify the user of any unexpected
 5463|       |    // failure via stderr.
 5464|       |    if (!GTEST_FLAG_GET(break_on_failure))
 5465|       |      _set_abort_behavior(
 5466|       |          0x0,                                    // Clear the following flags:
 5467|       |          _WRITE_ABORT_MSG | _CALL_REPORTFAULT);  // pop-up window, core dump.
 5468|       |
 5469|       |    // In debug mode, the Windows CRT can crash with an assertion over invalid
 5470|       |    // input (e.g. passing an invalid file descriptor).  The default handling
 5471|       |    // for these assertions is to pop up a dialog and wait for user input.
 5472|       |    // Instead ask the CRT to dump such assertions to stderr non-interactively.
 5473|       |    if (!IsDebuggerPresent()) {
 5474|       |      (void)_CrtSetReportMode(_CRT_ASSERT,
 5475|       |                              _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
 5476|       |      (void)_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
 5477|       |    }
 5478|       |#endif
 5479|       |  }
 5480|       |#else
 5481|      2|  (void)in_death_test_child_process;  // Needed inside the #if block above
 5482|      2|#endif  // GTEST_OS_WINDOWS
 5483|       |
 5484|      2|  return internal::HandleExceptionsInMethodIfSupported(
  ------------------
  |  Branch (5484:10): [True: 0, False: 2]
  ------------------
 5485|      2|             impl(), &internal::UnitTestImpl::RunAllTests,
 5486|      2|             "auxiliary test code (environments or event listeners)")
 5487|      2|             ? 0
 5488|      2|             : 1;
 5489|      2|}
_ZN7testing8UnitTestC2Ev:
 5535|      2|UnitTest::UnitTest() { impl_ = new internal::UnitTestImpl(this); }
_ZN7testing8internal12UnitTestImplC2EPNS_8UnitTestE:
 5557|      2|    : parent_(parent),
 5558|       |      GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355 /* using this in initializer */)
 5559|      2|          default_global_test_part_result_reporter_(this),
 5560|      2|      default_per_thread_test_part_result_reporter_(this),
 5561|       |      GTEST_DISABLE_MSC_WARNINGS_POP_() global_test_part_result_reporter_(
 5562|      2|          &default_global_test_part_result_reporter_),
 5563|      2|      per_thread_test_part_result_reporter_(
 5564|      2|          &default_per_thread_test_part_result_reporter_),
 5565|      2|      parameterized_test_registry_(),
 5566|      2|      parameterized_tests_registered_(false),
 5567|      2|      last_death_test_suite_(-1),
 5568|      2|      current_test_suite_(nullptr),
 5569|      2|      current_test_info_(nullptr),
 5570|      2|      ad_hoc_test_result_(),
 5571|      2|      os_stack_trace_getter_(nullptr),
 5572|      2|      post_flag_parse_init_performed_(false),
 5573|      2|      random_seed_(0),  // Will be overridden by the flag before first use.
 5574|      2|      random_(0),       // Will be reseeded before first use.
 5575|      2|      start_timestamp_(0),
 5576|      2|      elapsed_time_(0),
 5577|       |#ifdef GTEST_HAS_DEATH_TEST
 5578|      2|      death_test_factory_(new DefaultDeathTestFactory),
 5579|       |#endif
 5580|       |      // Will be overridden by the flag before first use.
 5581|      2|      catch_exceptions_(false) {
 5582|      2|  listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);
 5583|      2|}
_ZN7testing8internal12UnitTestImpl32SuppressTestEventsIfInSubprocessEv:
 5620|      2|void UnitTestImpl::SuppressTestEventsIfInSubprocess() {
 5621|      2|  if (internal_run_death_test_flag_ != nullptr)
  ------------------
  |  Branch (5621:7): [True: 0, False: 2]
  ------------------
 5622|      0|    listeners()->SuppressEventForwarding(true);
 5623|      2|}
_ZN7testing8internal12UnitTestImpl18ConfigureXmlOutputEv:
 5628|      2|void UnitTestImpl::ConfigureXmlOutput() {
 5629|      2|  const std::string& output_format = UnitTestOptions::GetOutputFormat();
 5630|      2|#if GTEST_HAS_FILE_SYSTEM
 5631|      2|  if (output_format == "xml") {
  ------------------
  |  Branch (5631:7): [True: 0, False: 2]
  ------------------
 5632|      0|    listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
 5633|      0|        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
 5634|      2|  } else if (output_format == "json") {
  ------------------
  |  Branch (5634:14): [True: 0, False: 2]
  ------------------
 5635|      0|    listeners()->SetDefaultXmlGenerator(new JsonUnitTestResultPrinter(
 5636|      0|        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
 5637|      2|  } else if (!output_format.empty()) {
  ------------------
  |  Branch (5637:14): [True: 0, False: 2]
  ------------------
 5638|      0|    GTEST_LOG_(WARNING) << "WARNING: unrecognized output format \""
  ------------------
  |  | 1054|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  | 1055|      0|                                __FILE__, __LINE__)                    \
  |  | 1056|      0|      .GetStream()
  ------------------
 5639|      0|                        << output_format << "\" ignored.";
 5640|      0|  }
 5641|       |#else
 5642|       |  if (!output_format.empty()) {
 5643|       |    GTEST_LOG_(ERROR) << "ERROR: alternative output formats require "
 5644|       |                      << "GTEST_HAS_FILE_SYSTEM to be enabled";
 5645|       |  }
 5646|       |#endif  // GTEST_HAS_FILE_SYSTEM
 5647|      2|}
_ZN7testing8internal12UnitTestImpl24ConfigureStreamingOutputEv:
 5652|      2|void UnitTestImpl::ConfigureStreamingOutput() {
 5653|      2|  const std::string& target = GTEST_FLAG_GET(stream_result_to);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5654|      2|  if (!target.empty()) {
  ------------------
  |  Branch (5654:7): [True: 0, False: 2]
  ------------------
 5655|      0|    const size_t pos = target.find(':');
 5656|      0|    if (pos != std::string::npos) {
  ------------------
  |  Branch (5656:9): [True: 0, False: 0]
  ------------------
 5657|      0|      listeners()->Append(
 5658|      0|          new StreamingListener(target.substr(0, pos), target.substr(pos + 1)));
 5659|      0|    } else {
 5660|      0|      GTEST_LOG_(WARNING) << "unrecognized streaming target \"" << target
  ------------------
  |  | 1054|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  | 1055|      0|                                __FILE__, __LINE__)                    \
  |  | 1056|      0|      .GetStream()
  ------------------
 5661|      0|                          << "\" ignored.";
 5662|      0|    }
 5663|      0|  }
 5664|      2|}
_ZN7testing8internal12UnitTestImpl19PostFlagParsingInitEv:
 5672|      4|void UnitTestImpl::PostFlagParsingInit() {
 5673|       |  // Ensures that this function does not execute more than once.
 5674|      4|  if (!post_flag_parse_init_performed_) {
  ------------------
  |  Branch (5674:7): [True: 2, False: 2]
  ------------------
 5675|      2|    post_flag_parse_init_performed_ = true;
 5676|       |
 5677|       |#if defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
 5678|       |    // Register to send notifications about key process state changes.
 5679|       |    listeners()->Append(new GTEST_CUSTOM_TEST_EVENT_LISTENER_());
 5680|       |#endif  // defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
 5681|       |
 5682|      2|#ifdef GTEST_HAS_DEATH_TEST
 5683|      2|    InitDeathTestSubprocessControlInfo();
 5684|      2|    SuppressTestEventsIfInSubprocess();
 5685|      2|#endif  // GTEST_HAS_DEATH_TEST
 5686|       |
 5687|       |    // Registers parameterized tests. This makes parameterized tests
 5688|       |    // available to the UnitTest reflection API without running
 5689|       |    // RUN_ALL_TESTS.
 5690|      2|    RegisterParameterizedTests();
 5691|       |
 5692|       |    // Configures listeners for XML output. This makes it possible for users
 5693|       |    // to shut down the default XML output before invoking RUN_ALL_TESTS.
 5694|      2|    ConfigureXmlOutput();
 5695|       |
 5696|      2|    if (GTEST_FLAG_GET(brief)) {
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 5697|      0|      listeners()->SetDefaultResultPrinter(new BriefUnitTestResultPrinter);
 5698|      0|    }
 5699|       |
 5700|      2|#if GTEST_CAN_STREAM_RESULTS_
 5701|       |    // Configures listeners for streaming test results to the specified server.
 5702|      2|    ConfigureStreamingOutput();
 5703|      2|#endif  // GTEST_CAN_STREAM_RESULTS_
 5704|       |
 5705|       |#ifdef GTEST_HAS_ABSL
 5706|       |    if (GTEST_FLAG_GET(install_failure_signal_handler)) {
 5707|       |      absl::FailureSignalHandlerOptions options;
 5708|       |      absl::InstallFailureSignalHandler(options);
 5709|       |    }
 5710|       |#endif  // GTEST_HAS_ABSL
 5711|      2|  }
 5712|      4|}
_ZN7testing8internal12UnitTestImpl12GetTestSuiteEPKcS3_PFvvES5_:
 5752|      2|    internal::TearDownTestSuiteFunc tear_down_tc) {
 5753|       |  // Can we find a TestSuite with the given name?
 5754|      2|  const auto test_suite =
 5755|      2|      std::find_if(test_suites_.rbegin(), test_suites_.rend(),
 5756|      2|                   TestSuiteNameIs(test_suite_name));
 5757|       |
 5758|      2|  if (test_suite != test_suites_.rend()) return *test_suite;
  ------------------
  |  Branch (5758:7): [True: 0, False: 2]
  ------------------
 5759|       |
 5760|       |  // No.  Let's create one.
 5761|      2|  auto* const new_test_suite =
 5762|      2|      new TestSuite(test_suite_name, type_param, set_up_tc, tear_down_tc);
 5763|       |
 5764|      2|  const UnitTestFilter death_test_suite_filter(kDeathTestSuiteFilter);
 5765|       |  // Is this a death test suite?
 5766|      2|  if (death_test_suite_filter.MatchesName(test_suite_name)) {
  ------------------
  |  Branch (5766:7): [True: 0, False: 2]
  ------------------
 5767|       |    // Yes.  Inserts the test suite after the last death test suite
 5768|       |    // defined so far.  This only works when the test suites haven't
 5769|       |    // been shuffled.  Otherwise we may end up running a death test
 5770|       |    // after a non-death test.
 5771|      0|    ++last_death_test_suite_;
 5772|      0|    test_suites_.insert(test_suites_.begin() + last_death_test_suite_,
 5773|      0|                        new_test_suite);
 5774|      2|  } else {
 5775|       |    // No.  Appends to the end of the list.
 5776|      2|    test_suites_.push_back(new_test_suite);
 5777|      2|  }
 5778|       |
 5779|      2|  test_suite_indices_.push_back(static_cast<int>(test_suite_indices_.size()));
 5780|      2|  return new_test_suite;
 5781|      2|}
_ZN7testing8internal12UnitTestImpl11RunAllTestsEv:
 5797|      2|bool UnitTestImpl::RunAllTests() {
 5798|       |  // True if and only if Google Test is initialized before RUN_ALL_TESTS() is
 5799|       |  // called.
 5800|      2|  const bool gtest_is_initialized_before_run_all_tests = GTestIsInitialized();
 5801|       |
 5802|       |  // Do not run any test if the --help flag was specified.
 5803|      2|  if (g_help_flag) return true;
  ------------------
  |  Branch (5803:7): [True: 0, False: 2]
  ------------------
 5804|       |
 5805|       |  // Repeats the call to the post-flag parsing initialization in case the
 5806|       |  // user didn't call InitGoogleTest.
 5807|      2|  PostFlagParsingInit();
 5808|       |
 5809|      2|#if GTEST_HAS_FILE_SYSTEM
 5810|       |  // Even if sharding is not on, test runners may want to use the
 5811|       |  // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding
 5812|       |  // protocol.
 5813|      2|  internal::WriteToShardStatusFileIfNeeded();
 5814|      2|#endif  // GTEST_HAS_FILE_SYSTEM
 5815|       |
 5816|       |  // True if and only if we are in a subprocess for running a thread-safe-style
 5817|       |  // death test.
 5818|      2|  bool in_subprocess_for_death_test = false;
 5819|       |
 5820|      2|#ifdef GTEST_HAS_DEATH_TEST
 5821|      2|  in_subprocess_for_death_test = (internal_run_death_test_flag_ != nullptr);
 5822|       |#if defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)
 5823|       |  if (in_subprocess_for_death_test) {
 5824|       |    GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_();
 5825|       |  }
 5826|       |#endif  // defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)
 5827|      2|#endif  // GTEST_HAS_DEATH_TEST
 5828|       |
 5829|      2|  const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,
 5830|      2|                                        in_subprocess_for_death_test);
 5831|       |
 5832|       |  // Compares the full test names with the filter to decide which
 5833|       |  // tests to run.
 5834|      2|  const bool has_tests_to_run =
 5835|      2|      FilterTests(should_shard ? HONOR_SHARDING_PROTOCOL
  ------------------
  |  Branch (5835:19): [True: 0, False: 2]
  ------------------
 5836|      2|                               : IGNORE_SHARDING_PROTOCOL) > 0;
 5837|       |
 5838|       |  // Lists the tests and exits if the --gtest_list_tests flag was specified.
 5839|      2|  if (GTEST_FLAG_GET(list_tests)) {
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 5840|       |    // This must be called *after* FilterTests() has been called.
 5841|      0|    ListTestsMatchingFilter();
 5842|      0|    return true;
 5843|      0|  }
 5844|       |
 5845|      2|  random_seed_ = GetRandomSeedFromFlag(GTEST_FLAG_GET(random_seed));
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5846|       |
 5847|       |  // True if and only if at least one test has failed.
 5848|      2|  bool failed = false;
 5849|       |
 5850|      2|  TestEventListener* repeater = listeners()->repeater();
 5851|       |
 5852|      2|  start_timestamp_ = GetTimeInMillis();
 5853|      2|  repeater->OnTestProgramStart(*parent_);
 5854|       |
 5855|       |  // How many times to repeat the tests?  We don't want to repeat them
 5856|       |  // when we are inside the subprocess of a death test.
 5857|      2|  const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG_GET(repeat);
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  |  Branch (5857:22): [True: 0, False: 2]
  ------------------
 5858|       |
 5859|       |  // Repeats forever if the repeat count is negative.
 5860|      2|  const bool gtest_repeat_forever = repeat < 0;
 5861|       |
 5862|       |  // Should test environments be set up and torn down for each repeat, or only
 5863|       |  // set up on the first and torn down on the last iteration? If there is no
 5864|       |  // "last" iteration because the tests will repeat forever, always recreate the
 5865|       |  // environments to avoid leaks in case one of the environments is using
 5866|       |  // resources that are external to this process. Without this check there would
 5867|       |  // be no way to clean up those external resources automatically.
 5868|      2|  const bool recreate_environments_when_repeating =
 5869|      2|      GTEST_FLAG_GET(recreate_environments_when_repeating) ||
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 5870|      2|      gtest_repeat_forever;
  ------------------
  |  Branch (5870:7): [True: 0, False: 2]
  ------------------
 5871|       |
 5872|      4|  for (int i = 0; gtest_repeat_forever || i != repeat; i++) {
  ------------------
  |  Branch (5872:19): [True: 2, False: 2]
  |  Branch (5872:43): [True: 2, False: 0]
  ------------------
 5873|       |    // We want to preserve failures generated by ad-hoc test
 5874|       |    // assertions executed before RUN_ALL_TESTS().
 5875|      2|    ClearNonAdHocTestResult();
 5876|       |
 5877|      2|    Timer timer;
 5878|       |
 5879|       |    // Shuffles test suites and tests if requested.
 5880|      2|    if (has_tests_to_run && GTEST_FLAG_GET(shuffle)) {
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (5880:9): [True: 2, False: 0]
  ------------------
 5881|      0|      random()->Reseed(static_cast<uint32_t>(random_seed_));
 5882|       |      // This should be done before calling OnTestIterationStart(),
 5883|       |      // such that a test event listener can see the actual test order
 5884|       |      // in the event.
 5885|      0|      ShuffleTests();
 5886|      0|    }
 5887|       |
 5888|       |    // Tells the unit test event listeners that the tests are about to start.
 5889|      2|    repeater->OnTestIterationStart(*parent_, i);
 5890|       |
 5891|       |    // Runs each test suite if there is at least one test to run.
 5892|      2|    if (has_tests_to_run) {
  ------------------
  |  Branch (5892:9): [True: 2, False: 0]
  ------------------
 5893|       |      // Sets up all environments beforehand. If test environments aren't
 5894|       |      // recreated for each iteration, only do so on the first iteration.
 5895|      2|      if (i == 0 || recreate_environments_when_repeating) {
  ------------------
  |  Branch (5895:11): [True: 2, False: 0]
  |  Branch (5895:21): [True: 0, False: 0]
  ------------------
 5896|      2|        repeater->OnEnvironmentsSetUpStart(*parent_);
 5897|      2|        ForEach(environments_, SetUpEnvironment);
 5898|      2|        repeater->OnEnvironmentsSetUpEnd(*parent_);
 5899|      2|      }
 5900|       |
 5901|       |      // Runs the tests only if there was no fatal failure or skip triggered
 5902|       |      // during global set-up.
 5903|      2|      if (Test::IsSkipped()) {
  ------------------
  |  Branch (5903:11): [True: 0, False: 2]
  ------------------
 5904|       |        // Emit diagnostics when global set-up calls skip, as it will not be
 5905|       |        // emitted by default.
 5906|      0|        TestResult& test_result =
 5907|      0|            *internal::GetUnitTestImpl()->current_test_result();
 5908|      0|        for (int j = 0; j < test_result.total_part_count(); ++j) {
  ------------------
  |  Branch (5908:25): [True: 0, False: 0]
  ------------------
 5909|      0|          const TestPartResult& test_part_result =
 5910|      0|              test_result.GetTestPartResult(j);
 5911|      0|          if (test_part_result.type() == TestPartResult::kSkip) {
  ------------------
  |  Branch (5911:15): [True: 0, False: 0]
  ------------------
 5912|      0|            const std::string& result = test_part_result.message();
 5913|      0|            printf("%s\n", result.c_str());
 5914|      0|          }
 5915|      0|        }
 5916|      0|        fflush(stdout);
 5917|      2|      } else if (!Test::HasFatalFailure()) {
  ------------------
  |  Branch (5917:18): [True: 2, False: 0]
  ------------------
 5918|      4|        for (int test_index = 0; test_index < total_test_suite_count();
  ------------------
  |  Branch (5918:34): [True: 2, False: 2]
  ------------------
 5919|      2|             test_index++) {
 5920|      2|          GetMutableSuiteCase(test_index)->Run();
 5921|      2|          if (GTEST_FLAG_GET(fail_fast) &&
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 5922|      0|              GetMutableSuiteCase(test_index)->Failed()) {
  ------------------
  |  Branch (5922:15): [True: 0, False: 0]
  ------------------
 5923|      0|            for (int j = test_index + 1; j < total_test_suite_count(); j++) {
  ------------------
  |  Branch (5923:42): [True: 0, False: 0]
  ------------------
 5924|      0|              GetMutableSuiteCase(j)->Skip();
 5925|      0|            }
 5926|      0|            break;
 5927|      0|          }
 5928|      2|        }
 5929|      2|      } else if (Test::HasFatalFailure()) {
  ------------------
  |  Branch (5929:18): [True: 0, False: 0]
  ------------------
 5930|       |        // If there was a fatal failure during the global setup then we know we
 5931|       |        // aren't going to run any tests. Explicitly mark all of the tests as
 5932|       |        // skipped to make this obvious in the output.
 5933|      0|        for (int test_index = 0; test_index < total_test_suite_count();
  ------------------
  |  Branch (5933:34): [True: 0, False: 0]
  ------------------
 5934|      0|             test_index++) {
 5935|      0|          GetMutableSuiteCase(test_index)->Skip();
 5936|      0|        }
 5937|      0|      }
 5938|       |
 5939|       |      // Tears down all environments in reverse order afterwards. If test
 5940|       |      // environments aren't recreated for each iteration, only do so on the
 5941|       |      // last iteration.
 5942|      2|      if (i == repeat - 1 || recreate_environments_when_repeating) {
  ------------------
  |  Branch (5942:11): [True: 2, False: 0]
  |  Branch (5942:30): [True: 0, False: 0]
  ------------------
 5943|      0|        repeater->OnEnvironmentsTearDownStart(*parent_);
 5944|      0|        std::for_each(environments_.rbegin(), environments_.rend(),
 5945|      0|                      TearDownEnvironment);
 5946|      0|        repeater->OnEnvironmentsTearDownEnd(*parent_);
 5947|      0|      }
 5948|      2|    }
 5949|       |
 5950|      2|    elapsed_time_ = timer.Elapsed();
 5951|       |
 5952|       |    // Tells the unit test event listener that the tests have just finished.
 5953|      2|    repeater->OnTestIterationEnd(*parent_, i);
 5954|       |
 5955|       |    // Gets the result and clears it.
 5956|      2|    if (!Passed()) {
  ------------------
  |  Branch (5956:9): [True: 0, False: 2]
  ------------------
 5957|      0|      failed = true;
 5958|      0|    }
 5959|       |
 5960|       |    // Restores the original test order after the iteration.  This
 5961|       |    // allows the user to quickly repro a failure that happens in the
 5962|       |    // N-th iteration without repeating the first (N - 1) iterations.
 5963|       |    // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in
 5964|       |    // case the user somehow changes the value of the flag somewhere
 5965|       |    // (it's always safe to unshuffle the tests).
 5966|      2|    UnshuffleTests();
 5967|       |
 5968|      2|    if (GTEST_FLAG_GET(shuffle)) {
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 5969|       |      // Picks a new random seed for each iteration.
 5970|      0|      random_seed_ = GetNextRandomSeed(random_seed_);
 5971|      0|    }
 5972|      2|  }
 5973|       |
 5974|      2|  repeater->OnTestProgramEnd(*parent_);
 5975|       |
 5976|      2|  if (!gtest_is_initialized_before_run_all_tests) {
  ------------------
  |  Branch (5976:7): [True: 0, False: 2]
  ------------------
 5977|      0|    ColoredPrintf(
 5978|      0|        GTestColor::kRed,
 5979|      0|        "\nIMPORTANT NOTICE - DO NOT IGNORE:\n"
 5980|      0|        "This test program did NOT call " GTEST_INIT_GOOGLE_TEST_NAME_
 5981|      0|        "() before calling RUN_ALL_TESTS(). This is INVALID. Soon " GTEST_NAME_
 5982|      0|        " will start to enforce the valid usage. "
 5983|      0|        "Please fix it ASAP, or IT WILL START TO FAIL.\n");  // NOLINT
 5984|      0|  }
 5985|       |
 5986|      2|  return !failed;
 5987|      2|}
_ZN7testing8internal30WriteToShardStatusFileIfNeededEv:
 5994|      2|void WriteToShardStatusFileIfNeeded() {
 5995|      2|  const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);
 5996|      2|  if (test_shard_file != nullptr) {
  ------------------
  |  Branch (5996:7): [True: 0, False: 2]
  ------------------
 5997|      0|    FILE* const file = posix::FOpen(test_shard_file, "w");
 5998|      0|    if (file == nullptr) {
  ------------------
  |  Branch (5998:9): [True: 0, False: 0]
  ------------------
 5999|      0|      ColoredPrintf(GTestColor::kRed,
 6000|      0|                    "Could not write to the test shard status file \"%s\" "
 6001|      0|                    "specified by the %s environment variable.\n",
 6002|      0|                    test_shard_file, kTestShardStatusFile);
 6003|      0|      fflush(stdout);
 6004|      0|      exit(EXIT_FAILURE);
 6005|      0|    }
 6006|      0|    fclose(file);
 6007|      0|  }
 6008|      2|}
_ZN7testing8internal11ShouldShardEPKcS2_b:
 6018|      4|                 bool in_subprocess_for_death_test) {
 6019|      4|  if (in_subprocess_for_death_test) {
  ------------------
  |  Branch (6019:7): [True: 0, False: 4]
  ------------------
 6020|      0|    return false;
 6021|      0|  }
 6022|       |
 6023|      4|  const int32_t total_shards = Int32FromEnvOrDie(total_shards_env, -1);
 6024|      4|  const int32_t shard_index = Int32FromEnvOrDie(shard_index_env, -1);
 6025|       |
 6026|      4|  if (total_shards == -1 && shard_index == -1) {
  ------------------
  |  Branch (6026:7): [True: 4, False: 0]
  |  Branch (6026:29): [True: 4, False: 0]
  ------------------
 6027|      4|    return false;
 6028|      4|  } else if (total_shards == -1 && shard_index != -1) {
  ------------------
  |  Branch (6028:14): [True: 0, False: 0]
  |  Branch (6028:36): [True: 0, False: 0]
  ------------------
 6029|      0|    const Message msg = Message() << "Invalid environment variables: you have "
 6030|      0|                                  << kTestShardIndex << " = " << shard_index
 6031|      0|                                  << ", but have left " << kTestTotalShards
 6032|      0|                                  << " unset.\n";
 6033|      0|    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
 6034|      0|    fflush(stdout);
 6035|      0|    exit(EXIT_FAILURE);
 6036|      0|  } else if (total_shards != -1 && shard_index == -1) {
  ------------------
  |  Branch (6036:14): [True: 0, False: 0]
  |  Branch (6036:36): [True: 0, False: 0]
  ------------------
 6037|      0|    const Message msg = Message()
 6038|      0|                        << "Invalid environment variables: you have "
 6039|      0|                        << kTestTotalShards << " = " << total_shards
 6040|      0|                        << ", but have left " << kTestShardIndex << " unset.\n";
 6041|      0|    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
 6042|      0|    fflush(stdout);
 6043|      0|    exit(EXIT_FAILURE);
 6044|      0|  } else if (shard_index < 0 || shard_index >= total_shards) {
  ------------------
  |  Branch (6044:14): [True: 0, False: 0]
  |  Branch (6044:33): [True: 0, False: 0]
  ------------------
 6045|      0|    const Message msg =
 6046|      0|        Message() << "Invalid environment variables: we require 0 <= "
 6047|      0|                  << kTestShardIndex << " < " << kTestTotalShards
 6048|      0|                  << ", but you have " << kTestShardIndex << "=" << shard_index
 6049|      0|                  << ", " << kTestTotalShards << "=" << total_shards << ".\n";
 6050|      0|    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
 6051|      0|    fflush(stdout);
 6052|      0|    exit(EXIT_FAILURE);
 6053|      0|  }
 6054|       |
 6055|      0|  return total_shards > 1;
 6056|      4|}
_ZN7testing8internal17Int32FromEnvOrDieEPKci:
 6061|      8|int32_t Int32FromEnvOrDie(const char* var, int32_t default_val) {
 6062|      8|  const char* str_val = posix::GetEnv(var);
 6063|      8|  if (str_val == nullptr) {
  ------------------
  |  Branch (6063:7): [True: 8, False: 0]
  ------------------
 6064|      8|    return default_val;
 6065|      8|  }
 6066|       |
 6067|      0|  int32_t result;
 6068|      0|  if (!ParseInt32(Message() << "The value of environment variable " << var,
  ------------------
  |  Branch (6068:7): [True: 0, False: 0]
  ------------------
 6069|      0|                  str_val, &result)) {
 6070|      0|    exit(EXIT_FAILURE);
 6071|      0|  }
 6072|      0|  return result;
 6073|      0|}
_ZN7testing8internal12UnitTestImpl11FilterTestsENS1_18ReactionToShardingE:
 6090|      2|int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
 6091|      2|  const int32_t total_shards = shard_tests == HONOR_SHARDING_PROTOCOL
  ------------------
  |  Branch (6091:32): [True: 0, False: 2]
  ------------------
 6092|      2|                                   ? Int32FromEnvOrDie(kTestTotalShards, -1)
 6093|      2|                                   : -1;
 6094|      2|  const int32_t shard_index = shard_tests == HONOR_SHARDING_PROTOCOL
  ------------------
  |  Branch (6094:31): [True: 0, False: 2]
  ------------------
 6095|      2|                                  ? Int32FromEnvOrDie(kTestShardIndex, -1)
 6096|      2|                                  : -1;
 6097|       |
 6098|      2|  const PositiveAndNegativeUnitTestFilter gtest_flag_filter(
 6099|      2|      GTEST_FLAG_GET(filter));
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 6100|      2|  const UnitTestFilter disable_test_filter(kDisableTestFilter);
 6101|       |  // num_runnable_tests are the number of tests that will
 6102|       |  // run across all shards (i.e., match filter and are not disabled).
 6103|       |  // num_selected_tests are the number of tests to be run on
 6104|       |  // this shard.
 6105|      2|  int num_runnable_tests = 0;
 6106|      2|  int num_selected_tests = 0;
 6107|      2|  for (auto* test_suite : test_suites_) {
  ------------------
  |  Branch (6107:25): [True: 2, False: 2]
  ------------------
 6108|      2|    const std::string& test_suite_name = test_suite->name();
 6109|      2|    test_suite->set_should_run(false);
 6110|       |
 6111|      4|    for (size_t j = 0; j < test_suite->test_info_list().size(); j++) {
  ------------------
  |  Branch (6111:24): [True: 2, False: 2]
  ------------------
 6112|      2|      TestInfo* const test_info = test_suite->test_info_list()[j];
 6113|      2|      const std::string test_name(test_info->name());
 6114|       |      // A test is disabled if test suite name or test name matches
 6115|       |      // kDisableTestFilter.
 6116|      2|      const bool is_disabled =
 6117|      2|          disable_test_filter.MatchesName(test_suite_name) ||
  ------------------
  |  Branch (6117:11): [True: 0, False: 2]
  ------------------
 6118|      2|          disable_test_filter.MatchesName(test_name);
  ------------------
  |  Branch (6118:11): [True: 0, False: 2]
  ------------------
 6119|      2|      test_info->is_disabled_ = is_disabled;
 6120|       |
 6121|      2|      const bool matches_filter =
 6122|      2|          gtest_flag_filter.MatchesTest(test_suite_name, test_name);
 6123|      2|      test_info->matches_filter_ = matches_filter;
 6124|       |
 6125|      2|      const bool is_runnable =
 6126|      2|          (GTEST_FLAG_GET(also_run_disabled_tests) || !is_disabled) &&
  ------------------
  |  | 2293|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2226|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2293:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (6126:55): [True: 2, False: 0]
  ------------------
 6127|      2|          matches_filter;
  ------------------
  |  Branch (6127:11): [True: 2, False: 0]
  ------------------
 6128|       |
 6129|      2|      const bool is_in_another_shard =
 6130|      2|          shard_tests != IGNORE_SHARDING_PROTOCOL &&
  ------------------
  |  Branch (6130:11): [True: 0, False: 2]
  ------------------
 6131|      0|          !ShouldRunTestOnShard(total_shards, shard_index, num_runnable_tests);
  ------------------
  |  Branch (6131:11): [True: 0, False: 0]
  ------------------
 6132|      2|      test_info->is_in_another_shard_ = is_in_another_shard;
 6133|      2|      const bool is_selected = is_runnable && !is_in_another_shard;
  ------------------
  |  Branch (6133:32): [True: 2, False: 0]
  |  Branch (6133:47): [True: 2, False: 0]
  ------------------
 6134|       |
 6135|      2|      num_runnable_tests += is_runnable;
 6136|      2|      num_selected_tests += is_selected;
 6137|       |
 6138|      2|      test_info->should_run_ = is_selected;
 6139|      2|      test_suite->set_should_run(test_suite->should_run() || is_selected);
  ------------------
  |  Branch (6139:34): [True: 0, False: 2]
  |  Branch (6139:62): [True: 2, False: 0]
  ------------------
 6140|      2|    }
 6141|      2|  }
 6142|      2|  return num_selected_tests;
 6143|      2|}
_ZN7testing8internal12UnitTestImpl21os_stack_trace_getterEv:
 6238|      8|OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
 6239|      8|  if (os_stack_trace_getter_ == nullptr) {
  ------------------
  |  Branch (6239:7): [True: 2, False: 6]
  ------------------
 6240|       |#ifdef GTEST_OS_STACK_TRACE_GETTER_
 6241|       |    os_stack_trace_getter_ = new GTEST_OS_STACK_TRACE_GETTER_;
 6242|       |#else
 6243|      2|    os_stack_trace_getter_ = new OsStackTraceGetter;
 6244|      2|#endif  // GTEST_OS_STACK_TRACE_GETTER_
 6245|      2|  }
 6246|       |
 6247|      8|  return os_stack_trace_getter_;
 6248|      8|}
_ZN7testing8internal12UnitTestImpl19current_test_resultEv:
 6251|     12|TestResult* UnitTestImpl::current_test_result() {
 6252|     12|  if (current_test_info_ != nullptr) {
  ------------------
  |  Branch (6252:7): [True: 8, False: 4]
  ------------------
 6253|      8|    return &current_test_info_->result_;
 6254|      8|  }
 6255|      4|  if (current_test_suite_ != nullptr) {
  ------------------
  |  Branch (6255:7): [True: 0, False: 4]
  ------------------
 6256|      0|    return &current_test_suite_->ad_hoc_test_result_;
 6257|      0|  }
 6258|      4|  return &ad_hoc_test_result_;
 6259|      4|}
_ZN7testing8internal6IsTrueEb:
 6310|     18|bool IsTrue(bool condition) { return condition; }
_ZN7testing8internal10AlwaysTrueEv:
 6312|     12|bool AlwaysTrue() {
 6313|     12|#if GTEST_HAS_EXCEPTIONS
 6314|       |  // This condition is always false so AlwaysTrue() never actually throws,
 6315|       |  // but it makes the compiler think that it may throw.
 6316|     12|  if (IsTrue(false)) throw ClassUniqueToAlwaysTrue();
  ------------------
  |  Branch (6316:7): [True: 0, False: 12]
  ------------------
 6317|     12|#endif  // GTEST_HAS_EXCEPTIONS
 6318|     12|  return true;
 6319|     12|}
_ZN7testing8internal10SkipPrefixEPKcPS2_:
 6324|     73|bool SkipPrefix(const char* prefix, const char** pstr) {
 6325|     73|  const size_t prefix_len = strlen(prefix);
 6326|     73|  if (strncmp(*pstr, prefix, prefix_len) == 0) {
  ------------------
  |  Branch (6326:7): [True: 15, False: 58]
  ------------------
 6327|     15|    *pstr += prefix_len;
 6328|     15|    return true;
 6329|     15|  }
 6330|     58|  return false;
 6331|     73|}
_ZN7testing8internal9ParseFlagEPKcS2_Pi:
 6392|     45|bool ParseFlag(const char* str, const char* flag_name, int32_t* value) {
 6393|       |  // Gets the value of the flag as a string.
 6394|     45|  const char* const value_str = ParseFlagValue(str, flag_name, false);
 6395|       |
 6396|       |  // Aborts if the parsing failed.
 6397|     45|  if (value_str == nullptr) return false;
  ------------------
  |  Branch (6397:7): [True: 45, False: 0]
  ------------------
 6398|       |
 6399|       |  // Sets *value to the value of the flag.
 6400|      0|  return ParseInt32(Message() << "The value of flag --" << flag_name, value_str,
 6401|      0|                    value);
 6402|     45|}
_ZN7testing8internal24ParseGoogleTestFlagsOnlyEPiPPc:
 6685|      2|void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
 6686|       |#ifdef GTEST_HAS_ABSL
 6687|       |  if (*argc <= 0) return;
 6688|       |
 6689|       |  std::vector<char*> positional_args;
 6690|       |  std::vector<absl::UnrecognizedFlag> unrecognized_flags;
 6691|       |  absl::ParseAbseilFlagsOnly(*argc, argv, positional_args, unrecognized_flags);
 6692|       |  absl::flat_hash_set<absl::string_view> unrecognized;
 6693|       |  for (const auto& flag : unrecognized_flags) {
 6694|       |    unrecognized.insert(flag.flag_name);
 6695|       |  }
 6696|       |  absl::flat_hash_set<char*> positional;
 6697|       |  for (const auto& arg : positional_args) {
 6698|       |    positional.insert(arg);
 6699|       |  }
 6700|       |
 6701|       |  int out_pos = 1;
 6702|       |  int in_pos = 1;
 6703|       |  for (; in_pos < *argc; ++in_pos) {
 6704|       |    char* arg = argv[in_pos];
 6705|       |    absl::string_view arg_str(arg);
 6706|       |    if (absl::ConsumePrefix(&arg_str, "--")) {
 6707|       |      // Flag-like argument. If the flag was unrecognized, keep it.
 6708|       |      // If it was a GoogleTest flag, remove it.
 6709|       |      if (unrecognized.contains(arg_str)) {
 6710|       |        argv[out_pos++] = argv[in_pos];
 6711|       |        continue;
 6712|       |      }
 6713|       |    }
 6714|       |
 6715|       |    if (arg_str.empty()) {
 6716|       |      ++in_pos;
 6717|       |      break;  // '--' indicates that the rest of the arguments are positional
 6718|       |    }
 6719|       |
 6720|       |    // Probably a positional argument. If it is in fact positional, keep it.
 6721|       |    // If it was a value for the flag argument, remove it.
 6722|       |    if (positional.contains(arg)) {
 6723|       |      argv[out_pos++] = arg;
 6724|       |    }
 6725|       |  }
 6726|       |
 6727|       |  // The rest are positional args for sure.
 6728|       |  while (in_pos < *argc) {
 6729|       |    argv[out_pos++] = argv[in_pos++];
 6730|       |  }
 6731|       |
 6732|       |  *argc = out_pos;
 6733|       |  argv[out_pos] = nullptr;
 6734|       |#else
 6735|      2|  ParseGoogleTestFlagsOnlyImpl(argc, argv);
 6736|      2|#endif
 6737|       |
 6738|       |  // Fix the value of *_NSGetArgc() on macOS, but if and only if
 6739|       |  // *_NSGetArgv() == argv
 6740|       |  // Only applicable to char** version of argv
 6741|       |#ifdef GTEST_OS_MAC
 6742|       |#ifndef GTEST_OS_IOS
 6743|       |  if (*_NSGetArgv() == argv) {
 6744|       |    *_NSGetArgc() = *argc;
 6745|       |  }
 6746|       |#endif
 6747|       |#endif
 6748|      2|}
_ZN7testing14InitGoogleTestEPiPPc:
 6794|      2|void InitGoogleTest(int* argc, char** argv) {
 6795|       |#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
 6796|       |  GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);
 6797|       |#else   // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
 6798|      2|  internal::InitGoogleTestImpl(argc, argv);
 6799|      2|#endif  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
 6800|      2|}
gtest-all.cc:_ZN7testingL18GetDefaultFailFastEv:
  239|      2|static bool GetDefaultFailFast() {
  240|      2|  const char* const testbridge_test_runner_fail_fast =
  241|      2|      internal::posix::GetEnv("TESTBRIDGE_TEST_RUNNER_FAIL_FAST");
  242|      2|  if (testbridge_test_runner_fail_fast != nullptr) {
  ------------------
  |  Branch (242:7): [True: 0, False: 2]
  ------------------
  243|      0|    return strcmp(testbridge_test_runner_fail_fast, "1") == 0;
  244|      0|  }
  245|      2|  return false;
  246|      2|}
gtest-all.cc:_ZN7testingL16GetDefaultFilterEv:
  228|      2|static const char* GetDefaultFilter() {
  229|      2|  const char* const testbridge_test_only =
  230|      2|      internal::posix::GetEnv("TESTBRIDGE_TEST_ONLY");
  231|      2|  if (testbridge_test_only != nullptr) {
  ------------------
  |  Branch (231:7): [True: 0, False: 2]
  ------------------
  232|      0|    return testbridge_test_only;
  233|      0|  }
  234|      2|  return kUniversalFilter;
  235|      2|}
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  762|      6|  explicit UnitTestFilter(const std::string& filter) {
  763|       |    // By design "" filter matches "" string.
  764|      6|    std::vector<std::string> all_patterns;
  765|      6|    SplitString(filter, ':', &all_patterns);
  766|      6|    const auto exact_match_patterns_begin = std::partition(
  767|      6|        all_patterns.begin(), all_patterns.end(), &IsGlobPattern);
  768|       |
  769|      6|    glob_patterns_.reserve(static_cast<size_t>(
  770|      6|        std::distance(all_patterns.begin(), exact_match_patterns_begin)));
  771|      6|    std::move(all_patterns.begin(), exact_match_patterns_begin,
  772|      6|              std::inserter(glob_patterns_, glob_patterns_.begin()));
  773|      6|    std::move(
  774|      6|        exact_match_patterns_begin, all_patterns.end(),
  775|      6|        std::inserter(exact_match_patterns_, exact_match_patterns_.begin()));
  776|      6|  }
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_113IsGlobPatternERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  752|     10|bool IsGlobPattern(const std::string& pattern) {
  753|     10|  return std::any_of(pattern.begin(), pattern.end(),
  754|     10|                     [](const char c) { return c == '?' || c == '*'; });
  755|     10|}
gtest-all.cc:_ZZN7testing8internal12_GLOBAL__N_113IsGlobPatternERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENK3$_0clEc:
  754|     84|                     [](const char c) { return c == '?' || c == '*'; });
  ------------------
  |  Branch (754:48): [True: 0, False: 84]
  |  Branch (754:60): [True: 8, False: 76]
  ------------------
gtest-all.cc:_ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  780|     10|  bool MatchesName(const std::string& name) const {
  781|     10|    return exact_match_patterns_.count(name) > 0 ||
  ------------------
  |  Branch (781:12): [True: 2, False: 8]
  ------------------
  782|      8|           std::any_of(glob_patterns_.begin(), glob_patterns_.end(),
  ------------------
  |  Branch (782:12): [True: 0, False: 8]
  ------------------
  783|      8|                       [&name](const std::string& pattern) {
  784|      8|                         return PatternMatchesString(
  785|      8|                             name, pattern.c_str(),
  786|      8|                             pattern.c_str() + pattern.size());
  787|      8|                       });
  788|     10|  }
gtest-all.cc:_ZZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEENKUlSB_E_clESB_:
  783|     12|                       [&name](const std::string& pattern) {
  784|     12|                         return PatternMatchesString(
  785|     12|                             name, pattern.c_str(),
  786|     12|                             pattern.c_str() + pattern.size());
  787|     12|                       });
gtest-all.cc:_ZN7testing8internalL20PatternMatchesStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKcSB_:
  704|     12|                                 const char* pattern, const char* pattern_end) {
  705|     12|  const char* name = name_str.c_str();
  706|     12|  const char* const name_begin = name;
  707|     12|  const char* const name_end = name + name_str.size();
  708|       |
  709|     12|  const char* pattern_next = pattern;
  710|     12|  const char* name_next = name;
  711|       |
  712|    288|  while (pattern < pattern_end || name < name_end) {
  ------------------
  |  Branch (712:10): [True: 288, False: 0]
  |  Branch (712:35): [True: 0, False: 0]
  ------------------
  713|    288|    if (pattern < pattern_end) {
  ------------------
  |  Branch (713:9): [True: 288, False: 0]
  ------------------
  714|    288|      switch (*pattern) {
  715|    152|        default:  // Match an ordinary character.
  ------------------
  |  Branch (715:9): [True: 152, False: 136]
  ------------------
  716|    152|          if (name < name_end && *name == *pattern) {
  ------------------
  |  Branch (716:15): [True: 144, False: 8]
  |  Branch (716:34): [True: 12, False: 132]
  ------------------
  717|     12|            ++pattern;
  718|     12|            ++name;
  719|     12|            continue;
  720|     12|          }
  721|    140|          break;
  722|    140|        case '?':  // Match any single character.
  ------------------
  |  Branch (722:9): [True: 0, False: 288]
  ------------------
  723|      0|          if (name < name_end) {
  ------------------
  |  Branch (723:15): [True: 0, False: 0]
  ------------------
  724|      0|            ++pattern;
  725|      0|            ++name;
  726|      0|            continue;
  727|      0|          }
  728|      0|          break;
  729|    136|        case '*':
  ------------------
  |  Branch (729:9): [True: 136, False: 152]
  ------------------
  730|       |          // Match zero or more characters. Start by skipping over the wildcard
  731|       |          // and matching zero characters from name. If that fails, restart and
  732|       |          // match one more character than the last attempt.
  733|    136|          pattern_next = pattern;
  734|    136|          name_next = name + 1;
  735|    136|          ++pattern;
  736|    136|          continue;
  737|    288|      }
  738|    288|    }
  739|       |    // Failed to match a character. Restart if possible.
  740|    140|    if (name_begin < name_next && name_next <= name_end) {
  ------------------
  |  Branch (740:9): [True: 136, False: 4]
  |  Branch (740:35): [True: 128, False: 8]
  ------------------
  741|    128|      pattern = pattern_next;
  742|    128|      name = name_next;
  743|    128|      continue;
  744|    128|    }
  745|     12|    return false;
  746|    140|  }
  747|      0|  return true;
  748|     12|}
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  802|      2|  explicit PositiveAndNegativeUnitTestFilter(const std::string& filter) {
  803|      2|    std::vector<std::string> positive_and_negative_filters;
  804|       |
  805|       |    // NOTE: `SplitString` always returns a non-empty container.
  806|      2|    SplitString(filter, '-', &positive_and_negative_filters);
  807|      2|    const auto& positive_filter = positive_and_negative_filters.front();
  808|       |
  809|      2|    if (positive_and_negative_filters.size() > 1) {
  ------------------
  |  Branch (809:9): [True: 0, False: 2]
  ------------------
  810|      0|      positive_filter_ = UnitTestFilter(
  811|      0|          positive_filter.empty() ? kUniversalFilter : positive_filter);
  ------------------
  |  Branch (811:11): [True: 0, False: 0]
  ------------------
  812|       |
  813|       |      // TODO(b/214626361): Fail on multiple '-' characters
  814|       |      // For the moment to preserve old behavior we concatenate the rest of the
  815|       |      // string parts with `-` as separator to generate the negative filter.
  816|      0|      auto negative_filter_string = positive_and_negative_filters[1];
  817|      0|      for (std::size_t i = 2; i < positive_and_negative_filters.size(); i++)
  ------------------
  |  Branch (817:31): [True: 0, False: 0]
  ------------------
  818|      0|        negative_filter_string =
  819|      0|            negative_filter_string + '-' + positive_and_negative_filters[i];
  820|      0|      negative_filter_ = UnitTestFilter(negative_filter_string);
  821|      2|    } else {
  822|       |      // In case we don't have a negative filter and positive filter is ""
  823|       |      // we do not use kUniversalFilter by design as opposed to when we have a
  824|       |      // negative filter.
  825|      2|      positive_filter_ = UnitTestFilter(positive_filter);
  826|      2|    }
  827|      2|  }
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2Ev:
  759|      4|  UnitTestFilter() = default;
gtest-all.cc:_ZNK7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilter11MatchesTestERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_:
  833|      2|                   const std::string& test_name) const {
  834|      2|    return MatchesName(test_suite_name + "." + test_name);
  835|      2|  }
gtest-all.cc:_ZNK7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilter11MatchesNameERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  839|      2|  bool MatchesName(const std::string& name) const {
  840|      2|    return positive_filter_.MatchesName(name) &&
  ------------------
  |  Branch (840:12): [True: 2, False: 0]
  ------------------
  841|      2|           !negative_filter_.MatchesName(name);
  ------------------
  |  Branch (841:12): [True: 2, False: 0]
  ------------------
  842|      2|  }
gtest-all.cc:_ZN7testing8internalL18ShouldRunTestSuiteEPKNS_9TestSuiteE:
  445|      2|static bool ShouldRunTestSuite(const TestSuite* test_suite) {
  446|      2|  return test_suite->should_run();
  447|      2|}
gtest-all.cc:_ZN7testing8internalL20SumOverTestSuiteListERKNSt3__16vectorIPNS_9TestSuiteENS1_9allocatorIS4_EEEEMS3_KFivE:
  425|      2|                                int (TestSuite::*method)() const) {
  426|      2|  int sum = 0;
  427|      4|  for (size_t i = 0; i < case_list.size(); i++) {
  ------------------
  |  Branch (427:22): [True: 2, False: 2]
  ------------------
  428|      2|    sum += (case_list[i]->*method)();
  429|      2|  }
  430|      2|  return sum;
  431|      2|}
_ZN7testing8internal5TimerC2Ev:
 1151|      6|  Timer() : start_(clock::now()) {}
gtest-all.cc:_ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz:
 3279|     10|static void ColoredPrintf(GTestColor color, const char* fmt, ...) {
 3280|     10|  va_list args;
 3281|     10|  va_start(args, fmt);
 3282|       |
 3283|     10|  static const bool in_color_mode =
 3284|     10|#if GTEST_HAS_FILE_SYSTEM
 3285|     10|      ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);
 3286|       |#else
 3287|       |      false;
 3288|       |#endif  // GTEST_HAS_FILE_SYSTEM
 3289|       |
 3290|     10|  const bool use_color = in_color_mode && (color != GTestColor::kDefault);
  ------------------
  |  Branch (3290:26): [True: 0, False: 10]
  |  Branch (3290:43): [True: 0, False: 0]
  ------------------
 3291|       |
 3292|     10|  if (!use_color) {
  ------------------
  |  Branch (3292:7): [True: 10, False: 0]
  ------------------
 3293|     10|    vprintf(fmt, args);
 3294|     10|    va_end(args);
 3295|     10|    return;
 3296|     10|  }
 3297|       |
 3298|       |#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MOBILE) &&    \
 3299|       |    !defined(GTEST_OS_WINDOWS_PHONE) && !defined(GTEST_OS_WINDOWS_RT) && \
 3300|       |    !defined(GTEST_OS_WINDOWS_MINGW)
 3301|       |  const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
 3302|       |
 3303|       |  // Gets the current text color.
 3304|       |  CONSOLE_SCREEN_BUFFER_INFO buffer_info;
 3305|       |  GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);
 3306|       |  const WORD old_color_attrs = buffer_info.wAttributes;
 3307|       |  const WORD new_color = GetNewColor(color, old_color_attrs);
 3308|       |
 3309|       |  // We need to flush the stream buffers into the console before each
 3310|       |  // SetConsoleTextAttribute call lest it affect the text that is already
 3311|       |  // printed but has not yet reached the console.
 3312|       |  fflush(stdout);
 3313|       |  SetConsoleTextAttribute(stdout_handle, new_color);
 3314|       |
 3315|       |  vprintf(fmt, args);
 3316|       |
 3317|       |  fflush(stdout);
 3318|       |  // Restores the text color.
 3319|       |  SetConsoleTextAttribute(stdout_handle, old_color_attrs);
 3320|       |#else
 3321|      0|  printf("\033[0;3%sm", GetAnsiColorCode(color));
 3322|      0|  vprintf(fmt, args);
 3323|      0|  printf("\033[m");  // Resets the terminal to default.
 3324|      0|#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
 3325|       |  va_end(args);
 3326|      0|}
gtest-all.cc:_ZN7testingL15FormatTestCountEi:
 3101|      2|static std::string FormatTestCount(int test_count) {
 3102|      2|  return FormatCountableNoun(test_count, "test", "tests");
 3103|      2|}
gtest-all.cc:_ZN7testingL20FormatTestSuiteCountEi:
 3106|      2|static std::string FormatTestSuiteCount(int test_suite_count) {
 3107|      2|  return FormatCountableNoun(test_suite_count, "test suite", "test suites");
 3108|      2|}
gtest-all.cc:_ZN7testingL19FormatCountableNounEiPKcS1_:
 3095|      6|                                       const char* plural_form) {
 3096|      6|  return internal::StreamableToString(count) + " " +
 3097|      6|         (count == 1 ? singular_form : plural_form);
  ------------------
  |  Branch (3097:11): [True: 6, False: 0]
  ------------------
 3098|      6|}
_ZN7testing8internal27PrettyUnitTestResultPrinter13PrintTestNameEPKcS3_:
 3355|      2|  static void PrintTestName(const char* test_suite, const char* test) {
 3356|      2|    printf("%s.%s", test_suite, test);
 3357|      2|  }
_ZN7testing8internal17TestEventRepeaterC2Ev:
 3767|      2|  TestEventRepeater() : forwarding_enabled_(true) {}
_ZN7testing8internal23ScopedPrematureExitFileC2EPKc:
 5039|      2|      : premature_exit_filepath_(
 5040|      2|            premature_exit_filepath ? premature_exit_filepath : "") {
  ------------------
  |  Branch (5040:13): [True: 0, False: 2]
  ------------------
 5041|       |    // If a path to the premature-exit file is specified...
 5042|      2|    if (!premature_exit_filepath_.empty()) {
  ------------------
  |  Branch (5042:9): [True: 0, False: 2]
  ------------------
 5043|       |      // create the file with a single "0" character in it.  I/O
 5044|       |      // errors are ignored as there's nothing better we can do and we
 5045|       |      // don't want to fail the test because of this.
 5046|      0|      FILE* pfile = posix::FOpen(premature_exit_filepath_.c_str(), "w");
 5047|      0|      fwrite("0", 1, 1, pfile);
 5048|      0|      fclose(pfile);
 5049|      0|    }
 5050|      2|  }
_ZN7testing8internal27PrettyUnitTestResultPrinterC2Ev:
 3354|      2|  PrettyUnitTestResultPrinter() = default;
_ZN7testing8internal15TestSuiteNameIsC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
 5725|      2|  explicit TestSuiteNameIs(const std::string& name) : name_(name) {}
gtest-all.cc:_ZN7testing8internalL18GTestIsInitializedEv:
  419|      4|static bool GTestIsInitialized() { return !GetArgvs().empty(); }
gtest-all.cc:_ZN7testing8internalL14ParseFlagValueEPKcS2_b:
 6339|    330|                                  bool def_optional) {
 6340|       |  // str and flag must not be NULL.
 6341|    330|  if (str == nullptr || flag_name == nullptr) return nullptr;
  ------------------
  |  Branch (6341:7): [True: 0, False: 330]
  |  Branch (6341:25): [True: 0, False: 330]
  ------------------
 6342|       |
 6343|       |  // The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
 6344|    330|  const std::string flag_str =
 6345|    330|      std::string("--") + GTEST_FLAG_PREFIX_ + flag_name;
  ------------------
  |  |  331|    330|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
 6346|    330|  const size_t flag_len = flag_str.length();
 6347|    330|  if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;
  ------------------
  |  Branch (6347:7): [True: 330, False: 0]
  ------------------
 6348|       |
 6349|       |  // Skips the flag name.
 6350|      0|  const char* flag_end = str + flag_len;
 6351|       |
 6352|       |  // When def_optional is true, it's OK to not have a "=value" part.
 6353|      0|  if (def_optional && (flag_end[0] == '\0')) {
  ------------------
  |  Branch (6353:7): [True: 0, False: 0]
  |  Branch (6353:23): [True: 0, False: 0]
  ------------------
 6354|      0|    return flag_end;
 6355|      0|  }
 6356|       |
 6357|       |  // If def_optional is true and there are more characters after the
 6358|       |  // flag name, or if def_optional is false, there must be a '=' after
 6359|       |  // the flag name.
 6360|      0|  if (flag_end[0] != '=') return nullptr;
  ------------------
  |  Branch (6360:7): [True: 0, False: 0]
  ------------------
 6361|       |
 6362|       |  // Returns the string after "=".
 6363|      0|  return flag_end + 1;
 6364|      0|}
_ZN7testing8internal27PrettyUnitTestResultPrinter18OnTestProgramStartERKNS_8UnitTestE:
 3360|      2|  void OnTestProgramStart(const UnitTest& /*unit_test*/) override {}
_ZN7testing8internal27PrettyUnitTestResultPrinter22OnEnvironmentsSetUpEndERKNS_8UnitTestE:
 3363|      2|  void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc:
 2621|      4|                                           const char* location) {
 2622|       |  // NOTE: The user code can affect the way in which Google Test handles
 2623|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2624|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2625|       |  // after the exception is caught and either report or re-throw the
 2626|       |  // exception based on the flag's value:
 2627|       |  //
 2628|       |  // try {
 2629|       |  //   // Perform the test method.
 2630|       |  // } catch (...) {
 2631|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2632|       |  //     // Report the exception as failure.
 2633|       |  //   else
 2634|       |  //     throw;  // Re-throws the original exception.
 2635|       |  // }
 2636|       |  //
 2637|       |  // However, the purpose of this flag is to allow the program to drop into
 2638|       |  // the debugger when the exception is thrown. On most platforms, once the
 2639|       |  // control enters the catch block, the exception origin information is
 2640|       |  // lost and the debugger will stop the program at the point of the
 2641|       |  // re-throw in this function -- instead of at the point of the original
 2642|       |  // throw statement in the code under test.  For this reason, we perform
 2643|       |  // the check early, sacrificing the ability to affect Google Test's
 2644|       |  // exception handling in the method where the exception is thrown.
 2645|      4|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2645:7): [True: 4, False: 0]
  ------------------
 2646|      4|#if GTEST_HAS_EXCEPTIONS
 2647|      4|    try {
 2648|      4|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2649|      4|    } catch (const AssertionException&) {  // NOLINT
 2650|       |      // This failure was reported already.
 2651|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2652|       |      // This exception type can only be thrown by a failed Google
 2653|       |      // Test assertion with the intention of letting another testing
 2654|       |      // framework catch it.  Therefore we just re-throw it.
 2655|      0|      throw;
 2656|      0|    } catch (const std::exception& e) {  // NOLINT
 2657|      0|      internal::ReportFailureInUnknownLocation(
 2658|      0|          TestPartResult::kFatalFailure,
 2659|      0|          FormatCxxExceptionMessage(e.what(), location));
 2660|      0|    } catch (...) {  // NOLINT
 2661|      0|      internal::ReportFailureInUnknownLocation(
 2662|      0|          TestPartResult::kFatalFailure,
 2663|      0|          FormatCxxExceptionMessage(nullptr, location));
 2664|      0|    }
 2665|      0|    return static_cast<Result>(0);
 2666|       |#else
 2667|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2668|       |#endif  // GTEST_HAS_EXCEPTIONS
 2669|      4|  } else {
 2670|      0|    return (object->*method)();
 2671|      0|  }
 2672|      4|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc:
 2602|      4|                                              const char* location) {
 2603|       |#if GTEST_HAS_SEH
 2604|       |  __try {
 2605|       |    return (object->*method)();
 2606|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2607|       |      GetExceptionCode(), location)) {
 2608|       |    return static_cast<Result>(0);
 2609|       |  }
 2610|       |#else
 2611|      4|  (void)location;
 2612|      4|  return (object->*method)();
 2613|      4|#endif  // GTEST_HAS_SEH
 2614|      4|}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc:
 2621|      2|                                           const char* location) {
 2622|       |  // NOTE: The user code can affect the way in which Google Test handles
 2623|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2624|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2625|       |  // after the exception is caught and either report or re-throw the
 2626|       |  // exception based on the flag's value:
 2627|       |  //
 2628|       |  // try {
 2629|       |  //   // Perform the test method.
 2630|       |  // } catch (...) {
 2631|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2632|       |  //     // Report the exception as failure.
 2633|       |  //   else
 2634|       |  //     throw;  // Re-throws the original exception.
 2635|       |  // }
 2636|       |  //
 2637|       |  // However, the purpose of this flag is to allow the program to drop into
 2638|       |  // the debugger when the exception is thrown. On most platforms, once the
 2639|       |  // control enters the catch block, the exception origin information is
 2640|       |  // lost and the debugger will stop the program at the point of the
 2641|       |  // re-throw in this function -- instead of at the point of the original
 2642|       |  // throw statement in the code under test.  For this reason, we perform
 2643|       |  // the check early, sacrificing the ability to affect Google Test's
 2644|       |  // exception handling in the method where the exception is thrown.
 2645|      2|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2645:7): [True: 2, False: 0]
  ------------------
 2646|      2|#if GTEST_HAS_EXCEPTIONS
 2647|      2|    try {
 2648|      2|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2649|      2|    } catch (const AssertionException&) {  // NOLINT
 2650|       |      // This failure was reported already.
 2651|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2652|       |      // This exception type can only be thrown by a failed Google
 2653|       |      // Test assertion with the intention of letting another testing
 2654|       |      // framework catch it.  Therefore we just re-throw it.
 2655|      0|      throw;
 2656|      0|    } catch (const std::exception& e) {  // NOLINT
 2657|      0|      internal::ReportFailureInUnknownLocation(
 2658|      0|          TestPartResult::kFatalFailure,
 2659|      0|          FormatCxxExceptionMessage(e.what(), location));
 2660|      0|    } catch (...) {  // NOLINT
 2661|      0|      internal::ReportFailureInUnknownLocation(
 2662|      0|          TestPartResult::kFatalFailure,
 2663|      0|          FormatCxxExceptionMessage(nullptr, location));
 2664|      0|    }
 2665|      0|    return static_cast<Result>(0);
 2666|       |#else
 2667|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2668|       |#endif  // GTEST_HAS_EXCEPTIONS
 2669|      2|  } else {
 2670|      0|    return (object->*method)();
 2671|      0|  }
 2672|      2|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc:
 2602|      2|                                              const char* location) {
 2603|       |#if GTEST_HAS_SEH
 2604|       |  __try {
 2605|       |    return (object->*method)();
 2606|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2607|       |      GetExceptionCode(), location)) {
 2608|       |    return static_cast<Result>(0);
 2609|       |  }
 2610|       |#else
 2611|      2|  (void)location;
 2612|      2|  return (object->*method)();
 2613|      2|#endif  // GTEST_HAS_SEH
 2614|      2|}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc:
 2621|      2|                                           const char* location) {
 2622|       |  // NOTE: The user code can affect the way in which Google Test handles
 2623|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2624|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2625|       |  // after the exception is caught and either report or re-throw the
 2626|       |  // exception based on the flag's value:
 2627|       |  //
 2628|       |  // try {
 2629|       |  //   // Perform the test method.
 2630|       |  // } catch (...) {
 2631|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2632|       |  //     // Report the exception as failure.
 2633|       |  //   else
 2634|       |  //     throw;  // Re-throws the original exception.
 2635|       |  // }
 2636|       |  //
 2637|       |  // However, the purpose of this flag is to allow the program to drop into
 2638|       |  // the debugger when the exception is thrown. On most platforms, once the
 2639|       |  // control enters the catch block, the exception origin information is
 2640|       |  // lost and the debugger will stop the program at the point of the
 2641|       |  // re-throw in this function -- instead of at the point of the original
 2642|       |  // throw statement in the code under test.  For this reason, we perform
 2643|       |  // the check early, sacrificing the ability to affect Google Test's
 2644|       |  // exception handling in the method where the exception is thrown.
 2645|      2|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2645:7): [True: 2, False: 0]
  ------------------
 2646|      2|#if GTEST_HAS_EXCEPTIONS
 2647|      2|    try {
 2648|      2|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2649|      2|    } catch (const AssertionException&) {  // NOLINT
 2650|       |      // This failure was reported already.
 2651|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2652|       |      // This exception type can only be thrown by a failed Google
 2653|       |      // Test assertion with the intention of letting another testing
 2654|       |      // framework catch it.  Therefore we just re-throw it.
 2655|      0|      throw;
 2656|      0|    } catch (const std::exception& e) {  // NOLINT
 2657|      0|      internal::ReportFailureInUnknownLocation(
 2658|      0|          TestPartResult::kFatalFailure,
 2659|      0|          FormatCxxExceptionMessage(e.what(), location));
 2660|      0|    } catch (...) {  // NOLINT
 2661|      0|      internal::ReportFailureInUnknownLocation(
 2662|      0|          TestPartResult::kFatalFailure,
 2663|      0|          FormatCxxExceptionMessage(nullptr, location));
 2664|      0|    }
 2665|      0|    return static_cast<Result>(0);
 2666|       |#else
 2667|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2668|       |#endif  // GTEST_HAS_EXCEPTIONS
 2669|      2|  } else {
 2670|      0|    return (object->*method)();
 2671|      0|  }
 2672|      2|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc:
 2602|      2|                                              const char* location) {
 2603|       |#if GTEST_HAS_SEH
 2604|       |  __try {
 2605|       |    return (object->*method)();
 2606|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2607|       |      GetExceptionCode(), location)) {
 2608|       |    return static_cast<Result>(0);
 2609|       |  }
 2610|       |#else
 2611|      2|  (void)location;
 2612|      2|  return (object->*method)();
 2613|      2|#endif  // GTEST_HAS_SEH
 2614|      2|}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
 2621|      2|                                           const char* location) {
 2622|       |  // NOTE: The user code can affect the way in which Google Test handles
 2623|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2624|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2625|       |  // after the exception is caught and either report or re-throw the
 2626|       |  // exception based on the flag's value:
 2627|       |  //
 2628|       |  // try {
 2629|       |  //   // Perform the test method.
 2630|       |  // } catch (...) {
 2631|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2632|       |  //     // Report the exception as failure.
 2633|       |  //   else
 2634|       |  //     throw;  // Re-throws the original exception.
 2635|       |  // }
 2636|       |  //
 2637|       |  // However, the purpose of this flag is to allow the program to drop into
 2638|       |  // the debugger when the exception is thrown. On most platforms, once the
 2639|       |  // control enters the catch block, the exception origin information is
 2640|       |  // lost and the debugger will stop the program at the point of the
 2641|       |  // re-throw in this function -- instead of at the point of the original
 2642|       |  // throw statement in the code under test.  For this reason, we perform
 2643|       |  // the check early, sacrificing the ability to affect Google Test's
 2644|       |  // exception handling in the method where the exception is thrown.
 2645|      2|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2645:7): [True: 2, False: 0]
  ------------------
 2646|      2|#if GTEST_HAS_EXCEPTIONS
 2647|      2|    try {
 2648|      2|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2649|      2|    } catch (const AssertionException&) {  // NOLINT
 2650|       |      // This failure was reported already.
 2651|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2652|       |      // This exception type can only be thrown by a failed Google
 2653|       |      // Test assertion with the intention of letting another testing
 2654|       |      // framework catch it.  Therefore we just re-throw it.
 2655|      0|      throw;
 2656|      0|    } catch (const std::exception& e) {  // NOLINT
 2657|      0|      internal::ReportFailureInUnknownLocation(
 2658|      0|          TestPartResult::kFatalFailure,
 2659|      0|          FormatCxxExceptionMessage(e.what(), location));
 2660|      0|    } catch (...) {  // NOLINT
 2661|      0|      internal::ReportFailureInUnknownLocation(
 2662|      0|          TestPartResult::kFatalFailure,
 2663|      0|          FormatCxxExceptionMessage(nullptr, location));
 2664|      0|    }
 2665|      0|    return static_cast<Result>(0);
 2666|       |#else
 2667|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2668|       |#endif  // GTEST_HAS_EXCEPTIONS
 2669|      2|  } else {
 2670|      0|    return (object->*method)();
 2671|      0|  }
 2672|      2|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
 2602|      2|                                              const char* location) {
 2603|       |#if GTEST_HAS_SEH
 2604|       |  __try {
 2605|       |    return (object->*method)();
 2606|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2607|       |      GetExceptionCode(), location)) {
 2608|       |    return static_cast<Result>(0);
 2609|       |  }
 2610|       |#else
 2611|      2|  (void)location;
 2612|      2|  return (object->*method)();
 2613|      2|#endif  // GTEST_HAS_SEH
 2614|      2|}
_ZN7testing8internal28ParseGoogleTestFlagsOnlyImplIcEEvPiPPT_:
 6630|      2|void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
 6631|      2|  std::string flagfile_value;
 6632|     17|  for (int i = 1; i < *argc; i++) {
  ------------------
  |  Branch (6632:19): [True: 15, False: 2]
  ------------------
 6633|     15|    const std::string arg_string = StreamableToString(argv[i]);
 6634|     15|    const char* const arg = arg_string.c_str();
 6635|       |
 6636|     15|    using internal::ParseFlag;
 6637|       |
 6638|     15|    bool remove_flag = false;
 6639|     15|    if (ParseGoogleTestFlag(arg)) {
  ------------------
  |  Branch (6639:9): [True: 0, False: 15]
  ------------------
 6640|      0|      remove_flag = true;
 6641|      0|#if GTEST_USE_OWN_FLAGFILE_FLAG_ && GTEST_HAS_FILE_SYSTEM
 6642|     15|    } else if (ParseFlag(arg, "flagfile", &flagfile_value)) {
  ------------------
  |  Branch (6642:16): [True: 0, False: 15]
  ------------------
 6643|      0|      GTEST_FLAG_SET(flagfile, flagfile_value);
  ------------------
  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  ------------------
  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 6644|      0|      LoadFlagsFromFile(flagfile_value);
 6645|      0|      remove_flag = true;
 6646|      0|#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_ && GTEST_HAS_FILE_SYSTEM
 6647|     15|    } else if (arg_string == "--help" || HasGoogleTestFlagPrefix(arg)) {
  ------------------
  |  Branch (6647:16): [True: 0, False: 15]
  |  Branch (6647:42): [True: 0, False: 15]
  ------------------
 6648|       |      // Both help flag and unrecognized Google Test flags (excluding
 6649|       |      // internal ones) trigger help display.
 6650|      0|      g_help_flag = true;
 6651|      0|    }
 6652|       |
 6653|     15|    if (remove_flag) {
  ------------------
  |  Branch (6653:9): [True: 0, False: 15]
  ------------------
 6654|       |      // Shift the remainder of the argv list left by one.  Note
 6655|       |      // that argv has (*argc + 1) elements, the last one always being
 6656|       |      // NULL.  The following loop moves the trailing NULL element as
 6657|       |      // well.
 6658|      0|      for (int j = i; j != *argc; j++) {
  ------------------
  |  Branch (6658:23): [True: 0, False: 0]
  ------------------
 6659|      0|        argv[j] = argv[j + 1];
 6660|      0|      }
 6661|       |
 6662|       |      // Decrements the argument count.
 6663|      0|      (*argc)--;
 6664|       |
 6665|       |      // We also need to decrement the iterator as we just removed
 6666|       |      // an element.
 6667|      0|      i--;
 6668|      0|    }
 6669|     15|  }
 6670|       |
 6671|      2|  if (g_help_flag) {
  ------------------
  |  Branch (6671:7): [True: 0, False: 2]
  ------------------
 6672|       |    // We print the help here instead of in RUN_ALL_TESTS(), as the
 6673|       |    // latter may not be called at all if the user is using Google
 6674|       |    // Test with another testing framework.
 6675|      0|    PrintColorEncoded(kColorEncodedHelpMessage);
 6676|      0|  }
 6677|      2|}
gtest-all.cc:_ZN7testing8internalL19ParseGoogleTestFlagEPKc:
 6574|     15|static bool ParseGoogleTestFlag(const char* const arg) {
 6575|     15|#define GTEST_INTERNAL_PARSE_FLAG(flag_name)  \
 6576|     15|  do {                                        \
 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
 6579|     15|      GTEST_FLAG_SET(flag_name, value);       \
 6580|     15|      return true;                            \
 6581|     15|    }                                         \
 6582|     15|  } while (false)
 6583|       |
 6584|     15|  GTEST_INTERNAL_PARSE_FLAG(also_run_disabled_tests);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6585|     15|  GTEST_INTERNAL_PARSE_FLAG(break_on_failure);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6586|     15|  GTEST_INTERNAL_PARSE_FLAG(catch_exceptions);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6587|     15|  GTEST_INTERNAL_PARSE_FLAG(color);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6588|     15|  GTEST_INTERNAL_PARSE_FLAG(death_test_style);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6589|     15|  GTEST_INTERNAL_PARSE_FLAG(death_test_use_fork);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6590|     15|  GTEST_INTERNAL_PARSE_FLAG(fail_fast);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6591|     15|  GTEST_INTERNAL_PARSE_FLAG(filter);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6592|     15|  GTEST_INTERNAL_PARSE_FLAG(internal_run_death_test);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6593|     15|  GTEST_INTERNAL_PARSE_FLAG(list_tests);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6594|     15|  GTEST_INTERNAL_PARSE_FLAG(output);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6595|     15|  GTEST_INTERNAL_PARSE_FLAG(brief);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6596|     15|  GTEST_INTERNAL_PARSE_FLAG(print_time);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6597|     15|  GTEST_INTERNAL_PARSE_FLAG(print_utf8);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6598|     15|  GTEST_INTERNAL_PARSE_FLAG(random_seed);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6599|     15|  GTEST_INTERNAL_PARSE_FLAG(repeat);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6600|     15|  GTEST_INTERNAL_PARSE_FLAG(recreate_environments_when_repeating);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6601|     15|  GTEST_INTERNAL_PARSE_FLAG(shuffle);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6602|     15|  GTEST_INTERNAL_PARSE_FLAG(stack_trace_depth);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6603|     15|  GTEST_INTERNAL_PARSE_FLAG(stream_result_to);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6604|     15|  GTEST_INTERNAL_PARSE_FLAG(throw_on_failure);
  ------------------
  |  | 6576|     15|  do {                                        \
  |  | 6577|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2293|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6578|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6578:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6579|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2294|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2226|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6580|      0|      return true;                            \
  |  | 6581|      0|    }                                         \
  |  | 6582|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6582:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6605|     15|  return false;
 6606|     15|}
gtest-all.cc:_ZN7testing8internalL9ParseFlagEPKcS2_Pb:
 6376|    180|static bool ParseFlag(const char* str, const char* flag_name, bool* value) {
 6377|       |  // Gets the value of the flag as a string.
 6378|    180|  const char* const value_str = ParseFlagValue(str, flag_name, true);
 6379|       |
 6380|       |  // Aborts if the parsing failed.
 6381|    180|  if (value_str == nullptr) return false;
  ------------------
  |  Branch (6381:7): [True: 180, False: 0]
  ------------------
 6382|       |
 6383|       |  // Converts the string value to a bool.
 6384|      0|  *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
  ------------------
  |  Branch (6384:14): [True: 0, False: 0]
  |  Branch (6384:35): [True: 0, False: 0]
  |  Branch (6384:56): [True: 0, False: 0]
  ------------------
 6385|      0|  return true;
 6386|    180|}
gtest-all.cc:_ZN7testing8internalL9ParseFlagINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEbPKcSA_PT_:
 6409|    105|static bool ParseFlag(const char* str, const char* flag_name, String* value) {
 6410|       |  // Gets the value of the flag as a string.
 6411|    105|  const char* const value_str = ParseFlagValue(str, flag_name, false);
 6412|       |
 6413|       |  // Aborts if the parsing failed.
 6414|    105|  if (value_str == nullptr) return false;
  ------------------
  |  Branch (6414:7): [True: 105, False: 0]
  ------------------
 6415|       |
 6416|       |  // Sets *value to the value of the flag.
 6417|      0|  *value = value_str;
 6418|      0|  return true;
 6419|    105|}
gtest-all.cc:_ZN7testing8internalL23HasGoogleTestFlagPrefixEPKc:
 6427|     15|static bool HasGoogleTestFlagPrefix(const char* str) {
 6428|     15|  return (SkipPrefix("--", &str) || SkipPrefix("-", &str) ||
  ------------------
  |  Branch (6428:11): [True: 6, False: 9]
  |  Branch (6428:37): [True: 5, False: 4]
  ------------------
 6429|      4|          SkipPrefix("/", &str)) &&
  ------------------
  |  Branch (6429:11): [True: 4, False: 0]
  ------------------
 6430|     15|         !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) &&
  ------------------
  |  |  331|     15|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
  |  Branch (6430:10): [True: 15, False: 0]
  ------------------
 6431|     15|         (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||
  ------------------
  |  |  331|     15|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
  |  Branch (6431:11): [True: 0, False: 15]
  ------------------
 6432|     15|          SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));
  ------------------
  |  |  332|     15|#define GTEST_FLAG_PREFIX_DASH_ "gtest-"
  ------------------
  |  Branch (6432:11): [True: 0, False: 15]
  ------------------
 6433|     15|}
_ZN7testing8internal18InitGoogleTestImplIcEEvPiPPT_:
 6758|      2|void InitGoogleTestImpl(int* argc, CharType** argv) {
 6759|       |  // We don't want to run the initialization code twice.
 6760|      2|  if (GTestIsInitialized()) return;
  ------------------
  |  Branch (6760:7): [True: 0, False: 2]
  ------------------
 6761|       |
 6762|      2|  if (*argc <= 0) return;
  ------------------
  |  Branch (6762:7): [True: 0, False: 2]
  ------------------
 6763|       |
 6764|      2|  g_argvs.clear();
 6765|     19|  for (int i = 0; i != *argc; i++) {
  ------------------
  |  Branch (6765:19): [True: 17, False: 2]
  ------------------
 6766|     17|    g_argvs.push_back(StreamableToString(argv[i]));
 6767|     17|  }
 6768|       |
 6769|       |#ifdef GTEST_HAS_ABSL
 6770|       |  absl::InitializeSymbolizer(g_argvs[0].c_str());
 6771|       |
 6772|       |  // When using the Abseil Flags library, set the program usage message to the
 6773|       |  // help message, but remove the color-encoding from the message first.
 6774|       |  absl::SetProgramUsageMessage(absl::StrReplaceAll(
 6775|       |      kColorEncodedHelpMessage,
 6776|       |      {{"@D", ""}, {"@R", ""}, {"@G", ""}, {"@Y", ""}, {"@@", "@"}}));
 6777|       |#endif  // GTEST_HAS_ABSL
 6778|       |
 6779|      2|  ParseGoogleTestFlagsOnly(argc, argv);
 6780|      2|  GetUnitTestImpl()->PostFlagParsingInit();
 6781|      2|}

obu.c:clz:
  186|  1.14k|static inline int clz(const unsigned int mask) {
  187|  1.14k|    return __builtin_clz(mask);
  188|  1.14k|}
decode.c:ctz:
  182|  3.56k|static inline int ctz(const unsigned int mask) {
  183|  3.56k|    return __builtin_ctz(mask);
  184|  3.56k|}
decode.c:clz:
  186|  4.70M|static inline int clz(const unsigned int mask) {
  187|  4.70M|    return __builtin_clz(mask);
  188|  4.70M|}
getbits.c:clz:
  186|  6.03k|static inline int clz(const unsigned int mask) {
  187|  6.03k|    return __builtin_clz(mask);
  188|  6.03k|}
lf_mask.c:clz:
  186|  5.41M|static inline int clz(const unsigned int mask) {
  187|  5.41M|    return __builtin_clz(mask);
  188|  5.41M|}
warpmv.c:clz:
  186|  7.31k|static inline int clz(const unsigned int mask) {
  187|  7.31k|    return __builtin_clz(mask);
  188|  7.31k|}
warpmv.c:clzll:
  190|  3.03k|static inline int clzll(const unsigned long long mask) {
  191|  3.03k|    return __builtin_clzll(mask);
  192|  3.03k|}
looprestoration_tmpl.c:clz:
  186|   503k|static inline int clz(const unsigned int mask) {
  187|   503k|    return __builtin_clz(mask);
  188|   503k|}
recon_tmpl.c:clz:
  186|  8.89M|static inline int clz(const unsigned int mask) {
  187|  8.89M|    return __builtin_clz(mask);
  188|  8.89M|}
cdef_apply_tmpl.c:clz:
  186|   199k|static inline int clz(const unsigned int mask) {
  187|   199k|    return __builtin_clz(mask);
  188|   199k|}
ipred_prepare_tmpl.c:clz:
  186|  4.41M|static inline int clz(const unsigned int mask) {
  187|  4.41M|    return __builtin_clz(mask);
  188|  4.41M|}

fg_apply_tmpl.c:PXSTRIDE:
   79|  16.8k|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  16.8k|    assert(!(x & 1));
  ------------------
  |  |  140|  16.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 16.8k]
  |  |  |  Branch (140:68): [Folded, False: 16.8k]
  |  |  ------------------
  ------------------
   81|  16.8k|    return x >> 1;
   82|  16.8k|}
itx_tmpl.c:PXSTRIDE:
   79|  2.58M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  2.58M|    assert(!(x & 1));
  ------------------
  |  |  140|  2.58M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 2.58M]
  |  |  |  Branch (140:68): [Folded, False: 2.58M]
  |  |  ------------------
  ------------------
   81|  2.58M|    return x >> 1;
   82|  2.58M|}
looprestoration_tmpl.c:PXSTRIDE:
   79|  1.17M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  1.17M|    assert(!(x & 1));
  ------------------
  |  |  140|  1.17M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.17M]
  |  |  |  Branch (140:68): [Folded, False: 1.17M]
  |  |  ------------------
  ------------------
   81|  1.17M|    return x >> 1;
   82|  1.17M|}
recon_tmpl.c:PXSTRIDE:
   79|  5.24M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  5.24M|    assert(!(x & 1));
  ------------------
  |  |  140|  5.24M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 5.24M]
  |  |  |  Branch (140:68): [Folded, False: 5.24M]
  |  |  ------------------
  ------------------
   81|  5.24M|    return x >> 1;
   82|  5.24M|}
cdef_apply_tmpl.c:PXSTRIDE:
   79|  9.89M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  9.89M|    assert(!(x & 1));
  ------------------
  |  |  140|  9.89M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 9.89M]
  |  |  |  Branch (140:68): [Folded, False: 9.89M]
  |  |  ------------------
  ------------------
   81|  9.89M|    return x >> 1;
   82|  9.89M|}
ipred_prepare_tmpl.c:PXSTRIDE:
   79|  53.0M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  53.0M|    assert(!(x & 1));
  ------------------
  |  |  140|  53.0M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 53.0M]
  |  |  |  Branch (140:68): [Folded, False: 53.0M]
  |  |  ------------------
  ------------------
   81|  53.0M|    return x >> 1;
   82|  53.0M|}
ipred_prepare_tmpl.c:pixel_set:
   66|   643k|static inline void pixel_set(pixel *const dst, const int val, const int num) {
   67|  11.3M|    for (int n = 0; n < num; n++)
  ------------------
  |  Branch (67:21): [True: 10.7M, False: 643k]
  ------------------
   68|  10.7M|        dst[n] = val;
   69|   643k|}
lf_apply_tmpl.c:PXSTRIDE:
   79|  2.96M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  2.96M|    assert(!(x & 1));
  ------------------
  |  |  140|  2.96M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 2.96M]
  |  |  |  Branch (140:68): [Folded, False: 2.96M]
  |  |  ------------------
  ------------------
   81|  2.96M|    return x >> 1;
   82|  2.96M|}
lr_apply_tmpl.c:PXSTRIDE:
   79|   654k|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|   654k|    assert(!(x & 1));
  ------------------
  |  |  140|   654k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 654k]
  |  |  |  Branch (140:68): [Folded, False: 654k]
  |  |  ------------------
  ------------------
   81|   654k|    return x >> 1;
   82|   654k|}

lib.c:umin:
   47|  12.9k|static inline unsigned umin(const unsigned a, const unsigned b) {
   48|  12.9k|    return a < b ? a : b;
  ------------------
  |  Branch (48:12): [True: 0, False: 12.9k]
  ------------------
   49|  12.9k|}
obu.c:ulog2:
   67|  1.14k|static inline int ulog2(const unsigned v) {
   68|  1.14k|    return 31 ^ clz(v);
   69|  1.14k|}
obu.c:imin:
   39|  58.9k|static inline int imin(const int a, const int b) {
   40|  58.9k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 49.2k, False: 9.71k]
  ------------------
   41|  58.9k|}
obu.c:imax:
   35|  50.2k|static inline int imax(const int a, const int b) {
   36|  50.2k|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 4.32k, False: 45.9k]
  ------------------
   37|  50.2k|}
obu.c:iclip_u8:
   55|  50.3k|static inline int iclip_u8(const int v) {
   56|  50.3k|    return iclip(v, 0, 255);
   57|  50.3k|}
obu.c:iclip:
   51|  50.3k|static inline int iclip(const int v, const int min, const int max) {
   52|  50.3k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 7.03k, False: 43.3k]
  |  Branch (52:28): [True: 5.41k, False: 37.9k]
  ------------------
   53|  50.3k|}
refmvs.c:imin:
   39|  2.73M|static inline int imin(const int a, const int b) {
   40|  2.73M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 1.32M, False: 1.41M]
  ------------------
   41|  2.73M|}
refmvs.c:apply_sign:
   59|  58.7k|static inline int apply_sign(const int v, const int s) {
   60|  58.7k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (60:12): [True: 29.1k, False: 29.5k]
  ------------------
   61|  58.7k|}
refmvs.c:imax:
   35|  1.24M|static inline int imax(const int a, const int b) {
   36|  1.24M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 244k, False: 1.00M]
  ------------------
   37|  1.24M|}
refmvs.c:iclip:
   51|  1.38M|static inline int iclip(const int v, const int min, const int max) {
   52|  1.38M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 18.0k, False: 1.36M]
  |  Branch (52:28): [True: 5.53k, False: 1.35M]
  ------------------
   53|  1.38M|}
wedge.c:imax:
   35|    256|static inline int imax(const int a, const int b) {
   36|    256|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 128, False: 128]
  ------------------
   37|    256|}
wedge.c:imin:
   39|  2.48k|static inline int imin(const int a, const int b) {
   40|  2.48k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 1.41k, False: 1.06k]
  ------------------
   41|  2.48k|}
fg_apply_tmpl.c:imin:
   39|  17.5k|static inline int imin(const int a, const int b) {
   40|  17.5k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 804, False: 16.7k]
  ------------------
   41|  17.5k|}
cdf.c:imin:
   39|  44.1k|static inline int imin(const int a, const int b) {
   40|  44.1k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 11.0k, False: 33.1k]
  ------------------
   41|  44.1k|}
decode.c:iclip:
   51|   761k|static inline int iclip(const int v, const int min, const int max) {
   52|   761k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 41.6k, False: 719k]
  |  Branch (52:28): [True: 43.7k, False: 675k]
  ------------------
   53|   761k|}
decode.c:apply_sign:
   59|  9.20k|static inline int apply_sign(const int v, const int s) {
   60|  9.20k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (60:12): [True: 4.22k, False: 4.97k]
  ------------------
   61|  9.20k|}
decode.c:ulog2:
   67|  4.70M|static inline int ulog2(const unsigned v) {
   68|  4.70M|    return 31 ^ clz(v);
   69|  4.70M|}
decode.c:imax:
   35|  2.02M|static inline int imax(const int a, const int b) {
   36|  2.02M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 598k, False: 1.42M]
  ------------------
   37|  2.02M|}
decode.c:imin:
   39|  5.75M|static inline int imin(const int a, const int b) {
   40|  5.75M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 4.41M, False: 1.33M]
  ------------------
   41|  5.75M|}
decode.c:iclip_u8:
   55|   599k|static inline int iclip_u8(const int v) {
   56|   599k|    return iclip(v, 0, 255);
   57|   599k|}
getbits.c:ulog2:
   67|  6.03k|static inline int ulog2(const unsigned v) {
   68|  6.03k|    return 31 ^ clz(v);
   69|  6.03k|}
getbits.c:inv_recenter:
   75|  27.0k|static inline unsigned inv_recenter(const unsigned r, const unsigned v) {
   76|  27.0k|    if (v > (r << 1))
  ------------------
  |  Branch (76:9): [True: 34, False: 26.9k]
  ------------------
   77|     34|        return v;
   78|  26.9k|    else if ((v & 1) == 0)
  ------------------
  |  Branch (78:14): [True: 16.0k, False: 10.9k]
  ------------------
   79|  16.0k|        return (v >> 1) + r;
   80|  10.9k|    else
   81|  10.9k|        return r - ((v + 1) >> 1);
   82|  27.0k|}
lf_mask.c:imin:
   39|  29.8M|static inline int imin(const int a, const int b) {
   40|  29.8M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 2.44M, False: 27.3M]
  ------------------
   41|  29.8M|}
lf_mask.c:ulog2:
   67|  5.41M|static inline int ulog2(const unsigned v) {
   68|  5.41M|    return 31 ^ clz(v);
   69|  5.41M|}
lf_mask.c:imax:
   35|   924k|static inline int imax(const int a, const int b) {
   36|   924k|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 869k, False: 54.3k]
  ------------------
   37|   924k|}
lf_mask.c:iclip:
   51|  3.29M|static inline int iclip(const int v, const int min, const int max) {
   52|  3.29M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 475k, False: 2.81M]
  |  Branch (52:28): [True: 399k, False: 2.41M]
  ------------------
   53|  3.29M|}
msac.c:inv_recenter:
   75|   135k|static inline unsigned inv_recenter(const unsigned r, const unsigned v) {
   76|   135k|    if (v > (r << 1))
  ------------------
  |  Branch (76:9): [True: 26.9k, False: 108k]
  ------------------
   77|  26.9k|        return v;
   78|   108k|    else if ((v & 1) == 0)
  ------------------
  |  Branch (78:14): [True: 55.1k, False: 53.7k]
  ------------------
   79|  55.1k|        return (v >> 1) + r;
   80|  53.7k|    else
   81|  53.7k|        return r - ((v + 1) >> 1);
   82|   135k|}
warpmv.c:apply_sign:
   59|  36.5k|static inline int apply_sign(const int v, const int s) {
   60|  36.5k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (60:12): [True: 10.9k, False: 25.6k]
  ------------------
   61|  36.5k|}
warpmv.c:ulog2:
   67|  7.31k|static inline int ulog2(const unsigned v) {
   68|  7.31k|    return 31 ^ clz(v);
   69|  7.31k|}
warpmv.c:apply_sign64:
   63|  29.7k|static inline int apply_sign64(const int v, const int64_t s) {
   64|  29.7k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (64:12): [True: 8.28k, False: 21.5k]
  ------------------
   65|  29.7k|}
warpmv.c:iclip:
   51|  47.4k|static inline int iclip(const int v, const int min, const int max) {
   52|  47.4k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 776, False: 46.6k]
  |  Branch (52:28): [True: 716, False: 45.9k]
  ------------------
   53|  47.4k|}
warpmv.c:u64log2:
   71|  3.03k|static inline int u64log2(const uint64_t v) {
   72|  3.03k|    return 63 ^ clzll(v);
   73|  3.03k|}
itx_tmpl.c:iclip:
   51|   164M|static inline int iclip(const int v, const int min, const int max) {
   52|   164M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 7.02M, False: 157M]
  |  Branch (52:28): [True: 6.88M, False: 150M]
  ------------------
   53|   164M|}
itx_tmpl.c:imin:
   39|  78.2k|static inline int imin(const int a, const int b) {
   40|  78.2k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 10.8k, False: 67.4k]
  ------------------
   41|  78.2k|}
looprestoration_tmpl.c:iclip:
   51|  26.0M|static inline int iclip(const int v, const int min, const int max) {
   52|  26.0M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 23.6k, False: 26.0M]
  |  Branch (52:28): [True: 13.3k, False: 26.0M]
  ------------------
   53|  26.0M|}
looprestoration_tmpl.c:imax:
   35|  34.8M|static inline int imax(const int a, const int b) {
   36|  34.8M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 11.7M, False: 23.1M]
  ------------------
   37|  34.8M|}
looprestoration_tmpl.c:umin:
   47|  34.8M|static inline unsigned umin(const unsigned a, const unsigned b) {
   48|  34.8M|    return a < b ? a : b;
  ------------------
  |  Branch (48:12): [True: 34.5M, False: 281k]
  ------------------
   49|  34.8M|}
recon_tmpl.c:ulog2:
   67|  8.89M|static inline int ulog2(const unsigned v) {
   68|  8.89M|    return 31 ^ clz(v);
   69|  8.89M|}
recon_tmpl.c:imin:
   39|  26.0M|static inline int imin(const int a, const int b) {
   40|  26.0M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 23.4M, False: 2.57M]
  ------------------
   41|  26.0M|}
recon_tmpl.c:imax:
   35|  1.76M|static inline int imax(const int a, const int b) {
   36|  1.76M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 1.04M, False: 714k]
  ------------------
   37|  1.76M|}
recon_tmpl.c:umin:
   47|  65.7M|static inline unsigned umin(const unsigned a, const unsigned b) {
   48|  65.7M|    return a < b ? a : b;
  ------------------
  |  Branch (48:12): [True: 37.3M, False: 28.4M]
  ------------------
   49|  65.7M|}
recon_tmpl.c:apply_sign64:
   63|  78.4k|static inline int apply_sign64(const int v, const int64_t s) {
   64|  78.4k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (64:12): [True: 9.06k, False: 69.3k]
  ------------------
   65|  78.4k|}
recon_tmpl.c:iclip:
   51|  29.5k|static inline int iclip(const int v, const int min, const int max) {
   52|  29.5k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 2.22k, False: 27.3k]
  |  Branch (52:28): [True: 403, False: 26.9k]
  ------------------
   53|  29.5k|}
itx_1d.c:iclip:
   51|   426M|static inline int iclip(const int v, const int min, const int max) {
   52|   426M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 3.42M, False: 422M]
  |  Branch (52:28): [True: 3.35M, False: 419M]
  ------------------
   53|   426M|}
scan.c:imax:
   35|  3.34k|static inline int imax(const int a, const int b) {
   36|  3.34k|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 2.82k, False: 523]
  ------------------
   37|  3.34k|}
cdef_apply_tmpl.c:imin:
   39|  1.50M|static inline int imin(const int a, const int b) {
   40|  1.50M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 1.17M, False: 324k]
  ------------------
   41|  1.50M|}
cdef_apply_tmpl.c:ulog2:
   67|   199k|static inline int ulog2(const unsigned v) {
   68|   199k|    return 31 ^ clz(v);
   69|   199k|}
ipred_prepare_tmpl.c:imin:
   39|  12.1M|static inline int imin(const int a, const int b) {
   40|  12.1M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 11.0M, False: 1.12M]
  ------------------
   41|  12.1M|}
lf_apply_tmpl.c:imin:
   39|   550k|static inline int imin(const int a, const int b) {
   40|   550k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 246k, False: 304k]
  ------------------
   41|   550k|}
lr_apply_tmpl.c:imin:
   39|   117k|static inline int imin(const int a, const int b) {
   40|   117k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 34.0k, False: 83.1k]
  ------------------
   41|   117k|}

dav1d_cdef_brow_8bpc:
  102|  23.0k|{
  103|  23.0k|    Dav1dFrameContext *const f = (Dav1dFrameContext *)tc->f;
  104|  23.0k|    const int bitdepth_min_8 = BITDEPTH == 8 ? 0 : f->cur.p.bpc - 8;
  ------------------
  |  Branch (104:32): [True: 23.0k, Folded]
  ------------------
  105|  23.0k|    const Dav1dDSPContext *const dsp = f->dsp;
  106|  23.0k|    enum CdefEdgeFlags edges = CDEF_HAVE_BOTTOM | (by_start > 0 ? CDEF_HAVE_TOP : 0);
  ------------------
  |  Branch (106:52): [True: 19.8k, False: 3.17k]
  ------------------
  107|  23.0k|    pixel *ptrs[3] = { p[0], p[1], p[2] };
  108|  23.0k|    const int sbsz = 16;
  109|  23.0k|    const int sb64w = f->sb128w << 1;
  110|  23.0k|    const int damping = f->frame_hdr->cdef.damping + bitdepth_min_8;
  111|  23.0k|    const enum Dav1dPixelLayout layout = f->cur.p.layout;
  112|  23.0k|    const int uv_idx = DAV1D_PIXEL_LAYOUT_I444 - layout;
  113|  23.0k|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
  114|  23.0k|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
  115|  23.0k|    static const uint8_t uv_dirs[2][8] = { { 0, 1, 2, 3, 4, 5, 6, 7 },
  116|  23.0k|                                           { 7, 0, 2, 4, 5, 6, 6, 6 } };
  117|  23.0k|    const uint8_t *uv_dir = uv_dirs[layout == DAV1D_PIXEL_LAYOUT_I422];
  118|  23.0k|    const int have_tt = f->c->n_tc > 1;
  119|  23.0k|    const int sb128 = f->seq_hdr->sb128;
  120|  23.0k|    const int resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
  121|  23.0k|    const ptrdiff_t y_stride = PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|  23.0k|#define PXSTRIDE(x) (x)
  ------------------
  122|  23.0k|    const ptrdiff_t uv_stride = PXSTRIDE(f->cur.stride[1]);
  ------------------
  |  |   53|  23.0k|#define PXSTRIDE(x) (x)
  ------------------
  123|       |
  124|   159k|    for (int bit = 0, by = by_start; by < by_end; by += 2, edges |= CDEF_HAVE_TOP) {
  ------------------
  |  Branch (124:38): [True: 136k, False: 23.0k]
  ------------------
  125|   136k|        const int tf = tc->top_pre_cdef_toggle;
  126|   136k|        const int by_idx = (by & 30) >> 1;
  127|   136k|        if (by + 2 >= f->bh) edges &= ~CDEF_HAVE_BOTTOM;
  ------------------
  |  Branch (127:13): [True: 3.04k, False: 133k]
  ------------------
  128|       |
  129|   136k|        if ((!have_tt || sbrow_start || by + 2 < by_end) &&
  ------------------
  |  Branch (129:14): [True: 136k, False: 0]
  |  Branch (129:26): [True: 0, False: 0]
  |  Branch (129:41): [True: 0, False: 0]
  ------------------
  130|   136k|            edges & CDEF_HAVE_BOTTOM)
  ------------------
  |  Branch (130:13): [True: 133k, False: 3.04k]
  ------------------
  131|   133k|        {
  132|       |            // backup pre-filter data for next iteration
  133|   133k|            pixel *const cdef_top_bak[3] = {
  134|   133k|                f->lf.cdef_line[!tf][0] + have_tt * sby * 4 * y_stride,
  135|   133k|                f->lf.cdef_line[!tf][1] + have_tt * sby * 8 * uv_stride,
  136|   133k|                f->lf.cdef_line[!tf][2] + have_tt * sby * 8 * uv_stride
  137|   133k|            };
  138|   133k|            backup2lines(cdef_top_bak, ptrs, f->cur.stride, layout);
  139|   133k|        }
  140|       |
  141|   136k|        ALIGN_STK_16(pixel, lr_bak, 2 /* idx */, [3 /* plane */][8 /* y */][2 /* x */]);
  ------------------
  |  |  100|   136k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   136k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  142|   136k|        pixel *iptrs[3] = { ptrs[0], ptrs[1], ptrs[2] };
  143|   136k|        edges &= ~CDEF_HAVE_LEFT;
  144|   136k|        edges |= CDEF_HAVE_RIGHT;
  145|   136k|        enum Backup2x8Flags prev_flag = 0;
  146|   551k|        for (int sbx = 0; sbx < sb64w; sbx++, edges |= CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (146:27): [True: 415k, False: 136k]
  ------------------
  147|   415k|            const int sb128x = sbx >> 1;
  148|   415k|            const int sb64_idx = ((by & sbsz) >> 3) + (sbx & 1);
  149|   415k|            const int cdef_idx = lflvl[sb128x].cdef_idx[sb64_idx];
  150|   415k|            if (cdef_idx == -1 ||
  ------------------
  |  Branch (150:17): [True: 305k, False: 110k]
  ------------------
  151|   110k|                (!f->frame_hdr->cdef.y_strength[cdef_idx] &&
  ------------------
  |  Branch (151:18): [True: 55.2k, False: 54.9k]
  ------------------
  152|  55.2k|                 !f->frame_hdr->cdef.uv_strength[cdef_idx]))
  ------------------
  |  Branch (152:18): [True: 53.0k, False: 2.25k]
  ------------------
  153|   358k|            {
  154|   358k|                prev_flag = 0;
  155|   358k|                goto next_sb;
  156|   358k|            }
  157|       |
  158|       |            // Create a complete 32-bit mask for the sb row ahead of time.
  159|  57.2k|            const uint16_t (*noskip_row)[2] = &lflvl[sb128x].noskip_mask[by_idx];
  160|  57.2k|            const unsigned noskip_mask = (unsigned) noskip_row[0][1] << 16 |
  161|  57.2k|                                                    noskip_row[0][0];
  162|       |
  163|  57.2k|            const int y_lvl = f->frame_hdr->cdef.y_strength[cdef_idx];
  164|  57.2k|            const int uv_lvl = f->frame_hdr->cdef.uv_strength[cdef_idx];
  165|  57.2k|            const enum Backup2x8Flags flag = !!y_lvl + (!!uv_lvl << 1);
  166|       |
  167|  57.2k|            const int y_pri_lvl = (y_lvl >> 2) << bitdepth_min_8;
  168|  57.2k|            int y_sec_lvl = y_lvl & 3;
  169|  57.2k|            y_sec_lvl += y_sec_lvl == 3;
  170|  57.2k|            y_sec_lvl <<= bitdepth_min_8;
  171|       |
  172|  57.2k|            const int uv_pri_lvl = (uv_lvl >> 2) << bitdepth_min_8;
  173|  57.2k|            int uv_sec_lvl = uv_lvl & 3;
  174|  57.2k|            uv_sec_lvl += uv_sec_lvl == 3;
  175|  57.2k|            uv_sec_lvl <<= bitdepth_min_8;
  176|       |
  177|  57.2k|            pixel *bptrs[3] = { iptrs[0], iptrs[1], iptrs[2] };
  178|   291k|            for (int bx = sbx * sbsz; bx < imin((sbx + 1) * sbsz, f->bw);
  ------------------
  |  Branch (178:39): [True: 234k, False: 57.2k]
  ------------------
  179|   234k|                 bx += 2, edges |= CDEF_HAVE_LEFT)
  180|   234k|            {
  181|   234k|                if (bx + 2 >= f->bw) edges &= ~CDEF_HAVE_RIGHT;
  ------------------
  |  Branch (181:21): [True: 18.6k, False: 215k]
  ------------------
  182|       |
  183|       |                // check if this 8x8 block had any coded coefficients; if not,
  184|       |                // go to the next block
  185|   234k|                const uint32_t bx_mask = 3U << (bx & 30);
  186|   234k|                if (!(noskip_mask & bx_mask)) {
  ------------------
  |  Branch (186:21): [True: 25.0k, False: 209k]
  ------------------
  187|  25.0k|                    prev_flag = 0;
  188|  25.0k|                    goto next_b;
  189|  25.0k|                }
  190|   209k|                const enum Backup2x8Flags do_left = (prev_flag ^ flag) & flag;
  191|   209k|                prev_flag = flag;
  192|   209k|                if (do_left && edges & CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (192:21): [True: 20.5k, False: 188k]
  |  Branch (192:32): [True: 4.85k, False: 15.7k]
  ------------------
  193|       |                    // we didn't backup the prefilter data because it wasn't
  194|       |                    // there, so do it here instead
  195|  4.85k|                    backup2x8(lr_bak[bit], bptrs, f->cur.stride, 0, layout, do_left);
  196|  4.85k|                }
  197|   209k|                if (edges & CDEF_HAVE_RIGHT) {
  ------------------
  |  Branch (197:21): [True: 193k, False: 15.4k]
  ------------------
  198|       |                    // backup pre-filter data for next iteration
  199|   193k|                    backup2x8(lr_bak[!bit], bptrs, f->cur.stride, 8, layout, flag);
  200|   193k|                }
  201|       |
  202|   209k|                int dir;
  203|   209k|                unsigned variance;
  204|   209k|                if (y_pri_lvl || uv_pri_lvl)
  ------------------
  |  Branch (204:21): [True: 179k, False: 29.3k]
  |  Branch (204:34): [True: 12.5k, False: 16.8k]
  ------------------
  205|   192k|                    dir = dsp->cdef.dir(bptrs[0], f->cur.stride[0],
  206|   192k|                                        &variance HIGHBD_CALL_SUFFIX);
  207|       |
  208|   209k|                const pixel *top, *bot;
  209|   209k|                ptrdiff_t offset;
  210|       |
  211|   209k|                if (!have_tt) goto st_y;
  ------------------
  |  Branch (211:21): [True: 209k, False: 0]
  ------------------
  212|      0|                if (sbrow_start && by == by_start) {
  ------------------
  |  Branch (212:21): [True: 0, False: 0]
  |  Branch (212:36): [True: 0, False: 0]
  ------------------
  213|      0|                    if (resize) {
  ------------------
  |  Branch (213:25): [True: 0, False: 0]
  ------------------
  214|      0|                        offset = (sby - 1) * 4 * y_stride + bx * 4;
  215|      0|                        top = &f->lf.cdef_lpf_line[0][offset];
  216|      0|                    } else {
  217|      0|                        offset = (sby * (4 << sb128) - 4) * y_stride + bx * 4;
  218|      0|                        top = &f->lf.lr_lpf_line[0][offset];
  219|      0|                    }
  220|      0|                    bot = bptrs[0] + 8 * y_stride;
  221|      0|                } else if (!sbrow_start && by + 2 >= by_end) {
  ------------------
  |  Branch (221:28): [True: 0, False: 0]
  |  Branch (221:44): [True: 0, False: 0]
  ------------------
  222|      0|                    top = &f->lf.cdef_line[tf][0][sby * 4 * y_stride + bx * 4];
  223|      0|                    if (resize) {
  ------------------
  |  Branch (223:25): [True: 0, False: 0]
  ------------------
  224|      0|                        offset = (sby * 4 + 2) * y_stride + bx * 4;
  225|      0|                        bot = &f->lf.cdef_lpf_line[0][offset];
  226|      0|                    } else {
  227|      0|                        const int line = sby * (4 << sb128) + 4 * sb128 + 2;
  228|      0|                        offset = line * y_stride + bx * 4;
  229|      0|                        bot = &f->lf.lr_lpf_line[0][offset];
  230|      0|                    }
  231|      0|                } else {
  232|   209k|            st_y:;
  233|   209k|                    offset = sby * 4 * y_stride;
  234|   209k|                    top = &f->lf.cdef_line[tf][0][have_tt * offset + bx * 4];
  235|   209k|                    bot = bptrs[0] + 8 * y_stride;
  236|   209k|                }
  237|   209k|                if (y_pri_lvl) {
  ------------------
  |  Branch (237:21): [True: 179k, False: 29.3k]
  ------------------
  238|   179k|                    const int adj_y_pri_lvl = adjust_strength(y_pri_lvl, variance);
  239|   179k|                    if (adj_y_pri_lvl || y_sec_lvl)
  ------------------
  |  Branch (239:25): [True: 59.7k, False: 120k]
  |  Branch (239:42): [True: 84.6k, False: 35.4k]
  ------------------
  240|   144k|                        dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  241|   144k|                                        top, bot, adj_y_pri_lvl, y_sec_lvl,
  242|   144k|                                        dir, damping, edges HIGHBD_CALL_SUFFIX);
  243|   179k|                } else if (y_sec_lvl)
  ------------------
  |  Branch (243:28): [True: 18.9k, False: 10.4k]
  ------------------
  244|  18.9k|                    dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  245|  18.9k|                                    top, bot, 0, y_sec_lvl, 0, damping,
  246|  18.9k|                                    edges HIGHBD_CALL_SUFFIX);
  247|       |
  248|   209k|                if (!uv_lvl) goto skip_uv;
  ------------------
  |  Branch (248:21): [True: 69.1k, False: 140k]
  ------------------
  249|   140k|                assert(layout != DAV1D_PIXEL_LAYOUT_I400);
  ------------------
  |  |  140|   140k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 140k]
  |  |  |  Branch (140:68): [Folded, False: 140k]
  |  |  ------------------
  ------------------
  250|       |
  251|   140k|                const int uvdir = uv_pri_lvl ? uv_dir[dir] : 0;
  ------------------
  |  Branch (251:35): [True: 124k, False: 15.1k]
  ------------------
  252|   420k|                for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (252:34): [True: 280k, False: 140k]
  ------------------
  253|   280k|                    if (!have_tt) goto st_uv;
  ------------------
  |  Branch (253:25): [True: 280k, False: 0]
  ------------------
  254|      0|                    if (sbrow_start && by == by_start) {
  ------------------
  |  Branch (254:25): [True: 0, False: 0]
  |  Branch (254:40): [True: 0, False: 0]
  ------------------
  255|      0|                        if (resize) {
  ------------------
  |  Branch (255:29): [True: 0, False: 0]
  ------------------
  256|      0|                            offset = (sby - 1) * 4 * uv_stride + (bx * 4 >> ss_hor);
  257|      0|                            top = &f->lf.cdef_lpf_line[pl][offset];
  258|      0|                        } else {
  259|      0|                            const int line = sby * (4 << sb128) - 4;
  260|      0|                            offset = line * uv_stride + (bx * 4 >> ss_hor);
  261|      0|                            top = &f->lf.lr_lpf_line[pl][offset];
  262|      0|                        }
  263|      0|                        bot = bptrs[pl] + (8 >> ss_ver) * uv_stride;
  264|      0|                    } else if (!sbrow_start && by + 2 >= by_end) {
  ------------------
  |  Branch (264:32): [True: 0, False: 0]
  |  Branch (264:48): [True: 0, False: 0]
  ------------------
  265|      0|                        const ptrdiff_t top_offset = sby * 8 * uv_stride +
  266|      0|                                                     (bx * 4 >> ss_hor);
  267|      0|                        top = &f->lf.cdef_line[tf][pl][top_offset];
  268|      0|                        if (resize) {
  ------------------
  |  Branch (268:29): [True: 0, False: 0]
  ------------------
  269|      0|                            offset = (sby * 4 + 2) * uv_stride + (bx * 4 >> ss_hor);
  270|      0|                            bot = &f->lf.cdef_lpf_line[pl][offset];
  271|      0|                        } else {
  272|      0|                            const int line = sby * (4 << sb128) + 4 * sb128 + 2;
  273|      0|                            offset = line * uv_stride + (bx * 4 >> ss_hor);
  274|      0|                            bot = &f->lf.lr_lpf_line[pl][offset];
  275|      0|                        }
  276|      0|                    } else {
  277|   280k|                st_uv:;
  278|   280k|                        const ptrdiff_t offset = sby * 8 * uv_stride;
  279|   280k|                        top = &f->lf.cdef_line[tf][pl][have_tt * offset + (bx * 4 >> ss_hor)];
  280|   280k|                        bot = bptrs[pl] + (8 >> ss_ver) * uv_stride;
  281|   280k|                    }
  282|   280k|                    dsp->cdef.fb[uv_idx](bptrs[pl], f->cur.stride[1],
  283|   280k|                                         lr_bak[bit][pl], top, bot,
  284|   280k|                                         uv_pri_lvl, uv_sec_lvl, uvdir,
  285|   280k|                                         damping - 1, edges HIGHBD_CALL_SUFFIX);
  286|   280k|                }
  287|       |
  288|   209k|            skip_uv:
  289|   209k|                bit ^= 1;
  290|       |
  291|   234k|            next_b:
  292|   234k|                bptrs[0] += 8;
  293|   234k|                bptrs[1] += 8 >> ss_hor;
  294|   234k|                bptrs[2] += 8 >> ss_hor;
  295|   234k|            }
  296|       |
  297|   415k|        next_sb:
  298|   415k|            iptrs[0] += sbsz * 4;
  299|   415k|            iptrs[1] += sbsz * 4 >> ss_hor;
  300|   415k|            iptrs[2] += sbsz * 4 >> ss_hor;
  301|   415k|        }
  302|       |
  303|   136k|        ptrs[0] += 8 * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|   136k|#define PXSTRIDE(x) (x)
  ------------------
  304|   136k|        ptrs[1] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  ------------------
  |  |   53|   136k|#define PXSTRIDE(x) (x)
  ------------------
  305|   136k|        ptrs[2] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  ------------------
  |  |   53|   136k|#define PXSTRIDE(x) (x)
  ------------------
  306|   136k|        tc->top_pre_cdef_toggle ^= 1;
  307|   136k|    }
  308|  23.0k|}
cdef_apply_tmpl.c:backup2lines:
   44|   347k|{
   45|   347k|    const ptrdiff_t y_stride = PXSTRIDE(stride[0]);
  ------------------
  |  |   53|   347k|#define PXSTRIDE(x) (x)
  ------------------
   46|   347k|    if (y_stride < 0)
  ------------------
  |  Branch (46:9): [True: 0, False: 347k]
  ------------------
   47|      0|        pixel_copy(dst[0] + y_stride, src[0] + 7 * y_stride, -2 * y_stride);
  ------------------
  |  |   47|      0|#define pixel_copy memcpy
  ------------------
   48|   347k|    else
   49|   347k|        pixel_copy(dst[0], src[0] + 6 * y_stride, 2 * y_stride);
  ------------------
  |  |   47|   347k|#define pixel_copy memcpy
  ------------------
   50|       |
   51|   347k|    if (layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (51:9): [True: 277k, False: 69.4k]
  ------------------
   52|   277k|        const ptrdiff_t uv_stride = PXSTRIDE(stride[1]);
  ------------------
  |  |   53|   277k|#define PXSTRIDE(x) (x)
  ------------------
   53|   277k|        if (uv_stride < 0) {
  ------------------
  |  Branch (53:13): [True: 0, False: 277k]
  ------------------
   54|      0|            const int uv_off = layout == DAV1D_PIXEL_LAYOUT_I420 ? 3 : 7;
  ------------------
  |  Branch (54:32): [True: 0, False: 0]
  ------------------
   55|      0|            pixel_copy(dst[1] + uv_stride, src[1] + uv_off * uv_stride, -2 * uv_stride);
  ------------------
  |  |   47|      0|#define pixel_copy memcpy
  ------------------
   56|      0|            pixel_copy(dst[2] + uv_stride, src[2] + uv_off * uv_stride, -2 * uv_stride);
  ------------------
  |  |   47|      0|#define pixel_copy memcpy
  ------------------
   57|   277k|        } else {
   58|   277k|            const int uv_off = layout == DAV1D_PIXEL_LAYOUT_I420 ? 2 : 6;
  ------------------
  |  Branch (58:32): [True: 73.4k, False: 204k]
  ------------------
   59|   277k|            pixel_copy(dst[1], src[1] + uv_off * uv_stride, 2 * uv_stride);
  ------------------
  |  |   47|   277k|#define pixel_copy memcpy
  ------------------
   60|   277k|            pixel_copy(dst[2], src[2] + uv_off * uv_stride, 2 * uv_stride);
  ------------------
  |  |   47|   277k|#define pixel_copy memcpy
  ------------------
   61|   277k|        }
   62|   277k|    }
   63|   347k|}
cdef_apply_tmpl.c:backup2x8:
   70|   932k|{
   71|   932k|    ptrdiff_t y_off = 0;
   72|   932k|    if (flag & BACKUP_2X8_Y) {
  ------------------
  |  Branch (72:9): [True: 908k, False: 23.3k]
  ------------------
   73|  8.17M|        for (int y = 0; y < 8; y++, y_off += PXSTRIDE(src_stride[0]))
  ------------------
  |  |   53|  7.26M|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (73:25): [True: 7.26M, False: 908k]
  ------------------
   74|  7.26M|            pixel_copy(dst[0][y], &src[0][y_off + x_off - 2], 2);
  ------------------
  |  |   47|  7.26M|#define pixel_copy memcpy
  ------------------
   75|   908k|    }
   76|       |
   77|   932k|    if (layout == DAV1D_PIXEL_LAYOUT_I400 || !(flag & BACKUP_2X8_UV))
  ------------------
  |  Branch (77:9): [True: 116k, False: 816k]
  |  Branch (77:46): [True: 39.4k, False: 776k]
  ------------------
   78|   155k|        return;
   79|       |
   80|   776k|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
   81|   776k|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
   82|       |
   83|   776k|    x_off >>= ss_hor;
   84|   776k|    y_off = 0;
   85|  4.83M|    for (int y = 0; y < (8 >> ss_ver); y++, y_off += PXSTRIDE(src_stride[1])) {
  ------------------
  |  |   53|  4.05M|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (85:21): [True: 4.05M, False: 776k]
  ------------------
   86|  4.05M|        pixel_copy(dst[1][y], &src[1][y_off + x_off - 2], 2);
  ------------------
  |  |   47|  4.05M|#define pixel_copy memcpy
  ------------------
   87|  4.05M|        pixel_copy(dst[2][y], &src[2][y_off + x_off - 2], 2);
  ------------------
  |  |   47|  4.05M|#define pixel_copy memcpy
  ------------------
   88|  4.05M|    }
   89|   776k|}
cdef_apply_tmpl.c:adjust_strength:
   91|   848k|static int adjust_strength(const int strength, const unsigned var) {
   92|   848k|    if (!var) return 0;
  ------------------
  |  Branch (92:9): [True: 461k, False: 387k]
  ------------------
   93|   387k|    const int i = var >> 6 ? imin(ulog2(var >> 6), 12) : 0;
  ------------------
  |  Branch (93:19): [True: 199k, False: 188k]
  ------------------
   94|   387k|    return (strength * (4 + i) + 8) >> 4;
   95|   848k|}
dav1d_cdef_brow_16bpc:
  102|  38.7k|{
  103|  38.7k|    Dav1dFrameContext *const f = (Dav1dFrameContext *)tc->f;
  104|  38.7k|    const int bitdepth_min_8 = BITDEPTH == 8 ? 0 : f->cur.p.bpc - 8;
  ------------------
  |  Branch (104:32): [Folded, False: 38.7k]
  ------------------
  105|  38.7k|    const Dav1dDSPContext *const dsp = f->dsp;
  106|  38.7k|    enum CdefEdgeFlags edges = CDEF_HAVE_BOTTOM | (by_start > 0 ? CDEF_HAVE_TOP : 0);
  ------------------
  |  Branch (106:52): [True: 34.1k, False: 4.53k]
  ------------------
  107|  38.7k|    pixel *ptrs[3] = { p[0], p[1], p[2] };
  108|  38.7k|    const int sbsz = 16;
  109|  38.7k|    const int sb64w = f->sb128w << 1;
  110|  38.7k|    const int damping = f->frame_hdr->cdef.damping + bitdepth_min_8;
  111|  38.7k|    const enum Dav1dPixelLayout layout = f->cur.p.layout;
  112|  38.7k|    const int uv_idx = DAV1D_PIXEL_LAYOUT_I444 - layout;
  113|  38.7k|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
  114|  38.7k|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
  115|  38.7k|    static const uint8_t uv_dirs[2][8] = { { 0, 1, 2, 3, 4, 5, 6, 7 },
  116|  38.7k|                                           { 7, 0, 2, 4, 5, 6, 6, 6 } };
  117|  38.7k|    const uint8_t *uv_dir = uv_dirs[layout == DAV1D_PIXEL_LAYOUT_I422];
  118|  38.7k|    const int have_tt = f->c->n_tc > 1;
  119|  38.7k|    const int sb128 = f->seq_hdr->sb128;
  120|  38.7k|    const int resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
  121|  38.7k|    const ptrdiff_t y_stride = PXSTRIDE(f->cur.stride[0]);
  122|  38.7k|    const ptrdiff_t uv_stride = PXSTRIDE(f->cur.stride[1]);
  123|       |
  124|   257k|    for (int bit = 0, by = by_start; by < by_end; by += 2, edges |= CDEF_HAVE_TOP) {
  ------------------
  |  Branch (124:38): [True: 218k, False: 38.7k]
  ------------------
  125|   218k|        const int tf = tc->top_pre_cdef_toggle;
  126|   218k|        const int by_idx = (by & 30) >> 1;
  127|   218k|        if (by + 2 >= f->bh) edges &= ~CDEF_HAVE_BOTTOM;
  ------------------
  |  Branch (127:13): [True: 4.25k, False: 214k]
  ------------------
  128|       |
  129|   218k|        if ((!have_tt || sbrow_start || by + 2 < by_end) &&
  ------------------
  |  Branch (129:14): [True: 218k, False: 0]
  |  Branch (129:26): [True: 0, False: 0]
  |  Branch (129:41): [True: 0, False: 0]
  ------------------
  130|   218k|            edges & CDEF_HAVE_BOTTOM)
  ------------------
  |  Branch (130:13): [True: 214k, False: 4.25k]
  ------------------
  131|   214k|        {
  132|       |            // backup pre-filter data for next iteration
  133|   214k|            pixel *const cdef_top_bak[3] = {
  134|   214k|                f->lf.cdef_line[!tf][0] + have_tt * sby * 4 * y_stride,
  135|   214k|                f->lf.cdef_line[!tf][1] + have_tt * sby * 8 * uv_stride,
  136|   214k|                f->lf.cdef_line[!tf][2] + have_tt * sby * 8 * uv_stride
  137|   214k|            };
  138|   214k|            backup2lines(cdef_top_bak, ptrs, f->cur.stride, layout);
  139|   214k|        }
  140|       |
  141|   218k|        ALIGN_STK_16(pixel, lr_bak, 2 /* idx */, [3 /* plane */][8 /* y */][2 /* x */]);
  ------------------
  |  |  100|   218k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   218k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  142|   218k|        pixel *iptrs[3] = { ptrs[0], ptrs[1], ptrs[2] };
  143|   218k|        edges &= ~CDEF_HAVE_LEFT;
  144|   218k|        edges |= CDEF_HAVE_RIGHT;
  145|   218k|        enum Backup2x8Flags prev_flag = 0;
  146|   996k|        for (int sbx = 0; sbx < sb64w; sbx++, edges |= CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (146:27): [True: 777k, False: 218k]
  ------------------
  147|   777k|            const int sb128x = sbx >> 1;
  148|   777k|            const int sb64_idx = ((by & sbsz) >> 3) + (sbx & 1);
  149|   777k|            const int cdef_idx = lflvl[sb128x].cdef_idx[sb64_idx];
  150|   777k|            if (cdef_idx == -1 ||
  ------------------
  |  Branch (150:17): [True: 496k, False: 281k]
  ------------------
  151|   281k|                (!f->frame_hdr->cdef.y_strength[cdef_idx] &&
  ------------------
  |  Branch (151:18): [True: 104k, False: 176k]
  ------------------
  152|   104k|                 !f->frame_hdr->cdef.uv_strength[cdef_idx]))
  ------------------
  |  Branch (152:18): [True: 100k, False: 3.58k]
  ------------------
  153|   597k|            {
  154|   597k|                prev_flag = 0;
  155|   597k|                goto next_sb;
  156|   597k|            }
  157|       |
  158|       |            // Create a complete 32-bit mask for the sb row ahead of time.
  159|   180k|            const uint16_t (*noskip_row)[2] = &lflvl[sb128x].noskip_mask[by_idx];
  160|   180k|            const unsigned noskip_mask = (unsigned) noskip_row[0][1] << 16 |
  161|   180k|                                                    noskip_row[0][0];
  162|       |
  163|   180k|            const int y_lvl = f->frame_hdr->cdef.y_strength[cdef_idx];
  164|   180k|            const int uv_lvl = f->frame_hdr->cdef.uv_strength[cdef_idx];
  165|   180k|            const enum Backup2x8Flags flag = !!y_lvl + (!!uv_lvl << 1);
  166|       |
  167|   180k|            const int y_pri_lvl = (y_lvl >> 2) << bitdepth_min_8;
  168|   180k|            int y_sec_lvl = y_lvl & 3;
  169|   180k|            y_sec_lvl += y_sec_lvl == 3;
  170|   180k|            y_sec_lvl <<= bitdepth_min_8;
  171|       |
  172|   180k|            const int uv_pri_lvl = (uv_lvl >> 2) << bitdepth_min_8;
  173|   180k|            int uv_sec_lvl = uv_lvl & 3;
  174|   180k|            uv_sec_lvl += uv_sec_lvl == 3;
  175|   180k|            uv_sec_lvl <<= bitdepth_min_8;
  176|       |
  177|   180k|            pixel *bptrs[3] = { iptrs[0], iptrs[1], iptrs[2] };
  178|  1.01M|            for (int bx = sbx * sbsz; bx < imin((sbx + 1) * sbsz, f->bw);
  ------------------
  |  Branch (178:39): [True: 830k, False: 180k]
  ------------------
  179|   830k|                 bx += 2, edges |= CDEF_HAVE_LEFT)
  180|   830k|            {
  181|   830k|                if (bx + 2 >= f->bw) edges &= ~CDEF_HAVE_RIGHT;
  ------------------
  |  Branch (181:21): [True: 41.0k, False: 789k]
  ------------------
  182|       |
  183|       |                // check if this 8x8 block had any coded coefficients; if not,
  184|       |                // go to the next block
  185|   830k|                const uint32_t bx_mask = 3U << (bx & 30);
  186|   830k|                if (!(noskip_mask & bx_mask)) {
  ------------------
  |  Branch (186:21): [True: 75.5k, False: 755k]
  ------------------
  187|  75.5k|                    prev_flag = 0;
  188|  75.5k|                    goto next_b;
  189|  75.5k|                }
  190|   755k|                const enum Backup2x8Flags do_left = (prev_flag ^ flag) & flag;
  191|   755k|                prev_flag = flag;
  192|   755k|                if (do_left && edges & CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (192:21): [True: 48.9k, False: 706k]
  |  Branch (192:32): [True: 13.0k, False: 35.8k]
  ------------------
  193|       |                    // we didn't backup the prefilter data because it wasn't
  194|       |                    // there, so do it here instead
  195|  13.0k|                    backup2x8(lr_bak[bit], bptrs, f->cur.stride, 0, layout, do_left);
  196|  13.0k|                }
  197|   755k|                if (edges & CDEF_HAVE_RIGHT) {
  ------------------
  |  Branch (197:21): [True: 720k, False: 34.7k]
  ------------------
  198|       |                    // backup pre-filter data for next iteration
  199|   720k|                    backup2x8(lr_bak[!bit], bptrs, f->cur.stride, 8, layout, flag);
  200|   720k|                }
  201|       |
  202|   755k|                int dir;
  203|   755k|                unsigned variance;
  204|   755k|                if (y_pri_lvl || uv_pri_lvl)
  ------------------
  |  Branch (204:21): [True: 668k, False: 86.4k]
  |  Branch (204:34): [True: 54.9k, False: 31.4k]
  ------------------
  205|   723k|                    dir = dsp->cdef.dir(bptrs[0], f->cur.stride[0],
  206|   723k|                                        &variance HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   723k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  207|       |
  208|   755k|                const pixel *top, *bot;
  209|   755k|                ptrdiff_t offset;
  210|       |
  211|   755k|                if (!have_tt) goto st_y;
  ------------------
  |  Branch (211:21): [True: 755k, False: 0]
  ------------------
  212|      0|                if (sbrow_start && by == by_start) {
  ------------------
  |  Branch (212:21): [True: 0, False: 0]
  |  Branch (212:36): [True: 0, False: 0]
  ------------------
  213|      0|                    if (resize) {
  ------------------
  |  Branch (213:25): [True: 0, False: 0]
  ------------------
  214|      0|                        offset = (sby - 1) * 4 * y_stride + bx * 4;
  215|      0|                        top = &f->lf.cdef_lpf_line[0][offset];
  216|      0|                    } else {
  217|      0|                        offset = (sby * (4 << sb128) - 4) * y_stride + bx * 4;
  218|      0|                        top = &f->lf.lr_lpf_line[0][offset];
  219|      0|                    }
  220|      0|                    bot = bptrs[0] + 8 * y_stride;
  221|      0|                } else if (!sbrow_start && by + 2 >= by_end) {
  ------------------
  |  Branch (221:28): [True: 0, False: 0]
  |  Branch (221:44): [True: 0, False: 0]
  ------------------
  222|      0|                    top = &f->lf.cdef_line[tf][0][sby * 4 * y_stride + bx * 4];
  223|      0|                    if (resize) {
  ------------------
  |  Branch (223:25): [True: 0, False: 0]
  ------------------
  224|      0|                        offset = (sby * 4 + 2) * y_stride + bx * 4;
  225|      0|                        bot = &f->lf.cdef_lpf_line[0][offset];
  226|      0|                    } else {
  227|      0|                        const int line = sby * (4 << sb128) + 4 * sb128 + 2;
  228|      0|                        offset = line * y_stride + bx * 4;
  229|      0|                        bot = &f->lf.lr_lpf_line[0][offset];
  230|      0|                    }
  231|      0|                } else {
  232|   755k|            st_y:;
  233|   755k|                    offset = sby * 4 * y_stride;
  234|   755k|                    top = &f->lf.cdef_line[tf][0][have_tt * offset + bx * 4];
  235|   755k|                    bot = bptrs[0] + 8 * y_stride;
  236|   755k|                }
  237|   755k|                if (y_pri_lvl) {
  ------------------
  |  Branch (237:21): [True: 668k, False: 86.4k]
  ------------------
  238|   668k|                    const int adj_y_pri_lvl = adjust_strength(y_pri_lvl, variance);
  239|   668k|                    if (adj_y_pri_lvl || y_sec_lvl)
  ------------------
  |  Branch (239:25): [True: 324k, False: 344k]
  |  Branch (239:42): [True: 210k, False: 133k]
  ------------------
  240|   534k|                        dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  241|   534k|                                        top, bot, adj_y_pri_lvl, y_sec_lvl,
  242|   534k|                                        dir, damping, edges HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   534k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  243|   668k|                } else if (y_sec_lvl)
  ------------------
  |  Branch (243:28): [True: 71.7k, False: 14.7k]
  ------------------
  244|  71.7k|                    dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  245|  71.7k|                                    top, bot, 0, y_sec_lvl, 0, damping,
  246|  71.7k|                                    edges HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  71.7k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  247|       |
  248|   755k|                if (!uv_lvl) goto skip_uv;
  ------------------
  |  Branch (248:21): [True: 103k, False: 651k]
  ------------------
  249|   651k|                assert(layout != DAV1D_PIXEL_LAYOUT_I400);
  ------------------
  |  |  140|   651k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 651k]
  |  |  |  Branch (140:68): [Folded, False: 651k]
  |  |  ------------------
  ------------------
  250|       |
  251|   651k|                const int uvdir = uv_pri_lvl ? uv_dir[dir] : 0;
  ------------------
  |  Branch (251:35): [True: 624k, False: 27.6k]
  ------------------
  252|  1.95M|                for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (252:34): [True: 1.30M, False: 651k]
  ------------------
  253|  1.30M|                    if (!have_tt) goto st_uv;
  ------------------
  |  Branch (253:25): [True: 1.30M, False: 0]
  ------------------
  254|      0|                    if (sbrow_start && by == by_start) {
  ------------------
  |  Branch (254:25): [True: 0, False: 0]
  |  Branch (254:40): [True: 0, False: 0]
  ------------------
  255|      0|                        if (resize) {
  ------------------
  |  Branch (255:29): [True: 0, False: 0]
  ------------------
  256|      0|                            offset = (sby - 1) * 4 * uv_stride + (bx * 4 >> ss_hor);
  257|      0|                            top = &f->lf.cdef_lpf_line[pl][offset];
  258|      0|                        } else {
  259|      0|                            const int line = sby * (4 << sb128) - 4;
  260|      0|                            offset = line * uv_stride + (bx * 4 >> ss_hor);
  261|      0|                            top = &f->lf.lr_lpf_line[pl][offset];
  262|      0|                        }
  263|      0|                        bot = bptrs[pl] + (8 >> ss_ver) * uv_stride;
  264|      0|                    } else if (!sbrow_start && by + 2 >= by_end) {
  ------------------
  |  Branch (264:32): [True: 0, False: 0]
  |  Branch (264:48): [True: 0, False: 0]
  ------------------
  265|      0|                        const ptrdiff_t top_offset = sby * 8 * uv_stride +
  266|      0|                                                     (bx * 4 >> ss_hor);
  267|      0|                        top = &f->lf.cdef_line[tf][pl][top_offset];
  268|      0|                        if (resize) {
  ------------------
  |  Branch (268:29): [True: 0, False: 0]
  ------------------
  269|      0|                            offset = (sby * 4 + 2) * uv_stride + (bx * 4 >> ss_hor);
  270|      0|                            bot = &f->lf.cdef_lpf_line[pl][offset];
  271|      0|                        } else {
  272|      0|                            const int line = sby * (4 << sb128) + 4 * sb128 + 2;
  273|      0|                            offset = line * uv_stride + (bx * 4 >> ss_hor);
  274|      0|                            bot = &f->lf.lr_lpf_line[pl][offset];
  275|      0|                        }
  276|      0|                    } else {
  277|  1.30M|                st_uv:;
  278|  1.30M|                        const ptrdiff_t offset = sby * 8 * uv_stride;
  279|  1.30M|                        top = &f->lf.cdef_line[tf][pl][have_tt * offset + (bx * 4 >> ss_hor)];
  280|  1.30M|                        bot = bptrs[pl] + (8 >> ss_ver) * uv_stride;
  281|  1.30M|                    }
  282|  1.30M|                    dsp->cdef.fb[uv_idx](bptrs[pl], f->cur.stride[1],
  283|  1.30M|                                         lr_bak[bit][pl], top, bot,
  284|  1.30M|                                         uv_pri_lvl, uv_sec_lvl, uvdir,
  285|  1.30M|                                         damping - 1, edges HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.30M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  286|  1.30M|                }
  287|       |
  288|   755k|            skip_uv:
  289|   755k|                bit ^= 1;
  290|       |
  291|   830k|            next_b:
  292|   830k|                bptrs[0] += 8;
  293|   830k|                bptrs[1] += 8 >> ss_hor;
  294|   830k|                bptrs[2] += 8 >> ss_hor;
  295|   830k|            }
  296|       |
  297|   777k|        next_sb:
  298|   777k|            iptrs[0] += sbsz * 4;
  299|   777k|            iptrs[1] += sbsz * 4 >> ss_hor;
  300|   777k|            iptrs[2] += sbsz * 4 >> ss_hor;
  301|   777k|        }
  302|       |
  303|   218k|        ptrs[0] += 8 * PXSTRIDE(f->cur.stride[0]);
  304|   218k|        ptrs[1] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  305|   218k|        ptrs[2] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  306|   218k|        tc->top_pre_cdef_toggle ^= 1;
  307|   218k|    }
  308|  38.7k|}

dav1d_cdef_dsp_init_8bpc:
  320|  4.86k|COLD void bitfn(dav1d_cdef_dsp_init)(Dav1dCdefDSPContext *const c) {
  321|  4.86k|    c->dir = cdef_find_dir_c;
  322|  4.86k|    c->fb[0] = cdef_filter_block_8x8_c;
  323|  4.86k|    c->fb[1] = cdef_filter_block_4x8_c;
  324|  4.86k|    c->fb[2] = cdef_filter_block_4x4_c;
  325|       |
  326|  4.86k|#if HAVE_ASM
  327|       |#if ARCH_AARCH64 || ARCH_ARM
  328|       |    cdef_dsp_init_arm(c);
  329|       |#elif ARCH_PPC64LE
  330|       |    cdef_dsp_init_ppc(c);
  331|       |#elif ARCH_RISCV
  332|       |    cdef_dsp_init_riscv(c);
  333|       |#elif ARCH_X86
  334|       |    cdef_dsp_init_x86(c);
  335|       |#elif ARCH_LOONGARCH64
  336|       |    cdef_dsp_init_loongarch(c);
  337|       |#endif
  338|  4.86k|#endif
  339|  4.86k|}
dav1d_cdef_dsp_init_16bpc:
  320|  6.93k|COLD void bitfn(dav1d_cdef_dsp_init)(Dav1dCdefDSPContext *const c) {
  321|  6.93k|    c->dir = cdef_find_dir_c;
  322|  6.93k|    c->fb[0] = cdef_filter_block_8x8_c;
  323|  6.93k|    c->fb[1] = cdef_filter_block_4x8_c;
  324|  6.93k|    c->fb[2] = cdef_filter_block_4x4_c;
  325|       |
  326|  6.93k|#if HAVE_ASM
  327|       |#if ARCH_AARCH64 || ARCH_ARM
  328|       |    cdef_dsp_init_arm(c);
  329|       |#elif ARCH_PPC64LE
  330|       |    cdef_dsp_init_ppc(c);
  331|       |#elif ARCH_RISCV
  332|       |    cdef_dsp_init_riscv(c);
  333|       |#elif ARCH_X86
  334|       |    cdef_dsp_init_x86(c);
  335|       |#elif ARCH_LOONGARCH64
  336|       |    cdef_dsp_init_loongarch(c);
  337|       |#endif
  338|  6.93k|#endif
  339|  6.93k|}

dav1d_cdf_thread_update:
 3918|  3.68k|{
 3919|  3.68k|#define update_cdf_1d(n1d, name) \
 3920|  3.68k|    do { \
 3921|  3.68k|        dst->name[n1d] = 0; \
 3922|  3.68k|    } while (0)
 3923|  3.68k|#define update_cdf_2d(n1d, n2d, name) \
 3924|  3.68k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
 3925|  3.68k|#define update_cdf_3d(n1d, n2d, n3d, name) \
 3926|  3.68k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
 3927|  3.68k|#define update_cdf_4d(n1d, n2d, n3d, n4d, name) \
 3928|  3.68k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
 3929|       |
 3930|  3.68k|    memcpy(dst, src, offsetof(CdfContext, m.intrabc));
 3931|       |
 3932|  3.68k|    update_cdf_3d(2, 2, 4, coef.eob_bin_16);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  22.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 14.7k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3933|  3.68k|    update_cdf_3d(2, 2, 5, coef.eob_bin_32);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  22.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 14.7k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3934|  3.68k|    update_cdf_3d(2, 2, 6, coef.eob_bin_64);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  22.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 14.7k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3935|  3.68k|    update_cdf_3d(2, 2, 7, coef.eob_bin_128);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  22.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 14.7k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3936|  3.68k|    update_cdf_3d(2, 2, 8, coef.eob_bin_256);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  22.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 14.7k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3937|  3.68k|    update_cdf_2d(2, 9, coef.eob_bin_512);
  ------------------
  |  | 3924|  11.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  7.36k|    do { \
  |  |  |  | 3921|  7.36k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  7.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3938|  3.68k|    update_cdf_2d(2, 10, coef.eob_bin_1024);
  ------------------
  |  | 3924|  11.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  7.36k|    do { \
  |  |  |  | 3921|  7.36k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  7.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3939|  3.68k|    update_cdf_4d(N_TX_SIZES, 2, 4, 2, coef.eob_base_tok);
  ------------------
  |  | 3928|  22.0k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  55.2k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   184k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|   147k|    do { \
  |  |  |  |  |  |  |  | 3921|   147k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   147k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 147k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 147k, False: 36.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 36.8k, False: 18.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 18.4k, False: 3.68k]
  |  |  ------------------
  ------------------
 3940|  3.68k|    update_cdf_4d(N_TX_SIZES, 2, 41 /*42*/, 3, coef.base_tok);
  ------------------
  |  | 3928|  22.0k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  55.2k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|  1.54M|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|  1.50M|    do { \
  |  |  |  |  |  |  |  | 3921|  1.50M|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|  1.50M|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 1.50M]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 1.50M, False: 36.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 36.8k, False: 18.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 18.4k, False: 3.68k]
  |  |  ------------------
  ------------------
 3941|  3.68k|    update_cdf_4d(4, 2, 21, 3, coef.br_tok);
  ------------------
  |  | 3928|  18.4k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  44.1k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   647k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|   618k|    do { \
  |  |  |  |  |  |  |  | 3921|   618k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   618k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 618k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 618k, False: 29.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 29.4k, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 14.7k, False: 3.68k]
  |  |  ------------------
  ------------------
 3942|  3.68k|    update_cdf_4d(N_TX_SIZES, 2, 9, 1, coef.eob_hi_bit);
  ------------------
  |  | 3928|  22.0k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  55.2k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   368k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|   331k|    do { \
  |  |  |  |  |  |  |  | 3921|   331k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   331k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 331k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 331k, False: 36.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 36.8k, False: 18.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 18.4k, False: 3.68k]
  |  |  ------------------
  ------------------
 3943|  3.68k|    update_cdf_3d(N_TX_SIZES, 13, 1, coef.skip);
  ------------------
  |  | 3926|  22.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|   257k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|   239k|    do { \
  |  |  |  |  |  | 3921|   239k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|   239k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 239k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 239k, False: 18.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 18.4k, False: 3.68k]
  |  |  ------------------
  ------------------
 3944|  3.68k|    update_cdf_3d(2, 3, 1, coef.dc_sign);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  29.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  22.0k|    do { \
  |  |  |  |  |  | 3921|  22.0k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  22.0k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 22.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 22.0k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3945|       |
 3946|  3.68k|    update_cdf_3d(2, N_INTRA_PRED_MODES, N_UV_INTRA_PRED_MODES - 1 - !k, m.uv_mode);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|   103k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  95.6k|    do { \
  |  |  |  |  |  | 3921|  95.6k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  95.6k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 95.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 95.6k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3947|  3.68k|    update_cdf_2d(4, N_PARTITIONS - 3, m.partition[BL_128X128]);
  ------------------
  |  | 3924|  18.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 14.7k, False: 3.68k]
  |  |  ------------------
  ------------------
 3948|  14.7k|    for (int k = BL_64X64; k < BL_8X8; k++)
  ------------------
  |  Branch (3948:28): [True: 11.0k, False: 3.68k]
  ------------------
 3949|  11.0k|        update_cdf_2d(4, N_PARTITIONS - 1, m.partition[k]);
  ------------------
  |  | 3924|  55.2k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  44.1k|    do { \
  |  |  |  | 3921|  44.1k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  44.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 44.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 44.1k, False: 11.0k]
  |  |  ------------------
  ------------------
 3950|  3.68k|    update_cdf_2d(4, N_SUB8X8_PARTITIONS - 1, m.partition[BL_8X8]);
  ------------------
  |  | 3924|  18.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 14.7k, False: 3.68k]
  |  |  ------------------
  ------------------
 3951|  3.68k|    update_cdf_2d(6, 15, m.cfl_alpha);
  ------------------
  |  | 3924|  25.7k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  22.0k|    do { \
  |  |  |  | 3921|  22.0k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  22.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 22.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 22.0k, False: 3.68k]
  |  |  ------------------
  ------------------
 3952|  3.68k|    update_cdf_2d(2, 15, m.txtp_inter1);
  ------------------
  |  | 3924|  11.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  7.36k|    do { \
  |  |  |  | 3921|  7.36k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  7.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3953|  3.68k|    update_cdf_1d(11, m.txtp_inter2);
  ------------------
  |  | 3920|  3.68k|    do { \
  |  | 3921|  3.68k|        dst->name[n1d] = 0; \
  |  | 3922|  3.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
 3954|  3.68k|    update_cdf_3d(2, N_INTRA_PRED_MODES, 6, m.txtp_intra1);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|   103k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  95.6k|    do { \
  |  |  |  |  |  | 3921|  95.6k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  95.6k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 95.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 95.6k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3955|  3.68k|    update_cdf_3d(3, N_INTRA_PRED_MODES, 4, m.txtp_intra2);
  ------------------
  |  | 3926|  14.7k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|   154k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|   143k|    do { \
  |  |  |  |  |  | 3921|   143k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|   143k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 143k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 143k, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 11.0k, False: 3.68k]
  |  |  ------------------
  ------------------
 3956|  3.68k|    update_cdf_1d(7, m.cfl_sign);
  ------------------
  |  | 3920|  3.68k|    do { \
  |  | 3921|  3.68k|        dst->name[n1d] = 0; \
  |  | 3922|  3.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
 3957|  3.68k|    update_cdf_2d(8, 6, m.angle_delta);
  ------------------
  |  | 3924|  33.1k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  29.4k|    do { \
  |  |  |  | 3921|  29.4k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  29.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 29.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 29.4k, False: 3.68k]
  |  |  ------------------
  ------------------
 3958|  3.68k|    update_cdf_1d(4, m.filter_intra);
  ------------------
  |  | 3920|  3.68k|    do { \
  |  | 3921|  3.68k|        dst->name[n1d] = 0; \
  |  | 3922|  3.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
 3959|  3.68k|    update_cdf_2d(3, DAV1D_MAX_SEGMENTS - 1, m.seg_id);
  ------------------
  |  | 3924|  14.7k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  11.0k|    do { \
  |  |  |  | 3921|  11.0k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  11.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 11.0k, False: 3.68k]
  |  |  ------------------
  ------------------
 3960|  3.68k|    update_cdf_3d(2, 7, 6, m.pal_sz);
  ------------------
  |  | 3926|  11.0k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  58.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  51.5k|    do { \
  |  |  |  |  |  | 3921|  51.5k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  51.5k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 51.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 51.5k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3961|  3.68k|    update_cdf_4d(2, 7, 5, k + 1, m.color_map);
  ------------------
  |  | 3928|  11.0k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  58.8k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   309k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|   257k|    do { \
  |  |  |  |  |  |  |  | 3921|   257k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   257k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 257k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 257k, False: 51.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 51.5k, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3962|  3.68k|    update_cdf_3d(N_TX_SIZES - 1, 3, imin(k + 1, 2), m.txsz);
  ------------------
  |  | 3926|  18.4k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  58.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  44.1k|    do { \
  |  |  |  |  |  | 3921|  44.1k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  44.1k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 44.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 44.1k, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 14.7k, False: 3.68k]
  |  |  ------------------
  ------------------
 3963|  3.68k|    update_cdf_1d(3, m.delta_q);
  ------------------
  |  | 3920|  3.68k|    do { \
  |  | 3921|  3.68k|        dst->name[n1d] = 0; \
  |  | 3922|  3.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
 3964|  3.68k|    update_cdf_2d(5, 3, m.delta_lf);
  ------------------
  |  | 3924|  22.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  18.4k|    do { \
  |  |  |  | 3921|  18.4k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  18.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 18.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 18.4k, False: 3.68k]
  |  |  ------------------
  ------------------
 3965|  3.68k|    update_cdf_1d(2, m.restore_switchable);
  ------------------
  |  | 3920|  3.68k|    do { \
  |  | 3921|  3.68k|        dst->name[n1d] = 0; \
  |  | 3922|  3.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
 3966|  3.68k|    update_cdf_1d(1, m.restore_wiener);
  ------------------
  |  | 3920|  3.68k|    do { \
  |  | 3921|  3.68k|        dst->name[n1d] = 0; \
  |  | 3922|  3.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
 3967|  3.68k|    update_cdf_1d(1, m.restore_sgrproj);
  ------------------
  |  | 3920|  3.68k|    do { \
  |  | 3921|  3.68k|        dst->name[n1d] = 0; \
  |  | 3922|  3.68k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
 3968|  3.68k|    update_cdf_2d(4, 1, m.txtp_inter3);
  ------------------
  |  | 3924|  18.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  14.7k|    do { \
  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 14.7k, False: 3.68k]
  |  |  ------------------
  ------------------
 3969|  3.68k|    update_cdf_2d(N_BS_SIZES, 1, m.use_filter_intra);
  ------------------
  |  | 3924|  84.6k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  80.9k|    do { \
  |  |  |  | 3921|  80.9k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  80.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 80.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 80.9k, False: 3.68k]
  |  |  ------------------
  ------------------
 3970|  3.68k|    update_cdf_3d(7, 3, 1, m.txpart);
  ------------------
  |  | 3926|  29.4k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|   103k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  77.2k|    do { \
  |  |  |  |  |  | 3921|  77.2k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  77.2k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 77.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 77.2k, False: 25.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 25.7k, False: 3.68k]
  |  |  ------------------
  ------------------
 3971|  3.68k|    update_cdf_2d(3, 1, m.skip);
  ------------------
  |  | 3924|  14.7k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  11.0k|    do { \
  |  |  |  | 3921|  11.0k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  11.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 11.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 11.0k, False: 3.68k]
  |  |  ------------------
  ------------------
 3972|  3.68k|    update_cdf_3d(7, 3, 1, m.pal_y);
  ------------------
  |  | 3926|  29.4k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|   103k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  77.2k|    do { \
  |  |  |  |  |  | 3921|  77.2k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  77.2k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 77.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 77.2k, False: 25.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 25.7k, False: 3.68k]
  |  |  ------------------
  ------------------
 3973|  3.68k|    update_cdf_2d(2, 1, m.pal_uv);
  ------------------
  |  | 3924|  11.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  7.36k|    do { \
  |  |  |  | 3921|  7.36k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  7.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 7.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 7.36k, False: 3.68k]
  |  |  ------------------
  ------------------
 3974|       |
 3975|  3.68k|    if (IS_KEY_OR_INTRA(hdr))
  ------------------
  |  |   43|  3.68k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  3.68k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 2.76k, False: 919]
  |  |  ------------------
  ------------------
 3976|  2.76k|        return;
 3977|       |
 3978|    919|    memcpy(dst->m.y_mode, src->m.y_mode,
 3979|    919|           offsetof(CdfContext, kfym) - offsetof(CdfContext, m.y_mode));
 3980|       |
 3981|    919|    update_cdf_2d(4, N_INTRA_PRED_MODES - 1, m.y_mode);
  ------------------
  |  | 3924|  4.59k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.59k|    do { \
  |  |  |  | 3921|  3.67k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.67k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.67k, False: 919]
  |  |  ------------------
  ------------------
 3982|    919|    update_cdf_2d(9, 15, m.wedge_idx);
  ------------------
  |  | 3924|  9.19k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  9.19k|    do { \
  |  |  |  | 3921|  8.27k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  8.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 8.27k, False: 919]
  |  |  ------------------
  ------------------
 3983|    919|    update_cdf_2d(8, N_COMP_INTER_PRED_MODES - 1, m.comp_inter_mode);
  ------------------
  |  | 3924|  8.27k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  8.27k|    do { \
  |  |  |  | 3921|  7.35k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  7.35k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 7.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 7.35k, False: 919]
  |  |  ------------------
  ------------------
 3984|    919|    update_cdf_3d(2, 8, DAV1D_N_SWITCHABLE_FILTERS - 1, m.filter);
  ------------------
  |  | 3926|  2.75k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  16.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  15.6k|    do { \
  |  |  |  |  |  | 3921|  14.7k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  14.7k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 14.7k, False: 1.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 1.83k, False: 919]
  |  |  ------------------
  ------------------
 3985|    919|    update_cdf_2d(4, 3, m.interintra_mode);
  ------------------
  |  | 3924|  4.59k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.59k|    do { \
  |  |  |  | 3921|  3.67k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.67k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.67k, False: 919]
  |  |  ------------------
  ------------------
 3986|    919|    update_cdf_2d(N_BS_SIZES, 2, m.motion_mode);
  ------------------
  |  | 3924|  21.1k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  21.1k|    do { \
  |  |  |  | 3921|  20.2k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 20.2k, False: 919]
  |  |  ------------------
  ------------------
 3987|    919|    update_cdf_2d(3, 1, m.skip_mode);
  ------------------
  |  | 3924|  3.67k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.67k|    do { \
  |  |  |  | 3921|  2.75k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  2.75k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 2.75k, False: 919]
  |  |  ------------------
  ------------------
 3988|    919|    update_cdf_2d(6, 1, m.newmv_mode);
  ------------------
  |  | 3924|  6.43k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.43k|    do { \
  |  |  |  | 3921|  5.51k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.51k, False: 919]
  |  |  ------------------
  ------------------
 3989|    919|    update_cdf_2d(2, 1, m.globalmv_mode);
  ------------------
  |  | 3924|  2.75k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  2.75k|    do { \
  |  |  |  | 3921|  1.83k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  1.83k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 1.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 1.83k, False: 919]
  |  |  ------------------
  ------------------
 3990|    919|    update_cdf_2d(6, 1, m.refmv_mode);
  ------------------
  |  | 3924|  6.43k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.43k|    do { \
  |  |  |  | 3921|  5.51k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.51k, False: 919]
  |  |  ------------------
  ------------------
 3991|    919|    update_cdf_2d(3, 1, m.drl_bit);
  ------------------
  |  | 3924|  3.67k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.67k|    do { \
  |  |  |  | 3921|  2.75k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  2.75k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 2.75k, False: 919]
  |  |  ------------------
  ------------------
 3992|    919|    update_cdf_2d(4, 1, m.intra);
  ------------------
  |  | 3924|  4.59k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.59k|    do { \
  |  |  |  | 3921|  3.67k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.67k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.67k, False: 919]
  |  |  ------------------
  ------------------
 3993|    919|    update_cdf_2d(5, 1, m.comp);
  ------------------
  |  | 3924|  5.51k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  5.51k|    do { \
  |  |  |  | 3921|  4.59k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.59k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.59k, False: 919]
  |  |  ------------------
  ------------------
 3994|    919|    update_cdf_2d(5, 1, m.comp_dir);
  ------------------
  |  | 3924|  5.51k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  5.51k|    do { \
  |  |  |  | 3921|  4.59k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.59k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.59k, False: 919]
  |  |  ------------------
  ------------------
 3995|    919|    update_cdf_2d(6, 1, m.jnt_comp);
  ------------------
  |  | 3924|  6.43k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.43k|    do { \
  |  |  |  | 3921|  5.51k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.51k, False: 919]
  |  |  ------------------
  ------------------
 3996|    919|    update_cdf_2d(6, 1, m.mask_comp);
  ------------------
  |  | 3924|  6.43k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.43k|    do { \
  |  |  |  | 3921|  5.51k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.51k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.51k, False: 919]
  |  |  ------------------
  ------------------
 3997|    919|    update_cdf_2d(9, 1, m.wedge_comp);
  ------------------
  |  | 3924|  9.19k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  9.19k|    do { \
  |  |  |  | 3921|  8.27k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  8.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 8.27k, False: 919]
  |  |  ------------------
  ------------------
 3998|    919|    update_cdf_3d(6, 3, 1, m.ref);
  ------------------
  |  | 3926|  6.43k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  22.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  17.4k|    do { \
  |  |  |  |  |  | 3921|  16.5k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  16.5k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 16.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 16.5k, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 5.51k, False: 919]
  |  |  ------------------
  ------------------
 3999|    919|    update_cdf_3d(3, 3, 1, m.comp_fwd_ref);
  ------------------
  |  | 3926|  3.67k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  11.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  9.19k|    do { \
  |  |  |  |  |  | 3921|  8.27k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.27k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.27k, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 2.75k, False: 919]
  |  |  ------------------
  ------------------
 4000|    919|    update_cdf_3d(2, 3, 1, m.comp_bwd_ref);
  ------------------
  |  | 3926|  2.75k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  7.35k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  6.43k|    do { \
  |  |  |  |  |  | 3921|  5.51k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  5.51k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.51k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 5.51k, False: 1.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 1.83k, False: 919]
  |  |  ------------------
  ------------------
 4001|    919|    update_cdf_3d(3, 3, 1, m.comp_uni_ref);
  ------------------
  |  | 3926|  3.67k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  11.0k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  9.19k|    do { \
  |  |  |  |  |  | 3921|  8.27k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.27k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.27k, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 2.75k, False: 919]
  |  |  ------------------
  ------------------
 4002|    919|    update_cdf_2d(3, 1, m.seg_pred);
  ------------------
  |  | 3924|  3.67k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.67k|    do { \
  |  |  |  | 3921|  2.75k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  2.75k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 2.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 2.75k, False: 919]
  |  |  ------------------
  ------------------
 4003|    919|    update_cdf_2d(4, 1, m.interintra);
  ------------------
  |  | 3924|  4.59k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.59k|    do { \
  |  |  |  | 3921|  3.67k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.67k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.67k, False: 919]
  |  |  ------------------
  ------------------
 4004|    919|    update_cdf_2d(7, 1, m.interintra_wedge);
  ------------------
  |  | 3924|  7.35k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  7.35k|    do { \
  |  |  |  | 3921|  6.43k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  6.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 6.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 6.43k, False: 919]
  |  |  ------------------
  ------------------
 4005|    919|    update_cdf_2d(N_BS_SIZES, 1, m.obmc);
  ------------------
  |  | 3924|  21.1k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  21.1k|    do { \
  |  |  |  | 3921|  20.2k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  20.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 20.2k, False: 919]
  |  |  ------------------
  ------------------
 4006|       |
 4007|  2.75k|    for (int k = 0; k < 2; k++) {
  ------------------
  |  Branch (4007:21): [True: 1.83k, False: 919]
  ------------------
 4008|  1.83k|        update_cdf_1d(10, mv.comp[k].classes);
  ------------------
  |  | 3920|  1.83k|    do { \
  |  | 3921|  1.83k|        dst->name[n1d] = 0; \
  |  | 3922|  1.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
 4009|  1.83k|        update_cdf_1d(1, mv.comp[k].sign);
  ------------------
  |  | 3920|  1.83k|    do { \
  |  | 3921|  1.83k|        dst->name[n1d] = 0; \
  |  | 3922|  1.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
 4010|  1.83k|        update_cdf_1d(1, mv.comp[k].class0);
  ------------------
  |  | 3920|  1.83k|    do { \
  |  | 3921|  1.83k|        dst->name[n1d] = 0; \
  |  | 3922|  1.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
 4011|  1.83k|        update_cdf_2d(2, 3, mv.comp[k].class0_fp);
  ------------------
  |  | 3924|  5.51k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.67k|    do { \
  |  |  |  | 3921|  3.67k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.67k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.67k, False: 1.83k]
  |  |  ------------------
  ------------------
 4012|  1.83k|        update_cdf_1d(1, mv.comp[k].class0_hp);
  ------------------
  |  | 3920|  1.83k|    do { \
  |  | 3921|  1.83k|        dst->name[n1d] = 0; \
  |  | 3922|  1.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
 4013|  1.83k|        update_cdf_2d(10, 1, mv.comp[k].classN);
  ------------------
  |  | 3924|  20.2k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  18.3k|    do { \
  |  |  |  | 3921|  18.3k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  18.3k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 18.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 18.3k, False: 1.83k]
  |  |  ------------------
  ------------------
 4014|  1.83k|        update_cdf_1d(3, mv.comp[k].classN_fp);
  ------------------
  |  | 3920|  1.83k|    do { \
  |  | 3921|  1.83k|        dst->name[n1d] = 0; \
  |  | 3922|  1.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
 4015|  1.83k|        update_cdf_1d(1, mv.comp[k].classN_hp);
  ------------------
  |  | 3920|  1.83k|    do { \
  |  | 3921|  1.83k|        dst->name[n1d] = 0; \
  |  | 3922|  1.83k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.83k]
  |  |  ------------------
  ------------------
 4016|  1.83k|    }
 4017|    919|    update_cdf_1d(N_MV_JOINTS - 1, mv.joint);
  ------------------
  |  | 3920|    919|    do { \
  |  | 3921|    919|        dst->name[n1d] = 0; \
  |  | 3922|    919|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 919]
  |  |  ------------------
  ------------------
 4018|    919|}
dav1d_cdf_thread_init_static:
 4023|  15.0k|void dav1d_cdf_thread_init_static(CdfThreadContext *const cdf, const unsigned qidx) {
 4024|       |    cdf->ref = NULL;
 4025|  15.0k|    cdf->data.qcat = (qidx > 20) + (qidx > 60) + (qidx > 120);
 4026|  15.0k|}
dav1d_cdf_thread_copy:
 4028|  23.9k|void dav1d_cdf_thread_copy(CdfContext *const dst, const CdfThreadContext *const src) {
 4029|  23.9k|    if (src->ref) {
  ------------------
  |  Branch (4029:9): [True: 2.90k, False: 21.0k]
  ------------------
 4030|  2.90k|        memcpy(dst, src->data.cdf, sizeof(*dst));
 4031|  21.0k|    } else {
 4032|  21.0k|        dst->coef = default_coef_cdf[src->data.qcat];
 4033|  21.0k|        memcpy(&dst->m, &default_cdf.m,
 4034|  21.0k|               offsetof(CdfDefaultContext, mv.joint));
 4035|  21.0k|        memcpy(&dst->mv.comp[1], &default_cdf.mv.comp,
 4036|       |               sizeof(default_cdf) - offsetof(CdfDefaultContext, mv.comp));
 4037|  21.0k|    }
 4038|  23.9k|}
dav1d_cdf_thread_alloc:
 4042|  4.78k|{
 4043|  4.78k|    cdf->ref = dav1d_ref_create_using_pool(c->cdf_pool,
 4044|  4.78k|                                           sizeof(CdfContext) + sizeof(atomic_uint));
 4045|  4.78k|    if (!cdf->ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (4045:9): [True: 0, False: 4.78k]
  ------------------
 4046|  4.78k|    cdf->data.cdf = cdf->ref->data;
 4047|  4.78k|    if (have_frame_mt) {
  ------------------
  |  Branch (4047:9): [True: 0, False: 4.78k]
  ------------------
 4048|      0|        cdf->progress = (atomic_uint *) &cdf->data.cdf[1];
 4049|       |        atomic_init(cdf->progress, 0);
 4050|      0|    }
 4051|  4.78k|    return 0;
 4052|  4.78k|}
dav1d_cdf_thread_ref:
 4056|   124k|{
 4057|   124k|    *dst = *src;
 4058|   124k|    if (src->ref)
  ------------------
  |  Branch (4058:9): [True: 35.1k, False: 89.2k]
  ------------------
 4059|  35.1k|        dav1d_ref_inc(src->ref);
 4060|   124k|}
dav1d_cdf_thread_unref:
 4062|   387k|void dav1d_cdf_thread_unref(CdfThreadContext *const cdf) {
 4063|       |    memset(&cdf->data, 0, sizeof(*cdf) - offsetof(CdfThreadContext, data));
 4064|   387k|    dav1d_ref_dec(&cdf->ref);
 4065|   387k|}

dav1d_init_cpu:
   63|      1|COLD void dav1d_init_cpu(void) {
   64|      1|#if HAVE_ASM && !__has_feature(memory_sanitizer)
   65|       |// memory sanitizer is inherently incompatible with asm
   66|       |#if ARCH_AARCH64 || ARCH_ARM
   67|       |    dav1d_cpu_flags = dav1d_get_cpu_flags_arm();
   68|       |#elif ARCH_LOONGARCH
   69|       |    dav1d_cpu_flags = dav1d_get_cpu_flags_loongarch();
   70|       |#elif ARCH_PPC64LE
   71|       |    dav1d_cpu_flags = dav1d_get_cpu_flags_ppc();
   72|       |#elif ARCH_RISCV
   73|       |    dav1d_cpu_flags = dav1d_get_cpu_flags_riscv();
   74|       |#elif ARCH_X86
   75|       |    dav1d_cpu_flags = dav1d_get_cpu_flags_x86();
   76|      1|#endif
   77|      1|#endif
   78|      1|}

pal.c:dav1d_get_cpu_flags:
  124|  12.9k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.9k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.9k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  12.9k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.9k|#endif
  132|       |
  133|  12.9k|    return flags;
  134|  12.9k|}
pal.c:dav1d_get_default_cpu_flags:
   58|  12.9k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.9k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  12.9k|#endif
  119|  12.9k|#endif
  120|       |
  121|  12.9k|    return flags;
  122|  12.9k|}
refmvs.c:dav1d_get_cpu_flags:
  124|  12.9k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.9k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.9k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  12.9k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.9k|#endif
  132|       |
  133|  12.9k|    return flags;
  134|  12.9k|}
refmvs.c:dav1d_get_default_cpu_flags:
   58|  12.9k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.9k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  12.9k|#endif
  119|  12.9k|#endif
  120|       |
  121|  12.9k|    return flags;
  122|  12.9k|}
cpu.c:dav1d_get_default_cpu_flags:
   58|      1|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|      1|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|      1|#endif
  119|      1|#endif
  120|       |
  121|      1|    return flags;
  122|      1|}
msac.c:dav1d_get_cpu_flags:
  124|  19.1k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  19.1k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  19.1k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  19.1k|    flags |= dav1d_get_default_cpu_flags();
  131|  19.1k|#endif
  132|       |
  133|  19.1k|    return flags;
  134|  19.1k|}
msac.c:dav1d_get_default_cpu_flags:
   58|  19.1k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  19.1k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  19.1k|#endif
  119|  19.1k|#endif
  120|       |
  121|  19.1k|    return flags;
  122|  19.1k|}
cdef_tmpl.c:dav1d_get_cpu_flags:
  124|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  11.7k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  11.7k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  11.7k|    flags |= dav1d_get_default_cpu_flags();
  131|  11.7k|#endif
  132|       |
  133|  11.7k|    return flags;
  134|  11.7k|}
cdef_tmpl.c:dav1d_get_default_cpu_flags:
   58|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  11.7k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  11.7k|#endif
  119|  11.7k|#endif
  120|       |
  121|  11.7k|    return flags;
  122|  11.7k|}
filmgrain_tmpl.c:dav1d_get_cpu_flags:
  124|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  11.7k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  11.7k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  11.7k|    flags |= dav1d_get_default_cpu_flags();
  131|  11.7k|#endif
  132|       |
  133|  11.7k|    return flags;
  134|  11.7k|}
filmgrain_tmpl.c:dav1d_get_default_cpu_flags:
   58|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  11.7k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  11.7k|#endif
  119|  11.7k|#endif
  120|       |
  121|  11.7k|    return flags;
  122|  11.7k|}
ipred_tmpl.c:dav1d_get_cpu_flags:
  124|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  11.7k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  11.7k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  11.7k|    flags |= dav1d_get_default_cpu_flags();
  131|  11.7k|#endif
  132|       |
  133|  11.7k|    return flags;
  134|  11.7k|}
ipred_tmpl.c:dav1d_get_default_cpu_flags:
   58|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  11.7k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  11.7k|#endif
  119|  11.7k|#endif
  120|       |
  121|  11.7k|    return flags;
  122|  11.7k|}
itx_tmpl.c:dav1d_get_cpu_flags:
  124|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  11.7k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  11.7k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  11.7k|    flags |= dav1d_get_default_cpu_flags();
  131|  11.7k|#endif
  132|       |
  133|  11.7k|    return flags;
  134|  11.7k|}
itx_tmpl.c:dav1d_get_default_cpu_flags:
   58|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  11.7k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  11.7k|#endif
  119|  11.7k|#endif
  120|       |
  121|  11.7k|    return flags;
  122|  11.7k|}
loopfilter_tmpl.c:dav1d_get_cpu_flags:
  124|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  11.7k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  11.7k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  11.7k|    flags |= dav1d_get_default_cpu_flags();
  131|  11.7k|#endif
  132|       |
  133|  11.7k|    return flags;
  134|  11.7k|}
loopfilter_tmpl.c:dav1d_get_default_cpu_flags:
   58|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  11.7k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  11.7k|#endif
  119|  11.7k|#endif
  120|       |
  121|  11.7k|    return flags;
  122|  11.7k|}
looprestoration_tmpl.c:dav1d_get_cpu_flags:
  124|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  11.7k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  11.7k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  11.7k|    flags |= dav1d_get_default_cpu_flags();
  131|  11.7k|#endif
  132|       |
  133|  11.7k|    return flags;
  134|  11.7k|}
looprestoration_tmpl.c:dav1d_get_default_cpu_flags:
   58|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  11.7k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  11.7k|#endif
  119|  11.7k|#endif
  120|       |
  121|  11.7k|    return flags;
  122|  11.7k|}
mc_tmpl.c:dav1d_get_cpu_flags:
  124|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  11.7k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  11.7k|#if TRIM_DSP_FUNCTIONS
  128|       |/* Since this function is inlined, unconditionally setting a flag here will
  129|       | * enable dead code elimination in the calling function. */
  130|  11.7k|    flags |= dav1d_get_default_cpu_flags();
  131|  11.7k|#endif
  132|       |
  133|  11.7k|    return flags;
  134|  11.7k|}
mc_tmpl.c:dav1d_get_default_cpu_flags:
   58|  11.7k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  11.7k|    unsigned flags = 0;
   60|       |
   61|       |#if ARCH_AARCH64 || ARCH_ARM
   62|       |#if defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32) || ARCH_AARCH64
   63|       |    flags |= DAV1D_ARM_CPU_FLAG_NEON;
   64|       |#endif
   65|       |#ifdef __ARM_FEATURE_DOTPROD
   66|       |    flags |= DAV1D_ARM_CPU_FLAG_DOTPROD;
   67|       |#endif
   68|       |#ifdef __ARM_FEATURE_MATMUL_INT8
   69|       |    flags |= DAV1D_ARM_CPU_FLAG_I8MM;
   70|       |#endif
   71|       |#if ARCH_AARCH64
   72|       |#ifdef __ARM_FEATURE_SVE
   73|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE;
   74|       |#endif
   75|       |#ifdef __ARM_FEATURE_SVE2
   76|       |    flags |= DAV1D_ARM_CPU_FLAG_SVE2;
   77|       |#endif
   78|       |#endif /* ARCH_AARCH64 */
   79|       |#elif ARCH_PPC64LE
   80|       |#if defined(__VSX__)
   81|       |    flags |= DAV1D_PPC_CPU_FLAG_VSX;
   82|       |#endif
   83|       |#if defined(__POWER9_VECTOR__)
   84|       |    flags |= DAV1D_PPC_CPU_FLAG_PWR9;
   85|       |#endif
   86|       |#elif ARCH_RISCV
   87|       |#if defined(__riscv_v)
   88|       |    flags |= DAV1D_RISCV_CPU_FLAG_V;
   89|       |#endif
   90|       |#elif ARCH_X86
   91|       |#if defined(__AVX512F__) && defined(__AVX512CD__) && \
   92|       |    defined(__AVX512BW__) && defined(__AVX512DQ__) && \
   93|       |    defined(__AVX512VL__) && defined(__AVX512VNNI__) && \
   94|       |    defined(__AVX512IFMA__) && defined(__AVX512VBMI__) && \
   95|       |    defined(__AVX512VBMI2__) && defined(__AVX512VPOPCNTDQ__) && \
   96|       |    defined(__AVX512BITALG__) && defined(__GFNI__) && \
   97|       |    defined(__VAES__) && defined(__VPCLMULQDQ__)
   98|       |    flags |= DAV1D_X86_CPU_FLAG_AVX512ICL |
   99|       |             DAV1D_X86_CPU_FLAG_AVX2 |
  100|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  101|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  102|       |             DAV1D_X86_CPU_FLAG_SSE2;
  103|       |#elif defined(__AVX2__)
  104|       |    flags |= DAV1D_X86_CPU_FLAG_AVX2 |
  105|       |             DAV1D_X86_CPU_FLAG_SSE41 |
  106|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  107|       |             DAV1D_X86_CPU_FLAG_SSE2;
  108|       |#elif defined(__SSE4_1__) || defined(__AVX__)
  109|       |    flags |= DAV1D_X86_CPU_FLAG_SSE41 |
  110|       |             DAV1D_X86_CPU_FLAG_SSSE3 |
  111|       |             DAV1D_X86_CPU_FLAG_SSE2;
  112|       |#elif defined(__SSSE3__)
  113|       |    flags |= DAV1D_X86_CPU_FLAG_SSSE3 |
  114|       |             DAV1D_X86_CPU_FLAG_SSE2;
  115|       |#elif ARCH_X86_64 || defined(__SSE2__) || \
  116|       |      (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
  117|       |    flags |= DAV1D_X86_CPU_FLAG_SSE2;
  118|  11.7k|#endif
  119|  11.7k|#endif
  120|       |
  121|  11.7k|    return flags;
  122|  11.7k|}

ctx.c:memset_w1:
   34|  6.09M|static void memset_w1(void *const ptr, const int value) {
   35|  6.09M|    set_ctx1((uint8_t *) ptr, 0, value);
  ------------------
  |  |   56|  6.09M|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  ------------------
   36|  6.09M|}
ctx.c:memset_w2:
   38|  9.32M|static void memset_w2(void *const ptr, const int value) {
   39|  9.32M|    set_ctx2((uint8_t *) ptr, 0, value);
  ------------------
  |  |   58|  9.32M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  ------------------
   40|  9.32M|}
ctx.c:memset_w4:
   42|  5.12M|static void memset_w4(void *const ptr, const int value) {
   43|  5.12M|    set_ctx4((uint8_t *) ptr, 0, value);
  ------------------
  |  |   60|  5.12M|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  ------------------
   44|  5.12M|}
ctx.c:memset_w8:
   46|  3.20M|static void memset_w8(void *const ptr, const int value) {
   47|  3.20M|    set_ctx8((uint8_t *) ptr, 0, value);
  ------------------
  |  |   62|  3.20M|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  ------------------
   48|  3.20M|}
ctx.c:memset_w16:
   50|   630k|static void memset_w16(void *const ptr, const int value) {
   51|   630k|    set_ctx16((uint8_t *) ptr, 0, value);
  ------------------
  |  |   63|   630k|#define set_ctx16(var, off, val) do { \
  |  |   64|   630k|        memset(&(var)[off], val, 16); \
  |  |   65|   630k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (65:14): [Folded, False: 630k]
  |  |  ------------------
  ------------------
   52|   630k|}
ctx.c:memset_w32:
   54|  85.5k|static void memset_w32(void *const ptr, const int value) {
   55|  85.5k|    set_ctx32((uint8_t *) ptr, 0, value);
  ------------------
  |  |   66|  85.5k|#define set_ctx32(var, off, val) do { \
  |  |   67|  85.5k|        memset(&(var)[off], val, 32); \
  |  |   68|  85.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (68:14): [Folded, False: 85.5k]
  |  |  ------------------
  ------------------
   56|  85.5k|}

lf_mask.c:dav1d_memset_likely_pow2:
   44|  5.52M|static inline void dav1d_memset_likely_pow2(void *const ptr, const int value, const int n) {
   45|  5.52M|    assert(n >= 1 && n <= 32);
  ------------------
  |  |  140|  11.0M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 5.52M, False: 0]
  |  |  |  Branch (140:30): [True: 5.52M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 5.52M]
  |  |  ------------------
  ------------------
   46|  5.52M|    if ((n&(n-1)) == 0) {
  ------------------
  |  Branch (46:9): [True: 5.41M, False: 108k]
  ------------------
   47|  5.41M|        dav1d_memset_pow2[ulog2(n)](ptr, value);
   48|  5.41M|    } else {
   49|   108k|        memset(ptr, value, n);
   50|   108k|    }
   51|  5.52M|}
recon_tmpl.c:dav1d_memset_likely_pow2:
   44|  8.77M|static inline void dav1d_memset_likely_pow2(void *const ptr, const int value, const int n) {
   45|  8.77M|    assert(n >= 1 && n <= 32);
  ------------------
  |  |  140|  17.5M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 8.77M, False: 0]
  |  |  |  Branch (140:30): [True: 8.77M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 8.77M]
  |  |  ------------------
  ------------------
   46|  8.77M|    if ((n&(n-1)) == 0) {
  ------------------
  |  Branch (46:9): [True: 8.67M, False: 99.4k]
  ------------------
   47|  8.67M|        dav1d_memset_pow2[ulog2(n)](ptr, value);
   48|  8.67M|    } else {
   49|  99.4k|        memset(ptr, value, n);
   50|  99.4k|    }
   51|  8.77M|}

dav1d_data_wrap_internal:
   62|  15.0k|{
   63|  15.0k|    validate_input_or_ret(buf != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  15.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 15.0k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
   64|  15.0k|    validate_input_or_ret(ptr != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  15.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 15.0k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
   65|  15.0k|    validate_input_or_ret(free_callback != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  15.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 15.0k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
   66|       |
   67|  15.0k|    if (sz > SIZE_MAX / 2) return DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (67:9): [True: 0, False: 15.0k]
  ------------------
   68|  15.0k|    Dav1dRef *const ref = dav1d_malloc(ALLOC_DAV1DDATA, sizeof(Dav1dRef));
  ------------------
  |  |  132|  15.0k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
   69|  15.0k|    if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (69:9): [True: 0, False: 15.0k]
  ------------------
   70|       |
   71|  15.0k|    buf->ref = dav1d_ref_init(ref, ptr, free_callback, cookie, 1);
   72|  15.0k|    buf->data = ptr;
   73|  15.0k|    buf->sz = sz;
   74|  15.0k|    dav1d_data_props_set_defaults(&buf->m);
   75|  15.0k|    buf->m.size = sz;
   76|       |
   77|  15.0k|    return 0;
   78|  15.0k|}
dav1d_data_ref:
   98|  32.3k|void dav1d_data_ref(Dav1dData *const dst, const Dav1dData *const src) {
   99|  32.3k|    assert(dst != NULL);
  ------------------
  |  |  140|  32.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 32.3k]
  |  |  |  Branch (140:68): [Folded, False: 32.3k]
  |  |  ------------------
  ------------------
  100|  32.3k|    assert(dst->data == NULL);
  ------------------
  |  |  140|  32.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 32.3k]
  |  |  |  Branch (140:68): [Folded, False: 32.3k]
  |  |  ------------------
  ------------------
  101|  32.3k|    assert(src != NULL);
  ------------------
  |  |  140|  32.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 32.3k]
  |  |  |  Branch (140:68): [Folded, False: 32.3k]
  |  |  ------------------
  ------------------
  102|       |
  103|  32.3k|    if (src->ref) {
  ------------------
  |  Branch (103:9): [True: 32.3k, False: 0]
  ------------------
  104|  32.3k|        assert(src->data != NULL);
  ------------------
  |  |  140|  32.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 32.3k]
  |  |  |  Branch (140:68): [Folded, False: 32.3k]
  |  |  ------------------
  ------------------
  105|  32.3k|        dav1d_ref_inc(src->ref);
  106|  32.3k|    }
  107|  32.3k|    if (src->m.user_data.ref) dav1d_ref_inc(src->m.user_data.ref);
  ------------------
  |  Branch (107:9): [True: 0, False: 32.3k]
  ------------------
  108|  32.3k|    *dst = *src;
  109|  32.3k|}
dav1d_data_props_copy:
  113|  25.3k|{
  114|  25.3k|    assert(dst != NULL);
  ------------------
  |  |  140|  25.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 25.3k]
  |  |  |  Branch (140:68): [Folded, False: 25.3k]
  |  |  ------------------
  ------------------
  115|  25.3k|    assert(src != NULL);
  ------------------
  |  |  140|  25.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 25.3k]
  |  |  |  Branch (140:68): [Folded, False: 25.3k]
  |  |  ------------------
  ------------------
  116|       |
  117|  25.3k|    dav1d_ref_dec(&dst->user_data.ref);
  118|  25.3k|    *dst = *src;
  119|  25.3k|    if (dst->user_data.ref) dav1d_ref_inc(dst->user_data.ref);
  ------------------
  |  Branch (119:9): [True: 0, False: 25.3k]
  ------------------
  120|  25.3k|}
dav1d_data_props_set_defaults:
  122|   343k|void dav1d_data_props_set_defaults(Dav1dDataProps *const props) {
  123|   343k|    assert(props != NULL);
  ------------------
  |  |  140|   343k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 343k]
  |  |  |  Branch (140:68): [Folded, False: 343k]
  |  |  ------------------
  ------------------
  124|       |
  125|   343k|    memset(props, 0, sizeof(*props));
  126|       |    props->timestamp = INT64_MIN;
  127|   343k|    props->offset = -1;
  128|   343k|}
dav1d_data_props_unref_internal:
  130|  12.9k|void dav1d_data_props_unref_internal(Dav1dDataProps *const props) {
  131|  12.9k|    validate_input(props != NULL);
  ------------------
  |  |   59|  12.9k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|  12.9k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 12.9k]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   54|      0|                    #x, __func__); \
  |  |  |  |   55|      0|        debug_abort(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   56|      0|        return r; \
  |  |  |  |   57|      0|    }
  |  |  ------------------
  ------------------
  132|       |
  133|  12.9k|    struct Dav1dRef *user_data_ref = props->user_data.ref;
  134|  12.9k|    dav1d_data_props_set_defaults(props);
  135|  12.9k|    dav1d_ref_dec(&user_data_ref);
  136|  12.9k|}
dav1d_data_unref_internal:
  138|  60.3k|void dav1d_data_unref_internal(Dav1dData *const buf) {
  139|  60.3k|    validate_input(buf != NULL);
  ------------------
  |  |   59|  60.3k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|  60.3k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 60.3k]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   54|      0|                    #x, __func__); \
  |  |  |  |   55|      0|        debug_abort(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   56|      0|        return r; \
  |  |  |  |   57|      0|    }
  |  |  ------------------
  ------------------
  140|       |
  141|  60.3k|    struct Dav1dRef *user_data_ref = buf->m.user_data.ref;
  142|  60.3k|    if (buf->ref) {
  ------------------
  |  Branch (142:9): [True: 47.3k, False: 12.9k]
  ------------------
  143|  47.3k|        validate_input(buf->data != NULL);
  ------------------
  |  |   59|  47.3k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|  47.3k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 47.3k]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   54|      0|                    #x, __func__); \
  |  |  |  |   55|      0|        debug_abort(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   56|      0|        return r; \
  |  |  |  |   57|      0|    }
  |  |  ------------------
  ------------------
  144|  47.3k|        dav1d_ref_dec(&buf->ref);
  145|  47.3k|    }
  146|  60.3k|    memset(buf, 0, sizeof(*buf));
  147|  60.3k|    dav1d_data_props_set_defaults(&buf->m);
  148|  60.3k|    dav1d_ref_dec(&user_data_ref);
  149|  60.3k|}

dav1d_decode_tile_sbrow:
 2594|  69.4k|int dav1d_decode_tile_sbrow(Dav1dTaskContext *const t) {
 2595|  69.4k|    const Dav1dFrameContext *const f = t->f;
 2596|  69.4k|    const enum BlockLevel root_bl = f->seq_hdr->sb128 ? BL_128X128 : BL_64X64;
  ------------------
  |  Branch (2596:37): [True: 30.8k, False: 38.6k]
  ------------------
 2597|  69.4k|    Dav1dTileState *const ts = t->ts;
 2598|  69.4k|    const Dav1dContext *const c = f->c;
 2599|  69.4k|    const int sb_step = f->sb_step;
 2600|  69.4k|    const int tile_row = ts->tiling.row, tile_col = ts->tiling.col;
 2601|  69.4k|    const int col_sb_start = f->frame_hdr->tiling.col_start_sb[tile_col];
 2602|  69.4k|    const int col_sb128_start = col_sb_start >> !f->seq_hdr->sb128;
 2603|       |
 2604|  69.4k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc) {
  ------------------
  |  |   36|   138k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.04k, False: 66.4k]
  |  |  ------------------
  ------------------
  |  Branch (2604:45): [True: 17.1k, False: 49.2k]
  ------------------
 2605|  20.2k|        dav1d_refmvs_tile_sbrow_init(&t->rt, &f->rf, ts->tiling.col_start,
 2606|  20.2k|                                     ts->tiling.col_end, ts->tiling.row_start,
 2607|  20.2k|                                     ts->tiling.row_end, t->by >> f->sb_shift,
 2608|  20.2k|                                     ts->tiling.row, t->frame_thread.pass);
 2609|  20.2k|    }
 2610|       |
 2611|  69.4k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) && c->n_fc > 1) {
  ------------------
  |  |   36|   138k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.04k, False: 66.4k]
  |  |  ------------------
  ------------------
  |  Branch (2611:45): [True: 0, False: 3.04k]
  ------------------
 2612|      0|        const int sby = (t->by - ts->tiling.row_start) >> f->sb_shift;
 2613|      0|        int (*const lowest_px)[2] = ts->lowest_pixel[sby];
 2614|      0|        for (int n = 0; n < 7; n++)
  ------------------
  |  Branch (2614:25): [True: 0, False: 0]
  ------------------
 2615|      0|            for (int m = 0; m < 2; m++)
  ------------------
  |  Branch (2615:29): [True: 0, False: 0]
  ------------------
 2616|      0|                lowest_px[n][m] = INT_MIN;
 2617|      0|    }
 2618|       |
 2619|  69.4k|    reset_context(&t->l, IS_KEY_OR_INTRA(f->frame_hdr), t->frame_thread.pass);
  ------------------
  |  |   43|  69.4k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  69.4k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  ------------------
 2620|  69.4k|    if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2620:9): [True: 0, False: 69.4k]
  ------------------
 2621|      0|        const int off_2pass = c->n_tc > 1 ? f->sb128w * f->frame_hdr->tiling.rows : 0;
  ------------------
  |  Branch (2621:31): [True: 0, False: 0]
  ------------------
 2622|      0|        for (t->bx = ts->tiling.col_start,
 2623|      0|             t->a = f->a + off_2pass + col_sb128_start + tile_row * f->sb128w;
 2624|      0|             t->bx < ts->tiling.col_end; t->bx += sb_step)
  ------------------
  |  Branch (2624:14): [True: 0, False: 0]
  ------------------
 2625|      0|        {
 2626|      0|            if (atomic_load_explicit(c->flush, memory_order_acquire))
  ------------------
  |  Branch (2626:17): [True: 0, False: 0]
  ------------------
 2627|      0|                return 1;
 2628|      0|            if (decode_sb(t, root_bl, dav1d_intra_edge_tree[root_bl]))
  ------------------
  |  Branch (2628:17): [True: 0, False: 0]
  ------------------
 2629|      0|                return 1;
 2630|      0|            if (t->bx & 16 || f->seq_hdr->sb128)
  ------------------
  |  Branch (2630:17): [True: 0, False: 0]
  |  Branch (2630:31): [True: 0, False: 0]
  ------------------
 2631|      0|                t->a++;
 2632|      0|        }
 2633|      0|        f->bd_fn.backup_ipred_edge(t);
 2634|      0|        return 0;
 2635|      0|    }
 2636|       |
 2637|  69.4k|    if (f->c->n_tc > 1 && f->frame_hdr->use_ref_frame_mvs) {
  ------------------
  |  Branch (2637:9): [True: 0, False: 69.4k]
  |  Branch (2637:27): [True: 0, False: 0]
  ------------------
 2638|      0|        f->c->refmvs_dsp.load_tmvs(&f->rf, ts->tiling.row,
 2639|      0|                                   ts->tiling.col_start >> 1, ts->tiling.col_end >> 1,
 2640|      0|                                   t->by >> 1, (t->by + sb_step) >> 1);
 2641|      0|    }
 2642|  69.4k|    memset(t->pal_sz_uv[1], 0, sizeof(*t->pal_sz_uv));
 2643|  69.4k|    const int sb128y = t->by >> 5;
 2644|  69.4k|    for (t->bx = ts->tiling.col_start, t->a = f->a + col_sb128_start + tile_row * f->sb128w,
 2645|  69.4k|         t->lf_mask = f->lf.mask + sb128y * f->sb128w + col_sb128_start;
 2646|   287k|         t->bx < ts->tiling.col_end; t->bx += sb_step)
  ------------------
  |  Branch (2646:10): [True: 218k, False: 69.3k]
  ------------------
 2647|   218k|    {
 2648|   218k|        if (atomic_load_explicit(c->flush, memory_order_acquire))
  ------------------
  |  Branch (2648:13): [True: 0, False: 218k]
  ------------------
 2649|      0|            return 1;
 2650|   218k|        if (root_bl == BL_128X128) {
  ------------------
  |  Branch (2650:13): [True: 68.6k, False: 149k]
  ------------------
 2651|  68.6k|            t->cur_sb_cdef_idx_ptr = t->lf_mask->cdef_idx;
 2652|  68.6k|            t->cur_sb_cdef_idx_ptr[0] = -1;
 2653|  68.6k|            t->cur_sb_cdef_idx_ptr[1] = -1;
 2654|  68.6k|            t->cur_sb_cdef_idx_ptr[2] = -1;
 2655|  68.6k|            t->cur_sb_cdef_idx_ptr[3] = -1;
 2656|   149k|        } else {
 2657|   149k|            t->cur_sb_cdef_idx_ptr =
 2658|   149k|                &t->lf_mask->cdef_idx[((t->bx & 16) >> 4) +
 2659|   149k|                                      ((t->by & 16) >> 3)];
 2660|   149k|            t->cur_sb_cdef_idx_ptr[0] = -1;
 2661|   149k|        }
 2662|       |        // Restoration filter
 2663|   872k|        for (int p = 0; p < 3; p++) {
  ------------------
  |  Branch (2663:25): [True: 654k, False: 218k]
  ------------------
 2664|   654k|            if (!((f->lf.restore_planes >> p) & 1U))
  ------------------
  |  Branch (2664:17): [True: 540k, False: 113k]
  ------------------
 2665|   540k|                continue;
 2666|       |
 2667|   113k|            const int ss_ver = p && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (2667:32): [True: 69.0k, False: 44.6k]
  |  Branch (2667:37): [True: 39.9k, False: 29.1k]
  ------------------
 2668|   113k|            const int ss_hor = p && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2668:32): [True: 69.0k, False: 44.6k]
  |  Branch (2668:37): [True: 41.0k, False: 28.0k]
  ------------------
 2669|   113k|            const int unit_size_log2 = f->frame_hdr->restoration.unit_size[!!p];
 2670|   113k|            const int y = t->by * 4 >> ss_ver;
 2671|   113k|            const int h = (f->cur.p.h + ss_ver) >> ss_ver;
 2672|       |
 2673|   113k|            const int unit_size = 1 << unit_size_log2;
 2674|   113k|            const unsigned mask = unit_size - 1;
 2675|   113k|            if (y & mask) continue;
  ------------------
  |  Branch (2675:17): [True: 21.7k, False: 91.9k]
  ------------------
 2676|  91.9k|            const int half_unit = unit_size >> 1;
 2677|       |            // Round half up at frame boundaries, if there's more than one
 2678|       |            // restoration unit
 2679|  91.9k|            if (y && y + half_unit > h) continue;
  ------------------
  |  Branch (2679:17): [True: 25.9k, False: 65.9k]
  |  Branch (2679:22): [True: 4.22k, False: 21.7k]
  ------------------
 2680|       |
 2681|  87.7k|            const enum Dav1dRestorationType frame_type = f->frame_hdr->restoration.type[p];
 2682|       |
 2683|  87.7k|            if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (2683:17): [True: 25.8k, False: 61.9k]
  ------------------
 2684|  25.8k|                const int w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 2685|  25.8k|                const int n_units = imax(1, (w + half_unit) >> unit_size_log2);
 2686|       |
 2687|  25.8k|                const int d = f->frame_hdr->super_res.width_scale_denominator;
 2688|  25.8k|                const int rnd = unit_size * 8 - 1, shift = unit_size_log2 + 3;
 2689|  25.8k|                const int x0 = ((4 *  t->bx            * d >> ss_hor) + rnd) >> shift;
 2690|  25.8k|                const int x1 = ((4 * (t->bx + sb_step) * d >> ss_hor) + rnd) >> shift;
 2691|       |
 2692|  59.5k|                for (int x = x0; x < imin(x1, n_units); x++) {
  ------------------
  |  Branch (2692:34): [True: 33.7k, False: 25.8k]
  ------------------
 2693|  33.7k|                    const int px_x = x << (unit_size_log2 + ss_hor);
 2694|  33.7k|                    const int sb_idx = (t->by >> 5) * f->sr_sb128w + (px_x >> 7);
 2695|  33.7k|                    const int unit_idx = ((t->by & 16) >> 3) + ((px_x & 64) >> 6);
 2696|  33.7k|                    Av1RestorationUnit *const lr = &f->lf.lr_mask[sb_idx].lr[p][unit_idx];
 2697|       |
 2698|  33.7k|                    read_restoration_info(t, lr, p, frame_type);
 2699|  33.7k|                }
 2700|  61.9k|            } else {
 2701|  61.9k|                const int x = 4 * t->bx >> ss_hor;
 2702|  61.9k|                if (x & mask) continue;
  ------------------
  |  Branch (2702:21): [True: 16.1k, False: 45.7k]
  ------------------
 2703|  45.7k|                const int w = (f->cur.p.w + ss_hor) >> ss_hor;
 2704|       |                // Round half up at frame boundaries, if there's more than one
 2705|       |                // restoration unit
 2706|  45.7k|                if (x && x + half_unit > w) continue;
  ------------------
  |  Branch (2706:21): [True: 28.0k, False: 17.6k]
  |  Branch (2706:26): [True: 1.31k, False: 26.7k]
  ------------------
 2707|  44.4k|                const int sb_idx = (t->by >> 5) * f->sr_sb128w + (t->bx >> 5);
 2708|  44.4k|                const int unit_idx = ((t->by & 16) >> 3) + ((t->bx & 16) >> 4);
 2709|  44.4k|                Av1RestorationUnit *const lr = &f->lf.lr_mask[sb_idx].lr[p][unit_idx];
 2710|       |
 2711|  44.4k|                read_restoration_info(t, lr, p, frame_type);
 2712|  44.4k|            }
 2713|  87.7k|        }
 2714|   218k|        if (decode_sb(t, root_bl, dav1d_intra_edge_tree[root_bl]))
  ------------------
  |  Branch (2714:13): [True: 105, False: 218k]
  ------------------
 2715|    105|            return 1;
 2716|   218k|        if (t->bx & 16 || f->seq_hdr->sb128) {
  ------------------
  |  Branch (2716:13): [True: 59.8k, False: 158k]
  |  Branch (2716:27): [True: 68.5k, False: 89.5k]
  ------------------
 2717|   128k|            t->a++;
 2718|   128k|            t->lf_mask++;
 2719|   128k|        }
 2720|   218k|    }
 2721|       |
 2722|  69.3k|    if (f->seq_hdr->ref_frame_mvs && f->c->n_tc > 1 && IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|      0|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2722:9): [True: 4.18k, False: 65.1k]
  |  Branch (2722:38): [True: 0, False: 4.18k]
  ------------------
 2723|      0|        dav1d_refmvs_save_tmvs(&f->c->refmvs_dsp, &t->rt,
 2724|      0|                               ts->tiling.col_start >> 1, ts->tiling.col_end >> 1,
 2725|      0|                               t->by >> 1, (t->by + sb_step) >> 1);
 2726|      0|    }
 2727|       |
 2728|       |    // backup pre-loopfilter pixels for intra prediction of the next sbrow
 2729|  69.3k|    if (t->frame_thread.pass != 1)
  ------------------
  |  Branch (2729:9): [True: 69.3k, False: 0]
  ------------------
 2730|  69.3k|        f->bd_fn.backup_ipred_edge(t);
 2731|       |
 2732|       |    // backup t->a/l.tx_lpf_y/uv at tile boundaries to use them to "fix"
 2733|       |    // up the initial value in neighbour tiles when running the loopfilter
 2734|  69.3k|    int align_h = (f->bh + 31) & ~31;
 2735|  69.3k|    memcpy(&f->lf.tx_lpf_right_edge[0][align_h * tile_col + t->by],
 2736|  69.3k|           &t->l.tx_lpf_y[t->by & 16], sb_step);
 2737|  69.3k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2738|  69.3k|    align_h >>= ss_ver;
 2739|  69.3k|    memcpy(&f->lf.tx_lpf_right_edge[1][align_h * tile_col + (t->by >> ss_ver)],
 2740|  69.3k|           &t->l.tx_lpf_uv[(t->by & 16) >> ss_ver], sb_step >> ss_ver);
 2741|       |
 2742|       |    // error out on symbol decoder overread
 2743|  69.3k|    if (ts->msac.cnt <= -15) return 1;
  ------------------
  |  Branch (2743:9): [True: 3.86k, False: 65.5k]
  ------------------
 2744|       |
 2745|  65.5k|    return c->strict_std_compliance &&
  ------------------
  |  Branch (2745:12): [True: 0, False: 65.5k]
  ------------------
 2746|      0|           (t->by >> f->sb_shift) + 1 >= f->frame_hdr->tiling.row_start_sb[tile_row + 1] &&
  ------------------
  |  Branch (2746:12): [True: 0, False: 0]
  ------------------
 2747|      0|           check_trailing_bits_after_symbol_coder(&ts->msac);
  ------------------
  |  Branch (2747:12): [True: 0, False: 0]
  ------------------
 2748|  69.3k|}
dav1d_decode_frame_init:
 2750|  17.2k|int dav1d_decode_frame_init(Dav1dFrameContext *const f) {
 2751|  17.2k|    const Dav1dContext *const c = f->c;
 2752|  17.2k|    int retval = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|  17.2k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 2753|       |
 2754|  17.2k|    if (f->sbh > f->lf.start_of_tile_row_sz) {
  ------------------
  |  Branch (2754:9): [True: 11.8k, False: 5.33k]
  ------------------
 2755|  11.8k|        dav1d_free(f->lf.start_of_tile_row);
  ------------------
  |  |  135|  11.8k|#define dav1d_free(ptr) free(ptr)
  ------------------
 2756|  11.8k|        f->lf.start_of_tile_row = dav1d_malloc(ALLOC_TILE, f->sbh * sizeof(uint8_t));
  ------------------
  |  |  132|  11.8k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2757|  11.8k|        if (!f->lf.start_of_tile_row) {
  ------------------
  |  Branch (2757:13): [True: 0, False: 11.8k]
  ------------------
 2758|      0|            f->lf.start_of_tile_row_sz = 0;
 2759|      0|            goto error;
 2760|      0|        }
 2761|  11.8k|        f->lf.start_of_tile_row_sz = f->sbh;
 2762|  11.8k|    }
 2763|  17.2k|    int sby = 0;
 2764|  35.5k|    for (int tile_row = 0; tile_row < f->frame_hdr->tiling.rows; tile_row++) {
  ------------------
  |  Branch (2764:28): [True: 18.3k, False: 17.2k]
  ------------------
 2765|  18.3k|        f->lf.start_of_tile_row[sby++] = tile_row;
 2766|   145k|        while (sby < f->frame_hdr->tiling.row_start_sb[tile_row + 1])
  ------------------
  |  Branch (2766:16): [True: 127k, False: 18.3k]
  ------------------
 2767|   127k|            f->lf.start_of_tile_row[sby++] = 0;
 2768|  18.3k|    }
 2769|       |
 2770|  17.2k|    const int n_ts = f->frame_hdr->tiling.cols * f->frame_hdr->tiling.rows;
 2771|  17.2k|    if (n_ts != f->n_ts) {
  ------------------
  |  Branch (2771:9): [True: 11.8k, False: 5.41k]
  ------------------
 2772|  11.8k|        if (c->n_fc > 1) {
  ------------------
  |  Branch (2772:13): [True: 0, False: 11.8k]
  ------------------
 2773|      0|            dav1d_free(f->frame_thread.tile_start_off);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
 2774|      0|            f->frame_thread.tile_start_off =
 2775|      0|                dav1d_malloc(ALLOC_TILE, sizeof(*f->frame_thread.tile_start_off) * n_ts);
  ------------------
  |  |  132|      0|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2776|      0|            if (!f->frame_thread.tile_start_off) {
  ------------------
  |  Branch (2776:17): [True: 0, False: 0]
  ------------------
 2777|      0|                f->n_ts = 0;
 2778|      0|                goto error;
 2779|      0|            }
 2780|      0|        }
 2781|  11.8k|        dav1d_free_aligned(f->ts);
  ------------------
  |  |  136|  11.8k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2782|  11.8k|        f->ts = dav1d_alloc_aligned(ALLOC_TILE, sizeof(*f->ts) * n_ts, 32);
  ------------------
  |  |  134|  11.8k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2783|  11.8k|        if (!f->ts) goto error;
  ------------------
  |  Branch (2783:13): [True: 0, False: 11.8k]
  ------------------
 2784|  11.8k|        f->n_ts = n_ts;
 2785|  11.8k|    }
 2786|       |
 2787|  17.2k|    const int a_sz = f->sb128w * f->frame_hdr->tiling.rows * (1 + (c->n_fc > 1 && c->n_tc > 1));
  ------------------
  |  Branch (2787:68): [True: 0, False: 17.2k]
  |  Branch (2787:83): [True: 0, False: 0]
  ------------------
 2788|  17.2k|    if (a_sz != f->a_sz) {
  ------------------
  |  Branch (2788:9): [True: 11.9k, False: 5.31k]
  ------------------
 2789|  11.9k|        dav1d_free(f->a);
  ------------------
  |  |  135|  11.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
 2790|  11.9k|        f->a = dav1d_malloc(ALLOC_TILE, sizeof(*f->a) * a_sz);
  ------------------
  |  |  132|  11.9k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2791|  11.9k|        if (!f->a) {
  ------------------
  |  Branch (2791:13): [True: 0, False: 11.9k]
  ------------------
 2792|      0|            f->a_sz = 0;
 2793|      0|            goto error;
 2794|      0|        }
 2795|  11.9k|        f->a_sz = a_sz;
 2796|  11.9k|    }
 2797|       |
 2798|  17.2k|    const int num_sb128 = f->sb128w * f->sb128h;
 2799|  17.2k|    const uint8_t *const size_mul = ss_size_mul[f->cur.p.layout];
 2800|  17.2k|    const int hbd = !!f->seq_hdr->hbd;
 2801|  17.2k|    if (c->n_fc > 1) {
  ------------------
  |  Branch (2801:9): [True: 0, False: 17.2k]
  ------------------
 2802|      0|        const unsigned sb_step4 = f->sb_step * 4;
 2803|      0|        int tile_idx = 0;
 2804|      0|        for (int tile_row = 0; tile_row < f->frame_hdr->tiling.rows; tile_row++) {
  ------------------
  |  Branch (2804:32): [True: 0, False: 0]
  ------------------
 2805|      0|            const unsigned row_off = f->frame_hdr->tiling.row_start_sb[tile_row] *
 2806|      0|                                     sb_step4 * f->sb128w * 128;
 2807|      0|            const unsigned b_diff = (f->frame_hdr->tiling.row_start_sb[tile_row + 1] -
 2808|      0|                                     f->frame_hdr->tiling.row_start_sb[tile_row]) * sb_step4;
 2809|      0|            for (int tile_col = 0; tile_col < f->frame_hdr->tiling.cols; tile_col++) {
  ------------------
  |  Branch (2809:36): [True: 0, False: 0]
  ------------------
 2810|      0|                f->frame_thread.tile_start_off[tile_idx++] = row_off + b_diff *
 2811|      0|                    f->frame_hdr->tiling.col_start_sb[tile_col] * sb_step4;
 2812|      0|            }
 2813|      0|        }
 2814|       |
 2815|      0|        const int lowest_pixel_mem_sz = f->frame_hdr->tiling.cols * f->sbh;
 2816|      0|        if (lowest_pixel_mem_sz != f->tile_thread.lowest_pixel_mem_sz) {
  ------------------
  |  Branch (2816:13): [True: 0, False: 0]
  ------------------
 2817|      0|            dav1d_free(f->tile_thread.lowest_pixel_mem);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
 2818|      0|            f->tile_thread.lowest_pixel_mem =
 2819|      0|                dav1d_malloc(ALLOC_TILE, lowest_pixel_mem_sz *
  ------------------
  |  |  132|      0|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2820|      0|                             sizeof(*f->tile_thread.lowest_pixel_mem));
 2821|      0|            if (!f->tile_thread.lowest_pixel_mem) {
  ------------------
  |  Branch (2821:17): [True: 0, False: 0]
  ------------------
 2822|      0|                f->tile_thread.lowest_pixel_mem_sz = 0;
 2823|      0|                goto error;
 2824|      0|            }
 2825|      0|            f->tile_thread.lowest_pixel_mem_sz = lowest_pixel_mem_sz;
 2826|      0|        }
 2827|      0|        int (*lowest_pixel_ptr)[7][2] = f->tile_thread.lowest_pixel_mem;
 2828|      0|        for (int tile_row = 0, tile_row_base = 0; tile_row < f->frame_hdr->tiling.rows;
  ------------------
  |  Branch (2828:51): [True: 0, False: 0]
  ------------------
 2829|      0|             tile_row++, tile_row_base += f->frame_hdr->tiling.cols)
 2830|      0|        {
 2831|      0|            const int tile_row_sb_h = f->frame_hdr->tiling.row_start_sb[tile_row + 1] -
 2832|      0|                                      f->frame_hdr->tiling.row_start_sb[tile_row];
 2833|      0|            for (int tile_col = 0; tile_col < f->frame_hdr->tiling.cols; tile_col++) {
  ------------------
  |  Branch (2833:36): [True: 0, False: 0]
  ------------------
 2834|      0|                f->ts[tile_row_base + tile_col].lowest_pixel = lowest_pixel_ptr;
 2835|      0|                lowest_pixel_ptr += tile_row_sb_h;
 2836|      0|            }
 2837|      0|        }
 2838|       |
 2839|      0|        const int cbi_sz = num_sb128 * size_mul[0];
 2840|      0|        if (cbi_sz != f->frame_thread.cbi_sz) {
  ------------------
  |  Branch (2840:13): [True: 0, False: 0]
  ------------------
 2841|      0|            dav1d_free_aligned(f->frame_thread.cbi);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2842|      0|            f->frame_thread.cbi =
 2843|      0|                dav1d_alloc_aligned(ALLOC_BLOCK, sizeof(*f->frame_thread.cbi) *
  ------------------
  |  |  134|      0|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2844|      0|                                    cbi_sz * 32 * 32 / 4, 64);
 2845|      0|            if (!f->frame_thread.cbi) {
  ------------------
  |  Branch (2845:17): [True: 0, False: 0]
  ------------------
 2846|      0|                f->frame_thread.cbi_sz = 0;
 2847|      0|                goto error;
 2848|      0|            }
 2849|      0|            f->frame_thread.cbi_sz = cbi_sz;
 2850|      0|        }
 2851|       |
 2852|      0|        const int cf_sz = (num_sb128 * size_mul[0]) << hbd;
 2853|      0|        if (cf_sz != f->frame_thread.cf_sz) {
  ------------------
  |  Branch (2853:13): [True: 0, False: 0]
  ------------------
 2854|      0|            dav1d_free_aligned(f->frame_thread.cf);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2855|      0|            f->frame_thread.cf =
 2856|      0|                dav1d_alloc_aligned(ALLOC_COEF, (size_t)cf_sz * 128 * 128 / 2, 64);
  ------------------
  |  |  134|      0|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2857|      0|            if (!f->frame_thread.cf) {
  ------------------
  |  Branch (2857:17): [True: 0, False: 0]
  ------------------
 2858|      0|                f->frame_thread.cf_sz = 0;
 2859|      0|                goto error;
 2860|      0|            }
 2861|      0|            memset(f->frame_thread.cf, 0, (size_t)cf_sz * 128 * 128 / 2);
 2862|      0|            f->frame_thread.cf_sz = cf_sz;
 2863|      0|        }
 2864|       |
 2865|      0|        if (f->frame_hdr->allow_screen_content_tools) {
  ------------------
  |  Branch (2865:13): [True: 0, False: 0]
  ------------------
 2866|      0|            const int pal_sz = num_sb128 << hbd;
 2867|      0|            if (pal_sz != f->frame_thread.pal_sz) {
  ------------------
  |  Branch (2867:17): [True: 0, False: 0]
  ------------------
 2868|      0|                dav1d_free_aligned(f->frame_thread.pal);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2869|      0|                f->frame_thread.pal =
 2870|      0|                    dav1d_alloc_aligned(ALLOC_PAL, sizeof(*f->frame_thread.pal) *
  ------------------
  |  |  134|      0|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2871|      0|                                        pal_sz * 16 * 16, 64);
 2872|      0|                if (!f->frame_thread.pal) {
  ------------------
  |  Branch (2872:21): [True: 0, False: 0]
  ------------------
 2873|      0|                    f->frame_thread.pal_sz = 0;
 2874|      0|                    goto error;
 2875|      0|                }
 2876|      0|                f->frame_thread.pal_sz = pal_sz;
 2877|      0|            }
 2878|       |
 2879|      0|            const int pal_idx_sz = num_sb128 * size_mul[1];
 2880|      0|            if (pal_idx_sz != f->frame_thread.pal_idx_sz) {
  ------------------
  |  Branch (2880:17): [True: 0, False: 0]
  ------------------
 2881|      0|                dav1d_free_aligned(f->frame_thread.pal_idx);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2882|      0|                f->frame_thread.pal_idx =
 2883|      0|                    dav1d_alloc_aligned(ALLOC_PAL, sizeof(*f->frame_thread.pal_idx) *
  ------------------
  |  |  134|      0|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2884|      0|                                        pal_idx_sz * 128 * 128 / 8, 64);
 2885|      0|                if (!f->frame_thread.pal_idx) {
  ------------------
  |  Branch (2885:21): [True: 0, False: 0]
  ------------------
 2886|      0|                    f->frame_thread.pal_idx_sz = 0;
 2887|      0|                    goto error;
 2888|      0|                }
 2889|      0|                f->frame_thread.pal_idx_sz = pal_idx_sz;
 2890|      0|            }
 2891|      0|        } else if (f->frame_thread.pal) {
  ------------------
  |  Branch (2891:20): [True: 0, False: 0]
  ------------------
 2892|      0|            dav1d_freep_aligned(&f->frame_thread.pal);
 2893|      0|            dav1d_freep_aligned(&f->frame_thread.pal_idx);
 2894|      0|            f->frame_thread.pal_sz = f->frame_thread.pal_idx_sz = 0;
 2895|      0|        }
 2896|      0|    }
 2897|       |
 2898|       |    // update allocation of block contexts for above
 2899|  17.2k|    ptrdiff_t y_stride = f->cur.stride[0], uv_stride = f->cur.stride[1];
 2900|  17.2k|    const int has_resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
 2901|  17.2k|    const int need_cdef_lpf_copy = c->n_tc > 1 && has_resize;
  ------------------
  |  Branch (2901:36): [True: 0, False: 17.2k]
  |  Branch (2901:51): [True: 0, False: 0]
  ------------------
 2902|  17.2k|    if (y_stride * f->sbh * 4 != f->lf.cdef_buf_plane_sz[0] ||
  ------------------
  |  Branch (2902:9): [True: 12.0k, False: 5.21k]
  ------------------
 2903|  5.21k|        uv_stride * f->sbh * 8 != f->lf.cdef_buf_plane_sz[1] ||
  ------------------
  |  Branch (2903:9): [True: 91, False: 5.12k]
  ------------------
 2904|  5.12k|        need_cdef_lpf_copy != f->lf.need_cdef_lpf_copy ||
  ------------------
  |  Branch (2904:9): [True: 0, False: 5.12k]
  ------------------
 2905|  5.12k|        f->sbh != f->lf.cdef_buf_sbh)
  ------------------
  |  Branch (2905:9): [True: 8, False: 5.11k]
  ------------------
 2906|  12.1k|    {
 2907|  12.1k|        dav1d_free_aligned(f->lf.cdef_line_buf);
  ------------------
  |  |  136|  12.1k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2908|  12.1k|        size_t alloc_sz = 64;
 2909|  12.1k|        alloc_sz += (size_t)llabs(y_stride) * 4 * f->sbh << need_cdef_lpf_copy;
 2910|  12.1k|        alloc_sz += (size_t)llabs(uv_stride) * 8 * f->sbh << need_cdef_lpf_copy;
 2911|  12.1k|        uint8_t *ptr = f->lf.cdef_line_buf = dav1d_alloc_aligned(ALLOC_CDEF, alloc_sz, 32);
  ------------------
  |  |  134|  12.1k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2912|  12.1k|        if (!ptr) {
  ------------------
  |  Branch (2912:13): [True: 0, False: 12.1k]
  ------------------
 2913|      0|            f->lf.cdef_buf_plane_sz[0] = f->lf.cdef_buf_plane_sz[1] = 0;
 2914|      0|            goto error;
 2915|      0|        }
 2916|       |
 2917|  12.1k|        ptr += 32;
 2918|  12.1k|        if (y_stride < 0) {
  ------------------
  |  Branch (2918:13): [True: 0, False: 12.1k]
  ------------------
 2919|      0|            f->lf.cdef_line[0][0] = ptr - y_stride * (f->sbh * 4 - 1);
 2920|      0|            f->lf.cdef_line[1][0] = ptr - y_stride * (f->sbh * 4 - 3);
 2921|  12.1k|        } else {
 2922|  12.1k|            f->lf.cdef_line[0][0] = ptr + y_stride * 0;
 2923|  12.1k|            f->lf.cdef_line[1][0] = ptr + y_stride * 2;
 2924|  12.1k|        }
 2925|  12.1k|        ptr += llabs(y_stride) * f->sbh * 4;
 2926|  12.1k|        if (uv_stride < 0) {
  ------------------
  |  Branch (2926:13): [True: 0, False: 12.1k]
  ------------------
 2927|      0|            f->lf.cdef_line[0][1] = ptr - uv_stride * (f->sbh * 8 - 1);
 2928|      0|            f->lf.cdef_line[0][2] = ptr - uv_stride * (f->sbh * 8 - 3);
 2929|      0|            f->lf.cdef_line[1][1] = ptr - uv_stride * (f->sbh * 8 - 5);
 2930|      0|            f->lf.cdef_line[1][2] = ptr - uv_stride * (f->sbh * 8 - 7);
 2931|  12.1k|        } else {
 2932|  12.1k|            f->lf.cdef_line[0][1] = ptr + uv_stride * 0;
 2933|  12.1k|            f->lf.cdef_line[0][2] = ptr + uv_stride * 2;
 2934|  12.1k|            f->lf.cdef_line[1][1] = ptr + uv_stride * 4;
 2935|  12.1k|            f->lf.cdef_line[1][2] = ptr + uv_stride * 6;
 2936|  12.1k|        }
 2937|       |
 2938|  12.1k|        if (need_cdef_lpf_copy) {
  ------------------
  |  Branch (2938:13): [True: 0, False: 12.1k]
  ------------------
 2939|      0|            ptr += llabs(uv_stride) * f->sbh * 8;
 2940|      0|            if (y_stride < 0)
  ------------------
  |  Branch (2940:17): [True: 0, False: 0]
  ------------------
 2941|      0|                f->lf.cdef_lpf_line[0] = ptr - y_stride * (f->sbh * 4 - 1);
 2942|      0|            else
 2943|      0|                f->lf.cdef_lpf_line[0] = ptr;
 2944|      0|            ptr += llabs(y_stride) * f->sbh * 4;
 2945|      0|            if (uv_stride < 0) {
  ------------------
  |  Branch (2945:17): [True: 0, False: 0]
  ------------------
 2946|      0|                f->lf.cdef_lpf_line[1] = ptr - uv_stride * (f->sbh * 4 - 1);
 2947|      0|                f->lf.cdef_lpf_line[2] = ptr - uv_stride * (f->sbh * 8 - 1);
 2948|      0|            } else {
 2949|      0|                f->lf.cdef_lpf_line[1] = ptr;
 2950|      0|                f->lf.cdef_lpf_line[2] = ptr + uv_stride * f->sbh * 4;
 2951|      0|            }
 2952|      0|        }
 2953|       |
 2954|  12.1k|        f->lf.cdef_buf_plane_sz[0] = (int) y_stride * f->sbh * 4;
 2955|  12.1k|        f->lf.cdef_buf_plane_sz[1] = (int) uv_stride * f->sbh * 8;
 2956|  12.1k|        f->lf.need_cdef_lpf_copy = need_cdef_lpf_copy;
 2957|  12.1k|        f->lf.cdef_buf_sbh = f->sbh;
 2958|  12.1k|    }
 2959|       |
 2960|  17.2k|    const int sb128 = f->seq_hdr->sb128;
 2961|  17.2k|    const int num_lines = c->n_tc > 1 ? f->sbh * 4 << sb128 : 12;
  ------------------
  |  Branch (2961:27): [True: 0, False: 17.2k]
  ------------------
 2962|  17.2k|    y_stride = f->sr_cur.p.stride[0], uv_stride = f->sr_cur.p.stride[1];
 2963|  17.2k|    if (y_stride * num_lines != f->lf.lr_buf_plane_sz[0] ||
  ------------------
  |  Branch (2963:9): [True: 11.8k, False: 5.39k]
  ------------------
 2964|  5.39k|        uv_stride * num_lines * 2 != f->lf.lr_buf_plane_sz[1])
  ------------------
  |  Branch (2964:9): [True: 94, False: 5.30k]
  ------------------
 2965|  11.9k|    {
 2966|  11.9k|        dav1d_free_aligned(f->lf.lr_line_buf);
  ------------------
  |  |  136|  11.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2967|       |        // lr simd may overread the input, so slightly over-allocate the lpf buffer
 2968|  11.9k|        size_t alloc_sz = 128;
 2969|  11.9k|        alloc_sz += (size_t)llabs(y_stride) * num_lines;
 2970|  11.9k|        alloc_sz += (size_t)llabs(uv_stride) * num_lines * 2;
 2971|  11.9k|        uint8_t *ptr = f->lf.lr_line_buf = dav1d_alloc_aligned(ALLOC_LR, alloc_sz, 64);
  ------------------
  |  |  134|  11.9k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2972|  11.9k|        if (!ptr) {
  ------------------
  |  Branch (2972:13): [True: 0, False: 11.9k]
  ------------------
 2973|      0|            f->lf.lr_buf_plane_sz[0] = f->lf.lr_buf_plane_sz[1] = 0;
 2974|      0|            goto error;
 2975|      0|        }
 2976|       |
 2977|  11.9k|        ptr += 64;
 2978|  11.9k|        if (y_stride < 0)
  ------------------
  |  Branch (2978:13): [True: 0, False: 11.9k]
  ------------------
 2979|      0|            f->lf.lr_lpf_line[0] = ptr - y_stride * (num_lines - 1);
 2980|  11.9k|        else
 2981|  11.9k|            f->lf.lr_lpf_line[0] = ptr;
 2982|  11.9k|        ptr += llabs(y_stride) * num_lines;
 2983|  11.9k|        if (uv_stride < 0) {
  ------------------
  |  Branch (2983:13): [True: 0, False: 11.9k]
  ------------------
 2984|      0|            f->lf.lr_lpf_line[1] = ptr - uv_stride * (num_lines * 1 - 1);
 2985|      0|            f->lf.lr_lpf_line[2] = ptr - uv_stride * (num_lines * 2 - 1);
 2986|  11.9k|        } else {
 2987|  11.9k|            f->lf.lr_lpf_line[1] = ptr;
 2988|  11.9k|            f->lf.lr_lpf_line[2] = ptr + uv_stride * num_lines;
 2989|  11.9k|        }
 2990|       |
 2991|  11.9k|        f->lf.lr_buf_plane_sz[0] = (int) y_stride * num_lines;
 2992|  11.9k|        f->lf.lr_buf_plane_sz[1] = (int) uv_stride * num_lines * 2;
 2993|  11.9k|    }
 2994|       |
 2995|       |    // update allocation for loopfilter masks
 2996|  17.2k|    if (num_sb128 != f->lf.mask_sz) {
  ------------------
  |  Branch (2996:9): [True: 11.9k, False: 5.22k]
  ------------------
 2997|  11.9k|        dav1d_free(f->lf.mask);
  ------------------
  |  |  135|  11.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
 2998|  11.9k|        dav1d_free(f->lf.level);
  ------------------
  |  |  135|  11.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
 2999|  11.9k|        f->lf.mask = dav1d_malloc(ALLOC_LF, sizeof(*f->lf.mask) * num_sb128);
  ------------------
  |  |  132|  11.9k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3000|       |        // over-allocate by 3 bytes since some of the SIMD implementations
 3001|       |        // index this from the level type and can thus over-read by up to 3
 3002|  11.9k|        f->lf.level = dav1d_malloc(ALLOC_LF, sizeof(*f->lf.level) * num_sb128 * 32 * 32 + 3);
  ------------------
  |  |  132|  11.9k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3003|  11.9k|        if (!f->lf.mask || !f->lf.level) {
  ------------------
  |  Branch (3003:13): [True: 0, False: 11.9k]
  |  Branch (3003:28): [True: 0, False: 11.9k]
  ------------------
 3004|      0|            f->lf.mask_sz = 0;
 3005|      0|            goto error;
 3006|      0|        }
 3007|  11.9k|        if (c->n_fc > 1) {
  ------------------
  |  Branch (3007:13): [True: 0, False: 11.9k]
  ------------------
 3008|      0|            dav1d_free(f->frame_thread.b);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
 3009|      0|            f->frame_thread.b = dav1d_malloc(ALLOC_BLOCK, sizeof(*f->frame_thread.b) *
  ------------------
  |  |  132|      0|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3010|      0|                                             num_sb128 * 32 * 32);
 3011|      0|            if (!f->frame_thread.b) {
  ------------------
  |  Branch (3011:17): [True: 0, False: 0]
  ------------------
 3012|      0|                f->lf.mask_sz = 0;
 3013|      0|                goto error;
 3014|      0|            }
 3015|      0|        }
 3016|  11.9k|        f->lf.mask_sz = num_sb128;
 3017|  11.9k|    }
 3018|       |
 3019|  17.2k|    f->sr_sb128w = (f->sr_cur.p.p.w + 127) >> 7;
 3020|  17.2k|    const int lr_mask_sz = f->sr_sb128w * f->sb128h;
 3021|  17.2k|    if (lr_mask_sz != f->lf.lr_mask_sz) {
  ------------------
  |  Branch (3021:9): [True: 11.9k, False: 5.28k]
  ------------------
 3022|  11.9k|        dav1d_free(f->lf.lr_mask);
  ------------------
  |  |  135|  11.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3023|  11.9k|        f->lf.lr_mask = dav1d_malloc(ALLOC_LR, sizeof(*f->lf.lr_mask) * lr_mask_sz);
  ------------------
  |  |  132|  11.9k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3024|  11.9k|        if (!f->lf.lr_mask) {
  ------------------
  |  Branch (3024:13): [True: 0, False: 11.9k]
  ------------------
 3025|      0|            f->lf.lr_mask_sz = 0;
 3026|      0|            goto error;
 3027|      0|        }
 3028|  11.9k|        f->lf.lr_mask_sz = lr_mask_sz;
 3029|  11.9k|    }
 3030|  17.2k|    f->lf.restore_planes =
 3031|  17.2k|        ((f->frame_hdr->restoration.type[0] != DAV1D_RESTORATION_NONE) << 0) +
 3032|  17.2k|        ((f->frame_hdr->restoration.type[1] != DAV1D_RESTORATION_NONE) << 1) +
 3033|  17.2k|        ((f->frame_hdr->restoration.type[2] != DAV1D_RESTORATION_NONE) << 2);
 3034|  17.2k|    if (f->frame_hdr->loopfilter.sharpness != f->lf.last_sharpness) {
  ------------------
  |  Branch (3034:9): [True: 14.4k, False: 2.77k]
  ------------------
 3035|  14.4k|        dav1d_calc_eih(&f->lf.lim_lut, f->frame_hdr->loopfilter.sharpness);
 3036|  14.4k|        f->lf.last_sharpness = f->frame_hdr->loopfilter.sharpness;
 3037|  14.4k|    }
 3038|  17.2k|    dav1d_calc_lf_values(f->lf.lvl, f->frame_hdr, (int8_t[4]) { 0, 0, 0, 0 });
 3039|  17.2k|    memset(f->lf.mask, 0, sizeof(*f->lf.mask) * num_sb128);
 3040|       |
 3041|  17.2k|    const int ipred_edge_sz = f->sbh * f->sb128w << hbd;
 3042|  17.2k|    if (ipred_edge_sz != f->ipred_edge_sz) {
  ------------------
  |  Branch (3042:9): [True: 12.0k, False: 5.21k]
  ------------------
 3043|  12.0k|        dav1d_free_aligned(f->ipred_edge[0]);
  ------------------
  |  |  136|  12.0k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 3044|  12.0k|        uint8_t *ptr = f->ipred_edge[0] =
 3045|  12.0k|            dav1d_alloc_aligned(ALLOC_IPRED, ipred_edge_sz * 128 * 3, 64);
  ------------------
  |  |  134|  12.0k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 3046|  12.0k|        if (!ptr) {
  ------------------
  |  Branch (3046:13): [True: 0, False: 12.0k]
  ------------------
 3047|      0|            f->ipred_edge_sz = 0;
 3048|      0|            goto error;
 3049|      0|        }
 3050|  12.0k|        f->ipred_edge[1] = ptr + ipred_edge_sz * 128 * 1;
 3051|  12.0k|        f->ipred_edge[2] = ptr + ipred_edge_sz * 128 * 2;
 3052|  12.0k|        f->ipred_edge_sz = ipred_edge_sz;
 3053|  12.0k|    }
 3054|       |
 3055|  17.2k|    const int re_sz = f->sb128h * f->frame_hdr->tiling.cols;
 3056|  17.2k|    if (re_sz != f->lf.re_sz) {
  ------------------
  |  Branch (3056:9): [True: 11.9k, False: 5.30k]
  ------------------
 3057|  11.9k|        dav1d_free(f->lf.tx_lpf_right_edge[0]);
  ------------------
  |  |  135|  11.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3058|  11.9k|        f->lf.tx_lpf_right_edge[0] = dav1d_malloc(ALLOC_LF, re_sz * 32 * 2);
  ------------------
  |  |  132|  11.9k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3059|  11.9k|        if (!f->lf.tx_lpf_right_edge[0]) {
  ------------------
  |  Branch (3059:13): [True: 0, False: 11.9k]
  ------------------
 3060|      0|            f->lf.re_sz = 0;
 3061|      0|            goto error;
 3062|      0|        }
 3063|  11.9k|        f->lf.tx_lpf_right_edge[1] = f->lf.tx_lpf_right_edge[0] + re_sz * 32;
 3064|  11.9k|        f->lf.re_sz = re_sz;
 3065|  11.9k|    }
 3066|       |
 3067|       |    // init ref mvs
 3068|  17.2k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc) {
  ------------------
  |  |   36|  34.4k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.67k, False: 14.5k]
  |  |  ------------------
  ------------------
  |  Branch (3068:45): [True: 2.72k, False: 11.8k]
  ------------------
 3069|  5.40k|        const int ret =
 3070|  5.40k|            dav1d_refmvs_init_frame(&f->rf, f->seq_hdr, f->frame_hdr,
 3071|  5.40k|                                    f->refpoc, f->mvs, f->refrefpoc, f->ref_mvs,
 3072|  5.40k|                                    f->c->n_tc, f->c->n_fc);
 3073|  5.40k|        if (ret < 0) goto error;
  ------------------
  |  Branch (3073:13): [True: 0, False: 5.40k]
  ------------------
 3074|  5.40k|    }
 3075|       |
 3076|       |    // setup dequant tables
 3077|  17.2k|    init_quant_tables(f->seq_hdr, f->frame_hdr, f->frame_hdr->quant.yac, f->dq);
 3078|  17.2k|    if (f->frame_hdr->quant.qm)
  ------------------
  |  Branch (3078:9): [True: 6.95k, False: 10.2k]
  ------------------
 3079|   139k|        for (int i = 0; i < N_RECT_TX_SIZES; i++) {
  ------------------
  |  Branch (3079:25): [True: 132k, False: 6.95k]
  ------------------
 3080|   132k|            f->qm[i][0] = dav1d_qm_tbl[f->frame_hdr->quant.qm_y][0][i];
 3081|   132k|            f->qm[i][1] = dav1d_qm_tbl[f->frame_hdr->quant.qm_u][1][i];
 3082|   132k|            f->qm[i][2] = dav1d_qm_tbl[f->frame_hdr->quant.qm_v][1][i];
 3083|   132k|        }
 3084|  10.2k|    else
 3085|  10.2k|        memset(f->qm, 0, sizeof(f->qm));
 3086|       |
 3087|       |    // setup jnt_comp weights
 3088|  17.2k|    if (f->frame_hdr->switchable_comp_refs) {
  ------------------
  |  Branch (3088:9): [True: 1.62k, False: 15.5k]
  ------------------
 3089|  13.0k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3089:25): [True: 11.3k, False: 1.62k]
  ------------------
 3090|  11.3k|            const unsigned ref0poc = f->refp[i].p.frame_hdr->frame_offset;
 3091|       |
 3092|  45.5k|            for (int j = i + 1; j < 7; j++) {
  ------------------
  |  Branch (3092:33): [True: 34.1k, False: 11.3k]
  ------------------
 3093|  34.1k|                const unsigned ref1poc = f->refp[j].p.frame_hdr->frame_offset;
 3094|       |
 3095|  34.1k|                const unsigned d1 =
 3096|  34.1k|                    imin(abs(get_poc_diff(f->seq_hdr->order_hint_n_bits, ref0poc,
 3097|  34.1k|                                          f->cur.frame_hdr->frame_offset)), 31);
 3098|  34.1k|                const unsigned d0 =
 3099|  34.1k|                    imin(abs(get_poc_diff(f->seq_hdr->order_hint_n_bits, ref1poc,
 3100|  34.1k|                                          f->cur.frame_hdr->frame_offset)), 31);
 3101|  34.1k|                const int order = d0 <= d1;
 3102|       |
 3103|  34.1k|                static const uint8_t quant_dist_weight[3][2] = {
 3104|  34.1k|                    { 2, 3 }, { 2, 5 }, { 2, 7 }
 3105|  34.1k|                };
 3106|  34.1k|                static const uint8_t quant_dist_lookup_table[4][2] = {
 3107|  34.1k|                    { 9, 7 }, { 11, 5 }, { 12, 4 }, { 13, 3 }
 3108|  34.1k|                };
 3109|       |
 3110|  34.1k|                int k;
 3111|  68.9k|                for (k = 0; k < 3; k++) {
  ------------------
  |  Branch (3111:29): [True: 57.6k, False: 11.2k]
  ------------------
 3112|  57.6k|                    const int c0 = quant_dist_weight[k][order];
 3113|  57.6k|                    const int c1 = quant_dist_weight[k][!order];
 3114|  57.6k|                    const int d0_c0 = d0 * c0;
 3115|  57.6k|                    const int d1_c1 = d1 * c1;
 3116|  57.6k|                    if ((d0 > d1 && d0_c0 < d1_c1) || (d0 <= d1 && d0_c0 > d1_c1)) break;
  ------------------
  |  Branch (3116:26): [True: 4.52k, False: 53.1k]
  |  Branch (3116:37): [True: 1.31k, False: 3.21k]
  |  Branch (3116:56): [True: 53.1k, False: 3.21k]
  |  Branch (3116:68): [True: 21.5k, False: 31.6k]
  ------------------
 3117|  57.6k|                }
 3118|       |
 3119|  34.1k|                f->jnt_weights[i][j] = quant_dist_lookup_table[k][order];
 3120|  34.1k|            }
 3121|  11.3k|        }
 3122|  1.62k|    }
 3123|       |
 3124|       |    /* Init loopfilter pointers. Increasing NULL pointers is technically UB,
 3125|       |     * so just point the chroma pointers in 4:0:0 to the luma plane here to
 3126|       |     * avoid having additional in-loop branches in various places. We never
 3127|       |     * dereference those pointers so it doesn't really matter what they
 3128|       |     * point at, as long as the pointers are valid. */
 3129|  17.2k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400;
 3130|  17.2k|    f->lf.p[0] = f->cur.data[0];
 3131|  17.2k|    f->lf.p[1] = f->cur.data[has_chroma ? 1 : 0];
  ------------------
  |  Branch (3131:30): [True: 12.2k, False: 5.01k]
  ------------------
 3132|  17.2k|    f->lf.p[2] = f->cur.data[has_chroma ? 2 : 0];
  ------------------
  |  Branch (3132:30): [True: 12.2k, False: 5.01k]
  ------------------
 3133|  17.2k|    f->lf.sr_p[0] = f->sr_cur.p.data[0];
 3134|  17.2k|    f->lf.sr_p[1] = f->sr_cur.p.data[has_chroma ? 1 : 0];
  ------------------
  |  Branch (3134:38): [True: 12.2k, False: 5.01k]
  ------------------
 3135|  17.2k|    f->lf.sr_p[2] = f->sr_cur.p.data[has_chroma ? 2 : 0];
  ------------------
  |  Branch (3135:38): [True: 12.2k, False: 5.01k]
  ------------------
 3136|       |
 3137|  17.2k|    retval = 0;
 3138|  17.2k|error:
 3139|  17.2k|    return retval;
 3140|  17.2k|}
dav1d_decode_frame_init_cdf:
 3142|  17.2k|int dav1d_decode_frame_init_cdf(Dav1dFrameContext *const f) {
 3143|  17.2k|    const Dav1dContext *const c = f->c;
 3144|  17.2k|    int retval = DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|  17.2k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3145|       |
 3146|  17.2k|    if (f->frame_hdr->refresh_context)
  ------------------
  |  Branch (3146:9): [True: 4.78k, False: 12.4k]
  ------------------
 3147|  4.78k|        dav1d_cdf_thread_copy(f->out_cdf.data.cdf, &f->in_cdf);
 3148|       |
 3149|       |    // parse individual tiles per tile group
 3150|  17.2k|    int tile_row = 0, tile_col = 0;
 3151|  17.2k|    f->task_thread.update_set = 0;
 3152|  34.3k|    for (int i = 0; i < f->n_tile_data; i++) {
  ------------------
  |  Branch (3152:21): [True: 17.2k, False: 17.1k]
  ------------------
 3153|  17.2k|        const uint8_t *data = f->tile[i].data.data;
 3154|  17.2k|        size_t size = f->tile[i].data.sz;
 3155|       |
 3156|  36.4k|        for (int j = f->tile[i].start; j <= f->tile[i].end; j++) {
  ------------------
  |  Branch (3156:40): [True: 19.2k, False: 17.1k]
  ------------------
 3157|  19.2k|            size_t tile_sz;
 3158|  19.2k|            if (j == f->tile[i].end) {
  ------------------
  |  Branch (3158:17): [True: 17.1k, False: 2.15k]
  ------------------
 3159|  17.1k|                tile_sz = size;
 3160|  17.1k|            } else {
 3161|  2.15k|                if (f->frame_hdr->tiling.n_bytes > size) goto error;
  ------------------
  |  Branch (3161:21): [True: 8, False: 2.15k]
  ------------------
 3162|  2.15k|                tile_sz = 0;
 3163|  4.61k|                for (unsigned k = 0; k < f->frame_hdr->tiling.n_bytes; k++)
  ------------------
  |  Branch (3163:38): [True: 2.46k, False: 2.15k]
  ------------------
 3164|  2.46k|                    tile_sz |= (unsigned)*data++ << (k * 8);
 3165|  2.15k|                tile_sz++;
 3166|  2.15k|                size -= f->frame_hdr->tiling.n_bytes;
 3167|  2.15k|                if (tile_sz > size) goto error;
  ------------------
  |  Branch (3167:21): [True: 99, False: 2.05k]
  ------------------
 3168|  2.15k|            }
 3169|       |
 3170|  19.1k|            setup_tile(&f->ts[j], f, data, tile_sz, tile_row, tile_col++,
 3171|  19.1k|                       c->n_fc > 1 ? f->frame_thread.tile_start_off[j] : 0);
  ------------------
  |  Branch (3171:24): [True: 0, False: 19.1k]
  ------------------
 3172|       |
 3173|  19.1k|            if (tile_col == f->frame_hdr->tiling.cols) {
  ------------------
  |  Branch (3173:17): [True: 17.8k, False: 1.34k]
  ------------------
 3174|  17.8k|                tile_col = 0;
 3175|  17.8k|                tile_row++;
 3176|  17.8k|            }
 3177|  19.1k|            if (j == f->frame_hdr->tiling.update && f->frame_hdr->refresh_context)
  ------------------
  |  Branch (3177:17): [True: 17.1k, False: 2.03k]
  |  Branch (3177:53): [True: 4.77k, False: 12.3k]
  ------------------
 3178|  4.77k|                f->task_thread.update_set = 1;
 3179|  19.1k|            data += tile_sz;
 3180|  19.1k|            size -= tile_sz;
 3181|  19.1k|        }
 3182|  17.2k|    }
 3183|       |
 3184|  17.1k|    if (c->n_tc > 1) {
  ------------------
  |  Branch (3184:9): [True: 0, False: 17.1k]
  ------------------
 3185|      0|        const int uses_2pass = c->n_fc > 1;
 3186|      0|        for (int n = 0; n < f->sb128w * f->frame_hdr->tiling.rows * (1 + uses_2pass); n++)
  ------------------
  |  Branch (3186:25): [True: 0, False: 0]
  ------------------
 3187|      0|            reset_context(&f->a[n], IS_KEY_OR_INTRA(f->frame_hdr),
  ------------------
  |  |   43|      0|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|      0|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  ------------------
 3188|      0|                          uses_2pass ? 1 + (n >= f->sb128w * f->frame_hdr->tiling.rows) : 0);
  ------------------
  |  Branch (3188:27): [True: 0, False: 0]
  ------------------
 3189|      0|    }
 3190|       |
 3191|  17.1k|    retval = 0;
 3192|  17.2k|error:
 3193|  17.2k|    return retval;
 3194|  17.1k|}
dav1d_decode_frame_main:
 3196|  17.1k|int dav1d_decode_frame_main(Dav1dFrameContext *const f) {
 3197|  17.1k|    const Dav1dContext *const c = f->c;
 3198|  17.1k|    int retval = DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|  17.1k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3199|       |
 3200|  17.1k|    assert(f->c->n_tc == 1);
  ------------------
  |  |  140|  17.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 17.1k]
  |  |  |  Branch (140:68): [Folded, False: 17.1k]
  |  |  ------------------
  ------------------
 3201|       |
 3202|  17.1k|    Dav1dTaskContext *const t = &c->tc[f - c->fc];
 3203|  17.1k|    t->f = f;
 3204|  17.1k|    t->frame_thread.pass = 0;
 3205|       |
 3206|  92.8k|    for (int n = 0; n < f->sb128w * f->frame_hdr->tiling.rows; n++)
  ------------------
  |  Branch (3206:21): [True: 75.7k, False: 17.1k]
  ------------------
 3207|  75.7k|        reset_context(&f->a[n], IS_KEY_OR_INTRA(f->frame_hdr), 0);
  ------------------
  |  |   43|  75.7k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  75.7k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  ------------------
 3208|       |
 3209|       |    // no threading - we explicitly interleave tile/sbrow decoding
 3210|       |    // and post-filtering, so that the full process runs in-line
 3211|  30.7k|    for (int tile_row = 0; tile_row < f->frame_hdr->tiling.rows; tile_row++) {
  ------------------
  |  Branch (3211:28): [True: 17.5k, False: 13.1k]
  ------------------
 3212|  17.5k|        const int sbh_end =
 3213|  17.5k|            imin(f->frame_hdr->tiling.row_start_sb[tile_row + 1], f->sbh);
 3214|  17.5k|        for (int sby = f->frame_hdr->tiling.row_start_sb[tile_row];
 3215|  81.9k|             sby < sbh_end; sby++)
  ------------------
  |  Branch (3215:14): [True: 68.2k, False: 13.6k]
  ------------------
 3216|  68.2k|        {
 3217|  68.2k|            t->by = sby << (4 + f->seq_hdr->sb128);
 3218|  68.2k|            const int by_end = (t->by + f->sb_step) >> 1;
 3219|  68.2k|            if (f->frame_hdr->use_ref_frame_mvs) {
  ------------------
  |  Branch (3219:17): [True: 1.31k, False: 66.9k]
  ------------------
 3220|  1.31k|                f->c->refmvs_dsp.load_tmvs(&f->rf, tile_row,
 3221|  1.31k|                                           0, f->bw >> 1, t->by >> 1, by_end);
 3222|  1.31k|            }
 3223|   133k|            for (int tile_col = 0; tile_col < f->frame_hdr->tiling.cols; tile_col++) {
  ------------------
  |  Branch (3223:36): [True: 69.4k, False: 64.3k]
  ------------------
 3224|  69.4k|                t->ts = &f->ts[tile_row * f->frame_hdr->tiling.cols + tile_col];
 3225|  69.4k|                if (dav1d_decode_tile_sbrow(t)) goto error;
  ------------------
  |  Branch (3225:21): [True: 3.96k, False: 65.5k]
  ------------------
 3226|  69.4k|            }
 3227|  64.3k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|  64.3k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 1.95k, False: 62.3k]
  |  |  ------------------
  ------------------
 3228|  1.95k|                dav1d_refmvs_save_tmvs(&f->c->refmvs_dsp, &t->rt,
 3229|  1.95k|                                       0, f->bw >> 1, t->by >> 1, by_end);
 3230|  1.95k|            }
 3231|       |
 3232|       |            // loopfilter + cdef + restoration
 3233|  64.3k|            f->bd_fn.filter_sbrow(f, sby);
 3234|  64.3k|        }
 3235|  17.5k|    }
 3236|       |
 3237|  13.1k|    retval = 0;
 3238|  17.1k|error:
 3239|  17.1k|    return retval;
 3240|  13.1k|}
dav1d_decode_frame_exit:
 3242|  17.2k|void dav1d_decode_frame_exit(Dav1dFrameContext *const f, int retval) {
 3243|  17.2k|    const Dav1dContext *const c = f->c;
 3244|       |
 3245|  17.2k|    if (f->sr_cur.p.data[0])
  ------------------
  |  Branch (3245:9): [True: 17.2k, False: 0]
  ------------------
 3246|  17.2k|        atomic_init(&f->task_thread.error, 0);
 3247|       |
 3248|  17.2k|    if (c->n_fc > 1 && retval && f->frame_thread.cf) {
  ------------------
  |  Branch (3248:9): [True: 0, False: 17.2k]
  |  Branch (3248:24): [True: 0, False: 0]
  |  Branch (3248:34): [True: 0, False: 0]
  ------------------
 3249|      0|        memset(f->frame_thread.cf, 0,
 3250|      0|               (size_t)f->frame_thread.cf_sz * 128 * 128 / 2);
 3251|      0|    }
 3252|   137k|    for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3252:21): [True: 120k, False: 17.2k]
  ------------------
 3253|   120k|        if (f->refp[i].p.frame_hdr) {
  ------------------
  |  Branch (3253:13): [True: 18.7k, False: 101k]
  ------------------
 3254|  18.7k|            if (!retval && c->n_fc > 1 && c->strict_std_compliance &&
  ------------------
  |  Branch (3254:17): [True: 11.0k, False: 7.69k]
  |  Branch (3254:28): [True: 0, False: 11.0k]
  |  Branch (3254:43): [True: 0, False: 0]
  ------------------
 3255|  18.7k|                atomic_load(&f->refp[i].progress[1]) == FRAME_ERROR)
  ------------------
  |  |   35|      0|#define FRAME_ERROR (UINT_MAX - 1)
  ------------------
  |  Branch (3255:17): [True: 0, False: 0]
  ------------------
 3256|      0|            {
 3257|      0|                retval = DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3258|      0|                atomic_store(&f->task_thread.error, 1);
 3259|      0|                atomic_store(&f->sr_cur.progress[1], FRAME_ERROR);
 3260|      0|            }
 3261|  18.7k|            dav1d_thread_picture_unref(&f->refp[i]);
 3262|  18.7k|        }
 3263|   120k|        dav1d_ref_dec(&f->ref_mvs_ref[i]);
 3264|   120k|    }
 3265|       |
 3266|  17.2k|    dav1d_picture_unref_internal(&f->cur);
 3267|  17.2k|    dav1d_thread_picture_unref(&f->sr_cur);
 3268|  17.2k|    dav1d_cdf_thread_unref(&f->in_cdf);
 3269|  17.2k|    if (f->frame_hdr && f->frame_hdr->refresh_context) {
  ------------------
  |  Branch (3269:9): [True: 17.2k, False: 0]
  |  Branch (3269:25): [True: 4.78k, False: 12.4k]
  ------------------
 3270|  4.78k|        if (f->out_cdf.progress)
  ------------------
  |  Branch (3270:13): [True: 0, False: 4.78k]
  ------------------
 3271|  4.78k|            atomic_store(f->out_cdf.progress, retval == 0 ? 1 : TILE_ERROR);
  ------------------
  |  Branch (3271:13): [True: 0, False: 0]
  ------------------
 3272|  4.78k|        dav1d_cdf_thread_unref(&f->out_cdf);
 3273|  4.78k|    }
 3274|  17.2k|    dav1d_ref_dec(&f->cur_segmap_ref);
 3275|  17.2k|    dav1d_ref_dec(&f->prev_segmap_ref);
 3276|  17.2k|    dav1d_ref_dec(&f->mvs_ref);
 3277|  17.2k|    dav1d_ref_dec(&f->seq_hdr_ref);
 3278|  17.2k|    dav1d_ref_dec(&f->frame_hdr_ref);
 3279|       |
 3280|  34.4k|    for (int i = 0; i < f->n_tile_data; i++)
  ------------------
  |  Branch (3280:21): [True: 17.2k, False: 17.2k]
  ------------------
 3281|  17.2k|        dav1d_data_unref_internal(&f->tile[i].data);
 3282|  17.2k|    f->task_thread.retval = retval;
 3283|  17.2k|}
dav1d_decode_frame:
 3285|  17.2k|int dav1d_decode_frame(Dav1dFrameContext *const f) {
 3286|  17.2k|    assert(f->c->n_fc == 1);
  ------------------
  |  |  140|  17.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 17.2k]
  |  |  |  Branch (140:68): [Folded, False: 17.2k]
  |  |  ------------------
  ------------------
 3287|       |    // if n_tc > 1 (but n_fc == 1), we could run init/exit in the task
 3288|       |    // threads also. Not sure it makes a measurable difference.
 3289|  17.2k|    int res = dav1d_decode_frame_init(f);
 3290|  17.2k|    if (!res) res = dav1d_decode_frame_init_cdf(f);
  ------------------
  |  Branch (3290:9): [True: 17.2k, False: 0]
  ------------------
 3291|       |    // wait until all threads have completed
 3292|  17.2k|    if (!res) {
  ------------------
  |  Branch (3292:9): [True: 17.1k, False: 107]
  ------------------
 3293|  17.1k|        if (f->c->n_tc > 1) {
  ------------------
  |  Branch (3293:13): [True: 0, False: 17.1k]
  ------------------
 3294|      0|            res = dav1d_task_create_tile_sbrow(f, 0, 1);
 3295|      0|            pthread_mutex_lock(&f->task_thread.ttd->lock);
 3296|      0|            pthread_cond_signal(&f->task_thread.ttd->cond);
 3297|      0|            if (!res) {
  ------------------
  |  Branch (3297:17): [True: 0, False: 0]
  ------------------
 3298|      0|                while (!f->task_thread.done[0] ||
  ------------------
  |  Branch (3298:24): [True: 0, False: 0]
  ------------------
 3299|      0|                       atomic_load(&f->task_thread.task_counter) > 0)
  ------------------
  |  Branch (3299:24): [True: 0, False: 0]
  ------------------
 3300|      0|                {
 3301|      0|                    pthread_cond_wait(&f->task_thread.cond,
 3302|      0|                                      &f->task_thread.ttd->lock);
 3303|      0|                }
 3304|      0|            }
 3305|      0|            pthread_mutex_unlock(&f->task_thread.ttd->lock);
 3306|      0|            res = f->task_thread.retval;
 3307|  17.1k|        } else {
 3308|  17.1k|            res = dav1d_decode_frame_main(f);
 3309|  17.1k|            if (!res && f->frame_hdr->refresh_context && f->task_thread.update_set) {
  ------------------
  |  Branch (3309:17): [True: 13.1k, False: 3.96k]
  |  Branch (3309:25): [True: 3.68k, False: 9.46k]
  |  Branch (3309:58): [True: 3.68k, False: 0]
  ------------------
 3310|  3.68k|                dav1d_cdf_thread_update(f->frame_hdr, f->out_cdf.data.cdf,
 3311|  3.68k|                                        &f->ts[f->frame_hdr->tiling.update].cdf);
 3312|  3.68k|            }
 3313|  17.1k|        }
 3314|  17.1k|    }
 3315|  17.2k|    dav1d_decode_frame_exit(f, res);
 3316|  17.2k|    res = f->task_thread.retval;
 3317|  17.2k|    f->n_tile_data = 0;
 3318|  17.2k|    return res;
 3319|  17.2k|}
dav1d_submit_frame:
 3327|  17.2k|int dav1d_submit_frame(Dav1dContext *const c) {
 3328|  17.2k|    Dav1dFrameContext *f;
 3329|  17.2k|    int res = -1;
 3330|       |
 3331|       |    // wait for c->out_delayed[next] and move into c->out if visible
 3332|  17.2k|    Dav1dThreadPicture *out_delayed;
 3333|  17.2k|    if (c->n_fc > 1) {
  ------------------
  |  Branch (3333:9): [True: 0, False: 17.2k]
  ------------------
 3334|      0|        pthread_mutex_lock(&c->task_thread.lock);
 3335|      0|        const unsigned next = c->frame_thread.next++;
 3336|      0|        if (c->frame_thread.next == c->n_fc)
  ------------------
  |  Branch (3336:13): [True: 0, False: 0]
  ------------------
 3337|      0|            c->frame_thread.next = 0;
 3338|       |
 3339|      0|        f = &c->fc[next];
 3340|      0|        while (f->n_tile_data > 0)
  ------------------
  |  Branch (3340:16): [True: 0, False: 0]
  ------------------
 3341|      0|            pthread_cond_wait(&f->task_thread.cond,
 3342|      0|                              &c->task_thread.lock);
 3343|      0|        out_delayed = &c->frame_thread.out_delayed[next];
 3344|      0|        if (out_delayed->p.data[0] || atomic_load(&f->task_thread.error)) {
  ------------------
  |  Branch (3344:13): [True: 0, False: 0]
  |  Branch (3344:39): [True: 0, False: 0]
  ------------------
 3345|      0|            unsigned first = atomic_load(&c->task_thread.first);
 3346|      0|            if (first + 1U < c->n_fc)
  ------------------
  |  Branch (3346:17): [True: 0, False: 0]
  ------------------
 3347|      0|                atomic_fetch_add(&c->task_thread.first, 1U);
 3348|      0|            else
 3349|      0|                atomic_store(&c->task_thread.first, 0);
 3350|      0|            atomic_compare_exchange_strong(&c->task_thread.reset_task_cur,
 3351|      0|                                           &first, UINT_MAX);
 3352|      0|            if (c->task_thread.cur && c->task_thread.cur < c->n_fc)
  ------------------
  |  Branch (3352:17): [True: 0, False: 0]
  |  Branch (3352:39): [True: 0, False: 0]
  ------------------
 3353|      0|                c->task_thread.cur--;
 3354|      0|        }
 3355|      0|        const int error = f->task_thread.retval;
 3356|      0|        if (error) {
  ------------------
  |  Branch (3356:13): [True: 0, False: 0]
  ------------------
 3357|      0|            f->task_thread.retval = 0;
 3358|      0|            c->cached_error = error;
 3359|      0|            dav1d_data_props_copy(&c->cached_error_props, &out_delayed->p.m);
 3360|      0|            dav1d_thread_picture_unref(out_delayed);
 3361|      0|        } else if (out_delayed->p.data[0]) {
  ------------------
  |  Branch (3361:20): [True: 0, False: 0]
  ------------------
 3362|      0|            const unsigned progress = atomic_load_explicit(&out_delayed->progress[1],
 3363|      0|                                                           memory_order_relaxed);
 3364|      0|            if ((out_delayed->visible || c->output_invisible_frames) &&
  ------------------
  |  Branch (3364:18): [True: 0, False: 0]
  |  Branch (3364:42): [True: 0, False: 0]
  ------------------
 3365|      0|                progress != FRAME_ERROR)
  ------------------
  |  |   35|      0|#define FRAME_ERROR (UINT_MAX - 1)
  ------------------
  |  Branch (3365:17): [True: 0, False: 0]
  ------------------
 3366|      0|            {
 3367|      0|                dav1d_thread_picture_ref(&c->out, out_delayed);
 3368|      0|                c->event_flags |= dav1d_picture_get_event_flags(out_delayed);
 3369|      0|            }
 3370|      0|            dav1d_thread_picture_unref(out_delayed);
 3371|      0|        }
 3372|  17.2k|    } else {
 3373|  17.2k|        f = c->fc;
 3374|  17.2k|    }
 3375|       |
 3376|  17.2k|    f->seq_hdr = c->seq_hdr;
 3377|  17.2k|    f->seq_hdr_ref = c->seq_hdr_ref;
 3378|  17.2k|    dav1d_ref_inc(f->seq_hdr_ref);
 3379|  17.2k|    f->frame_hdr = c->frame_hdr;
 3380|  17.2k|    f->frame_hdr_ref = c->frame_hdr_ref;
 3381|  17.2k|    c->frame_hdr = NULL;
 3382|  17.2k|    c->frame_hdr_ref = NULL;
 3383|  17.2k|    f->dsp = &c->dsp[f->seq_hdr->hbd];
 3384|       |
 3385|  17.2k|    const int bpc = 8 + 2 * f->seq_hdr->hbd;
 3386|       |
 3387|  17.2k|    if (!f->dsp->ipred.intra_pred[DC_PRED]) {
  ------------------
  |  Branch (3387:9): [True: 11.7k, False: 5.45k]
  ------------------
 3388|  11.7k|        Dav1dDSPContext *const dsp = &c->dsp[f->seq_hdr->hbd];
 3389|       |
 3390|  11.7k|        switch (bpc) {
 3391|      0|#define assign_bitdepth_case(bd) \
 3392|      0|            dav1d_cdef_dsp_init_##bd##bpc(&dsp->cdef); \
 3393|      0|            dav1d_intra_pred_dsp_init_##bd##bpc(&dsp->ipred); \
 3394|      0|            dav1d_itx_dsp_init_##bd##bpc(&dsp->itx, bpc); \
 3395|      0|            dav1d_loop_filter_dsp_init_##bd##bpc(&dsp->lf); \
 3396|      0|            dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr, bpc); \
 3397|      0|            dav1d_mc_dsp_init_##bd##bpc(&dsp->mc); \
 3398|      0|            dav1d_film_grain_dsp_init_##bd##bpc(&dsp->fg); \
 3399|      0|            break
 3400|      0|#if CONFIG_8BPC
 3401|  4.86k|        case 8:
  ------------------
  |  Branch (3401:9): [True: 4.86k, False: 6.93k]
  ------------------
 3402|  4.86k|            assign_bitdepth_case(8);
  ------------------
  |  | 3392|  4.86k|            dav1d_cdef_dsp_init_##bd##bpc(&dsp->cdef); \
  |  | 3393|  4.86k|            dav1d_intra_pred_dsp_init_##bd##bpc(&dsp->ipred); \
  |  | 3394|  4.86k|            dav1d_itx_dsp_init_##bd##bpc(&dsp->itx, bpc); \
  |  | 3395|  4.86k|            dav1d_loop_filter_dsp_init_##bd##bpc(&dsp->lf); \
  |  | 3396|  4.86k|            dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr, bpc); \
  |  | 3397|  4.86k|            dav1d_mc_dsp_init_##bd##bpc(&dsp->mc); \
  |  | 3398|  4.86k|            dav1d_film_grain_dsp_init_##bd##bpc(&dsp->fg); \
  |  | 3399|  4.86k|            break
  ------------------
 3403|      0|#endif
 3404|      0|#if CONFIG_16BPC
 3405|  3.87k|        case 10:
  ------------------
  |  Branch (3405:9): [True: 3.87k, False: 7.91k]
  ------------------
 3406|  6.93k|        case 12:
  ------------------
  |  Branch (3406:9): [True: 3.05k, False: 8.73k]
  ------------------
 3407|  6.93k|            assign_bitdepth_case(16);
  ------------------
  |  | 3392|  6.93k|            dav1d_cdef_dsp_init_##bd##bpc(&dsp->cdef); \
  |  | 3393|  6.93k|            dav1d_intra_pred_dsp_init_##bd##bpc(&dsp->ipred); \
  |  | 3394|  6.93k|            dav1d_itx_dsp_init_##bd##bpc(&dsp->itx, bpc); \
  |  | 3395|  6.93k|            dav1d_loop_filter_dsp_init_##bd##bpc(&dsp->lf); \
  |  | 3396|  6.93k|            dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr, bpc); \
  |  | 3397|  6.93k|            dav1d_mc_dsp_init_##bd##bpc(&dsp->mc); \
  |  | 3398|  6.93k|            dav1d_film_grain_dsp_init_##bd##bpc(&dsp->fg); \
  |  | 3399|  6.93k|            break
  ------------------
 3408|      0|#endif
 3409|      0|#undef assign_bitdepth_case
 3410|      0|        default:
  ------------------
  |  Branch (3410:9): [True: 0, False: 11.7k]
  ------------------
 3411|      0|            dav1d_log(c, "Compiled without support for %d-bit decoding\n",
  ------------------
  |  |   39|      0|#define dav1d_log dav1d_log
  ------------------
 3412|      0|                    8 + 2 * f->seq_hdr->hbd);
 3413|      0|            res = DAV1D_ERR(ENOPROTOOPT);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3414|      0|            goto error;
 3415|  11.7k|        }
 3416|  11.7k|    }
 3417|       |
 3418|  17.2k|#define assign_bitdepth_case(bd) \
 3419|  17.2k|        f->bd_fn.recon_b_inter = dav1d_recon_b_inter_##bd##bpc; \
 3420|  17.2k|        f->bd_fn.recon_b_intra = dav1d_recon_b_intra_##bd##bpc; \
 3421|  17.2k|        f->bd_fn.filter_sbrow = dav1d_filter_sbrow_##bd##bpc; \
 3422|  17.2k|        f->bd_fn.filter_sbrow_deblock_cols = dav1d_filter_sbrow_deblock_cols_##bd##bpc; \
 3423|  17.2k|        f->bd_fn.filter_sbrow_deblock_rows = dav1d_filter_sbrow_deblock_rows_##bd##bpc; \
 3424|  17.2k|        f->bd_fn.filter_sbrow_cdef = dav1d_filter_sbrow_cdef_##bd##bpc; \
 3425|  17.2k|        f->bd_fn.filter_sbrow_resize = dav1d_filter_sbrow_resize_##bd##bpc; \
 3426|  17.2k|        f->bd_fn.filter_sbrow_lr = dav1d_filter_sbrow_lr_##bd##bpc; \
 3427|  17.2k|        f->bd_fn.backup_ipred_edge = dav1d_backup_ipred_edge_##bd##bpc; \
 3428|  17.2k|        f->bd_fn.read_coef_blocks = dav1d_read_coef_blocks_##bd##bpc; \
 3429|  17.2k|        f->bd_fn.copy_pal_block_y = dav1d_copy_pal_block_y_##bd##bpc; \
 3430|  17.2k|        f->bd_fn.copy_pal_block_uv = dav1d_copy_pal_block_uv_##bd##bpc; \
 3431|  17.2k|        f->bd_fn.read_pal_plane = dav1d_read_pal_plane_##bd##bpc; \
 3432|  17.2k|        f->bd_fn.read_pal_uv = dav1d_read_pal_uv_##bd##bpc
 3433|  17.2k|    if (!f->seq_hdr->hbd) {
  ------------------
  |  Branch (3433:9): [True: 7.62k, False: 9.61k]
  ------------------
 3434|  7.62k|#if CONFIG_8BPC
 3435|  7.62k|        assign_bitdepth_case(8);
  ------------------
  |  | 3419|  7.62k|        f->bd_fn.recon_b_inter = dav1d_recon_b_inter_##bd##bpc; \
  |  | 3420|  7.62k|        f->bd_fn.recon_b_intra = dav1d_recon_b_intra_##bd##bpc; \
  |  | 3421|  7.62k|        f->bd_fn.filter_sbrow = dav1d_filter_sbrow_##bd##bpc; \
  |  | 3422|  7.62k|        f->bd_fn.filter_sbrow_deblock_cols = dav1d_filter_sbrow_deblock_cols_##bd##bpc; \
  |  | 3423|  7.62k|        f->bd_fn.filter_sbrow_deblock_rows = dav1d_filter_sbrow_deblock_rows_##bd##bpc; \
  |  | 3424|  7.62k|        f->bd_fn.filter_sbrow_cdef = dav1d_filter_sbrow_cdef_##bd##bpc; \
  |  | 3425|  7.62k|        f->bd_fn.filter_sbrow_resize = dav1d_filter_sbrow_resize_##bd##bpc; \
  |  | 3426|  7.62k|        f->bd_fn.filter_sbrow_lr = dav1d_filter_sbrow_lr_##bd##bpc; \
  |  | 3427|  7.62k|        f->bd_fn.backup_ipred_edge = dav1d_backup_ipred_edge_##bd##bpc; \
  |  | 3428|  7.62k|        f->bd_fn.read_coef_blocks = dav1d_read_coef_blocks_##bd##bpc; \
  |  | 3429|  7.62k|        f->bd_fn.copy_pal_block_y = dav1d_copy_pal_block_y_##bd##bpc; \
  |  | 3430|  7.62k|        f->bd_fn.copy_pal_block_uv = dav1d_copy_pal_block_uv_##bd##bpc; \
  |  | 3431|  7.62k|        f->bd_fn.read_pal_plane = dav1d_read_pal_plane_##bd##bpc; \
  |  | 3432|  7.62k|        f->bd_fn.read_pal_uv = dav1d_read_pal_uv_##bd##bpc
  ------------------
 3436|  7.62k|#endif
 3437|  9.61k|    } else {
 3438|  9.61k|#if CONFIG_16BPC
 3439|  9.61k|        assign_bitdepth_case(16);
  ------------------
  |  | 3419|  9.61k|        f->bd_fn.recon_b_inter = dav1d_recon_b_inter_##bd##bpc; \
  |  | 3420|  9.61k|        f->bd_fn.recon_b_intra = dav1d_recon_b_intra_##bd##bpc; \
  |  | 3421|  9.61k|        f->bd_fn.filter_sbrow = dav1d_filter_sbrow_##bd##bpc; \
  |  | 3422|  9.61k|        f->bd_fn.filter_sbrow_deblock_cols = dav1d_filter_sbrow_deblock_cols_##bd##bpc; \
  |  | 3423|  9.61k|        f->bd_fn.filter_sbrow_deblock_rows = dav1d_filter_sbrow_deblock_rows_##bd##bpc; \
  |  | 3424|  9.61k|        f->bd_fn.filter_sbrow_cdef = dav1d_filter_sbrow_cdef_##bd##bpc; \
  |  | 3425|  9.61k|        f->bd_fn.filter_sbrow_resize = dav1d_filter_sbrow_resize_##bd##bpc; \
  |  | 3426|  9.61k|        f->bd_fn.filter_sbrow_lr = dav1d_filter_sbrow_lr_##bd##bpc; \
  |  | 3427|  9.61k|        f->bd_fn.backup_ipred_edge = dav1d_backup_ipred_edge_##bd##bpc; \
  |  | 3428|  9.61k|        f->bd_fn.read_coef_blocks = dav1d_read_coef_blocks_##bd##bpc; \
  |  | 3429|  9.61k|        f->bd_fn.copy_pal_block_y = dav1d_copy_pal_block_y_##bd##bpc; \
  |  | 3430|  9.61k|        f->bd_fn.copy_pal_block_uv = dav1d_copy_pal_block_uv_##bd##bpc; \
  |  | 3431|  9.61k|        f->bd_fn.read_pal_plane = dav1d_read_pal_plane_##bd##bpc; \
  |  | 3432|  9.61k|        f->bd_fn.read_pal_uv = dav1d_read_pal_uv_##bd##bpc
  ------------------
 3440|  9.61k|#endif
 3441|  9.61k|    }
 3442|  17.2k|#undef assign_bitdepth_case
 3443|       |
 3444|  17.2k|    int ref_coded_width[7];
 3445|  17.2k|    if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|  17.2k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.70k, False: 14.5k]
  |  |  ------------------
  ------------------
 3446|  2.70k|        if (f->frame_hdr->primary_ref_frame != DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  2.70k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (3446:13): [True: 2.22k, False: 472]
  ------------------
 3447|  2.22k|            const int pri_ref = f->frame_hdr->refidx[f->frame_hdr->primary_ref_frame];
 3448|  2.22k|            if (!c->refs[pri_ref].p.p.data[0]) {
  ------------------
  |  Branch (3448:17): [True: 1, False: 2.22k]
  ------------------
 3449|      1|                res = DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|      1|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3450|      1|                goto error;
 3451|      1|            }
 3452|  2.22k|        }
 3453|  21.4k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3453:25): [True: 18.7k, False: 2.67k]
  ------------------
 3454|  18.7k|            const int refidx = f->frame_hdr->refidx[i];
 3455|  18.7k|            if (!c->refs[refidx].p.p.data[0] ||
  ------------------
  |  Branch (3455:17): [True: 14, False: 18.7k]
  ------------------
 3456|  18.7k|                f->frame_hdr->width[0] * 2 < c->refs[refidx].p.p.p.w ||
  ------------------
  |  Branch (3456:17): [True: 2, False: 18.7k]
  ------------------
 3457|  18.7k|                f->frame_hdr->height * 2 < c->refs[refidx].p.p.p.h ||
  ------------------
  |  Branch (3457:17): [True: 2, False: 18.7k]
  ------------------
 3458|  18.7k|                f->frame_hdr->width[0] > c->refs[refidx].p.p.p.w * 16 ||
  ------------------
  |  Branch (3458:17): [True: 1, False: 18.7k]
  ------------------
 3459|  18.7k|                f->frame_hdr->height > c->refs[refidx].p.p.p.h * 16 ||
  ------------------
  |  Branch (3459:17): [True: 1, False: 18.7k]
  ------------------
 3460|  18.7k|                f->seq_hdr->layout != c->refs[refidx].p.p.p.layout ||
  ------------------
  |  Branch (3460:17): [True: 0, False: 18.7k]
  ------------------
 3461|  18.7k|                bpc != c->refs[refidx].p.p.p.bpc)
  ------------------
  |  Branch (3461:17): [True: 0, False: 18.7k]
  ------------------
 3462|     20|            {
 3463|     38|                for (int j = 0; j < i; j++)
  ------------------
  |  Branch (3463:33): [True: 18, False: 20]
  ------------------
 3464|     18|                    dav1d_thread_picture_unref(&f->refp[j]);
 3465|     20|                res = DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|     20|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3466|     20|                goto error;
 3467|     20|            }
 3468|  18.7k|            dav1d_thread_picture_ref(&f->refp[i], &c->refs[refidx].p);
 3469|  18.7k|            ref_coded_width[i] = c->refs[refidx].p.p.frame_hdr->width[0];
 3470|  18.7k|            if (f->frame_hdr->width[0] != c->refs[refidx].p.p.p.w ||
  ------------------
  |  Branch (3470:17): [True: 3.09k, False: 15.6k]
  ------------------
 3471|  15.6k|                f->frame_hdr->height != c->refs[refidx].p.p.p.h)
  ------------------
  |  Branch (3471:17): [True: 371, False: 15.3k]
  ------------------
 3472|  3.46k|            {
 3473|  3.46k|#define scale_fac(ref_sz, this_sz) \
 3474|  3.46k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
 3475|  3.46k|                f->svc[i][0].scale = scale_fac(c->refs[refidx].p.p.p.w,
  ------------------
  |  | 3474|  3.46k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3476|  3.46k|                                               f->frame_hdr->width[0]);
 3477|  3.46k|                f->svc[i][1].scale = scale_fac(c->refs[refidx].p.p.p.h,
  ------------------
  |  | 3474|  3.46k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3478|  3.46k|                                               f->frame_hdr->height);
 3479|  3.46k|                f->svc[i][0].step = (f->svc[i][0].scale + 8) >> 4;
 3480|  3.46k|                f->svc[i][1].step = (f->svc[i][1].scale + 8) >> 4;
 3481|  15.3k|            } else {
 3482|  15.3k|                f->svc[i][0].scale = f->svc[i][1].scale = 0;
 3483|  15.3k|            }
 3484|  18.7k|            f->gmv_warp_allowed[i] = f->frame_hdr->gmv[i].type > DAV1D_WM_TYPE_TRANSLATION &&
  ------------------
  |  Branch (3484:38): [True: 5.17k, False: 13.5k]
  ------------------
 3485|  5.17k|                                     !f->frame_hdr->force_integer_mv &&
  ------------------
  |  Branch (3485:38): [True: 4.28k, False: 890]
  ------------------
 3486|  4.28k|                                     !dav1d_get_shear_params(&f->frame_hdr->gmv[i]) &&
  ------------------
  |  Branch (3486:38): [True: 4.20k, False: 84]
  ------------------
 3487|  4.20k|                                     !f->svc[i][0].scale;
  ------------------
  |  Branch (3487:38): [True: 3.60k, False: 597]
  ------------------
 3488|  18.7k|        }
 3489|  2.69k|    }
 3490|       |
 3491|       |    // setup entropy
 3492|  17.2k|    if (f->frame_hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  17.2k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (3492:9): [True: 15.0k, False: 2.22k]
  ------------------
 3493|  15.0k|        dav1d_cdf_thread_init_static(&f->in_cdf, f->frame_hdr->quant.yac);
 3494|  15.0k|    } else {
 3495|  2.22k|        const int pri_ref = f->frame_hdr->refidx[f->frame_hdr->primary_ref_frame];
 3496|  2.22k|        dav1d_cdf_thread_ref(&f->in_cdf, &c->cdf[pri_ref]);
 3497|  2.22k|    }
 3498|  17.2k|    if (f->frame_hdr->refresh_context) {
  ------------------
  |  Branch (3498:9): [True: 4.78k, False: 12.4k]
  ------------------
 3499|  4.78k|        res = dav1d_cdf_thread_alloc(c, &f->out_cdf, c->n_fc > 1);
 3500|  4.78k|        if (res < 0) goto error;
  ------------------
  |  Branch (3500:13): [True: 0, False: 4.78k]
  ------------------
 3501|  4.78k|    }
 3502|       |
 3503|       |    // FIXME qsort so tiles are in order (for frame threading)
 3504|  17.2k|    if (f->n_tile_data_alloc < c->n_tile_data) {
  ------------------
  |  Branch (3504:9): [True: 11.7k, False: 5.46k]
  ------------------
 3505|  11.7k|        dav1d_free(f->tile);
  ------------------
  |  |  135|  11.7k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3506|  11.7k|        assert(c->n_tile_data < INT_MAX / (int)sizeof(*f->tile));
  ------------------
  |  |  140|  11.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 11.7k]
  |  |  |  Branch (140:68): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
 3507|  11.7k|        f->tile = dav1d_malloc(ALLOC_TILE, c->n_tile_data * sizeof(*f->tile));
  ------------------
  |  |  132|  11.7k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3508|  11.7k|        if (!f->tile) {
  ------------------
  |  Branch (3508:13): [True: 0, False: 11.7k]
  ------------------
 3509|      0|            f->n_tile_data_alloc = f->n_tile_data = 0;
 3510|      0|            res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3511|      0|            goto error;
 3512|      0|        }
 3513|  11.7k|        f->n_tile_data_alloc = c->n_tile_data;
 3514|  11.7k|    }
 3515|  17.2k|    memcpy(f->tile, c->tile, c->n_tile_data * sizeof(*f->tile));
 3516|  17.2k|    memset(c->tile, 0, c->n_tile_data * sizeof(*c->tile));
 3517|  17.2k|    f->n_tile_data = c->n_tile_data;
 3518|  17.2k|    c->n_tile_data = 0;
 3519|       |
 3520|       |    // allocate frame
 3521|  17.2k|    res = dav1d_thread_picture_alloc(c, f, bpc);
 3522|  17.2k|    if (res < 0) goto error;
  ------------------
  |  Branch (3522:9): [True: 0, False: 17.2k]
  ------------------
 3523|       |
 3524|  17.2k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (3524:9): [True: 2.05k, False: 15.1k]
  ------------------
 3525|  2.05k|        res = dav1d_picture_alloc_copy(c, &f->cur, f->frame_hdr->width[0], &f->sr_cur.p);
 3526|  2.05k|        if (res < 0) goto error;
  ------------------
  |  Branch (3526:13): [True: 0, False: 2.05k]
  ------------------
 3527|  15.1k|    } else {
 3528|  15.1k|        dav1d_picture_ref(&f->cur, &f->sr_cur.p);
 3529|  15.1k|    }
 3530|       |
 3531|  17.2k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (3531:9): [True: 2.05k, False: 15.1k]
  ------------------
 3532|  2.05k|        f->resize_step[0] = scale_fac(f->cur.p.w, f->sr_cur.p.p.w);
  ------------------
  |  | 3474|  2.05k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3533|  2.05k|        const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 3534|  2.05k|        const int in_cw = (f->cur.p.w + ss_hor) >> ss_hor;
 3535|  2.05k|        const int out_cw = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 3536|  2.05k|        f->resize_step[1] = scale_fac(in_cw, out_cw);
  ------------------
  |  | 3474|  2.05k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3537|  2.05k|#undef scale_fac
 3538|  2.05k|        f->resize_start[0] = get_upscale_x0(f->cur.p.w, f->sr_cur.p.p.w, f->resize_step[0]);
 3539|  2.05k|        f->resize_start[1] = get_upscale_x0(in_cw, out_cw, f->resize_step[1]);
 3540|  2.05k|    }
 3541|       |
 3542|       |    // move f->cur into output queue
 3543|  17.2k|    if (c->n_fc == 1) {
  ------------------
  |  Branch (3543:9): [True: 17.2k, False: 0]
  ------------------
 3544|  17.2k|        if (f->frame_hdr->show_frame || c->output_invisible_frames) {
  ------------------
  |  Branch (3544:13): [True: 15.2k, False: 2.02k]
  |  Branch (3544:41): [True: 0, False: 2.02k]
  ------------------
 3545|  15.2k|            dav1d_thread_picture_ref(&c->out, &f->sr_cur);
 3546|  15.2k|            c->event_flags |= dav1d_picture_get_event_flags(&f->sr_cur);
 3547|  15.2k|        }
 3548|  17.2k|    } else {
 3549|      0|        dav1d_thread_picture_ref(out_delayed, &f->sr_cur);
 3550|      0|    }
 3551|       |
 3552|  17.2k|    f->w4 = (f->frame_hdr->width[0] + 3) >> 2;
 3553|  17.2k|    f->h4 = (f->frame_hdr->height + 3) >> 2;
 3554|  17.2k|    f->bw = ((f->frame_hdr->width[0] + 7) >> 3) << 1;
 3555|  17.2k|    f->bh = ((f->frame_hdr->height + 7) >> 3) << 1;
 3556|  17.2k|    f->sb128w = (f->bw + 31) >> 5;
 3557|  17.2k|    f->sb128h = (f->bh + 31) >> 5;
 3558|  17.2k|    f->sb_shift = 4 + f->seq_hdr->sb128;
 3559|  17.2k|    f->sb_step = 16 << f->seq_hdr->sb128;
 3560|  17.2k|    f->sbh = (f->bh + f->sb_step - 1) >> f->sb_shift;
 3561|  17.2k|    f->b4_stride = (f->bw + 31) & ~31;
 3562|  17.2k|    f->bitdepth_max = (1 << f->cur.p.bpc) - 1;
 3563|  17.2k|    atomic_init(&f->task_thread.error, 0);
 3564|  17.2k|    const int uses_2pass = c->n_fc > 1;
 3565|  17.2k|    const int cols = f->frame_hdr->tiling.cols;
 3566|  17.2k|    const int rows = f->frame_hdr->tiling.rows;
 3567|  17.2k|    atomic_store(&f->task_thread.task_counter,
 3568|  17.2k|                 (cols * rows + f->sbh) << uses_2pass);
 3569|       |
 3570|       |    // ref_mvs
 3571|  17.2k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc) {
  ------------------
  |  |   36|  34.4k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.67k, False: 14.5k]
  |  |  ------------------
  ------------------
  |  Branch (3571:45): [True: 2.72k, False: 11.8k]
  ------------------
 3572|  5.40k|        f->mvs_ref = dav1d_ref_create_using_pool(c->refmvs_pool,
 3573|  5.40k|            sizeof(*f->mvs) * f->sb128h * 16 * (f->b4_stride >> 1));
 3574|  5.40k|        if (!f->mvs_ref) {
  ------------------
  |  Branch (3574:13): [True: 0, False: 5.40k]
  ------------------
 3575|      0|            res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3576|      0|            goto error;
 3577|      0|        }
 3578|  5.40k|        f->mvs = f->mvs_ref->data;
 3579|  5.40k|        if (!f->frame_hdr->allow_intrabc) {
  ------------------
  |  Branch (3579:13): [True: 2.67k, False: 2.72k]
  ------------------
 3580|  21.4k|            for (int i = 0; i < 7; i++)
  ------------------
  |  Branch (3580:29): [True: 18.7k, False: 2.67k]
  ------------------
 3581|  18.7k|                f->refpoc[i] = f->refp[i].p.frame_hdr->frame_offset;
 3582|  2.72k|        } else {
 3583|  2.72k|            memset(f->refpoc, 0, sizeof(f->refpoc));
 3584|  2.72k|        }
 3585|  5.40k|        if (f->frame_hdr->use_ref_frame_mvs) {
  ------------------
  |  Branch (3585:13): [True: 1.06k, False: 4.34k]
  ------------------
 3586|  8.48k|            for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3586:29): [True: 7.42k, False: 1.06k]
  ------------------
 3587|  7.42k|                const int refidx = f->frame_hdr->refidx[i];
 3588|  7.42k|                const int ref_w = ((ref_coded_width[i] + 7) >> 3) << 1;
 3589|  7.42k|                const int ref_h = ((f->refp[i].p.p.h + 7) >> 3) << 1;
 3590|  7.42k|                if (c->refs[refidx].refmvs != NULL &&
  ------------------
  |  Branch (3590:21): [True: 1.17k, False: 6.25k]
  ------------------
 3591|  1.17k|                    ref_w == f->bw && ref_h == f->bh)
  ------------------
  |  Branch (3591:21): [True: 1.12k, False: 53]
  |  Branch (3591:39): [True: 1.09k, False: 32]
  ------------------
 3592|  1.09k|                {
 3593|  1.09k|                    f->ref_mvs_ref[i] = c->refs[refidx].refmvs;
 3594|  1.09k|                    dav1d_ref_inc(f->ref_mvs_ref[i]);
 3595|  1.09k|                    f->ref_mvs[i] = c->refs[refidx].refmvs->data;
 3596|  6.33k|                } else {
 3597|  6.33k|                    f->ref_mvs[i] = NULL;
 3598|  6.33k|                    f->ref_mvs_ref[i] = NULL;
 3599|  6.33k|                }
 3600|  7.42k|                memcpy(f->refrefpoc[i], c->refs[refidx].refpoc,
 3601|  7.42k|                       sizeof(*f->refrefpoc));
 3602|  7.42k|            }
 3603|  4.34k|        } else {
 3604|  4.34k|            memset(f->ref_mvs_ref, 0, sizeof(f->ref_mvs_ref));
 3605|  4.34k|        }
 3606|  11.8k|    } else {
 3607|  11.8k|        f->mvs_ref = NULL;
 3608|  11.8k|        memset(f->ref_mvs_ref, 0, sizeof(f->ref_mvs_ref));
 3609|  11.8k|    }
 3610|       |
 3611|       |    // segmap
 3612|  17.2k|    if (f->frame_hdr->segmentation.enabled) {
  ------------------
  |  Branch (3612:9): [True: 5.81k, False: 11.4k]
  ------------------
 3613|       |        // By default, the previous segmentation map is not initialised.
 3614|  5.81k|        f->prev_segmap_ref = NULL;
 3615|  5.81k|        f->prev_segmap = NULL;
 3616|       |
 3617|       |        // We might need a previous frame's segmentation map. This
 3618|       |        // happens if there is either no update or a temporal update.
 3619|  5.81k|        if (f->frame_hdr->segmentation.temporal || !f->frame_hdr->segmentation.update_map) {
  ------------------
  |  Branch (3619:13): [True: 191, False: 5.62k]
  |  Branch (3619:52): [True: 366, False: 5.25k]
  ------------------
 3620|    557|            const int pri_ref = f->frame_hdr->primary_ref_frame;
 3621|    557|            assert(pri_ref != DAV1D_PRIMARY_REF_NONE);
  ------------------
  |  |  140|    557|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 557]
  |  |  |  Branch (140:68): [Folded, False: 557]
  |  |  ------------------
  ------------------
 3622|    557|            const int ref_w = ((ref_coded_width[pri_ref] + 7) >> 3) << 1;
 3623|    557|            const int ref_h = ((f->refp[pri_ref].p.p.h + 7) >> 3) << 1;
 3624|    557|            if (ref_w == f->bw && ref_h == f->bh) {
  ------------------
  |  Branch (3624:17): [True: 522, False: 35]
  |  Branch (3624:35): [True: 510, False: 12]
  ------------------
 3625|    510|                f->prev_segmap_ref = c->refs[f->frame_hdr->refidx[pri_ref]].segmap;
 3626|    510|                if (f->prev_segmap_ref) {
  ------------------
  |  Branch (3626:21): [True: 93, False: 417]
  ------------------
 3627|     93|                    dav1d_ref_inc(f->prev_segmap_ref);
 3628|     93|                    f->prev_segmap = f->prev_segmap_ref->data;
 3629|     93|                }
 3630|    510|            }
 3631|    557|        }
 3632|       |
 3633|  5.81k|        if (f->frame_hdr->segmentation.update_map) {
  ------------------
  |  Branch (3633:13): [True: 5.45k, False: 366]
  ------------------
 3634|       |            // We're updating an existing map, but need somewhere to
 3635|       |            // put the new values. Allocate them here (the data
 3636|       |            // actually gets set elsewhere)
 3637|  5.45k|            f->cur_segmap_ref = dav1d_ref_create_using_pool(c->segmap_pool,
 3638|  5.45k|                sizeof(*f->cur_segmap) * f->b4_stride * 32 * f->sb128h);
 3639|  5.45k|            if (!f->cur_segmap_ref) {
  ------------------
  |  Branch (3639:17): [True: 0, False: 5.45k]
  ------------------
 3640|      0|                dav1d_ref_dec(&f->prev_segmap_ref);
 3641|      0|                res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3642|      0|                goto error;
 3643|      0|            }
 3644|  5.45k|            f->cur_segmap = f->cur_segmap_ref->data;
 3645|  5.45k|        } else if (f->prev_segmap_ref) {
  ------------------
  |  Branch (3645:20): [True: 35, False: 331]
  ------------------
 3646|       |            // We're not updating an existing map, and we have a valid
 3647|       |            // reference. Use that.
 3648|     35|            f->cur_segmap_ref = f->prev_segmap_ref;
 3649|     35|            dav1d_ref_inc(f->cur_segmap_ref);
 3650|     35|            f->cur_segmap = f->prev_segmap_ref->data;
 3651|    331|        } else {
 3652|       |            // We need to make a new map. Allocate one here and zero it out.
 3653|    331|            const size_t segmap_size = sizeof(*f->cur_segmap) * f->b4_stride * 32 * f->sb128h;
 3654|    331|            f->cur_segmap_ref = dav1d_ref_create_using_pool(c->segmap_pool, segmap_size);
 3655|    331|            if (!f->cur_segmap_ref) {
  ------------------
  |  Branch (3655:17): [True: 0, False: 331]
  ------------------
 3656|      0|                res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3657|      0|                goto error;
 3658|      0|            }
 3659|    331|            f->cur_segmap = f->cur_segmap_ref->data;
 3660|    331|            memset(f->cur_segmap, 0, segmap_size);
 3661|    331|        }
 3662|  11.4k|    } else {
 3663|  11.4k|        f->cur_segmap = NULL;
 3664|  11.4k|        f->cur_segmap_ref = NULL;
 3665|  11.4k|        f->prev_segmap_ref = NULL;
 3666|  11.4k|    }
 3667|       |
 3668|       |    // update references etc.
 3669|  17.2k|    const unsigned refresh_frame_flags = f->frame_hdr->refresh_frame_flags;
 3670|   154k|    for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (3670:21): [True: 137k, False: 17.2k]
  ------------------
 3671|   137k|        if (refresh_frame_flags & (1 << i)) {
  ------------------
  |  Branch (3671:13): [True: 121k, False: 16.1k]
  ------------------
 3672|   121k|            if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (3672:17): [True: 27.1k, False: 94.4k]
  ------------------
 3673|  27.1k|                dav1d_thread_picture_unref(&c->refs[i].p);
 3674|   121k|            dav1d_thread_picture_ref(&c->refs[i].p, &f->sr_cur);
 3675|       |
 3676|   121k|            dav1d_cdf_thread_unref(&c->cdf[i]);
 3677|   121k|            if (f->frame_hdr->refresh_context) {
  ------------------
  |  Branch (3677:17): [True: 30.3k, False: 91.2k]
  ------------------
 3678|  30.3k|                dav1d_cdf_thread_ref(&c->cdf[i], &f->out_cdf);
 3679|  91.2k|            } else {
 3680|  91.2k|                dav1d_cdf_thread_ref(&c->cdf[i], &f->in_cdf);
 3681|  91.2k|            }
 3682|       |
 3683|   121k|            dav1d_ref_dec(&c->refs[i].segmap);
 3684|   121k|            c->refs[i].segmap = f->cur_segmap_ref;
 3685|   121k|            if (f->cur_segmap_ref)
  ------------------
  |  Branch (3685:17): [True: 41.4k, False: 80.1k]
  ------------------
 3686|  41.4k|                dav1d_ref_inc(f->cur_segmap_ref);
 3687|   121k|            dav1d_ref_dec(&c->refs[i].refmvs);
 3688|   121k|            if (!f->frame_hdr->allow_intrabc) {
  ------------------
  |  Branch (3688:17): [True: 100k, False: 21.5k]
  ------------------
 3689|   100k|                c->refs[i].refmvs = f->mvs_ref;
 3690|   100k|                if (f->mvs_ref)
  ------------------
  |  Branch (3690:21): [True: 7.22k, False: 92.8k]
  ------------------
 3691|  7.22k|                    dav1d_ref_inc(f->mvs_ref);
 3692|   100k|            }
 3693|   121k|            memcpy(c->refs[i].refpoc, f->refpoc, sizeof(f->refpoc));
 3694|   121k|        }
 3695|   137k|    }
 3696|       |
 3697|  17.2k|    if (c->n_fc == 1) {
  ------------------
  |  Branch (3697:9): [True: 17.2k, False: 0]
  ------------------
 3698|  17.2k|        if ((res = dav1d_decode_frame(f)) < 0) {
  ------------------
  |  Branch (3698:13): [True: 4.07k, False: 13.1k]
  ------------------
 3699|  4.07k|            dav1d_thread_picture_unref(&c->out);
 3700|  36.6k|            for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (3700:29): [True: 32.5k, False: 4.07k]
  ------------------
 3701|  32.5k|                if (refresh_frame_flags & (1 << i)) {
  ------------------
  |  Branch (3701:21): [True: 25.4k, False: 7.12k]
  ------------------
 3702|  25.4k|                    if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (3702:25): [True: 25.4k, False: 0]
  ------------------
 3703|  25.4k|                        dav1d_thread_picture_unref(&c->refs[i].p);
 3704|  25.4k|                    dav1d_cdf_thread_unref(&c->cdf[i]);
 3705|  25.4k|                    dav1d_ref_dec(&c->refs[i].segmap);
 3706|  25.4k|                    dav1d_ref_dec(&c->refs[i].refmvs);
 3707|  25.4k|                }
 3708|  32.5k|            }
 3709|  4.07k|            goto error;
 3710|  4.07k|        }
 3711|  17.2k|    } else {
 3712|      0|        dav1d_task_frame_init(f);
 3713|      0|        pthread_mutex_unlock(&c->task_thread.lock);
 3714|      0|    }
 3715|       |
 3716|  13.1k|    return 0;
 3717|  4.09k|error:
 3718|  4.09k|    atomic_init(&f->task_thread.error, 1);
 3719|  4.09k|    dav1d_cdf_thread_unref(&f->in_cdf);
 3720|  4.09k|    if (f->frame_hdr->refresh_context)
  ------------------
  |  Branch (3720:9): [True: 1.11k, False: 2.97k]
  ------------------
 3721|  1.11k|        dav1d_cdf_thread_unref(&f->out_cdf);
 3722|  32.7k|    for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3722:21): [True: 28.6k, False: 4.09k]
  ------------------
 3723|  28.6k|        if (f->refp[i].p.frame_hdr)
  ------------------
  |  Branch (3723:13): [True: 0, False: 28.6k]
  ------------------
 3724|      0|            dav1d_thread_picture_unref(&f->refp[i]);
 3725|  28.6k|        dav1d_ref_dec(&f->ref_mvs_ref[i]);
 3726|  28.6k|    }
 3727|  4.09k|    if (c->n_fc == 1)
  ------------------
  |  Branch (3727:9): [True: 4.09k, False: 0]
  ------------------
 3728|  4.09k|        dav1d_thread_picture_unref(&c->out);
 3729|      0|    else
 3730|      0|        dav1d_thread_picture_unref(out_delayed);
 3731|  4.09k|    dav1d_picture_unref_internal(&f->cur);
 3732|  4.09k|    dav1d_thread_picture_unref(&f->sr_cur);
 3733|  4.09k|    dav1d_ref_dec(&f->mvs_ref);
 3734|  4.09k|    dav1d_ref_dec(&f->seq_hdr_ref);
 3735|  4.09k|    dav1d_ref_dec(&f->frame_hdr_ref);
 3736|  4.09k|    dav1d_data_props_copy(&c->cached_error_props, &c->in.m);
 3737|       |
 3738|  4.09k|    for (int i = 0; i < f->n_tile_data; i++)
  ------------------
  |  Branch (3738:21): [True: 0, False: 4.09k]
  ------------------
 3739|      0|        dav1d_data_unref_internal(&f->tile[i].data);
 3740|  4.09k|    f->n_tile_data = 0;
 3741|       |
 3742|  4.09k|    if (c->n_fc > 1)
  ------------------
  |  Branch (3742:9): [True: 0, False: 4.09k]
  ------------------
 3743|      0|        pthread_mutex_unlock(&c->task_thread.lock);
 3744|       |
 3745|  4.09k|    return res;
 3746|  17.2k|}
decode.c:reset_context:
 2390|   145k|static void reset_context(BlockContext *const ctx, const int keyframe, const int pass) {
 2391|   145k|    memset(ctx->intra, keyframe, sizeof(ctx->intra));
 2392|   145k|    memset(ctx->uvmode, DC_PRED, sizeof(ctx->uvmode));
 2393|   145k|    if (keyframe)
  ------------------
  |  Branch (2393:9): [True: 138k, False: 7.06k]
  ------------------
 2394|   138k|        memset(ctx->mode, DC_PRED, sizeof(ctx->mode));
 2395|       |
 2396|   145k|    if (pass == 2) return;
  ------------------
  |  Branch (2396:9): [True: 0, False: 145k]
  ------------------
 2397|       |
 2398|   145k|    memset(ctx->partition, 0, sizeof(ctx->partition));
 2399|   145k|    memset(ctx->skip, 0, sizeof(ctx->skip));
 2400|   145k|    memset(ctx->skip_mode, 0, sizeof(ctx->skip_mode));
 2401|   145k|    memset(ctx->tx_lpf_y, 2, sizeof(ctx->tx_lpf_y));
 2402|   145k|    memset(ctx->tx_lpf_uv, 1, sizeof(ctx->tx_lpf_uv));
 2403|   145k|    memset(ctx->tx_intra, -1, sizeof(ctx->tx_intra));
 2404|   145k|    memset(ctx->tx, TX_64X64, sizeof(ctx->tx));
 2405|   145k|    if (!keyframe) {
  ------------------
  |  Branch (2405:9): [True: 7.06k, False: 138k]
  ------------------
 2406|  7.06k|        memset(ctx->ref, -1, sizeof(ctx->ref));
 2407|  7.06k|        memset(ctx->comp_type, 0, sizeof(ctx->comp_type));
 2408|  7.06k|        memset(ctx->mode, NEARESTMV, sizeof(ctx->mode));
 2409|  7.06k|    }
 2410|   145k|    memset(ctx->lcoef, 0x40, sizeof(ctx->lcoef));
 2411|   145k|    memset(ctx->ccoef, 0x40, sizeof(ctx->ccoef));
 2412|   145k|    memset(ctx->filter, DAV1D_N_SWITCHABLE_FILTERS, sizeof(ctx->filter));
 2413|   145k|    memset(ctx->seg_pred, 0, sizeof(ctx->seg_pred));
 2414|   145k|    memset(ctx->pal_sz, 0, sizeof(ctx->pal_sz));
 2415|   145k|}
decode.c:decode_sb:
 2119|  1.82M|{
 2120|  1.82M|    const Dav1dFrameContext *const f = t->f;
 2121|  1.82M|    Dav1dTileState *const ts = t->ts;
 2122|  1.82M|    const int hsz = 16 >> bl;
 2123|  1.82M|    const int have_h_split = f->bw > t->bx + hsz;
 2124|  1.82M|    const int have_v_split = f->bh > t->by + hsz;
 2125|       |
 2126|  1.82M|    if (!have_h_split && !have_v_split) {
  ------------------
  |  Branch (2126:9): [True: 147k, False: 1.67M]
  |  Branch (2126:26): [True: 14.7k, False: 132k]
  ------------------
 2127|  14.7k|        assert(bl < BL_8X8);
  ------------------
  |  |  140|  14.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 14.7k]
  |  |  |  Branch (140:68): [Folded, False: 14.7k]
  |  |  ------------------
  ------------------
 2128|  14.7k|        return decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0));
  ------------------
  |  |   51|  14.7k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
 2129|  14.7k|    }
 2130|       |
 2131|  1.80M|    uint16_t *pc;
 2132|  1.80M|    enum BlockPartition bp;
 2133|  1.80M|    int ctx, bx8, by8;
 2134|  1.80M|    if (t->frame_thread.pass != 2) {
  ------------------
  |  Branch (2134:9): [True: 1.80M, False: 0]
  ------------------
 2135|  1.80M|        if (0 && bl == BL_64X64)
  ------------------
  |  Branch (2135:13): [Folded, False: 1.80M]
  |  Branch (2135:18): [True: 0, False: 0]
  ------------------
 2136|      0|            printf("poc=%d,y=%d,x=%d,bl=%d,r=%d\n",
 2137|      0|                   f->frame_hdr->frame_offset, t->by, t->bx, bl, ts->msac.rng);
 2138|  1.80M|        bx8 = (t->bx & 31) >> 1;
 2139|  1.80M|        by8 = (t->by & 31) >> 1;
 2140|  1.80M|        ctx = get_partition_ctx(t->a, &t->l, bl, by8, bx8);
 2141|  1.80M|        pc = ts->cdf.m.partition[bl][ctx];
 2142|  1.80M|    }
 2143|       |
 2144|  1.80M|    if (have_h_split && have_v_split) {
  ------------------
  |  Branch (2144:9): [True: 1.67M, False: 132k]
  |  Branch (2144:25): [True: 1.47M, False: 198k]
  ------------------
 2145|  1.47M|        if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2145:13): [True: 0, False: 1.47M]
  ------------------
 2146|      0|            const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
 2147|      0|            bp = b->bl == bl ? b->bp : PARTITION_SPLIT;
  ------------------
  |  Branch (2147:18): [True: 0, False: 0]
  ------------------
 2148|  1.47M|        } else {
 2149|  1.47M|            bp = dav1d_msac_decode_symbol_adapt16(&ts->msac, pc,
  ------------------
  |  |   57|  1.47M|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 2150|  1.47M|                                                  dav1d_partition_type_count[bl]);
 2151|  1.47M|            if (f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I422 &&
  ------------------
  |  Branch (2151:17): [True: 2.60k, False: 1.47M]
  ------------------
 2152|  2.60k|                (bp == PARTITION_V || bp == PARTITION_V4 ||
  ------------------
  |  Branch (2152:18): [True: 29, False: 2.57k]
  |  Branch (2152:39): [True: 3, False: 2.57k]
  ------------------
 2153|  2.57k|                 bp == PARTITION_T_LEFT_SPLIT || bp == PARTITION_T_RIGHT_SPLIT))
  ------------------
  |  Branch (2153:18): [True: 3, False: 2.57k]
  |  Branch (2153:50): [True: 1, False: 2.57k]
  ------------------
 2154|     36|            {
 2155|     36|                return 1;
 2156|     36|            }
 2157|  1.47M|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.47M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.47M]
  |  |  ------------------
  |  |   35|  1.47M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.47M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2158|      0|                printf("poc=%d,y=%d,x=%d,bl=%d,ctx=%d,bp=%d: r=%d\n",
 2159|      0|                       f->frame_hdr->frame_offset, t->by, t->bx, bl, ctx, bp,
 2160|      0|                       ts->msac.rng);
 2161|  1.47M|        }
 2162|  1.47M|        const uint8_t *const b = dav1d_block_sizes[bl][bp];
 2163|       |
 2164|  1.47M|        switch (bp) {
 2165|   800k|        case PARTITION_NONE:
  ------------------
  |  Branch (2165:9): [True: 800k, False: 676k]
  ------------------
 2166|   800k|            if (decode_b(t, bl, b[0], PARTITION_NONE, node->o))
  ------------------
  |  Branch (2166:17): [True: 8, False: 800k]
  ------------------
 2167|      8|                return -1;
 2168|   800k|            break;
 2169|   800k|        case PARTITION_H:
  ------------------
  |  Branch (2169:9): [True: 108k, False: 1.36M]
  ------------------
 2170|   108k|            if (decode_b(t, bl, b[0], PARTITION_H, node->h[0]))
  ------------------
  |  Branch (2170:17): [True: 2, False: 108k]
  ------------------
 2171|      2|                return -1;
 2172|   108k|            t->by += hsz;
 2173|   108k|            if (decode_b(t, bl, b[0], PARTITION_H, node->h[1]))
  ------------------
  |  Branch (2173:17): [True: 3, False: 108k]
  ------------------
 2174|      3|                return -1;
 2175|   108k|            t->by -= hsz;
 2176|   108k|            break;
 2177|  75.5k|        case PARTITION_V:
  ------------------
  |  Branch (2177:9): [True: 75.5k, False: 1.40M]
  ------------------
 2178|  75.5k|            if (decode_b(t, bl, b[0], PARTITION_V, node->v[0]))
  ------------------
  |  Branch (2178:17): [True: 3, False: 75.4k]
  ------------------
 2179|      3|                return -1;
 2180|  75.4k|            t->bx += hsz;
 2181|  75.4k|            if (decode_b(t, bl, b[0], PARTITION_V, node->v[1]))
  ------------------
  |  Branch (2181:17): [True: 3, False: 75.4k]
  ------------------
 2182|      3|                return -1;
 2183|  75.4k|            t->bx -= hsz;
 2184|  75.4k|            break;
 2185|   360k|        case PARTITION_SPLIT:
  ------------------
  |  Branch (2185:9): [True: 360k, False: 1.11M]
  ------------------
 2186|   360k|            if (bl == BL_8X8) {
  ------------------
  |  Branch (2186:17): [True: 56.6k, False: 303k]
  ------------------
 2187|  56.6k|                const EdgeTip *const tip = (const EdgeTip *) node;
 2188|  56.6k|                assert(hsz == 1);
  ------------------
  |  |  140|  56.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 56.6k]
  |  |  |  Branch (140:68): [Folded, False: 56.6k]
  |  |  ------------------
  ------------------
 2189|  56.6k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, EDGE_ALL_TR_AND_BL))
  ------------------
  |  Branch (2189:21): [True: 1, False: 56.6k]
  ------------------
 2190|      1|                    return -1;
 2191|  56.6k|                const enum Filter2d tl_filter = t->tl_4x4_filter;
 2192|  56.6k|                t->bx++;
 2193|  56.6k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, tip->split[0]))
  ------------------
  |  Branch (2193:21): [True: 5, False: 56.6k]
  ------------------
 2194|      5|                    return -1;
 2195|  56.6k|                t->bx--;
 2196|  56.6k|                t->by++;
 2197|  56.6k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, tip->split[1]))
  ------------------
  |  Branch (2197:21): [True: 3, False: 56.6k]
  ------------------
 2198|      3|                    return -1;
 2199|  56.6k|                t->bx++;
 2200|  56.6k|                t->tl_4x4_filter = tl_filter;
 2201|  56.6k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, tip->split[2]))
  ------------------
  |  Branch (2201:21): [True: 1, False: 56.6k]
  ------------------
 2202|      1|                    return -1;
 2203|  56.6k|                t->bx--;
 2204|  56.6k|                t->by--;
 2205|  56.6k|#if ARCH_X86_64
 2206|  56.6k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (2206:21): [True: 0, False: 56.6k]
  ------------------
 2207|       |                    /* In 8-bit mode with 2-pass decoding the coefficient buffer
 2208|       |                     * can end up misaligned due to skips here. Work around
 2209|       |                     * the issue by explicitly realigning the buffer. */
 2210|      0|                    const int p = t->frame_thread.pass & 1;
 2211|      0|                    ts->frame_thread[p].cf =
 2212|      0|                        (void*)(((uintptr_t)ts->frame_thread[p].cf + 63) & ~63);
 2213|      0|                }
 2214|  56.6k|#endif
 2215|   303k|            } else {
 2216|   303k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0)))
  ------------------
  |  |   51|   303k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2216:21): [True: 29, False: 303k]
  ------------------
 2217|     29|                    return 1;
 2218|   303k|                t->bx += hsz;
 2219|   303k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 1)))
  ------------------
  |  |   51|   303k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2219:21): [True: 28, False: 303k]
  ------------------
 2220|     28|                    return 1;
 2221|   303k|                t->bx -= hsz;
 2222|   303k|                t->by += hsz;
 2223|   303k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 2)))
  ------------------
  |  |   51|   303k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2223:21): [True: 19, False: 303k]
  ------------------
 2224|     19|                    return 1;
 2225|   303k|                t->bx += hsz;
 2226|   303k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 3)))
  ------------------
  |  |   51|   303k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2226:21): [True: 17, False: 303k]
  ------------------
 2227|     17|                    return 1;
 2228|   303k|                t->bx -= hsz;
 2229|   303k|                t->by -= hsz;
 2230|   303k|            }
 2231|   360k|            break;
 2232|   360k|        case PARTITION_T_TOP_SPLIT: {
  ------------------
  |  Branch (2232:9): [True: 16.2k, False: 1.46M]
  ------------------
 2233|  16.2k|            if (decode_b(t, bl, b[0], PARTITION_T_TOP_SPLIT, EDGE_ALL_TR_AND_BL))
  ------------------
  |  Branch (2233:17): [True: 1, False: 16.2k]
  ------------------
 2234|      1|                return -1;
 2235|  16.2k|            t->bx += hsz;
 2236|  16.2k|            if (decode_b(t, bl, b[0], PARTITION_T_TOP_SPLIT, node->v[1]))
  ------------------
  |  Branch (2236:17): [True: 1, False: 16.2k]
  ------------------
 2237|      1|                return -1;
 2238|  16.2k|            t->bx -= hsz;
 2239|  16.2k|            t->by += hsz;
 2240|  16.2k|            if (decode_b(t, bl, b[1], PARTITION_T_TOP_SPLIT, node->h[1]))
  ------------------
  |  Branch (2240:17): [True: 1, False: 16.2k]
  ------------------
 2241|      1|                return -1;
 2242|  16.2k|            t->by -= hsz;
 2243|  16.2k|            break;
 2244|  16.2k|        }
 2245|  16.8k|        case PARTITION_T_BOTTOM_SPLIT: {
  ------------------
  |  Branch (2245:9): [True: 16.8k, False: 1.46M]
  ------------------
 2246|  16.8k|            if (decode_b(t, bl, b[0], PARTITION_T_BOTTOM_SPLIT, node->h[0]))
  ------------------
  |  Branch (2246:17): [True: 1, False: 16.8k]
  ------------------
 2247|      1|                return -1;
 2248|  16.8k|            t->by += hsz;
 2249|  16.8k|            if (decode_b(t, bl, b[1], PARTITION_T_BOTTOM_SPLIT, node->v[0]))
  ------------------
  |  Branch (2249:17): [True: 1, False: 16.8k]
  ------------------
 2250|      1|                return -1;
 2251|  16.8k|            t->bx += hsz;
 2252|  16.8k|            if (decode_b(t, bl, b[1], PARTITION_T_BOTTOM_SPLIT, 0))
  ------------------
  |  Branch (2252:17): [True: 1, False: 16.8k]
  ------------------
 2253|      1|                return -1;
 2254|  16.8k|            t->bx -= hsz;
 2255|  16.8k|            t->by -= hsz;
 2256|  16.8k|            break;
 2257|  16.8k|        }
 2258|  11.9k|        case PARTITION_T_LEFT_SPLIT: {
  ------------------
  |  Branch (2258:9): [True: 11.9k, False: 1.46M]
  ------------------
 2259|  11.9k|            if (decode_b(t, bl, b[0], PARTITION_T_LEFT_SPLIT, EDGE_ALL_TR_AND_BL))
  ------------------
  |  Branch (2259:17): [True: 1, False: 11.9k]
  ------------------
 2260|      1|                return -1;
 2261|  11.9k|            t->by += hsz;
 2262|  11.9k|            if (decode_b(t, bl, b[0], PARTITION_T_LEFT_SPLIT, node->h[1]))
  ------------------
  |  Branch (2262:17): [True: 1, False: 11.9k]
  ------------------
 2263|      1|                return -1;
 2264|  11.9k|            t->by -= hsz;
 2265|  11.9k|            t->bx += hsz;
 2266|  11.9k|            if (decode_b(t, bl, b[1], PARTITION_T_LEFT_SPLIT, node->v[1]))
  ------------------
  |  Branch (2266:17): [True: 1, False: 11.9k]
  ------------------
 2267|      1|                return -1;
 2268|  11.9k|            t->bx -= hsz;
 2269|  11.9k|            break;
 2270|  11.9k|        }
 2271|  15.1k|        case PARTITION_T_RIGHT_SPLIT: {
  ------------------
  |  Branch (2271:9): [True: 15.1k, False: 1.46M]
  ------------------
 2272|  15.1k|            if (decode_b(t, bl, b[0], PARTITION_T_RIGHT_SPLIT, node->v[0]))
  ------------------
  |  Branch (2272:17): [True: 1, False: 15.1k]
  ------------------
 2273|      1|                return -1;
 2274|  15.1k|            t->bx += hsz;
 2275|  15.1k|            if (decode_b(t, bl, b[1], PARTITION_T_RIGHT_SPLIT, node->h[0]))
  ------------------
  |  Branch (2275:17): [True: 1, False: 15.1k]
  ------------------
 2276|      1|                return -1;
 2277|  15.1k|            t->by += hsz;
 2278|  15.1k|            if (decode_b(t, bl, b[1], PARTITION_T_RIGHT_SPLIT, 0))
  ------------------
  |  Branch (2278:17): [True: 1, False: 15.1k]
  ------------------
 2279|      1|                return -1;
 2280|  15.1k|            t->by -= hsz;
 2281|  15.1k|            t->bx -= hsz;
 2282|  15.1k|            break;
 2283|  15.1k|        }
 2284|  36.4k|        case PARTITION_H4: {
  ------------------
  |  Branch (2284:9): [True: 36.4k, False: 1.44M]
  ------------------
 2285|  36.4k|            const EdgeBranch *const branch = (const EdgeBranch *) node;
 2286|  36.4k|            if (decode_b(t, bl, b[0], PARTITION_H4, node->h[0]))
  ------------------
  |  Branch (2286:17): [True: 1, False: 36.4k]
  ------------------
 2287|      1|                return -1;
 2288|  36.4k|            t->by += hsz >> 1;
 2289|  36.4k|            if (decode_b(t, bl, b[0], PARTITION_H4, branch->h4))
  ------------------
  |  Branch (2289:17): [True: 3, False: 36.4k]
  ------------------
 2290|      3|                return -1;
 2291|  36.4k|            t->by += hsz >> 1;
 2292|  36.4k|            if (decode_b(t, bl, b[0], PARTITION_H4, EDGE_ALL_LEFT_HAS_BOTTOM))
  ------------------
  |  Branch (2292:17): [True: 1, False: 36.4k]
  ------------------
 2293|      1|                return -1;
 2294|  36.4k|            t->by += hsz >> 1;
 2295|  36.4k|            if (t->by < f->bh)
  ------------------
  |  Branch (2295:17): [True: 34.4k, False: 1.97k]
  ------------------
 2296|  34.4k|                if (decode_b(t, bl, b[0], PARTITION_H4, node->h[1]))
  ------------------
  |  Branch (2296:21): [True: 1, False: 34.4k]
  ------------------
 2297|      1|                    return -1;
 2298|  36.4k|            t->by -= hsz * 3 >> 1;
 2299|  36.4k|            break;
 2300|  36.4k|        }
 2301|  36.1k|        case PARTITION_V4: {
  ------------------
  |  Branch (2301:9): [True: 36.1k, False: 1.44M]
  ------------------
 2302|  36.1k|            const EdgeBranch *const branch = (const EdgeBranch *) node;
 2303|  36.1k|            if (decode_b(t, bl, b[0], PARTITION_V4, node->v[0]))
  ------------------
  |  Branch (2303:17): [True: 3, False: 36.1k]
  ------------------
 2304|      3|                return -1;
 2305|  36.1k|            t->bx += hsz >> 1;
 2306|  36.1k|            if (decode_b(t, bl, b[0], PARTITION_V4, branch->v4))
  ------------------
  |  Branch (2306:17): [True: 2, False: 36.1k]
  ------------------
 2307|      2|                return -1;
 2308|  36.1k|            t->bx += hsz >> 1;
 2309|  36.1k|            if (decode_b(t, bl, b[0], PARTITION_V4, EDGE_ALL_TOP_HAS_RIGHT))
  ------------------
  |  Branch (2309:17): [True: 1, False: 36.1k]
  ------------------
 2310|      1|                return -1;
 2311|  36.1k|            t->bx += hsz >> 1;
 2312|  36.1k|            if (t->bx < f->bw)
  ------------------
  |  Branch (2312:17): [True: 33.1k, False: 3.01k]
  ------------------
 2313|  33.1k|                if (decode_b(t, bl, b[0], PARTITION_V4, node->v[1]))
  ------------------
  |  Branch (2313:21): [True: 2, False: 33.1k]
  ------------------
 2314|      2|                    return -1;
 2315|  36.1k|            t->bx -= hsz * 3 >> 1;
 2316|  36.1k|            break;
 2317|  36.1k|        }
 2318|      0|        default: assert(0);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2318:9): [True: 0, False: 1.47M]
  ------------------
 2319|  1.47M|        }
 2320|  1.47M|    } else if (have_h_split) {
  ------------------
  |  Branch (2320:16): [True: 198k, False: 132k]
  ------------------
 2321|   198k|        unsigned is_split;
 2322|   198k|        if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2322:13): [True: 0, False: 198k]
  ------------------
 2323|      0|            const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
 2324|      0|            is_split = b->bl != bl;
 2325|   198k|        } else {
 2326|   198k|            is_split = dav1d_msac_decode_bool(&ts->msac,
  ------------------
  |  |   54|   198k|#define dav1d_msac_decode_bool           dav1d_msac_decode_bool_sse2
  ------------------
 2327|   198k|                           gather_top_partition_prob(pc, bl));
 2328|   198k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   198k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 198k]
  |  |  ------------------
  |  |   35|   198k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   198k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2329|      0|                printf("poc=%d,y=%d,x=%d,bl=%d,ctx=%d,bp=%d: r=%d\n",
 2330|      0|                       f->frame_hdr->frame_offset, t->by, t->bx, bl, ctx,
 2331|      0|                       is_split ? PARTITION_SPLIT : PARTITION_H, ts->msac.rng);
  ------------------
  |  Branch (2331:24): [True: 0, False: 0]
  ------------------
 2332|   198k|        }
 2333|       |
 2334|   198k|        assert(bl < BL_8X8);
  ------------------
  |  |  140|   198k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 198k]
  |  |  |  Branch (140:68): [Folded, False: 198k]
  |  |  ------------------
  ------------------
 2335|   198k|        if (is_split) {
  ------------------
  |  Branch (2335:13): [True: 118k, False: 80.8k]
  ------------------
 2336|   118k|            bp = PARTITION_SPLIT;
 2337|   118k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0))) return 1;
  ------------------
  |  |   51|   118k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2337:17): [True: 48, False: 118k]
  ------------------
 2338|   118k|            t->bx += hsz;
 2339|   118k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 1))) return 1;
  ------------------
  |  |   51|   118k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2339:17): [True: 51, False: 117k]
  ------------------
 2340|   117k|            t->bx -= hsz;
 2341|   117k|        } else {
 2342|  80.8k|            bp = PARTITION_H;
 2343|  80.8k|            if (decode_b(t, bl, dav1d_block_sizes[bl][PARTITION_H][0],
  ------------------
  |  Branch (2343:17): [True: 2, False: 80.8k]
  ------------------
 2344|  80.8k|                         PARTITION_H, node->h[0]))
 2345|      2|                return -1;
 2346|  80.8k|        }
 2347|   198k|    } else {
 2348|   132k|        assert(have_v_split);
  ------------------
  |  |  140|   132k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 132k]
  |  |  |  Branch (140:68): [Folded, False: 132k]
  |  |  ------------------
  ------------------
 2349|   132k|        unsigned is_split;
 2350|   132k|        if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2350:13): [True: 0, False: 132k]
  ------------------
 2351|      0|            const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
 2352|      0|            is_split = b->bl != bl;
 2353|   132k|        } else {
 2354|   132k|            is_split = dav1d_msac_decode_bool(&ts->msac,
  ------------------
  |  |   54|   132k|#define dav1d_msac_decode_bool           dav1d_msac_decode_bool_sse2
  ------------------
 2355|   132k|                           gather_left_partition_prob(pc, bl));
 2356|   132k|            if (f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I422 && !is_split)
  ------------------
  |  Branch (2356:17): [True: 106, False: 132k]
  |  Branch (2356:63): [True: 9, False: 97]
  ------------------
 2357|      9|                return 1;
 2358|   132k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   132k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 132k]
  |  |  ------------------
  |  |   35|   132k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   132k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2359|      0|                printf("poc=%d,y=%d,x=%d,bl=%d,ctx=%d,bp=%d: r=%d\n",
 2360|      0|                       f->frame_hdr->frame_offset, t->by, t->bx, bl, ctx,
 2361|      0|                       is_split ? PARTITION_SPLIT : PARTITION_V, ts->msac.rng);
  ------------------
  |  Branch (2361:24): [True: 0, False: 0]
  ------------------
 2362|   132k|        }
 2363|       |
 2364|   132k|        assert(bl < BL_8X8);
  ------------------
  |  |  140|   132k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 132k]
  |  |  |  Branch (140:68): [Folded, False: 132k]
  |  |  ------------------
  ------------------
 2365|   132k|        if (is_split) {
  ------------------
  |  Branch (2365:13): [True: 69.5k, False: 62.7k]
  ------------------
 2366|  69.5k|            bp = PARTITION_SPLIT;
 2367|  69.5k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0))) return 1;
  ------------------
  |  |   51|  69.5k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2367:17): [True: 28, False: 69.4k]
  ------------------
 2368|  69.4k|            t->by += hsz;
 2369|  69.4k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 2))) return 1;
  ------------------
  |  |   51|  69.4k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2369:17): [True: 27, False: 69.4k]
  ------------------
 2370|  69.4k|            t->by -= hsz;
 2371|  69.4k|        } else {
 2372|  62.7k|            bp = PARTITION_V;
 2373|  62.7k|            if (decode_b(t, bl, dav1d_block_sizes[bl][PARTITION_V][0],
  ------------------
  |  Branch (2373:17): [True: 3, False: 62.7k]
  ------------------
 2374|  62.7k|                         PARTITION_V, node->v[0]))
 2375|      3|                return -1;
 2376|  62.7k|        }
 2377|   132k|    }
 2378|       |
 2379|  1.80M|    if (t->frame_thread.pass != 2 && (bp != PARTITION_SPLIT || bl == BL_8X8)) {
  ------------------
  |  Branch (2379:9): [True: 1.80M, False: 0]
  |  Branch (2379:39): [True: 1.26M, False: 547k]
  |  Branch (2379:64): [True: 56.6k, False: 491k]
  ------------------
 2380|  1.31M|#define set_ctx(rep_macro) \
 2381|  1.31M|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
 2382|  1.31M|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
 2383|  1.31M|        case_set_upto16(ulog2(hsz));
  ------------------
  |  |   80|  1.31M|    switch (var) { \
  |  |   81|   598k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 2381|   598k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|   598k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   598k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2382|   598k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|   598k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   598k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (81:5): [True: 598k, False: 718k]
  |  |  ------------------
  |  |   82|   393k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 2381|   393k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   393k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   393k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2382|   393k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   393k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   393k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 393k, False: 923k]
  |  |  ------------------
  |  |   83|   185k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 2381|   185k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|   185k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   185k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2382|   185k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|   185k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   185k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (83:5): [True: 185k, False: 1.13M]
  |  |  ------------------
  |  |   84|   103k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 2381|   103k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|   103k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   103k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2382|   103k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|   103k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   103k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (84:5): [True: 103k, False: 1.21M]
  |  |  ------------------
  |  |   85|  35.9k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 2381|  35.9k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  35.9k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  35.9k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  35.9k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  35.9k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 35.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2382|  35.9k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  35.9k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  35.9k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  35.9k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  35.9k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 35.9k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (85:5): [True: 35.9k, False: 1.28M]
  |  |  ------------------
  |  |   86|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (86:5): [True: 0, False: 1.31M]
  |  |  ------------------
  |  |   87|  1.31M|    }
  ------------------
 2384|  1.31M|#undef set_ctx
 2385|  1.31M|    }
 2386|       |
 2387|  1.80M|    return 0;
 2388|  1.80M|}
decode.c:decode_b:
  687|  2.00M|                    const enum EdgeFlags intra_edge_flags) {
  688|  2.00M|    Dav1dTileState *const ts = t->ts;
  689|  2.00M|    const Dav1dFrameContext *const f = t->f;
  690|  2.00M|    Av1Block b_mem, *const b = t->frame_thread.pass ?
  ------------------
  |  Branch (690:32): [True: 0, False: 2.00M]
  ------------------
  691|  2.00M|        &f->frame_thread.b[t->by * f->b4_stride + t->bx] : &b_mem;
  692|  2.00M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  693|  2.00M|    const int bx4 = t->bx & 31, by4 = t->by & 31;
  694|  2.00M|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  695|  2.00M|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  696|  2.00M|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
  697|  2.00M|    const int bw4 = b_dim[0], bh4 = b_dim[1];
  698|  2.00M|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
  699|  2.00M|    const int cbw4 = (bw4 + ss_hor) >> ss_hor, cbh4 = (bh4 + ss_ver) >> ss_ver;
  700|  2.00M|    const int have_left = t->bx > ts->tiling.col_start;
  701|  2.00M|    const int have_top = t->by > ts->tiling.row_start;
  702|  2.00M|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (702:28): [True: 1.75M, False: 244k]
  ------------------
  703|  1.75M|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (703:29): [True: 1.66M, False: 89.6k]
  |  Branch (703:45): [True: 44.8k, False: 44.8k]
  ------------------
  704|  1.71M|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (704:29): [True: 1.65M, False: 62.3k]
  |  Branch (704:45): [True: 31.1k, False: 31.1k]
  ------------------
  705|       |
  706|  2.00M|    if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (706:9): [True: 0, False: 2.00M]
  ------------------
  707|      0|        if (b->intra) {
  ------------------
  |  Branch (707:13): [True: 0, False: 0]
  ------------------
  708|      0|            f->bd_fn.recon_b_intra(t, bs, intra_edge_flags, b);
  709|       |
  710|      0|            const enum IntraPredMode y_mode_nofilt =
  711|      0|                b->y_mode == FILTER_PRED ? DC_PRED : b->y_mode;
  ------------------
  |  Branch (711:17): [True: 0, False: 0]
  ------------------
  712|      0|#define set_ctx(rep_macro) \
  713|      0|            rep_macro(edge->mode, off, y_mode_nofilt); \
  714|      0|            rep_macro(edge->intra, off, 1)
  715|      0|            BlockContext *edge = t->a;
  716|      0|            for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (716:40): [True: 0, False: 0]
  ------------------
  717|      0|                case_set(b_dim[2 + i]);
  ------------------
  |  |   70|      0|    switch (var) { \
  |  |   71|      0|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  |  713|      0|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|      0|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  714|      0|            rep_macro(edge->intra, off, 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|      0|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  |  713|      0|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  714|      0|            rep_macro(edge->intra, off, 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   73|      0|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  |  713|      0|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|      0|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  714|      0|            rep_macro(edge->intra, off, 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|      0|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  |  713|      0|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|      0|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  714|      0|            rep_macro(edge->intra, off, 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|      0|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  |  713|      0|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|      0|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|      0|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  714|      0|            rep_macro(edge->intra, off, 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|      0|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|      0|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   76|      0|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  |  713|      0|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|      0|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|      0|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  714|      0|            rep_macro(edge->intra, off, 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|      0|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|      0|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   77|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (77:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   78|      0|    }
  ------------------
  718|      0|            }
  719|      0|#undef set_ctx
  720|      0|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|      0|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  721|      0|                refmvs_block *const r = &t->rt.r[(t->by & 31) + 5 + bh4 - 1][t->bx];
  722|      0|                for (int x = 0; x < bw4; x++) {
  ------------------
  |  Branch (722:33): [True: 0, False: 0]
  ------------------
  723|      0|                    r[x].ref.ref[0] = 0;
  724|      0|                    r[x].bs = bs;
  725|      0|                }
  726|      0|                refmvs_block *const *rr = &t->rt.r[(t->by & 31) + 5];
  727|      0|                for (int y = 0; y < bh4 - 1; y++) {
  ------------------
  |  Branch (727:33): [True: 0, False: 0]
  ------------------
  728|      0|                    rr[y][t->bx + bw4 - 1].ref.ref[0] = 0;
  729|      0|                    rr[y][t->bx + bw4 - 1].bs = bs;
  730|      0|                }
  731|      0|            }
  732|       |
  733|      0|            if (has_chroma) {
  ------------------
  |  Branch (733:17): [True: 0, False: 0]
  ------------------
  734|      0|                uint8_t uv_mode = b->uv_mode;
  735|      0|                dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], uv_mode);
  736|      0|                dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], uv_mode);
  737|      0|            }
  738|      0|        } else {
  739|      0|            if (IS_INTER_OR_SWITCH(f->frame_hdr) /* not intrabc */ &&
  ------------------
  |  |   36|      0|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  740|      0|                b->comp_type == COMP_INTER_NONE && b->motion_mode == MM_WARP)
  ------------------
  |  Branch (740:17): [True: 0, False: 0]
  |  Branch (740:52): [True: 0, False: 0]
  ------------------
  741|      0|            {
  742|      0|                if (b->matrix[0] == INT16_MIN) {
  ------------------
  |  Branch (742:21): [True: 0, False: 0]
  ------------------
  743|      0|                    t->warpmv.type = DAV1D_WM_TYPE_IDENTITY;
  744|      0|                } else {
  745|      0|                    t->warpmv.type = DAV1D_WM_TYPE_AFFINE;
  746|      0|                    t->warpmv.matrix[2] = b->matrix[0] + 0x10000;
  747|      0|                    t->warpmv.matrix[3] = b->matrix[1];
  748|      0|                    t->warpmv.matrix[4] = b->matrix[2];
  749|      0|                    t->warpmv.matrix[5] = b->matrix[3] + 0x10000;
  750|      0|                    dav1d_set_affine_mv2d(bw4, bh4, b->mv2d, &t->warpmv,
  751|      0|                                          t->bx, t->by);
  752|      0|                    dav1d_get_shear_params(&t->warpmv);
  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  754|      0|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|      0|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 0]
  |  |  ------------------
  |  |   35|      0|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|      0|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  755|      0|                        printf("[ %c%x %c%x %c%x\n  %c%x %c%x %c%x ]\n"
  756|      0|                               "alpha=%c%x, beta=%c%x, gamma=%c%x, delta=%c%x, mv=y:%d,x:%d\n",
  757|      0|                               signabs(t->warpmv.matrix[0]),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  758|      0|                               signabs(t->warpmv.matrix[1]),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  759|      0|                               signabs(t->warpmv.matrix[2]),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  760|      0|                               signabs(t->warpmv.matrix[3]),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  761|      0|                               signabs(t->warpmv.matrix[4]),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  762|      0|                               signabs(t->warpmv.matrix[5]),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  763|      0|                               signabs(t->warpmv.u.p.alpha),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  764|      0|                               signabs(t->warpmv.u.p.beta),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  765|      0|                               signabs(t->warpmv.u.p.gamma),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  766|      0|                               signabs(t->warpmv.u.p.delta),
  ------------------
  |  |  753|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (753:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  767|      0|                               b->mv2d.y, b->mv2d.x);
  768|      0|#undef signabs
  769|      0|                }
  770|      0|            }
  771|      0|            if (f->bd_fn.recon_b_inter(t, bs, b)) return -1;
  ------------------
  |  Branch (771:17): [True: 0, False: 0]
  ------------------
  772|       |
  773|      0|            const uint8_t *const filter = dav1d_filter_dir[b->filter2d];
  774|      0|            BlockContext *edge = t->a;
  775|      0|            for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (775:40): [True: 0, False: 0]
  ------------------
  776|      0|#define set_ctx(rep_macro) \
  777|      0|                rep_macro(edge->filter[0], off, filter[0]); \
  778|      0|                rep_macro(edge->filter[1], off, filter[1]); \
  779|      0|                rep_macro(edge->intra, off, 0)
  780|      0|                case_set(b_dim[2 + i]);
  ------------------
  |  |   70|      0|    switch (var) { \
  |  |   71|      0|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  |  777|      0|                rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|      0|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  778|      0|                rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|      0|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  779|      0|                rep_macro(edge->intra, off, 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|      0|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|      0|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   72|      0|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  |  777|      0|                rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  778|      0|                rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  779|      0|                rep_macro(edge->intra, off, 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   73|      0|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  |  777|      0|                rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|      0|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  778|      0|                rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|      0|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  779|      0|                rep_macro(edge->intra, off, 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|      0|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   74|      0|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  |  777|      0|                rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|      0|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  778|      0|                rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|      0|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  779|      0|                rep_macro(edge->intra, off, 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|      0|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|      0|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|      0|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  |  777|      0|                rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|      0|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|      0|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  778|      0|                rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|      0|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|      0|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  779|      0|                rep_macro(edge->intra, off, 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|      0|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|      0|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|      0|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   76|      0|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  |  777|      0|                rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|      0|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|      0|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  778|      0|                rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|      0|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|      0|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  779|      0|                rep_macro(edge->intra, off, 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|      0|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|      0|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   77|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (77:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   78|      0|    }
  ------------------
  781|      0|#undef set_ctx
  782|      0|            }
  783|       |
  784|      0|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|      0|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  785|      0|                refmvs_block *const r = &t->rt.r[(t->by & 31) + 5 + bh4 - 1][t->bx];
  786|      0|                for (int x = 0; x < bw4; x++) {
  ------------------
  |  Branch (786:33): [True: 0, False: 0]
  ------------------
  787|      0|                    r[x].ref.ref[0] = b->ref[0] + 1;
  788|      0|                    r[x].mv.mv[0] = b->mv[0];
  789|      0|                    r[x].bs = bs;
  790|      0|                }
  791|      0|                refmvs_block *const *rr = &t->rt.r[(t->by & 31) + 5];
  792|      0|                for (int y = 0; y < bh4 - 1; y++) {
  ------------------
  |  Branch (792:33): [True: 0, False: 0]
  ------------------
  793|      0|                    rr[y][t->bx + bw4 - 1].ref.ref[0] = b->ref[0] + 1;
  794|      0|                    rr[y][t->bx + bw4 - 1].mv.mv[0] = b->mv[0];
  795|      0|                    rr[y][t->bx + bw4 - 1].bs = bs;
  796|      0|                }
  797|      0|            }
  798|       |
  799|      0|            if (has_chroma) {
  ------------------
  |  Branch (799:17): [True: 0, False: 0]
  ------------------
  800|      0|                dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], DC_PRED);
  801|      0|                dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], DC_PRED);
  802|      0|            }
  803|      0|        }
  804|      0|        return 0;
  805|      0|    }
  806|       |
  807|  2.00M|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
  808|       |
  809|  2.00M|    b->bl = bl;
  810|  2.00M|    b->bp = bp;
  811|  2.00M|    b->bs = bs;
  812|       |
  813|  2.00M|    const Dav1dSegmentationData *seg = NULL;
  814|       |
  815|       |    // segment_id (if seg_feature for skip/ref/gmv is enabled)
  816|  2.00M|    int seg_pred = 0;
  817|  2.00M|    if (f->frame_hdr->segmentation.enabled) {
  ------------------
  |  Branch (817:9): [True: 491k, False: 1.51M]
  ------------------
  818|   491k|        if (!f->frame_hdr->segmentation.update_map) {
  ------------------
  |  Branch (818:13): [True: 13.0k, False: 478k]
  ------------------
  819|  13.0k|            if (f->prev_segmap) {
  ------------------
  |  Branch (819:17): [True: 388, False: 12.6k]
  ------------------
  820|    388|                unsigned seg_id = get_prev_frame_segid(f, t->by, t->bx, w4, h4,
  821|    388|                                                       f->prev_segmap,
  822|    388|                                                       f->b4_stride);
  823|    388|                if (seg_id >= 8) return -1;
  ------------------
  |  Branch (823:21): [True: 0, False: 388]
  ------------------
  824|    388|                b->seg_id = seg_id;
  825|  12.6k|            } else {
  826|  12.6k|                b->seg_id = 0;
  827|  12.6k|            }
  828|  13.0k|            seg = &f->frame_hdr->segmentation.seg_data.d[b->seg_id];
  829|   478k|        } else if (f->frame_hdr->segmentation.seg_data.preskip) {
  ------------------
  |  Branch (829:20): [True: 444k, False: 34.4k]
  ------------------
  830|   444k|            if (f->frame_hdr->segmentation.temporal &&
  ------------------
  |  Branch (830:17): [True: 1.35k, False: 442k]
  ------------------
  831|  1.35k|                (seg_pred = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.35k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (831:17): [True: 817, False: 541]
  ------------------
  832|  1.35k|                                ts->cdf.m.seg_pred[t->a->seg_pred[bx4] +
  833|  1.35k|                                t->l.seg_pred[by4]])))
  834|    817|            {
  835|       |                // temporal predicted seg_id
  836|    817|                if (f->prev_segmap) {
  ------------------
  |  Branch (836:21): [True: 193, False: 624]
  ------------------
  837|    193|                    unsigned seg_id = get_prev_frame_segid(f, t->by, t->bx,
  838|    193|                                                           w4, h4,
  839|    193|                                                           f->prev_segmap,
  840|    193|                                                           f->b4_stride);
  841|    193|                    if (seg_id >= 8) return -1;
  ------------------
  |  Branch (841:25): [True: 0, False: 193]
  ------------------
  842|    193|                    b->seg_id = seg_id;
  843|    624|                } else {
  844|    624|                    b->seg_id = 0;
  845|    624|                }
  846|   443k|            } else {
  847|   443k|                int seg_ctx;
  848|   443k|                const unsigned pred_seg_id =
  849|   443k|                    get_cur_frame_segid(t->by, t->bx, have_top, have_left,
  850|   443k|                                        &seg_ctx, f->cur_segmap, f->b4_stride);
  851|   443k|                const unsigned diff = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   443k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  852|   443k|                                          ts->cdf.m.seg_id[seg_ctx],
  853|   443k|                                          DAV1D_MAX_SEGMENTS - 1);
  ------------------
  |  |   43|   443k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  854|   443k|                const unsigned last_active_seg_id =
  855|   443k|                    f->frame_hdr->segmentation.seg_data.last_active_segid;
  856|   443k|                b->seg_id = neg_deinterleave(diff, pred_seg_id,
  857|   443k|                                             last_active_seg_id + 1);
  858|   443k|                if (b->seg_id > last_active_seg_id) b->seg_id = 0; // error?
  ------------------
  |  Branch (858:21): [True: 3.76k, False: 439k]
  ------------------
  859|   443k|                if (b->seg_id >= DAV1D_MAX_SEGMENTS) b->seg_id = 0; // error?
  ------------------
  |  |   43|   443k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (859:21): [True: 0, False: 443k]
  ------------------
  860|   443k|            }
  861|       |
  862|   444k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   444k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 444k]
  |  |  ------------------
  |  |   35|   444k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   444k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  863|      0|                printf("Post-segid[preskip;%d]: r=%d\n",
  864|      0|                       b->seg_id, ts->msac.rng);
  865|       |
  866|   444k|            seg = &f->frame_hdr->segmentation.seg_data.d[b->seg_id];
  867|   444k|        }
  868|  1.51M|    } else {
  869|  1.51M|        b->seg_id = 0;
  870|  1.51M|    }
  871|       |
  872|       |    // skip_mode
  873|  2.00M|    if ((!seg || (!seg->globalmv && seg->ref == -1 && !seg->skip)) &&
  ------------------
  |  Branch (873:10): [True: 1.54M, False: 457k]
  |  Branch (873:19): [True: 213k, False: 244k]
  |  Branch (873:37): [True: 85.5k, False: 127k]
  |  Branch (873:55): [True: 30.1k, False: 55.4k]
  ------------------
  874|  1.57M|        f->frame_hdr->skip_mode_enabled && imin(bw4, bh4) > 1)
  ------------------
  |  Branch (874:9): [True: 4.98k, False: 1.57M]
  |  Branch (874:44): [True: 3.03k, False: 1.94k]
  ------------------
  875|  3.03k|    {
  876|  3.03k|        const int smctx = t->a->skip_mode[bx4] + t->l.skip_mode[by4];
  877|  3.03k|        b->skip_mode = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  3.03k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  878|  3.03k|                           ts->cdf.m.skip_mode[smctx]);
  879|  3.03k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  3.03k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 3.03k]
  |  |  ------------------
  |  |   35|  3.03k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  3.03k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  880|      0|            printf("Post-skipmode[%d]: r=%d\n", b->skip_mode, ts->msac.rng);
  881|  2.00M|    } else {
  882|  2.00M|        b->skip_mode = 0;
  883|  2.00M|    }
  884|       |
  885|       |    // skip
  886|  2.00M|    if (b->skip_mode || (seg && seg->skip)) {
  ------------------
  |  Branch (886:9): [True: 503, False: 2.00M]
  |  Branch (886:26): [True: 457k, False: 1.54M]
  |  Branch (886:33): [True: 316k, False: 140k]
  ------------------
  887|   316k|        b->skip = 1;
  888|  1.68M|    } else {
  889|  1.68M|        const int sctx = t->a->skip[bx4] + t->l.skip[by4];
  890|  1.68M|        b->skip = dav1d_msac_decode_bool_adapt(&ts->msac, ts->cdf.m.skip[sctx]);
  ------------------
  |  |   52|  1.68M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  891|  1.68M|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.68M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.68M]
  |  |  ------------------
  |  |   35|  1.68M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.68M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  892|      0|            printf("Post-skip[%d]: r=%d\n", b->skip, ts->msac.rng);
  893|  1.68M|    }
  894|       |
  895|       |    // segment_id
  896|  2.00M|    if (f->frame_hdr->segmentation.enabled &&
  ------------------
  |  Branch (896:9): [True: 491k, False: 1.51M]
  ------------------
  897|   491k|        f->frame_hdr->segmentation.update_map &&
  ------------------
  |  Branch (897:9): [True: 478k, False: 13.0k]
  ------------------
  898|   478k|        !f->frame_hdr->segmentation.seg_data.preskip)
  ------------------
  |  Branch (898:9): [True: 34.4k, False: 444k]
  ------------------
  899|  34.4k|    {
  900|  34.4k|        if (!b->skip && f->frame_hdr->segmentation.temporal &&
  ------------------
  |  Branch (900:13): [True: 23.7k, False: 10.6k]
  |  Branch (900:25): [True: 1.36k, False: 22.3k]
  ------------------
  901|  1.36k|            (seg_pred = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.36k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (901:13): [True: 701, False: 666]
  ------------------
  902|  1.36k|                            ts->cdf.m.seg_pred[t->a->seg_pred[bx4] +
  903|  1.36k|                            t->l.seg_pred[by4]])))
  904|    701|        {
  905|       |            // temporal predicted seg_id
  906|    701|            if (f->prev_segmap) {
  ------------------
  |  Branch (906:17): [True: 347, False: 354]
  ------------------
  907|    347|                unsigned seg_id = get_prev_frame_segid(f, t->by, t->bx, w4, h4,
  908|    347|                                                       f->prev_segmap,
  909|    347|                                                       f->b4_stride);
  910|    347|                if (seg_id >= 8) return -1;
  ------------------
  |  Branch (910:21): [True: 0, False: 347]
  ------------------
  911|    347|                b->seg_id = seg_id;
  912|    354|            } else {
  913|    354|                b->seg_id = 0;
  914|    354|            }
  915|  33.7k|        } else {
  916|  33.7k|            int seg_ctx;
  917|  33.7k|            const unsigned pred_seg_id =
  918|  33.7k|                get_cur_frame_segid(t->by, t->bx, have_top, have_left,
  919|  33.7k|                                    &seg_ctx, f->cur_segmap, f->b4_stride);
  920|  33.7k|            if (b->skip) {
  ------------------
  |  Branch (920:17): [True: 10.6k, False: 23.0k]
  ------------------
  921|  10.6k|                b->seg_id = pred_seg_id;
  922|  23.0k|            } else {
  923|  23.0k|                const unsigned diff = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  23.0k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  924|  23.0k|                                          ts->cdf.m.seg_id[seg_ctx],
  925|  23.0k|                                          DAV1D_MAX_SEGMENTS - 1);
  ------------------
  |  |   43|  23.0k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  926|  23.0k|                const unsigned last_active_seg_id =
  927|  23.0k|                    f->frame_hdr->segmentation.seg_data.last_active_segid;
  928|  23.0k|                b->seg_id = neg_deinterleave(diff, pred_seg_id,
  929|  23.0k|                                             last_active_seg_id + 1);
  930|  23.0k|                if (b->seg_id > last_active_seg_id) b->seg_id = 0; // error?
  ------------------
  |  Branch (930:21): [True: 3.54k, False: 19.4k]
  ------------------
  931|  23.0k|            }
  932|  33.7k|            if (b->seg_id >= DAV1D_MAX_SEGMENTS) b->seg_id = 0; // error?
  ------------------
  |  |   43|  33.7k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (932:17): [True: 727, False: 32.9k]
  ------------------
  933|  33.7k|        }
  934|       |
  935|  34.4k|        seg = &f->frame_hdr->segmentation.seg_data.d[b->seg_id];
  936|       |
  937|  34.4k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  34.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 34.4k]
  |  |  ------------------
  |  |   35|  34.4k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  34.4k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  938|      0|            printf("Post-segid[postskip;%d]: r=%d\n",
  939|      0|                   b->seg_id, ts->msac.rng);
  940|  34.4k|    }
  941|       |
  942|       |    // cdef index
  943|  2.00M|    if (!b->skip) {
  ------------------
  |  Branch (943:9): [True: 1.21M, False: 787k]
  ------------------
  944|  1.21M|        const int idx = f->seq_hdr->sb128 ? ((t->bx & 16) >> 4) +
  ------------------
  |  Branch (944:25): [True: 373k, False: 843k]
  ------------------
  945|   843k|                                           ((t->by & 16) >> 3) : 0;
  946|  1.21M|        if (t->cur_sb_cdef_idx_ptr[idx] == -1) {
  ------------------
  |  Branch (946:13): [True: 148k, False: 1.06M]
  ------------------
  947|   148k|            const int v = dav1d_msac_decode_bools(&ts->msac,
  948|   148k|                              f->frame_hdr->cdef.n_bits);
  949|   148k|            t->cur_sb_cdef_idx_ptr[idx] = v;
  950|   148k|            if (bw4 > 16) t->cur_sb_cdef_idx_ptr[idx + 1] = v;
  ------------------
  |  Branch (950:17): [True: 16.1k, False: 132k]
  ------------------
  951|   148k|            if (bh4 > 16) t->cur_sb_cdef_idx_ptr[idx + 2] = v;
  ------------------
  |  Branch (951:17): [True: 16.6k, False: 132k]
  ------------------
  952|   148k|            if (bw4 == 32 && bh4 == 32) t->cur_sb_cdef_idx_ptr[idx + 3] = v;
  ------------------
  |  Branch (952:17): [True: 16.1k, False: 132k]
  |  Branch (952:30): [True: 12.8k, False: 3.25k]
  ------------------
  953|       |
  954|   148k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   148k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 148k]
  |  |  ------------------
  |  |   35|   148k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   148k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  955|      0|                printf("Post-cdef_idx[%d]: r=%d\n",
  956|      0|                        *t->cur_sb_cdef_idx_ptr, ts->msac.rng);
  957|   148k|        }
  958|  1.21M|    }
  959|       |
  960|       |    // delta-q/lf
  961|  2.00M|    if (!((t->bx | t->by) & (31 >> !f->seq_hdr->sb128))) {
  ------------------
  |  Branch (961:9): [True: 218k, False: 1.78M]
  ------------------
  962|   218k|        const int prev_qidx = ts->last_qidx;
  963|   218k|        const int have_delta_q = f->frame_hdr->delta.q.present &&
  ------------------
  |  Branch (963:34): [True: 82.3k, False: 135k]
  ------------------
  964|  82.3k|            (bs != (f->seq_hdr->sb128 ? BS_128x128 : BS_64x64) || !b->skip);
  ------------------
  |  Branch (964:14): [True: 55.7k, False: 26.5k]
  |  Branch (964:21): [True: 31.6k, False: 50.6k]
  |  Branch (964:67): [True: 7.23k, False: 19.2k]
  ------------------
  965|       |
  966|   218k|        uint32_t prev_delta_lf = ts->last_delta_lf.u32;
  967|       |
  968|   218k|        if (have_delta_q) {
  ------------------
  |  Branch (968:13): [True: 63.0k, False: 155k]
  ------------------
  969|  63.0k|            int delta_q = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  63.0k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  970|  63.0k|                                                          ts->cdf.m.delta_q, 3);
  971|  63.0k|            if (delta_q == 3) {
  ------------------
  |  Branch (971:17): [True: 5.00k, False: 58.0k]
  ------------------
  972|  5.00k|                const int n_bits = 1 + dav1d_msac_decode_bools(&ts->msac, 3);
  973|  5.00k|                delta_q = dav1d_msac_decode_bools(&ts->msac, n_bits) +
  974|  5.00k|                          1 + (1 << n_bits);
  975|  5.00k|            }
  976|  63.0k|            if (delta_q) {
  ------------------
  |  Branch (976:17): [True: 13.2k, False: 49.7k]
  ------------------
  977|  13.2k|                if (dav1d_msac_decode_bool_equi(&ts->msac)) delta_q = -delta_q;
  ------------------
  |  |   53|  13.2k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (977:21): [True: 8.24k, False: 5.03k]
  ------------------
  978|  13.2k|                delta_q *= 1 << f->frame_hdr->delta.q.res_log2;
  979|  13.2k|            }
  980|  63.0k|            ts->last_qidx = iclip(ts->last_qidx + delta_q, 1, 255);
  981|  63.0k|            if (have_delta_q && DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  63.0k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 63.0k]
  |  |  ------------------
  |  |   35|  63.0k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  63.0k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (981:17): [True: 63.0k, False: 0]
  ------------------
  982|      0|                printf("Post-delta_q[%d->%d]: r=%d\n",
  983|      0|                       delta_q, ts->last_qidx, ts->msac.rng);
  984|       |
  985|  63.0k|            if (f->frame_hdr->delta.lf.present) {
  ------------------
  |  Branch (985:17): [True: 30.4k, False: 32.5k]
  ------------------
  986|  30.4k|                const int n_lfs = f->frame_hdr->delta.lf.multi ?
  ------------------
  |  Branch (986:35): [True: 22.5k, False: 7.86k]
  ------------------
  987|  22.5k|                    f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 ? 4 : 2 : 1;
  ------------------
  |  Branch (987:21): [True: 21.1k, False: 1.42k]
  ------------------
  988|       |
  989|   125k|                for (int i = 0; i < n_lfs; i++) {
  ------------------
  |  Branch (989:33): [True: 95.3k, False: 30.4k]
  ------------------
  990|  95.3k|                    int delta_lf = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  95.3k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  991|  95.3k|                        ts->cdf.m.delta_lf[i + f->frame_hdr->delta.lf.multi], 3);
  992|  95.3k|                    if (delta_lf == 3) {
  ------------------
  |  Branch (992:25): [True: 3.95k, False: 91.3k]
  ------------------
  993|  3.95k|                        const int n_bits = 1 + dav1d_msac_decode_bools(&ts->msac, 3);
  994|  3.95k|                        delta_lf = dav1d_msac_decode_bools(&ts->msac, n_bits) +
  995|  3.95k|                                   1 + (1 << n_bits);
  996|  3.95k|                    }
  997|  95.3k|                    if (delta_lf) {
  ------------------
  |  Branch (997:25): [True: 16.5k, False: 78.7k]
  ------------------
  998|  16.5k|                        if (dav1d_msac_decode_bool_equi(&ts->msac))
  ------------------
  |  |   53|  16.5k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (998:29): [True: 9.45k, False: 7.12k]
  ------------------
  999|  9.45k|                            delta_lf = -delta_lf;
 1000|  16.5k|                        delta_lf *= 1 << f->frame_hdr->delta.lf.res_log2;
 1001|  16.5k|                    }
 1002|  95.3k|                    ts->last_delta_lf.i8[i] =
 1003|  95.3k|                        iclip(ts->last_delta_lf.i8[i] + delta_lf, -63, 63);
 1004|  95.3k|                    if (have_delta_q && DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  95.3k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 95.3k]
  |  |  ------------------
  |  |   35|  95.3k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  95.3k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1004:25): [True: 95.3k, False: 0]
  ------------------
 1005|      0|                        printf("Post-delta_lf[%d:%d]: r=%d\n", i, delta_lf,
 1006|      0|                               ts->msac.rng);
 1007|  95.3k|                }
 1008|  30.4k|            }
 1009|  63.0k|        }
 1010|   218k|        if (ts->last_qidx == f->frame_hdr->quant.yac) {
  ------------------
  |  Branch (1010:13): [True: 173k, False: 45.0k]
  ------------------
 1011|       |            // assign frame-wide q values to this sb
 1012|   173k|            ts->dq = f->dq;
 1013|   173k|        } else if (ts->last_qidx != prev_qidx) {
  ------------------
  |  Branch (1013:20): [True: 8.35k, False: 36.6k]
  ------------------
 1014|       |            // find sb-specific quant parameters
 1015|  8.35k|            init_quant_tables(f->seq_hdr, f->frame_hdr, ts->last_qidx, ts->dqmem);
 1016|  8.35k|            ts->dq = ts->dqmem;
 1017|  8.35k|        }
 1018|   218k|        if (!ts->last_delta_lf.u32) {
  ------------------
  |  Branch (1018:13): [True: 190k, False: 28.0k]
  ------------------
 1019|       |            // assign frame-wide lf values to this sb
 1020|   190k|            ts->lflvl = f->lf.lvl;
 1021|   190k|        } else if (ts->last_delta_lf.u32 != prev_delta_lf) {
  ------------------
  |  Branch (1021:20): [True: 10.7k, False: 17.2k]
  ------------------
 1022|       |            // find sb-specific lf lvl parameters
 1023|  10.7k|            ts->lflvl = ts->lflvlmem;
 1024|  10.7k|            dav1d_calc_lf_values(ts->lflvlmem, f->frame_hdr, ts->last_delta_lf.i8);
 1025|  10.7k|        }
 1026|   218k|    }
 1027|       |
 1028|  2.00M|    if (b->skip_mode) {
  ------------------
  |  Branch (1028:9): [True: 503, False: 2.00M]
  ------------------
 1029|    503|        b->intra = 0;
 1030|  2.00M|    } else if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|  2.00M|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 70.4k, False: 1.93M]
  |  |  ------------------
  ------------------
 1031|  70.4k|        if (seg && (seg->ref >= 0 || seg->globalmv)) {
  ------------------
  |  Branch (1031:13): [True: 29.1k, False: 41.2k]
  |  Branch (1031:21): [True: 4.90k, False: 24.2k]
  |  Branch (1031:38): [True: 3.97k, False: 20.3k]
  ------------------
 1032|  8.87k|            b->intra = !seg->ref;
 1033|  61.6k|        } else {
 1034|  61.6k|            const int ictx = get_intra_ctx(t->a, &t->l, by4, bx4,
 1035|  61.6k|                                           have_top, have_left);
 1036|  61.6k|            b->intra = !dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  61.6k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1037|  61.6k|                            ts->cdf.m.intra[ictx]);
 1038|  61.6k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  61.6k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 61.6k]
  |  |  ------------------
  |  |   35|  61.6k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  61.6k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1039|      0|                printf("Post-intra[%d]: r=%d\n", b->intra, ts->msac.rng);
 1040|  61.6k|        }
 1041|  1.93M|    } else if (f->frame_hdr->allow_intrabc) {
  ------------------
  |  Branch (1041:16): [True: 421k, False: 1.51M]
  ------------------
 1042|   421k|        b->intra = !dav1d_msac_decode_bool_adapt(&ts->msac, ts->cdf.m.intrabc);
  ------------------
  |  |   52|   421k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1043|   421k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   421k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 421k]
  |  |  ------------------
  |  |   35|   421k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   421k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1044|      0|            printf("Post-intrabcflag[%d]: r=%d\n", b->intra, ts->msac.rng);
 1045|  1.51M|    } else {
 1046|  1.51M|        b->intra = 1;
 1047|  1.51M|    }
 1048|       |
 1049|       |    // intra/inter-specific stuff
 1050|  2.00M|    if (b->intra) {
  ------------------
  |  Branch (1050:9): [True: 1.75M, False: 243k]
  ------------------
 1051|  1.75M|        uint16_t *const ymode_cdf = IS_INTER_OR_SWITCH(f->frame_hdr) ?
  ------------------
  |  |   36|  1.75M|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 5.75k, False: 1.75M]
  |  |  ------------------
  ------------------
 1052|  5.75k|            ts->cdf.m.y_mode[dav1d_ymode_size_context[bs]] :
 1053|  1.75M|            ts->cdf.kfym[dav1d_intra_mode_context[t->a->mode[bx4]]]
 1054|  1.75M|                        [dav1d_intra_mode_context[t->l.mode[by4]]];
 1055|  1.75M|        b->y_mode = dav1d_msac_decode_symbol_adapt16(&ts->msac, ymode_cdf,
  ------------------
  |  |   57|  1.75M|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1056|  1.75M|                                                     N_INTRA_PRED_MODES - 1);
 1057|  1.75M|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.75M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.75M]
  |  |  ------------------
  |  |   35|  1.75M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.75M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1058|      0|            printf("Post-ymode[%d]: r=%d\n", b->y_mode, ts->msac.rng);
 1059|       |
 1060|       |        // angle delta
 1061|  1.75M|        if (b_dim[2] + b_dim[3] >= 2 && b->y_mode >= VERT_PRED &&
  ------------------
  |  Branch (1061:13): [True: 1.47M, False: 282k]
  |  Branch (1061:41): [True: 623k, False: 854k]
  ------------------
 1062|   623k|            b->y_mode <= VERT_LEFT_PRED)
  ------------------
  |  Branch (1062:13): [True: 374k, False: 248k]
  ------------------
 1063|   374k|        {
 1064|   374k|            uint16_t *const acdf = ts->cdf.m.angle_delta[b->y_mode - VERT_PRED];
 1065|   374k|            const int angle = dav1d_msac_decode_symbol_adapt8(&ts->msac, acdf, 6);
  ------------------
  |  |   48|   374k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1066|   374k|            b->y_angle = angle - 3;
 1067|  1.38M|        } else {
 1068|  1.38M|            b->y_angle = 0;
 1069|  1.38M|        }
 1070|       |
 1071|  1.75M|        if (has_chroma) {
  ------------------
  |  Branch (1071:13): [True: 1.54M, False: 214k]
  ------------------
 1072|  1.54M|            const int cfl_allowed = f->frame_hdr->segmentation.lossless[b->seg_id] ?
  ------------------
  |  Branch (1072:37): [True: 9.06k, False: 1.53M]
  ------------------
 1073|  1.53M|                cbw4 == 1 && cbh4 == 1 : !!(cfl_allowed_mask & (1 << bs));
  ------------------
  |  Branch (1073:17): [True: 2.39k, False: 6.66k]
  |  Branch (1073:30): [True: 1.67k, False: 724]
  ------------------
 1074|  1.54M|            uint16_t *const uvmode_cdf = ts->cdf.m.uv_mode[cfl_allowed][b->y_mode];
 1075|  1.54M|            b->uv_mode = dav1d_msac_decode_symbol_adapt16(&ts->msac, uvmode_cdf,
  ------------------
  |  |   57|  1.54M|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1076|  1.54M|                             N_UV_INTRA_PRED_MODES - 1 - !cfl_allowed);
 1077|  1.54M|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.54M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.54M]
  |  |  ------------------
  |  |   35|  1.54M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.54M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1078|      0|                printf("Post-uvmode[%d]: r=%d\n", b->uv_mode, ts->msac.rng);
 1079|       |
 1080|  1.54M|            b->uv_angle = 0;
 1081|  1.54M|            if (b->uv_mode == CFL_PRED) {
  ------------------
  |  Branch (1081:17): [True: 230k, False: 1.31M]
  ------------------
 1082|   230k|#define SIGN(a) (!!(a) + ((a) > 0))
 1083|   230k|                const int sign = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   230k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1084|   230k|                                     ts->cdf.m.cfl_sign, 7) + 1;
 1085|   230k|                const int sign_u = sign * 0x56 >> 8, sign_v = sign - sign_u * 3;
 1086|   230k|                assert(sign_u == sign / 3);
  ------------------
  |  |  140|   230k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 230k]
  |  |  |  Branch (140:68): [Folded, False: 230k]
  |  |  ------------------
  ------------------
 1087|   230k|                if (sign_u) {
  ------------------
  |  Branch (1087:21): [True: 216k, False: 13.9k]
  ------------------
 1088|   216k|                    const int ctx = (sign_u == 2) * 3 + sign_v;
 1089|   216k|                    b->cfl_alpha[0] = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|   216k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1090|   216k|                                          ts->cdf.m.cfl_alpha[ctx], 15) + 1;
 1091|   216k|                    if (sign_u == 1) b->cfl_alpha[0] = -b->cfl_alpha[0];
  ------------------
  |  Branch (1091:25): [True: 147k, False: 69.0k]
  ------------------
 1092|   216k|                } else {
 1093|  13.9k|                    b->cfl_alpha[0] = 0;
 1094|  13.9k|                }
 1095|   230k|                if (sign_v) {
  ------------------
  |  Branch (1095:21): [True: 151k, False: 79.2k]
  ------------------
 1096|   151k|                    const int ctx = (sign_v == 2) * 3 + sign_u;
 1097|   151k|                    b->cfl_alpha[1] = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|   151k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1098|   151k|                                          ts->cdf.m.cfl_alpha[ctx], 15) + 1;
 1099|   151k|                    if (sign_v == 1) b->cfl_alpha[1] = -b->cfl_alpha[1];
  ------------------
  |  Branch (1099:25): [True: 66.9k, False: 84.2k]
  ------------------
 1100|   151k|                } else {
 1101|  79.2k|                    b->cfl_alpha[1] = 0;
 1102|  79.2k|                }
 1103|   230k|#undef SIGN
 1104|   230k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   230k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 230k]
  |  |  ------------------
  |  |   35|   230k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   230k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1105|      0|                    printf("Post-uvalphas[%d/%d]: r=%d\n",
 1106|      0|                           b->cfl_alpha[0], b->cfl_alpha[1], ts->msac.rng);
 1107|  1.31M|            } else if (b_dim[2] + b_dim[3] >= 2 && b->uv_mode >= VERT_PRED &&
  ------------------
  |  Branch (1107:24): [True: 1.16M, False: 152k]
  |  Branch (1107:52): [True: 432k, False: 729k]
  ------------------
 1108|   432k|                       b->uv_mode <= VERT_LEFT_PRED)
  ------------------
  |  Branch (1108:24): [True: 229k, False: 202k]
  ------------------
 1109|   229k|            {
 1110|   229k|                uint16_t *const acdf = ts->cdf.m.angle_delta[b->uv_mode - VERT_PRED];
 1111|   229k|                const int angle = dav1d_msac_decode_symbol_adapt8(&ts->msac, acdf, 6);
  ------------------
  |  |   48|   229k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1112|   229k|                b->uv_angle = angle - 3;
 1113|   229k|            }
 1114|  1.54M|        }
 1115|       |
 1116|  1.75M|        b->pal_sz[0] = b->pal_sz[1] = 0;
 1117|  1.75M|        if (f->frame_hdr->allow_screen_content_tools &&
  ------------------
  |  Branch (1117:13): [True: 413k, False: 1.34M]
  ------------------
 1118|   413k|            imax(bw4, bh4) <= 16 && bw4 + bh4 >= 4)
  ------------------
  |  Branch (1118:13): [True: 400k, False: 12.9k]
  |  Branch (1118:37): [True: 296k, False: 103k]
  ------------------
 1119|   296k|        {
 1120|   296k|            const int sz_ctx = b_dim[2] + b_dim[3] - 2;
 1121|   296k|            if (b->y_mode == DC_PRED) {
  ------------------
  |  Branch (1121:17): [True: 128k, False: 168k]
  ------------------
 1122|   128k|                const int pal_ctx = (t->a->pal_sz[bx4] > 0) + (t->l.pal_sz[by4] > 0);
 1123|   128k|                const int use_y_pal = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|   128k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1124|   128k|                                          ts->cdf.m.pal_y[sz_ctx][pal_ctx]);
 1125|   128k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   128k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 128k]
  |  |  ------------------
  |  |   35|   128k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   128k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1126|      0|                    printf("Post-y_pal[%d]: r=%d\n", use_y_pal, ts->msac.rng);
 1127|   128k|                if (use_y_pal)
  ------------------
  |  Branch (1127:21): [True: 12.2k, False: 115k]
  ------------------
 1128|  12.2k|                    f->bd_fn.read_pal_plane(t, b, 0, sz_ctx, bx4, by4);
 1129|   128k|            }
 1130|       |
 1131|   296k|            if (has_chroma && b->uv_mode == DC_PRED) {
  ------------------
  |  Branch (1131:17): [True: 228k, False: 68.4k]
  |  Branch (1131:31): [True: 69.5k, False: 158k]
  ------------------
 1132|  69.5k|                const int pal_ctx = b->pal_sz[0] > 0;
 1133|  69.5k|                const int use_uv_pal = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  69.5k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1134|  69.5k|                                           ts->cdf.m.pal_uv[pal_ctx]);
 1135|  69.5k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  69.5k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 69.5k]
  |  |  ------------------
  |  |   35|  69.5k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  69.5k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1136|      0|                    printf("Post-uv_pal[%d]: r=%d\n", use_uv_pal, ts->msac.rng);
 1137|  69.5k|                if (use_uv_pal) // see aomedia bug 2183 for why we use luma coordinates
  ------------------
  |  Branch (1137:21): [True: 3.96k, False: 65.5k]
  ------------------
 1138|  3.96k|                    f->bd_fn.read_pal_uv(t, b, sz_ctx, bx4, by4);
 1139|  69.5k|            }
 1140|   296k|        }
 1141|       |
 1142|  1.75M|        if (b->y_mode == DC_PRED && !b->pal_sz[0] &&
  ------------------
  |  Branch (1142:13): [True: 949k, False: 810k]
  |  Branch (1142:37): [True: 937k, False: 12.2k]
  ------------------
 1143|   937k|            imax(b_dim[2], b_dim[3]) <= 3 && f->seq_hdr->filter_intra)
  ------------------
  |  Branch (1143:13): [True: 854k, False: 82.8k]
  |  Branch (1143:46): [True: 599k, False: 254k]
  ------------------
 1144|   599k|        {
 1145|   599k|            const int is_filter = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|   599k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1146|   599k|                                      ts->cdf.m.use_filter_intra[bs]);
 1147|   599k|            if (is_filter) {
  ------------------
  |  Branch (1147:17): [True: 114k, False: 484k]
  ------------------
 1148|   114k|                b->y_mode = FILTER_PRED;
 1149|   114k|                b->y_angle = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   114k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1150|   114k|                                 ts->cdf.m.filter_intra, 4);
 1151|   114k|            }
 1152|   599k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   599k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 599k]
  |  |  ------------------
  |  |   35|   599k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   599k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1153|      0|                printf("Post-filterintramode[%d/%d]: r=%d\n",
 1154|      0|                       b->y_mode, b->y_angle, ts->msac.rng);
 1155|   599k|        }
 1156|       |
 1157|  1.75M|        if (b->pal_sz[0]) {
  ------------------
  |  Branch (1157:13): [True: 12.2k, False: 1.74M]
  ------------------
 1158|  12.2k|            uint8_t *pal_idx;
 1159|  12.2k|            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1159:17): [True: 0, False: 12.2k]
  ------------------
 1160|      0|                const int p = t->frame_thread.pass & 1;
 1161|      0|                assert(ts->frame_thread[p].pal_idx);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1162|      0|                pal_idx = ts->frame_thread[p].pal_idx;
 1163|      0|                ts->frame_thread[p].pal_idx += bw4 * bh4 * 8;
 1164|      0|            } else
 1165|  12.2k|                pal_idx = t->scratch.pal_idx_y;
 1166|  12.2k|            read_pal_indices(t, pal_idx, b->pal_sz[0], 0, w4, h4, bw4, bh4);
 1167|  12.2k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  12.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 12.2k]
  |  |  ------------------
  |  |   35|  12.2k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  12.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1168|      0|                printf("Post-y-pal-indices: r=%d\n", ts->msac.rng);
 1169|  12.2k|        }
 1170|       |
 1171|  1.75M|        if (has_chroma && b->pal_sz[1]) {
  ------------------
  |  Branch (1171:13): [True: 1.54M, False: 214k]
  |  Branch (1171:27): [True: 3.96k, False: 1.54M]
  ------------------
 1172|  3.96k|            uint8_t *pal_idx;
 1173|  3.96k|            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1173:17): [True: 0, False: 3.96k]
  ------------------
 1174|      0|                const int p = t->frame_thread.pass & 1;
 1175|      0|                assert(ts->frame_thread[p].pal_idx);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1176|      0|                pal_idx = ts->frame_thread[p].pal_idx;
 1177|      0|                ts->frame_thread[p].pal_idx += cbw4 * cbh4 * 8;
 1178|      0|            } else
 1179|  3.96k|                pal_idx = t->scratch.pal_idx_uv;
 1180|  3.96k|            read_pal_indices(t, pal_idx, b->pal_sz[1], 1, cw4, ch4, cbw4, cbh4);
 1181|  3.96k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  3.96k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 3.96k]
  |  |  ------------------
  |  |   35|  3.96k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  3.96k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1182|      0|                printf("Post-uv-pal-indices: r=%d\n", ts->msac.rng);
 1183|  3.96k|        }
 1184|       |
 1185|  1.75M|        const TxfmInfo *t_dim;
 1186|  1.75M|        if (f->frame_hdr->segmentation.lossless[b->seg_id]) {
  ------------------
  |  Branch (1186:13): [True: 17.1k, False: 1.74M]
  ------------------
 1187|  17.1k|            b->tx = b->uvtx = (int) TX_4X4;
 1188|  17.1k|            t_dim = &dav1d_txfm_dimensions[TX_4X4];
 1189|  1.74M|        } else {
 1190|  1.74M|            b->tx = dav1d_max_txfm_size_for_bs[bs][0];
 1191|  1.74M|            b->uvtx = dav1d_max_txfm_size_for_bs[bs][f->cur.p.layout];
 1192|  1.74M|            t_dim = &dav1d_txfm_dimensions[b->tx];
 1193|  1.74M|            if (f->frame_hdr->txfm_mode == DAV1D_TX_SWITCHABLE && t_dim->max > TX_4X4) {
  ------------------
  |  Branch (1193:17): [True: 851k, False: 890k]
  |  Branch (1193:67): [True: 811k, False: 39.8k]
  ------------------
 1194|   811k|                const int tctx = get_tx_ctx(t->a, &t->l, t_dim, by4, bx4);
 1195|   811k|                uint16_t *const tx_cdf = ts->cdf.m.txsz[t_dim->max - 1][tctx];
 1196|   811k|                int depth = dav1d_msac_decode_symbol_adapt4(&ts->msac, tx_cdf,
  ------------------
  |  |   47|   811k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1197|   811k|                                imin(t_dim->max, 2));
 1198|       |
 1199|  1.08M|                while (depth--) {
  ------------------
  |  Branch (1199:24): [True: 274k, False: 811k]
  ------------------
 1200|   274k|                    b->tx = t_dim->sub;
 1201|   274k|                    t_dim = &dav1d_txfm_dimensions[b->tx];
 1202|   274k|                }
 1203|   811k|            }
 1204|  1.74M|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.74M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.74M]
  |  |  ------------------
  |  |   35|  1.74M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.74M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1205|      0|                printf("Post-tx[%d]: r=%d\n", b->tx, ts->msac.rng);
 1206|  1.74M|        }
 1207|       |
 1208|       |        // reconstruction
 1209|  1.75M|        if (t->frame_thread.pass == 1) {
  ------------------
  |  Branch (1209:13): [True: 0, False: 1.75M]
  ------------------
 1210|      0|            f->bd_fn.read_coef_blocks(t, bs, b);
 1211|  1.75M|        } else {
 1212|  1.75M|            f->bd_fn.recon_b_intra(t, bs, intra_edge_flags, b);
 1213|  1.75M|        }
 1214|       |
 1215|  1.75M|        if (f->frame_hdr->loopfilter.level_y[0] ||
  ------------------
  |  Branch (1215:13): [True: 1.29M, False: 460k]
  ------------------
 1216|   460k|            f->frame_hdr->loopfilter.level_y[1])
  ------------------
  |  Branch (1216:13): [True: 147k, False: 313k]
  ------------------
 1217|  1.44M|        {
 1218|  1.44M|            dav1d_create_lf_mask_intra(t->lf_mask, f->lf.level, f->b4_stride,
 1219|  1.44M|                                       (const uint8_t (*)[8][2])
 1220|  1.44M|                                       &ts->lflvl[b->seg_id][0][0][0],
 1221|  1.44M|                                       t->bx, t->by, f->w4, f->h4, bs,
 1222|  1.44M|                                       b->tx, b->uvtx, f->cur.p.layout,
 1223|  1.44M|                                       &t->a->tx_lpf_y[bx4], &t->l.tx_lpf_y[by4],
 1224|  1.44M|                                       has_chroma ? &t->a->tx_lpf_uv[cbx4] : NULL,
  ------------------
  |  Branch (1224:40): [True: 1.32M, False: 123k]
  ------------------
 1225|  1.44M|                                       has_chroma ? &t->l.tx_lpf_uv[cby4] : NULL);
  ------------------
  |  Branch (1225:40): [True: 1.32M, False: 123k]
  ------------------
 1226|  1.44M|        }
 1227|       |        // update contexts
 1228|  1.75M|        const enum IntraPredMode y_mode_nofilt =
 1229|  1.75M|            b->y_mode == FILTER_PRED ? DC_PRED : b->y_mode;
  ------------------
  |  Branch (1229:13): [True: 114k, False: 1.64M]
  ------------------
 1230|  1.75M|        BlockContext *edge = t->a;
 1231|  5.27M|        for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (1231:36): [True: 3.51M, False: 1.75M]
  ------------------
 1232|  3.51M|            int t_lsz = ((uint8_t *) &t_dim->lw)[i]; // lw then lh
 1233|  3.51M|#define set_ctx(rep_macro) \
 1234|  3.51M|            rep_macro(edge->tx_intra, off, t_lsz); \
 1235|  3.51M|            rep_macro(edge->tx, off, t_lsz); \
 1236|  3.51M|            rep_macro(edge->mode, off, y_mode_nofilt); \
 1237|  3.51M|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
 1238|  3.51M|            rep_macro(edge->seg_pred, off, seg_pred); \
 1239|  3.51M|            rep_macro(edge->skip_mode, off, 0); \
 1240|  3.51M|            rep_macro(edge->intra, off, 1); \
 1241|  3.51M|            rep_macro(edge->skip, off, b->skip); \
 1242|       |            /* see aomedia bug 2183 for why we use luma coordinates here */ \
 1243|  3.51M|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
 1244|  3.51M|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
 1245|  3.51M|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
 1246|  3.51M|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
 1247|  3.51M|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
 1248|  3.51M|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
 1249|  3.51M|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
 1250|  3.51M|            }
 1251|  3.51M|            case_set(b_dim[2 + i]);
  ------------------
  |  |   70|  3.51M|    switch (var) { \
  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1234|   535k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1235|   535k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1236|   535k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   535k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   535k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   535k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   535k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   535k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   535k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   535k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1243|   535k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   535k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  1.07M|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (56:43): [True: 403k, False: 132k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   535k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   535k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 2.46k, False: 533k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1245|  2.46k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.46k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  2.46k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|  2.46k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.46k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  2.46k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  2.46k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.46k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  2.46k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  2.46k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.46k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  2.46k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  2.46k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  2.46k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  2.46k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  2.46k|            }
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 535k, False: 2.98M]
  |  |  ------------------
  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1234|  1.49M|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1235|  1.49M|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1236|  1.49M|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|  1.49M|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|  1.49M|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|  1.49M|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|  1.49M|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|  1.49M|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.49M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|  1.49M|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1243|  1.49M|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.49M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  2.99M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (58:45): [True: 1.39M, False: 98.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|  1.49M|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.49M|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 3.89k, False: 1.49M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1245|  3.89k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  3.89k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  3.89k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|  3.89k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  3.89k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  3.89k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  3.89k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  3.89k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  3.89k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  3.89k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  3.89k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  3.89k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  3.89k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  3.89k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  3.89k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  3.89k|            }
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 1.49M, False: 2.02M]
  |  |  ------------------
  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1234|   871k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1235|   871k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1236|   871k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   871k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   871k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   871k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   871k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   871k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   871k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   871k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1243|   871k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   871k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  1.74M|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (60:45): [True: 781k, False: 90.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   871k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   871k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 2.47k, False: 869k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1245|  2.47k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  2.47k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  2.47k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|  2.47k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  2.47k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  2.47k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  2.47k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  2.47k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  2.47k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  2.47k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  2.47k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  2.47k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  2.47k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  2.47k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  2.47k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  2.47k|            }
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 871k, False: 2.64M]
  |  |  ------------------
  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1234|   377k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1235|   377k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1236|   377k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   377k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   377k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   377k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   377k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   377k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   377k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   377k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1243|   377k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   377k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   755k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:45): [True: 340k, False: 37.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   377k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   377k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 1.45k, False: 376k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1245|  1.45k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.45k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.45k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|  1.45k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.45k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.45k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  1.45k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.45k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.45k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  1.45k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.45k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.45k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  1.45k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.45k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.45k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  1.45k|            }
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 377k, False: 3.14M]
  |  |  ------------------
  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1234|   185k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1235|   185k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1236|   185k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   185k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   185k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   185k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   185k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   185k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   185k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   185k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1243|   185k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   185k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   185k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   370k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (64:29): [True: 126k, False: 59.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|   185k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 185k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   185k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   185k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 870, False: 184k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1245|    870|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    870|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    870|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    870|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    870|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 870]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|    870|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    870|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    870|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    870|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    870|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 870]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|    870|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    870|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    870|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    870|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    870|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 870]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|    870|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    870|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    870|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    870|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    870|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 870]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|    870|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    870|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    870|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    870|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    870|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 870]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|    870|            }
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 185k, False: 3.33M]
  |  |  ------------------
  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1234|  52.1k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1235|  52.1k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1236|  52.1k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|  52.1k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|  52.1k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|  52.1k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|  52.1k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|  52.1k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  52.1k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|  52.1k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1243|  52.1k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  52.1k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  52.1k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|   104k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:29): [True: 39.2k, False: 12.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|  52.1k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 52.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|  52.1k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  52.1k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 348, False: 51.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1245|    348|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    348|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    348|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    348|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    348|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 348]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|    348|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    348|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    348|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    348|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    348|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 348]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|    348|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    348|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    348|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    348|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    348|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 348]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|    348|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    348|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    348|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    348|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    348|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 348]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|    348|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    348|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    348|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    348|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    348|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 348]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|    348|            }
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 52.1k, False: 3.46M]
  |  |  ------------------
  |  |   77|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (77:5): [True: 0, False: 3.51M]
  |  |  ------------------
  |  |   78|  3.51M|    }
  ------------------
 1252|  3.51M|#undef set_ctx
 1253|  3.51M|        }
 1254|  1.75M|        if (b->pal_sz[0])
  ------------------
  |  Branch (1254:13): [True: 12.2k, False: 1.74M]
  ------------------
 1255|  12.2k|            f->bd_fn.copy_pal_block_y(t, bx4, by4, bw4, bh4);
 1256|  1.75M|        if (has_chroma) {
  ------------------
  |  Branch (1256:13): [True: 1.54M, False: 214k]
  ------------------
 1257|  1.54M|            uint8_t uv_mode = b->uv_mode;
 1258|  1.54M|            dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], uv_mode);
 1259|  1.54M|            dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], uv_mode);
 1260|  1.54M|            if (b->pal_sz[1])
  ------------------
  |  Branch (1260:17): [True: 3.96k, False: 1.54M]
  ------------------
 1261|  3.96k|                f->bd_fn.copy_pal_block_uv(t, bx4, by4, bw4, bh4);
 1262|  1.54M|        }
 1263|  1.75M|        if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc)
  ------------------
  |  |   36|  3.51M|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 5.75k, False: 1.75M]
  |  |  ------------------
  ------------------
  |  Branch (1263:49): [True: 242k, False: 1.51M]
  ------------------
 1264|   248k|            splat_intraref(f->c, t, bs, bw4, bh4);
 1265|  1.75M|    } else if (IS_KEY_OR_INTRA(f->frame_hdr)) {
  ------------------
  |  |   43|   243k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|   243k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 178k, False: 65.2k]
  |  |  ------------------
  ------------------
 1266|       |        // intra block copy
 1267|   178k|        refmvs_candidate mvstack[8];
 1268|   178k|        int n_mvs, ctx;
 1269|   178k|        dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1270|   178k|                          (union refmvs_refpair) { .ref = { 0, -1 }},
 1271|   178k|                          bs, intra_edge_flags, t->by, t->bx);
 1272|       |
 1273|   178k|        if (mvstack[0].mv.mv[0].n)
  ------------------
  |  Branch (1273:13): [True: 163k, False: 15.0k]
  ------------------
 1274|   163k|            b->mv[0] = mvstack[0].mv.mv[0];
 1275|  15.0k|        else if (mvstack[1].mv.mv[0].n)
  ------------------
  |  Branch (1275:18): [True: 0, False: 15.0k]
  ------------------
 1276|      0|            b->mv[0] = mvstack[1].mv.mv[0];
 1277|  15.0k|        else {
 1278|  15.0k|            if (t->by - (16 << f->seq_hdr->sb128) < ts->tiling.row_start) {
  ------------------
  |  Branch (1278:17): [True: 10.7k, False: 4.27k]
  ------------------
 1279|  10.7k|                b->mv[0].y = 0;
 1280|  10.7k|                b->mv[0].x = -(512 << f->seq_hdr->sb128) - 2048;
 1281|  10.7k|            } else {
 1282|  4.27k|                b->mv[0].y = -(512 << f->seq_hdr->sb128);
 1283|  4.27k|                b->mv[0].x = 0;
 1284|  4.27k|            }
 1285|  15.0k|        }
 1286|       |
 1287|   178k|        const union mv ref = b->mv[0];
 1288|   178k|        read_mv_residual(ts, &b->mv[0], -1);
 1289|       |
 1290|       |        // clip intrabc motion vector to decoded parts of current tile
 1291|   178k|        int border_left = ts->tiling.col_start * 4;
 1292|   178k|        int border_top  = ts->tiling.row_start * 4;
 1293|   178k|        if (has_chroma) {
  ------------------
  |  Branch (1293:13): [True: 116k, False: 62.3k]
  ------------------
 1294|   116k|            if (bw4 < 2 &&  ss_hor)
  ------------------
  |  Branch (1294:17): [True: 55.3k, False: 60.9k]
  |  Branch (1294:29): [True: 10.8k, False: 44.5k]
  ------------------
 1295|  10.8k|                border_left += 4;
 1296|   116k|            if (bh4 < 2 &&  ss_ver)
  ------------------
  |  Branch (1296:17): [True: 54.0k, False: 62.2k]
  |  Branch (1296:29): [True: 10.9k, False: 43.1k]
  ------------------
 1297|  10.9k|                border_top  += 4;
 1298|   116k|        }
 1299|   178k|        int src_left   = t->bx * 4 + (b->mv[0].x >> 3);
 1300|   178k|        int src_top    = t->by * 4 + (b->mv[0].y >> 3);
 1301|   178k|        int src_right  = src_left + bw4 * 4;
 1302|   178k|        int src_bottom = src_top  + bh4 * 4;
 1303|   178k|        const int border_right = ((ts->tiling.col_end + (bw4 - 1)) & ~(bw4 - 1)) * 4;
 1304|       |
 1305|       |        // check against left or right tile boundary and adjust if necessary
 1306|   178k|        if (src_left < border_left) {
  ------------------
  |  Branch (1306:13): [True: 104k, False: 73.6k]
  ------------------
 1307|   104k|            src_right += border_left - src_left;
 1308|   104k|            src_left  += border_left - src_left;
 1309|   104k|        } else if (src_right > border_right) {
  ------------------
  |  Branch (1309:20): [True: 18.1k, False: 55.4k]
  ------------------
 1310|  18.1k|            src_left  -= src_right - border_right;
 1311|  18.1k|            src_right -= src_right - border_right;
 1312|  18.1k|        }
 1313|       |        // check against top tile boundary and adjust if necessary
 1314|   178k|        if (src_top < border_top) {
  ------------------
  |  Branch (1314:13): [True: 123k, False: 54.7k]
  ------------------
 1315|   123k|            src_bottom += border_top - src_top;
 1316|   123k|            src_top    += border_top - src_top;
 1317|   123k|        }
 1318|       |
 1319|   178k|        const int sbx = (t->bx >> (4 + f->seq_hdr->sb128)) << (6 + f->seq_hdr->sb128);
 1320|   178k|        const int sby = (t->by >> (4 + f->seq_hdr->sb128)) << (6 + f->seq_hdr->sb128);
 1321|   178k|        const int sb_size = 1 << (6 + f->seq_hdr->sb128);
 1322|       |        // check for overlap with current superblock
 1323|   178k|        if (src_bottom > sby && src_right > sbx) {
  ------------------
  |  Branch (1323:13): [True: 160k, False: 17.8k]
  |  Branch (1323:33): [True: 17.8k, False: 142k]
  ------------------
 1324|  17.8k|            if (src_top - border_top >= src_bottom - sby) {
  ------------------
  |  Branch (1324:17): [True: 2.53k, False: 15.3k]
  ------------------
 1325|       |                // if possible move src up into the previous suberblock row
 1326|  2.53k|                src_top    -= src_bottom - sby;
 1327|  2.53k|                src_bottom -= src_bottom - sby;
 1328|  15.3k|            } else if (src_left - border_left >= src_right - sbx) {
  ------------------
  |  Branch (1328:24): [True: 15.2k, False: 60]
  ------------------
 1329|       |                // if possible move src left into the previous suberblock
 1330|  15.2k|                src_left  -= src_right - sbx;
 1331|  15.2k|                src_right -= src_right - sbx;
 1332|  15.2k|            }
 1333|  17.8k|        }
 1334|       |        // move src up if it is below current superblock row
 1335|   178k|        if (src_bottom > sby + sb_size) {
  ------------------
  |  Branch (1335:13): [True: 1.87k, False: 176k]
  ------------------
 1336|  1.87k|            src_top    -= src_bottom - (sby + sb_size);
 1337|  1.87k|            src_bottom -= src_bottom - (sby + sb_size);
 1338|  1.87k|        }
 1339|       |        // error out if mv still overlaps with the current superblock
 1340|   178k|        if (src_bottom > sby && src_right > sbx)
  ------------------
  |  Branch (1340:13): [True: 158k, False: 20.3k]
  |  Branch (1340:33): [True: 60, False: 158k]
  ------------------
 1341|     60|            return -1;
 1342|       |
 1343|   178k|        b->mv[0].x = (src_left - t->bx * 4) * 8;
 1344|   178k|        b->mv[0].y = (src_top  - t->by * 4) * 8;
 1345|       |
 1346|   178k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   178k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 178k]
  |  |  ------------------
  |  |   35|   178k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   178k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1347|      0|            printf("Post-dmv[%d/%d,ref=%d/%d|%d/%d]: r=%d\n",
 1348|      0|                   b->mv[0].y, b->mv[0].x, ref.y, ref.x,
 1349|      0|                   mvstack[0].mv.mv[0].y, mvstack[0].mv.mv[0].x, ts->msac.rng);
 1350|   178k|        read_vartx_tree(t, b, bs, bx4, by4);
 1351|       |
 1352|       |        // reconstruction
 1353|   178k|        if (t->frame_thread.pass == 1) {
  ------------------
  |  Branch (1353:13): [True: 0, False: 178k]
  ------------------
 1354|      0|            f->bd_fn.read_coef_blocks(t, bs, b);
 1355|      0|            b->filter2d = FILTER_2D_BILINEAR;
 1356|   178k|        } else {
 1357|   178k|            if (f->bd_fn.recon_b_inter(t, bs, b)) return -1;
  ------------------
  |  Branch (1357:17): [True: 0, False: 178k]
  ------------------
 1358|   178k|        }
 1359|       |
 1360|   178k|        splat_intrabc_mv(f->c, t, bs, b, bw4, bh4);
 1361|   178k|        BlockContext *edge = t->a;
 1362|   535k|        for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (1362:36): [True: 357k, False: 178k]
  ------------------
 1363|   357k|#define set_ctx(rep_macro) \
 1364|   357k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
 1365|   357k|            rep_macro(edge->mode, off, DC_PRED); \
 1366|   357k|            rep_macro(edge->pal_sz, off, 0); \
 1367|       |            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
 1368|   357k|            rep_macro(t->pal_sz_uv[i], off, 0); \
 1369|   357k|            rep_macro(edge->seg_pred, off, seg_pred); \
 1370|   357k|            rep_macro(edge->skip_mode, off, 0); \
 1371|   357k|            rep_macro(edge->intra, off, 0); \
 1372|   357k|            rep_macro(edge->skip, off, b->skip)
 1373|   357k|            case_set(b_dim[2 + i]);
  ------------------
  |  |   70|   357k|    switch (var) { \
  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1364|   201k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1365|   201k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1366|   201k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|   201k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1368|   201k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|   201k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1370|   201k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|   201k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|   201k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   201k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   201k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 201k, False: 155k]
  |  |  ------------------
  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1364|  58.1k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1365|  58.1k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1366|  58.1k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  58.1k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1368|  58.1k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  58.1k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1370|  58.1k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  58.1k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  58.1k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  58.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  58.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 58.1k, False: 298k]
  |  |  ------------------
  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1364|  40.2k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1365|  40.2k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1366|  40.2k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  40.2k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1368|  40.2k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  40.2k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1370|  40.2k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  40.2k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  40.2k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  40.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  40.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 40.2k, False: 316k]
  |  |  ------------------
  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1364|  37.2k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1365|  37.2k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1366|  37.2k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  37.2k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1368|  37.2k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  37.2k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1370|  37.2k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  37.2k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  37.2k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  37.2k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  37.2k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 37.2k, False: 319k]
  |  |  ------------------
  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1364|  15.8k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1365|  15.8k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1366|  15.8k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  15.8k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1368|  15.8k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  15.8k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1370|  15.8k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  15.8k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  15.8k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  15.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  15.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  15.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  15.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 15.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 15.8k, False: 341k]
  |  |  ------------------
  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1364|  3.93k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1365|  3.93k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1366|  3.93k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  3.93k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1368|  3.93k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  3.93k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1370|  3.93k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  3.93k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  3.93k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  3.93k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  3.93k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  3.93k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  3.93k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 3.93k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 3.93k, False: 353k]
  |  |  ------------------
  |  |   77|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (77:5): [True: 0, False: 357k]
  |  |  ------------------
  |  |   78|   357k|    }
  ------------------
 1374|   357k|#undef set_ctx
 1375|   357k|        }
 1376|   178k|        if (has_chroma) {
  ------------------
  |  Branch (1376:13): [True: 116k, False: 62.2k]
  ------------------
 1377|   116k|            dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], DC_PRED);
 1378|   116k|            dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], DC_PRED);
 1379|   116k|        }
 1380|   178k|    } else {
 1381|       |        // inter-specific mode/mv coding
 1382|  65.2k|        int is_comp, has_subpel_filter;
 1383|       |
 1384|  65.2k|        if (b->skip_mode) {
  ------------------
  |  Branch (1384:13): [True: 503, False: 64.7k]
  ------------------
 1385|    503|            is_comp = 1;
 1386|  64.7k|        } else if ((!seg || (seg->ref == -1 && !seg->globalmv && !seg->skip)) &&
  ------------------
  |  Branch (1386:21): [True: 37.5k, False: 27.2k]
  |  Branch (1386:30): [True: 22.4k, False: 4.82k]
  |  Branch (1386:48): [True: 18.4k, False: 3.97k]
  |  Branch (1386:66): [True: 17.4k, False: 1.01k]
  ------------------
 1387|  54.9k|                   f->frame_hdr->switchable_comp_refs && imin(bw4, bh4) > 1)
  ------------------
  |  Branch (1387:20): [True: 35.7k, False: 19.1k]
  |  Branch (1387:58): [True: 22.7k, False: 13.0k]
  ------------------
 1388|  22.7k|        {
 1389|  22.7k|            const int ctx = get_comp_ctx(t->a, &t->l, by4, bx4,
 1390|  22.7k|                                         have_top, have_left);
 1391|  22.7k|            is_comp = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  22.7k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1392|  22.7k|                          ts->cdf.m.comp[ctx]);
 1393|  22.7k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  22.7k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 22.7k]
  |  |  ------------------
  |  |   35|  22.7k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  22.7k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1394|      0|                printf("Post-compflag[%d]: r=%d\n", is_comp, ts->msac.rng);
 1395|  41.9k|        } else {
 1396|  41.9k|            is_comp = 0;
 1397|  41.9k|        }
 1398|       |
 1399|  65.2k|        if (b->skip_mode) {
  ------------------
  |  Branch (1399:13): [True: 503, False: 64.7k]
  ------------------
 1400|    503|            b->ref[0] = f->frame_hdr->skip_mode_refs[0];
 1401|    503|            b->ref[1] = f->frame_hdr->skip_mode_refs[1];
 1402|    503|            b->comp_type = COMP_INTER_AVG;
 1403|    503|            b->inter_mode = NEARESTMV_NEARESTMV;
 1404|    503|            b->drl_idx = NEAREST_DRL;
 1405|    503|            has_subpel_filter = 0;
 1406|       |
 1407|    503|            refmvs_candidate mvstack[8];
 1408|    503|            int n_mvs, ctx;
 1409|    503|            dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1410|    503|                              (union refmvs_refpair) { .ref = {
 1411|    503|                                    b->ref[0] + 1, b->ref[1] + 1 }},
 1412|    503|                              bs, intra_edge_flags, t->by, t->bx);
 1413|       |
 1414|    503|            b->mv[0] = mvstack[0].mv.mv[0];
 1415|    503|            b->mv[1] = mvstack[0].mv.mv[1];
 1416|    503|            fix_mv_precision(f->frame_hdr, &b->mv[0]);
 1417|    503|            fix_mv_precision(f->frame_hdr, &b->mv[1]);
 1418|    503|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|    503|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 503]
  |  |  ------------------
  |  |   35|    503|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|    503|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1419|      0|                printf("Post-skipmodeblock[mv=1:y=%d,x=%d,2:y=%d,x=%d,refs=%d+%d\n",
 1420|      0|                       b->mv[0].y, b->mv[0].x, b->mv[1].y, b->mv[1].x,
 1421|      0|                       b->ref[0], b->ref[1]);
 1422|  64.7k|        } else if (is_comp) {
  ------------------
  |  Branch (1422:20): [True: 12.6k, False: 52.1k]
  ------------------
 1423|  12.6k|            const int dir_ctx = get_comp_dir_ctx(t->a, &t->l, by4, bx4,
 1424|  12.6k|                                                 have_top, have_left);
 1425|  12.6k|            if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  12.6k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1425:17): [True: 10.2k, False: 2.31k]
  ------------------
 1426|  12.6k|                    ts->cdf.m.comp_dir[dir_ctx]))
 1427|  10.2k|            {
 1428|       |                // bidir - first reference (fw)
 1429|  10.2k|                const int ctx1 = av1_get_fwd_ref_ctx(t->a, &t->l, by4, bx4,
 1430|  10.2k|                                                     have_top, have_left);
 1431|  10.2k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  10.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1431:21): [True: 3.72k, False: 6.56k]
  ------------------
 1432|  10.2k|                        ts->cdf.m.comp_fwd_ref[0][ctx1]))
 1433|  3.72k|                {
 1434|  3.72k|                    const int ctx2 = av1_get_fwd_ref_2_ctx(t->a, &t->l, by4, bx4,
 1435|  3.72k|                                                           have_top, have_left);
 1436|  3.72k|                    b->ref[0] = 2 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  3.72k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1437|  3.72k|                                        ts->cdf.m.comp_fwd_ref[2][ctx2]);
 1438|  6.56k|                } else {
 1439|  6.56k|                    const int ctx2 = av1_get_fwd_ref_1_ctx(t->a, &t->l, by4, bx4,
 1440|  6.56k|                                                           have_top, have_left);
 1441|  6.56k|                    b->ref[0] = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  6.56k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1442|  6.56k|                                    ts->cdf.m.comp_fwd_ref[1][ctx2]);
 1443|  6.56k|                }
 1444|       |
 1445|       |                // second reference (bw)
 1446|  10.2k|                const int ctx3 = av1_get_bwd_ref_ctx(t->a, &t->l, by4, bx4,
 1447|  10.2k|                                                     have_top, have_left);
 1448|  10.2k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  10.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1448:21): [True: 5.78k, False: 4.49k]
  ------------------
 1449|  10.2k|                        ts->cdf.m.comp_bwd_ref[0][ctx3]))
 1450|  5.78k|                {
 1451|  5.78k|                    b->ref[1] = 6;
 1452|  5.78k|                } else {
 1453|  4.49k|                    const int ctx4 = av1_get_bwd_ref_1_ctx(t->a, &t->l, by4, bx4,
 1454|  4.49k|                                                           have_top, have_left);
 1455|  4.49k|                    b->ref[1] = 4 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  4.49k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1456|  4.49k|                                        ts->cdf.m.comp_bwd_ref[1][ctx4]);
 1457|  4.49k|                }
 1458|  10.2k|            } else {
 1459|       |                // unidir
 1460|  2.31k|                const int uctx_p = av1_get_uni_p_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  280|  2.31k|#define av1_get_uni_p_ctx av1_get_ref_ctx
  ------------------
 1461|  2.31k|                                                     have_top, have_left);
 1462|  2.31k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  2.31k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1462:21): [True: 755, False: 1.56k]
  ------------------
 1463|  2.31k|                        ts->cdf.m.comp_uni_ref[0][uctx_p]))
 1464|    755|                {
 1465|    755|                    b->ref[0] = 4;
 1466|    755|                    b->ref[1] = 6;
 1467|  1.56k|                } else {
 1468|  1.56k|                    const int uctx_p1 = av1_get_uni_p1_ctx(t->a, &t->l, by4, bx4,
 1469|  1.56k|                                                           have_top, have_left);
 1470|  1.56k|                    b->ref[0] = 0;
 1471|  1.56k|                    b->ref[1] = 1 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.56k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1472|  1.56k|                                        ts->cdf.m.comp_uni_ref[1][uctx_p1]);
 1473|  1.56k|                    if (b->ref[1] == 2) {
  ------------------
  |  Branch (1473:25): [True: 914, False: 648]
  ------------------
 1474|    914|                        const int uctx_p2 = av1_get_uni_p2_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  281|    914|#define av1_get_uni_p2_ctx av1_get_fwd_ref_2_ctx
  ------------------
 1475|    914|                                                               have_top, have_left);
 1476|    914|                        b->ref[1] += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|    914|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1477|    914|                                         ts->cdf.m.comp_uni_ref[2][uctx_p2]);
 1478|    914|                    }
 1479|  1.56k|                }
 1480|  2.31k|            }
 1481|  12.6k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  12.6k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 12.6k]
  |  |  ------------------
  |  |   35|  12.6k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  12.6k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1482|      0|                printf("Post-refs[%d/%d]: r=%d\n",
 1483|      0|                       b->ref[0], b->ref[1], ts->msac.rng);
 1484|       |
 1485|  12.6k|            refmvs_candidate mvstack[8];
 1486|  12.6k|            int n_mvs, ctx;
 1487|  12.6k|            dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1488|  12.6k|                              (union refmvs_refpair) { .ref = {
 1489|  12.6k|                                    b->ref[0] + 1, b->ref[1] + 1 }},
 1490|  12.6k|                              bs, intra_edge_flags, t->by, t->bx);
 1491|       |
 1492|  12.6k|            b->inter_mode = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  12.6k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1493|  12.6k|                                ts->cdf.m.comp_inter_mode[ctx],
 1494|  12.6k|                                N_COMP_INTER_PRED_MODES - 1);
 1495|  12.6k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  12.6k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 12.6k]
  |  |  ------------------
  |  |   35|  12.6k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  12.6k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1496|      0|                printf("Post-compintermode[%d,ctx=%d,n_mvs=%d]: r=%d\n",
 1497|      0|                       b->inter_mode, ctx, n_mvs, ts->msac.rng);
 1498|       |
 1499|  12.6k|            const uint8_t *const im = dav1d_comp_inter_pred_modes[b->inter_mode];
 1500|  12.6k|            b->drl_idx = NEAREST_DRL;
 1501|  12.6k|            if (b->inter_mode == NEWMV_NEWMV) {
  ------------------
  |  Branch (1501:17): [True: 2.94k, False: 9.65k]
  ------------------
 1502|  2.94k|                if (n_mvs > 1) { // NEARER, NEAR or NEARISH
  ------------------
  |  Branch (1502:21): [True: 2.94k, False: 0]
  ------------------
 1503|  2.94k|                    const int drl_ctx_v1 = get_drl_context(mvstack, 0);
 1504|  2.94k|                    b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  2.94k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1505|  2.94k|                                      ts->cdf.m.drl_bit[drl_ctx_v1]);
 1506|  2.94k|                    if (b->drl_idx == NEARER_DRL && n_mvs > 2) {
  ------------------
  |  Branch (1506:25): [True: 1.95k, False: 990]
  |  Branch (1506:53): [True: 582, False: 1.37k]
  ------------------
 1507|    582|                        const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1508|    582|                        b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|    582|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1509|    582|                                          ts->cdf.m.drl_bit[drl_ctx_v2]);
 1510|    582|                    }
 1511|  2.94k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  2.94k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.94k]
  |  |  ------------------
  |  |   35|  2.94k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  2.94k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1512|      0|                        printf("Post-drlidx[%d,n_mvs=%d]: r=%d\n",
 1513|      0|                               b->drl_idx, n_mvs, ts->msac.rng);
 1514|  2.94k|                }
 1515|  9.65k|            } else if (im[0] == NEARMV || im[1] == NEARMV) {
  ------------------
  |  Branch (1515:24): [True: 2.46k, False: 7.18k]
  |  Branch (1515:43): [True: 322, False: 6.86k]
  ------------------
 1516|  2.79k|                b->drl_idx = NEARER_DRL;
 1517|  2.79k|                if (n_mvs > 2) { // NEAR or NEARISH
  ------------------
  |  Branch (1517:21): [True: 285, False: 2.50k]
  ------------------
 1518|    285|                    const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1519|    285|                    b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|    285|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1520|    285|                                      ts->cdf.m.drl_bit[drl_ctx_v2]);
 1521|    285|                    if (b->drl_idx == NEAR_DRL && n_mvs > 3) {
  ------------------
  |  Branch (1521:25): [True: 110, False: 175]
  |  Branch (1521:51): [True: 35, False: 75]
  ------------------
 1522|     35|                        const int drl_ctx_v3 = get_drl_context(mvstack, 2);
 1523|     35|                        b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|     35|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1524|     35|                                          ts->cdf.m.drl_bit[drl_ctx_v3]);
 1525|     35|                    }
 1526|    285|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|    285|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 285]
  |  |  ------------------
  |  |   35|    285|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|    285|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1527|      0|                        printf("Post-drlidx[%d,n_mvs=%d]: r=%d\n",
 1528|      0|                               b->drl_idx, n_mvs, ts->msac.rng);
 1529|    285|                }
 1530|  2.79k|            }
 1531|  12.6k|            assert(b->drl_idx >= NEAREST_DRL && b->drl_idx <= NEARISH_DRL);
  ------------------
  |  |  140|  25.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 12.6k, False: 0]
  |  |  |  Branch (140:30): [True: 12.6k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 12.6k]
  |  |  ------------------
  ------------------
 1532|       |
 1533|  12.6k|#define assign_comp_mv(idx) \
 1534|  12.6k|            switch (im[idx]) { \
 1535|  12.6k|            case NEARMV: \
 1536|  12.6k|            case NEARESTMV: \
 1537|  12.6k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
 1538|  12.6k|                fix_mv_precision(f->frame_hdr, &b->mv[idx]); \
 1539|  12.6k|                break; \
 1540|  12.6k|            case GLOBALMV: \
 1541|  12.6k|                has_subpel_filter |= \
 1542|  12.6k|                    f->frame_hdr->gmv[b->ref[idx]].type == DAV1D_WM_TYPE_TRANSLATION; \
 1543|  12.6k|                b->mv[idx] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[idx]], \
 1544|  12.6k|                                        t->bx, t->by, bw4, bh4, f->frame_hdr); \
 1545|  12.6k|                break; \
 1546|  12.6k|            case NEWMV: \
 1547|  12.6k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
 1548|  12.6k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv; \
 1549|  12.6k|                read_mv_residual(ts, &b->mv[idx], mv_prec); \
 1550|  12.6k|                break; \
 1551|  12.6k|            }
 1552|  12.6k|            has_subpel_filter = imin(bw4, bh4) == 1 ||
  ------------------
  |  Branch (1552:33): [True: 0, False: 12.6k]
  ------------------
 1553|  12.6k|                                b->inter_mode != GLOBALMV_GLOBALMV;
  ------------------
  |  Branch (1553:33): [True: 11.3k, False: 1.27k]
  ------------------
 1554|  12.6k|            assign_comp_mv(0);
  ------------------
  |  | 1534|  12.6k|            switch (im[idx]) { \
  |  |  ------------------
  |  |  |  Branch (1534:21): [True: 12.6k, False: 0]
  |  |  ------------------
  |  | 1535|  2.46k|            case NEARMV: \
  |  |  ------------------
  |  |  |  Branch (1535:13): [True: 2.46k, False: 10.1k]
  |  |  ------------------
  |  | 1536|  7.34k|            case NEARESTMV: \
  |  |  ------------------
  |  |  |  Branch (1536:13): [True: 4.87k, False: 7.72k]
  |  |  ------------------
  |  | 1537|  7.34k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1538|  7.34k|                fix_mv_precision(f->frame_hdr, &b->mv[idx]); \
  |  | 1539|  7.34k|                break; \
  |  | 1540|  2.46k|            case GLOBALMV: \
  |  |  ------------------
  |  |  |  Branch (1540:13): [True: 1.27k, False: 11.3k]
  |  |  ------------------
  |  | 1541|  1.27k|                has_subpel_filter |= \
  |  | 1542|  1.27k|                    f->frame_hdr->gmv[b->ref[idx]].type == DAV1D_WM_TYPE_TRANSLATION; \
  |  | 1543|  1.27k|                b->mv[idx] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[idx]], \
  |  | 1544|  1.27k|                                        t->bx, t->by, bw4, bh4, f->frame_hdr); \
  |  | 1545|  1.27k|                break; \
  |  | 1546|  3.98k|            case NEWMV: \
  |  |  ------------------
  |  |  |  Branch (1546:13): [True: 3.98k, False: 8.62k]
  |  |  ------------------
  |  | 1547|  3.98k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1548|  3.98k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv; \
  |  | 1549|  3.98k|                read_mv_residual(ts, &b->mv[idx], mv_prec); \
  |  | 1550|  3.98k|                break; \
  |  | 1551|  12.6k|            }
  ------------------
 1555|  12.6k|            assign_comp_mv(1);
  ------------------
  |  | 1534|  12.6k|            switch (im[idx]) { \
  |  |  ------------------
  |  |  |  Branch (1534:21): [True: 12.6k, False: 0]
  |  |  ------------------
  |  | 1535|  2.39k|            case NEARMV: \
  |  |  ------------------
  |  |  |  Branch (1535:13): [True: 2.39k, False: 10.2k]
  |  |  ------------------
  |  | 1536|  7.24k|            case NEARESTMV: \
  |  |  ------------------
  |  |  |  Branch (1536:13): [True: 4.84k, False: 7.75k]
  |  |  ------------------
  |  | 1537|  7.24k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1538|  7.24k|                fix_mv_precision(f->frame_hdr, &b->mv[idx]); \
  |  | 1539|  7.24k|                break; \
  |  | 1540|  2.39k|            case GLOBALMV: \
  |  |  ------------------
  |  |  |  Branch (1540:13): [True: 1.27k, False: 11.3k]
  |  |  ------------------
  |  | 1541|  1.27k|                has_subpel_filter |= \
  |  | 1542|  1.27k|                    f->frame_hdr->gmv[b->ref[idx]].type == DAV1D_WM_TYPE_TRANSLATION; \
  |  | 1543|  1.27k|                b->mv[idx] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[idx]], \
  |  | 1544|  1.27k|                                        t->bx, t->by, bw4, bh4, f->frame_hdr); \
  |  | 1545|  1.27k|                break; \
  |  | 1546|  4.07k|            case NEWMV: \
  |  |  ------------------
  |  |  |  Branch (1546:13): [True: 4.07k, False: 8.52k]
  |  |  ------------------
  |  | 1547|  4.07k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1548|  4.07k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv; \
  |  | 1549|  4.07k|                read_mv_residual(ts, &b->mv[idx], mv_prec); \
  |  | 1550|  4.07k|                break; \
  |  | 1551|  12.6k|            }
  ------------------
 1556|  12.6k|#undef assign_comp_mv
 1557|  12.6k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  12.6k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 12.6k]
  |  |  ------------------
  |  |   35|  12.6k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  12.6k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1558|      0|                printf("Post-residual_mv[1:y=%d,x=%d,2:y=%d,x=%d]: r=%d\n",
 1559|      0|                       b->mv[0].y, b->mv[0].x, b->mv[1].y, b->mv[1].x,
 1560|      0|                       ts->msac.rng);
 1561|       |
 1562|       |            // jnt_comp vs. seg vs. wedge
 1563|  12.6k|            int is_segwedge = 0;
 1564|  12.6k|            if (f->seq_hdr->masked_compound) {
  ------------------
  |  Branch (1564:17): [True: 3.67k, False: 8.92k]
  ------------------
 1565|  3.67k|                const int mask_ctx = get_mask_comp_ctx(t->a, &t->l, by4, bx4);
 1566|       |
 1567|  3.67k|                is_segwedge = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  3.67k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1568|  3.67k|                                  ts->cdf.m.mask_comp[mask_ctx]);
 1569|  3.67k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  3.67k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 3.67k]
  |  |  ------------------
  |  |   35|  3.67k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  3.67k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1570|      0|                    printf("Post-segwedge_vs_jntavg[%d,ctx=%d]: r=%d\n",
 1571|      0|                           is_segwedge, mask_ctx, ts->msac.rng);
 1572|  3.67k|            }
 1573|       |
 1574|  12.6k|            if (!is_segwedge) {
  ------------------
  |  Branch (1574:17): [True: 11.3k, False: 1.21k]
  ------------------
 1575|  11.3k|                if (f->seq_hdr->jnt_comp) {
  ------------------
  |  Branch (1575:21): [True: 6.95k, False: 4.43k]
  ------------------
 1576|  6.95k|                    const int jnt_ctx =
 1577|  6.95k|                        get_jnt_comp_ctx(f->seq_hdr->order_hint_n_bits,
 1578|  6.95k|                                         f->cur.frame_hdr->frame_offset,
 1579|  6.95k|                                         f->refp[b->ref[0]].p.frame_hdr->frame_offset,
 1580|  6.95k|                                         f->refp[b->ref[1]].p.frame_hdr->frame_offset,
 1581|  6.95k|                                         t->a, &t->l, by4, bx4);
 1582|  6.95k|                    b->comp_type = COMP_INTER_WEIGHTED_AVG +
 1583|  6.95k|                                   dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  6.95k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1584|  6.95k|                                       ts->cdf.m.jnt_comp[jnt_ctx]);
 1585|  6.95k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  6.95k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 6.95k]
  |  |  ------------------
  |  |   35|  6.95k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  6.95k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1586|      0|                        printf("Post-jnt_comp[%d,ctx=%d[ac:%d,ar:%d,lc:%d,lr:%d]]: r=%d\n",
 1587|      0|                               b->comp_type == COMP_INTER_AVG,
 1588|      0|                               jnt_ctx, t->a->comp_type[bx4], t->a->ref[0][bx4],
 1589|      0|                               t->l.comp_type[by4], t->l.ref[0][by4],
 1590|      0|                               ts->msac.rng);
 1591|  6.95k|                } else {
 1592|  4.43k|                    b->comp_type = COMP_INTER_AVG;
 1593|  4.43k|                }
 1594|  11.3k|            } else {
 1595|  1.21k|                if (wedge_allowed_mask & (1 << bs)) {
  ------------------
  |  Branch (1595:21): [True: 899, False: 311]
  ------------------
 1596|    899|                    const int ctx = dav1d_wedge_ctx_lut[bs];
 1597|    899|                    b->comp_type = COMP_INTER_WEDGE -
 1598|    899|                                   dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|    899|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1599|    899|                                       ts->cdf.m.wedge_comp[ctx]);
 1600|    899|                    if (b->comp_type == COMP_INTER_WEDGE)
  ------------------
  |  Branch (1600:25): [True: 339, False: 560]
  ------------------
 1601|    339|                        b->wedge_idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|    339|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1602|    899|                                           ts->cdf.m.wedge_idx[ctx], 15);
 1603|    899|                } else {
 1604|    311|                    b->comp_type = COMP_INTER_SEG;
 1605|    311|                }
 1606|  1.21k|                b->mask_sign = dav1d_msac_decode_bool_equi(&ts->msac);
  ------------------
  |  |   53|  1.21k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
 1607|  1.21k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.21k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.21k]
  |  |  ------------------
  |  |   35|  1.21k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.21k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1608|      0|                    printf("Post-seg/wedge[%d,wedge_idx=%d,sign=%d]: r=%d\n",
 1609|      0|                           b->comp_type == COMP_INTER_WEDGE,
 1610|      0|                           b->wedge_idx, b->mask_sign, ts->msac.rng);
 1611|  1.21k|            }
 1612|  52.1k|        } else {
 1613|  52.1k|            b->comp_type = COMP_INTER_NONE;
 1614|       |
 1615|       |            // ref
 1616|  52.1k|            if (seg && seg->ref > 0) {
  ------------------
  |  Branch (1616:17): [True: 21.9k, False: 30.2k]
  |  Branch (1616:24): [True: 4.82k, False: 17.0k]
  ------------------
 1617|  4.82k|                b->ref[0] = seg->ref - 1;
 1618|  47.3k|            } else if (seg && (seg->globalmv || seg->skip)) {
  ------------------
  |  Branch (1618:24): [True: 17.0k, False: 30.2k]
  |  Branch (1618:32): [True: 3.97k, False: 13.1k]
  |  Branch (1618:49): [True: 1.01k, False: 12.1k]
  ------------------
 1619|  4.98k|                b->ref[0] = 0;
 1620|  42.3k|            } else {
 1621|  42.3k|                const int ctx1 = av1_get_ref_ctx(t->a, &t->l, by4, bx4,
 1622|  42.3k|                                                 have_top, have_left);
 1623|  42.3k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  42.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1623:21): [True: 20.5k, False: 21.7k]
  ------------------
 1624|  42.3k|                                                 ts->cdf.m.ref[0][ctx1]))
 1625|  20.5k|                {
 1626|  20.5k|                    const int ctx2 = av1_get_ref_2_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  275|  20.5k|#define av1_get_ref_2_ctx av1_get_bwd_ref_ctx
  ------------------
 1627|  20.5k|                                                       have_top, have_left);
 1628|  20.5k|                    if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  20.5k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1628:25): [True: 13.9k, False: 6.55k]
  ------------------
 1629|  20.5k|                                                     ts->cdf.m.ref[1][ctx2]))
 1630|  13.9k|                    {
 1631|  13.9k|                        b->ref[0] = 6;
 1632|  13.9k|                    } else {
 1633|  6.55k|                        const int ctx3 = av1_get_ref_6_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  279|  6.55k|#define av1_get_ref_6_ctx av1_get_bwd_ref_1_ctx
  ------------------
 1634|  6.55k|                                                           have_top, have_left);
 1635|  6.55k|                        b->ref[0] = 4 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  6.55k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1636|  6.55k|                                            ts->cdf.m.ref[5][ctx3]);
 1637|  6.55k|                    }
 1638|  21.7k|                } else {
 1639|  21.7k|                    const int ctx2 = av1_get_ref_3_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  276|  21.7k|#define av1_get_ref_3_ctx av1_get_fwd_ref_ctx
  ------------------
 1640|  21.7k|                                                       have_top, have_left);
 1641|  21.7k|                    if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  21.7k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1641:25): [True: 5.97k, False: 15.8k]
  ------------------
 1642|  21.7k|                                                     ts->cdf.m.ref[2][ctx2]))
 1643|  5.97k|                    {
 1644|  5.97k|                        const int ctx3 = av1_get_ref_5_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  278|  5.97k|#define av1_get_ref_5_ctx av1_get_fwd_ref_2_ctx
  ------------------
 1645|  5.97k|                                                           have_top, have_left);
 1646|  5.97k|                        b->ref[0] = 2 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  5.97k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1647|  5.97k|                                            ts->cdf.m.ref[4][ctx3]);
 1648|  15.8k|                    } else {
 1649|  15.8k|                        const int ctx3 = av1_get_ref_4_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  277|  15.8k|#define av1_get_ref_4_ctx av1_get_fwd_ref_1_ctx
  ------------------
 1650|  15.8k|                                                           have_top, have_left);
 1651|  15.8k|                        b->ref[0] = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  15.8k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1652|  15.8k|                                        ts->cdf.m.ref[3][ctx3]);
 1653|  15.8k|                    }
 1654|  21.7k|                }
 1655|  42.3k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  42.3k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 42.3k]
  |  |  ------------------
  |  |   35|  42.3k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  42.3k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1656|      0|                    printf("Post-ref[%d]: r=%d\n", b->ref[0], ts->msac.rng);
 1657|  42.3k|            }
 1658|  52.1k|            b->ref[1] = -1;
 1659|       |
 1660|  52.1k|            refmvs_candidate mvstack[8];
 1661|  52.1k|            int n_mvs, ctx;
 1662|  52.1k|            dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1663|  52.1k|                              (union refmvs_refpair) { .ref = { b->ref[0] + 1, -1 }},
 1664|  52.1k|                              bs, intra_edge_flags, t->by, t->bx);
 1665|       |
 1666|       |            // mode parsing and mv derivation from ref_mvs
 1667|  52.1k|            if ((seg && (seg->skip || seg->globalmv)) ||
  ------------------
  |  Branch (1667:18): [True: 21.9k, False: 30.2k]
  |  Branch (1667:26): [True: 8.72k, False: 13.1k]
  |  Branch (1667:39): [True: 964, False: 12.2k]
  ------------------
 1668|  42.4k|                dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  42.4k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1668:17): [True: 28.3k, False: 14.0k]
  ------------------
 1669|  42.4k|                                             ts->cdf.m.newmv_mode[ctx & 7]))
 1670|  38.0k|            {
 1671|  38.0k|                if ((seg && (seg->skip || seg->globalmv)) ||
  ------------------
  |  Branch (1671:22): [True: 17.6k, False: 20.4k]
  |  Branch (1671:30): [True: 8.72k, False: 8.91k]
  |  Branch (1671:43): [True: 964, False: 7.95k]
  ------------------
 1672|  28.3k|                    !dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  28.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1672:21): [True: 1.47k, False: 26.8k]
  ------------------
 1673|  28.3k|                         ts->cdf.m.globalmv_mode[(ctx >> 3) & 1]))
 1674|  11.1k|                {
 1675|  11.1k|                    b->inter_mode = GLOBALMV;
 1676|  11.1k|                    b->mv[0] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[0]],
 1677|  11.1k|                                          t->bx, t->by, bw4, bh4, f->frame_hdr);
 1678|  11.1k|                    has_subpel_filter = imin(bw4, bh4) == 1 ||
  ------------------
  |  Branch (1678:41): [True: 4.24k, False: 6.92k]
  ------------------
 1679|  6.92k|                        f->frame_hdr->gmv[b->ref[0]].type == DAV1D_WM_TYPE_TRANSLATION;
  ------------------
  |  Branch (1679:25): [True: 822, False: 6.10k]
  ------------------
 1680|  26.8k|                } else {
 1681|  26.8k|                    has_subpel_filter = 1;
 1682|  26.8k|                    if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  26.8k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1682:25): [True: 12.4k, False: 14.4k]
  ------------------
 1683|  26.8k|                            ts->cdf.m.refmv_mode[(ctx >> 4) & 15]))
 1684|  12.4k|                    { // NEAREST, NEARER, NEAR or NEARISH
 1685|  12.4k|                        b->inter_mode = NEARMV;
 1686|  12.4k|                        b->drl_idx = NEARER_DRL;
 1687|  12.4k|                        if (n_mvs > 2) { // NEARER, NEAR or NEARISH
  ------------------
  |  Branch (1687:29): [True: 4.39k, False: 8.05k]
  ------------------
 1688|  4.39k|                            const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1689|  4.39k|                            b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  4.39k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1690|  4.39k|                                              ts->cdf.m.drl_bit[drl_ctx_v2]);
 1691|  4.39k|                            if (b->drl_idx == NEAR_DRL && n_mvs > 3) { // NEAR or NEARISH
  ------------------
  |  Branch (1691:33): [True: 3.22k, False: 1.16k]
  |  Branch (1691:59): [True: 1.42k, False: 1.80k]
  ------------------
 1692|  1.42k|                                const int drl_ctx_v3 =
 1693|  1.42k|                                    get_drl_context(mvstack, 2);
 1694|  1.42k|                                b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.42k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1695|  1.42k|                                                  ts->cdf.m.drl_bit[drl_ctx_v3]);
 1696|  1.42k|                            }
 1697|  4.39k|                        }
 1698|  14.4k|                    } else {
 1699|  14.4k|                        b->inter_mode = NEARESTMV;
 1700|  14.4k|                        b->drl_idx = NEAREST_DRL;
 1701|  14.4k|                    }
 1702|  26.8k|                    assert(b->drl_idx >= NEAREST_DRL && b->drl_idx <= NEARISH_DRL);
  ------------------
  |  |  140|  53.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 26.8k, False: 0]
  |  |  |  Branch (140:30): [True: 26.8k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 26.8k]
  |  |  ------------------
  ------------------
 1703|  26.8k|                    b->mv[0] = mvstack[b->drl_idx].mv.mv[0];
 1704|  26.8k|                    if (b->drl_idx < NEAR_DRL)
  ------------------
  |  Branch (1704:25): [True: 23.6k, False: 3.22k]
  ------------------
 1705|  23.6k|                        fix_mv_precision(f->frame_hdr, &b->mv[0]);
 1706|  26.8k|                }
 1707|       |
 1708|  38.0k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  38.0k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 38.0k]
  |  |  ------------------
  |  |   35|  38.0k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  38.0k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1709|      0|                    printf("Post-intermode[%d,drl=%d,mv=y:%d,x:%d,n_mvs=%d]: r=%d\n",
 1710|      0|                           b->inter_mode, b->drl_idx, b->mv[0].y, b->mv[0].x, n_mvs,
 1711|      0|                           ts->msac.rng);
 1712|  38.0k|            } else {
 1713|  14.0k|                has_subpel_filter = 1;
 1714|  14.0k|                b->inter_mode = NEWMV;
 1715|  14.0k|                b->drl_idx = NEAREST_DRL;
 1716|  14.0k|                if (n_mvs > 1) { // NEARER, NEAR or NEARISH
  ------------------
  |  Branch (1716:21): [True: 9.41k, False: 4.66k]
  ------------------
 1717|  9.41k|                    const int drl_ctx_v1 = get_drl_context(mvstack, 0);
 1718|  9.41k|                    b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  9.41k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1719|  9.41k|                                      ts->cdf.m.drl_bit[drl_ctx_v1]);
 1720|  9.41k|                    if (b->drl_idx == NEARER_DRL && n_mvs > 2) { // NEAR or NEARISH
  ------------------
  |  Branch (1720:25): [True: 3.92k, False: 5.49k]
  |  Branch (1720:53): [True: 1.53k, False: 2.39k]
  ------------------
 1721|  1.53k|                        const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1722|  1.53k|                        b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.53k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1723|  1.53k|                                          ts->cdf.m.drl_bit[drl_ctx_v2]);
 1724|  1.53k|                    }
 1725|  9.41k|                }
 1726|  14.0k|                assert(b->drl_idx >= NEAREST_DRL && b->drl_idx <= NEARISH_DRL);
  ------------------
  |  |  140|  28.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 14.0k, False: 0]
  |  |  |  Branch (140:30): [True: 14.0k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 14.0k]
  |  |  ------------------
  ------------------
 1727|  14.0k|                if (n_mvs > 1) {
  ------------------
  |  Branch (1727:21): [True: 9.41k, False: 4.66k]
  ------------------
 1728|  9.41k|                    b->mv[0] = mvstack[b->drl_idx].mv.mv[0];
 1729|  9.41k|                } else {
 1730|  4.66k|                    assert(!b->drl_idx);
  ------------------
  |  |  140|  4.66k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.66k]
  |  |  |  Branch (140:68): [Folded, False: 4.66k]
  |  |  ------------------
  ------------------
 1731|  4.66k|                    b->mv[0] = mvstack[0].mv.mv[0];
 1732|  4.66k|                    fix_mv_precision(f->frame_hdr, &b->mv[0]);
 1733|  4.66k|                }
 1734|  14.0k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  14.0k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 14.0k]
  |  |  ------------------
  |  |   35|  14.0k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  14.0k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1735|      0|                    printf("Post-intermode[%d,drl=%d]: r=%d\n",
 1736|      0|                           b->inter_mode, b->drl_idx, ts->msac.rng);
 1737|  14.0k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv;
 1738|  14.0k|                read_mv_residual(ts, &b->mv[0], mv_prec);
 1739|  14.0k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  14.0k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 14.0k]
  |  |  ------------------
  |  |   35|  14.0k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  14.0k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1740|      0|                    printf("Post-residualmv[mv=y:%d,x:%d]: r=%d\n",
 1741|      0|                           b->mv[0].y, b->mv[0].x, ts->msac.rng);
 1742|  14.0k|            }
 1743|       |
 1744|       |            // interintra flags
 1745|  52.1k|            const int ii_sz_grp = dav1d_ymode_size_context[bs];
 1746|  52.1k|            if (f->seq_hdr->inter_intra &&
  ------------------
  |  Branch (1746:17): [True: 15.3k, False: 36.7k]
  ------------------
 1747|  15.3k|                interintra_allowed_mask & (1 << bs) &&
  ------------------
  |  Branch (1747:17): [True: 6.67k, False: 8.66k]
  ------------------
 1748|  6.67k|                dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  6.67k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1748:17): [True: 1.20k, False: 5.46k]
  ------------------
 1749|  6.67k|                                             ts->cdf.m.interintra[ii_sz_grp]))
 1750|  1.20k|            {
 1751|  1.20k|                b->interintra_mode = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  1.20k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1752|  1.20k|                                         ts->cdf.m.interintra_mode[ii_sz_grp],
 1753|  1.20k|                                         N_INTER_INTRA_PRED_MODES - 1);
 1754|  1.20k|                const int wedge_ctx = dav1d_wedge_ctx_lut[bs];
 1755|  1.20k|                b->interintra_type = INTER_INTRA_BLEND +
 1756|  1.20k|                                     dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.20k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1757|  1.20k|                                         ts->cdf.m.interintra_wedge[wedge_ctx]);
 1758|  1.20k|                if (b->interintra_type == INTER_INTRA_WEDGE)
  ------------------
  |  Branch (1758:21): [True: 303, False: 906]
  ------------------
 1759|    303|                    b->wedge_idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|    303|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1760|  1.20k|                                       ts->cdf.m.wedge_idx[wedge_ctx], 15);
 1761|  50.9k|            } else {
 1762|  50.9k|                b->interintra_type = INTER_INTRA_NONE;
 1763|  50.9k|            }
 1764|  52.1k|            if (DEBUG_BLOCK_INFO && f->seq_hdr->inter_intra &&
  ------------------
  |  |   34|  52.1k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 52.1k]
  |  |  ------------------
  |  |   35|  52.1k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  52.1k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1764:37): [True: 0, False: 0]
  ------------------
 1765|      0|                interintra_allowed_mask & (1 << bs))
  ------------------
  |  Branch (1765:17): [True: 0, False: 0]
  ------------------
 1766|      0|            {
 1767|      0|                printf("Post-interintra[t=%d,m=%d,w=%d]: r=%d\n",
 1768|      0|                       b->interintra_type, b->interintra_mode,
 1769|      0|                       b->wedge_idx, ts->msac.rng);
 1770|      0|            }
 1771|       |
 1772|       |            // motion variation
 1773|  52.1k|            if (f->frame_hdr->switchable_motion_mode &&
  ------------------
  |  Branch (1773:17): [True: 40.8k, False: 11.3k]
  ------------------
 1774|  40.8k|                b->interintra_type == INTER_INTRA_NONE && imin(bw4, bh4) >= 2 &&
  ------------------
  |  Branch (1774:17): [True: 39.7k, False: 1.06k]
  |  Branch (1774:59): [True: 21.9k, False: 17.8k]
  ------------------
 1775|       |                // is not warped global motion
 1776|  21.9k|                !(!f->frame_hdr->force_integer_mv && b->inter_mode == GLOBALMV &&
  ------------------
  |  Branch (1776:19): [True: 20.7k, False: 1.17k]
  |  Branch (1776:54): [True: 2.66k, False: 18.0k]
  ------------------
 1777|  2.66k|                  f->frame_hdr->gmv[b->ref[0]].type > DAV1D_WM_TYPE_TRANSLATION) &&
  ------------------
  |  Branch (1777:19): [True: 677, False: 1.98k]
  ------------------
 1778|       |                // has overlappable neighbours
 1779|  21.2k|                ((have_left && findoddzero(&t->l.intra[by4 + 1], h4 >> 1)) ||
  ------------------
  |  Branch (1779:19): [True: 18.0k, False: 3.15k]
  |  Branch (1779:32): [True: 17.4k, False: 629]
  ------------------
 1780|  3.78k|                 (have_top && findoddzero(&t->a->intra[bx4 + 1], w4 >> 1))))
  ------------------
  |  Branch (1780:19): [True: 2.48k, False: 1.30k]
  |  Branch (1780:31): [True: 2.30k, False: 182]
  ------------------
 1781|  19.7k|            {
 1782|       |                // reaching here means the block allows obmc - check warp by
 1783|       |                // finding matching-ref blocks in top/left edges
 1784|  19.7k|                uint64_t mask[2] = { 0, 0 };
 1785|  19.7k|                find_matching_ref(t, intra_edge_flags, bw4, bh4, w4, h4,
 1786|  19.7k|                                  have_left, have_top, b->ref[0], mask);
 1787|  19.7k|                const int allow_warp = !f->svc[b->ref[0]][0].scale &&
  ------------------
  |  Branch (1787:40): [True: 15.3k, False: 4.36k]
  ------------------
 1788|  15.3k|                    !f->frame_hdr->force_integer_mv &&
  ------------------
  |  Branch (1788:21): [True: 14.7k, False: 673]
  ------------------
 1789|  14.7k|                    f->frame_hdr->warp_motion && (mask[0] | mask[1]);
  ------------------
  |  Branch (1789:21): [True: 8.58k, False: 6.12k]
  |  Branch (1789:50): [True: 7.36k, False: 1.21k]
  ------------------
 1790|       |
 1791|  19.7k|                b->motion_mode = allow_warp ?
  ------------------
  |  Branch (1791:34): [True: 7.36k, False: 12.3k]
  ------------------
 1792|  7.36k|                    dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  7.36k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1793|  7.36k|                        ts->cdf.m.motion_mode[bs], 2) :
 1794|  19.7k|                    dav1d_msac_decode_bool_adapt(&ts->msac, ts->cdf.m.obmc[bs]);
  ------------------
  |  |   52|  12.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1795|  19.7k|                if (b->motion_mode == MM_WARP) {
  ------------------
  |  Branch (1795:21): [True: 3.28k, False: 16.4k]
  ------------------
 1796|  3.28k|                    has_subpel_filter = 0;
 1797|  3.28k|                    derive_warpmv(t, bw4, bh4, mask, b->mv[0], &t->warpmv);
 1798|  3.28k|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
 1799|  3.28k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  3.28k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 3.28k]
  |  |  ------------------
  |  |   35|  3.28k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  3.28k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1800|      0|                        printf("[ %c%x %c%x %c%x\n  %c%x %c%x %c%x ]\n"
 1801|      0|                               "alpha=%c%x, beta=%c%x, gamma=%c%x, delta=%c%x, "
 1802|      0|                               "mv=y:%d,x:%d\n",
 1803|      0|                               signabs(t->warpmv.matrix[0]),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1804|      0|                               signabs(t->warpmv.matrix[1]),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1805|      0|                               signabs(t->warpmv.matrix[2]),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1806|      0|                               signabs(t->warpmv.matrix[3]),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1807|      0|                               signabs(t->warpmv.matrix[4]),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1808|      0|                               signabs(t->warpmv.matrix[5]),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1809|      0|                               signabs(t->warpmv.u.p.alpha),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1810|      0|                               signabs(t->warpmv.u.p.beta),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1811|      0|                               signabs(t->warpmv.u.p.gamma),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1812|      0|                               signabs(t->warpmv.u.p.delta),
  ------------------
  |  | 1798|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1798:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1813|      0|                               b->mv[0].y, b->mv[0].x);
 1814|  3.28k|#undef signabs
 1815|  3.28k|                    if (t->frame_thread.pass) {
  ------------------
  |  Branch (1815:25): [True: 0, False: 3.28k]
  ------------------
 1816|      0|                        if (t->warpmv.type == DAV1D_WM_TYPE_AFFINE) {
  ------------------
  |  Branch (1816:29): [True: 0, False: 0]
  ------------------
 1817|      0|                            b->matrix[0] = t->warpmv.matrix[2] - 0x10000;
 1818|      0|                            b->matrix[1] = t->warpmv.matrix[3];
 1819|      0|                            b->matrix[2] = t->warpmv.matrix[4];
 1820|      0|                            b->matrix[3] = t->warpmv.matrix[5] - 0x10000;
 1821|      0|                        } else {
 1822|      0|                            b->matrix[0] = INT16_MIN;
 1823|      0|                        }
 1824|      0|                    }
 1825|  3.28k|                }
 1826|       |
 1827|  19.7k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  19.7k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 19.7k]
  |  |  ------------------
  |  |   35|  19.7k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  19.7k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1828|      0|                    printf("Post-motionmode[%d]: r=%d [mask: 0x%" PRIx64 "/0x%"
 1829|      0|                           PRIx64 "]\n", b->motion_mode, ts->msac.rng, mask[0],
 1830|      0|                            mask[1]);
 1831|  32.3k|            } else {
 1832|  32.3k|                b->motion_mode = MM_TRANSLATION;
 1833|  32.3k|            }
 1834|  52.1k|        }
 1835|       |
 1836|       |        // subpel filter
 1837|  65.2k|        enum Dav1dFilterMode filter[2];
 1838|  65.2k|        if (f->frame_hdr->subpel_filter_mode == DAV1D_FILTER_SWITCHABLE) {
  ------------------
  |  Branch (1838:13): [True: 24.3k, False: 40.9k]
  ------------------
 1839|  24.3k|            if (has_subpel_filter) {
  ------------------
  |  Branch (1839:17): [True: 22.0k, False: 2.24k]
  ------------------
 1840|  22.0k|                const int comp = b->comp_type != COMP_INTER_NONE;
 1841|  22.0k|                const int ctx1 = get_filter_ctx(t->a, &t->l, comp, 0, b->ref[0],
 1842|  22.0k|                                                by4, bx4);
 1843|  22.0k|                filter[0] = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  22.0k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1844|  22.0k|                               ts->cdf.m.filter[0][ctx1],
 1845|  22.0k|                               DAV1D_N_SWITCHABLE_FILTERS - 1);
 1846|  22.0k|                if (f->seq_hdr->dual_filter) {
  ------------------
  |  Branch (1846:21): [True: 9.78k, False: 12.2k]
  ------------------
 1847|  9.78k|                    const int ctx2 = get_filter_ctx(t->a, &t->l, comp, 1,
 1848|  9.78k|                                                    b->ref[0], by4, bx4);
 1849|  9.78k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  9.78k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 9.78k]
  |  |  ------------------
  |  |   35|  9.78k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  9.78k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1850|      0|                        printf("Post-subpel_filter1[%d,ctx=%d]: r=%d\n",
 1851|      0|                               filter[0], ctx1, ts->msac.rng);
 1852|  9.78k|                    filter[1] = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  9.78k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1853|  9.78k|                                    ts->cdf.m.filter[1][ctx2],
 1854|  9.78k|                                    DAV1D_N_SWITCHABLE_FILTERS - 1);
 1855|  9.78k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  9.78k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 9.78k]
  |  |  ------------------
  |  |   35|  9.78k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  9.78k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1856|      0|                        printf("Post-subpel_filter2[%d,ctx=%d]: r=%d\n",
 1857|      0|                               filter[1], ctx2, ts->msac.rng);
 1858|  12.2k|                } else {
 1859|  12.2k|                    filter[1] = filter[0];
 1860|  12.2k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  12.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 12.2k]
  |  |  ------------------
  |  |   35|  12.2k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  12.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1861|      0|                        printf("Post-subpel_filter[%d,ctx=%d]: r=%d\n",
 1862|      0|                               filter[0], ctx1, ts->msac.rng);
 1863|  12.2k|                }
 1864|  22.0k|            } else {
 1865|  2.24k|                filter[0] = filter[1] = DAV1D_FILTER_8TAP_REGULAR;
 1866|  2.24k|            }
 1867|  40.9k|        } else {
 1868|  40.9k|            filter[0] = filter[1] = f->frame_hdr->subpel_filter_mode;
 1869|  40.9k|        }
 1870|  65.2k|        b->filter2d = dav1d_filter_2d[filter[1]][filter[0]];
 1871|       |
 1872|  65.2k|        read_vartx_tree(t, b, bs, bx4, by4);
 1873|       |
 1874|       |        // reconstruction
 1875|  65.2k|        if (t->frame_thread.pass == 1) {
  ------------------
  |  Branch (1875:13): [True: 0, False: 65.2k]
  ------------------
 1876|      0|            f->bd_fn.read_coef_blocks(t, bs, b);
 1877|  65.2k|        } else {
 1878|  65.2k|            if (f->bd_fn.recon_b_inter(t, bs, b)) return -1;
  ------------------
  |  Branch (1878:17): [True: 0, False: 65.2k]
  ------------------
 1879|  65.2k|        }
 1880|       |
 1881|  65.2k|        if (f->frame_hdr->loopfilter.level_y[0] ||
  ------------------
  |  Branch (1881:13): [True: 58.5k, False: 6.65k]
  ------------------
 1882|  6.65k|            f->frame_hdr->loopfilter.level_y[1])
  ------------------
  |  Branch (1882:13): [True: 2.98k, False: 3.67k]
  ------------------
 1883|  61.5k|        {
 1884|  61.5k|            const int is_globalmv =
 1885|  61.5k|                b->inter_mode == (is_comp ? GLOBALMV_GLOBALMV : GLOBALMV);
  ------------------
  |  Branch (1885:35): [True: 12.7k, False: 48.8k]
  ------------------
 1886|  61.5k|            const uint8_t (*const lf_lvls)[8][2] = (const uint8_t (*)[8][2])
 1887|  61.5k|                &ts->lflvl[b->seg_id][0][b->ref[0] + 1][!is_globalmv];
 1888|  61.5k|            const uint16_t tx_split[2] = { b->tx_split0, b->tx_split1 };
 1889|  61.5k|            enum RectTxfmSize ytx = b->max_ytx, uvtx = b->uvtx;
 1890|  61.5k|            if (f->frame_hdr->segmentation.lossless[b->seg_id]) {
  ------------------
  |  Branch (1890:17): [True: 816, False: 60.7k]
  ------------------
 1891|    816|                ytx  = (enum RectTxfmSize) TX_4X4;
 1892|    816|                uvtx = (enum RectTxfmSize) TX_4X4;
 1893|    816|            }
 1894|  61.5k|            dav1d_create_lf_mask_inter(t->lf_mask, f->lf.level, f->b4_stride, lf_lvls,
 1895|  61.5k|                                       t->bx, t->by, f->w4, f->h4, b->skip, bs,
 1896|  61.5k|                                       ytx, tx_split, uvtx, f->cur.p.layout,
 1897|  61.5k|                                       &t->a->tx_lpf_y[bx4], &t->l.tx_lpf_y[by4],
 1898|  61.5k|                                       has_chroma ? &t->a->tx_lpf_uv[cbx4] : NULL,
  ------------------
  |  Branch (1898:40): [True: 19.6k, False: 41.9k]
  ------------------
 1899|  61.5k|                                       has_chroma ? &t->l.tx_lpf_uv[cby4] : NULL);
  ------------------
  |  Branch (1899:40): [True: 19.6k, False: 41.9k]
  ------------------
 1900|  61.5k|        }
 1901|       |
 1902|       |        // context updates
 1903|  65.2k|        if (is_comp)
  ------------------
  |  Branch (1903:13): [True: 13.1k, False: 52.1k]
  ------------------
 1904|  13.1k|            splat_tworef_mv(f->c, t, bs, b, bw4, bh4);
 1905|  52.1k|        else
 1906|  52.1k|            splat_oneref_mv(f->c, t, bs, b, bw4, bh4);
 1907|  65.2k|        BlockContext *edge = t->a;
 1908|   195k|        for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (1908:36): [True: 130k, False: 65.2k]
  ------------------
 1909|   130k|#define set_ctx(rep_macro) \
 1910|   130k|            rep_macro(edge->seg_pred, off, seg_pred); \
 1911|   130k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
 1912|   130k|            rep_macro(edge->intra, off, 0); \
 1913|   130k|            rep_macro(edge->skip, off, b->skip); \
 1914|   130k|            rep_macro(edge->pal_sz, off, 0); \
 1915|       |            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
 1916|   130k|            rep_macro(t->pal_sz_uv[i], off, 0); \
 1917|   130k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
 1918|   130k|            rep_macro(edge->comp_type, off, b->comp_type); \
 1919|   130k|            rep_macro(edge->filter[0], off, filter[0]); \
 1920|   130k|            rep_macro(edge->filter[1], off, filter[1]); \
 1921|   130k|            rep_macro(edge->mode, off, b->inter_mode); \
 1922|   130k|            rep_macro(edge->ref[0], off, b->ref[0]); \
 1923|   130k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
 1924|   130k|            case_set(b_dim[2 + i]);
  ------------------
  |  |   70|   130k|    switch (var) { \
  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1910|  30.8k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1911|  30.8k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1912|  30.8k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  30.8k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  30.8k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  30.8k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1916|  30.8k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  30.8k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1918|  30.8k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  30.8k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  30.8k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  30.8k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  30.8k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  30.8k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  30.8k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  30.8k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 30.8k, False: 99.5k]
  |  |  ------------------
  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1910|  44.2k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1911|  44.2k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1912|  44.2k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  44.2k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  44.2k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  44.2k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1916|  44.2k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  44.2k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1918|  44.2k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  44.2k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  44.2k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  44.2k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  44.2k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  44.2k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.2k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.2k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 44.2k, False: 86.1k]
  |  |  ------------------
  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1910|  34.3k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1911|  34.3k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1912|  34.3k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  34.3k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  34.3k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  34.3k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1916|  34.3k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  34.3k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1918|  34.3k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  34.3k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  34.3k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  34.3k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  34.3k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  34.3k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  34.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  34.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 34.3k, False: 96.1k]
  |  |  ------------------
  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1910|  13.5k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1911|  13.5k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1912|  13.5k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  13.5k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  13.5k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  13.5k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1916|  13.5k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  13.5k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1918|  13.5k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  13.5k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  13.5k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  13.5k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  13.5k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  13.5k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  13.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  13.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 13.5k, False: 116k]
  |  |  ------------------
  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1910|  5.72k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1911|  5.72k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1912|  5.72k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  5.72k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  5.72k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  5.72k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1916|  5.72k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  5.72k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1918|  5.72k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  5.72k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  5.72k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  5.72k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  5.72k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  5.72k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  5.72k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  5.72k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  5.72k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  5.72k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 5.72k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 5.72k, False: 124k]
  |  |  ------------------
  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1910|  1.73k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1911|  1.73k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1912|  1.73k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  1.73k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  1.73k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  1.73k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1916|  1.73k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  1.73k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1918|  1.73k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  1.73k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  1.73k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  1.73k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  1.73k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  1.73k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  1.73k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  1.73k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  1.73k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  1.73k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 1.73k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 1.73k, False: 128k]
  |  |  ------------------
  |  |   77|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (77:5): [True: 0, False: 130k]
  |  |  ------------------
  |  |   78|   130k|    }
  ------------------
 1925|   130k|#undef set_ctx
 1926|   130k|        }
 1927|  65.2k|        if (has_chroma) {
  ------------------
  |  Branch (1927:13): [True: 22.3k, False: 42.8k]
  ------------------
 1928|  22.3k|            dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], DC_PRED);
 1929|  22.3k|            dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], DC_PRED);
 1930|  22.3k|        }
 1931|  65.2k|    }
 1932|       |
 1933|       |    // update contexts
 1934|  2.00M|    if (f->frame_hdr->segmentation.enabled &&
  ------------------
  |  Branch (1934:9): [True: 491k, False: 1.51M]
  ------------------
 1935|   491k|        f->frame_hdr->segmentation.update_map)
  ------------------
  |  Branch (1935:9): [True: 478k, False: 13.0k]
  ------------------
 1936|   478k|    {
 1937|   478k|        uint8_t *seg_ptr = &f->cur_segmap[t->by * f->b4_stride + t->bx];
 1938|   478k|#define set_ctx(rep_macro) \
 1939|   478k|        for (int y = 0; y < bh4; y++) { \
 1940|   478k|            rep_macro(seg_ptr, 0, b->seg_id); \
 1941|   478k|            seg_ptr += f->b4_stride; \
 1942|   478k|        }
 1943|   478k|        case_set(b_dim[2]);
  ------------------
  |  |   70|   478k|    switch (var) { \
  |  |   71|  75.7k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1939|   208k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1939:25): [True: 133k, False: 75.7k]
  |  |  |  |  ------------------
  |  |  |  | 1940|   133k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   133k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   133k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1941|   133k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1942|   133k|        }
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 75.7k, False: 402k]
  |  |  ------------------
  |  |   72|   134k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1939|   522k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1939:25): [True: 388k, False: 134k]
  |  |  |  |  ------------------
  |  |  |  | 1940|   388k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|   388k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   388k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1941|   388k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1942|   388k|        }
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 134k, False: 343k]
  |  |  ------------------
  |  |   73|   126k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1939|   666k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1939:25): [True: 539k, False: 126k]
  |  |  |  |  ------------------
  |  |  |  | 1940|   539k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   539k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   539k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1941|   539k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1942|   539k|        }
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 126k, False: 351k]
  |  |  ------------------
  |  |   74|  71.1k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1939|   628k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1939:25): [True: 557k, False: 71.1k]
  |  |  |  |  ------------------
  |  |  |  | 1940|   557k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   557k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   557k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1941|   557k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1942|   557k|        }
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 71.1k, False: 407k]
  |  |  ------------------
  |  |   75|  56.7k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1939|   922k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1939:25): [True: 865k, False: 56.7k]
  |  |  |  |  ------------------
  |  |  |  | 1940|   865k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   865k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   865k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   865k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   865k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 865k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1941|   865k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1942|   865k|        }
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 56.7k, False: 421k]
  |  |  ------------------
  |  |   76|  13.4k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1939|   414k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1939:25): [True: 401k, False: 13.4k]
  |  |  |  |  ------------------
  |  |  |  | 1940|   401k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|   401k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|   401k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|   401k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|   401k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 401k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1941|   401k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1942|   401k|        }
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 13.4k, False: 465k]
  |  |  ------------------
  |  |   77|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (77:5): [True: 0, False: 478k]
  |  |  ------------------
  |  |   78|   478k|    }
  ------------------
 1944|   478k|#undef set_ctx
 1945|   478k|    }
 1946|  2.00M|    if (!b->skip) {
  ------------------
  |  Branch (1946:9): [True: 1.21M, False: 787k]
  ------------------
 1947|  1.21M|        uint16_t (*noskip_mask)[2] = &t->lf_mask->noskip_mask[by4 >> 1];
 1948|  1.21M|        const unsigned mask = (~0U >> (32 - bw4)) << (bx4 & 15);
 1949|  1.21M|        const int bx_idx = (bx4 & 16) >> 4;
 1950|  3.52M|        for (int y = 0; y < bh4; y += 2, noskip_mask++) {
  ------------------
  |  Branch (1950:25): [True: 2.31M, False: 1.21M]
  ------------------
 1951|  2.31M|            (*noskip_mask)[bx_idx] |= mask;
 1952|  2.31M|            if (bw4 == 32) // this should be mask >> 16, but it's 0xffffffff anyway
  ------------------
  |  Branch (1952:17): [True: 231k, False: 2.08M]
  ------------------
 1953|   231k|                (*noskip_mask)[1] |= mask;
 1954|  2.31M|        }
 1955|  1.21M|    }
 1956|       |
 1957|  2.00M|    if (t->frame_thread.pass == 1 && !b->intra && IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|      0|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1957:9): [True: 0, False: 2.00M]
  |  Branch (1957:38): [True: 0, False: 0]
  ------------------
 1958|      0|        const int sby = (t->by - ts->tiling.row_start) >> f->sb_shift;
 1959|      0|        int (*const lowest_px)[2] = ts->lowest_pixel[sby];
 1960|       |
 1961|       |        // keep track of motion vectors for each reference
 1962|      0|        if (b->comp_type == COMP_INTER_NONE) {
  ------------------
  |  Branch (1962:13): [True: 0, False: 0]
  ------------------
 1963|       |            // y
 1964|      0|            if (imin(bw4, bh4) > 1 &&
  ------------------
  |  Branch (1964:17): [True: 0, False: 0]
  ------------------
 1965|      0|                ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1965:19): [True: 0, False: 0]
  |  Branch (1965:48): [True: 0, False: 0]
  ------------------
 1966|      0|                 (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1966:19): [True: 0, False: 0]
  |  Branch (1966:48): [True: 0, False: 0]
  ------------------
 1967|      0|            {
 1968|      0|                affine_lowest_px_luma(t, &lowest_px[b->ref[0]][0], b_dim,
 1969|      0|                                      b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1969:39): [True: 0, False: 0]
  ------------------
 1970|      0|                                      &f->frame_hdr->gmv[b->ref[0]]);
 1971|      0|            } else {
 1972|      0|                mc_lowest_px(&lowest_px[b->ref[0]][0], t->by, bh4, b->mv[0].y,
 1973|      0|                             0, &f->svc[b->ref[0]][1]);
 1974|      0|                if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1974:21): [True: 0, False: 0]
  ------------------
 1975|      0|                    obmc_lowest_px(t, lowest_px, 0, b_dim, bx4, by4, w4, h4);
 1976|      0|                }
 1977|      0|            }
 1978|       |
 1979|       |            // uv
 1980|      0|            if (has_chroma) {
  ------------------
  |  Branch (1980:17): [True: 0, False: 0]
  ------------------
 1981|       |                // sub8x8 derivation
 1982|      0|                int is_sub8x8 = bw4 == ss_hor || bh4 == ss_ver;
  ------------------
  |  Branch (1982:33): [True: 0, False: 0]
  |  Branch (1982:50): [True: 0, False: 0]
  ------------------
 1983|      0|                refmvs_block *const *r;
 1984|      0|                if (is_sub8x8) {
  ------------------
  |  Branch (1984:21): [True: 0, False: 0]
  ------------------
 1985|      0|                    assert(ss_hor == 1);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1986|      0|                    r = &t->rt.r[(t->by & 31) + 5];
 1987|      0|                    if (bw4 == 1) is_sub8x8 &= r[0][t->bx - 1].ref.ref[0] > 0;
  ------------------
  |  Branch (1987:25): [True: 0, False: 0]
  ------------------
 1988|      0|                    if (bh4 == ss_ver) is_sub8x8 &= r[-1][t->bx].ref.ref[0] > 0;
  ------------------
  |  Branch (1988:25): [True: 0, False: 0]
  ------------------
 1989|      0|                    if (bw4 == 1 && bh4 == ss_ver)
  ------------------
  |  Branch (1989:25): [True: 0, False: 0]
  |  Branch (1989:37): [True: 0, False: 0]
  ------------------
 1990|      0|                        is_sub8x8 &= r[-1][t->bx - 1].ref.ref[0] > 0;
 1991|      0|                }
 1992|       |
 1993|       |                // chroma prediction
 1994|      0|                if (is_sub8x8) {
  ------------------
  |  Branch (1994:21): [True: 0, False: 0]
  ------------------
 1995|      0|                    assert(ss_hor == 1);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1996|      0|                    if (bw4 == 1 && bh4 == ss_ver) {
  ------------------
  |  Branch (1996:25): [True: 0, False: 0]
  |  Branch (1996:37): [True: 0, False: 0]
  ------------------
 1997|      0|                        const refmvs_block *const rr = &r[-1][t->bx - 1];
 1998|      0|                        mc_lowest_px(&lowest_px[rr->ref.ref[0] - 1][1],
 1999|      0|                                     t->by - 1, bh4, rr->mv.mv[0].y, ss_ver,
 2000|      0|                                     &f->svc[rr->ref.ref[0] - 1][1]);
 2001|      0|                    }
 2002|      0|                    if (bw4 == 1) {
  ------------------
  |  Branch (2002:25): [True: 0, False: 0]
  ------------------
 2003|      0|                        const refmvs_block *const rr = &r[0][t->bx - 1];
 2004|      0|                        mc_lowest_px(&lowest_px[rr->ref.ref[0] - 1][1],
 2005|      0|                                     t->by, bh4, rr->mv.mv[0].y, ss_ver,
 2006|      0|                                     &f->svc[rr->ref.ref[0] - 1][1]);
 2007|      0|                    }
 2008|      0|                    if (bh4 == ss_ver) {
  ------------------
  |  Branch (2008:25): [True: 0, False: 0]
  ------------------
 2009|      0|                        const refmvs_block *const rr = &r[-1][t->bx];
 2010|      0|                        mc_lowest_px(&lowest_px[rr->ref.ref[0] - 1][1],
 2011|      0|                                     t->by - 1, bh4, rr->mv.mv[0].y, ss_ver,
 2012|      0|                                     &f->svc[rr->ref.ref[0] - 1][1]);
 2013|      0|                    }
 2014|      0|                    mc_lowest_px(&lowest_px[b->ref[0]][1], t->by, bh4,
 2015|      0|                                 b->mv[0].y, ss_ver, &f->svc[b->ref[0]][1]);
 2016|      0|                } else {
 2017|      0|                    if (imin(cbw4, cbh4) > 1 &&
  ------------------
  |  Branch (2017:25): [True: 0, False: 0]
  ------------------
 2018|      0|                        ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (2018:27): [True: 0, False: 0]
  |  Branch (2018:56): [True: 0, False: 0]
  ------------------
 2019|      0|                         (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (2019:27): [True: 0, False: 0]
  |  Branch (2019:56): [True: 0, False: 0]
  ------------------
 2020|      0|                    {
 2021|      0|                        affine_lowest_px_chroma(t, &lowest_px[b->ref[0]][1], b_dim,
 2022|      0|                                                b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (2022:49): [True: 0, False: 0]
  ------------------
 2023|      0|                                                &f->frame_hdr->gmv[b->ref[0]]);
 2024|      0|                    } else {
 2025|      0|                        mc_lowest_px(&lowest_px[b->ref[0]][1],
 2026|      0|                                     t->by & ~ss_ver, bh4 << (bh4 == ss_ver),
 2027|      0|                                     b->mv[0].y, ss_ver, &f->svc[b->ref[0]][1]);
 2028|      0|                        if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (2028:29): [True: 0, False: 0]
  ------------------
 2029|      0|                            obmc_lowest_px(t, lowest_px, 1, b_dim, bx4, by4, w4, h4);
 2030|      0|                        }
 2031|      0|                    }
 2032|      0|                }
 2033|      0|            }
 2034|      0|        } else {
 2035|       |            // y
 2036|      0|            for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (2036:29): [True: 0, False: 0]
  ------------------
 2037|      0|                if (b->inter_mode == GLOBALMV_GLOBALMV && f->gmv_warp_allowed[b->ref[i]]) {
  ------------------
  |  Branch (2037:21): [True: 0, False: 0]
  |  Branch (2037:59): [True: 0, False: 0]
  ------------------
 2038|      0|                    affine_lowest_px_luma(t, &lowest_px[b->ref[i]][0], b_dim,
 2039|      0|                                          &f->frame_hdr->gmv[b->ref[i]]);
 2040|      0|                } else {
 2041|      0|                    mc_lowest_px(&lowest_px[b->ref[i]][0], t->by, bh4,
 2042|      0|                                 b->mv[i].y, 0, &f->svc[b->ref[i]][1]);
 2043|      0|                }
 2044|      0|            }
 2045|       |
 2046|       |            // uv
 2047|      0|            if (has_chroma) for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (2047:17): [True: 0, False: 0]
  |  Branch (2047:45): [True: 0, False: 0]
  ------------------
 2048|      0|                if (b->inter_mode == GLOBALMV_GLOBALMV &&
  ------------------
  |  Branch (2048:21): [True: 0, False: 0]
  ------------------
 2049|      0|                    imin(cbw4, cbh4) > 1 && f->gmv_warp_allowed[b->ref[i]])
  ------------------
  |  Branch (2049:21): [True: 0, False: 0]
  |  Branch (2049:45): [True: 0, False: 0]
  ------------------
 2050|      0|                {
 2051|      0|                    affine_lowest_px_chroma(t, &lowest_px[b->ref[i]][1], b_dim,
 2052|      0|                                            &f->frame_hdr->gmv[b->ref[i]]);
 2053|      0|                } else {
 2054|      0|                    mc_lowest_px(&lowest_px[b->ref[i]][1], t->by, bh4,
 2055|      0|                                 b->mv[i].y, ss_ver, &f->svc[b->ref[i]][1]);
 2056|      0|                }
 2057|      0|            }
 2058|      0|        }
 2059|      0|    }
 2060|       |
 2061|  2.00M|    return 0;
 2062|  2.00M|}
decode.c:get_prev_frame_segid:
  499|    928|{
  500|    928|    assert(f->frame_hdr->primary_ref_frame != DAV1D_PRIMARY_REF_NONE);
  ------------------
  |  |  140|    928|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 928]
  |  |  |  Branch (140:68): [Folded, False: 928]
  |  |  ------------------
  ------------------
  501|       |
  502|    928|    unsigned seg_id = 8;
  503|    928|    ref_seg_map += by * stride + bx;
  504|  1.13k|    do {
  505|  4.11k|        for (int x = 0; x < w4; x++)
  ------------------
  |  Branch (505:25): [True: 2.97k, False: 1.13k]
  ------------------
  506|  2.97k|            seg_id = imin(seg_id, ref_seg_map[x]);
  507|  1.13k|        ref_seg_map += stride;
  508|  1.13k|    } while (--h4 > 0 && seg_id);
  ------------------
  |  Branch (508:14): [True: 681, False: 457]
  |  Branch (508:26): [True: 210, False: 471]
  ------------------
  509|    928|    assert(seg_id < 8);
  ------------------
  |  |  140|    928|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 928]
  |  |  |  Branch (140:68): [Folded, False: 928]
  |  |  ------------------
  ------------------
  510|       |
  511|    928|    return seg_id;
  512|    928|}
decode.c:neg_deinterleave:
  169|   466k|static int neg_deinterleave(int diff, int ref, int max) {
  170|   466k|    if (!ref) return diff;
  ------------------
  |  Branch (170:9): [True: 123k, False: 342k]
  ------------------
  171|   342k|    if (ref >= (max - 1)) return max - diff - 1;
  ------------------
  |  Branch (171:9): [True: 25.2k, False: 317k]
  ------------------
  172|   317k|    if (2 * ref < max) {
  ------------------
  |  Branch (172:9): [True: 187k, False: 129k]
  ------------------
  173|   187k|        if (diff <= 2 * ref) {
  ------------------
  |  Branch (173:13): [True: 155k, False: 32.1k]
  ------------------
  174|   155k|            if (diff & 1)
  ------------------
  |  Branch (174:17): [True: 23.7k, False: 132k]
  ------------------
  175|  23.7k|                return ref + ((diff + 1) >> 1);
  176|   132k|            else
  177|   132k|                return ref - (diff >> 1);
  178|   155k|        }
  179|  32.1k|        return diff;
  180|   187k|    } else {
  181|   129k|        if (diff <= 2 * (max - ref - 1)) {
  ------------------
  |  Branch (181:13): [True: 111k, False: 18.4k]
  ------------------
  182|   111k|            if (diff & 1)
  ------------------
  |  Branch (182:17): [True: 17.5k, False: 93.6k]
  ------------------
  183|  17.5k|                return ref + ((diff + 1) >> 1);
  184|  93.6k|            else
  185|  93.6k|                return ref - (diff >> 1);
  186|   111k|        }
  187|  18.4k|        return max - (diff + 1);
  188|   129k|    }
  189|   317k|}
decode.c:read_pal_indices:
  419|  16.2k|{
  420|  16.2k|    Dav1dTileState *const ts = t->ts;
  421|  16.2k|    const ptrdiff_t stride = bw4 * 4;
  422|  16.2k|    assert(pal_idx);
  ------------------
  |  |  140|  16.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 16.2k]
  |  |  |  Branch (140:68): [Folded, False: 16.2k]
  |  |  ------------------
  ------------------
  423|  16.2k|    uint8_t *const pal_tmp = t->scratch.pal_idx_uv;
  424|  16.2k|    pal_tmp[0] = dav1d_msac_decode_uniform(&ts->msac, pal_sz);
  425|  16.2k|    uint16_t (*const color_map_cdf)[8] =
  426|  16.2k|        ts->cdf.m.color_map[pl][pal_sz - 2];
  427|  16.2k|    uint8_t (*const order)[8] = t->scratch.pal_order;
  428|  16.2k|    uint8_t *const ctx = t->scratch.pal_ctx;
  429|   415k|    for (int i = 1; i < 4 * (w4 + h4) - 1; i++) {
  ------------------
  |  Branch (429:21): [True: 399k, False: 16.2k]
  ------------------
  430|       |        // top/left-to-bottom/right diagonals ("wave-front")
  431|   399k|        const int first = imin(i, w4 * 4 - 1);
  432|   399k|        const int last = imax(0, i - h4 * 4 + 1);
  433|   399k|        order_palette(pal_tmp, stride, i, first, last, order, ctx);
  434|  3.59M|        for (int j = first, m = 0; j >= last; j--, m++) {
  ------------------
  |  Branch (434:36): [True: 3.19M, False: 399k]
  ------------------
  435|  3.19M|            const int color_idx = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  3.19M|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  436|  3.19M|                                      color_map_cdf[ctx[m]], pal_sz - 1);
  437|  3.19M|            pal_tmp[(i - j) * stride + j] = order[m][color_idx];
  438|  3.19M|        }
  439|   399k|    }
  440|       |
  441|  16.2k|    t->c->pal_dsp.pal_idx_finish(pal_idx, pal_tmp, bw4 * 4, bh4 * 4,
  442|  16.2k|                                 w4 * 4, h4 * 4);
  443|  16.2k|}
decode.c:order_palette:
  356|   399k|{
  357|   399k|    int have_top = i > first;
  358|       |
  359|   399k|    assert(pal_idx);
  ------------------
  |  |  140|   399k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 399k]
  |  |  |  Branch (140:68): [Folded, False: 399k]
  |  |  ------------------
  ------------------
  360|   399k|    pal_idx += first + (i - first) * stride;
  361|  3.59M|    for (int j = first, n = 0; j >= last; have_top = 1, j--, n++, pal_idx += stride - 1) {
  ------------------
  |  Branch (361:32): [True: 3.19M, False: 399k]
  ------------------
  362|  3.19M|        const int have_left = j > 0;
  363|       |
  364|  3.19M|        assert(have_left || have_top);
  ------------------
  |  |  140|  3.37M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 3.02M, False: 174k]
  |  |  |  Branch (140:30): [True: 174k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 3.19M]
  |  |  ------------------
  ------------------
  365|       |
  366|  3.19M|#define add(v_in) do { \
  367|  3.19M|        const int v = v_in; \
  368|  3.19M|        assert((unsigned)v < 8U); \
  369|  3.19M|        order[n][o_idx++] = v; \
  370|  3.19M|        mask |= 1 << v; \
  371|  3.19M|    } while (0)
  372|       |
  373|  3.19M|        unsigned mask = 0;
  374|  3.19M|        int o_idx = 0;
  375|  3.19M|        if (!have_left) {
  ------------------
  |  Branch (375:13): [True: 174k, False: 3.02M]
  ------------------
  376|   174k|            ctx[n] = 0;
  377|   174k|            add(pal_idx[-stride]);
  ------------------
  |  |  366|   174k|#define add(v_in) do { \
  |  |  367|   174k|        const int v = v_in; \
  |  |  368|   174k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   174k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 174k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 174k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   174k|        order[n][o_idx++] = v; \
  |  |  370|   174k|        mask |= 1 << v; \
  |  |  371|   174k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 174k]
  |  |  ------------------
  ------------------
  378|  3.02M|        } else if (!have_top) {
  ------------------
  |  Branch (378:20): [True: 224k, False: 2.79M]
  ------------------
  379|   224k|            ctx[n] = 0;
  380|   224k|            add(pal_idx[-1]);
  ------------------
  |  |  366|   224k|#define add(v_in) do { \
  |  |  367|   224k|        const int v = v_in; \
  |  |  368|   224k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   224k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 224k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 224k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   224k|        order[n][o_idx++] = v; \
  |  |  370|   224k|        mask |= 1 << v; \
  |  |  371|   224k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 224k]
  |  |  ------------------
  ------------------
  381|  2.79M|        } else {
  382|  2.79M|            const int l = pal_idx[-1], t = pal_idx[-stride], tl = pal_idx[-(stride + 1)];
  383|  2.79M|            const int same_t_l = t == l;
  384|  2.79M|            const int same_t_tl = t == tl;
  385|  2.79M|            const int same_l_tl = l == tl;
  386|  2.79M|            const int same_all = same_t_l & same_t_tl & same_l_tl;
  387|       |
  388|  2.79M|            if (same_all) {
  ------------------
  |  Branch (388:17): [True: 1.58M, False: 1.21M]
  ------------------
  389|  1.58M|                ctx[n] = 4;
  390|  1.58M|                add(t);
  ------------------
  |  |  366|  1.58M|#define add(v_in) do { \
  |  |  367|  1.58M|        const int v = v_in; \
  |  |  368|  1.58M|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|  1.58M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 1.58M]
  |  |  |  |  |  Branch (140:68): [Folded, False: 1.58M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|  1.58M|        order[n][o_idx++] = v; \
  |  |  370|  1.58M|        mask |= 1 << v; \
  |  |  371|  1.58M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 1.58M]
  |  |  ------------------
  ------------------
  391|  1.58M|            } else if (same_t_l) {
  ------------------
  |  Branch (391:24): [True: 89.3k, False: 1.12M]
  ------------------
  392|  89.3k|                ctx[n] = 3;
  393|  89.3k|                add(t);
  ------------------
  |  |  366|  89.3k|#define add(v_in) do { \
  |  |  367|  89.3k|        const int v = v_in; \
  |  |  368|  89.3k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|  89.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 89.3k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 89.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|  89.3k|        order[n][o_idx++] = v; \
  |  |  370|  89.3k|        mask |= 1 << v; \
  |  |  371|  89.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 89.3k]
  |  |  ------------------
  ------------------
  394|  89.3k|                add(tl);
  ------------------
  |  |  366|  89.3k|#define add(v_in) do { \
  |  |  367|  89.3k|        const int v = v_in; \
  |  |  368|  89.3k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|  89.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 89.3k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 89.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|  89.3k|        order[n][o_idx++] = v; \
  |  |  370|  89.3k|        mask |= 1 << v; \
  |  |  371|  89.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 89.3k]
  |  |  ------------------
  ------------------
  395|  1.12M|            } else if (same_t_tl | same_l_tl) {
  ------------------
  |  Branch (395:24): [True: 904k, False: 222k]
  ------------------
  396|   904k|                ctx[n] = 2;
  397|   904k|                add(tl);
  ------------------
  |  |  366|   904k|#define add(v_in) do { \
  |  |  367|   904k|        const int v = v_in; \
  |  |  368|   904k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   904k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 904k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 904k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   904k|        order[n][o_idx++] = v; \
  |  |  370|   904k|        mask |= 1 << v; \
  |  |  371|   904k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 904k]
  |  |  ------------------
  ------------------
  398|   904k|                add(same_t_tl ? l : t);
  ------------------
  |  |  366|   904k|#define add(v_in) do { \
  |  |  367|  1.80M|        const int v = v_in; \
  |  |  ------------------
  |  |  |  Branch (367:23): [True: 454k, False: 449k]
  |  |  ------------------
  |  |  368|   904k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   904k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 904k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 904k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   904k|        order[n][o_idx++] = v; \
  |  |  370|   904k|        mask |= 1 << v; \
  |  |  371|   904k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 904k]
  |  |  ------------------
  ------------------
  399|   904k|            } else {
  400|   222k|                ctx[n] = 1;
  401|   222k|                add(imin(t, l));
  ------------------
  |  |  366|   222k|#define add(v_in) do { \
  |  |  367|   222k|        const int v = v_in; \
  |  |  368|   222k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   222k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 222k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 222k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   222k|        order[n][o_idx++] = v; \
  |  |  370|   222k|        mask |= 1 << v; \
  |  |  371|   222k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 222k]
  |  |  ------------------
  ------------------
  402|   222k|                add(imax(t, l));
  ------------------
  |  |  366|   222k|#define add(v_in) do { \
  |  |  367|   222k|        const int v = v_in; \
  |  |  368|   222k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   222k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 222k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 222k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   222k|        order[n][o_idx++] = v; \
  |  |  370|   222k|        mask |= 1 << v; \
  |  |  371|   222k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 222k]
  |  |  ------------------
  ------------------
  403|   222k|                add(tl);
  ------------------
  |  |  366|   222k|#define add(v_in) do { \
  |  |  367|   222k|        const int v = v_in; \
  |  |  368|   222k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   222k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 222k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 222k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   222k|        order[n][o_idx++] = v; \
  |  |  370|   222k|        mask |= 1 << v; \
  |  |  371|   222k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 222k]
  |  |  ------------------
  ------------------
  404|   222k|            }
  405|  2.79M|        }
  406|  28.7M|        for (unsigned m = 1, bit = 0; m < 0x100; m <<= 1, bit++)
  ------------------
  |  Branch (406:39): [True: 25.5M, False: 3.19M]
  ------------------
  407|  25.5M|            if (!(mask & m))
  ------------------
  |  Branch (407:17): [True: 20.9M, False: 4.63M]
  ------------------
  408|  20.9M|                order[n][o_idx++] = bit;
  409|  3.19M|        assert(o_idx == 8);
  ------------------
  |  |  140|  3.19M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.19M]
  |  |  |  Branch (140:68): [Folded, False: 3.19M]
  |  |  ------------------
  ------------------
  410|  3.19M|#undef add
  411|  3.19M|    }
  412|   399k|}
decode.c:splat_intraref:
  566|   248k|{
  567|   248k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  568|   248k|        .ref.ref = { 0, -1 },
  569|   248k|        .mv.mv[0].n = INVALID_MV,
  ------------------
  |  |   40|   248k|#define INVALID_MV 0x80008000
  ------------------
  570|   248k|        .bs = bs,
  571|   248k|        .mf = 0,
  572|   248k|    };
  573|   248k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  574|   248k|}
decode.c:read_mv_residual:
  109|   200k|{
  110|   200k|    MsacContext *const msac = &ts->msac;
  111|   200k|    const enum MVJoint mv_joint =
  112|   200k|        dav1d_msac_decode_symbol_adapt4(msac, ts->cdf.mv.joint, N_MV_JOINTS - 1);
  ------------------
  |  |   47|   200k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  113|   200k|    if (mv_joint & MV_JOINT_V)
  ------------------
  |  Branch (113:9): [True: 174k, False: 26.2k]
  ------------------
  114|   174k|        ref_mv->y += read_mv_component_diff(msac, &ts->cdf.mv.comp[0], mv_prec);
  115|   200k|    if (mv_joint & MV_JOINT_H)
  ------------------
  |  Branch (115:9): [True: 172k, False: 28.1k]
  ------------------
  116|   172k|        ref_mv->x += read_mv_component_diff(msac, &ts->cdf.mv.comp[1], mv_prec);
  117|   200k|}
decode.c:read_mv_component_diff:
   79|   347k|{
   80|   347k|    const int sign = dav1d_msac_decode_bool_adapt(msac, mv_comp->sign);
  ------------------
  |  |   52|   347k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   81|   347k|    const int cl = dav1d_msac_decode_symbol_adapt16(msac, mv_comp->classes, 10);
  ------------------
  |  |   57|   347k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
   82|   347k|    int up, fp = 3, hp = 1;
   83|       |
   84|   347k|    if (!cl) {
  ------------------
  |  Branch (84:9): [True: 82.3k, False: 264k]
  ------------------
   85|  82.3k|        up = dav1d_msac_decode_bool_adapt(msac, mv_comp->class0);
  ------------------
  |  |   52|  82.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   86|  82.3k|        if (mv_prec >= 0) {  // !force_integer_mv
  ------------------
  |  Branch (86:13): [True: 19.5k, False: 62.8k]
  ------------------
   87|  19.5k|            fp = dav1d_msac_decode_symbol_adapt4(msac, mv_comp->class0_fp[up], 3);
  ------------------
  |  |   47|  19.5k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
   88|  19.5k|            if (mv_prec > 0) // allow_high_precision_mv
  ------------------
  |  Branch (88:17): [True: 11.2k, False: 8.28k]
  ------------------
   89|  11.2k|                hp = dav1d_msac_decode_bool_adapt(msac, mv_comp->class0_hp);
  ------------------
  |  |   52|  11.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   90|  19.5k|        }
   91|   264k|    } else {
   92|   264k|        up = 1 << cl;
   93|  2.81M|        for (int n = 0; n < cl; n++)
  ------------------
  |  Branch (93:25): [True: 2.55M, False: 264k]
  ------------------
   94|  2.55M|            up |= dav1d_msac_decode_bool_adapt(msac, mv_comp->classN[n]) << n;
  ------------------
  |  |   52|  2.55M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   95|   264k|        if (mv_prec >= 0) {  // !force_integer_mv
  ------------------
  |  Branch (95:13): [True: 8.30k, False: 256k]
  ------------------
   96|  8.30k|            fp = dav1d_msac_decode_symbol_adapt4(msac, mv_comp->classN_fp, 3);
  ------------------
  |  |   47|  8.30k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
   97|  8.30k|            if (mv_prec > 0) // allow_high_precision_mv
  ------------------
  |  Branch (97:17): [True: 4.46k, False: 3.84k]
  ------------------
   98|  4.46k|                hp = dav1d_msac_decode_bool_adapt(msac, mv_comp->classN_hp);
  ------------------
  |  |   52|  4.46k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   99|  8.30k|        }
  100|   264k|    }
  101|       |
  102|   347k|    const int diff = ((up << 3) | (fp << 1) | hp) + 1;
  103|       |
  104|   347k|    return sign ? -diff : diff;
  ------------------
  |  Branch (104:12): [True: 299k, False: 47.5k]
  ------------------
  105|   347k|}
decode.c:read_vartx_tree:
  448|   243k|{
  449|   243k|    const Dav1dFrameContext *const f = t->f;
  450|   243k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  451|   243k|    const int bw4 = b_dim[0], bh4 = b_dim[1];
  452|       |
  453|       |    // var-tx tree coding
  454|   243k|    uint16_t tx_split[2] = { 0 };
  455|   243k|    b->max_ytx = dav1d_max_txfm_size_for_bs[bs][0];
  456|   243k|    if (!b->skip && (f->frame_hdr->segmentation.lossless[b->seg_id] ||
  ------------------
  |  Branch (456:9): [True: 75.4k, False: 168k]
  |  Branch (456:22): [True: 1.93k, False: 73.5k]
  ------------------
  457|  73.5k|                     b->max_ytx == TX_4X4))
  ------------------
  |  Branch (457:22): [True: 4.87k, False: 68.6k]
  ------------------
  458|  6.80k|    {
  459|  6.80k|        b->max_ytx = b->uvtx = TX_4X4;
  460|  6.80k|        if (f->frame_hdr->txfm_mode == DAV1D_TX_SWITCHABLE) {
  ------------------
  |  Branch (460:13): [True: 1.72k, False: 5.08k]
  ------------------
  461|  1.72k|            dav1d_memset_pow2[b_dim[2]](&t->a->tx[bx4], TX_4X4);
  462|  1.72k|            dav1d_memset_pow2[b_dim[3]](&t->l.tx[by4], TX_4X4);
  463|  1.72k|        }
  464|   236k|    } else if (f->frame_hdr->txfm_mode != DAV1D_TX_SWITCHABLE || b->skip) {
  ------------------
  |  Branch (464:16): [True: 170k, False: 66.0k]
  |  Branch (464:66): [True: 43.1k, False: 22.9k]
  ------------------
  465|   214k|        if (f->frame_hdr->txfm_mode == DAV1D_TX_SWITCHABLE) {
  ------------------
  |  Branch (465:13): [True: 43.1k, False: 170k]
  ------------------
  466|  43.1k|            dav1d_memset_pow2[b_dim[2]](&t->a->tx[bx4], b_dim[2 + 0]);
  467|  43.1k|            dav1d_memset_pow2[b_dim[3]](&t->l.tx[by4], b_dim[2 + 1]);
  468|  43.1k|        }
  469|   214k|        b->uvtx = dav1d_max_txfm_size_for_bs[bs][f->cur.p.layout];
  470|   214k|    } else {
  471|  22.9k|        assert(bw4 <= 16 || bh4 <= 16 || b->max_ytx == TX_64X64);
  ------------------
  |  |  140|  46.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 22.6k, False: 274]
  |  |  |  Branch (140:30): [True: 94, False: 180]
  |  |  |  Branch (140:30): [True: 180, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 22.9k]
  |  |  ------------------
  ------------------
  472|  22.9k|        int y, x, y_off, x_off;
  473|  22.9k|        const TxfmInfo *const ytx = &dav1d_txfm_dimensions[b->max_ytx];
  474|  46.4k|        for (y = 0, y_off = 0; y < bh4; y += ytx->h, y_off++) {
  ------------------
  |  Branch (474:32): [True: 23.5k, False: 22.9k]
  ------------------
  475|  47.5k|            for (x = 0, x_off = 0; x < bw4; x += ytx->w, x_off++) {
  ------------------
  |  Branch (475:36): [True: 23.9k, False: 23.5k]
  ------------------
  476|  23.9k|                read_tx_tree(t, b->max_ytx, 0, tx_split, x_off, y_off);
  477|       |                // contexts are updated inside read_tx_tree()
  478|  23.9k|                t->bx += ytx->w;
  479|  23.9k|            }
  480|  23.5k|            t->bx -= x;
  481|  23.5k|            t->by += ytx->h;
  482|  23.5k|        }
  483|  22.9k|        t->by -= y;
  484|  22.9k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  22.9k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 22.9k]
  |  |  ------------------
  |  |   35|  22.9k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  22.9k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  485|      0|            printf("Post-vartxtree[%x/%x]: r=%d\n",
  486|      0|                   tx_split[0], tx_split[1], t->ts->msac.rng);
  487|  22.9k|        b->uvtx = dav1d_max_txfm_size_for_bs[bs][f->cur.p.layout];
  488|  22.9k|    }
  489|   243k|    assert(!(tx_split[0] & ~0x33));
  ------------------
  |  |  140|   243k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 243k]
  |  |  |  Branch (140:68): [Folded, False: 243k]
  |  |  ------------------
  ------------------
  490|   243k|    b->tx_split0 = (uint8_t)tx_split[0];
  491|   243k|    b->tx_split1 = tx_split[1];
  492|   243k|}
decode.c:read_tx_tree:
  123|  49.3k|{
  124|  49.3k|    const Dav1dFrameContext *const f = t->f;
  125|  49.3k|    const int bx4 = t->bx & 31, by4 = t->by & 31;
  126|  49.3k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[from];
  127|  49.3k|    const int txw = t_dim->lw, txh = t_dim->lh;
  128|  49.3k|    int is_split;
  129|       |
  130|  49.3k|    if (depth < 2 && from > (int) TX_4X4) {
  ------------------
  |  Branch (130:9): [True: 40.5k, False: 8.81k]
  |  Branch (130:22): [True: 40.5k, False: 0]
  ------------------
  131|  40.5k|        const int cat = 2 * (TX_64X64 - t_dim->max) - depth;
  132|  40.5k|        const int a = t->a->tx[bx4] < txw;
  133|  40.5k|        const int l = t->l.tx[by4] < txh;
  134|       |
  135|  40.5k|        is_split = dav1d_msac_decode_bool_adapt(&t->ts->msac,
  ------------------
  |  |   52|  40.5k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  136|  40.5k|                       t->ts->cdf.m.txpart[cat][a + l]);
  137|  40.5k|        if (is_split)
  ------------------
  |  Branch (137:13): [True: 12.8k, False: 27.7k]
  ------------------
  138|  12.8k|            masks[depth] |= 1 << (y_off * 4 + x_off);
  139|  40.5k|    } else {
  140|  8.81k|        is_split = 0;
  141|  8.81k|    }
  142|       |
  143|  49.3k|    if (is_split && t_dim->max > TX_8X8) {
  ------------------
  |  Branch (143:9): [True: 12.8k, False: 36.5k]
  |  Branch (143:21): [True: 9.48k, False: 3.38k]
  ------------------
  144|  9.48k|        const enum RectTxfmSize sub = t_dim->sub;
  145|  9.48k|        const TxfmInfo *const sub_t_dim = &dav1d_txfm_dimensions[sub];
  146|  9.48k|        const int txsw = sub_t_dim->w, txsh = sub_t_dim->h;
  147|       |
  148|  9.48k|        read_tx_tree(t, sub, depth + 1, masks, x_off * 2 + 0, y_off * 2 + 0);
  149|  9.48k|        t->bx += txsw;
  150|  9.48k|        if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (150:13): [True: 7.43k, False: 2.04k]
  |  Branch (150:27): [True: 6.61k, False: 823]
  ------------------
  151|  6.61k|            read_tx_tree(t, sub, depth + 1, masks, x_off * 2 + 1, y_off * 2 + 0);
  152|  9.48k|        t->bx -= txsw;
  153|  9.48k|        t->by += txsh;
  154|  9.48k|        if (txh >= txw && t->by < f->bh) {
  ------------------
  |  Branch (154:13): [True: 6.52k, False: 2.96k]
  |  Branch (154:27): [True: 6.05k, False: 471]
  ------------------
  155|  6.05k|            read_tx_tree(t, sub, depth + 1, masks, x_off * 2 + 0, y_off * 2 + 1);
  156|  6.05k|            t->bx += txsw;
  157|  6.05k|            if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (157:17): [True: 4.02k, False: 2.02k]
  |  Branch (157:31): [True: 3.24k, False: 782]
  ------------------
  158|  3.24k|                read_tx_tree(t, sub, depth + 1, masks,
  159|  3.24k|                             x_off * 2 + 1, y_off * 2 + 1);
  160|  6.05k|            t->bx -= txsw;
  161|  6.05k|        }
  162|  9.48k|        t->by -= txsh;
  163|  39.8k|    } else {
  164|  39.8k|        dav1d_memset_pow2[t_dim->lw](&t->a->tx[bx4], is_split ? TX_4X4 : txw);
  ------------------
  |  Branch (164:54): [True: 3.38k, False: 36.5k]
  ------------------
  165|  39.8k|        dav1d_memset_pow2[t_dim->lh](&t->l.tx[by4], is_split ? TX_4X4 : txh);
  ------------------
  |  Branch (165:53): [True: 3.38k, False: 36.5k]
  ------------------
  166|  39.8k|    }
  167|  49.3k|}
decode.c:splat_intrabc_mv:
  535|   178k|{
  536|   178k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  537|   178k|        .ref.ref = { 0, -1 },
  538|   178k|        .mv.mv[0] = b->mv[0],
  539|   178k|        .bs = bs,
  540|   178k|        .mf = 0,
  541|   178k|    };
  542|   178k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  543|   178k|}
decode.c:findoddzero:
  339|  20.5k|static inline int findoddzero(const uint8_t *buf, int len) {
  340|  22.1k|    for (int n = 0; n < len; n++)
  ------------------
  |  Branch (340:21): [True: 21.3k, False: 811]
  ------------------
  341|  21.3k|        if (!buf[n * 2]) return 1;
  ------------------
  |  Branch (341:13): [True: 19.7k, False: 1.62k]
  ------------------
  342|    811|    return 0;
  343|  20.5k|}
decode.c:find_matching_ref:
  197|  19.7k|{
  198|  19.7k|    /*const*/ refmvs_block *const *r = &t->rt.r[(t->by & 31) + 5];
  199|  19.7k|    int count = 0;
  200|  19.7k|    int have_topleft = have_top && have_left;
  ------------------
  |  Branch (200:24): [True: 16.2k, False: 3.52k]
  |  Branch (200:36): [True: 14.3k, False: 1.89k]
  ------------------
  201|  19.7k|    int have_topright = imax(bw4, bh4) < 32 &&
  ------------------
  |  Branch (201:25): [True: 19.5k, False: 228]
  ------------------
  202|  19.5k|                        have_top && t->bx + bw4 < t->ts->tiling.col_end &&
  ------------------
  |  Branch (202:25): [True: 16.1k, False: 3.31k]
  |  Branch (202:37): [True: 14.4k, False: 1.73k]
  ------------------
  203|  14.4k|                        (intra_edge_flags & EDGE_I444_TOP_HAS_RIGHT);
  ------------------
  |  Branch (203:25): [True: 8.90k, False: 5.56k]
  ------------------
  204|       |
  205|  19.7k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  206|  19.7k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  207|       |
  208|  19.7k|    if (have_top) {
  ------------------
  |  Branch (208:9): [True: 16.2k, False: 3.52k]
  ------------------
  209|  16.2k|        const refmvs_block *r2 = &r[-1][t->bx];
  210|  16.2k|        if (matches(r2)) {
  ------------------
  |  |  206|  16.2k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 11.2k, False: 4.97k]
  |  |  |  Branch (206:53): [True: 10.4k, False: 828]
  |  |  ------------------
  ------------------
  211|  10.4k|            masks[0] |= 1;
  212|  10.4k|            count = 1;
  213|  10.4k|        }
  214|  16.2k|        int aw4 = bs(r2)[0];
  ------------------
  |  |  205|  16.2k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  215|  16.2k|        if (aw4 >= bw4) {
  ------------------
  |  Branch (215:13): [True: 13.6k, False: 2.53k]
  ------------------
  216|  13.6k|            const int off = t->bx & (aw4 - 1);
  217|  13.6k|            if (off) have_topleft = 0;
  ------------------
  |  Branch (217:17): [True: 2.47k, False: 11.2k]
  ------------------
  218|  13.6k|            if (aw4 - off > bw4) have_topright = 0;
  ------------------
  |  Branch (218:17): [True: 2.68k, False: 10.9k]
  ------------------
  219|  13.6k|        } else {
  220|  2.53k|            unsigned mask = 1 << aw4;
  221|  5.83k|            for (int x = aw4; x < w4; x += aw4) {
  ------------------
  |  Branch (221:31): [True: 3.30k, False: 2.53k]
  ------------------
  222|  3.30k|                r2 += aw4;
  223|  3.30k|                if (matches(r2)) {
  ------------------
  |  |  206|  3.30k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 1.81k, False: 1.48k]
  |  |  |  Branch (206:53): [True: 1.69k, False: 119]
  |  |  ------------------
  ------------------
  224|  1.69k|                    masks[0] |= mask;
  225|  1.69k|                    if (++count >= 8) return;
  ------------------
  |  Branch (225:25): [True: 3, False: 1.69k]
  ------------------
  226|  1.69k|                }
  227|  3.29k|                aw4 = bs(r2)[0];
  ------------------
  |  |  205|  3.29k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  228|  3.29k|                mask <<= aw4;
  229|  3.29k|            }
  230|  2.53k|        }
  231|  16.2k|    }
  232|  19.7k|    if (have_left) {
  ------------------
  |  Branch (232:9): [True: 17.8k, False: 1.89k]
  ------------------
  233|  17.8k|        /*const*/ refmvs_block *const *r2 = r;
  234|  17.8k|        if (matches(&r2[0][t->bx - 1])) {
  ------------------
  |  |  206|  17.8k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 12.9k, False: 4.91k]
  |  |  |  Branch (206:53): [True: 12.0k, False: 912]
  |  |  ------------------
  ------------------
  235|  12.0k|            masks[1] |= 1;
  236|  12.0k|            if (++count >= 8) return;
  ------------------
  |  Branch (236:17): [True: 4, False: 12.0k]
  ------------------
  237|  12.0k|        }
  238|  17.8k|        int lh4 = bs(&r2[0][t->bx - 1])[1];
  ------------------
  |  |  205|  17.8k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  239|  17.8k|        if (lh4 >= bh4) {
  ------------------
  |  Branch (239:13): [True: 15.1k, False: 2.70k]
  ------------------
  240|  15.1k|            if (t->by & (lh4 - 1)) have_topleft = 0;
  ------------------
  |  Branch (240:17): [True: 2.41k, False: 12.7k]
  ------------------
  241|  15.1k|        } else {
  242|  2.70k|            unsigned mask = 1 << lh4;
  243|  6.80k|            for (int y = lh4; y < h4; y += lh4) {
  ------------------
  |  Branch (243:31): [True: 4.11k, False: 2.68k]
  ------------------
  244|  4.11k|                r2 += lh4;
  245|  4.11k|                if (matches(&r2[0][t->bx - 1])) {
  ------------------
  |  |  206|  4.11k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 2.06k, False: 2.05k]
  |  |  |  Branch (206:53): [True: 1.91k, False: 152]
  |  |  ------------------
  ------------------
  246|  1.91k|                    masks[1] |= mask;
  247|  1.91k|                    if (++count >= 8) return;
  ------------------
  |  Branch (247:25): [True: 14, False: 1.90k]
  ------------------
  248|  1.91k|                }
  249|  4.10k|                lh4 = bs(&r2[0][t->bx - 1])[1];
  ------------------
  |  |  205|  4.10k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  250|  4.10k|                mask <<= lh4;
  251|  4.10k|            }
  252|  2.70k|        }
  253|  17.8k|    }
  254|  19.7k|    if (have_topleft && matches(&r[-1][t->bx - 1])) {
  ------------------
  |  |  206|  9.40k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 5.70k, False: 3.70k]
  |  |  |  Branch (206:53): [True: 5.21k, False: 492]
  |  |  ------------------
  ------------------
  |  Branch (254:9): [True: 9.40k, False: 10.3k]
  ------------------
  255|  5.21k|        masks[1] |= 1ULL << 32;
  256|  5.21k|        if (++count >= 8) return;
  ------------------
  |  Branch (256:13): [True: 13, False: 5.20k]
  ------------------
  257|  5.21k|    }
  258|  19.7k|    if (have_topright && matches(&r[-1][t->bx + bw4])) {
  ------------------
  |  |  206|  6.33k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 3.71k, False: 2.61k]
  |  |  |  Branch (206:53): [True: 3.38k, False: 339]
  |  |  ------------------
  ------------------
  |  Branch (258:9): [True: 6.33k, False: 13.3k]
  ------------------
  259|  3.38k|        masks[0] |= 1ULL << 32;
  260|  3.38k|    }
  261|  19.7k|#undef matches
  262|  19.7k|}
decode.c:derive_warpmv:
  268|  3.28k|{
  269|  3.28k|    int pts[8][2 /* in, out */][2 /* x, y */], np = 0;
  270|  3.28k|    /*const*/ refmvs_block *const *r = &t->rt.r[(t->by & 31) + 5];
  271|       |
  272|  3.28k|#define add_sample(dx, dy, sx, sy, rp) do { \
  273|  3.28k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  274|  3.28k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  275|  3.28k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  276|  3.28k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  277|  3.28k|    np++; \
  278|  3.28k|} while (0)
  279|       |
  280|       |    // use masks[] to find the projectable motion vectors in the edges
  281|  3.28k|    if ((unsigned) masks[0] == 1 && !(masks[1] >> 32)) {
  ------------------
  |  Branch (281:9): [True: 1.81k, False: 1.46k]
  |  Branch (281:37): [True: 772, False: 1.04k]
  ------------------
  282|    772|        const int off = t->bx & (bs(&r[-1][t->bx])[0] - 1);
  ------------------
  |  |  205|    772|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  283|    772|        add_sample(-off, 0, 1, -1, &r[-1][t->bx]);
  ------------------
  |  |  272|    772|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|    772|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|    772|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|    772|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|    772|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|    772|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|    772|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|    772|    np++; \
  |  |  278|    772|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 772]
  |  |  ------------------
  ------------------
  284|  4.37k|    } else for (unsigned off = 0, xmask = (uint32_t) masks[0]; np < 8 && xmask;) { // top
  ------------------
  |  Branch (284:64): [True: 4.36k, False: 1]
  |  Branch (284:74): [True: 1.86k, False: 2.50k]
  ------------------
  285|  1.86k|        const int tz = ctz(xmask);
  286|  1.86k|        off += tz;
  287|  1.86k|        xmask >>= tz;
  288|  1.86k|        add_sample(off, 0, 1, -1, &r[-1][t->bx + off]);
  ------------------
  |  |  272|  1.86k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.86k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.86k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.86k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.86k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.86k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.86k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.86k|    np++; \
  |  |  278|  1.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.86k]
  |  |  ------------------
  ------------------
  289|  1.86k|        xmask &= ~1;
  290|  1.86k|    }
  291|  3.28k|    if (np < 8 && masks[1] == 1) {
  ------------------
  |  Branch (291:9): [True: 3.28k, False: 1]
  |  Branch (291:19): [True: 1.30k, False: 1.97k]
  ------------------
  292|  1.30k|        const int off = t->by & (bs(&r[0][t->bx - 1])[1] - 1);
  ------------------
  |  |  205|  1.30k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  293|  1.30k|        add_sample(0, -off, -1, 1, &r[-off][t->bx - 1]);
  ------------------
  |  |  272|  1.30k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.30k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.30k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.30k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.30k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.30k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.30k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.30k|    np++; \
  |  |  278|  1.30k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.30k]
  |  |  ------------------
  ------------------
  294|  3.67k|    } else for (unsigned off = 0, ymask = (uint32_t) masks[1]; np < 8 && ymask;) { // left
  ------------------
  |  Branch (294:64): [True: 3.67k, False: 5]
  |  Branch (294:74): [True: 1.70k, False: 1.97k]
  ------------------
  295|  1.70k|        const int tz = ctz(ymask);
  296|  1.70k|        off += tz;
  297|  1.70k|        ymask >>= tz;
  298|  1.70k|        add_sample(0, off, -1, 1, &r[off][t->bx - 1]);
  ------------------
  |  |  272|  1.70k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.70k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.70k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.70k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.70k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.70k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.70k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.70k|    np++; \
  |  |  278|  1.70k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.70k]
  |  |  ------------------
  ------------------
  299|  1.70k|        ymask &= ~1;
  300|  1.70k|    }
  301|  3.28k|    if (np < 8 && masks[1] >> 32) // top/left
  ------------------
  |  Branch (301:9): [True: 3.27k, False: 5]
  |  Branch (301:19): [True: 1.37k, False: 1.90k]
  ------------------
  302|  1.37k|        add_sample(0, 0, -1, -1, &r[-1][t->bx - 1]);
  ------------------
  |  |  272|  1.37k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.37k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.37k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.37k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.37k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.37k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.37k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.37k|    np++; \
  |  |  278|  1.37k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.37k]
  |  |  ------------------
  ------------------
  303|  3.28k|    if (np < 8 && masks[0] >> 32) // top/right
  ------------------
  |  Branch (303:9): [True: 3.27k, False: 6]
  |  Branch (303:19): [True: 1.16k, False: 2.11k]
  ------------------
  304|  1.16k|        add_sample(bw4, 0, 1, -1, &r[-1][t->bx + bw4]);
  ------------------
  |  |  272|  1.16k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.16k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.16k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.16k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.16k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.16k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.16k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.16k|    np++; \
  |  |  278|  1.16k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.16k]
  |  |  ------------------
  ------------------
  305|  3.28k|    assert(np > 0 && np <= 8);
  ------------------
  |  |  140|  6.56k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 3.28k, False: 0]
  |  |  |  Branch (140:30): [True: 3.28k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 3.28k]
  |  |  ------------------
  ------------------
  306|  3.28k|#undef bs
  307|       |
  308|       |    // select according to motion vector difference against a threshold
  309|  3.28k|    int mvd[8], ret = 0;
  310|  3.28k|    const int thresh = 4 * iclip(imax(bw4, bh4), 4, 28);
  311|  11.4k|    for (int i = 0; i < np; i++) {
  ------------------
  |  Branch (311:21): [True: 8.18k, False: 3.28k]
  ------------------
  312|  8.18k|        mvd[i] = abs(pts[i][1][0] - pts[i][0][0] - mv.x) +
  313|  8.18k|                 abs(pts[i][1][1] - pts[i][0][1] - mv.y);
  314|  8.18k|        if (mvd[i] > thresh)
  ------------------
  |  Branch (314:13): [True: 3.36k, False: 4.81k]
  ------------------
  315|  3.36k|            mvd[i] = -1;
  316|  4.81k|        else
  317|  4.81k|            ret++;
  318|  8.18k|    }
  319|  3.28k|    if (!ret) {
  ------------------
  |  Branch (319:9): [True: 869, False: 2.41k]
  ------------------
  320|    869|        ret = 1;
  321|  3.15k|    } else for (int i = 0, j = np - 1, k = 0; k < np - ret; k++, i++, j--) {
  ------------------
  |  Branch (321:47): [True: 1.35k, False: 1.80k]
  ------------------
  322|  2.07k|        while (mvd[i] != -1) i++;
  ------------------
  |  Branch (322:16): [True: 724, False: 1.35k]
  ------------------
  323|  2.33k|        while (mvd[j] == -1) j--;
  ------------------
  |  Branch (323:16): [True: 986, False: 1.35k]
  ------------------
  324|  1.35k|        assert(i != j);
  ------------------
  |  |  140|  1.35k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.35k]
  |  |  |  Branch (140:68): [Folded, False: 1.35k]
  |  |  ------------------
  ------------------
  325|  1.35k|        if (i > j) break;
  ------------------
  |  Branch (325:13): [True: 608, False: 743]
  ------------------
  326|       |        // replace the discarded samples;
  327|    743|        mvd[i] = mvd[j];
  328|    743|        memcpy(pts[i], pts[j], sizeof(*pts));
  329|    743|    }
  330|       |
  331|  3.28k|    if (!dav1d_find_affine_int(pts, ret, bw4, bh4, mv, wmp, t->bx, t->by) &&
  ------------------
  |  Branch (331:9): [True: 3.03k, False: 250]
  ------------------
  332|  3.03k|        !dav1d_get_shear_params(wmp))
  ------------------
  |  Branch (332:9): [True: 2.78k, False: 252]
  ------------------
  333|  2.78k|    {
  334|  2.78k|        wmp->type = DAV1D_WM_TYPE_AFFINE;
  335|  2.78k|    } else
  336|    502|        wmp->type = DAV1D_WM_TYPE_IDENTITY;
  337|  3.28k|}
decode.c:splat_tworef_mv:
  550|  13.1k|{
  551|  13.1k|    assert(bw4 >= 2 && bh4 >= 2);
  ------------------
  |  |  140|  26.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 13.1k, False: 0]
  |  |  |  Branch (140:30): [True: 13.1k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 13.1k]
  |  |  ------------------
  ------------------
  552|  13.1k|    const enum CompInterPredMode mode = b->inter_mode;
  553|  13.1k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  554|  13.1k|        .ref.ref = { b->ref[0] + 1, b->ref[1] + 1 },
  555|  13.1k|        .mv.mv = { b->mv[0], b->mv[1] },
  556|  13.1k|        .bs = bs,
  557|  13.1k|        .mf = (mode == GLOBALMV_GLOBALMV) | !!((1 << mode) & (0xbc)) * 2,
  558|  13.1k|    };
  559|  13.1k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  560|  13.1k|}
decode.c:splat_oneref_mv:
  519|  52.1k|{
  520|  52.1k|    const enum InterPredMode mode = b->inter_mode;
  521|  52.1k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  522|  52.1k|        .ref.ref = { b->ref[0] + 1, b->interintra_type ? 0 : -1 },
  ------------------
  |  Branch (522:37): [True: 1.20k, False: 50.9k]
  ------------------
  523|  52.1k|        .mv.mv[0] = b->mv[0],
  524|  52.1k|        .bs = bs,
  525|  52.1k|        .mf = (mode == GLOBALMV && imin(bw4, bh4) >= 2) | ((mode == NEWMV) * 2),
  ------------------
  |  Branch (525:16): [True: 11.1k, False: 40.9k]
  |  Branch (525:36): [True: 6.92k, False: 4.24k]
  ------------------
  526|  52.1k|    };
  527|  52.1k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  528|  52.1k|}
decode.c:read_restoration_info:
 2514|  78.2k|{
 2515|  78.2k|    const Dav1dFrameContext *const f = t->f;
 2516|  78.2k|    Dav1dTileState *const ts = t->ts;
 2517|       |
 2518|  78.2k|    if (frame_type == DAV1D_RESTORATION_SWITCHABLE) {
  ------------------
  |  Branch (2518:9): [True: 23.7k, False: 54.5k]
  ------------------
 2519|  23.7k|        const int filter = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  23.7k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 2520|  23.7k|                               ts->cdf.m.restore_switchable, 2);
 2521|  23.7k|        lr->type = filter + !!filter; /* NONE/WIENER/SGRPROJ */
 2522|  54.5k|    } else {
 2523|  54.5k|        const unsigned type =
 2524|  54.5k|            dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  54.5k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 2525|  54.5k|                frame_type == DAV1D_RESTORATION_WIENER ?
  ------------------
  |  Branch (2525:17): [True: 32.0k, False: 22.5k]
  ------------------
 2526|  32.0k|                ts->cdf.m.restore_wiener : ts->cdf.m.restore_sgrproj);
 2527|  54.5k|        lr->type = type ? frame_type : DAV1D_RESTORATION_NONE;
  ------------------
  |  Branch (2527:20): [True: 25.7k, False: 28.7k]
  ------------------
 2528|  54.5k|    }
 2529|       |
 2530|  78.2k|    if (lr->type == DAV1D_RESTORATION_WIENER) {
  ------------------
  |  Branch (2530:9): [True: 22.6k, False: 55.6k]
  ------------------
 2531|  22.6k|        lr->filter_v[0] = p ? 0 :
  ------------------
  |  Branch (2531:27): [True: 14.6k, False: 8.00k]
  ------------------
 2532|  22.6k|            dav1d_msac_decode_subexp(&ts->msac,
 2533|  8.00k|                ts->lr_ref[p]->filter_v[0] + 5, 16, 1) - 5;
 2534|  22.6k|        lr->filter_v[1] =
 2535|  22.6k|            dav1d_msac_decode_subexp(&ts->msac,
 2536|  22.6k|                ts->lr_ref[p]->filter_v[1] + 23, 32, 2) - 23;
 2537|  22.6k|        lr->filter_v[2] =
 2538|  22.6k|            dav1d_msac_decode_subexp(&ts->msac,
 2539|  22.6k|                ts->lr_ref[p]->filter_v[2] + 17, 64, 3) - 17;
 2540|       |
 2541|  22.6k|        lr->filter_h[0] = p ? 0 :
  ------------------
  |  Branch (2541:27): [True: 14.6k, False: 8.00k]
  ------------------
 2542|  22.6k|            dav1d_msac_decode_subexp(&ts->msac,
 2543|  8.00k|                ts->lr_ref[p]->filter_h[0] + 5, 16, 1) - 5;
 2544|  22.6k|        lr->filter_h[1] =
 2545|  22.6k|            dav1d_msac_decode_subexp(&ts->msac,
 2546|  22.6k|                ts->lr_ref[p]->filter_h[1] + 23, 32, 2) - 23;
 2547|  22.6k|        lr->filter_h[2] =
 2548|  22.6k|            dav1d_msac_decode_subexp(&ts->msac,
 2549|  22.6k|                ts->lr_ref[p]->filter_h[2] + 17, 64, 3) - 17;
 2550|  22.6k|        memcpy(lr->sgr_weights, ts->lr_ref[p]->sgr_weights, sizeof(lr->sgr_weights));
 2551|  22.6k|        ts->lr_ref[p] = lr;
 2552|  22.6k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  22.6k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 22.6k]
  |  |  ------------------
  |  |   35|  22.6k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  22.6k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2553|      0|            printf("Post-lr_wiener[pl=%d,v[%d,%d,%d],h[%d,%d,%d]]: r=%d\n",
 2554|      0|                   p, lr->filter_v[0], lr->filter_v[1],
 2555|      0|                   lr->filter_v[2], lr->filter_h[0],
 2556|      0|                   lr->filter_h[1], lr->filter_h[2], ts->msac.rng);
 2557|  55.6k|    } else if (lr->type == DAV1D_RESTORATION_SGRPROJ) {
  ------------------
  |  Branch (2557:16): [True: 19.2k, False: 36.3k]
  ------------------
 2558|  19.2k|        const unsigned idx = dav1d_msac_decode_bools(&ts->msac, 4);
 2559|  19.2k|        const uint16_t *const sgr_params = dav1d_sgr_params[idx];
 2560|  19.2k|        lr->type += idx;
 2561|  19.2k|        lr->sgr_weights[0] = sgr_params[0] ? dav1d_msac_decode_subexp(&ts->msac,
  ------------------
  |  Branch (2561:30): [True: 14.8k, False: 4.38k]
  ------------------
 2562|  14.8k|            ts->lr_ref[p]->sgr_weights[0] + 96, 128, 4) - 96 : 0;
 2563|  19.2k|        lr->sgr_weights[1] = sgr_params[1] ? dav1d_msac_decode_subexp(&ts->msac,
  ------------------
  |  Branch (2563:30): [True: 14.3k, False: 4.88k]
  ------------------
 2564|  14.3k|            ts->lr_ref[p]->sgr_weights[1] + 32, 128, 4) - 32 : 95;
 2565|  19.2k|        memcpy(lr->filter_v, ts->lr_ref[p]->filter_v, sizeof(lr->filter_v));
 2566|  19.2k|        memcpy(lr->filter_h, ts->lr_ref[p]->filter_h, sizeof(lr->filter_h));
 2567|  19.2k|        ts->lr_ref[p] = lr;
 2568|  19.2k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  19.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 19.2k]
  |  |  ------------------
  |  |   35|  19.2k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  19.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2569|      0|            printf("Post-lr_sgrproj[pl=%d,idx=%d,w[%d,%d]]: r=%d\n",
 2570|      0|                   p, idx, lr->sgr_weights[0],
 2571|      0|                   lr->sgr_weights[1], ts->msac.rng);
 2572|  19.2k|    }
 2573|  78.2k|}
decode.c:init_quant_tables:
   57|  25.5k|{
   58|   127k|    for (int i = 0; i < (frame_hdr->segmentation.enabled ? 8 : 1); i++) {
  ------------------
  |  Branch (58:21): [True: 102k, False: 25.5k]
  |  Branch (58:26): [True: 98.7k, False: 29.2k]
  ------------------
   59|   102k|        const int yac = frame_hdr->segmentation.enabled ?
  ------------------
  |  Branch (59:25): [True: 87.7k, False: 14.6k]
  ------------------
   60|  87.7k|            iclip_u8(qidx + frame_hdr->segmentation.seg_data.d[i].delta_q) : qidx;
   61|   102k|        const int ydc = iclip_u8(yac + frame_hdr->quant.ydc_delta);
   62|   102k|        const int uac = iclip_u8(yac + frame_hdr->quant.uac_delta);
   63|   102k|        const int udc = iclip_u8(yac + frame_hdr->quant.udc_delta);
   64|   102k|        const int vac = iclip_u8(yac + frame_hdr->quant.vac_delta);
   65|   102k|        const int vdc = iclip_u8(yac + frame_hdr->quant.vdc_delta);
   66|       |
   67|   102k|        dq[i][0][0] = dav1d_dq_tbl[seq_hdr->hbd][ydc][0];
   68|   102k|        dq[i][0][1] = dav1d_dq_tbl[seq_hdr->hbd][yac][1];
   69|   102k|        dq[i][1][0] = dav1d_dq_tbl[seq_hdr->hbd][udc][0];
   70|   102k|        dq[i][1][1] = dav1d_dq_tbl[seq_hdr->hbd][uac][1];
   71|   102k|        dq[i][2][0] = dav1d_dq_tbl[seq_hdr->hbd][vdc][0];
   72|   102k|        dq[i][2][1] = dav1d_dq_tbl[seq_hdr->hbd][vac][1];
   73|   102k|    }
   74|  25.5k|}
decode.c:setup_tile:
 2430|  19.1k|{
 2431|  19.1k|    const int col_sb_start = f->frame_hdr->tiling.col_start_sb[tile_col];
 2432|  19.1k|    const int col_sb128_start = col_sb_start >> !f->seq_hdr->sb128;
 2433|  19.1k|    const int col_sb_end = f->frame_hdr->tiling.col_start_sb[tile_col + 1];
 2434|  19.1k|    const int row_sb_start = f->frame_hdr->tiling.row_start_sb[tile_row];
 2435|  19.1k|    const int row_sb_end = f->frame_hdr->tiling.row_start_sb[tile_row + 1];
 2436|  19.1k|    const int sb_shift = f->sb_shift;
 2437|       |
 2438|  19.1k|    const uint8_t *const size_mul = ss_size_mul[f->cur.p.layout];
 2439|  57.5k|    for (int p = 0; p < 2; p++) {
  ------------------
  |  Branch (2439:21): [True: 38.3k, False: 19.1k]
  ------------------
 2440|  38.3k|        ts->frame_thread[p].pal_idx = f->frame_thread.pal_idx ?
  ------------------
  |  Branch (2440:39): [True: 0, False: 38.3k]
  ------------------
 2441|      0|            &f->frame_thread.pal_idx[(size_t)tile_start_off * size_mul[1] / 8] :
 2442|  38.3k|            NULL;
 2443|  38.3k|        ts->frame_thread[p].cbi = f->frame_thread.cbi ?
  ------------------
  |  Branch (2443:35): [True: 0, False: 38.3k]
  ------------------
 2444|      0|            &f->frame_thread.cbi[(size_t)tile_start_off * size_mul[0] / 64] :
 2445|  38.3k|            NULL;
 2446|  38.3k|        ts->frame_thread[p].cf = f->frame_thread.cf ?
  ------------------
  |  Branch (2446:34): [True: 0, False: 38.3k]
  ------------------
 2447|      0|            (uint8_t*)f->frame_thread.cf +
 2448|      0|                (((size_t)tile_start_off * size_mul[0]) >> !f->seq_hdr->hbd) :
 2449|  38.3k|            NULL;
 2450|  38.3k|    }
 2451|       |
 2452|  19.1k|    dav1d_cdf_thread_copy(&ts->cdf, &f->in_cdf);
 2453|  19.1k|    ts->last_qidx = f->frame_hdr->quant.yac;
 2454|  19.1k|    ts->last_delta_lf.u32 = 0;
 2455|       |
 2456|  19.1k|    dav1d_msac_init(&ts->msac, data, sz, f->frame_hdr->disable_cdf_update);
 2457|       |
 2458|  19.1k|    ts->tiling.row = tile_row;
 2459|  19.1k|    ts->tiling.col = tile_col;
 2460|  19.1k|    ts->tiling.col_start = col_sb_start << sb_shift;
 2461|  19.1k|    ts->tiling.col_end = imin(col_sb_end << sb_shift, f->bw);
 2462|  19.1k|    ts->tiling.row_start = row_sb_start << sb_shift;
 2463|  19.1k|    ts->tiling.row_end = imin(row_sb_end << sb_shift, f->bh);
 2464|       |
 2465|       |    // Reference Restoration Unit (used for exp coding)
 2466|  19.1k|    int sb_idx, unit_idx;
 2467|  19.1k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (2467:9): [True: 2.53k, False: 16.6k]
  ------------------
 2468|       |        // vertical components only
 2469|  2.53k|        sb_idx = (ts->tiling.row_start >> 5) * f->sr_sb128w;
 2470|  2.53k|        unit_idx = (ts->tiling.row_start & 16) >> 3;
 2471|  16.6k|    } else {
 2472|  16.6k|        sb_idx = (ts->tiling.row_start >> 5) * f->sb128w + col_sb128_start;
 2473|  16.6k|        unit_idx = ((ts->tiling.row_start & 16) >> 3) +
 2474|  16.6k|                   ((ts->tiling.col_start & 16) >> 4);
 2475|  16.6k|    }
 2476|  76.7k|    for (int p = 0; p < 3; p++) {
  ------------------
  |  Branch (2476:21): [True: 57.5k, False: 19.1k]
  ------------------
 2477|  57.5k|        if (!((f->lf.restore_planes >> p) & 1U))
  ------------------
  |  Branch (2477:13): [True: 45.1k, False: 12.4k]
  ------------------
 2478|  45.1k|            continue;
 2479|       |
 2480|  12.4k|        if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (2480:13): [True: 3.63k, False: 8.76k]
  ------------------
 2481|  3.63k|            const int ss_hor = p && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2481:32): [True: 2.37k, False: 1.25k]
  |  Branch (2481:37): [True: 1.16k, False: 1.21k]
  ------------------
 2482|  3.63k|            const int d = f->frame_hdr->super_res.width_scale_denominator;
 2483|  3.63k|            const int unit_size_log2 = f->frame_hdr->restoration.unit_size[!!p];
 2484|  3.63k|            const int rnd = (8 << unit_size_log2) - 1, shift = unit_size_log2 + 3;
 2485|  3.63k|            const int x = ((4 * ts->tiling.col_start * d >> ss_hor) + rnd) >> shift;
 2486|  3.63k|            const int px_x = x << (unit_size_log2 + ss_hor);
 2487|  3.63k|            const int u_idx = unit_idx + ((px_x & 64) >> 6);
 2488|  3.63k|            const int sb128x = px_x >> 7;
 2489|  3.63k|            if (sb128x >= f->sr_sb128w) continue;
  ------------------
  |  Branch (2489:17): [True: 115, False: 3.52k]
  ------------------
 2490|  3.52k|            ts->lr_ref[p] = &f->lf.lr_mask[sb_idx + sb128x].lr[p][u_idx];
 2491|  8.76k|        } else {
 2492|  8.76k|            ts->lr_ref[p] = &f->lf.lr_mask[sb_idx].lr[p][unit_idx];
 2493|  8.76k|        }
 2494|       |
 2495|  12.2k|        ts->lr_ref[p]->filter_v[0] = 3;
 2496|  12.2k|        ts->lr_ref[p]->filter_v[1] = -7;
 2497|  12.2k|        ts->lr_ref[p]->filter_v[2] = 15;
 2498|  12.2k|        ts->lr_ref[p]->filter_h[0] = 3;
 2499|  12.2k|        ts->lr_ref[p]->filter_h[1] = -7;
 2500|  12.2k|        ts->lr_ref[p]->filter_h[2] = 15;
 2501|  12.2k|        ts->lr_ref[p]->sgr_weights[0] = -32;
 2502|  12.2k|        ts->lr_ref[p]->sgr_weights[1] = 31;
 2503|  12.2k|    }
 2504|       |
 2505|  19.1k|    if (f->c->n_tc > 1) {
  ------------------
  |  Branch (2505:9): [True: 0, False: 19.1k]
  ------------------
 2506|      0|        for (int p = 0; p < 2; p++)
  ------------------
  |  Branch (2506:25): [True: 0, False: 0]
  ------------------
 2507|      0|            atomic_init(&ts->progress[p], row_sb_start);
 2508|      0|    }
 2509|  19.1k|}
decode.c:get_upscale_x0:
 3321|  4.11k|static int get_upscale_x0(const int in_w, const int out_w, const int step) {
 3322|  4.11k|    const int err = out_w * step - (in_w << 14);
 3323|  4.11k|    const int x0 = (-((out_w - in_w) << 13) + (out_w >> 1)) / out_w + 128 - (err / 2);
 3324|  4.11k|    return x0 & 0x3fff;
 3325|  4.11k|}

obu.c:get_poc_diff:
  239|  27.3k|{
  240|  27.3k|    if (!order_hint_n_bits) return 0;
  ------------------
  |  Branch (240:9): [True: 0, False: 27.3k]
  ------------------
  241|  27.3k|    const int mask = 1 << (order_hint_n_bits - 1);
  242|  27.3k|    const int diff = poc0 - poc1;
  243|  27.3k|    return (diff & (mask - 1)) - (diff & mask);
  244|  27.3k|}
refmvs.c:get_gmv_2d:
  482|  78.3k|{
  483|  78.3k|    switch (gmv->type) {
  484|  20.7k|    case DAV1D_WM_TYPE_ROT_ZOOM:
  ------------------
  |  Branch (484:5): [True: 20.7k, False: 57.5k]
  ------------------
  485|  20.7k|        assert(gmv->matrix[5] ==  gmv->matrix[2]);
  ------------------
  |  |  140|  20.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 20.7k]
  |  |  |  Branch (140:68): [Folded, False: 20.7k]
  |  |  ------------------
  ------------------
  486|  20.7k|        assert(gmv->matrix[4] == -gmv->matrix[3]);
  ------------------
  |  |  140|  20.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 20.7k]
  |  |  |  Branch (140:68): [Folded, False: 20.7k]
  |  |  ------------------
  ------------------
  487|       |        // fall-through
  488|  20.7k|    default:
  ------------------
  |  Branch (488:5): [True: 0, False: 78.3k]
  ------------------
  489|  29.3k|    case DAV1D_WM_TYPE_AFFINE: {
  ------------------
  |  Branch (489:5): [True: 8.61k, False: 69.7k]
  ------------------
  490|  29.3k|        const int x = bx4 * 4 + bw4 * 2 - 1;
  491|  29.3k|        const int y = by4 * 4 + bh4 * 2 - 1;
  492|  29.3k|        const int xc = (gmv->matrix[2] - (1 << 16)) * x +
  493|  29.3k|                       gmv->matrix[3] * y + gmv->matrix[0];
  494|  29.3k|        const int yc = (gmv->matrix[5] - (1 << 16)) * y +
  495|  29.3k|                       gmv->matrix[4] * x + gmv->matrix[1];
  496|  29.3k|        const int shift = 16 - (3 - !hdr->hp);
  497|  29.3k|        const int round = (1 << shift) >> 1;
  498|  29.3k|        mv res = (mv) {
  499|  29.3k|            .y = apply_sign(((abs(yc) + round) >> shift) << !hdr->hp, yc),
  500|  29.3k|            .x = apply_sign(((abs(xc) + round) >> shift) << !hdr->hp, xc),
  501|  29.3k|        };
  502|  29.3k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (502:13): [True: 1.63k, False: 27.7k]
  ------------------
  503|  1.63k|            fix_int_mv_precision(&res);
  504|  29.3k|        return res;
  505|  20.7k|    }
  506|  5.15k|    case DAV1D_WM_TYPE_TRANSLATION: {
  ------------------
  |  Branch (506:5): [True: 5.15k, False: 73.1k]
  ------------------
  507|  5.15k|        mv res = (mv) {
  508|  5.15k|            .y = gmv->matrix[0] >> 13,
  509|  5.15k|            .x = gmv->matrix[1] >> 13,
  510|  5.15k|        };
  511|  5.15k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (511:13): [True: 385, False: 4.76k]
  ------------------
  512|    385|            fix_int_mv_precision(&res);
  513|  5.15k|        return res;
  514|  20.7k|    }
  515|  43.8k|    case DAV1D_WM_TYPE_IDENTITY:
  ------------------
  |  Branch (515:5): [True: 43.8k, False: 34.5k]
  ------------------
  516|  43.8k|        return (mv) { .x = 0, .y = 0 };
  517|  78.3k|    }
  518|  78.3k|}
refmvs.c:fix_int_mv_precision:
  462|  4.58k|static inline void fix_int_mv_precision(mv *const mv) {
  463|  4.58k|    mv->x = (mv->x - (mv->x >> 15) + 3) & ~7U;
  464|  4.58k|    mv->y = (mv->y - (mv->y >> 15) + 3) & ~7U;
  465|  4.58k|}
refmvs.c:fix_mv_precision:
  469|  34.4k|{
  470|  34.4k|    if (hdr->force_integer_mv) {
  ------------------
  |  Branch (470:9): [True: 2.55k, False: 31.9k]
  ------------------
  471|  2.55k|        fix_int_mv_precision(mv);
  472|  31.9k|    } else if (!hdr->hp) {
  ------------------
  |  Branch (472:16): [True: 6.89k, False: 25.0k]
  ------------------
  473|  6.89k|        mv->x = (mv->x - (mv->x >> 15)) & ~1U;
  474|  6.89k|        mv->y = (mv->y - (mv->y >> 15)) & ~1U;
  475|  6.89k|    }
  476|  34.4k|}
refmvs.c:get_poc_diff:
  239|  79.7k|{
  240|  79.7k|    if (!order_hint_n_bits) return 0;
  ------------------
  |  Branch (240:9): [True: 44.0k, False: 35.6k]
  ------------------
  241|  35.6k|    const int mask = 1 << (order_hint_n_bits - 1);
  242|  35.6k|    const int diff = poc0 - poc1;
  243|  35.6k|    return (diff & (mask - 1)) - (diff & mask);
  244|  79.7k|}
decode.c:get_partition_ctx:
   87|  1.80M|{
   88|  1.80M|    return ((a->partition[xb8] >> (4 - bl)) & 1) +
   89|  1.80M|          (((l->partition[yb8] >> (4 - bl)) & 1) << 1);
   90|  1.80M|}
decode.c:get_cur_frame_segid:
  445|   477k|{
  446|   477k|    cur_seg_map += bx + by * stride;
  447|   477k|    if (have_left && have_top) {
  ------------------
  |  Branch (447:9): [True: 372k, False: 104k]
  |  Branch (447:22): [True: 277k, False: 94.8k]
  ------------------
  448|   277k|        const int l = cur_seg_map[-1];
  449|   277k|        const int a = cur_seg_map[-stride];
  450|   277k|        const int al = cur_seg_map[-(stride + 1)];
  451|       |
  452|   277k|        if (l == a && al == l) *seg_ctx = 2;
  ------------------
  |  Branch (452:13): [True: 111k, False: 166k]
  |  Branch (452:23): [True: 99.9k, False: 11.3k]
  ------------------
  453|   177k|        else if (l == a || al == l || a == al) *seg_ctx = 1;
  ------------------
  |  Branch (453:18): [True: 11.3k, False: 166k]
  |  Branch (453:28): [True: 62.2k, False: 104k]
  |  Branch (453:39): [True: 60.4k, False: 43.5k]
  ------------------
  454|  43.5k|        else *seg_ctx = 0;
  455|   277k|        return a == al ? a : l;
  ------------------
  |  Branch (455:16): [True: 160k, False: 117k]
  ------------------
  456|   277k|    } else {
  457|   199k|        *seg_ctx = 0;
  458|   199k|        return have_left ? cur_seg_map[-1] : have_top ? cur_seg_map[-stride] : 0;
  ------------------
  |  Branch (458:16): [True: 94.8k, False: 104k]
  |  Branch (458:46): [True: 98.6k, False: 6.11k]
  ------------------
  459|   199k|    }
  460|   477k|}
decode.c:get_intra_ctx:
   63|  61.6k|{
   64|  61.6k|    if (have_left) {
  ------------------
  |  Branch (64:9): [True: 54.2k, False: 7.31k]
  ------------------
   65|  54.2k|        if (have_top) {
  ------------------
  |  Branch (65:13): [True: 46.9k, False: 7.31k]
  ------------------
   66|  46.9k|            const int ctx = l->intra[yb4] + a->intra[xb4];
   67|  46.9k|            return ctx + (ctx == 2);
   68|  46.9k|        } else
   69|  7.31k|            return l->intra[yb4] * 2;
   70|  54.2k|    } else {
   71|  7.31k|        return have_top ? a->intra[xb4] * 2 : 0;
  ------------------
  |  Branch (71:16): [True: 4.96k, False: 2.35k]
  ------------------
   72|  7.31k|    }
   73|  61.6k|}
decode.c:get_tx_ctx:
   79|   811k|{
   80|   811k|    return (l->tx_intra[yb4] >= max_tx->lh) + (a->tx_intra[xb4] >= max_tx->lw);
   81|   811k|}
decode.c:get_comp_ctx:
  160|  22.7k|{
  161|  22.7k|    if (have_top) {
  ------------------
  |  Branch (161:9): [True: 18.2k, False: 4.52k]
  ------------------
  162|  18.2k|        if (have_left) {
  ------------------
  |  Branch (162:13): [True: 15.8k, False: 2.38k]
  ------------------
  163|  15.8k|            if (a->comp_type[xb4]) {
  ------------------
  |  Branch (163:17): [True: 7.68k, False: 8.14k]
  ------------------
  164|  7.68k|                if (l->comp_type[yb4]) {
  ------------------
  |  Branch (164:21): [True: 5.15k, False: 2.52k]
  ------------------
  165|  5.15k|                    return 4;
  166|  5.15k|                } else {
  167|       |                    // 4U means intra (-1) or bwd (>= 4)
  168|  2.52k|                    return 2 + ((unsigned)l->ref[0][yb4] >= 4U);
  169|  2.52k|                }
  170|  8.14k|            } else if (l->comp_type[yb4]) {
  ------------------
  |  Branch (170:24): [True: 2.81k, False: 5.32k]
  ------------------
  171|       |                // 4U means intra (-1) or bwd (>= 4)
  172|  2.81k|                return 2 + ((unsigned)a->ref[0][xb4] >= 4U);
  173|  5.32k|            } else {
  174|  5.32k|                return (l->ref[0][yb4] >= 4) ^ (a->ref[0][xb4] >= 4);
  175|  5.32k|            }
  176|  15.8k|        } else {
  177|  2.38k|            return a->comp_type[xb4] ? 3 : a->ref[0][xb4] >= 4;
  ------------------
  |  Branch (177:20): [True: 907, False: 1.47k]
  ------------------
  178|  2.38k|        }
  179|  18.2k|    } else if (have_left) {
  ------------------
  |  Branch (179:16): [True: 3.33k, False: 1.18k]
  ------------------
  180|  3.33k|        return l->comp_type[yb4] ? 3 : l->ref[0][yb4] >= 4;
  ------------------
  |  Branch (180:16): [True: 1.32k, False: 2.00k]
  ------------------
  181|  3.33k|    } else {
  182|  1.18k|        return 1;
  183|  1.18k|    }
  184|  22.7k|}
decode.c:fix_mv_precision:
  469|  43.9k|{
  470|  43.9k|    if (hdr->force_integer_mv) {
  ------------------
  |  Branch (470:9): [True: 4.69k, False: 39.2k]
  ------------------
  471|  4.69k|        fix_int_mv_precision(mv);
  472|  39.2k|    } else if (!hdr->hp) {
  ------------------
  |  Branch (472:16): [True: 17.0k, False: 22.2k]
  ------------------
  473|  17.0k|        mv->x = (mv->x - (mv->x >> 15)) & ~1U;
  474|  17.0k|        mv->y = (mv->y - (mv->y >> 15)) & ~1U;
  475|  17.0k|    }
  476|  43.9k|}
decode.c:fix_int_mv_precision:
  462|  5.18k|static inline void fix_int_mv_precision(mv *const mv) {
  463|  5.18k|    mv->x = (mv->x - (mv->x >> 15) + 3) & ~7U;
  464|  5.18k|    mv->y = (mv->y - (mv->y >> 15) + 3) & ~7U;
  465|  5.18k|}
decode.c:get_comp_dir_ctx:
  190|  12.6k|{
  191|  12.6k|#define has_uni_comp(edge, off) \
  192|  12.6k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  193|       |
  194|  12.6k|    if (have_top && have_left) {
  ------------------
  |  Branch (194:9): [True: 10.6k, False: 1.90k]
  |  Branch (194:21): [True: 9.57k, False: 1.12k]
  ------------------
  195|  9.57k|        const int a_intra = a->intra[xb4], l_intra = l->intra[yb4];
  196|       |
  197|  9.57k|        if (a_intra && l_intra) return 2;
  ------------------
  |  Branch (197:13): [True: 213, False: 9.35k]
  |  Branch (197:24): [True: 37, False: 176]
  ------------------
  198|  9.53k|        if (a_intra || l_intra) {
  ------------------
  |  Branch (198:13): [True: 176, False: 9.35k]
  |  Branch (198:24): [True: 189, False: 9.16k]
  ------------------
  199|    365|            const BlockContext *const edge = a_intra ? l : a;
  ------------------
  |  Branch (199:46): [True: 176, False: 189]
  ------------------
  200|    365|            const int off = a_intra ? yb4 : xb4;
  ------------------
  |  Branch (200:29): [True: 176, False: 189]
  ------------------
  201|       |
  202|    365|            if (edge->comp_type[off] == COMP_INTER_NONE) return 2;
  ------------------
  |  Branch (202:17): [True: 106, False: 259]
  ------------------
  203|    259|            return 1 + 2 * has_uni_comp(edge, off);
  ------------------
  |  |  192|    259|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  204|    365|        }
  205|       |
  206|  9.16k|        const int a_comp = a->comp_type[xb4] != COMP_INTER_NONE;
  207|  9.16k|        const int l_comp = l->comp_type[yb4] != COMP_INTER_NONE;
  208|  9.16k|        const int a_ref0 = a->ref[0][xb4], l_ref0 = l->ref[0][yb4];
  209|       |
  210|  9.16k|        if (!a_comp && !l_comp) {
  ------------------
  |  Branch (210:13): [True: 2.77k, False: 6.39k]
  |  Branch (210:24): [True: 911, False: 1.85k]
  ------------------
  211|    911|            return 1 + 2 * ((a_ref0 >= 4) == (l_ref0 >= 4));
  212|  8.25k|        } else if (!a_comp || !l_comp) {
  ------------------
  |  Branch (212:20): [True: 1.85k, False: 6.39k]
  |  Branch (212:31): [True: 1.53k, False: 4.86k]
  ------------------
  213|  3.39k|            const BlockContext *const edge = a_comp ? a : l;
  ------------------
  |  Branch (213:46): [True: 1.53k, False: 1.85k]
  ------------------
  214|  3.39k|            const int off = a_comp ? xb4 : yb4;
  ------------------
  |  Branch (214:29): [True: 1.53k, False: 1.85k]
  ------------------
  215|       |
  216|  3.39k|            if (!has_uni_comp(edge, off)) return 1;
  ------------------
  |  |  192|  3.39k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  |  Branch (216:17): [True: 2.74k, False: 653]
  ------------------
  217|    653|            return 3 + ((a_ref0 >= 4) == (l_ref0 >= 4));
  218|  4.86k|        } else {
  219|  4.86k|            const int a_uni = has_uni_comp(a, xb4), l_uni = has_uni_comp(l, yb4);
  ------------------
  |  |  192|  4.86k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
                          const int a_uni = has_uni_comp(a, xb4), l_uni = has_uni_comp(l, yb4);
  ------------------
  |  |  192|  4.86k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  220|       |
  221|  4.86k|            if (!a_uni && !l_uni) return 0;
  ------------------
  |  Branch (221:17): [True: 3.98k, False: 878]
  |  Branch (221:27): [True: 3.62k, False: 363]
  ------------------
  222|  1.24k|            if (!a_uni || !l_uni) return 2;
  ------------------
  |  Branch (222:17): [True: 363, False: 878]
  |  Branch (222:27): [True: 447, False: 431]
  ------------------
  223|    431|            return 3 + ((a_ref0 == 4) == (l_ref0 == 4));
  224|  1.24k|        }
  225|  9.16k|    } else if (have_top || have_left) {
  ------------------
  |  Branch (225:16): [True: 1.12k, False: 1.90k]
  |  Branch (225:28): [True: 1.55k, False: 348]
  ------------------
  226|  2.68k|        const BlockContext *const edge = have_left ? l : a;
  ------------------
  |  Branch (226:42): [True: 1.55k, False: 1.12k]
  ------------------
  227|  2.68k|        const int off = have_left ? yb4 : xb4;
  ------------------
  |  Branch (227:25): [True: 1.55k, False: 1.12k]
  ------------------
  228|       |
  229|  2.68k|        if (edge->intra[off]) return 2;
  ------------------
  |  Branch (229:13): [True: 45, False: 2.63k]
  ------------------
  230|  2.63k|        if (edge->comp_type[off] == COMP_INTER_NONE) return 2;
  ------------------
  |  Branch (230:13): [True: 889, False: 1.74k]
  ------------------
  231|  1.74k|        return 4 * has_uni_comp(edge, off);
  ------------------
  |  |  192|  1.74k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  232|  2.63k|    } else {
  233|    348|        return 2;
  234|    348|    }
  235|  12.6k|}
decode.c:av1_get_fwd_ref_ctx:
  307|  32.0k|{
  308|  32.0k|    int cnt[4] = { 0 };
  309|       |
  310|  32.0k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (310:9): [True: 27.1k, False: 4.96k]
  |  Branch (310:21): [True: 26.2k, False: 869]
  ------------------
  311|  26.2k|        if (a->ref[0][xb4] < 4) cnt[a->ref[0][xb4]]++;
  ------------------
  |  Branch (311:13): [True: 22.7k, False: 3.46k]
  ------------------
  312|  26.2k|        if (a->comp_type[xb4] && a->ref[1][xb4] < 4) cnt[a->ref[1][xb4]]++;
  ------------------
  |  Branch (312:13): [True: 7.96k, False: 18.2k]
  |  Branch (312:34): [True: 807, False: 7.15k]
  ------------------
  313|  26.2k|    }
  314|       |
  315|  32.0k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (315:9): [True: 28.3k, False: 3.68k]
  |  Branch (315:22): [True: 27.4k, False: 939]
  ------------------
  316|  27.4k|        if (l->ref[0][yb4] < 4) cnt[l->ref[0][yb4]]++;
  ------------------
  |  Branch (316:13): [True: 24.2k, False: 3.22k]
  ------------------
  317|  27.4k|        if (l->comp_type[yb4] && l->ref[1][yb4] < 4) cnt[l->ref[1][yb4]]++;
  ------------------
  |  Branch (317:13): [True: 8.87k, False: 18.5k]
  |  Branch (317:34): [True: 850, False: 8.02k]
  ------------------
  318|  27.4k|    }
  319|       |
  320|  32.0k|    cnt[0] += cnt[1];
  321|  32.0k|    cnt[2] += cnt[3];
  322|       |
  323|  32.0k|    return cnt[0] == cnt[2] ? 1 : cnt[0] < cnt[2] ? 0 : 2;
  ------------------
  |  Branch (323:12): [True: 6.46k, False: 25.6k]
  |  Branch (323:35): [True: 6.91k, False: 18.6k]
  ------------------
  324|  32.0k|}
decode.c:av1_get_fwd_ref_2_ctx:
  350|  10.6k|{
  351|  10.6k|    int cnt[2] = { 0 };
  352|       |
  353|  10.6k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (353:9): [True: 8.78k, False: 1.82k]
  |  Branch (353:21): [True: 8.48k, False: 302]
  ------------------
  354|  8.48k|        if ((a->ref[0][xb4] ^ 2U) < 2) cnt[a->ref[0][xb4] - 2]++;
  ------------------
  |  Branch (354:13): [True: 5.00k, False: 3.47k]
  ------------------
  355|  8.48k|        if (a->comp_type[xb4] && (a->ref[1][xb4] ^ 2U) < 2) cnt[a->ref[1][xb4] - 2]++;
  ------------------
  |  Branch (355:13): [True: 3.05k, False: 5.42k]
  |  Branch (355:34): [True: 441, False: 2.61k]
  ------------------
  356|  8.48k|    }
  357|       |
  358|  10.6k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (358:9): [True: 9.31k, False: 1.29k]
  |  Branch (358:22): [True: 8.98k, False: 327]
  ------------------
  359|  8.98k|        if ((l->ref[0][yb4] ^ 2U) < 2) cnt[l->ref[0][yb4] - 2]++;
  ------------------
  |  Branch (359:13): [True: 5.81k, False: 3.16k]
  ------------------
  360|  8.98k|        if (l->comp_type[yb4] && (l->ref[1][yb4] ^ 2U) < 2) cnt[l->ref[1][yb4] - 2]++;
  ------------------
  |  Branch (360:13): [True: 3.53k, False: 5.45k]
  |  Branch (360:34): [True: 442, False: 3.09k]
  ------------------
  361|  8.98k|    }
  362|       |
  363|  10.6k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (363:12): [True: 2.88k, False: 7.72k]
  |  Branch (363:35): [True: 5.90k, False: 1.82k]
  ------------------
  364|  10.6k|}
decode.c:av1_get_fwd_ref_1_ctx:
  330|  22.3k|{
  331|  22.3k|    int cnt[2] = { 0 };
  332|       |
  333|  22.3k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (333:9): [True: 19.0k, False: 3.30k]
  |  Branch (333:21): [True: 18.4k, False: 578]
  ------------------
  334|  18.4k|        if (a->ref[0][xb4] < 2) cnt[a->ref[0][xb4]]++;
  ------------------
  |  Branch (334:13): [True: 14.9k, False: 3.58k]
  ------------------
  335|  18.4k|        if (a->comp_type[xb4] && a->ref[1][xb4] < 2) cnt[a->ref[1][xb4]]++;
  ------------------
  |  Branch (335:13): [True: 5.41k, False: 13.0k]
  |  Branch (335:34): [True: 304, False: 5.10k]
  ------------------
  336|  18.4k|    }
  337|       |
  338|  22.3k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (338:9): [True: 19.8k, False: 2.53k]
  |  Branch (338:22): [True: 19.2k, False: 629]
  ------------------
  339|  19.2k|        if (l->ref[0][yb4] < 2) cnt[l->ref[0][yb4]]++;
  ------------------
  |  Branch (339:13): [True: 15.6k, False: 3.55k]
  ------------------
  340|  19.2k|        if (l->comp_type[yb4] && l->ref[1][yb4] < 2) cnt[l->ref[1][yb4]]++;
  ------------------
  |  Branch (340:13): [True: 5.83k, False: 13.3k]
  |  Branch (340:34): [True: 356, False: 5.47k]
  ------------------
  341|  19.2k|    }
  342|       |
  343|  22.3k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (343:12): [True: 4.12k, False: 18.2k]
  |  Branch (343:35): [True: 2.19k, False: 16.0k]
  ------------------
  344|  22.3k|}
decode.c:av1_get_bwd_ref_ctx:
  370|  30.8k|{
  371|  30.8k|    int cnt[3] = { 0 };
  372|       |
  373|  30.8k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (373:9): [True: 25.9k, False: 4.84k]
  |  Branch (373:21): [True: 25.0k, False: 966]
  ------------------
  374|  25.0k|        if (a->ref[0][xb4] >= 4) cnt[a->ref[0][xb4] - 4]++;
  ------------------
  |  Branch (374:13): [True: 13.2k, False: 11.7k]
  ------------------
  375|  25.0k|        if (a->comp_type[xb4] && a->ref[1][xb4] >= 4) cnt[a->ref[1][xb4] - 4]++;
  ------------------
  |  Branch (375:13): [True: 8.01k, False: 16.9k]
  |  Branch (375:34): [True: 7.50k, False: 506]
  ------------------
  376|  25.0k|    }
  377|       |
  378|  30.8k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (378:9): [True: 27.3k, False: 3.46k]
  |  Branch (378:22): [True: 26.4k, False: 887]
  ------------------
  379|  26.4k|        if (l->ref[0][yb4] >= 4) cnt[l->ref[0][yb4] - 4]++;
  ------------------
  |  Branch (379:13): [True: 14.6k, False: 11.8k]
  ------------------
  380|  26.4k|        if (l->comp_type[yb4] && l->ref[1][yb4] >= 4) cnt[l->ref[1][yb4] - 4]++;
  ------------------
  |  Branch (380:13): [True: 8.46k, False: 18.0k]
  |  Branch (380:34): [True: 7.91k, False: 546]
  ------------------
  381|  26.4k|    }
  382|       |
  383|  30.8k|    cnt[1] += cnt[0];
  384|       |
  385|  30.8k|    return cnt[2] == cnt[1] ? 1 : cnt[1] < cnt[2] ? 0 : 2;
  ------------------
  |  Branch (385:12): [True: 6.16k, False: 24.6k]
  |  Branch (385:35): [True: 16.0k, False: 8.63k]
  ------------------
  386|  30.8k|}
decode.c:av1_get_bwd_ref_1_ctx:
  392|  11.0k|{
  393|  11.0k|    int cnt[3] = { 0 };
  394|       |
  395|  11.0k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (395:9): [True: 9.38k, False: 1.66k]
  |  Branch (395:21): [True: 9.02k, False: 357]
  ------------------
  396|  9.02k|        if (a->ref[0][xb4] >= 4) cnt[a->ref[0][xb4] - 4]++;
  ------------------
  |  Branch (396:13): [True: 4.23k, False: 4.79k]
  ------------------
  397|  9.02k|        if (a->comp_type[xb4] && a->ref[1][xb4] >= 4) cnt[a->ref[1][xb4] - 4]++;
  ------------------
  |  Branch (397:13): [True: 3.36k, False: 5.66k]
  |  Branch (397:34): [True: 3.13k, False: 232]
  ------------------
  398|  9.02k|    }
  399|       |
  400|  11.0k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (400:9): [True: 9.58k, False: 1.45k]
  |  Branch (400:22): [True: 9.20k, False: 383]
  ------------------
  401|  9.20k|        if (l->ref[0][yb4] >= 4) cnt[l->ref[0][yb4] - 4]++;
  ------------------
  |  Branch (401:13): [True: 4.25k, False: 4.95k]
  ------------------
  402|  9.20k|        if (l->comp_type[yb4] && l->ref[1][yb4] >= 4) cnt[l->ref[1][yb4] - 4]++;
  ------------------
  |  Branch (402:13): [True: 3.44k, False: 5.76k]
  |  Branch (402:34): [True: 3.21k, False: 227]
  ------------------
  403|  9.20k|    }
  404|       |
  405|  11.0k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (405:12): [True: 2.71k, False: 8.33k]
  |  Branch (405:35): [True: 4.36k, False: 3.97k]
  ------------------
  406|  11.0k|}
decode.c:av1_get_ref_ctx:
  287|  44.6k|{
  288|  44.6k|    int cnt[2] = { 0 };
  289|       |
  290|  44.6k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (290:9): [True: 37.3k, False: 7.30k]
  |  Branch (290:21): [True: 35.8k, False: 1.47k]
  ------------------
  291|  35.8k|        cnt[a->ref[0][xb4] >= 4]++;
  292|  35.8k|        if (a->comp_type[xb4]) cnt[a->ref[1][xb4] >= 4]++;
  ------------------
  |  Branch (292:13): [True: 5.05k, False: 30.8k]
  ------------------
  293|  35.8k|    }
  294|       |
  295|  44.6k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (295:9): [True: 38.9k, False: 5.65k]
  |  Branch (295:22): [True: 37.5k, False: 1.46k]
  ------------------
  296|  37.5k|        cnt[l->ref[0][yb4] >= 4]++;
  297|  37.5k|        if (l->comp_type[yb4]) cnt[l->ref[1][yb4] >= 4]++;
  ------------------
  |  Branch (297:13): [True: 5.04k, False: 32.4k]
  ------------------
  298|  37.5k|    }
  299|       |
  300|  44.6k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (300:12): [True: 8.96k, False: 35.6k]
  |  Branch (300:35): [True: 16.1k, False: 19.4k]
  ------------------
  301|  44.6k|}
decode.c:av1_get_uni_p1_ctx:
  412|  1.56k|{
  413|  1.56k|    int cnt[3] = { 0 };
  414|       |
  415|  1.56k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (415:9): [True: 1.24k, False: 316]
  |  Branch (415:21): [True: 1.22k, False: 26]
  ------------------
  416|  1.22k|        if (a->ref[0][xb4] - 1U < 3) cnt[a->ref[0][xb4] - 1]++;
  ------------------
  |  Branch (416:13): [True: 247, False: 973]
  ------------------
  417|  1.22k|        if (a->comp_type[xb4] && a->ref[1][xb4] - 1U < 3) cnt[a->ref[1][xb4] - 1]++;
  ------------------
  |  Branch (417:13): [True: 816, False: 404]
  |  Branch (417:34): [True: 514, False: 302]
  ------------------
  418|  1.22k|    }
  419|       |
  420|  1.56k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (420:9): [True: 1.26k, False: 300]
  |  Branch (420:22): [True: 1.22k, False: 33]
  ------------------
  421|  1.22k|        if (l->ref[0][yb4] - 1U < 3) cnt[l->ref[0][yb4] - 1]++;
  ------------------
  |  Branch (421:13): [True: 223, False: 1.00k]
  ------------------
  422|  1.22k|        if (l->comp_type[yb4] && l->ref[1][yb4] - 1U < 3) cnt[l->ref[1][yb4] - 1]++;
  ------------------
  |  Branch (422:13): [True: 820, False: 409]
  |  Branch (422:34): [True: 550, False: 270]
  ------------------
  423|  1.22k|    }
  424|       |
  425|  1.56k|    cnt[1] += cnt[2];
  426|       |
  427|  1.56k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (427:12): [True: 535, False: 1.02k]
  |  Branch (427:35): [True: 629, False: 398]
  ------------------
  428|  1.56k|}
decode.c:get_drl_context:
  432|  20.6k|{
  433|  20.6k|    if (ref_mv_stack[ref_idx].weight >= 640)
  ------------------
  |  Branch (433:9): [True: 15.8k, False: 4.79k]
  ------------------
  434|  15.8k|        return ref_mv_stack[ref_idx + 1].weight < 640;
  435|       |
  436|  4.79k|    return ref_mv_stack[ref_idx + 1].weight < 640 ? 2 : 0;
  ------------------
  |  Branch (436:12): [True: 4.79k, False: 0]
  ------------------
  437|  20.6k|}
decode.c:get_gmv_2d:
  482|  13.7k|{
  483|  13.7k|    switch (gmv->type) {
  484|  3.19k|    case DAV1D_WM_TYPE_ROT_ZOOM:
  ------------------
  |  Branch (484:5): [True: 3.19k, False: 10.5k]
  ------------------
  485|  3.19k|        assert(gmv->matrix[5] ==  gmv->matrix[2]);
  ------------------
  |  |  140|  3.19k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.19k]
  |  |  |  Branch (140:68): [Folded, False: 3.19k]
  |  |  ------------------
  ------------------
  486|  3.19k|        assert(gmv->matrix[4] == -gmv->matrix[3]);
  ------------------
  |  |  140|  3.19k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.19k]
  |  |  |  Branch (140:68): [Folded, False: 3.19k]
  |  |  ------------------
  ------------------
  487|       |        // fall-through
  488|  3.19k|    default:
  ------------------
  |  Branch (488:5): [True: 0, False: 13.7k]
  ------------------
  489|  4.60k|    case DAV1D_WM_TYPE_AFFINE: {
  ------------------
  |  Branch (489:5): [True: 1.40k, False: 12.3k]
  ------------------
  490|  4.60k|        const int x = bx4 * 4 + bw4 * 2 - 1;
  491|  4.60k|        const int y = by4 * 4 + bh4 * 2 - 1;
  492|  4.60k|        const int xc = (gmv->matrix[2] - (1 << 16)) * x +
  493|  4.60k|                       gmv->matrix[3] * y + gmv->matrix[0];
  494|  4.60k|        const int yc = (gmv->matrix[5] - (1 << 16)) * y +
  495|  4.60k|                       gmv->matrix[4] * x + gmv->matrix[1];
  496|  4.60k|        const int shift = 16 - (3 - !hdr->hp);
  497|  4.60k|        const int round = (1 << shift) >> 1;
  498|  4.60k|        mv res = (mv) {
  499|  4.60k|            .y = apply_sign(((abs(yc) + round) >> shift) << !hdr->hp, yc),
  500|  4.60k|            .x = apply_sign(((abs(xc) + round) >> shift) << !hdr->hp, xc),
  501|  4.60k|        };
  502|  4.60k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (502:13): [True: 343, False: 4.25k]
  ------------------
  503|    343|            fix_int_mv_precision(&res);
  504|  4.60k|        return res;
  505|  3.19k|    }
  506|  1.46k|    case DAV1D_WM_TYPE_TRANSLATION: {
  ------------------
  |  Branch (506:5): [True: 1.46k, False: 12.2k]
  ------------------
  507|  1.46k|        mv res = (mv) {
  508|  1.46k|            .y = gmv->matrix[0] >> 13,
  509|  1.46k|            .x = gmv->matrix[1] >> 13,
  510|  1.46k|        };
  511|  1.46k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (511:13): [True: 149, False: 1.31k]
  ------------------
  512|    149|            fix_int_mv_precision(&res);
  513|  1.46k|        return res;
  514|  3.19k|    }
  515|  7.65k|    case DAV1D_WM_TYPE_IDENTITY:
  ------------------
  |  Branch (515:5): [True: 7.65k, False: 6.06k]
  ------------------
  516|  7.65k|        return (mv) { .x = 0, .y = 0 };
  517|  13.7k|    }
  518|  13.7k|}
decode.c:get_mask_comp_ctx:
  266|  3.67k|{
  267|  3.67k|    const int a_ctx = a->comp_type[xb4] >= COMP_INTER_SEG ? 1 :
  ------------------
  |  Branch (267:23): [True: 628, False: 3.05k]
  ------------------
  268|  3.67k|                      a->ref[0][xb4] == 6 ? 3 : 0;
  ------------------
  |  Branch (268:23): [True: 258, False: 2.79k]
  ------------------
  269|  3.67k|    const int l_ctx = l->comp_type[yb4] >= COMP_INTER_SEG ? 1 :
  ------------------
  |  Branch (269:23): [True: 772, False: 2.90k]
  ------------------
  270|  3.67k|                      l->ref[0][yb4] == 6 ? 3 : 0;
  ------------------
  |  Branch (270:23): [True: 167, False: 2.73k]
  ------------------
  271|       |
  272|  3.67k|    return imin(a_ctx + l_ctx, 5);
  273|  3.67k|}
decode.c:get_jnt_comp_ctx:
  251|  6.95k|{
  252|  6.95k|    const int d0 = abs(get_poc_diff(order_hint_n_bits, ref0poc, poc));
  253|  6.95k|    const int d1 = abs(get_poc_diff(order_hint_n_bits, poc, ref1poc));
  254|  6.95k|    const int offset = d0 == d1;
  255|  6.95k|    const int a_ctx = a->comp_type[xb4] >= COMP_INTER_AVG ||
  ------------------
  |  Branch (255:23): [True: 2.93k, False: 4.01k]
  ------------------
  256|  4.01k|                      a->ref[0][xb4] == 6;
  ------------------
  |  Branch (256:23): [True: 400, False: 3.61k]
  ------------------
  257|  6.95k|    const int l_ctx = l->comp_type[yb4] >= COMP_INTER_AVG ||
  ------------------
  |  Branch (257:23): [True: 3.37k, False: 3.57k]
  ------------------
  258|  3.57k|                      l->ref[0][yb4] == 6;
  ------------------
  |  Branch (258:23): [True: 353, False: 3.22k]
  ------------------
  259|       |
  260|  6.95k|    return 3 * offset + a_ctx + l_ctx;
  261|  6.95k|}
decode.c:get_filter_ctx:
  139|  31.8k|{
  140|  31.8k|    const int a_filter = (a->ref[0][xb4] == ref || a->ref[1][xb4] == ref) ?
  ------------------
  |  Branch (140:27): [True: 17.6k, False: 14.1k]
  |  Branch (140:52): [True: 1.32k, False: 12.8k]
  ------------------
  141|  19.0k|                         a->filter[dir][xb4] : DAV1D_N_SWITCHABLE_FILTERS;
  142|  31.8k|    const int l_filter = (l->ref[0][yb4] == ref || l->ref[1][yb4] == ref) ?
  ------------------
  |  Branch (142:27): [True: 17.7k, False: 14.0k]
  |  Branch (142:52): [True: 989, False: 13.0k]
  ------------------
  143|  18.7k|                         l->filter[dir][yb4] : DAV1D_N_SWITCHABLE_FILTERS;
  144|       |
  145|  31.8k|    if (a_filter == l_filter) {
  ------------------
  |  Branch (145:9): [True: 16.6k, False: 15.1k]
  ------------------
  146|  16.6k|        return comp * 4 + a_filter;
  147|  16.6k|    } else if (a_filter == DAV1D_N_SWITCHABLE_FILTERS) {
  ------------------
  |  Branch (147:16): [True: 6.80k, False: 8.36k]
  ------------------
  148|  6.80k|        return comp * 4 + l_filter;
  149|  8.36k|    } else if (l_filter == DAV1D_N_SWITCHABLE_FILTERS) {
  ------------------
  |  Branch (149:16): [True: 7.04k, False: 1.31k]
  ------------------
  150|  7.04k|        return comp * 4 + a_filter;
  151|  7.04k|    } else {
  152|  1.31k|        return comp * 4 + DAV1D_N_SWITCHABLE_FILTERS;
  153|  1.31k|    }
  154|  31.8k|}
decode.c:gather_top_partition_prob:
  106|   198k|{
  107|       |    // Exploit the fact that cdfs for PARTITION_V, PARTITION_SPLIT and
  108|       |    // PARTITION_T_TOP_SPLIT are neighbors.
  109|   198k|    unsigned out = in[PARTITION_V - 1] - in[PARTITION_T_TOP_SPLIT];
  110|       |    // Exploit the facts that cdfs for PARTITION_T_LEFT_SPLIT and
  111|       |    // PARTITION_T_RIGHT_SPLIT are neighbors, the probability for
  112|       |    // PARTITION_V4 is always zero, and the probability for
  113|       |    // PARTITION_T_RIGHT_SPLIT is zero in 128x128 blocks.
  114|   198k|    out += in[PARTITION_T_LEFT_SPLIT - 1];
  115|   198k|    if (bl != BL_128X128)
  ------------------
  |  Branch (115:9): [True: 185k, False: 13.2k]
  ------------------
  116|   185k|        out += in[PARTITION_V4 - 1] - in[PARTITION_T_RIGHT_SPLIT];
  117|   198k|    return out;
  118|   198k|}
decode.c:gather_left_partition_prob:
   94|   132k|{
   95|   132k|    unsigned out = in[PARTITION_H - 1] - in[PARTITION_H];
   96|       |    // Exploit the fact that cdfs for PARTITION_SPLIT, PARTITION_T_TOP_SPLIT,
   97|       |    // PARTITION_T_BOTTOM_SPLIT and PARTITION_T_LEFT_SPLIT are neighbors.
   98|   132k|    out += in[PARTITION_SPLIT - 1] - in[PARTITION_T_LEFT_SPLIT];
   99|   132k|    if (bl != BL_128X128)
  ------------------
  |  Branch (99:9): [True: 112k, False: 19.6k]
  ------------------
  100|   112k|        out += in[PARTITION_H4 - 1] - in[PARTITION_H4];
  101|   132k|    return out;
  102|   132k|}
decode.c:get_poc_diff:
  239|  82.1k|{
  240|  82.1k|    if (!order_hint_n_bits) return 0;
  ------------------
  |  Branch (240:9): [True: 15.8k, False: 66.2k]
  ------------------
  241|  66.2k|    const int mask = 1 << (order_hint_n_bits - 1);
  242|  66.2k|    const int diff = poc0 - poc1;
  243|  66.2k|    return (diff & (mask - 1)) - (diff & mask);
  244|  82.1k|}
recon_tmpl.c:get_uv_inter_txtp:
  122|  20.3k|{
  123|  20.3k|    if (uvt_dim->max == TX_32X32)
  ------------------
  |  Branch (123:9): [True: 5.73k, False: 14.5k]
  ------------------
  124|  5.73k|        return ytxtp == IDTX ? IDTX : DCT_DCT;
  ------------------
  |  Branch (124:16): [True: 136, False: 5.60k]
  ------------------
  125|  14.5k|    if (uvt_dim->min == TX_16X16 &&
  ------------------
  |  Branch (125:9): [True: 1.59k, False: 12.9k]
  ------------------
  126|  1.59k|        ((1 << ytxtp) & ((1 << H_FLIPADST) | (1 << V_FLIPADST) |
  ------------------
  |  Branch (126:9): [True: 78, False: 1.51k]
  ------------------
  127|  1.59k|                         (1 << H_ADST) | (1 << V_ADST))))
  128|     78|    {
  129|     78|        return DCT_DCT;
  130|     78|    }
  131|       |
  132|  14.4k|    return ytxtp;
  133|  14.5k|}

dav1d_prep_grain_8bpc:
  105|    318|{
  106|    318|    const Dav1dFilmGrainData *const data = &out->frame_hdr->film_grain.data;
  107|       |#if BITDEPTH != 8
  108|       |    const int bitdepth_max = (1 << out->p.bpc) - 1;
  109|       |#endif
  110|       |
  111|       |    // Generate grain LUTs as needed
  112|    318|    dsp->generate_grain_y(grain_lut[0], data HIGHBD_TAIL_SUFFIX); // always needed
  113|    318|    if (data->num_uv_points[0] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (113:9): [True: 101, False: 217]
  |  Branch (113:35): [True: 142, False: 75]
  ------------------
  114|    243|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[1], grain_lut[0],
  115|    243|                                                 data, 0 HIGHBD_TAIL_SUFFIX);
  116|    318|    if (data->num_uv_points[1] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (116:9): [True: 80, False: 238]
  |  Branch (116:35): [True: 142, False: 96]
  ------------------
  117|    222|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[2], grain_lut[0],
  118|    222|                                                 data, 1 HIGHBD_TAIL_SUFFIX);
  119|       |
  120|       |    // Generate scaling LUTs as needed
  121|    318|    if (data->num_y_points || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (121:9): [True: 209, False: 109]
  |  Branch (121:31): [True: 50, False: 59]
  ------------------
  122|    259|        generate_scaling(in->p.bpc, data->y_points, data->num_y_points, scaling[0]);
  123|    318|    if (data->num_uv_points[0])
  ------------------
  |  Branch (123:9): [True: 101, False: 217]
  ------------------
  124|    101|        generate_scaling(in->p.bpc, data->uv_points[0], data->num_uv_points[0], scaling[1]);
  125|    318|    if (data->num_uv_points[1])
  ------------------
  |  Branch (125:9): [True: 80, False: 238]
  ------------------
  126|     80|        generate_scaling(in->p.bpc, data->uv_points[1], data->num_uv_points[1], scaling[2]);
  127|       |
  128|       |    // Copy over the non-modified planes
  129|    318|    assert(out->stride[0] == in->stride[0]);
  ------------------
  |  |  140|    318|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 318]
  |  |  |  Branch (140:68): [Folded, False: 318]
  |  |  ------------------
  ------------------
  130|    318|    if (!data->num_y_points) {
  ------------------
  |  Branch (130:9): [True: 109, False: 209]
  ------------------
  131|    109|        const ptrdiff_t stride = out->stride[0];
  132|    109|        const ptrdiff_t sz = out->p.h * stride;
  133|    109|        if (sz < 0)
  ------------------
  |  Branch (133:13): [True: 0, False: 109]
  ------------------
  134|      0|            memcpy((uint8_t*) out->data[0] + sz - stride,
  135|      0|                   (uint8_t*) in->data[0] + sz - stride, -sz);
  136|    109|        else
  137|    109|            memcpy(out->data[0], in->data[0], sz);
  138|    109|    }
  139|       |
  140|    318|    if (in->p.layout != DAV1D_PIXEL_LAYOUT_I400 && !data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (140:9): [True: 271, False: 47]
  |  Branch (140:52): [True: 129, False: 142]
  ------------------
  141|    129|        assert(out->stride[1] == in->stride[1]);
  ------------------
  |  |  140|    129|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 129]
  |  |  |  Branch (140:68): [Folded, False: 129]
  |  |  ------------------
  ------------------
  142|    129|        const int ss_ver = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  143|    129|        const ptrdiff_t stride = out->stride[1];
  144|    129|        const ptrdiff_t sz = ((out->p.h + ss_ver) >> ss_ver) * stride;
  145|    129|        if (sz < 0) {
  ------------------
  |  Branch (145:13): [True: 0, False: 129]
  ------------------
  146|      0|            if (!data->num_uv_points[0])
  ------------------
  |  Branch (146:17): [True: 0, False: 0]
  ------------------
  147|      0|                memcpy((uint8_t*) out->data[1] + sz - stride,
  148|      0|                       (uint8_t*) in->data[1] + sz - stride, -sz);
  149|      0|            if (!data->num_uv_points[1])
  ------------------
  |  Branch (149:17): [True: 0, False: 0]
  ------------------
  150|      0|                memcpy((uint8_t*) out->data[2] + sz - stride,
  151|      0|                       (uint8_t*) in->data[2] + sz - stride, -sz);
  152|    129|        } else {
  153|    129|            if (!data->num_uv_points[0])
  ------------------
  |  Branch (153:17): [True: 28, False: 101]
  ------------------
  154|     28|                memcpy(out->data[1], in->data[1], sz);
  155|    129|            if (!data->num_uv_points[1])
  ------------------
  |  Branch (155:17): [True: 49, False: 80]
  ------------------
  156|     49|                memcpy(out->data[2], in->data[2], sz);
  157|    129|        }
  158|    129|    }
  159|    318|}
dav1d_apply_grain_row_8bpc:
  167|  7.60k|{
  168|       |    // Synthesize grain for the affected planes
  169|  7.60k|    const Dav1dFilmGrainData *const data = &out->frame_hdr->film_grain.data;
  170|  7.60k|    const int ss_y = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  171|  7.60k|    const int ss_x = in->p.layout != DAV1D_PIXEL_LAYOUT_I444;
  172|  7.60k|    const int cpw = (out->p.w + ss_x) >> ss_x;
  173|  7.60k|    const int is_id = out->seq_hdr->mtrx == DAV1D_MC_IDENTITY;
  174|  7.60k|    pixel *const luma_src =
  175|  7.60k|        ((pixel *) in->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(in->stride[0]);
  ------------------
  |  |   37|  7.60k|#define FG_BLOCK_SIZE 32
  ------------------
                      ((pixel *) in->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(in->stride[0]);
  ------------------
  |  |   53|  7.60k|#define PXSTRIDE(x) (x)
  ------------------
  176|       |#if BITDEPTH != 8
  177|       |    const int bitdepth_max = (1 << out->p.bpc) - 1;
  178|       |#endif
  179|       |
  180|  7.60k|    if (data->num_y_points) {
  ------------------
  |  Branch (180:9): [True: 4.44k, False: 3.16k]
  ------------------
  181|  4.44k|        const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  4.44k|#define FG_BLOCK_SIZE 32
  ------------------
                      const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  4.44k|#define FG_BLOCK_SIZE 32
  ------------------
  182|  4.44k|        dsp->fgy_32x32xn(((pixel *) out->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[0]),
  ------------------
  |  |   37|  4.44k|#define FG_BLOCK_SIZE 32
  ------------------
                      dsp->fgy_32x32xn(((pixel *) out->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[0]),
  ------------------
  |  |   53|  4.44k|#define PXSTRIDE(x) (x)
  ------------------
  183|  4.44k|                         luma_src, out->stride[0], data,
  184|  4.44k|                         out->p.w, scaling[0], grain_lut[0], bh, row HIGHBD_TAIL_SUFFIX);
  185|  4.44k|    }
  186|       |
  187|  7.60k|    if (!data->num_uv_points[0] && !data->num_uv_points[1] &&
  ------------------
  |  Branch (187:9): [True: 4.86k, False: 2.74k]
  |  Branch (187:36): [True: 3.61k, False: 1.25k]
  ------------------
  188|  3.61k|        !data->chroma_scaling_from_luma)
  ------------------
  |  Branch (188:9): [True: 687, False: 2.92k]
  ------------------
  189|    687|    {
  190|    687|        return;
  191|    687|    }
  192|       |
  193|  6.92k|    const int bh = (imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE) + ss_y) >> ss_y;
  ------------------
  |  |   37|  6.92k|#define FG_BLOCK_SIZE 32
  ------------------
                  const int bh = (imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE) + ss_y) >> ss_y;
  ------------------
  |  |   37|  6.92k|#define FG_BLOCK_SIZE 32
  ------------------
  194|       |
  195|       |    // extend padding pixels
  196|  6.92k|    if (out->p.w & ss_x) {
  ------------------
  |  Branch (196:9): [True: 330, False: 6.59k]
  ------------------
  197|    330|        pixel *ptr = luma_src;
  198|  6.50k|        for (int y = 0; y < bh; y++) {
  ------------------
  |  Branch (198:25): [True: 6.17k, False: 330]
  ------------------
  199|  6.17k|            ptr[out->p.w] = ptr[out->p.w - 1];
  200|  6.17k|            ptr += PXSTRIDE(in->stride[0]) << ss_y;
  ------------------
  |  |   53|  6.17k|#define PXSTRIDE(x) (x)
  ------------------
  201|  6.17k|        }
  202|    330|    }
  203|       |
  204|  6.92k|    const ptrdiff_t uv_off = row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[1]) >> ss_y;
  ------------------
  |  |   37|  6.92k|#define FG_BLOCK_SIZE 32
  ------------------
                  const ptrdiff_t uv_off = row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[1]) >> ss_y;
  ------------------
  |  |   53|  6.92k|#define PXSTRIDE(x) (x)
  ------------------
  205|  6.92k|    if (data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (205:9): [True: 2.92k, False: 3.99k]
  ------------------
  206|  8.78k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (206:26): [True: 5.85k, False: 2.92k]
  ------------------
  207|  5.85k|            dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  208|  5.85k|                                                ((const pixel *) in->data[1 + pl]) + uv_off,
  209|  5.85k|                                                in->stride[1], data, cpw,
  210|  5.85k|                                                scaling[0], grain_lut[1 + pl],
  211|  5.85k|                                                bh, row, luma_src, in->stride[0],
  212|  5.85k|                                                pl, is_id HIGHBD_TAIL_SUFFIX);
  213|  3.99k|    } else {
  214|  11.9k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (214:26): [True: 7.98k, False: 3.99k]
  ------------------
  215|  7.98k|            if (data->num_uv_points[pl])
  ------------------
  |  Branch (215:17): [True: 6.23k, False: 1.74k]
  ------------------
  216|  6.23k|                dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  217|  6.23k|                                                    ((const pixel *) in->data[1 + pl]) + uv_off,
  218|  6.23k|                                                    in->stride[1], data, cpw,
  219|  6.23k|                                                    scaling[1 + pl], grain_lut[1 + pl],
  220|  6.23k|                                                    bh, row, luma_src, in->stride[0],
  221|  6.23k|                                                    pl, is_id HIGHBD_TAIL_SUFFIX);
  222|  3.99k|    }
  223|  6.92k|}
dav1d_apply_grain_8bpc:
  228|    318|{
  229|    318|    ALIGN_STK_16(entry, grain_lut, 3,[GRAIN_HEIGHT + 1][GRAIN_WIDTH]);
  ------------------
  |  |  100|    318|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|    318|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  230|    318|#if ARCH_X86_64 && BITDEPTH == 8
  231|    318|    ALIGN_STK_64(uint8_t, scaling, 3,[SCALING_SIZE]);
  ------------------
  |  |   96|    318|    ALIGN(type var[sz1d]sznd, ALIGN_64_VAL)
  |  |  ------------------
  |  |  |  |   86|    318|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  232|       |#else
  233|       |    uint8_t scaling[3][SCALING_SIZE];
  234|       |#endif
  235|    318|    const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    318|#define FG_BLOCK_SIZE 32
  ------------------
                  const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    318|#define FG_BLOCK_SIZE 32
  ------------------
  236|       |
  237|    318|    bitfn(dav1d_prep_grain)(dsp, out, in, scaling, grain_lut);
  ------------------
  |  |   51|    318|#define bitfn(x) x##_8bpc
  ------------------
  238|  7.92k|    for (int row = 0; row < rows; row++)
  ------------------
  |  Branch (238:23): [True: 7.60k, False: 318]
  ------------------
  239|  7.60k|        bitfn(dav1d_apply_grain_row)(dsp, out, in, scaling, grain_lut, row);
  ------------------
  |  |   51|  7.60k|#define bitfn(x) x##_8bpc
  ------------------
  240|    318|}
fg_apply_tmpl.c:generate_scaling:
   44|    440|{
   45|    440|#if BITDEPTH == 8
   46|    440|    const int shift_x = 0;
   47|    440|    const int scaling_size = SCALING_SIZE;
  ------------------
  |  |   39|    440|#define SCALING_SIZE 256
  ------------------
   48|       |#else
   49|       |    assert(bitdepth > 8);
   50|       |    const int shift_x = bitdepth - 8;
   51|       |    const int scaling_size = 1 << bitdepth;
   52|       |#endif
   53|       |
   54|    440|    if (num == 0) {
  ------------------
  |  Branch (54:9): [True: 50, False: 390]
  ------------------
   55|     50|        memset(scaling, 0, scaling_size);
   56|     50|        return;
   57|     50|    }
   58|       |
   59|       |    // Fill up the preceding entries with the initial value
   60|    390|    memset(scaling, points[0][1], points[0][0] << shift_x);
   61|       |
   62|       |    // Linearly interpolate the values in the middle
   63|    693|    for (int i = 0; i < num - 1; i++) {
  ------------------
  |  Branch (63:21): [True: 303, False: 390]
  ------------------
   64|    303|        const int bx = points[i][0];
   65|    303|        const int by = points[i][1];
   66|    303|        const int ex = points[i+1][0];
   67|    303|        const int ey = points[i+1][1];
   68|    303|        const int dx = ex - bx;
   69|    303|        const int dy = ey - by;
   70|    303|        assert(dx > 0);
  ------------------
  |  |  140|    303|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 303]
  |  |  |  Branch (140:68): [Folded, False: 303]
  |  |  ------------------
  ------------------
   71|    303|        const int delta = dy * ((0x10000 + (dx >> 1)) / dx);
   72|  15.9k|        for (int x = 0, d = 0x8000; x < dx; x++) {
  ------------------
  |  Branch (72:37): [True: 15.6k, False: 303]
  ------------------
   73|  15.6k|            scaling[(bx + x) << shift_x] = by + (d >> 16);
   74|  15.6k|            d += delta;
   75|  15.6k|        }
   76|    303|    }
   77|       |
   78|       |    // Fill up the remaining entries with the final value
   79|    390|    const int n = points[num - 1][0] << shift_x;
   80|    390|    memset(&scaling[n], points[num - 1][1], scaling_size - n);
   81|       |
   82|       |#if BITDEPTH != 8
   83|       |    const int pad = 1 << shift_x, rnd = pad >> 1;
   84|       |    for (int i = 0; i < num - 1; i++) {
   85|       |        const int bx = points[i][0] << shift_x;
   86|       |        const int ex = points[i+1][0] << shift_x;
   87|       |        const int dx = ex - bx;
   88|       |        for (int x = 0; x < dx; x += pad) {
   89|       |            const int range = scaling[bx + x + pad] - scaling[bx + x];
   90|       |            for (int n = 1, r = rnd; n < pad; n++) {
   91|       |                r += range;
   92|       |                scaling[bx + x + n] = scaling[bx + x] + (r >> shift_x);
   93|       |            }
   94|       |        }
   95|       |    }
   96|       |#endif
   97|    390|}
dav1d_prep_grain_16bpc:
  105|    238|{
  106|    238|    const Dav1dFilmGrainData *const data = &out->frame_hdr->film_grain.data;
  107|    238|#if BITDEPTH != 8
  108|    238|    const int bitdepth_max = (1 << out->p.bpc) - 1;
  109|    238|#endif
  110|       |
  111|       |    // Generate grain LUTs as needed
  112|    238|    dsp->generate_grain_y(grain_lut[0], data HIGHBD_TAIL_SUFFIX); // always needed
  ------------------
  |  |   74|    238|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  113|    238|    if (data->num_uv_points[0] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (113:9): [True: 42, False: 196]
  |  Branch (113:35): [True: 132, False: 64]
  ------------------
  114|    174|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[1], grain_lut[0],
  115|    174|                                                 data, 0 HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|    174|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  116|    238|    if (data->num_uv_points[1] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (116:9): [True: 48, False: 190]
  |  Branch (116:35): [True: 132, False: 58]
  ------------------
  117|    180|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[2], grain_lut[0],
  118|    180|                                                 data, 1 HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|    180|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  119|       |
  120|       |    // Generate scaling LUTs as needed
  121|    238|    if (data->num_y_points || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (121:9): [True: 140, False: 98]
  |  Branch (121:31): [True: 65, False: 33]
  ------------------
  122|    205|        generate_scaling(in->p.bpc, data->y_points, data->num_y_points, scaling[0]);
  123|    238|    if (data->num_uv_points[0])
  ------------------
  |  Branch (123:9): [True: 42, False: 196]
  ------------------
  124|     42|        generate_scaling(in->p.bpc, data->uv_points[0], data->num_uv_points[0], scaling[1]);
  125|    238|    if (data->num_uv_points[1])
  ------------------
  |  Branch (125:9): [True: 48, False: 190]
  ------------------
  126|     48|        generate_scaling(in->p.bpc, data->uv_points[1], data->num_uv_points[1], scaling[2]);
  127|       |
  128|       |    // Copy over the non-modified planes
  129|    238|    assert(out->stride[0] == in->stride[0]);
  ------------------
  |  |  140|    238|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 238]
  |  |  |  Branch (140:68): [Folded, False: 238]
  |  |  ------------------
  ------------------
  130|    238|    if (!data->num_y_points) {
  ------------------
  |  Branch (130:9): [True: 98, False: 140]
  ------------------
  131|     98|        const ptrdiff_t stride = out->stride[0];
  132|     98|        const ptrdiff_t sz = out->p.h * stride;
  133|     98|        if (sz < 0)
  ------------------
  |  Branch (133:13): [True: 0, False: 98]
  ------------------
  134|      0|            memcpy((uint8_t*) out->data[0] + sz - stride,
  135|      0|                   (uint8_t*) in->data[0] + sz - stride, -sz);
  136|     98|        else
  137|     98|            memcpy(out->data[0], in->data[0], sz);
  138|     98|    }
  139|       |
  140|    238|    if (in->p.layout != DAV1D_PIXEL_LAYOUT_I400 && !data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (140:9): [True: 203, False: 35]
  |  Branch (140:52): [True: 71, False: 132]
  ------------------
  141|     71|        assert(out->stride[1] == in->stride[1]);
  ------------------
  |  |  140|     71|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 71]
  |  |  |  Branch (140:68): [Folded, False: 71]
  |  |  ------------------
  ------------------
  142|     71|        const int ss_ver = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  143|     71|        const ptrdiff_t stride = out->stride[1];
  144|     71|        const ptrdiff_t sz = ((out->p.h + ss_ver) >> ss_ver) * stride;
  145|     71|        if (sz < 0) {
  ------------------
  |  Branch (145:13): [True: 0, False: 71]
  ------------------
  146|      0|            if (!data->num_uv_points[0])
  ------------------
  |  Branch (146:17): [True: 0, False: 0]
  ------------------
  147|      0|                memcpy((uint8_t*) out->data[1] + sz - stride,
  148|      0|                       (uint8_t*) in->data[1] + sz - stride, -sz);
  149|      0|            if (!data->num_uv_points[1])
  ------------------
  |  Branch (149:17): [True: 0, False: 0]
  ------------------
  150|      0|                memcpy((uint8_t*) out->data[2] + sz - stride,
  151|      0|                       (uint8_t*) in->data[2] + sz - stride, -sz);
  152|     71|        } else {
  153|     71|            if (!data->num_uv_points[0])
  ------------------
  |  Branch (153:17): [True: 29, False: 42]
  ------------------
  154|     29|                memcpy(out->data[1], in->data[1], sz);
  155|     71|            if (!data->num_uv_points[1])
  ------------------
  |  Branch (155:17): [True: 23, False: 48]
  ------------------
  156|     23|                memcpy(out->data[2], in->data[2], sz);
  157|     71|        }
  158|     71|    }
  159|    238|}
dav1d_apply_grain_row_16bpc:
  167|  4.40k|{
  168|       |    // Synthesize grain for the affected planes
  169|  4.40k|    const Dav1dFilmGrainData *const data = &out->frame_hdr->film_grain.data;
  170|  4.40k|    const int ss_y = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  171|  4.40k|    const int ss_x = in->p.layout != DAV1D_PIXEL_LAYOUT_I444;
  172|  4.40k|    const int cpw = (out->p.w + ss_x) >> ss_x;
  173|  4.40k|    const int is_id = out->seq_hdr->mtrx == DAV1D_MC_IDENTITY;
  174|  4.40k|    pixel *const luma_src =
  175|  4.40k|        ((pixel *) in->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(in->stride[0]);
  ------------------
  |  |   37|  4.40k|#define FG_BLOCK_SIZE 32
  ------------------
  176|  4.40k|#if BITDEPTH != 8
  177|  4.40k|    const int bitdepth_max = (1 << out->p.bpc) - 1;
  178|  4.40k|#endif
  179|       |
  180|  4.40k|    if (data->num_y_points) {
  ------------------
  |  Branch (180:9): [True: 2.44k, False: 1.96k]
  ------------------
  181|  2.44k|        const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  2.44k|#define FG_BLOCK_SIZE 32
  ------------------
                      const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  2.44k|#define FG_BLOCK_SIZE 32
  ------------------
  182|  2.44k|        dsp->fgy_32x32xn(((pixel *) out->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[0]),
  ------------------
  |  |   37|  2.44k|#define FG_BLOCK_SIZE 32
  ------------------
  183|  2.44k|                         luma_src, out->stride[0], data,
  184|  2.44k|                         out->p.w, scaling[0], grain_lut[0], bh, row HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|  2.44k|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  185|  2.44k|    }
  186|       |
  187|  4.40k|    if (!data->num_uv_points[0] && !data->num_uv_points[1] &&
  ------------------
  |  Branch (187:9): [True: 3.44k, False: 967]
  |  Branch (187:36): [True: 3.15k, False: 291]
  ------------------
  188|  3.15k|        !data->chroma_scaling_from_luma)
  ------------------
  |  Branch (188:9): [True: 693, False: 2.45k]
  ------------------
  189|    693|    {
  190|    693|        return;
  191|    693|    }
  192|       |
  193|  3.71k|    const int bh = (imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE) + ss_y) >> ss_y;
  ------------------
  |  |   37|  3.71k|#define FG_BLOCK_SIZE 32
  ------------------
                  const int bh = (imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE) + ss_y) >> ss_y;
  ------------------
  |  |   37|  3.71k|#define FG_BLOCK_SIZE 32
  ------------------
  194|       |
  195|       |    // extend padding pixels
  196|  3.71k|    if (out->p.w & ss_x) {
  ------------------
  |  Branch (196:9): [True: 398, False: 3.31k]
  ------------------
  197|    398|        pixel *ptr = luma_src;
  198|  6.70k|        for (int y = 0; y < bh; y++) {
  ------------------
  |  Branch (198:25): [True: 6.31k, False: 398]
  ------------------
  199|  6.31k|            ptr[out->p.w] = ptr[out->p.w - 1];
  200|  6.31k|            ptr += PXSTRIDE(in->stride[0]) << ss_y;
  201|  6.31k|        }
  202|    398|    }
  203|       |
  204|  3.71k|    const ptrdiff_t uv_off = row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[1]) >> ss_y;
  ------------------
  |  |   37|  3.71k|#define FG_BLOCK_SIZE 32
  ------------------
  205|  3.71k|    if (data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (205:9): [True: 2.45k, False: 1.25k]
  ------------------
  206|  7.37k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (206:26): [True: 4.91k, False: 2.45k]
  ------------------
  207|  4.91k|            dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  208|  4.91k|                                                ((const pixel *) in->data[1 + pl]) + uv_off,
  209|  4.91k|                                                in->stride[1], data, cpw,
  210|  4.91k|                                                scaling[0], grain_lut[1 + pl],
  211|  4.91k|                                                bh, row, luma_src, in->stride[0],
  212|  4.91k|                                                pl, is_id HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|  4.91k|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  213|  2.45k|    } else {
  214|  3.77k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (214:26): [True: 2.51k, False: 1.25k]
  ------------------
  215|  2.51k|            if (data->num_uv_points[pl])
  ------------------
  |  Branch (215:17): [True: 2.02k, False: 493]
  ------------------
  216|  2.02k|                dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  217|  2.02k|                                                    ((const pixel *) in->data[1 + pl]) + uv_off,
  218|  2.02k|                                                    in->stride[1], data, cpw,
  219|  2.02k|                                                    scaling[1 + pl], grain_lut[1 + pl],
  220|  2.02k|                                                    bh, row, luma_src, in->stride[0],
  221|  2.02k|                                                    pl, is_id HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|  2.02k|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  222|  1.25k|    }
  223|  3.71k|}
dav1d_apply_grain_16bpc:
  228|    238|{
  229|    238|    ALIGN_STK_16(entry, grain_lut, 3,[GRAIN_HEIGHT + 1][GRAIN_WIDTH]);
  ------------------
  |  |  100|    238|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|    238|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  230|       |#if ARCH_X86_64 && BITDEPTH == 8
  231|       |    ALIGN_STK_64(uint8_t, scaling, 3,[SCALING_SIZE]);
  232|       |#else
  233|    238|    uint8_t scaling[3][SCALING_SIZE];
  234|    238|#endif
  235|    238|    const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    238|#define FG_BLOCK_SIZE 32
  ------------------
                  const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    238|#define FG_BLOCK_SIZE 32
  ------------------
  236|       |
  237|    238|    bitfn(dav1d_prep_grain)(dsp, out, in, scaling, grain_lut);
  ------------------
  |  |   77|    238|#define bitfn(x) x##_16bpc
  ------------------
  238|  4.64k|    for (int row = 0; row < rows; row++)
  ------------------
  |  Branch (238:23): [True: 4.40k, False: 238]
  ------------------
  239|  4.40k|        bitfn(dav1d_apply_grain_row)(dsp, out, in, scaling, grain_lut, row);
  ------------------
  |  |   77|  4.40k|#define bitfn(x) x##_16bpc
  ------------------
  240|    238|}

dav1d_film_grain_dsp_init_8bpc:
  423|  4.86k|COLD void bitfn(dav1d_film_grain_dsp_init)(Dav1dFilmGrainDSPContext *const c) {
  424|  4.86k|    c->generate_grain_y = generate_grain_y_c;
  425|  4.86k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I420 - 1] = generate_grain_uv_420_c;
  426|  4.86k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I422 - 1] = generate_grain_uv_422_c;
  427|  4.86k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I444 - 1] = generate_grain_uv_444_c;
  428|       |
  429|  4.86k|    c->fgy_32x32xn = fgy_32x32xn_c;
  430|  4.86k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I420 - 1] = fguv_32x32xn_420_c;
  431|  4.86k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I422 - 1] = fguv_32x32xn_422_c;
  432|  4.86k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I444 - 1] = fguv_32x32xn_444_c;
  433|       |
  434|  4.86k|#if HAVE_ASM
  435|       |#if ARCH_AARCH64 || ARCH_ARM
  436|       |    film_grain_dsp_init_arm(c);
  437|       |#elif ARCH_X86
  438|       |    film_grain_dsp_init_x86(c);
  439|  4.86k|#endif
  440|  4.86k|#endif
  441|  4.86k|}
dav1d_film_grain_dsp_init_16bpc:
  423|  6.93k|COLD void bitfn(dav1d_film_grain_dsp_init)(Dav1dFilmGrainDSPContext *const c) {
  424|  6.93k|    c->generate_grain_y = generate_grain_y_c;
  425|  6.93k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I420 - 1] = generate_grain_uv_420_c;
  426|  6.93k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I422 - 1] = generate_grain_uv_422_c;
  427|  6.93k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I444 - 1] = generate_grain_uv_444_c;
  428|       |
  429|  6.93k|    c->fgy_32x32xn = fgy_32x32xn_c;
  430|  6.93k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I420 - 1] = fguv_32x32xn_420_c;
  431|  6.93k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I422 - 1] = fguv_32x32xn_422_c;
  432|  6.93k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I444 - 1] = fguv_32x32xn_444_c;
  433|       |
  434|  6.93k|#if HAVE_ASM
  435|       |#if ARCH_AARCH64 || ARCH_ARM
  436|       |    film_grain_dsp_init_arm(c);
  437|       |#elif ARCH_X86
  438|       |    film_grain_dsp_init_x86(c);
  439|  6.93k|#endif
  440|  6.93k|#endif
  441|  6.93k|}

dav1d_init_get_bits:
   38|  46.8k|{
   39|  46.8k|    assert(sz);
  ------------------
  |  |  140|  46.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 46.8k]
  |  |  |  Branch (140:68): [Folded, False: 46.8k]
  |  |  ------------------
  ------------------
   40|  46.8k|    c->ptr = c->ptr_start = data;
   41|  46.8k|    c->ptr_end = &c->ptr_start[sz];
   42|  46.8k|    c->state = 0;
   43|  46.8k|    c->bits_left = 0;
   44|  46.8k|    c->error = 0;
   45|  46.8k|}
dav1d_get_bit:
   47|  1.32M|unsigned dav1d_get_bit(GetBits *const c) {
   48|  1.32M|    if (!c->bits_left) {
  ------------------
  |  Branch (48:9): [True: 198k, False: 1.12M]
  ------------------
   49|   198k|        if (c->ptr >= c->ptr_end) {
  ------------------
  |  Branch (49:13): [True: 189, False: 198k]
  ------------------
   50|    189|            c->error = 1;
   51|   198k|        } else {
   52|   198k|            const unsigned state = *c->ptr++;
   53|   198k|            c->bits_left = 7;
   54|   198k|            c->state = (uint64_t) state << 57;
   55|   198k|            return state >> 7;
   56|   198k|        }
   57|   198k|    }
   58|       |
   59|  1.12M|    const uint64_t state = c->state;
   60|  1.12M|    c->bits_left--;
   61|  1.12M|    c->state = state << 1;
   62|  1.12M|    return (unsigned) (state >> 63);
   63|  1.32M|}
dav1d_get_bits:
   81|   613k|type name(GetBits *const c, const int n) {      \
   82|   613k|    assert(n > 0 && n <= 32);                   \
  ------------------
  |  |  140|  1.22M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 613k, False: 0]
  |  |  |  Branch (140:30): [True: 613k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 613k]
  |  |  ------------------
  ------------------
   83|   613k|    /* Unsigned cast avoids refill after eob */ \
   84|   613k|    if ((unsigned) n > (unsigned) c->bits_left) \
  ------------------
  |  Branch (84:9): [True: 337k, False: 276k]
  ------------------
   85|   613k|        refill(c, n);                           \
   86|   613k|    const uint64_t state = c->state;            \
   87|   613k|    c->bits_left -= n;                          \
   88|   613k|    c->state = state << n;                      \
   89|   613k|    return (type) ((type64) state >> (64 - n)); \
   90|   613k|}
dav1d_get_sbits:
   81|   152k|type name(GetBits *const c, const int n) {      \
   82|   152k|    assert(n > 0 && n <= 32);                   \
  ------------------
  |  |  140|   304k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 152k, False: 0]
  |  |  |  Branch (140:30): [True: 152k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 152k]
  |  |  ------------------
  ------------------
   83|   152k|    /* Unsigned cast avoids refill after eob */ \
   84|   152k|    if ((unsigned) n > (unsigned) c->bits_left) \
  ------------------
  |  Branch (84:9): [True: 137k, False: 14.7k]
  ------------------
   85|   152k|        refill(c, n);                           \
   86|   152k|    const uint64_t state = c->state;            \
   87|   152k|    c->bits_left -= n;                          \
   88|   152k|    c->state = state << n;                      \
   89|   152k|    return (type) ((type64) state >> (64 - n)); \
   90|   152k|}
dav1d_get_uleb128:
   95|  37.3k|unsigned dav1d_get_uleb128(GetBits *const c) {
   96|  37.3k|    uint64_t val = 0;
   97|  37.3k|    unsigned i = 0, more;
   98|       |
   99|  40.6k|    do {
  100|  40.6k|        const int v = dav1d_get_bits(c, 8);
  101|  40.6k|        more = v & 0x80;
  102|  40.6k|        val |= ((uint64_t) (v & 0x7F)) << i;
  103|  40.6k|        i += 7;
  104|  40.6k|    } while (more && i < 56);
  ------------------
  |  Branch (104:14): [True: 3.28k, False: 37.3k]
  |  Branch (104:22): [True: 3.26k, False: 18]
  ------------------
  105|       |
  106|  37.3k|    if (val > UINT32_MAX || more) {
  ------------------
  |  Branch (106:9): [True: 82, False: 37.3k]
  |  Branch (106:29): [True: 3, False: 37.3k]
  ------------------
  107|     85|        c->error = 1;
  108|     85|        return 0;
  109|     85|    }
  110|       |
  111|  37.3k|    return (unsigned) val;
  112|  37.3k|}
dav1d_get_uniform:
  114|  6.03k|unsigned dav1d_get_uniform(GetBits *const c, const unsigned max) {
  115|       |    // Output in range [0..max-1]
  116|       |    // max must be > 1, or else nothing is read from the bitstream
  117|  6.03k|    assert(max > 1);
  ------------------
  |  |  140|  6.03k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 6.03k]
  |  |  |  Branch (140:68): [Folded, False: 6.03k]
  |  |  ------------------
  ------------------
  118|  6.03k|    const int l = ulog2(max) + 1;
  119|  6.03k|    assert(l > 1);
  ------------------
  |  |  140|  6.03k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 6.03k]
  |  |  |  Branch (140:68): [Folded, False: 6.03k]
  |  |  ------------------
  ------------------
  120|  6.03k|    const unsigned m = (1U << l) - max;
  121|  6.03k|    const unsigned v = dav1d_get_bits(c, l - 1);
  122|  6.03k|    return v < m ? v : (v << 1) - m + dav1d_get_bit(c);
  ------------------
  |  Branch (122:12): [True: 4.47k, False: 1.55k]
  ------------------
  123|  6.03k|}
dav1d_get_vlc:
  125|    257|unsigned dav1d_get_vlc(GetBits *const c) {
  126|    257|    if (dav1d_get_bit(c))
  ------------------
  |  Branch (126:9): [True: 76, False: 181]
  ------------------
  127|     76|        return 0;
  128|       |
  129|    181|    int n_bits = 0;
  130|  1.55k|    do {
  131|  1.55k|        if (++n_bits == 32)
  ------------------
  |  Branch (131:13): [True: 10, False: 1.54k]
  ------------------
  132|     10|            return UINT32_MAX;
  133|  1.55k|    } while (!dav1d_get_bit(c));
  ------------------
  |  Branch (133:14): [True: 1.37k, False: 171]
  ------------------
  134|       |
  135|    171|    return ((1U << n_bits) - 1) + dav1d_get_bits(c, n_bits);
  136|    181|}
dav1d_get_bits_subexp:
  162|  27.0k|int dav1d_get_bits_subexp(GetBits *const c, const int ref, const unsigned n) {
  163|  27.0k|    return (int) get_bits_subexp_u(c, ref + (1 << n), 2 << n) - (1 << n);
  164|  27.0k|}
getbits.c:refill:
   65|   474k|static inline void refill(GetBits *const c, const int n) {
   66|   474k|    assert(c->bits_left >= 0 && c->bits_left < 32);
  ------------------
  |  |  140|   949k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 474k, False: 0]
  |  |  |  Branch (140:30): [True: 474k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 474k]
  |  |  ------------------
  ------------------
   67|   474k|    unsigned state = 0;
   68|   503k|    do {
   69|   503k|        if (c->ptr >= c->ptr_end) {
  ------------------
  |  Branch (69:13): [True: 542, False: 503k]
  ------------------
   70|    542|            c->error = 1;
   71|    542|            if (state) break;
  ------------------
  |  Branch (71:17): [True: 98, False: 444]
  ------------------
   72|    444|            return;
   73|    542|        }
   74|   503k|        state = (state << 8) | *c->ptr++;
   75|   503k|        c->bits_left += 8;
   76|   503k|    } while (n > c->bits_left);
  ------------------
  |  Branch (76:14): [True: 28.9k, False: 474k]
  ------------------
   77|   474k|    c->state |= (uint64_t) state << (64 - c->bits_left);
   78|   474k|}
getbits.c:get_bits_subexp_u:
  140|  27.0k|{
  141|  27.0k|    unsigned v = 0;
  142|       |
  143|  56.8k|    for (int i = 0;; i++) {
  144|  56.8k|        const int b = i ? 3 + i - 1 : 3;
  ------------------
  |  Branch (144:23): [True: 29.7k, False: 27.0k]
  ------------------
  145|       |
  146|  56.8k|        if (n < v + 3 * (1 << b)) {
  ------------------
  |  Branch (146:13): [True: 988, False: 55.8k]
  ------------------
  147|    988|            v += dav1d_get_uniform(c, n - v + 1);
  148|    988|            break;
  149|    988|        }
  150|       |
  151|  55.8k|        if (!dav1d_get_bit(c)) {
  ------------------
  |  Branch (151:13): [True: 26.0k, False: 29.7k]
  ------------------
  152|  26.0k|            v += dav1d_get_bits(c, b);
  153|  26.0k|            break;
  154|  26.0k|        }
  155|       |
  156|  29.7k|        v += 1 << b;
  157|  29.7k|    }
  158|       |
  159|  27.0k|    return ref * 2 <= n ? inv_recenter(ref, v) : n - inv_recenter(n - ref, v);
  ------------------
  |  Branch (159:12): [True: 26.5k, False: 441]
  ------------------
  160|  27.0k|}

obu.c:dav1d_bytealign_get_bits:
   52|  34.6k|static inline void dav1d_bytealign_get_bits(GetBits *c) {
   53|       |    // bits_left is never more than 7, because it is only incremented
   54|       |    // by refill(), called by dav1d_get_bits and that never reads more
   55|       |    // than 7 bits more than it needs.
   56|       |    //
   57|       |    // If this wasn't true, we would need to work out how many bits to
   58|       |    // discard (bits_left % 8), subtract that from bits_left and then
   59|       |    // shift state right by that amount.
   60|  34.6k|    assert(c->bits_left <= 7);
  ------------------
  |  |  140|  34.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 34.6k]
  |  |  |  Branch (140:68): [Folded, False: 34.6k]
  |  |  ------------------
  ------------------
   61|       |
   62|  34.6k|    c->bits_left = 0;
   63|  34.6k|    c->state = 0;
   64|  34.6k|}

dav1d_init_intra_edge_tree:
  126|      1|COLD void dav1d_init_intra_edge_tree(void) {
  127|       |    // This function is guaranteed to be called only once
  128|      1|    struct ModeSelMem mem;
  129|       |
  130|      1|    mem.nwc[BL_128X128] = &nodes.branch_sb128[1];
  131|      1|    mem.nwc[BL_64X64] = &nodes.branch_sb128[1 + 4];
  132|      1|    mem.nwc[BL_32X32] = &nodes.branch_sb128[1 + 4 + 16];
  133|      1|    mem.nt = nodes.tip_sb128;
  134|      1|    init_mode_node(nodes.branch_sb128, BL_128X128, &mem, 1, 0);
  135|      1|    assert(mem.nwc[BL_128X128] == &nodes.branch_sb128[1 + 4]);
  ------------------
  |  |  140|      1|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1]
  |  |  |  Branch (140:68): [Folded, False: 1]
  |  |  ------------------
  ------------------
  136|      1|    assert(mem.nwc[BL_64X64] == &nodes.branch_sb128[1 + 4 + 16]);
  ------------------
  |  |  140|      1|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1]
  |  |  |  Branch (140:68): [Folded, False: 1]
  |  |  ------------------
  ------------------
  137|      1|    assert(mem.nwc[BL_32X32] == &nodes.branch_sb128[1 + 4 + 16 + 64]);
  ------------------
  |  |  140|      1|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1]
  |  |  |  Branch (140:68): [Folded, False: 1]
  |  |  ------------------
  ------------------
  138|      1|    assert(mem.nt == &nodes.tip_sb128[256]);
  ------------------
  |  |  140|      1|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1]
  |  |  |  Branch (140:68): [Folded, False: 1]
  |  |  ------------------
  ------------------
  139|       |
  140|      1|    mem.nwc[BL_128X128] = NULL;
  141|      1|    mem.nwc[BL_64X64] = &nodes.branch_sb64[1];
  142|      1|    mem.nwc[BL_32X32] = &nodes.branch_sb64[1 + 4];
  143|      1|    mem.nt = nodes.tip_sb64;
  144|      1|    init_mode_node(nodes.branch_sb64, BL_64X64, &mem, 1, 0);
  145|      1|    assert(mem.nwc[BL_64X64] == &nodes.branch_sb64[1 + 4]);
  ------------------
  |  |  140|      1|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1]
  |  |  |  Branch (140:68): [Folded, False: 1]
  |  |  ------------------
  ------------------
  146|      1|    assert(mem.nwc[BL_32X32] == &nodes.branch_sb64[1 + 4 + 16]);
  ------------------
  |  |  140|      1|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1]
  |  |  |  Branch (140:68): [Folded, False: 1]
  |  |  ------------------
  ------------------
  147|      1|    assert(mem.nt == &nodes.tip_sb64[64]);
  ------------------
  |  |  140|      1|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1]
  |  |  |  Branch (140:68): [Folded, False: 1]
  |  |  ------------------
  ------------------
  148|      1|}
intra_edge.c:init_mode_node:
  101|    106|{
  102|    106|    init_edges(&nwc->node, bl,
  103|    106|               (top_has_right ? EDGE_ALL_TOP_HAS_RIGHT : 0) |
  ------------------
  |  Branch (103:17): [True: 73, False: 33]
  ------------------
  104|    106|               (left_has_bottom ? EDGE_ALL_LEFT_HAS_BOTTOM : 0));
  ------------------
  |  Branch (104:17): [True: 33, False: 73]
  ------------------
  105|    106|    if (bl == BL_16X16) {
  ------------------
  |  Branch (105:9): [True: 80, False: 26]
  ------------------
  106|    400|        for (int n = 0; n < 4; n++) {
  ------------------
  |  Branch (106:25): [True: 320, False: 80]
  ------------------
  107|    320|            EdgeTip *const nt = mem->nt++;
  108|    320|            nwc->split_offset[n] = PTR_OFFSET(nwc, nt);
  ------------------
  |  |   94|    320|#define PTR_OFFSET(a, b) ((uint16_t)((uintptr_t)(b) - (uintptr_t)(a)))
  ------------------
  109|    320|            init_edges(&nt->node, bl + 1,
  110|    320|                       ((n == 3 || (n == 1 && !top_has_right)) ? 0 :
  ------------------
  |  Branch (110:26): [True: 80, False: 240]
  |  Branch (110:37): [True: 80, False: 160]
  |  Branch (110:47): [True: 26, False: 54]
  ------------------
  111|    320|                        EDGE_ALL_TOP_HAS_RIGHT) |
  112|    320|                       (!(n == 0 || (n == 2 && left_has_bottom)) ? 0 :
  ------------------
  |  Branch (112:27): [True: 80, False: 240]
  |  Branch (112:38): [True: 80, False: 160]
  |  Branch (112:48): [True: 26, False: 54]
  ------------------
  113|    320|                        EDGE_ALL_LEFT_HAS_BOTTOM));
  114|    320|        }
  115|     80|    } else {
  116|    130|        for (int n = 0; n < 4; n++) {
  ------------------
  |  Branch (116:25): [True: 104, False: 26]
  ------------------
  117|    104|            EdgeBranch *const nwc_child = mem->nwc[bl]++;
  118|    104|            nwc->split_offset[n] = PTR_OFFSET(nwc, nwc_child);
  ------------------
  |  |   94|    104|#define PTR_OFFSET(a, b) ((uint16_t)((uintptr_t)(b) - (uintptr_t)(a)))
  ------------------
  119|    104|            init_mode_node(nwc_child, bl + 1, mem,
  120|    104|                           !(n == 3 || (n == 1 && !top_has_right)),
  ------------------
  |  Branch (120:30): [True: 26, False: 78]
  |  Branch (120:41): [True: 26, False: 52]
  |  Branch (120:51): [True: 7, False: 19]
  ------------------
  121|    104|                           n == 0 || (n == 2 && left_has_bottom));
  ------------------
  |  Branch (121:28): [True: 26, False: 78]
  |  Branch (121:39): [True: 26, False: 52]
  |  Branch (121:49): [True: 7, False: 19]
  ------------------
  122|    104|        }
  123|     26|    }
  124|    106|}
intra_edge.c:init_edges:
   58|    426|{
   59|    426|    node->o = edge_flags;
   60|    426|    node->h[0] = edge_flags | EDGE_ALL_LEFT_HAS_BOTTOM;
   61|    426|    node->v[0] = edge_flags | EDGE_ALL_TOP_HAS_RIGHT;
   62|       |
   63|    426|    if (bl == BL_8X8) {
  ------------------
  |  Branch (63:9): [True: 320, False: 106]
  ------------------
   64|    320|        EdgeTip *const nt = (EdgeTip *) node;
   65|       |
   66|    320|        node->h[1] = edge_flags & (EDGE_ALL_LEFT_HAS_BOTTOM |
   67|    320|                                   EDGE_I420_TOP_HAS_RIGHT);
   68|    320|        node->v[1] = edge_flags & (EDGE_ALL_TOP_HAS_RIGHT |
   69|    320|                                   EDGE_I420_LEFT_HAS_BOTTOM |
   70|    320|                                   EDGE_I422_LEFT_HAS_BOTTOM);
   71|       |
   72|    320|        nt->split[0] = (edge_flags & EDGE_ALL_TOP_HAS_RIGHT) |
   73|    320|                       EDGE_I422_LEFT_HAS_BOTTOM;
   74|    320|        nt->split[1] = edge_flags | EDGE_I444_TOP_HAS_RIGHT;
   75|    320|        nt->split[2] = edge_flags & (EDGE_I420_TOP_HAS_RIGHT |
   76|    320|                                     EDGE_I420_LEFT_HAS_BOTTOM |
   77|    320|                                     EDGE_I422_LEFT_HAS_BOTTOM);
   78|    320|    } else {
   79|    106|        EdgeBranch *const nwc = (EdgeBranch *) node;
   80|       |
   81|    106|        node->h[1] = edge_flags & EDGE_ALL_LEFT_HAS_BOTTOM;
   82|    106|        node->v[1] = edge_flags & EDGE_ALL_TOP_HAS_RIGHT;
   83|       |
   84|    106|        nwc->h4 = EDGE_ALL_LEFT_HAS_BOTTOM;
   85|    106|        nwc->v4 = EDGE_ALL_TOP_HAS_RIGHT;
   86|    106|        if (bl == BL_16X16) {
  ------------------
  |  Branch (86:13): [True: 80, False: 26]
  ------------------
   87|     80|            nwc->h4 |= edge_flags & EDGE_I420_TOP_HAS_RIGHT;
   88|     80|            nwc->v4 |= edge_flags & (EDGE_I420_LEFT_HAS_BOTTOM |
   89|     80|                                     EDGE_I422_LEFT_HAS_BOTTOM);
   90|     80|        }
   91|    106|    }
   92|    426|}

recon_tmpl.c:sm_flag:
   95|  3.66M|static inline int sm_flag(const BlockContext *const b, const int idx) {
   96|  3.66M|    if (!b->intra[idx]) return 0;
  ------------------
  |  Branch (96:9): [True: 54.6k, False: 3.60M]
  ------------------
   97|  3.60M|    const enum IntraPredMode m = b->mode[idx];
   98|  3.60M|    return (m == SMOOTH_PRED || m == SMOOTH_H_PRED ||
  ------------------
  |  Branch (98:13): [True: 256k, False: 3.35M]
  |  Branch (98:33): [True: 78.3k, False: 3.27M]
  ------------------
   99|  3.27M|            m == SMOOTH_V_PRED) ? ANGLE_SMOOTH_EDGE_FLAG : 0;
  ------------------
  |  |   93|   390k|#define ANGLE_SMOOTH_EDGE_FLAG      512
  ------------------
  |  Branch (99:13): [True: 55.3k, False: 3.21M]
  ------------------
  100|  3.66M|}
recon_tmpl.c:sm_uv_flag:
  102|  3.19M|static inline int sm_uv_flag(const BlockContext *const b, const int idx) {
  103|  3.19M|    const enum IntraPredMode m = b->uvmode[idx];
  104|  3.19M|    return (m == SMOOTH_PRED || m == SMOOTH_H_PRED ||
  ------------------
  |  Branch (104:13): [True: 171k, False: 3.02M]
  |  Branch (104:33): [True: 68.2k, False: 2.95M]
  ------------------
  105|  2.95M|            m == SMOOTH_V_PRED) ? ANGLE_SMOOTH_EDGE_FLAG : 0;
  ------------------
  |  |   93|   292k|#define ANGLE_SMOOTH_EDGE_FLAG      512
  ------------------
  |  Branch (105:13): [True: 52.8k, False: 2.90M]
  ------------------
  106|  3.19M|}

dav1d_prepare_intra_edges_8bpc:
   86|  2.71M|{
   87|  2.71M|    const int bitdepth = bitdepth_from_max(bitdepth_max);
  ------------------
  |  |   58|  2.71M|#define bitdepth_from_max(x) 8
  ------------------
   88|  2.71M|    assert(y < h && x < w);
  ------------------
  |  |  140|  5.43M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 2.71M, False: 0]
  |  |  |  Branch (140:30): [True: 2.71M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 2.71M]
  |  |  ------------------
  ------------------
   89|       |
   90|  2.71M|    switch (mode) {
   91|   144k|    case VERT_PRED:
  ------------------
  |  Branch (91:5): [True: 144k, False: 2.57M]
  ------------------
   92|   384k|    case HOR_PRED:
  ------------------
  |  Branch (92:5): [True: 240k, False: 2.47M]
  ------------------
   93|   433k|    case DIAG_DOWN_LEFT_PRED:
  ------------------
  |  Branch (93:5): [True: 48.9k, False: 2.66M]
  ------------------
   94|   482k|    case DIAG_DOWN_RIGHT_PRED:
  ------------------
  |  Branch (94:5): [True: 49.1k, False: 2.66M]
  ------------------
   95|   521k|    case VERT_RIGHT_PRED:
  ------------------
  |  Branch (95:5): [True: 38.7k, False: 2.67M]
  ------------------
   96|   580k|    case HOR_DOWN_PRED:
  ------------------
  |  Branch (96:5): [True: 59.2k, False: 2.65M]
  ------------------
   97|   687k|    case HOR_UP_PRED:
  ------------------
  |  Branch (97:5): [True: 106k, False: 2.61M]
  ------------------
   98|   742k|    case VERT_LEFT_PRED: {
  ------------------
  |  Branch (98:5): [True: 55.1k, False: 2.66M]
  ------------------
   99|   742k|        *angle = av1_mode_to_angle_map[mode - VERT_PRED] + 3 * *angle;
  100|       |
  101|   742k|        if (*angle <= 90)
  ------------------
  |  Branch (101:13): [True: 215k, False: 527k]
  ------------------
  102|   215k|            mode = *angle < 90 && have_top ? Z1_PRED : VERT_PRED;
  ------------------
  |  Branch (102:20): [True: 128k, False: 86.6k]
  |  Branch (102:35): [True: 114k, False: 14.0k]
  ------------------
  103|   527k|        else if (*angle < 180)
  ------------------
  |  Branch (103:18): [True: 229k, False: 297k]
  ------------------
  104|   229k|            mode = Z2_PRED;
  105|   297k|        else
  106|   297k|            mode = *angle > 180 && have_left ? Z3_PRED : HOR_PRED;
  ------------------
  |  Branch (106:20): [True: 168k, False: 129k]
  |  Branch (106:36): [True: 154k, False: 13.6k]
  ------------------
  107|   742k|        break;
  108|   687k|    }
  109|  1.15M|    case DC_PRED:
  ------------------
  |  Branch (109:5): [True: 1.15M, False: 1.55M]
  ------------------
  110|  1.48M|    case PAETH_PRED:
  ------------------
  |  Branch (110:5): [True: 324k, False: 2.39M]
  ------------------
  111|  1.48M|        mode = av1_mode_conv[mode][have_left][have_top];
  112|  1.48M|        break;
  113|   491k|    default:
  ------------------
  |  Branch (113:5): [True: 491k, False: 2.22M]
  ------------------
  114|   491k|        break;
  115|  2.71M|    }
  116|       |
  117|  2.71M|    const pixel *dst_top;
  118|  2.71M|    if (have_top &&
  ------------------
  |  Branch (118:9): [True: 2.40M, False: 310k]
  ------------------
  119|  2.40M|        (av1_intra_prediction_edges[mode].needs_top ||
  ------------------
  |  Branch (119:10): [True: 2.13M, False: 268k]
  ------------------
  120|   268k|         av1_intra_prediction_edges[mode].needs_topleft ||
  ------------------
  |  Branch (120:10): [True: 137k, False: 130k]
  ------------------
  121|   130k|         (av1_intra_prediction_edges[mode].needs_left && !have_left)))
  ------------------
  |  Branch (121:11): [True: 130k, False: 0]
  |  Branch (121:58): [True: 21.2k, False: 109k]
  ------------------
  122|  2.29M|    {
  123|  2.29M|        if (prefilter_toplevel_sb_edge) {
  ------------------
  |  Branch (123:13): [True: 266k, False: 2.03M]
  ------------------
  124|   266k|            dst_top = &prefilter_toplevel_sb_edge[x * 4];
  125|  2.03M|        } else {
  126|  2.03M|            dst_top = &dst[-PXSTRIDE(stride)];
  ------------------
  |  |   53|  2.03M|#define PXSTRIDE(x) (x)
  ------------------
  127|  2.03M|        }
  128|  2.29M|    }
  129|       |
  130|  2.71M|    if (av1_intra_prediction_edges[mode].needs_left) {
  ------------------
  |  Branch (130:9): [True: 2.34M, False: 371k]
  ------------------
  131|  2.34M|        const int sz = th << 2;
  132|  2.34M|        pixel *const left = &topleft_out[-sz];
  133|       |
  134|  2.34M|        if (have_left) {
  ------------------
  |  Branch (134:13): [True: 2.25M, False: 92.7k]
  ------------------
  135|  2.25M|            const int px_have = imin(sz, (h - y) << 2);
  136|       |
  137|  29.3M|            for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (137:29): [True: 27.0M, False: 2.25M]
  ------------------
  138|  27.0M|                left[sz - 1 - i] = dst[PXSTRIDE(stride) * i - 1];
  ------------------
  |  |   53|  27.0M|#define PXSTRIDE(x) (x)
  ------------------
  139|  2.25M|            if (px_have < sz)
  ------------------
  |  Branch (139:17): [True: 64.9k, False: 2.18M]
  ------------------
  140|  64.9k|                pixel_set(left, left[sz - px_have], sz - px_have);
  ------------------
  |  |   48|  64.9k|#define pixel_set memset
  ------------------
  141|  2.25M|        } else {
  142|  92.7k|            pixel_set(left, have_top ? *dst_top : ((1 << bitdepth) >> 1) + 1, sz);
  ------------------
  |  |   48|  92.7k|#define pixel_set memset
  ------------------
  |  Branch (142:29): [True: 88.2k, False: 4.52k]
  ------------------
  143|  92.7k|        }
  144|       |
  145|  2.34M|        if (av1_intra_prediction_edges[mode].needs_bottomleft) {
  ------------------
  |  Branch (145:13): [True: 154k, False: 2.19M]
  ------------------
  146|   154k|            const int have_bottomleft = (!have_left || y + th >= h) ? 0 :
  ------------------
  |  Branch (146:42): [True: 0, False: 154k]
  |  Branch (146:56): [True: 15.2k, False: 139k]
  ------------------
  147|   154k|                                        (edge_flags & EDGE_I444_LEFT_HAS_BOTTOM);
  148|       |
  149|   154k|            if (have_bottomleft) {
  ------------------
  |  Branch (149:17): [True: 43.0k, False: 111k]
  ------------------
  150|  43.0k|                const int px_have = imin(sz, (h - y - th) << 2);
  151|       |
  152|   505k|                for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (152:33): [True: 462k, False: 43.0k]
  ------------------
  153|   462k|                    left[-(i + 1)] = dst[(sz + i) * PXSTRIDE(stride) - 1];
  ------------------
  |  |   53|   462k|#define PXSTRIDE(x) (x)
  ------------------
  154|  43.0k|                if (px_have < sz)
  ------------------
  |  Branch (154:21): [True: 852, False: 42.2k]
  ------------------
  155|    852|                    pixel_set(left - sz, left[-px_have], sz - px_have);
  ------------------
  |  |   48|    852|#define pixel_set memset
  ------------------
  156|   111k|            } else {
  157|   111k|                pixel_set(left - sz, left[0], sz);
  ------------------
  |  |   48|   111k|#define pixel_set memset
  ------------------
  158|   111k|            }
  159|   154k|        }
  160|  2.34M|    }
  161|       |
  162|  2.71M|    if (av1_intra_prediction_edges[mode].needs_top) {
  ------------------
  |  Branch (162:9): [True: 2.23M, False: 483k]
  ------------------
  163|  2.23M|        const int sz = tw << 2;
  164|  2.23M|        pixel *const top = &topleft_out[1];
  165|       |
  166|  2.23M|        if (have_top) {
  ------------------
  |  Branch (166:13): [True: 2.13M, False: 94.4k]
  ------------------
  167|  2.13M|            const int px_have = imin(sz, (w - x) << 2);
  168|  2.13M|            pixel_copy(top, dst_top, px_have);
  ------------------
  |  |   47|  2.13M|#define pixel_copy memcpy
  ------------------
  169|  2.13M|            if (px_have < sz)
  ------------------
  |  Branch (169:17): [True: 95.3k, False: 2.04M]
  ------------------
  170|  95.3k|                pixel_set(top + px_have, top[px_have - 1], sz - px_have);
  ------------------
  |  |   48|  95.3k|#define pixel_set memset
  ------------------
  171|  2.13M|        } else {
  172|  94.4k|            pixel_set(top, have_left ? dst[-1] : ((1 << bitdepth) >> 1) - 1, sz);
  ------------------
  |  |   48|  94.4k|#define pixel_set memset
  ------------------
  |  Branch (172:28): [True: 89.7k, False: 4.71k]
  ------------------
  173|  94.4k|        }
  174|       |
  175|  2.23M|        if (av1_intra_prediction_edges[mode].needs_topright) {
  ------------------
  |  Branch (175:13): [True: 114k, False: 2.11M]
  ------------------
  176|   114k|            const int have_topright = (!have_top || x + tw >= w) ? 0 :
  ------------------
  |  Branch (176:40): [True: 0, False: 114k]
  |  Branch (176:53): [True: 15.2k, False: 99.1k]
  ------------------
  177|   114k|                                      (edge_flags & EDGE_I444_TOP_HAS_RIGHT);
  178|       |
  179|   114k|            if (have_topright) {
  ------------------
  |  Branch (179:17): [True: 67.8k, False: 46.6k]
  ------------------
  180|  67.8k|                const int px_have = imin(sz, (w - x - tw) << 2);
  181|       |
  182|  67.8k|                pixel_copy(top + sz, &dst_top[sz], px_have);
  ------------------
  |  |   47|  67.8k|#define pixel_copy memcpy
  ------------------
  183|  67.8k|                if (px_have < sz)
  ------------------
  |  Branch (183:21): [True: 1.81k, False: 66.0k]
  ------------------
  184|  1.81k|                    pixel_set(top + sz + px_have, top[sz + px_have - 1],
  ------------------
  |  |   48|  1.81k|#define pixel_set memset
  ------------------
  185|  1.81k|                              sz - px_have);
  186|  67.8k|            } else {
  187|  46.6k|                pixel_set(top + sz, top[sz - 1], sz);
  ------------------
  |  |   48|  46.6k|#define pixel_set memset
  ------------------
  188|  46.6k|            }
  189|   114k|        }
  190|  2.23M|    }
  191|       |
  192|  2.71M|    if (av1_intra_prediction_edges[mode].needs_topleft) {
  ------------------
  |  Branch (192:9): [True: 885k, False: 1.83M]
  ------------------
  193|   885k|        if (have_left)
  ------------------
  |  Branch (193:13): [True: 841k, False: 43.8k]
  ------------------
  194|   841k|            *topleft_out = have_top ? dst_top[-1] : dst[-1];
  ------------------
  |  Branch (194:28): [True: 796k, False: 45.5k]
  ------------------
  195|  43.8k|        else
  196|  43.8k|            *topleft_out = have_top ? *dst_top : (1 << bitdepth) >> 1;
  ------------------
  |  Branch (196:28): [True: 42.4k, False: 1.39k]
  ------------------
  197|       |
  198|   885k|        if (mode == Z2_PRED && tw + th >= 6 && filter_edge)
  ------------------
  |  Branch (198:13): [True: 229k, False: 656k]
  |  Branch (198:32): [True: 96.9k, False: 132k]
  |  Branch (198:48): [True: 60.1k, False: 36.8k]
  ------------------
  199|  60.1k|            *topleft_out = ((topleft_out[-1] + topleft_out[1]) * 5 +
  200|  60.1k|                            topleft_out[0] * 6 + 8) >> 4;
  201|   885k|    }
  202|       |
  203|  2.71M|    return mode;
  204|  2.71M|}
dav1d_prepare_intra_edges_16bpc:
   86|  4.41M|{
   87|  4.41M|    const int bitdepth = bitdepth_from_max(bitdepth_max);
  ------------------
  |  |   75|  4.41M|#define bitdepth_from_max(bitdepth_max) (32 - clz(bitdepth_max))
  ------------------
   88|  4.41M|    assert(y < h && x < w);
  ------------------
  |  |  140|  8.83M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 4.41M, False: 0]
  |  |  |  Branch (140:30): [True: 4.41M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 4.41M]
  |  |  ------------------
  ------------------
   89|       |
   90|  4.41M|    switch (mode) {
   91|   170k|    case VERT_PRED:
  ------------------
  |  Branch (91:5): [True: 170k, False: 4.24M]
  ------------------
   92|   475k|    case HOR_PRED:
  ------------------
  |  Branch (92:5): [True: 304k, False: 4.11M]
  ------------------
   93|   537k|    case DIAG_DOWN_LEFT_PRED:
  ------------------
  |  Branch (93:5): [True: 62.7k, False: 4.35M]
  ------------------
   94|   604k|    case DIAG_DOWN_RIGHT_PRED:
  ------------------
  |  Branch (94:5): [True: 66.4k, False: 4.35M]
  ------------------
   95|   649k|    case VERT_RIGHT_PRED:
  ------------------
  |  Branch (95:5): [True: 45.6k, False: 4.37M]
  ------------------
   96|   720k|    case HOR_DOWN_PRED:
  ------------------
  |  Branch (96:5): [True: 70.1k, False: 4.34M]
  ------------------
   97|   831k|    case HOR_UP_PRED:
  ------------------
  |  Branch (97:5): [True: 111k, False: 4.30M]
  ------------------
   98|   904k|    case VERT_LEFT_PRED: {
  ------------------
  |  Branch (98:5): [True: 73.3k, False: 4.34M]
  ------------------
   99|   904k|        *angle = av1_mode_to_angle_map[mode - VERT_PRED] + 3 * *angle;
  100|       |
  101|   904k|        if (*angle <= 90)
  ------------------
  |  Branch (101:13): [True: 263k, False: 641k]
  ------------------
  102|   263k|            mode = *angle < 90 && have_top ? Z1_PRED : VERT_PRED;
  ------------------
  |  Branch (102:20): [True: 169k, False: 94.3k]
  |  Branch (102:35): [True: 149k, False: 19.6k]
  ------------------
  103|   641k|        else if (*angle < 180)
  ------------------
  |  Branch (103:18): [True: 299k, False: 341k]
  ------------------
  104|   299k|            mode = Z2_PRED;
  105|   341k|        else
  106|   341k|            mode = *angle > 180 && have_left ? Z3_PRED : HOR_PRED;
  ------------------
  |  Branch (106:20): [True: 179k, False: 162k]
  |  Branch (106:36): [True: 165k, False: 13.9k]
  ------------------
  107|   904k|        break;
  108|   831k|    }
  109|  2.67M|    case DC_PRED:
  ------------------
  |  Branch (109:5): [True: 2.67M, False: 1.74M]
  ------------------
  110|  2.96M|    case PAETH_PRED:
  ------------------
  |  Branch (110:5): [True: 290k, False: 4.12M]
  ------------------
  111|  2.96M|        mode = av1_mode_conv[mode][have_left][have_top];
  112|  2.96M|        break;
  113|   550k|    default:
  ------------------
  |  Branch (113:5): [True: 550k, False: 3.86M]
  ------------------
  114|   550k|        break;
  115|  4.41M|    }
  116|       |
  117|  4.41M|    const pixel *dst_top;
  118|  4.41M|    if (have_top &&
  ------------------
  |  Branch (118:9): [True: 3.96M, False: 448k]
  ------------------
  119|  3.96M|        (av1_intra_prediction_edges[mode].needs_top ||
  ------------------
  |  Branch (119:10): [True: 3.67M, False: 297k]
  ------------------
  120|   297k|         av1_intra_prediction_edges[mode].needs_topleft ||
  ------------------
  |  Branch (120:10): [True: 141k, False: 155k]
  ------------------
  121|   155k|         (av1_intra_prediction_edges[mode].needs_left && !have_left)))
  ------------------
  |  Branch (121:11): [True: 155k, False: 0]
  |  Branch (121:58): [True: 20.7k, False: 134k]
  ------------------
  122|  3.83M|    {
  123|  3.83M|        if (prefilter_toplevel_sb_edge) {
  ------------------
  |  Branch (123:13): [True: 503k, False: 3.33M]
  ------------------
  124|   503k|            dst_top = &prefilter_toplevel_sb_edge[x * 4];
  125|  3.33M|        } else {
  126|  3.33M|            dst_top = &dst[-PXSTRIDE(stride)];
  127|  3.33M|        }
  128|  3.83M|    }
  129|       |
  130|  4.41M|    if (av1_intra_prediction_edges[mode].needs_left) {
  ------------------
  |  Branch (130:9): [True: 3.96M, False: 447k]
  ------------------
  131|  3.96M|        const int sz = th << 2;
  132|  3.96M|        pixel *const left = &topleft_out[-sz];
  133|       |
  134|  3.96M|        if (have_left) {
  ------------------
  |  Branch (134:13): [True: 3.88M, False: 89.1k]
  ------------------
  135|  3.88M|            const int px_have = imin(sz, (h - y) << 2);
  136|       |
  137|  53.0M|            for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (137:29): [True: 49.1M, False: 3.88M]
  ------------------
  138|  49.1M|                left[sz - 1 - i] = dst[PXSTRIDE(stride) * i - 1];
  139|  3.88M|            if (px_have < sz)
  ------------------
  |  Branch (139:17): [True: 138k, False: 3.74M]
  ------------------
  140|   138k|                pixel_set(left, left[sz - px_have], sz - px_have);
  141|  3.88M|        } else {
  142|  89.1k|            pixel_set(left, have_top ? *dst_top : ((1 << bitdepth) >> 1) + 1, sz);
  ------------------
  |  Branch (142:29): [True: 82.0k, False: 7.07k]
  ------------------
  143|  89.1k|        }
  144|       |
  145|  3.96M|        if (av1_intra_prediction_edges[mode].needs_bottomleft) {
  ------------------
  |  Branch (145:13): [True: 165k, False: 3.80M]
  ------------------
  146|   165k|            const int have_bottomleft = (!have_left || y + th >= h) ? 0 :
  ------------------
  |  Branch (146:42): [True: 0, False: 165k]
  |  Branch (146:56): [True: 21.6k, False: 143k]
  ------------------
  147|   165k|                                        (edge_flags & EDGE_I444_LEFT_HAS_BOTTOM);
  148|       |
  149|   165k|            if (have_bottomleft) {
  ------------------
  |  Branch (149:17): [True: 52.8k, False: 112k]
  ------------------
  150|  52.8k|                const int px_have = imin(sz, (h - y - th) << 2);
  151|       |
  152|   636k|                for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (152:33): [True: 584k, False: 52.8k]
  ------------------
  153|   584k|                    left[-(i + 1)] = dst[(sz + i) * PXSTRIDE(stride) - 1];
  154|  52.8k|                if (px_have < sz)
  ------------------
  |  Branch (154:21): [True: 2.06k, False: 50.7k]
  ------------------
  155|  2.06k|                    pixel_set(left - sz, left[-px_have], sz - px_have);
  156|   112k|            } else {
  157|   112k|                pixel_set(left - sz, left[0], sz);
  158|   112k|            }
  159|   165k|        }
  160|  3.96M|    }
  161|       |
  162|  4.41M|    if (av1_intra_prediction_edges[mode].needs_top) {
  ------------------
  |  Branch (162:9): [True: 3.80M, False: 610k]
  ------------------
  163|  3.80M|        const int sz = tw << 2;
  164|  3.80M|        pixel *const top = &topleft_out[1];
  165|       |
  166|  3.80M|        if (have_top) {
  ------------------
  |  Branch (166:13): [True: 3.67M, False: 135k]
  ------------------
  167|  3.67M|            const int px_have = imin(sz, (w - x) << 2);
  168|  3.67M|            pixel_copy(top, dst_top, px_have);
  ------------------
  |  |   65|  3.67M|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
  169|  3.67M|            if (px_have < sz)
  ------------------
  |  Branch (169:17): [True: 103k, False: 3.56M]
  ------------------
  170|   103k|                pixel_set(top + px_have, top[px_have - 1], sz - px_have);
  171|  3.67M|        } else {
  172|   135k|            pixel_set(top, have_left ? dst[-1] : ((1 << bitdepth) >> 1) - 1, sz);
  ------------------
  |  Branch (172:28): [True: 130k, False: 5.71k]
  ------------------
  173|   135k|        }
  174|       |
  175|  3.80M|        if (av1_intra_prediction_edges[mode].needs_topright) {
  ------------------
  |  Branch (175:13): [True: 149k, False: 3.65M]
  ------------------
  176|   149k|            const int have_topright = (!have_top || x + tw >= w) ? 0 :
  ------------------
  |  Branch (176:40): [True: 0, False: 149k]
  |  Branch (176:53): [True: 13.1k, False: 136k]
  ------------------
  177|   149k|                                      (edge_flags & EDGE_I444_TOP_HAS_RIGHT);
  178|       |
  179|   149k|            if (have_topright) {
  ------------------
  |  Branch (179:17): [True: 88.7k, False: 60.9k]
  ------------------
  180|  88.7k|                const int px_have = imin(sz, (w - x - tw) << 2);
  181|       |
  182|  88.7k|                pixel_copy(top + sz, &dst_top[sz], px_have);
  ------------------
  |  |   65|  88.7k|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
  183|  88.7k|                if (px_have < sz)
  ------------------
  |  Branch (183:21): [True: 1.48k, False: 87.2k]
  ------------------
  184|  1.48k|                    pixel_set(top + sz + px_have, top[sz + px_have - 1],
  185|  1.48k|                              sz - px_have);
  186|  88.7k|            } else {
  187|  60.9k|                pixel_set(top + sz, top[sz - 1], sz);
  188|  60.9k|            }
  189|   149k|        }
  190|  3.80M|    }
  191|       |
  192|  4.41M|    if (av1_intra_prediction_edges[mode].needs_topleft) {
  ------------------
  |  Branch (192:9): [True: 877k, False: 3.53M]
  ------------------
  193|   877k|        if (have_left)
  ------------------
  |  Branch (193:13): [True: 839k, False: 38.6k]
  ------------------
  194|   839k|            *topleft_out = have_top ? dst_top[-1] : dst[-1];
  ------------------
  |  Branch (194:28): [True: 774k, False: 65.0k]
  ------------------
  195|  38.6k|        else
  196|  38.6k|            *topleft_out = have_top ? *dst_top : (1 << bitdepth) >> 1;
  ------------------
  |  Branch (196:28): [True: 36.9k, False: 1.73k]
  ------------------
  197|       |
  198|   877k|        if (mode == Z2_PRED && tw + th >= 6 && filter_edge)
  ------------------
  |  Branch (198:13): [True: 299k, False: 577k]
  |  Branch (198:32): [True: 141k, False: 158k]
  |  Branch (198:48): [True: 54.8k, False: 86.7k]
  ------------------
  199|  54.8k|            *topleft_out = ((topleft_out[-1] + topleft_out[1]) * 5 +
  200|  54.8k|                            topleft_out[0] * 6 + 8) >> 4;
  201|   877k|    }
  202|       |
  203|  4.41M|    return mode;
  204|  4.41M|}

dav1d_intra_pred_dsp_init_8bpc:
  744|  4.86k|COLD void bitfn(dav1d_intra_pred_dsp_init)(Dav1dIntraPredDSPContext *const c) {
  745|  4.86k|    c->intra_pred[DC_PRED      ] = ipred_dc_c;
  746|  4.86k|    c->intra_pred[DC_128_PRED  ] = ipred_dc_128_c;
  747|  4.86k|    c->intra_pred[TOP_DC_PRED  ] = ipred_dc_top_c;
  748|  4.86k|    c->intra_pred[LEFT_DC_PRED ] = ipred_dc_left_c;
  749|  4.86k|    c->intra_pred[HOR_PRED     ] = ipred_h_c;
  750|  4.86k|    c->intra_pred[VERT_PRED    ] = ipred_v_c;
  751|  4.86k|    c->intra_pred[PAETH_PRED   ] = ipred_paeth_c;
  752|  4.86k|    c->intra_pred[SMOOTH_PRED  ] = ipred_smooth_c;
  753|  4.86k|    c->intra_pred[SMOOTH_V_PRED] = ipred_smooth_v_c;
  754|  4.86k|    c->intra_pred[SMOOTH_H_PRED] = ipred_smooth_h_c;
  755|  4.86k|    c->intra_pred[Z1_PRED      ] = ipred_z1_c;
  756|  4.86k|    c->intra_pred[Z2_PRED      ] = ipred_z2_c;
  757|  4.86k|    c->intra_pred[Z3_PRED      ] = ipred_z3_c;
  758|  4.86k|    c->intra_pred[FILTER_PRED  ] = ipred_filter_c;
  759|       |
  760|  4.86k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I420 - 1] = cfl_ac_420_c;
  761|  4.86k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I422 - 1] = cfl_ac_422_c;
  762|  4.86k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I444 - 1] = cfl_ac_444_c;
  763|       |
  764|  4.86k|    c->cfl_pred[DC_PRED     ] = ipred_cfl_c;
  765|  4.86k|    c->cfl_pred[DC_128_PRED ] = ipred_cfl_128_c;
  766|  4.86k|    c->cfl_pred[TOP_DC_PRED ] = ipred_cfl_top_c;
  767|  4.86k|    c->cfl_pred[LEFT_DC_PRED] = ipred_cfl_left_c;
  768|       |
  769|  4.86k|    c->pal_pred = pal_pred_c;
  770|       |
  771|  4.86k|#if HAVE_ASM
  772|       |#if ARCH_AARCH64 || ARCH_ARM
  773|       |    intra_pred_dsp_init_arm(c);
  774|       |#elif ARCH_RISCV
  775|       |    intra_pred_dsp_init_riscv(c);
  776|       |#elif ARCH_X86
  777|       |    intra_pred_dsp_init_x86(c);
  778|       |#elif ARCH_LOONGARCH64
  779|       |    intra_pred_dsp_init_loongarch(c);
  780|       |#endif
  781|  4.86k|#endif
  782|  4.86k|}
dav1d_intra_pred_dsp_init_16bpc:
  744|  6.93k|COLD void bitfn(dav1d_intra_pred_dsp_init)(Dav1dIntraPredDSPContext *const c) {
  745|  6.93k|    c->intra_pred[DC_PRED      ] = ipred_dc_c;
  746|  6.93k|    c->intra_pred[DC_128_PRED  ] = ipred_dc_128_c;
  747|  6.93k|    c->intra_pred[TOP_DC_PRED  ] = ipred_dc_top_c;
  748|  6.93k|    c->intra_pred[LEFT_DC_PRED ] = ipred_dc_left_c;
  749|  6.93k|    c->intra_pred[HOR_PRED     ] = ipred_h_c;
  750|  6.93k|    c->intra_pred[VERT_PRED    ] = ipred_v_c;
  751|  6.93k|    c->intra_pred[PAETH_PRED   ] = ipred_paeth_c;
  752|  6.93k|    c->intra_pred[SMOOTH_PRED  ] = ipred_smooth_c;
  753|  6.93k|    c->intra_pred[SMOOTH_V_PRED] = ipred_smooth_v_c;
  754|  6.93k|    c->intra_pred[SMOOTH_H_PRED] = ipred_smooth_h_c;
  755|  6.93k|    c->intra_pred[Z1_PRED      ] = ipred_z1_c;
  756|  6.93k|    c->intra_pred[Z2_PRED      ] = ipred_z2_c;
  757|  6.93k|    c->intra_pred[Z3_PRED      ] = ipred_z3_c;
  758|  6.93k|    c->intra_pred[FILTER_PRED  ] = ipred_filter_c;
  759|       |
  760|  6.93k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I420 - 1] = cfl_ac_420_c;
  761|  6.93k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I422 - 1] = cfl_ac_422_c;
  762|  6.93k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I444 - 1] = cfl_ac_444_c;
  763|       |
  764|  6.93k|    c->cfl_pred[DC_PRED     ] = ipred_cfl_c;
  765|  6.93k|    c->cfl_pred[DC_128_PRED ] = ipred_cfl_128_c;
  766|  6.93k|    c->cfl_pred[TOP_DC_PRED ] = ipred_cfl_top_c;
  767|  6.93k|    c->cfl_pred[LEFT_DC_PRED] = ipred_cfl_left_c;
  768|       |
  769|  6.93k|    c->pal_pred = pal_pred_c;
  770|       |
  771|  6.93k|#if HAVE_ASM
  772|       |#if ARCH_AARCH64 || ARCH_ARM
  773|       |    intra_pred_dsp_init_arm(c);
  774|       |#elif ARCH_RISCV
  775|       |    intra_pred_dsp_init_riscv(c);
  776|       |#elif ARCH_X86
  777|       |    intra_pred_dsp_init_x86(c);
  778|       |#elif ARCH_LOONGARCH64
  779|       |    intra_pred_dsp_init_loongarch(c);
  780|       |#endif
  781|  6.93k|#endif
  782|  6.93k|}

itx_1d.c:inv_dct4_1d_internal_c:
   68|  2.05M|{
   69|  2.05M|    assert(stride > 0);
  ------------------
  |  |  140|  2.05M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 2.05M]
  |  |  |  Branch (140:68): [Folded, False: 2.05M]
  |  |  ------------------
  ------------------
   70|  2.05M|    const int in0 = c[0 * stride], in1 = c[1 * stride];
   71|       |
   72|  2.05M|    int t0, t1, t2, t3;
   73|  2.05M|    if (tx64) {
  ------------------
  |  Branch (73:9): [True: 960k, False: 1.09M]
  ------------------
   74|   960k|        t0 = t1 = (in0 * 181 + 128) >> 8;
   75|   960k|        t2 = (in1 * 1567 + 2048) >> 12;
   76|   960k|        t3 = (in1 * 3784 + 2048) >> 12;
   77|  1.09M|    } else {
   78|  1.09M|        const int in2 = c[2 * stride], in3 = c[3 * stride];
   79|       |
   80|  1.09M|        t0 = ((in0 + in2) * 181 + 128) >> 8;
   81|  1.09M|        t1 = ((in0 - in2) * 181 + 128) >> 8;
   82|  1.09M|        t2 = ((in1 *  1567         - in3 * (3784 - 4096) + 2048) >> 12) - in3;
   83|  1.09M|        t3 = ((in1 * (3784 - 4096) + in3 *  1567         + 2048) >> 12) + in1;
   84|  1.09M|    }
   85|       |
   86|  2.05M|    c[0 * stride] = CLIP(t0 + t3);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
   87|  2.05M|    c[1 * stride] = CLIP(t1 + t2);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
   88|  2.05M|    c[2 * stride] = CLIP(t1 - t2);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
   89|  2.05M|    c[3 * stride] = CLIP(t0 - t3);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
   90|  2.05M|}
itx_1d.c:inv_dct8_1d_internal_c:
  101|  2.05M|{
  102|  2.05M|    assert(stride > 0);
  ------------------
  |  |  140|  2.05M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 2.05M]
  |  |  |  Branch (140:68): [Folded, False: 2.05M]
  |  |  ------------------
  ------------------
  103|  2.05M|    inv_dct4_1d_internal_c(c, stride << 1, min, max, tx64);
  104|       |
  105|  2.05M|    const int in1 = c[1 * stride], in3 = c[3 * stride];
  106|       |
  107|  2.05M|    int t4a, t5a, t6a, t7a;
  108|  2.05M|    if (tx64) {
  ------------------
  |  Branch (108:9): [True: 960k, False: 1.09M]
  ------------------
  109|   960k|        t4a = (in1 *   799 + 2048) >> 12;
  110|   960k|        t5a = (in3 * -2276 + 2048) >> 12;
  111|   960k|        t6a = (in3 *  3406 + 2048) >> 12;
  112|   960k|        t7a = (in1 *  4017 + 2048) >> 12;
  113|  1.09M|    } else {
  114|  1.09M|        const int in5 = c[5 * stride], in7 = c[7 * stride];
  115|       |
  116|  1.09M|        t4a = ((in1 *   799         - in7 * (4017 - 4096) + 2048) >> 12) - in7;
  117|  1.09M|        t5a =  (in5 *  1703         - in3 *  1138         + 1024) >> 11;
  118|  1.09M|        t6a =  (in5 *  1138         + in3 *  1703         + 1024) >> 11;
  119|  1.09M|        t7a = ((in1 * (4017 - 4096) + in7 *  799          + 2048) >> 12) + in1;
  120|  1.09M|    }
  121|       |
  122|  2.05M|    const int t4  = CLIP(t4a + t5a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  123|  2.05M|              t5a = CLIP(t4a - t5a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  124|  2.05M|    const int t7  = CLIP(t7a + t6a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  125|  2.05M|              t6a = CLIP(t7a - t6a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  126|       |
  127|  2.05M|    const int t5  = ((t6a - t5a) * 181 + 128) >> 8;
  128|  2.05M|    const int t6  = ((t6a + t5a) * 181 + 128) >> 8;
  129|       |
  130|  2.05M|    const int t0 = c[0 * stride];
  131|  2.05M|    const int t1 = c[2 * stride];
  132|  2.05M|    const int t2 = c[4 * stride];
  133|  2.05M|    const int t3 = c[6 * stride];
  134|       |
  135|  2.05M|    c[0 * stride] = CLIP(t0 + t7);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  136|  2.05M|    c[1 * stride] = CLIP(t1 + t6);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  137|  2.05M|    c[2 * stride] = CLIP(t2 + t5);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  138|  2.05M|    c[3 * stride] = CLIP(t3 + t4);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  139|  2.05M|    c[4 * stride] = CLIP(t3 - t4);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  140|  2.05M|    c[5 * stride] = CLIP(t2 - t5);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  141|  2.05M|    c[6 * stride] = CLIP(t1 - t6);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  142|  2.05M|    c[7 * stride] = CLIP(t0 - t7);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  143|  2.05M|}
itx_1d.c:inv_dct16_1d_c:
  242|   268k|{
  243|   268k|    inv_dct16_1d_internal_c(c, stride, min, max, 0);
  244|   268k|}
itx_1d.c:inv_dct16_1d_internal_c:
  154|  2.05M|{
  155|  2.05M|    assert(stride > 0);
  ------------------
  |  |  140|  2.05M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 2.05M]
  |  |  |  Branch (140:68): [Folded, False: 2.05M]
  |  |  ------------------
  ------------------
  156|  2.05M|    inv_dct8_1d_internal_c(c, stride << 1, min, max, tx64);
  157|       |
  158|  2.05M|    const int in1 = c[1 * stride], in3 = c[3 * stride];
  159|  2.05M|    const int in5 = c[5 * stride], in7 = c[7 * stride];
  160|       |
  161|  2.05M|    int t8a, t9a, t10a, t11a, t12a, t13a, t14a, t15a;
  162|  2.05M|    if (tx64) {
  ------------------
  |  Branch (162:9): [True: 960k, False: 1.09M]
  ------------------
  163|   960k|        t8a  = (in1 *   401 + 2048) >> 12;
  164|   960k|        t9a  = (in7 * -2598 + 2048) >> 12;
  165|   960k|        t10a = (in5 *  1931 + 2048) >> 12;
  166|   960k|        t11a = (in3 * -1189 + 2048) >> 12;
  167|   960k|        t12a = (in3 *  3920 + 2048) >> 12;
  168|   960k|        t13a = (in5 *  3612 + 2048) >> 12;
  169|   960k|        t14a = (in7 *  3166 + 2048) >> 12;
  170|   960k|        t15a = (in1 *  4076 + 2048) >> 12;
  171|  1.09M|    } else {
  172|  1.09M|        const int in9  = c[ 9 * stride], in11 = c[11 * stride];
  173|  1.09M|        const int in13 = c[13 * stride], in15 = c[15 * stride];
  174|       |
  175|  1.09M|        t8a  = ((in1  *   401         - in15 * (4076 - 4096) + 2048) >> 12) - in15;
  176|  1.09M|        t9a  =  (in9  *  1583         - in7  *  1299         + 1024) >> 11;
  177|  1.09M|        t10a = ((in5  *  1931         - in11 * (3612 - 4096) + 2048) >> 12) - in11;
  178|  1.09M|        t11a = ((in13 * (3920 - 4096) - in3  *  1189         + 2048) >> 12) + in13;
  179|  1.09M|        t12a = ((in13 *  1189         + in3  * (3920 - 4096) + 2048) >> 12) + in3;
  180|  1.09M|        t13a = ((in5  * (3612 - 4096) + in11 *  1931         + 2048) >> 12) + in5;
  181|  1.09M|        t14a =  (in9  *  1299         + in7  *  1583         + 1024) >> 11;
  182|  1.09M|        t15a = ((in1  * (4076 - 4096) + in15 *   401         + 2048) >> 12) + in1;
  183|  1.09M|    }
  184|       |
  185|  2.05M|    int t8  = CLIP(t8a  + t9a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  186|  2.05M|    int t9  = CLIP(t8a  - t9a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  187|  2.05M|    int t10 = CLIP(t11a - t10a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  188|  2.05M|    int t11 = CLIP(t11a + t10a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  189|  2.05M|    int t12 = CLIP(t12a + t13a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  190|  2.05M|    int t13 = CLIP(t12a - t13a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  191|  2.05M|    int t14 = CLIP(t15a - t14a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  192|  2.05M|    int t15 = CLIP(t15a + t14a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  193|       |
  194|  2.05M|    t9a  = ((  t14 *  1567         - t9  * (3784 - 4096)  + 2048) >> 12) - t9;
  195|  2.05M|    t14a = ((  t14 * (3784 - 4096) + t9  *  1567          + 2048) >> 12) + t14;
  196|  2.05M|    t10a = ((-(t13 * (3784 - 4096) + t10 *  1567)         + 2048) >> 12) - t13;
  197|  2.05M|    t13a = ((  t13 *  1567         - t10 * (3784 - 4096)  + 2048) >> 12) - t10;
  198|       |
  199|  2.05M|    t8a  = CLIP(t8   + t11);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  200|  2.05M|    t9   = CLIP(t9a  + t10a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  201|  2.05M|    t10  = CLIP(t9a  - t10a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  202|  2.05M|    t11a = CLIP(t8   - t11);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  203|  2.05M|    t12a = CLIP(t15  - t12);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  204|  2.05M|    t13  = CLIP(t14a - t13a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  205|  2.05M|    t14  = CLIP(t14a + t13a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  206|  2.05M|    t15a = CLIP(t15  + t12);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  207|       |
  208|  2.05M|    t10a = ((t13  - t10)  * 181 + 128) >> 8;
  209|  2.05M|    t13a = ((t13  + t10)  * 181 + 128) >> 8;
  210|  2.05M|    t11  = ((t12a - t11a) * 181 + 128) >> 8;
  211|  2.05M|    t12  = ((t12a + t11a) * 181 + 128) >> 8;
  212|       |
  213|  2.05M|    const int t0 = c[ 0 * stride];
  214|  2.05M|    const int t1 = c[ 2 * stride];
  215|  2.05M|    const int t2 = c[ 4 * stride];
  216|  2.05M|    const int t3 = c[ 6 * stride];
  217|  2.05M|    const int t4 = c[ 8 * stride];
  218|  2.05M|    const int t5 = c[10 * stride];
  219|  2.05M|    const int t6 = c[12 * stride];
  220|  2.05M|    const int t7 = c[14 * stride];
  221|       |
  222|  2.05M|    c[ 0 * stride] = CLIP(t0 + t15a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  223|  2.05M|    c[ 1 * stride] = CLIP(t1 + t14);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  224|  2.05M|    c[ 2 * stride] = CLIP(t2 + t13a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  225|  2.05M|    c[ 3 * stride] = CLIP(t3 + t12);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  226|  2.05M|    c[ 4 * stride] = CLIP(t4 + t11);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  227|  2.05M|    c[ 5 * stride] = CLIP(t5 + t10a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  228|  2.05M|    c[ 6 * stride] = CLIP(t6 + t9);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  229|  2.05M|    c[ 7 * stride] = CLIP(t7 + t8a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  230|  2.05M|    c[ 8 * stride] = CLIP(t7 - t8a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  231|  2.05M|    c[ 9 * stride] = CLIP(t6 - t9);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  232|  2.05M|    c[10 * stride] = CLIP(t5 - t10a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  233|  2.05M|    c[11 * stride] = CLIP(t4 - t11);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  234|  2.05M|    c[12 * stride] = CLIP(t3 - t12);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  235|  2.05M|    c[13 * stride] = CLIP(t2 - t13a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  236|  2.05M|    c[14 * stride] = CLIP(t1 - t14);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  237|  2.05M|    c[15 * stride] = CLIP(t0 - t15a);
  ------------------
  |  |   37|  2.05M|#define CLIP(a) iclip(a, min, max)
  ------------------
  238|  2.05M|}
itx_1d.c:inv_dct32_1d_c:
  432|   830k|{
  433|   830k|    inv_dct32_1d_internal_c(c, stride, min, max, 0);
  434|   830k|}
itx_1d.c:inv_dct32_1d_internal_c:
  249|  1.79M|{
  250|  1.79M|    assert(stride > 0);
  ------------------
  |  |  140|  1.79M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.79M]
  |  |  |  Branch (140:68): [Folded, False: 1.79M]
  |  |  ------------------
  ------------------
  251|  1.79M|    inv_dct16_1d_internal_c(c, stride << 1, min, max, tx64);
  252|       |
  253|  1.79M|    const int in1  = c[ 1 * stride], in3  = c[ 3 * stride];
  254|  1.79M|    const int in5  = c[ 5 * stride], in7  = c[ 7 * stride];
  255|  1.79M|    const int in9  = c[ 9 * stride], in11 = c[11 * stride];
  256|  1.79M|    const int in13 = c[13 * stride], in15 = c[15 * stride];
  257|       |
  258|  1.79M|    int t16a, t17a, t18a, t19a, t20a, t21a, t22a, t23a;
  259|  1.79M|    int t24a, t25a, t26a, t27a, t28a, t29a, t30a, t31a;
  260|  1.79M|    if (tx64) {
  ------------------
  |  Branch (260:9): [True: 960k, False: 830k]
  ------------------
  261|   960k|        t16a = (in1  *   201 + 2048) >> 12;
  262|   960k|        t17a = (in15 * -2751 + 2048) >> 12;
  263|   960k|        t18a = (in9  *  1751 + 2048) >> 12;
  264|   960k|        t19a = (in7  * -1380 + 2048) >> 12;
  265|   960k|        t20a = (in5  *   995 + 2048) >> 12;
  266|   960k|        t21a = (in11 * -2106 + 2048) >> 12;
  267|   960k|        t22a = (in13 *  2440 + 2048) >> 12;
  268|   960k|        t23a = (in3  *  -601 + 2048) >> 12;
  269|   960k|        t24a = (in3  *  4052 + 2048) >> 12;
  270|   960k|        t25a = (in13 *  3290 + 2048) >> 12;
  271|   960k|        t26a = (in11 *  3513 + 2048) >> 12;
  272|   960k|        t27a = (in5  *  3973 + 2048) >> 12;
  273|   960k|        t28a = (in7  *  3857 + 2048) >> 12;
  274|   960k|        t29a = (in9  *  3703 + 2048) >> 12;
  275|   960k|        t30a = (in15 *  3035 + 2048) >> 12;
  276|   960k|        t31a = (in1  *  4091 + 2048) >> 12;
  277|   960k|    } else {
  278|   830k|        const int in17 = c[17 * stride], in19 = c[19 * stride];
  279|   830k|        const int in21 = c[21 * stride], in23 = c[23 * stride];
  280|   830k|        const int in25 = c[25 * stride], in27 = c[27 * stride];
  281|   830k|        const int in29 = c[29 * stride], in31 = c[31 * stride];
  282|       |
  283|   830k|        t16a = ((in1  *   201         - in31 * (4091 - 4096) + 2048) >> 12) - in31;
  284|   830k|        t17a = ((in17 * (3035 - 4096) - in15 *  2751         + 2048) >> 12) + in17;
  285|   830k|        t18a = ((in9  *  1751         - in23 * (3703 - 4096) + 2048) >> 12) - in23;
  286|   830k|        t19a = ((in25 * (3857 - 4096) - in7  *  1380         + 2048) >> 12) + in25;
  287|   830k|        t20a = ((in5  *   995         - in27 * (3973 - 4096) + 2048) >> 12) - in27;
  288|   830k|        t21a = ((in21 * (3513 - 4096) - in11 *  2106         + 2048) >> 12) + in21;
  289|   830k|        t22a =  (in13 *  1220         - in19 *  1645         + 1024) >> 11;
  290|   830k|        t23a = ((in29 * (4052 - 4096) - in3  *   601         + 2048) >> 12) + in29;
  291|   830k|        t24a = ((in29 *   601         + in3  * (4052 - 4096) + 2048) >> 12) + in3;
  292|   830k|        t25a =  (in13 *  1645         + in19 *  1220         + 1024) >> 11;
  293|   830k|        t26a = ((in21 *  2106         + in11 * (3513 - 4096) + 2048) >> 12) + in11;
  294|   830k|        t27a = ((in5  * (3973 - 4096) + in27 *   995         + 2048) >> 12) + in5;
  295|   830k|        t28a = ((in25 *  1380         + in7  * (3857 - 4096) + 2048) >> 12) + in7;
  296|   830k|        t29a = ((in9  * (3703 - 4096) + in23 *  1751         + 2048) >> 12) + in9;
  297|   830k|        t30a = ((in17 *  2751         + in15 * (3035 - 4096) + 2048) >> 12) + in15;
  298|   830k|        t31a = ((in1  * (4091 - 4096) + in31 *   201         + 2048) >> 12) + in1;
  299|   830k|    }
  300|       |
  301|  1.79M|    int t16 = CLIP(t16a + t17a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  302|  1.79M|    int t17 = CLIP(t16a - t17a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  303|  1.79M|    int t18 = CLIP(t19a - t18a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  304|  1.79M|    int t19 = CLIP(t19a + t18a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  305|  1.79M|    int t20 = CLIP(t20a + t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  306|  1.79M|    int t21 = CLIP(t20a - t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  307|  1.79M|    int t22 = CLIP(t23a - t22a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  308|  1.79M|    int t23 = CLIP(t23a + t22a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  309|  1.79M|    int t24 = CLIP(t24a + t25a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  310|  1.79M|    int t25 = CLIP(t24a - t25a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  311|  1.79M|    int t26 = CLIP(t27a - t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  312|  1.79M|    int t27 = CLIP(t27a + t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  313|  1.79M|    int t28 = CLIP(t28a + t29a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  314|  1.79M|    int t29 = CLIP(t28a - t29a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  315|  1.79M|    int t30 = CLIP(t31a - t30a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  316|  1.79M|    int t31 = CLIP(t31a + t30a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  317|       |
  318|  1.79M|    t17a = ((  t30 *   799         - t17 * (4017 - 4096)  + 2048) >> 12) - t17;
  319|  1.79M|    t30a = ((  t30 * (4017 - 4096) + t17 *   799          + 2048) >> 12) + t30;
  320|  1.79M|    t18a = ((-(t29 * (4017 - 4096) + t18 *   799)         + 2048) >> 12) - t29;
  321|  1.79M|    t29a = ((  t29 *   799         - t18 * (4017 - 4096)  + 2048) >> 12) - t18;
  322|  1.79M|    t21a =  (  t26 *  1703         - t21 *  1138          + 1024) >> 11;
  323|  1.79M|    t26a =  (  t26 *  1138         + t21 *  1703          + 1024) >> 11;
  324|  1.79M|    t22a =  (-(t25 *  1138         + t22 *  1703        ) + 1024) >> 11;
  325|  1.79M|    t25a =  (  t25 *  1703         - t22 *  1138          + 1024) >> 11;
  326|       |
  327|  1.79M|    t16a = CLIP(t16  + t19);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  328|  1.79M|    t17  = CLIP(t17a + t18a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  329|  1.79M|    t18  = CLIP(t17a - t18a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  330|  1.79M|    t19a = CLIP(t16  - t19);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  331|  1.79M|    t20a = CLIP(t23  - t20);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  332|  1.79M|    t21  = CLIP(t22a - t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  333|  1.79M|    t22  = CLIP(t22a + t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  334|  1.79M|    t23a = CLIP(t23  + t20);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  335|  1.79M|    t24a = CLIP(t24  + t27);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  336|  1.79M|    t25  = CLIP(t25a + t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  337|  1.79M|    t26  = CLIP(t25a - t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  338|  1.79M|    t27a = CLIP(t24  - t27);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  339|  1.79M|    t28a = CLIP(t31  - t28);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  340|  1.79M|    t29  = CLIP(t30a - t29a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  341|  1.79M|    t30  = CLIP(t30a + t29a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  342|  1.79M|    t31a = CLIP(t31  + t28);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  343|       |
  344|  1.79M|    t18a = ((  t29  *  1567         - t18  * (3784 - 4096)  + 2048) >> 12) - t18;
  345|  1.79M|    t29a = ((  t29  * (3784 - 4096) + t18  *  1567          + 2048) >> 12) + t29;
  346|  1.79M|    t19  = ((  t28a *  1567         - t19a * (3784 - 4096)  + 2048) >> 12) - t19a;
  347|  1.79M|    t28  = ((  t28a * (3784 - 4096) + t19a *  1567          + 2048) >> 12) + t28a;
  348|  1.79M|    t20  = ((-(t27a * (3784 - 4096) + t20a *  1567)         + 2048) >> 12) - t27a;
  349|  1.79M|    t27  = ((  t27a *  1567         - t20a * (3784 - 4096)  + 2048) >> 12) - t20a;
  350|  1.79M|    t21a = ((-(t26  * (3784 - 4096) + t21  *  1567)         + 2048) >> 12) - t26;
  351|  1.79M|    t26a = ((  t26  *  1567         - t21  * (3784 - 4096)  + 2048) >> 12) - t21;
  352|       |
  353|  1.79M|    t16  = CLIP(t16a + t23a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  354|  1.79M|    t17a = CLIP(t17  + t22);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  355|  1.79M|    t18  = CLIP(t18a + t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  356|  1.79M|    t19a = CLIP(t19  + t20);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  357|  1.79M|    t20a = CLIP(t19  - t20);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  358|  1.79M|    t21  = CLIP(t18a - t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  359|  1.79M|    t22a = CLIP(t17  - t22);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  360|  1.79M|    t23  = CLIP(t16a - t23a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  361|  1.79M|    t24  = CLIP(t31a - t24a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  362|  1.79M|    t25a = CLIP(t30  - t25);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  363|  1.79M|    t26  = CLIP(t29a - t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  364|  1.79M|    t27a = CLIP(t28  - t27);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  365|  1.79M|    t28a = CLIP(t28  + t27);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  366|  1.79M|    t29  = CLIP(t29a + t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  367|  1.79M|    t30a = CLIP(t30  + t25);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  368|  1.79M|    t31  = CLIP(t31a + t24a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  369|       |
  370|  1.79M|    t20  = ((t27a - t20a) * 181 + 128) >> 8;
  371|  1.79M|    t27  = ((t27a + t20a) * 181 + 128) >> 8;
  372|  1.79M|    t21a = ((t26  - t21 ) * 181 + 128) >> 8;
  373|  1.79M|    t26a = ((t26  + t21 ) * 181 + 128) >> 8;
  374|  1.79M|    t22  = ((t25a - t22a) * 181 + 128) >> 8;
  375|  1.79M|    t25  = ((t25a + t22a) * 181 + 128) >> 8;
  376|  1.79M|    t23a = ((t24  - t23 ) * 181 + 128) >> 8;
  377|  1.79M|    t24a = ((t24  + t23 ) * 181 + 128) >> 8;
  378|       |
  379|  1.79M|    const int t0  = c[ 0 * stride];
  380|  1.79M|    const int t1  = c[ 2 * stride];
  381|  1.79M|    const int t2  = c[ 4 * stride];
  382|  1.79M|    const int t3  = c[ 6 * stride];
  383|  1.79M|    const int t4  = c[ 8 * stride];
  384|  1.79M|    const int t5  = c[10 * stride];
  385|  1.79M|    const int t6  = c[12 * stride];
  386|  1.79M|    const int t7  = c[14 * stride];
  387|  1.79M|    const int t8  = c[16 * stride];
  388|  1.79M|    const int t9  = c[18 * stride];
  389|  1.79M|    const int t10 = c[20 * stride];
  390|  1.79M|    const int t11 = c[22 * stride];
  391|  1.79M|    const int t12 = c[24 * stride];
  392|  1.79M|    const int t13 = c[26 * stride];
  393|  1.79M|    const int t14 = c[28 * stride];
  394|  1.79M|    const int t15 = c[30 * stride];
  395|       |
  396|  1.79M|    c[ 0 * stride] = CLIP(t0  + t31);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  397|  1.79M|    c[ 1 * stride] = CLIP(t1  + t30a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  398|  1.79M|    c[ 2 * stride] = CLIP(t2  + t29);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  399|  1.79M|    c[ 3 * stride] = CLIP(t3  + t28a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  400|  1.79M|    c[ 4 * stride] = CLIP(t4  + t27);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  401|  1.79M|    c[ 5 * stride] = CLIP(t5  + t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  402|  1.79M|    c[ 6 * stride] = CLIP(t6  + t25);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  403|  1.79M|    c[ 7 * stride] = CLIP(t7  + t24a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  404|  1.79M|    c[ 8 * stride] = CLIP(t8  + t23a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  405|  1.79M|    c[ 9 * stride] = CLIP(t9  + t22);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  406|  1.79M|    c[10 * stride] = CLIP(t10 + t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  407|  1.79M|    c[11 * stride] = CLIP(t11 + t20);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  408|  1.79M|    c[12 * stride] = CLIP(t12 + t19a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  409|  1.79M|    c[13 * stride] = CLIP(t13 + t18);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  410|  1.79M|    c[14 * stride] = CLIP(t14 + t17a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  411|  1.79M|    c[15 * stride] = CLIP(t15 + t16);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  412|  1.79M|    c[16 * stride] = CLIP(t15 - t16);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  413|  1.79M|    c[17 * stride] = CLIP(t14 - t17a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  414|  1.79M|    c[18 * stride] = CLIP(t13 - t18);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  415|  1.79M|    c[19 * stride] = CLIP(t12 - t19a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  416|  1.79M|    c[20 * stride] = CLIP(t11 - t20);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  417|  1.79M|    c[21 * stride] = CLIP(t10 - t21a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  418|  1.79M|    c[22 * stride] = CLIP(t9  - t22);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  419|  1.79M|    c[23 * stride] = CLIP(t8  - t23a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  420|  1.79M|    c[24 * stride] = CLIP(t7  - t24a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  421|  1.79M|    c[25 * stride] = CLIP(t6  - t25);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  422|  1.79M|    c[26 * stride] = CLIP(t5  - t26a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  423|  1.79M|    c[27 * stride] = CLIP(t4  - t27);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  424|  1.79M|    c[28 * stride] = CLIP(t3  - t28a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  425|  1.79M|    c[29 * stride] = CLIP(t2  - t29);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  426|  1.79M|    c[30 * stride] = CLIP(t1  - t30a);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  427|  1.79M|    c[31 * stride] = CLIP(t0  - t31);
  ------------------
  |  |   37|  1.79M|#define CLIP(a) iclip(a, min, max)
  ------------------
  428|  1.79M|}
itx_1d.c:inv_dct64_1d_c:
  438|   960k|{
  439|   960k|    assert(stride > 0);
  ------------------
  |  |  140|   960k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 960k]
  |  |  |  Branch (140:68): [Folded, False: 960k]
  |  |  ------------------
  ------------------
  440|   960k|    inv_dct32_1d_internal_c(c, stride << 1, min, max, 1);
  441|       |
  442|   960k|    const int in1  = c[ 1 * stride], in3  = c[ 3 * stride];
  443|   960k|    const int in5  = c[ 5 * stride], in7  = c[ 7 * stride];
  444|   960k|    const int in9  = c[ 9 * stride], in11 = c[11 * stride];
  445|   960k|    const int in13 = c[13 * stride], in15 = c[15 * stride];
  446|   960k|    const int in17 = c[17 * stride], in19 = c[19 * stride];
  447|   960k|    const int in21 = c[21 * stride], in23 = c[23 * stride];
  448|   960k|    const int in25 = c[25 * stride], in27 = c[27 * stride];
  449|   960k|    const int in29 = c[29 * stride], in31 = c[31 * stride];
  450|       |
  451|   960k|    int t32a = (in1  *   101 + 2048) >> 12;
  452|   960k|    int t33a = (in31 * -2824 + 2048) >> 12;
  453|   960k|    int t34a = (in17 *  1660 + 2048) >> 12;
  454|   960k|    int t35a = (in15 * -1474 + 2048) >> 12;
  455|   960k|    int t36a = (in9  *   897 + 2048) >> 12;
  456|   960k|    int t37a = (in23 * -2191 + 2048) >> 12;
  457|   960k|    int t38a = (in25 *  2359 + 2048) >> 12;
  458|   960k|    int t39a = (in7  *  -700 + 2048) >> 12;
  459|   960k|    int t40a = (in5  *   501 + 2048) >> 12;
  460|   960k|    int t41a = (in27 * -2520 + 2048) >> 12;
  461|   960k|    int t42a = (in21 *  2019 + 2048) >> 12;
  462|   960k|    int t43a = (in11 * -1092 + 2048) >> 12;
  463|   960k|    int t44a = (in13 *  1285 + 2048) >> 12;
  464|   960k|    int t45a = (in19 * -1842 + 2048) >> 12;
  465|   960k|    int t46a = (in29 *  2675 + 2048) >> 12;
  466|   960k|    int t47a = (in3  *  -301 + 2048) >> 12;
  467|   960k|    int t48a = (in3  *  4085 + 2048) >> 12;
  468|   960k|    int t49a = (in29 *  3102 + 2048) >> 12;
  469|   960k|    int t50a = (in19 *  3659 + 2048) >> 12;
  470|   960k|    int t51a = (in13 *  3889 + 2048) >> 12;
  471|   960k|    int t52a = (in11 *  3948 + 2048) >> 12;
  472|   960k|    int t53a = (in21 *  3564 + 2048) >> 12;
  473|   960k|    int t54a = (in27 *  3229 + 2048) >> 12;
  474|   960k|    int t55a = (in5  *  4065 + 2048) >> 12;
  475|   960k|    int t56a = (in7  *  4036 + 2048) >> 12;
  476|   960k|    int t57a = (in25 *  3349 + 2048) >> 12;
  477|   960k|    int t58a = (in23 *  3461 + 2048) >> 12;
  478|   960k|    int t59a = (in9  *  3996 + 2048) >> 12;
  479|   960k|    int t60a = (in15 *  3822 + 2048) >> 12;
  480|   960k|    int t61a = (in17 *  3745 + 2048) >> 12;
  481|   960k|    int t62a = (in31 *  2967 + 2048) >> 12;
  482|   960k|    int t63a = (in1  *  4095 + 2048) >> 12;
  483|       |
  484|   960k|    int t32 = CLIP(t32a + t33a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  485|   960k|    int t33 = CLIP(t32a - t33a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  486|   960k|    int t34 = CLIP(t35a - t34a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  487|   960k|    int t35 = CLIP(t35a + t34a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  488|   960k|    int t36 = CLIP(t36a + t37a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  489|   960k|    int t37 = CLIP(t36a - t37a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  490|   960k|    int t38 = CLIP(t39a - t38a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  491|   960k|    int t39 = CLIP(t39a + t38a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  492|   960k|    int t40 = CLIP(t40a + t41a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  493|   960k|    int t41 = CLIP(t40a - t41a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  494|   960k|    int t42 = CLIP(t43a - t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  495|   960k|    int t43 = CLIP(t43a + t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  496|   960k|    int t44 = CLIP(t44a + t45a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  497|   960k|    int t45 = CLIP(t44a - t45a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  498|   960k|    int t46 = CLIP(t47a - t46a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  499|   960k|    int t47 = CLIP(t47a + t46a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  500|   960k|    int t48 = CLIP(t48a + t49a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  501|   960k|    int t49 = CLIP(t48a - t49a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  502|   960k|    int t50 = CLIP(t51a - t50a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  503|   960k|    int t51 = CLIP(t51a + t50a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  504|   960k|    int t52 = CLIP(t52a + t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  505|   960k|    int t53 = CLIP(t52a - t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  506|   960k|    int t54 = CLIP(t55a - t54a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  507|   960k|    int t55 = CLIP(t55a + t54a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  508|   960k|    int t56 = CLIP(t56a + t57a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  509|   960k|    int t57 = CLIP(t56a - t57a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  510|   960k|    int t58 = CLIP(t59a - t58a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  511|   960k|    int t59 = CLIP(t59a + t58a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  512|   960k|    int t60 = CLIP(t60a + t61a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  513|   960k|    int t61 = CLIP(t60a - t61a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  514|   960k|    int t62 = CLIP(t63a - t62a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  515|   960k|    int t63 = CLIP(t63a + t62a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  516|       |
  517|   960k|    t33a = ((t33 * (4096 - 4076) + t62 *   401         + 2048) >> 12) - t33;
  518|   960k|    t34a = ((t34 *  -401         + t61 * (4096 - 4076) + 2048) >> 12) - t61;
  519|   960k|    t37a =  (t37 * -1299         + t58 *  1583         + 1024) >> 11;
  520|   960k|    t38a =  (t38 * -1583         + t57 * -1299         + 1024) >> 11;
  521|   960k|    t41a = ((t41 * (4096 - 3612) + t54 *  1931         + 2048) >> 12) - t41;
  522|   960k|    t42a = ((t42 * -1931         + t53 * (4096 - 3612) + 2048) >> 12) - t53;
  523|   960k|    t45a = ((t45 * -1189         + t50 * (3920 - 4096) + 2048) >> 12) + t50;
  524|   960k|    t46a = ((t46 * (4096 - 3920) + t49 * -1189         + 2048) >> 12) - t46;
  525|   960k|    t49a = ((t46 * -1189         + t49 * (3920 - 4096) + 2048) >> 12) + t49;
  526|   960k|    t50a = ((t45 * (3920 - 4096) + t50 *  1189         + 2048) >> 12) + t45;
  527|   960k|    t53a = ((t42 * (4096 - 3612) + t53 *  1931         + 2048) >> 12) - t42;
  528|   960k|    t54a = ((t41 *  1931         + t54 * (3612 - 4096) + 2048) >> 12) + t54;
  529|   960k|    t57a =  (t38 * -1299         + t57 *  1583         + 1024) >> 11;
  530|   960k|    t58a =  (t37 *  1583         + t58 *  1299         + 1024) >> 11;
  531|   960k|    t61a = ((t34 * (4096 - 4076) + t61 *   401         + 2048) >> 12) - t34;
  532|   960k|    t62a = ((t33 *   401         + t62 * (4076 - 4096) + 2048) >> 12) + t62;
  533|       |
  534|   960k|    t32a = CLIP(t32  + t35);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  535|   960k|    t33  = CLIP(t33a + t34a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  536|   960k|    t34  = CLIP(t33a - t34a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  537|   960k|    t35a = CLIP(t32  - t35);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  538|   960k|    t36a = CLIP(t39  - t36);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  539|   960k|    t37  = CLIP(t38a - t37a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  540|   960k|    t38  = CLIP(t38a + t37a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  541|   960k|    t39a = CLIP(t39  + t36);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  542|   960k|    t40a = CLIP(t40  + t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  543|   960k|    t41  = CLIP(t41a + t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  544|   960k|    t42  = CLIP(t41a - t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  545|   960k|    t43a = CLIP(t40  - t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  546|   960k|    t44a = CLIP(t47  - t44);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  547|   960k|    t45  = CLIP(t46a - t45a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  548|   960k|    t46  = CLIP(t46a + t45a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  549|   960k|    t47a = CLIP(t47  + t44);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  550|   960k|    t48a = CLIP(t48  + t51);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  551|   960k|    t49  = CLIP(t49a + t50a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  552|   960k|    t50  = CLIP(t49a - t50a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  553|   960k|    t51a = CLIP(t48  - t51);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  554|   960k|    t52a = CLIP(t55  - t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  555|   960k|    t53  = CLIP(t54a - t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  556|   960k|    t54  = CLIP(t54a + t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  557|   960k|    t55a = CLIP(t55  + t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  558|   960k|    t56a = CLIP(t56  + t59);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  559|   960k|    t57  = CLIP(t57a + t58a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  560|   960k|    t58  = CLIP(t57a - t58a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  561|   960k|    t59a = CLIP(t56  - t59);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  562|   960k|    t60a = CLIP(t63  - t60);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  563|   960k|    t61  = CLIP(t62a - t61a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  564|   960k|    t62  = CLIP(t62a + t61a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  565|   960k|    t63a = CLIP(t63  + t60);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  566|       |
  567|   960k|    t34a = ((t34  * (4096 - 4017) + t61  *   799         + 2048) >> 12) - t34;
  568|   960k|    t35  = ((t35a * (4096 - 4017) + t60a *   799         + 2048) >> 12) - t35a;
  569|   960k|    t36  = ((t36a *  -799         + t59a * (4096 - 4017) + 2048) >> 12) - t59a;
  570|   960k|    t37a = ((t37  *  -799         + t58  * (4096 - 4017) + 2048) >> 12) - t58;
  571|   960k|    t42a =  (t42  * -1138         + t53  *  1703         + 1024) >> 11;
  572|   960k|    t43  =  (t43a * -1138         + t52a *  1703         + 1024) >> 11;
  573|   960k|    t44  =  (t44a * -1703         + t51a * -1138         + 1024) >> 11;
  574|   960k|    t45a =  (t45  * -1703         + t50  * -1138         + 1024) >> 11;
  575|   960k|    t50a =  (t45  * -1138         + t50  *  1703         + 1024) >> 11;
  576|   960k|    t51  =  (t44a * -1138         + t51a *  1703         + 1024) >> 11;
  577|   960k|    t52  =  (t43a *  1703         + t52a *  1138         + 1024) >> 11;
  578|   960k|    t53a =  (t42  *  1703         + t53  *  1138         + 1024) >> 11;
  579|   960k|    t58a = ((t37  * (4096 - 4017) + t58  *   799         + 2048) >> 12) - t37;
  580|   960k|    t59  = ((t36a * (4096 - 4017) + t59a *   799         + 2048) >> 12) - t36a;
  581|   960k|    t60  = ((t35a *   799         + t60a * (4017 - 4096) + 2048) >> 12) + t60a;
  582|   960k|    t61a = ((t34  *   799         + t61  * (4017 - 4096) + 2048) >> 12) + t61;
  583|       |
  584|   960k|    t32  = CLIP(t32a + t39a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  585|   960k|    t33a = CLIP(t33  + t38);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  586|   960k|    t34  = CLIP(t34a + t37a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  587|   960k|    t35a = CLIP(t35  + t36);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  588|   960k|    t36a = CLIP(t35  - t36);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  589|   960k|    t37  = CLIP(t34a - t37a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  590|   960k|    t38a = CLIP(t33  - t38);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  591|   960k|    t39  = CLIP(t32a - t39a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  592|   960k|    t40  = CLIP(t47a - t40a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  593|   960k|    t41a = CLIP(t46  - t41);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  594|   960k|    t42  = CLIP(t45a - t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  595|   960k|    t43a = CLIP(t44  - t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  596|   960k|    t44a = CLIP(t44  + t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  597|   960k|    t45  = CLIP(t45a + t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  598|   960k|    t46a = CLIP(t46  + t41);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  599|   960k|    t47  = CLIP(t47a + t40a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  600|   960k|    t48  = CLIP(t48a + t55a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  601|   960k|    t49a = CLIP(t49  + t54);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  602|   960k|    t50  = CLIP(t50a + t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  603|   960k|    t51a = CLIP(t51  + t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  604|   960k|    t52a = CLIP(t51  - t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  605|   960k|    t53  = CLIP(t50a - t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  606|   960k|    t54a = CLIP(t49  - t54);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  607|   960k|    t55  = CLIP(t48a - t55a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  608|   960k|    t56  = CLIP(t63a - t56a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  609|   960k|    t57a = CLIP(t62  - t57);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  610|   960k|    t58  = CLIP(t61a - t58a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  611|   960k|    t59a = CLIP(t60  - t59);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  612|   960k|    t60a = CLIP(t60  + t59);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  613|   960k|    t61  = CLIP(t61a + t58a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  614|   960k|    t62a = CLIP(t62  + t57);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  615|   960k|    t63  = CLIP(t63a + t56a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  616|       |
  617|   960k|    t36  = ((t36a * (4096 - 3784) + t59a *  1567         + 2048) >> 12) - t36a;
  618|   960k|    t37a = ((t37  * (4096 - 3784) + t58  *  1567         + 2048) >> 12) - t37;
  619|   960k|    t38  = ((t38a * (4096 - 3784) + t57a *  1567         + 2048) >> 12) - t38a;
  620|   960k|    t39a = ((t39  * (4096 - 3784) + t56  *  1567         + 2048) >> 12) - t39;
  621|   960k|    t40a = ((t40  * -1567         + t55  * (4096 - 3784) + 2048) >> 12) - t55;
  622|   960k|    t41  = ((t41a * -1567         + t54a * (4096 - 3784) + 2048) >> 12) - t54a;
  623|   960k|    t42a = ((t42  * -1567         + t53  * (4096 - 3784) + 2048) >> 12) - t53;
  624|   960k|    t43  = ((t43a * -1567         + t52a * (4096 - 3784) + 2048) >> 12) - t52a;
  625|   960k|    t52  = ((t43a * (4096 - 3784) + t52a *  1567         + 2048) >> 12) - t43a;
  626|   960k|    t53a = ((t42  * (4096 - 3784) + t53  *  1567         + 2048) >> 12) - t42;
  627|   960k|    t54  = ((t41a * (4096 - 3784) + t54a *  1567         + 2048) >> 12) - t41a;
  628|   960k|    t55a = ((t40  * (4096 - 3784) + t55  *  1567         + 2048) >> 12) - t40;
  629|   960k|    t56a = ((t39  *  1567         + t56  * (3784 - 4096) + 2048) >> 12) + t56;
  630|   960k|    t57  = ((t38a *  1567         + t57a * (3784 - 4096) + 2048) >> 12) + t57a;
  631|   960k|    t58a = ((t37  *  1567         + t58  * (3784 - 4096) + 2048) >> 12) + t58;
  632|   960k|    t59  = ((t36a *  1567         + t59a * (3784 - 4096) + 2048) >> 12) + t59a;
  633|       |
  634|   960k|    t32a = CLIP(t32  + t47);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  635|   960k|    t33  = CLIP(t33a + t46a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  636|   960k|    t34a = CLIP(t34  + t45);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  637|   960k|    t35  = CLIP(t35a + t44a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  638|   960k|    t36a = CLIP(t36  + t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  639|   960k|    t37  = CLIP(t37a + t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  640|   960k|    t38a = CLIP(t38  + t41);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  641|   960k|    t39  = CLIP(t39a + t40a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  642|   960k|    t40  = CLIP(t39a - t40a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  643|   960k|    t41a = CLIP(t38  - t41);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  644|   960k|    t42  = CLIP(t37a - t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  645|   960k|    t43a = CLIP(t36  - t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  646|   960k|    t44  = CLIP(t35a - t44a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  647|   960k|    t45a = CLIP(t34  - t45);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  648|   960k|    t46  = CLIP(t33a - t46a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  649|   960k|    t47a = CLIP(t32  - t47);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  650|   960k|    t48a = CLIP(t63  - t48);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  651|   960k|    t49  = CLIP(t62a - t49a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  652|   960k|    t50a = CLIP(t61  - t50);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  653|   960k|    t51  = CLIP(t60a - t51a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  654|   960k|    t52a = CLIP(t59  - t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  655|   960k|    t53  = CLIP(t58a - t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  656|   960k|    t54a = CLIP(t57  - t54);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  657|   960k|    t55  = CLIP(t56a - t55a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  658|   960k|    t56  = CLIP(t56a + t55a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  659|   960k|    t57a = CLIP(t57  + t54);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  660|   960k|    t58  = CLIP(t58a + t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  661|   960k|    t59a = CLIP(t59  + t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  662|   960k|    t60  = CLIP(t60a + t51a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  663|   960k|    t61a = CLIP(t61  + t50);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  664|   960k|    t62  = CLIP(t62a + t49a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  665|   960k|    t63a = CLIP(t63  + t48);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  666|       |
  667|   960k|    t40a = ((t55  - t40 ) * 181 + 128) >> 8;
  668|   960k|    t41  = ((t54a - t41a) * 181 + 128) >> 8;
  669|   960k|    t42a = ((t53  - t42 ) * 181 + 128) >> 8;
  670|   960k|    t43  = ((t52a - t43a) * 181 + 128) >> 8;
  671|   960k|    t44a = ((t51  - t44 ) * 181 + 128) >> 8;
  672|   960k|    t45  = ((t50a - t45a) * 181 + 128) >> 8;
  673|   960k|    t46a = ((t49  - t46 ) * 181 + 128) >> 8;
  674|   960k|    t47  = ((t48a - t47a) * 181 + 128) >> 8;
  675|   960k|    t48  = ((t47a + t48a) * 181 + 128) >> 8;
  676|   960k|    t49a = ((t46  + t49 ) * 181 + 128) >> 8;
  677|   960k|    t50  = ((t45a + t50a) * 181 + 128) >> 8;
  678|   960k|    t51a = ((t44  + t51 ) * 181 + 128) >> 8;
  679|   960k|    t52  = ((t43a + t52a) * 181 + 128) >> 8;
  680|   960k|    t53a = ((t42  + t53 ) * 181 + 128) >> 8;
  681|   960k|    t54  = ((t41a + t54a) * 181 + 128) >> 8;
  682|   960k|    t55a = ((t40  + t55 ) * 181 + 128) >> 8;
  683|       |
  684|   960k|    const int t0  = c[ 0 * stride];
  685|   960k|    const int t1  = c[ 2 * stride];
  686|   960k|    const int t2  = c[ 4 * stride];
  687|   960k|    const int t3  = c[ 6 * stride];
  688|   960k|    const int t4  = c[ 8 * stride];
  689|   960k|    const int t5  = c[10 * stride];
  690|   960k|    const int t6  = c[12 * stride];
  691|   960k|    const int t7  = c[14 * stride];
  692|   960k|    const int t8  = c[16 * stride];
  693|   960k|    const int t9  = c[18 * stride];
  694|   960k|    const int t10 = c[20 * stride];
  695|   960k|    const int t11 = c[22 * stride];
  696|   960k|    const int t12 = c[24 * stride];
  697|   960k|    const int t13 = c[26 * stride];
  698|   960k|    const int t14 = c[28 * stride];
  699|   960k|    const int t15 = c[30 * stride];
  700|   960k|    const int t16 = c[32 * stride];
  701|   960k|    const int t17 = c[34 * stride];
  702|   960k|    const int t18 = c[36 * stride];
  703|   960k|    const int t19 = c[38 * stride];
  704|   960k|    const int t20 = c[40 * stride];
  705|   960k|    const int t21 = c[42 * stride];
  706|   960k|    const int t22 = c[44 * stride];
  707|   960k|    const int t23 = c[46 * stride];
  708|   960k|    const int t24 = c[48 * stride];
  709|   960k|    const int t25 = c[50 * stride];
  710|   960k|    const int t26 = c[52 * stride];
  711|   960k|    const int t27 = c[54 * stride];
  712|   960k|    const int t28 = c[56 * stride];
  713|   960k|    const int t29 = c[58 * stride];
  714|   960k|    const int t30 = c[60 * stride];
  715|   960k|    const int t31 = c[62 * stride];
  716|       |
  717|   960k|    c[ 0 * stride] = CLIP(t0  + t63a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  718|   960k|    c[ 1 * stride] = CLIP(t1  + t62);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  719|   960k|    c[ 2 * stride] = CLIP(t2  + t61a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  720|   960k|    c[ 3 * stride] = CLIP(t3  + t60);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  721|   960k|    c[ 4 * stride] = CLIP(t4  + t59a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  722|   960k|    c[ 5 * stride] = CLIP(t5  + t58);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  723|   960k|    c[ 6 * stride] = CLIP(t6  + t57a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  724|   960k|    c[ 7 * stride] = CLIP(t7  + t56);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  725|   960k|    c[ 8 * stride] = CLIP(t8  + t55a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  726|   960k|    c[ 9 * stride] = CLIP(t9  + t54);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  727|   960k|    c[10 * stride] = CLIP(t10 + t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  728|   960k|    c[11 * stride] = CLIP(t11 + t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  729|   960k|    c[12 * stride] = CLIP(t12 + t51a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  730|   960k|    c[13 * stride] = CLIP(t13 + t50);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  731|   960k|    c[14 * stride] = CLIP(t14 + t49a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  732|   960k|    c[15 * stride] = CLIP(t15 + t48);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  733|   960k|    c[16 * stride] = CLIP(t16 + t47);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  734|   960k|    c[17 * stride] = CLIP(t17 + t46a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  735|   960k|    c[18 * stride] = CLIP(t18 + t45);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  736|   960k|    c[19 * stride] = CLIP(t19 + t44a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  737|   960k|    c[20 * stride] = CLIP(t20 + t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  738|   960k|    c[21 * stride] = CLIP(t21 + t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  739|   960k|    c[22 * stride] = CLIP(t22 + t41);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  740|   960k|    c[23 * stride] = CLIP(t23 + t40a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  741|   960k|    c[24 * stride] = CLIP(t24 + t39);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  742|   960k|    c[25 * stride] = CLIP(t25 + t38a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  743|   960k|    c[26 * stride] = CLIP(t26 + t37);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  744|   960k|    c[27 * stride] = CLIP(t27 + t36a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  745|   960k|    c[28 * stride] = CLIP(t28 + t35);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  746|   960k|    c[29 * stride] = CLIP(t29 + t34a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  747|   960k|    c[30 * stride] = CLIP(t30 + t33);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  748|   960k|    c[31 * stride] = CLIP(t31 + t32a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  749|   960k|    c[32 * stride] = CLIP(t31 - t32a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  750|   960k|    c[33 * stride] = CLIP(t30 - t33);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  751|   960k|    c[34 * stride] = CLIP(t29 - t34a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  752|   960k|    c[35 * stride] = CLIP(t28 - t35);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  753|   960k|    c[36 * stride] = CLIP(t27 - t36a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  754|   960k|    c[37 * stride] = CLIP(t26 - t37);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  755|   960k|    c[38 * stride] = CLIP(t25 - t38a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  756|   960k|    c[39 * stride] = CLIP(t24 - t39);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  757|   960k|    c[40 * stride] = CLIP(t23 - t40a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  758|   960k|    c[41 * stride] = CLIP(t22 - t41);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  759|   960k|    c[42 * stride] = CLIP(t21 - t42a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  760|   960k|    c[43 * stride] = CLIP(t20 - t43);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  761|   960k|    c[44 * stride] = CLIP(t19 - t44a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  762|   960k|    c[45 * stride] = CLIP(t18 - t45);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  763|   960k|    c[46 * stride] = CLIP(t17 - t46a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  764|   960k|    c[47 * stride] = CLIP(t16 - t47);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  765|   960k|    c[48 * stride] = CLIP(t15 - t48);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  766|   960k|    c[49 * stride] = CLIP(t14 - t49a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  767|   960k|    c[50 * stride] = CLIP(t13 - t50);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  768|   960k|    c[51 * stride] = CLIP(t12 - t51a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  769|   960k|    c[52 * stride] = CLIP(t11 - t52);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  770|   960k|    c[53 * stride] = CLIP(t10 - t53a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  771|   960k|    c[54 * stride] = CLIP(t9  - t54);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  772|   960k|    c[55 * stride] = CLIP(t8  - t55a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  773|   960k|    c[56 * stride] = CLIP(t7  - t56);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  774|   960k|    c[57 * stride] = CLIP(t6  - t57a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  775|   960k|    c[58 * stride] = CLIP(t5  - t58);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  776|   960k|    c[59 * stride] = CLIP(t4  - t59a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  777|   960k|    c[60 * stride] = CLIP(t3  - t60);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  778|   960k|    c[61 * stride] = CLIP(t2  - t61a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  779|   960k|    c[62 * stride] = CLIP(t1  - t62);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  780|   960k|    c[63 * stride] = CLIP(t0  - t63a);
  ------------------
  |  |   37|   960k|#define CLIP(a) iclip(a, min, max)
  ------------------
  781|   960k|}

dav1d_itx_dsp_init_8bpc:
  220|  4.86k|COLD void bitfn(dav1d_itx_dsp_init)(Dav1dInvTxfmDSPContext *const c, int bpc) {
  221|  4.86k|#define assign_itx_all_fn64(w, h, pfx) \
  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  224|       |
  225|  4.86k|#define assign_itx_all_fn32(w, h, pfx) \
  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  229|       |
  230|  4.86k|#define assign_itx_all_fn16(w, h, pfx) \
  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  252|       |
  253|  4.86k|#define assign_itx_all_fn84(w, h, pfx) \
  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  263|  4.86k|
  264|  4.86k|#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ( \
  265|  4.86k|  ARCH_AARCH64 || \
  266|  4.86k|  (ARCH_ARM && (defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32))) \
  267|  4.86k|))
  268|  4.86k|    c->itxfm_add[TX_4X4][WHT_WHT] = inv_txfm_add_wht_wht_4x4_c;
  269|  4.86k|#endif
  270|  4.86k|    assign_itx_all_fn84( 4,  4, );
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  271|  4.86k|    assign_itx_all_fn84( 4,  8, R);
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  272|  4.86k|    assign_itx_all_fn84( 4, 16, R);
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  273|  4.86k|    assign_itx_all_fn84( 8,  4, R);
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  274|  4.86k|    assign_itx_all_fn84( 8,  8, );
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  275|  4.86k|    assign_itx_all_fn84( 8, 16, R);
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  276|  4.86k|    assign_itx_all_fn32( 8, 32, R);
  ------------------
  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  277|  4.86k|    assign_itx_all_fn84(16,  4, R);
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  278|  4.86k|    assign_itx_all_fn84(16,  8, R);
  ------------------
  |  |  254|  4.86k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  4.86k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  4.86k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  4.86k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  4.86k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  279|  4.86k|    assign_itx_all_fn16(16, 16, );
  ------------------
  |  |  231|  4.86k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  ------------------
  |  |  232|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  233|  4.86k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  234|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  235|  4.86k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  236|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  237|  4.86k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  238|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  239|  4.86k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  240|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  241|  4.86k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  242|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  243|  4.86k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  244|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  245|  4.86k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  246|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  247|  4.86k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  248|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  249|  4.86k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  250|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  251|  4.86k|        inv_txfm_add_identity_dct_##w##x##h##_c
  ------------------
  280|  4.86k|    assign_itx_all_fn32(16, 32, R);
  ------------------
  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  281|  4.86k|    assign_itx_all_fn64(16, 64, R);
  ------------------
  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  282|  4.86k|    assign_itx_all_fn32(32,  8, R);
  ------------------
  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  283|  4.86k|    assign_itx_all_fn32(32, 16, R);
  ------------------
  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  284|  4.86k|    assign_itx_all_fn32(32, 32, );
  ------------------
  |  |  226|  4.86k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  4.86k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  285|  4.86k|    assign_itx_all_fn64(32, 64, R);
  ------------------
  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  286|  4.86k|    assign_itx_all_fn64(64, 16, R);
  ------------------
  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  287|  4.86k|    assign_itx_all_fn64(64, 32, R);
  ------------------
  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  288|  4.86k|    assign_itx_all_fn64(64, 64, );
  ------------------
  |  |  222|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  4.86k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  289|       |
  290|  4.86k|    int all_simd = 0;
  291|  4.86k|#if HAVE_ASM
  292|       |#if ARCH_AARCH64 || ARCH_ARM
  293|       |    itx_dsp_init_arm(c, bpc, &all_simd);
  294|       |#endif
  295|       |#if ARCH_LOONGARCH64
  296|       |    itx_dsp_init_loongarch(c, bpc);
  297|       |#endif
  298|       |#if ARCH_PPC64LE
  299|       |    itx_dsp_init_ppc(c, bpc);
  300|       |#endif
  301|       |#if ARCH_RISCV
  302|       |    itx_dsp_init_riscv(c, bpc);
  303|       |#endif
  304|  4.86k|#if ARCH_X86
  305|  4.86k|    itx_dsp_init_x86(c, bpc, &all_simd);
  306|  4.86k|#endif
  307|  4.86k|#endif
  308|       |
  309|  4.86k|    if (!all_simd)
  ------------------
  |  Branch (309:9): [True: 0, False: 4.86k]
  ------------------
  310|      0|        dav1d_init_last_nonzero_col_from_eob_tables();
  311|  4.86k|}
itx_tmpl.c:inv_txfm_add_c:
   47|  68.9k|{
   48|  68.9k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
   49|  68.9k|    const int w = 4 * t_dim->w, h = 4 * t_dim->h;
   50|  68.9k|    const int has_dconly = txtp == DCT_DCT;
   51|  68.9k|    assert(w >= 4 && w <= 64);
  ------------------
  |  |  140|   137k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 68.9k, False: 0]
  |  |  |  Branch (140:30): [True: 68.9k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 68.9k]
  |  |  ------------------
  ------------------
   52|  68.9k|    assert(h >= 4 && h <= 64);
  ------------------
  |  |  140|   137k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 68.9k, False: 0]
  |  |  |  Branch (140:30): [True: 68.9k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 68.9k]
  |  |  ------------------
  ------------------
   53|  68.9k|    assert(eob >= 0);
  ------------------
  |  |  140|  68.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 68.9k]
  |  |  |  Branch (140:68): [Folded, False: 68.9k]
  |  |  ------------------
  ------------------
   54|       |
   55|  68.9k|    const int is_rect2 = w * 2 == h || h * 2 == w;
  ------------------
  |  Branch (55:26): [True: 5.79k, False: 63.1k]
  |  Branch (55:40): [True: 13.1k, False: 49.9k]
  ------------------
   56|  68.9k|    const int rnd = (1 << shift) >> 1;
   57|       |
   58|  68.9k|    if (eob < has_dconly) {
  ------------------
  |  Branch (58:9): [True: 29.7k, False: 39.1k]
  ------------------
   59|  29.7k|        int dc = coeff[0];
   60|  29.7k|        coeff[0] = 0;
   61|  29.7k|        if (is_rect2)
  ------------------
  |  Branch (61:13): [True: 5.09k, False: 24.7k]
  ------------------
   62|  5.09k|            dc = (dc * 181 + 128) >> 8;
   63|  29.7k|        dc = (dc * 181 + 128) >> 8;
   64|  29.7k|        dc = (dc + rnd) >> shift;
   65|  29.7k|        dc = (dc * 181 + 128 + 2048) >> 12;
   66|  1.04M|        for (int y = 0; y < h; y++, dst += PXSTRIDE(stride))
  ------------------
  |  |   53|  1.01M|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (66:25): [True: 1.01M, False: 29.7k]
  ------------------
   67|  38.8M|            for (int x = 0; x < w; x++)
  ------------------
  |  Branch (67:29): [True: 37.8M, False: 1.01M]
  ------------------
   68|  37.8M|                dst[x] = iclip_pixel(dst[x] + dc);
  ------------------
  |  |   49|  37.8M|#define iclip_pixel iclip_u8
  ------------------
   69|  29.7k|        return;
   70|  29.7k|    }
   71|       |
   72|  39.1k|    const uint8_t *const txtps = dav1d_tx1d_types[txtp];
   73|  39.1k|    const itx_1d_fn first_1d_fn = dav1d_tx1d_fns[t_dim->lw][txtps[0]];
   74|  39.1k|    const itx_1d_fn second_1d_fn = dav1d_tx1d_fns[t_dim->lh][txtps[1]];
   75|  39.1k|    const int sh = imin(h, 32), sw = imin(w, 32);
   76|  39.1k|#if BITDEPTH == 8
   77|  39.1k|    const int row_clip_min = INT16_MIN;
   78|  39.1k|    const int col_clip_min = INT16_MIN;
   79|       |#else
   80|       |    const int row_clip_min = (int) ((unsigned) ~bitdepth_max << 7);
   81|       |    const int col_clip_min = (int) ((unsigned) ~bitdepth_max << 5);
   82|       |#endif
   83|  39.1k|    const int row_clip_max = ~row_clip_min;
   84|  39.1k|    const int col_clip_max = ~col_clip_min;
   85|       |
   86|  39.1k|    int32_t tmp[64 * 64], *c = tmp;
   87|  39.1k|    int last_nonzero_col; // in first 1d itx
   88|  39.1k|    if (txtps[1] == IDENTITY && txtps[0] != IDENTITY) {
  ------------------
  |  Branch (88:9): [True: 0, False: 39.1k]
  |  Branch (88:33): [True: 0, False: 0]
  ------------------
   89|      0|        last_nonzero_col = imin(sh - 1, eob);
   90|  39.1k|    } else if (txtps[0] == IDENTITY && txtps[1] != IDENTITY) {
  ------------------
  |  Branch (90:16): [True: 0, False: 39.1k]
  |  Branch (90:40): [True: 0, False: 0]
  ------------------
   91|      0|        last_nonzero_col = eob >> (t_dim->lw + 2);
   92|  39.1k|    } else {
   93|  39.1k|        last_nonzero_col = dav1d_last_nonzero_col_from_eob[tx][eob];
   94|  39.1k|    }
   95|  39.1k|    assert(last_nonzero_col < sh);
  ------------------
  |  |  140|  39.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 39.1k]
  |  |  |  Branch (140:68): [Folded, False: 39.1k]
  |  |  ------------------
  ------------------
   96|   390k|    for (int y = 0; y <= last_nonzero_col; y++, c += w) {
  ------------------
  |  Branch (96:21): [True: 351k, False: 39.1k]
  ------------------
   97|   351k|        if (is_rect2)
  ------------------
  |  Branch (97:13): [True: 123k, False: 227k]
  ------------------
   98|  3.68M|            for (int x = 0; x < sw; x++)
  ------------------
  |  Branch (98:29): [True: 3.56M, False: 123k]
  ------------------
   99|  3.56M|                c[x] = (coeff[y + x * sh] * 181 + 128) >> 8;
  100|   227k|        else
  101|  7.41M|            for (int x = 0; x < sw; x++)
  ------------------
  |  Branch (101:29): [True: 7.18M, False: 227k]
  ------------------
  102|  7.18M|                c[x] = coeff[y + x * sh];
  103|   351k|        first_1d_fn(c, 1, row_clip_min, row_clip_max);
  104|   351k|    }
  105|  39.1k|    if (last_nonzero_col + 1 < sh)
  ------------------
  |  Branch (105:9): [True: 35.3k, False: 3.80k]
  ------------------
  106|  35.3k|        memset(c, 0, sizeof(*c) * (sh - last_nonzero_col - 1) * w);
  107|       |
  108|  39.1k|    memset(coeff, 0, sizeof(*coeff) * sw * sh);
  109|  50.8M|    for (int i = 0; i < w * sh; i++)
  ------------------
  |  Branch (109:21): [True: 50.8M, False: 39.1k]
  ------------------
  110|  50.8M|        tmp[i] = iclip((tmp[i] + rnd) >> shift, col_clip_min, col_clip_max);
  111|       |
  112|  1.74M|    for (int x = 0; x < w; x++)
  ------------------
  |  Branch (112:21): [True: 1.70M, False: 39.1k]
  ------------------
  113|  1.70M|        second_1d_fn(&tmp[x], w, col_clip_min, col_clip_max);
  114|       |
  115|  39.1k|    c = tmp;
  116|  1.61M|    for (int y = 0; y < h; y++, dst += PXSTRIDE(stride))
  ------------------
  |  |   53|  1.57M|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (116:21): [True: 1.57M, False: 39.1k]
  ------------------
  117|  77.8M|        for (int x = 0; x < w; x++)
  ------------------
  |  Branch (117:25): [True: 76.2M, False: 1.57M]
  ------------------
  118|  76.2M|            dst[x] = iclip_pixel(dst[x] + ((*c++ + 8) >> 4));
  ------------------
  |  |   49|  76.2M|#define iclip_pixel iclip_u8
  ------------------
  119|  39.1k|}
itx_tmpl.c:inv_txfm_add_dct_dct_16x32_c:
  127|  4.52k|                                               HIGHBD_DECL_SUFFIX) \
  128|  4.52k|{ \
  129|  4.52k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  4.52k|                   HIGHBD_TAIL_SUFFIX); \
  131|  4.52k|}
itx_tmpl.c:inv_txfm_add_dct_dct_16x64_c:
  127|    978|                                               HIGHBD_DECL_SUFFIX) \
  128|    978|{ \
  129|    978|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|    978|                   HIGHBD_TAIL_SUFFIX); \
  131|    978|}
itx_tmpl.c:inv_txfm_add_dct_dct_32x16_c:
  127|  8.50k|                                               HIGHBD_DECL_SUFFIX) \
  128|  8.50k|{ \
  129|  8.50k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  8.50k|                   HIGHBD_TAIL_SUFFIX); \
  131|  8.50k|}
itx_tmpl.c:inv_txfm_add_dct_dct_32x32_c:
  127|  33.8k|                                               HIGHBD_DECL_SUFFIX) \
  128|  33.8k|{ \
  129|  33.8k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  33.8k|                   HIGHBD_TAIL_SUFFIX); \
  131|  33.8k|}
itx_tmpl.c:inv_txfm_add_dct_dct_32x64_c:
  127|  1.26k|                                               HIGHBD_DECL_SUFFIX) \
  128|  1.26k|{ \
  129|  1.26k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  1.26k|                   HIGHBD_TAIL_SUFFIX); \
  131|  1.26k|}
itx_tmpl.c:inv_txfm_add_dct_dct_64x16_c:
  127|    790|                                               HIGHBD_DECL_SUFFIX) \
  128|    790|{ \
  129|    790|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|    790|                   HIGHBD_TAIL_SUFFIX); \
  131|    790|}
itx_tmpl.c:inv_txfm_add_dct_dct_64x32_c:
  127|  4.68k|                                               HIGHBD_DECL_SUFFIX) \
  128|  4.68k|{ \
  129|  4.68k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  4.68k|                   HIGHBD_TAIL_SUFFIX); \
  131|  4.68k|}
itx_tmpl.c:inv_txfm_add_dct_dct_64x64_c:
  127|  14.3k|                                               HIGHBD_DECL_SUFFIX) \
  128|  14.3k|{ \
  129|  14.3k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  14.3k|                   HIGHBD_TAIL_SUFFIX); \
  131|  14.3k|}
dav1d_itx_dsp_init_16bpc:
  220|  6.93k|COLD void bitfn(dav1d_itx_dsp_init)(Dav1dInvTxfmDSPContext *const c, int bpc) {
  221|  6.93k|#define assign_itx_all_fn64(w, h, pfx) \
  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  224|       |
  225|  6.93k|#define assign_itx_all_fn32(w, h, pfx) \
  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  229|       |
  230|  6.93k|#define assign_itx_all_fn16(w, h, pfx) \
  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  252|       |
  253|  6.93k|#define assign_itx_all_fn84(w, h, pfx) \
  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  263|  6.93k|
  264|  6.93k|#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ( \
  265|  6.93k|  ARCH_AARCH64 || \
  266|  6.93k|  (ARCH_ARM && (defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32))) \
  267|  6.93k|))
  268|  6.93k|    c->itxfm_add[TX_4X4][WHT_WHT] = inv_txfm_add_wht_wht_4x4_c;
  269|  6.93k|#endif
  270|  6.93k|    assign_itx_all_fn84( 4,  4, );
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  271|  6.93k|    assign_itx_all_fn84( 4,  8, R);
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  272|  6.93k|    assign_itx_all_fn84( 4, 16, R);
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  273|  6.93k|    assign_itx_all_fn84( 8,  4, R);
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  274|  6.93k|    assign_itx_all_fn84( 8,  8, );
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  275|  6.93k|    assign_itx_all_fn84( 8, 16, R);
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  276|  6.93k|    assign_itx_all_fn32( 8, 32, R);
  ------------------
  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  277|  6.93k|    assign_itx_all_fn84(16,  4, R);
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  278|  6.93k|    assign_itx_all_fn84(16,  8, R);
  ------------------
  |  |  254|  6.93k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  6.93k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  6.93k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  6.93k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  6.93k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  279|  6.93k|    assign_itx_all_fn16(16, 16, );
  ------------------
  |  |  231|  6.93k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  ------------------
  |  |  232|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  233|  6.93k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  234|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  235|  6.93k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  236|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  237|  6.93k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  238|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  239|  6.93k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  240|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  241|  6.93k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  242|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  243|  6.93k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  244|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  245|  6.93k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  246|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  247|  6.93k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  248|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  249|  6.93k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  250|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  251|  6.93k|        inv_txfm_add_identity_dct_##w##x##h##_c
  ------------------
  280|  6.93k|    assign_itx_all_fn32(16, 32, R);
  ------------------
  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  281|  6.93k|    assign_itx_all_fn64(16, 64, R);
  ------------------
  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  282|  6.93k|    assign_itx_all_fn32(32,  8, R);
  ------------------
  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  283|  6.93k|    assign_itx_all_fn32(32, 16, R);
  ------------------
  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  284|  6.93k|    assign_itx_all_fn32(32, 32, );
  ------------------
  |  |  226|  6.93k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  6.93k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  285|  6.93k|    assign_itx_all_fn64(32, 64, R);
  ------------------
  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  286|  6.93k|    assign_itx_all_fn64(64, 16, R);
  ------------------
  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  287|  6.93k|    assign_itx_all_fn64(64, 32, R);
  ------------------
  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  288|  6.93k|    assign_itx_all_fn64(64, 64, );
  ------------------
  |  |  222|  6.93k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  6.93k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  289|       |
  290|  6.93k|    int all_simd = 0;
  291|  6.93k|#if HAVE_ASM
  292|       |#if ARCH_AARCH64 || ARCH_ARM
  293|       |    itx_dsp_init_arm(c, bpc, &all_simd);
  294|       |#endif
  295|       |#if ARCH_LOONGARCH64
  296|       |    itx_dsp_init_loongarch(c, bpc);
  297|       |#endif
  298|       |#if ARCH_PPC64LE
  299|       |    itx_dsp_init_ppc(c, bpc);
  300|       |#endif
  301|       |#if ARCH_RISCV
  302|       |    itx_dsp_init_riscv(c, bpc);
  303|       |#endif
  304|  6.93k|#if ARCH_X86
  305|  6.93k|    itx_dsp_init_x86(c, bpc, &all_simd);
  306|  6.93k|#endif
  307|  6.93k|#endif
  308|       |
  309|  6.93k|    if (!all_simd)
  ------------------
  |  Branch (309:9): [True: 3.05k, False: 3.87k]
  ------------------
  310|  3.05k|        dav1d_init_last_nonzero_col_from_eob_tables();
  311|  6.93k|}

dav1d_copy_lpf_8bpc:
  106|  17.6k|{
  107|  17.6k|    const int have_tt = f->c->n_tc > 1;
  108|  17.6k|    const int resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
  109|  17.6k|    const int offset = 8 * !!sby;
  110|  17.6k|    const ptrdiff_t *const src_stride = f->cur.stride;
  111|  17.6k|    const ptrdiff_t *const lr_stride = f->sr_cur.p.stride;
  112|  17.6k|    const int tt_off = have_tt * sby * (4 << f->seq_hdr->sb128);
  113|  17.6k|    pixel *const dst[3] = {
  114|  17.6k|        f->lf.lr_lpf_line[0] + tt_off * PXSTRIDE(lr_stride[0]),
  ------------------
  |  |   53|  17.6k|#define PXSTRIDE(x) (x)
  ------------------
  115|  17.6k|        f->lf.lr_lpf_line[1] + tt_off * PXSTRIDE(lr_stride[1]),
  ------------------
  |  |   53|  17.6k|#define PXSTRIDE(x) (x)
  ------------------
  116|  17.6k|        f->lf.lr_lpf_line[2] + tt_off * PXSTRIDE(lr_stride[1])
  ------------------
  |  |   53|  17.6k|#define PXSTRIDE(x) (x)
  ------------------
  117|  17.6k|    };
  118|       |
  119|       |    // TODO Also check block level restore type to reduce copying.
  120|  17.6k|    const int restore_planes = f->lf.restore_planes;
  121|       |
  122|  17.6k|    if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (122:9): [True: 13.0k, False: 4.51k]
  |  Branch (122:29): [True: 3.02k, False: 1.49k]
  ------------------
  123|  16.1k|        const int h = f->cur.p.h;
  124|  16.1k|        const int w = f->bw << 2;
  125|  16.1k|        const int row_h = imin((sby + 1) << (6 + f->seq_hdr->sb128), h - 1);
  126|  16.1k|        const int y_stripe = (sby << (6 + f->seq_hdr->sb128)) - offset;
  127|  16.1k|        if (restore_planes & LR_RESTORE_Y || !resize)
  ------------------
  |  Branch (127:13): [True: 6.01k, False: 10.0k]
  |  Branch (127:46): [True: 7.92k, False: 2.17k]
  ------------------
  128|  13.9k|            backup_lpf(f, dst[0], lr_stride[0],
  129|  13.9k|                       src[0] - offset * PXSTRIDE(src_stride[0]), src_stride[0],
  ------------------
  |  |   53|  13.9k|#define PXSTRIDE(x) (x)
  ------------------
  130|  13.9k|                       0, f->seq_hdr->sb128, y_stripe, row_h, w, h, 0, 1);
  131|  16.1k|        if (have_tt && resize) {
  ------------------
  |  Branch (131:13): [True: 0, False: 16.1k]
  |  Branch (131:24): [True: 0, False: 0]
  ------------------
  132|      0|            const ptrdiff_t cdef_off_y = sby * 4 * PXSTRIDE(src_stride[0]);
  ------------------
  |  |   53|      0|#define PXSTRIDE(x) (x)
  ------------------
  133|      0|            backup_lpf(f, f->lf.cdef_lpf_line[0] + cdef_off_y, src_stride[0],
  134|      0|                       src[0] - offset * PXSTRIDE(src_stride[0]), src_stride[0],
  ------------------
  |  |   53|      0|#define PXSTRIDE(x) (x)
  ------------------
  135|      0|                       0, f->seq_hdr->sb128, y_stripe, row_h, w, h, 0, 0);
  136|      0|        }
  137|  16.1k|    }
  138|  17.6k|    if ((f->seq_hdr->cdef || restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) &&
  ------------------
  |  Branch (138:10): [True: 13.0k, False: 4.51k]
  |  Branch (138:30): [True: 3.22k, False: 1.29k]
  ------------------
  139|  16.3k|        f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400)
  ------------------
  |  Branch (139:9): [True: 14.1k, False: 2.15k]
  ------------------
  140|  14.1k|    {
  141|  14.1k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  142|  14.1k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  143|  14.1k|        const int h = (f->cur.p.h + ss_ver) >> ss_ver;
  144|  14.1k|        const int w = f->bw << (2 - ss_hor);
  145|  14.1k|        const int row_h = imin((sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128), h - 1);
  146|  14.1k|        const int offset_uv = offset >> ss_ver;
  147|  14.1k|        const int y_stripe = (sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
  148|  14.1k|        const ptrdiff_t cdef_off_uv = sby * 4 * PXSTRIDE(src_stride[1]);
  ------------------
  |  |   53|  14.1k|#define PXSTRIDE(x) (x)
  ------------------
  149|  14.1k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_U) {
  ------------------
  |  Branch (149:13): [True: 10.9k, False: 3.22k]
  |  Branch (149:33): [True: 2.70k, False: 515]
  ------------------
  150|  13.6k|            if (restore_planes & LR_RESTORE_U || !resize)
  ------------------
  |  Branch (150:17): [True: 4.52k, False: 9.10k]
  |  Branch (150:50): [True: 7.24k, False: 1.86k]
  ------------------
  151|  11.7k|                backup_lpf(f, dst[1], lr_stride[1],
  152|  11.7k|                           src[1] - offset_uv * PXSTRIDE(src_stride[1]),
  ------------------
  |  |   53|  11.7k|#define PXSTRIDE(x) (x)
  ------------------
  153|  11.7k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  154|  11.7k|                           row_h, w, h, ss_hor, 1);
  155|  13.6k|            if (have_tt && resize)
  ------------------
  |  Branch (155:17): [True: 0, False: 13.6k]
  |  Branch (155:28): [True: 0, False: 0]
  ------------------
  156|      0|                backup_lpf(f, f->lf.cdef_lpf_line[1] + cdef_off_uv, src_stride[1],
  157|      0|                           src[1] - offset_uv * PXSTRIDE(src_stride[1]),
  ------------------
  |  |   53|      0|#define PXSTRIDE(x) (x)
  ------------------
  158|      0|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  159|      0|                           row_h, w, h, ss_hor, 0);
  160|  13.6k|        }
  161|  14.1k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_V) {
  ------------------
  |  Branch (161:13): [True: 10.9k, False: 3.22k]
  |  Branch (161:33): [True: 1.91k, False: 1.30k]
  ------------------
  162|  12.8k|            if (restore_planes & LR_RESTORE_V || !resize)
  ------------------
  |  Branch (162:17): [True: 3.87k, False: 8.97k]
  |  Branch (162:50): [True: 7.13k, False: 1.84k]
  ------------------
  163|  11.0k|                backup_lpf(f, dst[2], lr_stride[1],
  164|  11.0k|                           src[2] - offset_uv * PXSTRIDE(src_stride[1]),
  ------------------
  |  |   53|  11.0k|#define PXSTRIDE(x) (x)
  ------------------
  165|  11.0k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  166|  11.0k|                           row_h, w, h, ss_hor, 1);
  167|  12.8k|            if (have_tt && resize)
  ------------------
  |  Branch (167:17): [True: 0, False: 12.8k]
  |  Branch (167:28): [True: 0, False: 0]
  ------------------
  168|      0|                backup_lpf(f, f->lf.cdef_lpf_line[2] + cdef_off_uv, src_stride[1],
  169|      0|                           src[2] - offset_uv * PXSTRIDE(src_stride[1]),
  ------------------
  |  |   53|      0|#define PXSTRIDE(x) (x)
  ------------------
  170|      0|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  171|      0|                           row_h, w, h, ss_hor, 0);
  172|  12.8k|        }
  173|  14.1k|    }
  174|  17.6k|}
dav1d_loopfilter_sbrow_cols_8bpc:
  316|  19.1k|{
  317|  19.1k|    int x, have_left;
  318|       |    // Don't filter outside the frame
  319|  19.1k|    const int is_sb64 = !f->seq_hdr->sb128;
  320|  19.1k|    const int starty4 = (sby & is_sb64) << 4;
  321|  19.1k|    const int sbsz = 32 >> is_sb64;
  322|  19.1k|    const int sbl2 = 5 - is_sb64;
  323|  19.1k|    const int halign = (f->bh + 31) & ~31;
  324|  19.1k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  325|  19.1k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  326|  19.1k|    const int vmask = 16 >> ss_ver, hmask = 16 >> ss_hor;
  327|  19.1k|    const unsigned vmax = 1U << vmask, hmax = 1U << hmask;
  328|  19.1k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  329|  19.1k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  330|       |
  331|       |    // fix lpf strength at tile col boundaries
  332|  19.1k|    const uint8_t *lpf_y = &f->lf.tx_lpf_right_edge[0][sby << sbl2];
  333|  19.1k|    const uint8_t *lpf_uv = &f->lf.tx_lpf_right_edge[1][sby << (sbl2 - ss_ver)];
  334|  19.4k|    for (int tile_col = 1;; tile_col++) {
  335|  19.4k|        x = f->frame_hdr->tiling.col_start_sb[tile_col];
  336|  19.4k|        if ((x << sbl2) >= f->bw) break;
  ------------------
  |  Branch (336:13): [True: 19.1k, False: 370]
  ------------------
  337|    370|        const int bx4 = x & is_sb64 ? 16 : 0, cbx4 = bx4 >> ss_hor;
  ------------------
  |  Branch (337:25): [True: 87, False: 283]
  ------------------
  338|    370|        x >>= is_sb64;
  339|       |
  340|    370|        uint16_t (*const y_hmask)[2] = lflvl[x].filter_y[0][bx4];
  341|  8.25k|        for (unsigned y = starty4, mask = 1 << y; y < endy4; y++, mask <<= 1) {
  ------------------
  |  Branch (341:51): [True: 7.88k, False: 370]
  ------------------
  342|  7.88k|            const int sidx = mask >= 0x10000U;
  343|  7.88k|            const unsigned smask = mask >> (sidx << 4);
  344|  7.88k|            const int idx = 2 * !!(y_hmask[2][sidx] & smask) +
  345|  7.88k|                                !!(y_hmask[1][sidx] & smask);
  346|  7.88k|            y_hmask[2][sidx] &= ~smask;
  347|  7.88k|            y_hmask[1][sidx] &= ~smask;
  348|  7.88k|            y_hmask[0][sidx] &= ~smask;
  349|  7.88k|            y_hmask[imin(idx, lpf_y[y - starty4])][sidx] |= smask;
  350|  7.88k|        }
  351|       |
  352|    370|        if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (352:13): [True: 224, False: 146]
  ------------------
  353|    224|            uint16_t (*const uv_hmask)[2] = lflvl[x].filter_uv[0][cbx4];
  354|  4.98k|            for (unsigned y = starty4 >> ss_ver, uv_mask = 1 << y; y < uv_endy4;
  ------------------
  |  Branch (354:68): [True: 4.76k, False: 224]
  ------------------
  355|  4.76k|                 y++, uv_mask <<= 1)
  356|  4.76k|            {
  357|  4.76k|                const int sidx = uv_mask >= vmax;
  358|  4.76k|                const unsigned smask = uv_mask >> (sidx << (4 - ss_ver));
  359|  4.76k|                const int idx = !!(uv_hmask[1][sidx] & smask);
  360|  4.76k|                uv_hmask[1][sidx] &= ~smask;
  361|  4.76k|                uv_hmask[0][sidx] &= ~smask;
  362|  4.76k|                uv_hmask[imin(idx, lpf_uv[y - (starty4 >> ss_ver)])][sidx] |= smask;
  363|  4.76k|            }
  364|    224|        }
  365|    370|        lpf_y  += halign;
  366|    370|        lpf_uv += halign >> ss_ver;
  367|    370|    }
  368|       |
  369|       |    // fix lpf strength at tile row boundaries
  370|  19.1k|    if (start_of_tile_row) {
  ------------------
  |  Branch (370:9): [True: 220, False: 18.8k]
  ------------------
  371|    220|        const BlockContext *a;
  372|    220|        for (x = 0, a = &f->a[f->sb128w * (start_of_tile_row - 1)];
  373|    700|             x < f->sb128w; x++, a++)
  ------------------
  |  Branch (373:14): [True: 480, False: 220]
  ------------------
  374|    480|        {
  375|    480|            uint16_t (*const y_vmask)[2] = lflvl[x].filter_y[1][starty4];
  376|    480|            const unsigned w = imin(32, f->w4 - (x << 5));
  377|  11.7k|            for (unsigned mask = 1, i = 0; i < w; mask <<= 1, i++) {
  ------------------
  |  Branch (377:44): [True: 11.3k, False: 480]
  ------------------
  378|  11.3k|                const int sidx = mask >= 0x10000U;
  379|  11.3k|                const unsigned smask = mask >> (sidx << 4);
  380|  11.3k|                const int idx = 2 * !!(y_vmask[2][sidx] & smask) +
  381|  11.3k|                                    !!(y_vmask[1][sidx] & smask);
  382|  11.3k|                y_vmask[2][sidx] &= ~smask;
  383|  11.3k|                y_vmask[1][sidx] &= ~smask;
  384|  11.3k|                y_vmask[0][sidx] &= ~smask;
  385|  11.3k|                y_vmask[imin(idx, a->tx_lpf_y[i])][sidx] |= smask;
  386|  11.3k|            }
  387|       |
  388|    480|            if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (388:17): [True: 368, False: 112]
  ------------------
  389|    368|                const unsigned cw = (w + ss_hor) >> ss_hor;
  390|    368|                uint16_t (*const uv_vmask)[2] = lflvl[x].filter_uv[1][starty4 >> ss_ver];
  391|  6.63k|                for (unsigned uv_mask = 1, i = 0; i < cw; uv_mask <<= 1, i++) {
  ------------------
  |  Branch (391:51): [True: 6.26k, False: 368]
  ------------------
  392|  6.26k|                    const int sidx = uv_mask >= hmax;
  393|  6.26k|                    const unsigned smask = uv_mask >> (sidx << (4 - ss_hor));
  394|  6.26k|                    const int idx = !!(uv_vmask[1][sidx] & smask);
  395|  6.26k|                    uv_vmask[1][sidx] &= ~smask;
  396|  6.26k|                    uv_vmask[0][sidx] &= ~smask;
  397|  6.26k|                    uv_vmask[imin(idx, a->tx_lpf_uv[i])][sidx] |= smask;
  398|  6.26k|                }
  399|    368|            }
  400|    480|        }
  401|    220|    }
  402|       |
  403|  19.1k|    pixel *ptr;
  404|  19.1k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  405|  50.4k|    for (ptr = p[0], have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (405:44): [True: 31.3k, False: 19.1k]
  ------------------
  406|  31.3k|         x++, have_left = 1, ptr += 128, level_ptr += 32)
  407|  31.3k|    {
  408|  31.3k|        filter_plane_cols_y(f, have_left, level_ptr, f->b4_stride,
  409|  31.3k|                            lflvl[x].filter_y[0], ptr, f->cur.stride[0],
  410|  31.3k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  411|  31.3k|    }
  412|       |
  413|  19.1k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (413:9): [True: 3.30k, False: 15.8k]
  |  Branch (413:46): [True: 2.94k, False: 359]
  ------------------
  414|  2.94k|        return;
  415|       |
  416|  16.1k|    ptrdiff_t uv_off;
  417|  16.1k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  418|  40.8k|    for (uv_off = 0, have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (418:44): [True: 24.6k, False: 16.1k]
  ------------------
  419|  24.6k|         x++, have_left = 1, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  420|  24.6k|    {
  421|  24.6k|        filter_plane_cols_uv(f, have_left, level_ptr, f->b4_stride,
  422|  24.6k|                             lflvl[x].filter_uv[0],
  423|  24.6k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  424|  24.6k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  425|  24.6k|                             starty4 >> ss_ver, uv_endy4, ss_ver);
  426|  24.6k|    }
  427|  16.1k|}
dav1d_loopfilter_sbrow_rows_8bpc:
  432|  19.1k|{
  433|  19.1k|    int x;
  434|       |    // Don't filter outside the frame
  435|  19.1k|    const int have_top = sby > 0;
  436|  19.1k|    const int is_sb64 = !f->seq_hdr->sb128;
  437|  19.1k|    const int starty4 = (sby & is_sb64) << 4;
  438|  19.1k|    const int sbsz = 32 >> is_sb64;
  439|  19.1k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  440|  19.1k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  441|  19.1k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  442|  19.1k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  443|       |
  444|  19.1k|    pixel *ptr;
  445|  19.1k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  446|  50.4k|    for (ptr = p[0], x = 0; x < f->sb128w; x++, ptr += 128, level_ptr += 32) {
  ------------------
  |  Branch (446:29): [True: 31.3k, False: 19.1k]
  ------------------
  447|  31.3k|        filter_plane_rows_y(f, have_top, level_ptr, f->b4_stride,
  448|  31.3k|                            lflvl[x].filter_y[1], ptr, f->cur.stride[0],
  449|  31.3k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  450|  31.3k|    }
  451|       |
  452|  19.1k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (452:9): [True: 3.30k, False: 15.8k]
  |  Branch (452:46): [True: 2.94k, False: 359]
  ------------------
  453|  2.94k|        return;
  454|       |
  455|  16.1k|    ptrdiff_t uv_off;
  456|  16.1k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  457|  40.8k|    for (uv_off = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (457:29): [True: 24.6k, False: 16.1k]
  ------------------
  458|  24.6k|         x++, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  459|  24.6k|    {
  460|  24.6k|        filter_plane_rows_uv(f, have_top, level_ptr, f->b4_stride,
  461|  24.6k|                             lflvl[x].filter_uv[1],
  462|  24.6k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  463|  24.6k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  464|  24.6k|                             starty4 >> ss_ver, uv_endy4, ss_hor);
  465|  24.6k|    }
  466|  16.1k|}
lf_apply_tmpl.c:backup_lpf:
   47|  92.8k|{
   48|  92.8k|    const int cdef_backup = !lr_backup;
   49|  92.8k|    const int dst_w = f->frame_hdr->super_res.enabled ?
  ------------------
  |  Branch (49:23): [True: 24.1k, False: 68.7k]
  ------------------
   50|  68.7k|                      (f->frame_hdr->width[1] + ss_hor) >> ss_hor : src_w;
   51|       |
   52|       |    // The first stripe of the frame is shorter by 8 luma pixel rows.
   53|  92.8k|    int stripe_h = ((64 << (cdef_backup & sb128)) - 8 * !row) >> ss_ver;
   54|  92.8k|    src += (stripe_h - 2) * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  92.8k|#define PXSTRIDE(x) (x)
  ------------------
   55|       |
   56|  92.8k|    if (f->c->n_tc == 1) {
  ------------------
  |  Branch (56:9): [True: 92.8k, False: 0]
  ------------------
   57|  92.8k|        if (row) {
  ------------------
  |  Branch (57:13): [True: 72.7k, False: 20.0k]
  ------------------
   58|  72.7k|            const int top = 4 << sb128;
   59|       |            // Copy the top part of the stored loop filtered pixels from the
   60|       |            // previous sb row needed above the first stripe of this sb row.
   61|  72.7k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  0],
  ------------------
  |  |   47|  72.7k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  0],
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   62|  72.7k|                       &dst[PXSTRIDE(dst_stride) *  top],      dst_w);
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   63|  72.7k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  1],
  ------------------
  |  |   47|  72.7k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  1],
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   64|  72.7k|                       &dst[PXSTRIDE(dst_stride) * (top + 1)], dst_w);
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   65|  72.7k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  2],
  ------------------
  |  |   47|  72.7k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  2],
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   66|  72.7k|                       &dst[PXSTRIDE(dst_stride) * (top + 2)], dst_w);
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   67|  72.7k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  3],
  ------------------
  |  |   47|  72.7k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  3],
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   68|  72.7k|                       &dst[PXSTRIDE(dst_stride) * (top + 3)], dst_w);
  ------------------
  |  |   53|  72.7k|#define PXSTRIDE(x) (x)
  ------------------
   69|  72.7k|        }
   70|  92.8k|        dst += 4 * PXSTRIDE(dst_stride);
  ------------------
  |  |   53|  92.8k|#define PXSTRIDE(x) (x)
  ------------------
   71|  92.8k|    }
   72|       |
   73|  92.8k|    if (lr_backup && (f->frame_hdr->width[0] != f->frame_hdr->width[1])) {
  ------------------
  |  Branch (73:9): [True: 92.8k, False: 0]
  |  Branch (73:22): [True: 10.4k, False: 82.4k]
  ------------------
   74|  25.3k|        while (row + stripe_h <= row_h) {
  ------------------
  |  Branch (74:16): [True: 14.9k, False: 10.4k]
  ------------------
   75|  14.9k|            const int n_lines = 4 - (row + stripe_h + 1 == h);
   76|  14.9k|            f->dsp->mc.resize(dst, dst_stride, src, src_stride,
   77|  14.9k|                              dst_w, n_lines, src_w, f->resize_step[ss_hor],
   78|  14.9k|                              f->resize_start[ss_hor] HIGHBD_CALL_SUFFIX);
   79|  14.9k|            row += stripe_h; // unmodified stripe_h for the 1st stripe
   80|  14.9k|            stripe_h = 64 >> ss_ver;
   81|  14.9k|            src += stripe_h * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  14.9k|#define PXSTRIDE(x) (x)
  ------------------
   82|  14.9k|            dst += n_lines * PXSTRIDE(dst_stride);
  ------------------
  |  |   53|  14.9k|#define PXSTRIDE(x) (x)
  ------------------
   83|  14.9k|            if (n_lines == 3) {
  ------------------
  |  Branch (83:17): [True: 120, False: 14.7k]
  ------------------
   84|    120|                pixel_copy(dst, &dst[-PXSTRIDE(dst_stride)], dst_w);
  ------------------
  |  |   47|    120|#define pixel_copy memcpy
  ------------------
                              pixel_copy(dst, &dst[-PXSTRIDE(dst_stride)], dst_w);
  ------------------
  |  |   53|    120|#define PXSTRIDE(x) (x)
  ------------------
   85|    120|                dst += PXSTRIDE(dst_stride);
  ------------------
  |  |   53|    120|#define PXSTRIDE(x) (x)
  ------------------
   86|    120|            }
   87|  14.9k|        }
   88|  82.4k|    } else {
   89|   177k|        while (row + stripe_h <= row_h) {
  ------------------
  |  Branch (89:16): [True: 94.7k, False: 82.4k]
  ------------------
   90|  94.7k|            const int n_lines = 4 - (row + stripe_h + 1 == h);
   91|   473k|            for (int i = 0; i < 4; i++) {
  ------------------
  |  Branch (91:29): [True: 378k, False: 94.7k]
  ------------------
   92|   378k|                pixel_copy(dst, i == n_lines ? &dst[-PXSTRIDE(dst_stride)] :
  ------------------
  |  |   47|   378k|#define pixel_copy memcpy
  ------------------
                              pixel_copy(dst, i == n_lines ? &dst[-PXSTRIDE(dst_stride)] :
  ------------------
  |  |   53|    336|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (92:33): [True: 336, False: 378k]
  ------------------
   93|   378k|                                               src, src_w);
   94|   378k|                dst += PXSTRIDE(dst_stride);
  ------------------
  |  |   53|   378k|#define PXSTRIDE(x) (x)
  ------------------
   95|   378k|                src += PXSTRIDE(src_stride);
  ------------------
  |  |   53|   378k|#define PXSTRIDE(x) (x)
  ------------------
   96|   378k|            }
   97|  94.7k|            row += stripe_h; // unmodified stripe_h for the 1st stripe
   98|  94.7k|            stripe_h = 64 >> ss_ver;
   99|  94.7k|            src += (stripe_h - 4) * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  94.7k|#define PXSTRIDE(x) (x)
  ------------------
  100|  94.7k|        }
  101|  82.4k|    }
  102|  92.8k|}
lf_apply_tmpl.c:filter_plane_cols_y:
  184|  88.7k|{
  185|  88.7k|    const Dav1dDSPContext *const dsp = f->dsp;
  186|       |
  187|       |    // filter edges between columns (e.g. block1 | block2)
  188|  2.01M|    for (int x = 0; x < w; x++) {
  ------------------
  |  Branch (188:21): [True: 1.92M, False: 88.7k]
  ------------------
  189|  1.92M|        if (!have_left && !x) continue;
  ------------------
  |  Branch (189:13): [True: 577k, False: 1.35M]
  |  Branch (189:27): [True: 43.2k, False: 534k]
  ------------------
  190|  1.88M|        uint32_t hmask[4];
  191|  1.88M|        if (!starty4) {
  ------------------
  |  Branch (191:13): [True: 1.40M, False: 484k]
  ------------------
  192|  1.40M|            hmask[0] = mask[x][0][0];
  193|  1.40M|            hmask[1] = mask[x][1][0];
  194|  1.40M|            hmask[2] = mask[x][2][0];
  195|  1.40M|            if (endy4 > 16) {
  ------------------
  |  Branch (195:17): [True: 607k, False: 792k]
  ------------------
  196|   607k|                hmask[0] |= (unsigned) mask[x][0][1] << 16;
  197|   607k|                hmask[1] |= (unsigned) mask[x][1][1] << 16;
  198|   607k|                hmask[2] |= (unsigned) mask[x][2][1] << 16;
  199|   607k|            }
  200|  1.40M|        } else {
  201|   484k|            hmask[0] = mask[x][0][1];
  202|   484k|            hmask[1] = mask[x][1][1];
  203|   484k|            hmask[2] = mask[x][2][1];
  204|   484k|        }
  205|  1.88M|        hmask[3] = 0;
  206|  1.88M|        dsp->lf.loop_filter_sb[0][0](&dst[x * 4], ls, hmask,
  207|  1.88M|                                     (const uint8_t(*)[4]) &lvl[x][0], b4_stride,
  208|  1.88M|                                     &f->lf.lim_lut, endy4 - starty4 HIGHBD_CALL_SUFFIX);
  209|  1.88M|    }
  210|  88.7k|}
lf_apply_tmpl.c:filter_plane_cols_uv:
  251|  70.2k|{
  252|  70.2k|    const Dav1dDSPContext *const dsp = f->dsp;
  253|       |
  254|       |    // filter edges between columns (e.g. block1 | block2)
  255|  1.38M|    for (int x = 0; x < w; x++) {
  ------------------
  |  Branch (255:21): [True: 1.31M, False: 70.2k]
  ------------------
  256|  1.31M|        if (!have_left && !x) continue;
  ------------------
  |  Branch (256:13): [True: 430k, False: 888k]
  |  Branch (256:27): [True: 34.7k, False: 395k]
  ------------------
  257|  1.28M|        uint32_t hmask[3];
  258|  1.28M|        if (!starty4) {
  ------------------
  |  Branch (258:13): [True: 967k, False: 316k]
  ------------------
  259|   967k|            hmask[0] = mask[x][0][0];
  260|   967k|            hmask[1] = mask[x][1][0];
  261|   967k|            if (endy4 > (16 >> ss_ver)) {
  ------------------
  |  Branch (261:17): [True: 444k, False: 523k]
  ------------------
  262|   444k|                hmask[0] |= (unsigned) mask[x][0][1] << (16 >> ss_ver);
  263|   444k|                hmask[1] |= (unsigned) mask[x][1][1] << (16 >> ss_ver);
  264|   444k|            }
  265|   967k|        } else {
  266|   316k|            hmask[0] = mask[x][0][1];
  267|   316k|            hmask[1] = mask[x][1][1];
  268|   316k|        }
  269|  1.28M|        hmask[2] = 0;
  270|  1.28M|        dsp->lf.loop_filter_sb[1][0](&u[x * 4], ls, hmask,
  271|  1.28M|                                     (const uint8_t(*)[4]) &lvl[x][2], b4_stride,
  272|  1.28M|                                     &f->lf.lim_lut, endy4 - starty4 HIGHBD_CALL_SUFFIX);
  273|  1.28M|        dsp->lf.loop_filter_sb[1][0](&v[x * 4], ls, hmask,
  274|  1.28M|                                     (const uint8_t(*)[4]) &lvl[x][3], b4_stride,
  275|  1.28M|                                     &f->lf.lim_lut, endy4 - starty4 HIGHBD_CALL_SUFFIX);
  276|  1.28M|    }
  277|  70.2k|}
lf_apply_tmpl.c:filter_plane_rows_y:
  220|  88.7k|{
  221|  88.7k|    const Dav1dDSPContext *const dsp = f->dsp;
  222|       |
  223|       |    //                                 block1
  224|       |    // filter edges between rows (e.g. ------)
  225|       |    //                                 block2
  226|  1.74M|    for (int y = starty4; y < endy4;
  ------------------
  |  Branch (226:27): [True: 1.65M, False: 88.7k]
  ------------------
  227|  1.65M|         y++, dst += 4 * PXSTRIDE(ls), lvl += b4_stride)
  ------------------
  |  |   53|  1.65M|#define PXSTRIDE(x) (x)
  ------------------
  228|  1.65M|    {
  229|  1.65M|        if (!have_top && !y) continue;
  ------------------
  |  Branch (229:13): [True: 339k, False: 1.31M]
  |  Branch (229:26): [True: 24.5k, False: 314k]
  ------------------
  230|  1.63M|        const uint32_t vmask[4] = {
  231|  1.63M|            mask[y][0][0] | ((unsigned) mask[y][0][1] << 16),
  232|  1.63M|            mask[y][1][0] | ((unsigned) mask[y][1][1] << 16),
  233|  1.63M|            mask[y][2][0] | ((unsigned) mask[y][2][1] << 16),
  234|  1.63M|            0,
  235|  1.63M|        };
  236|  1.63M|        dsp->lf.loop_filter_sb[0][1](dst, ls, vmask,
  237|  1.63M|                                     (const uint8_t(*)[4]) &lvl[0][1], b4_stride,
  238|  1.63M|                                     &f->lf.lim_lut, w HIGHBD_CALL_SUFFIX);
  239|  1.63M|    }
  240|  88.7k|}
lf_apply_tmpl.c:filter_plane_rows_uv:
  288|  70.2k|{
  289|  70.2k|    const Dav1dDSPContext *const dsp = f->dsp;
  290|  70.2k|    ptrdiff_t off_l = 0;
  291|       |
  292|       |    //                                 block1
  293|       |    // filter edges between rows (e.g. ------)
  294|       |    //                                 block2
  295|  1.25M|    for (int y = starty4; y < endy4;
  ------------------
  |  Branch (295:27): [True: 1.18M, False: 70.2k]
  ------------------
  296|  1.18M|         y++, off_l += 4 * PXSTRIDE(ls), lvl += b4_stride)
  ------------------
  |  |   53|  1.18M|#define PXSTRIDE(x) (x)
  ------------------
  297|  1.18M|    {
  298|  1.18M|        if (!have_top && !y) continue;
  ------------------
  |  Branch (298:13): [True: 188k, False: 992k]
  |  Branch (298:26): [True: 19.3k, False: 168k]
  ------------------
  299|  1.16M|        const uint32_t vmask[3] = {
  300|  1.16M|            mask[y][0][0] | ((unsigned) mask[y][0][1] << (16 >> ss_hor)),
  301|  1.16M|            mask[y][1][0] | ((unsigned) mask[y][1][1] << (16 >> ss_hor)),
  302|  1.16M|            0,
  303|  1.16M|        };
  304|  1.16M|        dsp->lf.loop_filter_sb[1][1](&u[off_l], ls, vmask,
  305|  1.16M|                                     (const uint8_t(*)[4]) &lvl[0][2], b4_stride,
  306|  1.16M|                                     &f->lf.lim_lut, w HIGHBD_CALL_SUFFIX);
  307|  1.16M|        dsp->lf.loop_filter_sb[1][1](&v[off_l], ls, vmask,
  308|  1.16M|                                     (const uint8_t(*)[4]) &lvl[0][3], b4_stride,
  309|  1.16M|                                     &f->lf.lim_lut, w HIGHBD_CALL_SUFFIX);
  310|  1.16M|    }
  311|  70.2k|}
dav1d_copy_lpf_16bpc:
  106|  24.7k|{
  107|  24.7k|    const int have_tt = f->c->n_tc > 1;
  108|  24.7k|    const int resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
  109|  24.7k|    const int offset = 8 * !!sby;
  110|  24.7k|    const ptrdiff_t *const src_stride = f->cur.stride;
  111|  24.7k|    const ptrdiff_t *const lr_stride = f->sr_cur.p.stride;
  112|  24.7k|    const int tt_off = have_tt * sby * (4 << f->seq_hdr->sb128);
  113|  24.7k|    pixel *const dst[3] = {
  114|  24.7k|        f->lf.lr_lpf_line[0] + tt_off * PXSTRIDE(lr_stride[0]),
  115|  24.7k|        f->lf.lr_lpf_line[1] + tt_off * PXSTRIDE(lr_stride[1]),
  116|  24.7k|        f->lf.lr_lpf_line[2] + tt_off * PXSTRIDE(lr_stride[1])
  117|  24.7k|    };
  118|       |
  119|       |    // TODO Also check block level restore type to reduce copying.
  120|  24.7k|    const int restore_planes = f->lf.restore_planes;
  121|       |
  122|  24.7k|    if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (122:9): [True: 21.6k, False: 3.15k]
  |  Branch (122:29): [True: 2.07k, False: 1.07k]
  ------------------
  123|  23.6k|        const int h = f->cur.p.h;
  124|  23.6k|        const int w = f->bw << 2;
  125|  23.6k|        const int row_h = imin((sby + 1) << (6 + f->seq_hdr->sb128), h - 1);
  126|  23.6k|        const int y_stripe = (sby << (6 + f->seq_hdr->sb128)) - offset;
  127|  23.6k|        if (restore_planes & LR_RESTORE_Y || !resize)
  ------------------
  |  Branch (127:13): [True: 7.97k, False: 15.7k]
  |  Branch (127:46): [True: 13.4k, False: 2.22k]
  ------------------
  128|  21.4k|            backup_lpf(f, dst[0], lr_stride[0],
  129|  21.4k|                       src[0] - offset * PXSTRIDE(src_stride[0]), src_stride[0],
  130|  21.4k|                       0, f->seq_hdr->sb128, y_stripe, row_h, w, h, 0, 1);
  131|  23.6k|        if (have_tt && resize) {
  ------------------
  |  Branch (131:13): [True: 0, False: 23.6k]
  |  Branch (131:24): [True: 0, False: 0]
  ------------------
  132|      0|            const ptrdiff_t cdef_off_y = sby * 4 * PXSTRIDE(src_stride[0]);
  133|      0|            backup_lpf(f, f->lf.cdef_lpf_line[0] + cdef_off_y, src_stride[0],
  134|      0|                       src[0] - offset * PXSTRIDE(src_stride[0]), src_stride[0],
  135|      0|                       0, f->seq_hdr->sb128, y_stripe, row_h, w, h, 0, 0);
  136|      0|        }
  137|  23.6k|    }
  138|  24.7k|    if ((f->seq_hdr->cdef || restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) &&
  ------------------
  |  Branch (138:10): [True: 21.6k, False: 3.15k]
  |  Branch (138:30): [True: 2.51k, False: 639]
  ------------------
  139|  24.1k|        f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400)
  ------------------
  |  Branch (139:9): [True: 19.7k, False: 4.34k]
  ------------------
  140|  19.7k|    {
  141|  19.7k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  142|  19.7k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  143|  19.7k|        const int h = (f->cur.p.h + ss_ver) >> ss_ver;
  144|  19.7k|        const int w = f->bw << (2 - ss_hor);
  145|  19.7k|        const int row_h = imin((sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128), h - 1);
  146|  19.7k|        const int offset_uv = offset >> ss_ver;
  147|  19.7k|        const int y_stripe = (sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
  148|  19.7k|        const ptrdiff_t cdef_off_uv = sby * 4 * PXSTRIDE(src_stride[1]);
  149|  19.7k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_U) {
  ------------------
  |  Branch (149:13): [True: 17.2k, False: 2.51k]
  |  Branch (149:33): [True: 1.86k, False: 646]
  ------------------
  150|  19.1k|            if (restore_planes & LR_RESTORE_U || !resize)
  ------------------
  |  Branch (150:17): [True: 6.37k, False: 12.7k]
  |  Branch (150:50): [True: 11.0k, False: 1.75k]
  ------------------
  151|  17.3k|                backup_lpf(f, dst[1], lr_stride[1],
  152|  17.3k|                           src[1] - offset_uv * PXSTRIDE(src_stride[1]),
  153|  17.3k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  154|  17.3k|                           row_h, w, h, ss_hor, 1);
  155|  19.1k|            if (have_tt && resize)
  ------------------
  |  Branch (155:17): [True: 0, False: 19.1k]
  |  Branch (155:28): [True: 0, False: 0]
  ------------------
  156|      0|                backup_lpf(f, f->lf.cdef_lpf_line[1] + cdef_off_uv, src_stride[1],
  157|      0|                           src[1] - offset_uv * PXSTRIDE(src_stride[1]),
  158|      0|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  159|      0|                           row_h, w, h, ss_hor, 0);
  160|  19.1k|        }
  161|  19.7k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_V) {
  ------------------
  |  Branch (161:13): [True: 17.2k, False: 2.51k]
  |  Branch (161:33): [True: 1.69k, False: 818]
  ------------------
  162|  18.9k|            if (restore_planes & LR_RESTORE_V || !resize)
  ------------------
  |  Branch (162:17): [True: 6.24k, False: 12.7k]
  |  Branch (162:50): [True: 11.0k, False: 1.68k]
  ------------------
  163|  17.2k|                backup_lpf(f, dst[2], lr_stride[1],
  164|  17.2k|                           src[2] - offset_uv * PXSTRIDE(src_stride[1]),
  165|  17.2k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  166|  17.2k|                           row_h, w, h, ss_hor, 1);
  167|  18.9k|            if (have_tt && resize)
  ------------------
  |  Branch (167:17): [True: 0, False: 18.9k]
  |  Branch (167:28): [True: 0, False: 0]
  ------------------
  168|      0|                backup_lpf(f, f->lf.cdef_lpf_line[2] + cdef_off_uv, src_stride[1],
  169|      0|                           src[2] - offset_uv * PXSTRIDE(src_stride[1]),
  170|      0|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  171|      0|                           row_h, w, h, ss_hor, 0);
  172|  18.9k|        }
  173|  19.7k|    }
  174|  24.7k|}
dav1d_loopfilter_sbrow_cols_16bpc:
  316|  24.1k|{
  317|  24.1k|    int x, have_left;
  318|       |    // Don't filter outside the frame
  319|  24.1k|    const int is_sb64 = !f->seq_hdr->sb128;
  320|  24.1k|    const int starty4 = (sby & is_sb64) << 4;
  321|  24.1k|    const int sbsz = 32 >> is_sb64;
  322|  24.1k|    const int sbl2 = 5 - is_sb64;
  323|  24.1k|    const int halign = (f->bh + 31) & ~31;
  324|  24.1k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  325|  24.1k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  326|  24.1k|    const int vmask = 16 >> ss_ver, hmask = 16 >> ss_hor;
  327|  24.1k|    const unsigned vmax = 1U << vmask, hmax = 1U << hmask;
  328|  24.1k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  329|  24.1k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  330|       |
  331|       |    // fix lpf strength at tile col boundaries
  332|  24.1k|    const uint8_t *lpf_y = &f->lf.tx_lpf_right_edge[0][sby << sbl2];
  333|  24.1k|    const uint8_t *lpf_uv = &f->lf.tx_lpf_right_edge[1][sby << (sbl2 - ss_ver)];
  334|  24.7k|    for (int tile_col = 1;; tile_col++) {
  335|  24.7k|        x = f->frame_hdr->tiling.col_start_sb[tile_col];
  336|  24.7k|        if ((x << sbl2) >= f->bw) break;
  ------------------
  |  Branch (336:13): [True: 24.1k, False: 630]
  ------------------
  337|    630|        const int bx4 = x & is_sb64 ? 16 : 0, cbx4 = bx4 >> ss_hor;
  ------------------
  |  Branch (337:25): [True: 160, False: 470]
  ------------------
  338|    630|        x >>= is_sb64;
  339|       |
  340|    630|        uint16_t (*const y_hmask)[2] = lflvl[x].filter_y[0][bx4];
  341|  13.9k|        for (unsigned y = starty4, mask = 1 << y; y < endy4; y++, mask <<= 1) {
  ------------------
  |  Branch (341:51): [True: 13.3k, False: 630]
  ------------------
  342|  13.3k|            const int sidx = mask >= 0x10000U;
  343|  13.3k|            const unsigned smask = mask >> (sidx << 4);
  344|  13.3k|            const int idx = 2 * !!(y_hmask[2][sidx] & smask) +
  345|  13.3k|                                !!(y_hmask[1][sidx] & smask);
  346|  13.3k|            y_hmask[2][sidx] &= ~smask;
  347|  13.3k|            y_hmask[1][sidx] &= ~smask;
  348|  13.3k|            y_hmask[0][sidx] &= ~smask;
  349|  13.3k|            y_hmask[imin(idx, lpf_y[y - starty4])][sidx] |= smask;
  350|  13.3k|        }
  351|       |
  352|    630|        if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (352:13): [True: 518, False: 112]
  ------------------
  353|    518|            uint16_t (*const uv_hmask)[2] = lflvl[x].filter_uv[0][cbx4];
  354|  9.86k|            for (unsigned y = starty4 >> ss_ver, uv_mask = 1 << y; y < uv_endy4;
  ------------------
  |  Branch (354:68): [True: 9.34k, False: 518]
  ------------------
  355|  9.34k|                 y++, uv_mask <<= 1)
  356|  9.34k|            {
  357|  9.34k|                const int sidx = uv_mask >= vmax;
  358|  9.34k|                const unsigned smask = uv_mask >> (sidx << (4 - ss_ver));
  359|  9.34k|                const int idx = !!(uv_hmask[1][sidx] & smask);
  360|  9.34k|                uv_hmask[1][sidx] &= ~smask;
  361|  9.34k|                uv_hmask[0][sidx] &= ~smask;
  362|  9.34k|                uv_hmask[imin(idx, lpf_uv[y - (starty4 >> ss_ver)])][sidx] |= smask;
  363|  9.34k|            }
  364|    518|        }
  365|    630|        lpf_y  += halign;
  366|    630|        lpf_uv += halign >> ss_ver;
  367|    630|    }
  368|       |
  369|       |    // fix lpf strength at tile row boundaries
  370|  24.1k|    if (start_of_tile_row) {
  ------------------
  |  Branch (370:9): [True: 241, False: 23.9k]
  ------------------
  371|    241|        const BlockContext *a;
  372|    241|        for (x = 0, a = &f->a[f->sb128w * (start_of_tile_row - 1)];
  373|    728|             x < f->sb128w; x++, a++)
  ------------------
  |  Branch (373:14): [True: 487, False: 241]
  ------------------
  374|    487|        {
  375|    487|            uint16_t (*const y_vmask)[2] = lflvl[x].filter_y[1][starty4];
  376|    487|            const unsigned w = imin(32, f->w4 - (x << 5));
  377|  12.0k|            for (unsigned mask = 1, i = 0; i < w; mask <<= 1, i++) {
  ------------------
  |  Branch (377:44): [True: 11.5k, False: 487]
  ------------------
  378|  11.5k|                const int sidx = mask >= 0x10000U;
  379|  11.5k|                const unsigned smask = mask >> (sidx << 4);
  380|  11.5k|                const int idx = 2 * !!(y_vmask[2][sidx] & smask) +
  381|  11.5k|                                    !!(y_vmask[1][sidx] & smask);
  382|  11.5k|                y_vmask[2][sidx] &= ~smask;
  383|  11.5k|                y_vmask[1][sidx] &= ~smask;
  384|  11.5k|                y_vmask[0][sidx] &= ~smask;
  385|  11.5k|                y_vmask[imin(idx, a->tx_lpf_y[i])][sidx] |= smask;
  386|  11.5k|            }
  387|       |
  388|    487|            if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (388:17): [True: 329, False: 158]
  ------------------
  389|    329|                const unsigned cw = (w + ss_hor) >> ss_hor;
  390|    329|                uint16_t (*const uv_vmask)[2] = lflvl[x].filter_uv[1][starty4 >> ss_ver];
  391|  6.97k|                for (unsigned uv_mask = 1, i = 0; i < cw; uv_mask <<= 1, i++) {
  ------------------
  |  Branch (391:51): [True: 6.64k, False: 329]
  ------------------
  392|  6.64k|                    const int sidx = uv_mask >= hmax;
  393|  6.64k|                    const unsigned smask = uv_mask >> (sidx << (4 - ss_hor));
  394|  6.64k|                    const int idx = !!(uv_vmask[1][sidx] & smask);
  395|  6.64k|                    uv_vmask[1][sidx] &= ~smask;
  396|  6.64k|                    uv_vmask[0][sidx] &= ~smask;
  397|  6.64k|                    uv_vmask[imin(idx, a->tx_lpf_uv[i])][sidx] |= smask;
  398|  6.64k|                }
  399|    329|            }
  400|    487|        }
  401|    241|    }
  402|       |
  403|  24.1k|    pixel *ptr;
  404|  24.1k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  405|  81.5k|    for (ptr = p[0], have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (405:44): [True: 57.4k, False: 24.1k]
  ------------------
  406|  57.4k|         x++, have_left = 1, ptr += 128, level_ptr += 32)
  407|  57.4k|    {
  408|  57.4k|        filter_plane_cols_y(f, have_left, level_ptr, f->b4_stride,
  409|  57.4k|                            lflvl[x].filter_y[0], ptr, f->cur.stride[0],
  410|  57.4k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  411|  57.4k|    }
  412|       |
  413|  24.1k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (413:9): [True: 6.00k, False: 18.1k]
  |  Branch (413:46): [True: 5.51k, False: 492]
  ------------------
  414|  5.51k|        return;
  415|       |
  416|  18.6k|    ptrdiff_t uv_off;
  417|  18.6k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  418|  64.2k|    for (uv_off = 0, have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (418:44): [True: 45.5k, False: 18.6k]
  ------------------
  419|  45.5k|         x++, have_left = 1, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  420|  45.5k|    {
  421|  45.5k|        filter_plane_cols_uv(f, have_left, level_ptr, f->b4_stride,
  422|  45.5k|                             lflvl[x].filter_uv[0],
  423|  45.5k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  424|  45.5k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  425|  45.5k|                             starty4 >> ss_ver, uv_endy4, ss_ver);
  426|  45.5k|    }
  427|  18.6k|}
dav1d_loopfilter_sbrow_rows_16bpc:
  432|  24.1k|{
  433|  24.1k|    int x;
  434|       |    // Don't filter outside the frame
  435|  24.1k|    const int have_top = sby > 0;
  436|  24.1k|    const int is_sb64 = !f->seq_hdr->sb128;
  437|  24.1k|    const int starty4 = (sby & is_sb64) << 4;
  438|  24.1k|    const int sbsz = 32 >> is_sb64;
  439|  24.1k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  440|  24.1k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  441|  24.1k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  442|  24.1k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  443|       |
  444|  24.1k|    pixel *ptr;
  445|  24.1k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  446|  81.5k|    for (ptr = p[0], x = 0; x < f->sb128w; x++, ptr += 128, level_ptr += 32) {
  ------------------
  |  Branch (446:29): [True: 57.4k, False: 24.1k]
  ------------------
  447|  57.4k|        filter_plane_rows_y(f, have_top, level_ptr, f->b4_stride,
  448|  57.4k|                            lflvl[x].filter_y[1], ptr, f->cur.stride[0],
  449|  57.4k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  450|  57.4k|    }
  451|       |
  452|  24.1k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (452:9): [True: 6.00k, False: 18.1k]
  |  Branch (452:46): [True: 5.51k, False: 492]
  ------------------
  453|  5.51k|        return;
  454|       |
  455|  18.6k|    ptrdiff_t uv_off;
  456|  18.6k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  457|  64.2k|    for (uv_off = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (457:29): [True: 45.5k, False: 18.6k]
  ------------------
  458|  45.5k|         x++, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  459|  45.5k|    {
  460|  45.5k|        filter_plane_rows_uv(f, have_top, level_ptr, f->b4_stride,
  461|  45.5k|                             lflvl[x].filter_uv[1],
  462|  45.5k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  463|  45.5k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  464|  45.5k|                             starty4 >> ss_ver, uv_endy4, ss_hor);
  465|  45.5k|    }
  466|  18.6k|}

dav1d_create_lf_mask_intra:
  271|  1.44M|{
  272|  1.44M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  273|  1.44M|    const int bw4 = imin(iw - bx, b_dim[0]);
  274|  1.44M|    const int bh4 = imin(ih - by, b_dim[1]);
  275|  1.44M|    const int bx4 = bx & 31;
  276|  1.44M|    const int by4 = by & 31;
  277|  1.44M|    assert(bw4 >= 0 && bh4 >= 0);
  ------------------
  |  |  140|  2.89M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 1.44M, False: 0]
  |  |  |  Branch (140:30): [True: 1.44M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 1.44M]
  |  |  ------------------
  ------------------
  278|       |
  279|  1.44M|    if (bw4 && bh4) {
  ------------------
  |  Branch (279:9): [True: 1.44M, False: 5.84k]
  |  Branch (279:16): [True: 1.42M, False: 12.0k]
  ------------------
  280|  1.42M|        uint8_t (*level_cache_ptr)[4] = level_cache + by * b4_stride + bx;
  281|  6.95M|        for (int y = 0; y < bh4; y++) {
  ------------------
  |  Branch (281:25): [True: 5.53M, False: 1.42M]
  ------------------
  282|  45.6M|            for (int x = 0; x < bw4; x++) {
  ------------------
  |  Branch (282:29): [True: 40.1M, False: 5.53M]
  ------------------
  283|  40.1M|                level_cache_ptr[x][0] = filter_level[0][0][0];
  284|  40.1M|                level_cache_ptr[x][1] = filter_level[1][0][0];
  285|  40.1M|            }
  286|  5.53M|            level_cache_ptr += b4_stride;
  287|  5.53M|        }
  288|       |
  289|  1.42M|        mask_edges_intra(lflvl->filter_y, by4, bx4, bw4, bh4, ytx, ay, ly);
  290|  1.42M|    }
  291|       |
  292|  1.44M|    if (!auv) return;
  ------------------
  |  Branch (292:9): [True: 123k, False: 1.32M]
  ------------------
  293|       |
  294|  1.32M|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
  295|  1.32M|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
  296|  1.32M|    const int cbw4 = imin(((iw + ss_hor) >> ss_hor) - (bx >> ss_hor),
  297|  1.32M|                          (b_dim[0] + ss_hor) >> ss_hor);
  298|  1.32M|    const int cbh4 = imin(((ih + ss_ver) >> ss_ver) - (by >> ss_ver),
  299|  1.32M|                          (b_dim[1] + ss_ver) >> ss_ver);
  300|  1.32M|    assert(cbw4 >= 0 && cbh4 >= 0);
  ------------------
  |  |  140|  2.64M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 1.32M, False: 0]
  |  |  |  Branch (140:30): [True: 1.32M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 1.32M]
  |  |  ------------------
  ------------------
  301|       |
  302|  1.32M|    if (!cbw4 || !cbh4) return;
  ------------------
  |  Branch (302:9): [True: 4.33k, False: 1.31M]
  |  Branch (302:18): [True: 5.02k, False: 1.31M]
  ------------------
  303|       |
  304|  1.31M|    const int cbx4 = bx4 >> ss_hor;
  305|  1.31M|    const int cby4 = by4 >> ss_ver;
  306|       |
  307|  1.31M|    uint8_t (*level_cache_ptr)[4] =
  308|  1.31M|        level_cache + (by >> ss_ver) * b4_stride + (bx >> ss_hor);
  309|  5.85M|    for (int y = 0; y < cbh4; y++) {
  ------------------
  |  Branch (309:21): [True: 4.54M, False: 1.31M]
  ------------------
  310|  31.9M|        for (int x = 0; x < cbw4; x++) {
  ------------------
  |  Branch (310:25): [True: 27.3M, False: 4.54M]
  ------------------
  311|  27.3M|            level_cache_ptr[x][2] = filter_level[2][0][0];
  312|  27.3M|            level_cache_ptr[x][3] = filter_level[3][0][0];
  313|  27.3M|        }
  314|  4.54M|        level_cache_ptr += b4_stride;
  315|  4.54M|    }
  316|       |
  317|  1.31M|    mask_edges_chroma(lflvl->filter_uv, cby4, cbx4, cbw4, cbh4, 0, uvtx,
  318|  1.31M|                      auv, luv, ss_hor, ss_ver);
  319|  1.31M|}
dav1d_create_lf_mask_inter:
  334|  61.5k|{
  335|  61.5k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  336|  61.5k|    const int bw4 = imin(iw - bx, b_dim[0]);
  337|  61.5k|    const int bh4 = imin(ih - by, b_dim[1]);
  338|  61.5k|    const int bx4 = bx & 31;
  339|  61.5k|    const int by4 = by & 31;
  340|  61.5k|    assert(bw4 >= 0 && bh4 >= 0);
  ------------------
  |  |  140|   123k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 61.5k, False: 0]
  |  |  |  Branch (140:30): [True: 61.5k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 61.5k]
  |  |  ------------------
  ------------------
  341|       |
  342|  61.5k|    if (bw4 && bh4) {
  ------------------
  |  Branch (342:9): [True: 60.3k, False: 1.18k]
  |  Branch (342:16): [True: 59.2k, False: 1.07k]
  ------------------
  343|  59.2k|        uint8_t (*level_cache_ptr)[4] = level_cache + by * b4_stride + bx;
  344|   295k|        for (int y = 0; y < bh4; y++) {
  ------------------
  |  Branch (344:25): [True: 235k, False: 59.2k]
  ------------------
  345|  1.57M|            for (int x = 0; x < bw4; x++) {
  ------------------
  |  Branch (345:29): [True: 1.34M, False: 235k]
  ------------------
  346|  1.34M|                level_cache_ptr[x][0] = filter_level[0][0][0];
  347|  1.34M|                level_cache_ptr[x][1] = filter_level[1][0][0];
  348|  1.34M|            }
  349|   235k|            level_cache_ptr += b4_stride;
  350|   235k|        }
  351|       |
  352|  59.2k|        mask_edges_inter(lflvl->filter_y, by4, bx4, bw4, bh4, skip,
  353|  59.2k|                         max_ytx, tx_masks, ay, ly);
  354|  59.2k|    }
  355|       |
  356|  61.5k|    if (!auv) return;
  ------------------
  |  Branch (356:9): [True: 41.9k, False: 19.6k]
  ------------------
  357|       |
  358|  19.6k|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
  359|  19.6k|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
  360|  19.6k|    const int cbw4 = imin(((iw + ss_hor) >> ss_hor) - (bx >> ss_hor),
  361|  19.6k|                          (b_dim[0] + ss_hor) >> ss_hor);
  362|  19.6k|    const int cbh4 = imin(((ih + ss_ver) >> ss_ver) - (by >> ss_ver),
  363|  19.6k|                          (b_dim[1] + ss_ver) >> ss_ver);
  364|  19.6k|    assert(cbw4 >= 0 && cbh4 >= 0);
  ------------------
  |  |  140|  39.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 19.6k, False: 0]
  |  |  |  Branch (140:30): [True: 19.6k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 19.6k]
  |  |  ------------------
  ------------------
  365|       |
  366|  19.6k|    if (!cbw4 || !cbh4) return;
  ------------------
  |  Branch (366:9): [True: 143, False: 19.4k]
  |  Branch (366:18): [True: 557, False: 18.9k]
  ------------------
  367|       |
  368|  18.9k|    const int cbx4 = bx4 >> ss_hor;
  369|  18.9k|    const int cby4 = by4 >> ss_ver;
  370|       |
  371|  18.9k|    uint8_t (*level_cache_ptr)[4] =
  372|  18.9k|        level_cache + (by >> ss_ver) * b4_stride + (bx >> ss_hor);
  373|  71.0k|    for (int y = 0; y < cbh4; y++) {
  ------------------
  |  Branch (373:21): [True: 52.1k, False: 18.9k]
  ------------------
  374|   243k|        for (int x = 0; x < cbw4; x++) {
  ------------------
  |  Branch (374:25): [True: 191k, False: 52.1k]
  ------------------
  375|   191k|            level_cache_ptr[x][2] = filter_level[2][0][0];
  376|   191k|            level_cache_ptr[x][3] = filter_level[3][0][0];
  377|   191k|        }
  378|  52.1k|        level_cache_ptr += b4_stride;
  379|  52.1k|    }
  380|       |
  381|  18.9k|    mask_edges_chroma(lflvl->filter_uv, cby4, cbx4, cbw4, cbh4, skip, uvtx,
  382|  18.9k|                      auv, luv, ss_hor, ss_ver);
  383|  18.9k|}
dav1d_calc_eih:
  385|  14.4k|void dav1d_calc_eih(Av1FilterLUT *const lim_lut, const int filter_sharpness) {
  386|       |    // set E/I/H values from loopfilter level
  387|  14.4k|    const int sharp = filter_sharpness;
  388|   938k|    for (int level = 0; level < 64; level++) {
  ------------------
  |  Branch (388:25): [True: 924k, False: 14.4k]
  ------------------
  389|   924k|        int limit = level;
  390|       |
  391|   924k|        if (sharp > 0) {
  ------------------
  |  Branch (391:13): [True: 459k, False: 464k]
  ------------------
  392|   459k|            limit >>= (sharp + 3) >> 2;
  393|   459k|            limit = imin(limit, 9 - sharp);
  394|   459k|        }
  395|   924k|        limit = imax(limit, 1);
  396|       |
  397|   924k|        lim_lut->i[level] = limit;
  398|   924k|        lim_lut->e[level] = 2 * (level + 2) + limit;
  399|   924k|    }
  400|  14.4k|    lim_lut->sharp[0] = (sharp + 3) >> 2;
  401|  14.4k|    lim_lut->sharp[1] = sharp ? 9 - sharp : 0xff;
  ------------------
  |  Branch (401:25): [True: 7.17k, False: 7.26k]
  ------------------
  402|  14.4k|}
dav1d_calc_lf_values:
  441|  28.0k|{
  442|  28.0k|    const int n_seg = hdr->segmentation.enabled ? 8 : 1;
  ------------------
  |  Branch (442:23): [True: 11.9k, False: 16.0k]
  ------------------
  443|       |
  444|  28.0k|    if (!hdr->loopfilter.level_y[0] && !hdr->loopfilter.level_y[1]) {
  ------------------
  |  Branch (444:9): [True: 7.92k, False: 20.0k]
  |  Branch (444:40): [True: 5.97k, False: 1.95k]
  ------------------
  445|  5.97k|        memset(lflvl_values, 0, sizeof(*lflvl_values) * n_seg);
  446|  5.97k|        return;
  447|  5.97k|    }
  448|       |
  449|  22.0k|    const Dav1dLoopfilterModeRefDeltas *const mr_deltas =
  450|  22.0k|        hdr->loopfilter.mode_ref_delta_enabled ?
  ------------------
  |  Branch (450:9): [True: 9.35k, False: 12.6k]
  ------------------
  451|  22.0k|        &hdr->loopfilter.mode_ref_deltas : NULL;
  452|   119k|    for (int s = 0; s < n_seg; s++) {
  ------------------
  |  Branch (452:21): [True: 97.8k, False: 22.0k]
  ------------------
  453|  97.8k|        const Dav1dSegmentationData *const segd =
  454|  97.8k|            hdr->segmentation.enabled ? &hdr->segmentation.seg_data.d[s] : NULL;
  ------------------
  |  Branch (454:13): [True: 86.6k, False: 11.2k]
  ------------------
  455|       |
  456|  97.8k|        calc_lf_value(lflvl_values[s][0], hdr->loopfilter.level_y[0],
  457|  97.8k|                      lf_delta[0], segd ? segd->delta_lf_y_v : 0, mr_deltas);
  ------------------
  |  Branch (457:36): [True: 86.6k, False: 11.2k]
  ------------------
  458|  97.8k|        calc_lf_value(lflvl_values[s][1], hdr->loopfilter.level_y[1],
  459|  97.8k|                      lf_delta[hdr->delta.lf.multi ? 1 : 0],
  ------------------
  |  Branch (459:32): [True: 52.4k, False: 45.3k]
  ------------------
  460|  97.8k|                      segd ? segd->delta_lf_y_h : 0, mr_deltas);
  ------------------
  |  Branch (460:23): [True: 86.6k, False: 11.2k]
  ------------------
  461|  97.8k|        calc_lf_value_chroma(lflvl_values[s][2], hdr->loopfilter.level_u,
  462|  97.8k|                             lf_delta[hdr->delta.lf.multi ? 2 : 0],
  ------------------
  |  Branch (462:39): [True: 52.4k, False: 45.3k]
  ------------------
  463|  97.8k|                             segd ? segd->delta_lf_u : 0, mr_deltas);
  ------------------
  |  Branch (463:30): [True: 86.6k, False: 11.2k]
  ------------------
  464|  97.8k|        calc_lf_value_chroma(lflvl_values[s][3], hdr->loopfilter.level_v,
  465|  97.8k|                             lf_delta[hdr->delta.lf.multi ? 3 : 0],
  ------------------
  |  Branch (465:39): [True: 52.4k, False: 45.3k]
  ------------------
  466|  97.8k|                             segd ? segd->delta_lf_v : 0, mr_deltas);
  ------------------
  |  Branch (466:30): [True: 86.6k, False: 11.2k]
  ------------------
  467|  97.8k|    }
  468|  22.0k|}
lf_mask.c:mask_edges_intra:
  152|  1.42M|{
  153|  1.42M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
  154|  1.42M|    const int twl4 = t_dim->lw, thl4 = t_dim->lh;
  155|  1.42M|    const int twl4c = imin(2, twl4), thl4c = imin(2, thl4);
  156|  1.42M|    int y, x;
  157|       |
  158|       |    // left block edge
  159|  1.42M|    unsigned mask = 1U << by4;
  160|  6.95M|    for (y = 0; y < h4; y++, mask <<= 1) {
  ------------------
  |  Branch (160:17): [True: 5.53M, False: 1.42M]
  ------------------
  161|  5.53M|        const int sidx = mask >= 0x10000;
  162|  5.53M|        const unsigned smask = mask >> (sidx << 4);
  163|  5.53M|        masks[0][bx4][imin(twl4c, l[y])][sidx] |= smask;
  164|  5.53M|    }
  165|       |
  166|       |    // top block edge
  167|  6.92M|    for (x = 0, mask = 1U << bx4; x < w4; x++, mask <<= 1) {
  ------------------
  |  Branch (167:35): [True: 5.49M, False: 1.42M]
  ------------------
  168|  5.49M|        const int sidx = mask >= 0x10000;
  169|  5.49M|        const unsigned smask = mask >> (sidx << 4);
  170|  5.49M|        masks[1][by4][imin(thl4c, a[x])][sidx] |= smask;
  171|  5.49M|    }
  172|       |
  173|       |    // inner (tx) left|right edges
  174|  1.42M|    const int hstep = t_dim->w;
  175|  1.42M|    unsigned t = 1U << by4;
  176|  1.42M|    unsigned inner = (unsigned) ((((uint64_t) t) << h4) - t);
  177|  1.42M|    unsigned inner1 = inner & 0xffff, inner2 = inner >> 16;
  178|  1.64M|    for (x = hstep; x < w4; x += hstep) {
  ------------------
  |  Branch (178:21): [True: 218k, False: 1.42M]
  ------------------
  179|   218k|        if (inner1) masks[0][bx4 + x][twl4c][0] |= inner1;
  ------------------
  |  Branch (179:13): [True: 146k, False: 71.8k]
  ------------------
  180|   218k|        if (inner2) masks[0][bx4 + x][twl4c][1] |= inner2;
  ------------------
  |  Branch (180:13): [True: 101k, False: 117k]
  ------------------
  181|   218k|    }
  182|       |
  183|       |    //            top
  184|       |    // inner (tx) --- edges
  185|       |    //           bottom
  186|  1.42M|    const int vstep = t_dim->h;
  187|  1.42M|    t = 1U << bx4;
  188|  1.42M|    inner = (unsigned) ((((uint64_t) t) << w4) - t);
  189|  1.42M|    inner1 = inner & 0xffff;
  190|  1.42M|    inner2 = inner >> 16;
  191|  1.66M|    for (y = vstep; y < h4; y += vstep) {
  ------------------
  |  Branch (191:21): [True: 235k, False: 1.42M]
  ------------------
  192|   235k|        if (inner1) masks[1][by4 + y][thl4c][0] |= inner1;
  ------------------
  |  Branch (192:13): [True: 161k, False: 73.7k]
  ------------------
  193|   235k|        if (inner2) masks[1][by4 + y][thl4c][1] |= inner2;
  ------------------
  |  Branch (193:13): [True: 101k, False: 134k]
  ------------------
  194|   235k|    }
  195|       |
  196|  1.42M|    dav1d_memset_likely_pow2(a, thl4c, w4);
  197|  1.42M|    dav1d_memset_likely_pow2(l, twl4c, h4);
  198|  1.42M|}
lf_mask.c:mask_edges_chroma:
  207|  1.33M|{
  208|  1.33M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
  209|  1.33M|    const int twl4 = t_dim->lw, thl4 = t_dim->lh;
  210|  1.33M|    const int twl4c = !!twl4, thl4c = !!thl4;
  211|  1.33M|    int y, x;
  212|  1.33M|    const int vbits = 4 - ss_ver, hbits = 4 - ss_hor;
  213|  1.33M|    const int vmask = 16 >> ss_ver, hmask = 16 >> ss_hor;
  214|  1.33M|    const unsigned vmax = 1 << vmask, hmax = 1 << hmask;
  215|       |
  216|       |    // left block edge
  217|  1.33M|    unsigned mask = 1U << cby4;
  218|  5.92M|    for (y = 0; y < ch4; y++, mask <<= 1) {
  ------------------
  |  Branch (218:17): [True: 4.59M, False: 1.33M]
  ------------------
  219|  4.59M|        const int sidx = mask >= vmax;
  220|  4.59M|        const unsigned smask = mask >> (sidx << vbits);
  221|  4.59M|        masks[0][cbx4][imin(twl4c, l[y])][sidx] |= smask;
  222|  4.59M|    }
  223|       |
  224|       |    // top block edge
  225|  5.85M|    for (x = 0, mask = 1U << cbx4; x < cw4; x++, mask <<= 1) {
  ------------------
  |  Branch (225:36): [True: 4.51M, False: 1.33M]
  ------------------
  226|  4.51M|        const int sidx = mask >= hmax;
  227|  4.51M|        const unsigned smask = mask >> (sidx << hbits);
  228|  4.51M|        masks[1][cby4][imin(thl4c, a[x])][sidx] |= smask;
  229|  4.51M|    }
  230|       |
  231|  1.33M|    if (!skip_inter) {
  ------------------
  |  Branch (231:9): [True: 1.32M, False: 9.37k]
  ------------------
  232|       |        // inner (tx) left|right edges
  233|  1.32M|        const int hstep = t_dim->w;
  234|  1.32M|        unsigned t = 1U << cby4;
  235|  1.32M|        unsigned inner = (unsigned) ((((uint64_t) t) << ch4) - t);
  236|  1.32M|        unsigned inner1 = inner & ((1 << vmask) - 1), inner2 = inner >> vmask;
  237|  1.38M|        for (x = hstep; x < cw4; x += hstep) {
  ------------------
  |  Branch (237:25): [True: 64.6k, False: 1.32M]
  ------------------
  238|  64.6k|            if (inner1) masks[0][cbx4 + x][twl4c][0] |= inner1;
  ------------------
  |  Branch (238:17): [True: 53.7k, False: 10.9k]
  ------------------
  239|  64.6k|            if (inner2) masks[0][cbx4 + x][twl4c][1] |= inner2;
  ------------------
  |  Branch (239:17): [True: 41.5k, False: 23.1k]
  ------------------
  240|  64.6k|        }
  241|       |
  242|       |        //            top
  243|       |        // inner (tx) --- edges
  244|       |        //           bottom
  245|  1.32M|        const int vstep = t_dim->h;
  246|  1.32M|        t = 1U << cbx4;
  247|  1.32M|        inner = (unsigned) ((((uint64_t) t) << cw4) - t);
  248|  1.32M|        inner1 = inner & ((1 << hmask) - 1), inner2 = inner >> hmask;
  249|  1.40M|        for (y = vstep; y < ch4; y += vstep) {
  ------------------
  |  Branch (249:25): [True: 86.5k, False: 1.32M]
  ------------------
  250|  86.5k|            if (inner1) masks[1][cby4 + y][thl4c][0] |= inner1;
  ------------------
  |  Branch (250:17): [True: 70.9k, False: 15.6k]
  ------------------
  251|  86.5k|            if (inner2) masks[1][cby4 + y][thl4c][1] |= inner2;
  ------------------
  |  Branch (251:17): [True: 46.3k, False: 40.2k]
  ------------------
  252|  86.5k|        }
  253|  1.32M|    }
  254|       |
  255|  1.33M|    dav1d_memset_likely_pow2(a, thl4c, cw4);
  256|  1.33M|    dav1d_memset_likely_pow2(l, twl4c, ch4);
  257|  1.33M|}
lf_mask.c:mask_edges_inter:
   85|  59.2k|{
   86|  59.2k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[max_tx];
   87|  59.2k|    int y, x;
   88|       |
   89|  59.2k|    ALIGN_STK_16(uint8_t, txa, 2 /* edge */, [2 /* txsz, step */][32 /* y */][32 /* x */]);
  ------------------
  |  |  100|  59.2k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  59.2k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
   90|   121k|    for (int y_off = 0, y = 0; y < h4; y += t_dim->h, y_off++)
  ------------------
  |  Branch (90:32): [True: 61.9k, False: 59.2k]
  ------------------
   91|   136k|        for (int x_off = 0, x = 0; x < w4; x += t_dim->w, x_off++)
  ------------------
  |  Branch (91:36): [True: 74.8k, False: 61.9k]
  ------------------
   92|  74.8k|            decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][y][x],
   93|  74.8k|                      max_tx, 0, y_off, x_off, tx_masks);
   94|       |
   95|       |    // left block edge
   96|  59.2k|    unsigned mask = 1U << by4;
   97|   295k|    for (y = 0; y < h4; y++, mask <<= 1) {
  ------------------
  |  Branch (97:17): [True: 235k, False: 59.2k]
  ------------------
   98|   235k|        const int sidx = mask >= 0x10000;
   99|   235k|        const unsigned smask = mask >> (sidx << 4);
  100|   235k|        masks[0][bx4][imin(txa[0][0][y][0], l[y])][sidx] |= smask;
  101|   235k|    }
  102|       |
  103|       |    // top block edge
  104|   267k|    for (x = 0, mask = 1U << bx4; x < w4; x++, mask <<= 1) {
  ------------------
  |  Branch (104:35): [True: 208k, False: 59.2k]
  ------------------
  105|   208k|        const int sidx = mask >= 0x10000;
  106|   208k|        const unsigned smask = mask >> (sidx << 4);
  107|   208k|        masks[1][by4][imin(txa[1][0][0][x], a[x])][sidx] |= smask;
  108|   208k|    }
  109|       |
  110|  59.2k|    if (!skip) {
  ------------------
  |  Branch (110:9): [True: 37.7k, False: 21.5k]
  ------------------
  111|       |        // inner (tx) left|right edges
  112|   177k|        for (y = 0, mask = 1U << by4; y < h4; y++, mask <<= 1) {
  ------------------
  |  Branch (112:39): [True: 139k, False: 37.7k]
  ------------------
  113|   139k|            const int sidx = mask >= 0x10000U;
  114|   139k|            const unsigned smask = mask >> (sidx << 4);
  115|   139k|            int ltx = txa[0][0][y][0];
  116|   139k|            int step = txa[0][1][y][0];
  117|   159k|            for (x = step; x < w4; x += step) {
  ------------------
  |  Branch (117:28): [True: 19.5k, False: 139k]
  ------------------
  118|  19.5k|                const int rtx = txa[0][0][y][x];
  119|  19.5k|                masks[0][bx4 + x][imin(rtx, ltx)][sidx] |= smask;
  120|  19.5k|                ltx = rtx;
  121|  19.5k|                step = txa[0][1][y][x];
  122|  19.5k|            }
  123|   139k|        }
  124|       |
  125|       |        //            top
  126|       |        // inner (tx) --- edges
  127|       |        //           bottom
  128|   180k|        for (x = 0, mask = 1U << bx4; x < w4; x++, mask <<= 1) {
  ------------------
  |  Branch (128:39): [True: 142k, False: 37.7k]
  ------------------
  129|   142k|            const int sidx = mask >= 0x10000U;
  130|   142k|            const unsigned smask = mask >> (sidx << 4);
  131|   142k|            int ttx = txa[1][0][0][x];
  132|   142k|            int step = txa[1][1][0][x];
  133|   164k|            for (y = step; y < h4; y += step) {
  ------------------
  |  Branch (133:28): [True: 21.8k, False: 142k]
  ------------------
  134|  21.8k|                const int btx = txa[1][0][y][x];
  135|  21.8k|                masks[1][by4 + y][imin(ttx, btx)][sidx] |= smask;
  136|  21.8k|                ttx = btx;
  137|  21.8k|                step = txa[1][1][y][x];
  138|  21.8k|            }
  139|   142k|        }
  140|  37.7k|    }
  141|       |
  142|   295k|    for (y = 0; y < h4; y++)
  ------------------
  |  Branch (142:17): [True: 235k, False: 59.2k]
  ------------------
  143|   235k|        l[y] = txa[0][0][y][w4 - 1];
  144|  59.2k|    memcpy(a, txa[1][0][h4 - 1], w4);
  145|  59.2k|}
lf_mask.c:decomp_tx:
   44|  86.5k|{
   45|  86.5k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[from];
   46|  86.5k|    const int is_split = (from == (int) TX_4X4 || depth > 1) ? 0 :
  ------------------
  |  Branch (46:27): [True: 22.9k, False: 63.5k]
  |  Branch (46:51): [True: 2.69k, False: 60.8k]
  ------------------
   47|  86.5k|        (tx_masks[depth] >> (y_off * 4 + x_off)) & 1;
   48|       |
   49|  86.5k|    if (is_split) {
  ------------------
  |  Branch (49:9): [True: 3.76k, False: 82.7k]
  ------------------
   50|  3.76k|        const enum RectTxfmSize sub = t_dim->sub;
   51|  3.76k|        const int htw4 = t_dim->w >> 1, hth4 = t_dim->h >> 1;
   52|       |
   53|  3.76k|        decomp_tx(txa, sub, depth + 1, y_off * 2 + 0, x_off * 2 + 0, tx_masks);
   54|  3.76k|        if (t_dim->w >= t_dim->h)
  ------------------
  |  Branch (54:13): [True: 3.00k, False: 765]
  ------------------
   55|  3.00k|            decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][0][htw4],
   56|  3.00k|                      sub, depth + 1, y_off * 2 + 0, x_off * 2 + 1, tx_masks);
   57|  3.76k|        if (t_dim->h >= t_dim->w) {
  ------------------
  |  Branch (57:13): [True: 2.83k, False: 927]
  ------------------
   58|  2.83k|            decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][hth4][0],
   59|  2.83k|                      sub, depth + 1, y_off * 2 + 1, x_off * 2 + 0, tx_masks);
   60|  2.83k|            if (t_dim->w >= t_dim->h)
  ------------------
  |  Branch (60:17): [True: 2.07k, False: 765]
  ------------------
   61|  2.07k|                decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][hth4][htw4],
   62|  2.07k|                          sub, depth + 1, y_off * 2 + 1, x_off * 2 + 1, tx_masks);
   63|  2.83k|        }
   64|  82.7k|    } else {
   65|  82.7k|        const int lw = imin(2, t_dim->lw), lh = imin(2, t_dim->lh);
   66|       |
   67|  82.7k|#define set_ctx(rep_macro) \
   68|  82.7k|        for (int y = 0; y < t_dim->h; y++) { \
   69|  82.7k|            rep_macro(txa[0][0][y], 0, lw); \
   70|  82.7k|            rep_macro(txa[1][0][y], 0, lh); \
   71|  82.7k|            txa[0][1][y][0] = t_dim->w; \
   72|  82.7k|        }
   73|  82.7k|        case_set_upto16(t_dim->lw);
  ------------------
  |  |   80|  82.7k|    switch (var) { \
  |  |   81|  29.2k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  |   68|  71.4k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 42.1k, False: 29.2k]
  |  |  |  |  ------------------
  |  |  |  |   69|  42.1k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  42.1k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  42.1k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  42.1k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  42.1k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  42.1k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  42.1k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  42.1k|        }
  |  |  ------------------
  |  |  |  Branch (81:5): [True: 29.2k, False: 53.4k]
  |  |  ------------------
  |  |   82|  24.3k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  |   68|  98.3k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 74.0k, False: 24.3k]
  |  |  |  |  ------------------
  |  |  |  |   69|  74.0k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|  74.0k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  74.0k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  74.0k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|  74.0k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  74.0k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  74.0k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  74.0k|        }
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 24.3k, False: 58.4k]
  |  |  ------------------
  |  |   83|  18.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  |   68|  97.2k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 78.3k, False: 18.8k]
  |  |  |  |  ------------------
  |  |  |  |   69|  78.3k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|  78.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  78.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  78.3k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|  78.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  78.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  78.3k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  78.3k|        }
  |  |  ------------------
  |  |  |  Branch (83:5): [True: 18.8k, False: 63.8k]
  |  |  ------------------
  |  |   84|  5.55k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  |   68|  39.5k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 33.9k, False: 5.55k]
  |  |  |  |  ------------------
  |  |  |  |   69|  33.9k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  33.9k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  33.9k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  33.9k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  33.9k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  33.9k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  33.9k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  33.9k|        }
  |  |  ------------------
  |  |  |  Branch (84:5): [True: 5.55k, False: 77.1k]
  |  |  ------------------
  |  |   85|  4.71k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  |   68|  72.0k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 67.3k, False: 4.71k]
  |  |  |  |  ------------------
  |  |  |  |   69|  67.3k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  67.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  67.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  67.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  67.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 67.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  67.3k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  67.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  67.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  67.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  67.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 67.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  67.3k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  67.3k|        }
  |  |  ------------------
  |  |  |  Branch (85:5): [True: 4.71k, False: 78.0k]
  |  |  ------------------
  |  |   86|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (86:5): [True: 0, False: 82.7k]
  |  |  ------------------
  |  |   87|  82.7k|    }
  ------------------
   74|  82.7k|#undef set_ctx
   75|  82.7k|        dav1d_memset_pow2[t_dim->lw](txa[1][1][0], t_dim->h);
   76|  82.7k|    }
   77|  86.5k|}
lf_mask.c:calc_lf_value:
  408|   359k|{
  409|   359k|    const int base = iclip(iclip(base_lvl + lf_delta, 0, 63) + seg_delta, 0, 63);
  410|       |
  411|   359k|    if (!mr_delta) {
  ------------------
  |  Branch (411:9): [True: 188k, False: 171k]
  ------------------
  412|   188k|        memset(lflvl_values, base, sizeof(*lflvl_values) * 8);
  413|   188k|    } else {
  414|   171k|        const int sh = base >= 32;
  415|   171k|        lflvl_values[0][0] = lflvl_values[0][1] =
  416|   171k|            iclip(base + (mr_delta->ref_delta[0] * (1 << sh)), 0, 63);
  417|  1.37M|        for (int r = 1; r < 8; r++) {
  ------------------
  |  Branch (417:25): [True: 1.20M, False: 171k]
  ------------------
  418|  3.60M|            for (int m = 0; m < 2; m++) {
  ------------------
  |  Branch (418:29): [True: 2.40M, False: 1.20M]
  ------------------
  419|  2.40M|                const int delta =
  420|  2.40M|                    mr_delta->mode_delta[m] + mr_delta->ref_delta[r];
  421|  2.40M|                lflvl_values[r][m] = iclip(base + (delta * (1 << sh)), 0, 63);
  422|  2.40M|            }
  423|  1.20M|        }
  424|   171k|    }
  425|   359k|}
lf_mask.c:calc_lf_value_chroma:
  431|   195k|{
  432|   195k|    if (!base_lvl)
  ------------------
  |  Branch (432:9): [True: 31.4k, False: 164k]
  ------------------
  433|  31.4k|        memset(lflvl_values, 0, sizeof(*lflvl_values) * 8);
  434|   164k|    else
  435|   164k|        calc_lf_value(lflvl_values, base_lvl, lf_delta, seg_delta, mr_delta);
  436|   195k|}

dav1d_default_settings:
   71|  12.9k|COLD void dav1d_default_settings(Dav1dSettings *const s) {
   72|  12.9k|    s->n_threads = 0;
   73|  12.9k|    s->max_frame_delay = 0;
   74|  12.9k|    s->apply_grain = 1;
   75|  12.9k|    s->allocator.cookie = NULL;
   76|  12.9k|    s->allocator.alloc_picture_callback = dav1d_default_picture_alloc;
   77|  12.9k|    s->allocator.release_picture_callback = dav1d_default_picture_release;
   78|       |    s->logger.cookie = NULL;
   79|  12.9k|    s->logger.callback = dav1d_log_default_callback;
   80|  12.9k|    s->operating_point = 0;
   81|  12.9k|    s->all_layers = 1; // just until the tests are adjusted
   82|  12.9k|    s->frame_size_limit = 0;
   83|  12.9k|    s->strict_std_compliance = 0;
   84|  12.9k|    s->output_invisible_frames = 0;
   85|  12.9k|    s->inloop_filters = DAV1D_INLOOPFILTER_ALL;
   86|  12.9k|    s->decode_frame_type = DAV1D_DECODEFRAMETYPE_ALL;
   87|  12.9k|}
dav1d_open:
  138|  12.9k|COLD int dav1d_open(Dav1dContext **const c_out, const Dav1dSettings *const s) {
  139|  12.9k|    static pthread_once_t initted = PTHREAD_ONCE_INIT;
  140|  12.9k|    pthread_once(&initted, init_internal);
  141|       |
  142|  12.9k|    validate_input_or_ret(c_out != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  12.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 12.9k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  143|  12.9k|    validate_input_or_ret(s != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  12.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 12.9k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  144|  12.9k|    validate_input_or_ret(s->n_threads >= 0 &&
  ------------------
  |  |   52|  25.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  145|  12.9k|                          s->n_threads <= DAV1D_MAX_THREADS, DAV1D_ERR(EINVAL));
  146|  12.9k|    validate_input_or_ret(s->max_frame_delay >= 0 &&
  ------------------
  |  |   52|  25.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  147|  12.9k|                          s->max_frame_delay <= DAV1D_MAX_FRAME_DELAY, DAV1D_ERR(EINVAL));
  148|  12.9k|    validate_input_or_ret(s->allocator.alloc_picture_callback != NULL,
  ------------------
  |  |   52|  12.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 12.9k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  149|  12.9k|                          DAV1D_ERR(EINVAL));
  150|  12.9k|    validate_input_or_ret(s->allocator.release_picture_callback != NULL,
  ------------------
  |  |   52|  12.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 12.9k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  151|  12.9k|                          DAV1D_ERR(EINVAL));
  152|  12.9k|    validate_input_or_ret(s->operating_point >= 0 &&
  ------------------
  |  |   52|  25.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  153|  12.9k|                          s->operating_point <= 31, DAV1D_ERR(EINVAL));
  154|  12.9k|    validate_input_or_ret(s->decode_frame_type >= DAV1D_DECODEFRAMETYPE_ALL &&
  ------------------
  |  |   52|  25.9k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  |  Branch (52:11): [True: 12.9k, False: 0]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  155|  12.9k|                          s->decode_frame_type <= DAV1D_DECODEFRAMETYPE_KEY, DAV1D_ERR(EINVAL));
  156|       |
  157|  12.9k|    pthread_attr_t thread_attr;
  158|  12.9k|    if (pthread_attr_init(&thread_attr)) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (158:9): [True: 0, False: 12.9k]
  ------------------
  159|  12.9k|    size_t stack_size = 1024 * 1024 + get_stack_size_internal(&thread_attr);
  160|       |
  161|  12.9k|    pthread_attr_setstacksize(&thread_attr, stack_size);
  162|       |
  163|  12.9k|    Dav1dContext *const c = *c_out = dav1d_alloc_aligned(ALLOC_COMMON_CTX, sizeof(*c), 64);
  ------------------
  |  |  134|  12.9k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
  164|  12.9k|    if (!c) goto error;
  ------------------
  |  Branch (164:9): [True: 0, False: 12.9k]
  ------------------
  165|  12.9k|    memset(c, 0, sizeof(*c));
  166|       |
  167|  12.9k|    c->allocator = s->allocator;
  168|  12.9k|    c->logger = s->logger;
  169|  12.9k|    c->apply_grain = s->apply_grain;
  170|  12.9k|    c->operating_point = s->operating_point;
  171|  12.9k|    c->all_layers = s->all_layers;
  172|  12.9k|    c->frame_size_limit = s->frame_size_limit;
  173|  12.9k|    c->strict_std_compliance = s->strict_std_compliance;
  174|  12.9k|    c->output_invisible_frames = s->output_invisible_frames;
  175|  12.9k|    c->inloop_filters = s->inloop_filters;
  176|  12.9k|    c->decode_frame_type = s->decode_frame_type;
  177|       |
  178|  12.9k|    dav1d_data_props_set_defaults(&c->cached_error_props);
  179|       |
  180|  12.9k|    if (dav1d_mem_pool_init(ALLOC_OBU_HDR, &c->seq_hdr_pool) ||
  ------------------
  |  |  131|  25.9k|#define dav1d_mem_pool_init(type, pool) dav1d_mem_pool_init(pool)
  |  |  ------------------
  |  |  |  Branch (131:41): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
  181|  12.9k|        dav1d_mem_pool_init(ALLOC_OBU_HDR, &c->frame_hdr_pool) ||
  ------------------
  |  |  131|  25.9k|#define dav1d_mem_pool_init(type, pool) dav1d_mem_pool_init(pool)
  |  |  ------------------
  |  |  |  Branch (131:41): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
  182|  12.9k|        dav1d_mem_pool_init(ALLOC_SEGMAP, &c->segmap_pool) ||
  ------------------
  |  |  131|  25.9k|#define dav1d_mem_pool_init(type, pool) dav1d_mem_pool_init(pool)
  |  |  ------------------
  |  |  |  Branch (131:41): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
  183|  12.9k|        dav1d_mem_pool_init(ALLOC_REFMVS, &c->refmvs_pool) ||
  ------------------
  |  |  131|  25.9k|#define dav1d_mem_pool_init(type, pool) dav1d_mem_pool_init(pool)
  |  |  ------------------
  |  |  |  Branch (131:41): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
  184|  12.9k|        dav1d_mem_pool_init(ALLOC_PIC_CTX, &c->pic_ctx_pool) ||
  ------------------
  |  |  131|  25.9k|#define dav1d_mem_pool_init(type, pool) dav1d_mem_pool_init(pool)
  |  |  ------------------
  |  |  |  Branch (131:41): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
  185|  12.9k|        dav1d_mem_pool_init(ALLOC_CDF, &c->cdf_pool))
  ------------------
  |  |  131|  12.9k|#define dav1d_mem_pool_init(type, pool) dav1d_mem_pool_init(pool)
  |  |  ------------------
  |  |  |  Branch (131:41): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
  186|      0|    {
  187|      0|        goto error;
  188|      0|    }
  189|       |
  190|  12.9k|    if (c->allocator.alloc_picture_callback   == dav1d_default_picture_alloc &&
  ------------------
  |  Branch (190:9): [True: 12.9k, False: 0]
  ------------------
  191|  12.9k|        c->allocator.release_picture_callback == dav1d_default_picture_release)
  ------------------
  |  Branch (191:9): [True: 12.9k, False: 0]
  ------------------
  192|  12.9k|    {
  193|  12.9k|        if (c->allocator.cookie) goto error;
  ------------------
  |  Branch (193:13): [True: 0, False: 12.9k]
  ------------------
  194|  12.9k|        if (dav1d_mem_pool_init(ALLOC_PIC, &c->picture_pool)) goto error;
  ------------------
  |  |  131|  12.9k|#define dav1d_mem_pool_init(type, pool) dav1d_mem_pool_init(pool)
  |  |  ------------------
  |  |  |  Branch (131:41): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
  195|  12.9k|        c->allocator.cookie = c->picture_pool;
  196|  12.9k|    } else if (c->allocator.alloc_picture_callback   == dav1d_default_picture_alloc ||
  ------------------
  |  Branch (196:16): [True: 0, False: 0]
  ------------------
  197|      0|               c->allocator.release_picture_callback == dav1d_default_picture_release)
  ------------------
  |  Branch (197:16): [True: 0, False: 0]
  ------------------
  198|      0|    {
  199|      0|        goto error;
  200|      0|    }
  201|       |
  202|       |    /* On 32-bit systems extremely large frame sizes can cause overflows in
  203|       |     * dav1d_decode_frame() malloc size calculations. Prevent that from occuring
  204|       |     * by enforcing a maximum frame size limit, chosen to roughly correspond to
  205|       |     * the largest size possible to decode without exhausting virtual memory. */
  206|  12.9k|    if (sizeof(size_t) < 8 && s->frame_size_limit - 1 >= 8192 * 8192) {
  ------------------
  |  Branch (206:9): [Folded, False: 12.9k]
  |  Branch (206:31): [True: 0, False: 0]
  ------------------
  207|      0|        c->frame_size_limit = 8192 * 8192;
  208|      0|        if (s->frame_size_limit)
  ------------------
  |  Branch (208:13): [True: 0, False: 0]
  ------------------
  209|      0|            dav1d_log(c, "Frame size limit reduced from %u to %u.\n",
  ------------------
  |  |   39|      0|#define dav1d_log dav1d_log
  ------------------
  210|      0|                      s->frame_size_limit, c->frame_size_limit);
  211|      0|    }
  212|       |
  213|  12.9k|    c->flush = &c->flush_mem;
  214|  12.9k|    atomic_init(c->flush, 0);
  215|       |
  216|  12.9k|    get_num_threads(c, s, &c->n_tc, &c->n_fc);
  217|       |
  218|  12.9k|    c->fc = dav1d_alloc_aligned(ALLOC_THREAD_CTX, sizeof(*c->fc) * c->n_fc, 32);
  ------------------
  |  |  134|  12.9k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
  219|  12.9k|    if (!c->fc) goto error;
  ------------------
  |  Branch (219:9): [True: 0, False: 12.9k]
  ------------------
  220|  12.9k|    memset(c->fc, 0, sizeof(*c->fc) * c->n_fc);
  221|       |
  222|  12.9k|    c->tc = dav1d_alloc_aligned(ALLOC_THREAD_CTX, sizeof(*c->tc) * c->n_tc, 64);
  ------------------
  |  |  134|  12.9k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
  223|  12.9k|    if (!c->tc) goto error;
  ------------------
  |  Branch (223:9): [True: 0, False: 12.9k]
  ------------------
  224|  12.9k|    memset(c->tc, 0, sizeof(*c->tc) * c->n_tc);
  225|  12.9k|    if (c->n_tc > 1) {
  ------------------
  |  Branch (225:9): [True: 0, False: 12.9k]
  ------------------
  226|      0|        if (pthread_mutex_init(&c->task_thread.lock, NULL)) goto error;
  ------------------
  |  Branch (226:13): [True: 0, False: 0]
  ------------------
  227|      0|        if (pthread_cond_init(&c->task_thread.cond, NULL)) {
  ------------------
  |  Branch (227:13): [True: 0, False: 0]
  ------------------
  228|      0|            pthread_mutex_destroy(&c->task_thread.lock);
  229|      0|            goto error;
  230|      0|        }
  231|      0|        if (pthread_cond_init(&c->task_thread.delayed_fg.cond, NULL)) {
  ------------------
  |  Branch (231:13): [True: 0, False: 0]
  ------------------
  232|      0|            pthread_cond_destroy(&c->task_thread.cond);
  233|      0|            pthread_mutex_destroy(&c->task_thread.lock);
  234|      0|            goto error;
  235|      0|        }
  236|      0|        c->task_thread.cur = c->n_fc;
  237|      0|        atomic_init(&c->task_thread.reset_task_cur, UINT_MAX);
  238|      0|        atomic_init(&c->task_thread.cond_signaled, 0);
  239|      0|        c->task_thread.inited = 1;
  240|      0|    }
  241|       |
  242|  12.9k|    if (c->n_fc > 1) {
  ------------------
  |  Branch (242:9): [True: 0, False: 12.9k]
  ------------------
  243|      0|        const size_t out_delayed_sz = sizeof(*c->frame_thread.out_delayed) * c->n_fc;
  244|      0|        c->frame_thread.out_delayed =
  245|      0|            dav1d_malloc(ALLOC_THREAD_CTX, out_delayed_sz);
  ------------------
  |  |  132|      0|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
  246|      0|        if (!c->frame_thread.out_delayed) goto error;
  ------------------
  |  Branch (246:13): [True: 0, False: 0]
  ------------------
  247|      0|        memset(c->frame_thread.out_delayed, 0, out_delayed_sz);
  248|      0|    }
  249|  25.9k|    for (unsigned n = 0; n < c->n_fc; n++) {
  ------------------
  |  Branch (249:26): [True: 12.9k, False: 12.9k]
  ------------------
  250|  12.9k|        Dav1dFrameContext *const f = &c->fc[n];
  251|  12.9k|        if (c->n_tc > 1) {
  ------------------
  |  Branch (251:13): [True: 0, False: 12.9k]
  ------------------
  252|      0|            if (pthread_mutex_init(&f->task_thread.lock, NULL)) goto error;
  ------------------
  |  Branch (252:17): [True: 0, False: 0]
  ------------------
  253|      0|            if (pthread_cond_init(&f->task_thread.cond, NULL)) {
  ------------------
  |  Branch (253:17): [True: 0, False: 0]
  ------------------
  254|      0|                pthread_mutex_destroy(&f->task_thread.lock);
  255|      0|                goto error;
  256|      0|            }
  257|      0|            if (pthread_mutex_init(&f->task_thread.pending_tasks.lock, NULL)) {
  ------------------
  |  Branch (257:17): [True: 0, False: 0]
  ------------------
  258|      0|                pthread_cond_destroy(&f->task_thread.cond);
  259|      0|                pthread_mutex_destroy(&f->task_thread.lock);
  260|      0|                goto error;
  261|      0|            }
  262|      0|        }
  263|  12.9k|        f->c = c;
  264|  12.9k|        f->task_thread.ttd = &c->task_thread;
  265|  12.9k|        f->lf.last_sharpness = -1;
  266|  12.9k|    }
  267|       |
  268|  25.9k|    for (unsigned m = 0; m < c->n_tc; m++) {
  ------------------
  |  Branch (268:26): [True: 12.9k, False: 12.9k]
  ------------------
  269|  12.9k|        Dav1dTaskContext *const t = &c->tc[m];
  270|  12.9k|        t->f = &c->fc[0];
  271|  12.9k|        t->task_thread.ttd = &c->task_thread;
  272|  12.9k|        t->c = c;
  273|  12.9k|        memset(t->cf_16bpc, 0, sizeof(t->cf_16bpc));
  274|  12.9k|        if (c->n_tc > 1) {
  ------------------
  |  Branch (274:13): [True: 0, False: 12.9k]
  ------------------
  275|      0|            if (pthread_mutex_init(&t->task_thread.td.lock, NULL)) goto error;
  ------------------
  |  Branch (275:17): [True: 0, False: 0]
  ------------------
  276|      0|            if (pthread_cond_init(&t->task_thread.td.cond, NULL)) {
  ------------------
  |  Branch (276:17): [True: 0, False: 0]
  ------------------
  277|      0|                pthread_mutex_destroy(&t->task_thread.td.lock);
  278|      0|                goto error;
  279|      0|            }
  280|      0|            if (pthread_create(&t->task_thread.td.thread, &thread_attr, dav1d_worker_task, t)) {
  ------------------
  |  Branch (280:17): [True: 0, False: 0]
  ------------------
  281|      0|                pthread_cond_destroy(&t->task_thread.td.cond);
  282|      0|                pthread_mutex_destroy(&t->task_thread.td.lock);
  283|      0|                goto error;
  284|      0|            }
  285|      0|            t->task_thread.td.inited = 1;
  286|      0|        }
  287|  12.9k|    }
  288|  12.9k|    dav1d_pal_dsp_init(&c->pal_dsp);
  289|  12.9k|    dav1d_refmvs_dsp_init(&c->refmvs_dsp);
  290|       |
  291|  12.9k|    pthread_attr_destroy(&thread_attr);
  292|       |
  293|  12.9k|    return 0;
  294|       |
  295|      0|error:
  296|      0|    if (c) close_internal(c_out, 0);
  ------------------
  |  Branch (296:9): [True: 0, False: 0]
  ------------------
  297|      0|    pthread_attr_destroy(&thread_attr);
  298|      0|    return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  299|  12.9k|}
dav1d_send_data:
  437|  15.0k|{
  438|  15.0k|    validate_input_or_ret(c != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  15.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 15.0k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  439|  15.0k|    validate_input_or_ret(in != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  15.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 15.0k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  440|       |
  441|  15.0k|    if (in->data) {
  ------------------
  |  Branch (441:9): [True: 15.0k, False: 0]
  ------------------
  442|  15.0k|        validate_input_or_ret(in->sz > 0 && in->sz <= SIZE_MAX / 2, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  30.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:11): [True: 15.0k, False: 0]
  |  |  |  Branch (52:11): [True: 15.0k, False: 0]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  443|  15.0k|        c->drain = 0;
  444|  15.0k|    }
  445|  15.0k|    if (c->in.data)
  ------------------
  |  Branch (445:9): [True: 0, False: 15.0k]
  ------------------
  446|      0|        return DAV1D_ERR(EAGAIN);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  447|  15.0k|    dav1d_data_ref(&c->in, in);
  448|       |
  449|  15.0k|    int res = gen_picture(c);
  450|  15.0k|    if (!res)
  ------------------
  |  Branch (450:9): [True: 10.5k, False: 4.49k]
  ------------------
  451|  10.5k|        dav1d_data_unref_internal(in);
  452|       |
  453|  15.0k|    return res;
  454|  15.0k|}
dav1d_get_picture:
  457|  22.0k|{
  458|  22.0k|    validate_input_or_ret(c != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  22.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  459|  22.0k|    validate_input_or_ret(out != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  22.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  460|       |
  461|  22.0k|    const int drain = c->drain;
  462|  22.0k|    c->drain = 1;
  463|       |
  464|  22.0k|    int res = gen_picture(c);
  465|  22.0k|    if (res < 0)
  ------------------
  |  Branch (465:9): [True: 913, False: 21.0k]
  ------------------
  466|    913|        return res;
  467|       |
  468|  21.0k|    if (c->cached_error) {
  ------------------
  |  Branch (468:9): [True: 0, False: 21.0k]
  ------------------
  469|      0|        const int res = c->cached_error;
  470|      0|        c->cached_error = 0;
  471|      0|        return res;
  472|      0|    }
  473|       |
  474|  21.0k|    if (output_picture_ready(c, c->n_fc == 1))
  ------------------
  |  Branch (474:9): [True: 11.4k, False: 9.62k]
  ------------------
  475|  11.4k|        return output_image(c, out);
  476|       |
  477|  9.62k|    if (c->n_fc > 1 && drain)
  ------------------
  |  Branch (477:9): [True: 0, False: 9.62k]
  |  Branch (477:24): [True: 0, False: 0]
  ------------------
  478|      0|        return drain_picture(c, out);
  479|       |
  480|  9.62k|    return DAV1D_ERR(EAGAIN);
  ------------------
  |  |   56|  9.62k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  481|  9.62k|}
dav1d_apply_grain:
  485|    556|{
  486|    556|    validate_input_or_ret(c != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|    556|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 556]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  487|    556|    validate_input_or_ret(out != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|    556|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 556]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  488|    556|    validate_input_or_ret(in != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|    556|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 556]
  |  |  ------------------
  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  ------------------
  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|      0|                    #x, __func__); \
  |  |   55|      0|        debug_abort(); \
  |  |  ------------------
  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|        return r; \
  |  |   57|      0|    }
  ------------------
  489|       |
  490|    556|    if (!has_grain(in)) {
  ------------------
  |  Branch (490:9): [True: 0, False: 556]
  ------------------
  491|      0|        dav1d_picture_ref(out, in);
  492|      0|        return 0;
  493|      0|    }
  494|       |
  495|    556|    int res = dav1d_picture_alloc_copy(c, out, in->p.w, in);
  496|    556|    if (res < 0) goto error;
  ------------------
  |  Branch (496:9): [True: 0, False: 556]
  ------------------
  497|       |
  498|    556|    if (c->n_tc > 1) {
  ------------------
  |  Branch (498:9): [True: 0, False: 556]
  ------------------
  499|      0|        dav1d_task_delayed_fg(c, out, in);
  500|    556|    } else {
  501|    556|        switch (out->p.bpc) {
  502|      0|#if CONFIG_8BPC
  503|    318|        case 8:
  ------------------
  |  Branch (503:9): [True: 318, False: 238]
  ------------------
  504|    318|            dav1d_apply_grain_8bpc(&c->dsp[0].fg, out, in);
  505|    318|            break;
  506|      0|#endif
  507|      0|#if CONFIG_16BPC
  508|    186|        case 10:
  ------------------
  |  Branch (508:9): [True: 186, False: 370]
  ------------------
  509|    238|        case 12:
  ------------------
  |  Branch (509:9): [True: 52, False: 504]
  ------------------
  510|    238|            dav1d_apply_grain_16bpc(&c->dsp[(out->p.bpc >> 1) - 4].fg, out, in);
  511|    238|            break;
  512|      0|#endif
  513|      0|        default: abort();
  ------------------
  |  Branch (513:9): [True: 0, False: 556]
  ------------------
  514|    556|        }
  515|    556|    }
  516|       |
  517|    556|    return 0;
  518|       |
  519|      0|error:
  520|      0|    dav1d_picture_unref_internal(out);
  521|      0|    return res;
  522|    556|}
dav1d_flush:
  524|  12.9k|void dav1d_flush(Dav1dContext *const c) {
  525|  12.9k|    dav1d_data_unref_internal(&c->in);
  526|  12.9k|    if (c->out.p.frame_hdr)
  ------------------
  |  Branch (526:9): [True: 0, False: 12.9k]
  ------------------
  527|      0|        dav1d_thread_picture_unref(&c->out);
  528|  12.9k|    if (c->cache.p.frame_hdr)
  ------------------
  |  Branch (528:9): [True: 416, False: 12.5k]
  ------------------
  529|    416|        dav1d_thread_picture_unref(&c->cache);
  530|       |
  531|  12.9k|    c->drain = 0;
  532|  12.9k|    c->cached_error = 0;
  533|       |
  534|   116k|    for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (534:21): [True: 103k, False: 12.9k]
  ------------------
  535|   103k|        if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (535:13): [True: 66.2k, False: 37.5k]
  ------------------
  536|  66.2k|            dav1d_thread_picture_unref(&c->refs[i].p);
  537|   103k|        dav1d_ref_dec(&c->refs[i].segmap);
  538|   103k|        dav1d_ref_dec(&c->refs[i].refmvs);
  539|   103k|        dav1d_cdf_thread_unref(&c->cdf[i]);
  540|   103k|    }
  541|  12.9k|    c->frame_hdr = NULL;
  542|  12.9k|    c->seq_hdr = NULL;
  543|  12.9k|    dav1d_ref_dec(&c->seq_hdr_ref);
  544|       |
  545|  12.9k|    c->mastering_display = NULL;
  546|  12.9k|    c->content_light = NULL;
  547|  12.9k|    c->itut_t35 = NULL;
  548|  12.9k|    c->n_itut_t35 = 0;
  549|  12.9k|    dav1d_ref_dec(&c->mastering_display_ref);
  550|  12.9k|    dav1d_ref_dec(&c->content_light_ref);
  551|  12.9k|    dav1d_ref_dec(&c->itut_t35_ref);
  552|       |
  553|  12.9k|    dav1d_data_props_unref_internal(&c->cached_error_props);
  554|       |
  555|  12.9k|    if (c->n_fc == 1 && c->n_tc == 1) return;
  ------------------
  |  Branch (555:9): [True: 12.9k, False: 0]
  |  Branch (555:25): [True: 12.9k, False: 0]
  ------------------
  556|  12.9k|    atomic_store(c->flush, 1);
  557|       |
  558|      0|    if (c->n_tc > 1) {
  ------------------
  |  Branch (558:9): [True: 0, False: 0]
  ------------------
  559|      0|        pthread_mutex_lock(&c->task_thread.lock);
  560|       |        // stop running tasks in worker threads
  561|      0|        for (unsigned i = 0; i < c->n_tc; i++) {
  ------------------
  |  Branch (561:30): [True: 0, False: 0]
  ------------------
  562|      0|            Dav1dTaskContext *const tc = &c->tc[i];
  563|      0|            while (!tc->task_thread.flushed) {
  ------------------
  |  Branch (563:20): [True: 0, False: 0]
  ------------------
  564|      0|                pthread_cond_wait(&tc->task_thread.td.cond, &c->task_thread.lock);
  565|      0|            }
  566|      0|        }
  567|      0|        for (unsigned i = 0; i < c->n_fc; i++) {
  ------------------
  |  Branch (567:30): [True: 0, False: 0]
  ------------------
  568|      0|            c->fc[i].task_thread.task_head = NULL;
  569|      0|            c->fc[i].task_thread.task_tail = NULL;
  570|      0|            c->fc[i].task_thread.task_cur_prev = NULL;
  571|      0|            c->fc[i].task_thread.pending_tasks.head = NULL;
  572|      0|            c->fc[i].task_thread.pending_tasks.tail = NULL;
  573|      0|            atomic_init(&c->fc[i].task_thread.pending_tasks.merge, 0);
  574|      0|        }
  575|      0|        atomic_init(&c->task_thread.first, 0);
  576|      0|        c->task_thread.cur = c->n_fc;
  577|      0|        atomic_store(&c->task_thread.reset_task_cur, UINT_MAX);
  578|      0|        atomic_store(&c->task_thread.cond_signaled, 0);
  579|      0|        pthread_mutex_unlock(&c->task_thread.lock);
  580|      0|    }
  581|       |
  582|      0|    if (c->n_fc > 1) {
  ------------------
  |  Branch (582:9): [True: 0, False: 0]
  ------------------
  583|      0|        for (unsigned n = 0, next = c->frame_thread.next; n < c->n_fc; n++, next++) {
  ------------------
  |  Branch (583:59): [True: 0, False: 0]
  ------------------
  584|      0|            if (next == c->n_fc) next = 0;
  ------------------
  |  Branch (584:17): [True: 0, False: 0]
  ------------------
  585|      0|            Dav1dFrameContext *const f = &c->fc[next];
  586|      0|            dav1d_decode_frame_exit(f, -1);
  587|      0|            f->n_tile_data = 0;
  588|      0|            f->task_thread.retval = 0;
  589|      0|            f->task_thread.error = 0;
  590|      0|            Dav1dThreadPicture *out_delayed = &c->frame_thread.out_delayed[next];
  591|      0|            if (out_delayed->p.frame_hdr) {
  ------------------
  |  Branch (591:17): [True: 0, False: 0]
  ------------------
  592|      0|                dav1d_thread_picture_unref(out_delayed);
  593|      0|            }
  594|      0|        }
  595|      0|        c->frame_thread.next = 0;
  596|      0|    }
  597|       |    atomic_store(c->flush, 0);
  598|      0|}
dav1d_close:
  600|  12.9k|COLD void dav1d_close(Dav1dContext **const c_out) {
  601|  12.9k|    validate_input(c_out != NULL);
  ------------------
  |  |   59|  12.9k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|  12.9k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 12.9k]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   54|      0|                    #x, __func__); \
  |  |  |  |   55|      0|        debug_abort(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   56|      0|        return r; \
  |  |  |  |   57|      0|    }
  |  |  ------------------
  ------------------
  602|       |#if TRACK_HEAP_ALLOCATIONS
  603|       |    dav1d_log_alloc_stats(*c_out);
  604|       |#endif
  605|  12.9k|    close_internal(c_out, 1);
  606|  12.9k|}
dav1d_picture_unref:
  725|  18.9k|void dav1d_picture_unref(Dav1dPicture *const p) {
  726|  18.9k|    dav1d_picture_unref_internal(p);
  727|  18.9k|}
dav1d_data_wrap:
  738|  15.0k|{
  739|  15.0k|    return dav1d_data_wrap_internal(buf, ptr, sz, free_callback, user_data);
  740|  15.0k|}
dav1d_data_unref:
  754|  4.49k|void dav1d_data_unref(Dav1dData *const buf) {
  755|  4.49k|    dav1d_data_unref_internal(buf);
  756|  4.49k|}
lib.c:get_num_threads:
  109|  12.9k|{
  110|       |    /* ceil(sqrt(n)) */
  111|  12.9k|    static const uint8_t fc_lut[49] = {
  112|  12.9k|        1,                                     /*     1 */
  113|  12.9k|        2, 2, 2,                               /*  2- 4 */
  114|  12.9k|        3, 3, 3, 3, 3,                         /*  5- 9 */
  115|  12.9k|        4, 4, 4, 4, 4, 4, 4,                   /* 10-16 */
  116|  12.9k|        5, 5, 5, 5, 5, 5, 5, 5, 5,             /* 17-25 */
  117|  12.9k|        6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,       /* 26-36 */
  118|  12.9k|        7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, /* 37-49 */
  119|  12.9k|    };
  120|  12.9k|    *n_tc = s->n_threads ? s->n_threads :
  ------------------
  |  Branch (120:13): [True: 12.9k, False: 0]
  ------------------
  121|  12.9k|        iclip(dav1d_num_logical_processors(c), 1, DAV1D_MAX_THREADS);
  ------------------
  |  |   46|      0|#define DAV1D_MAX_THREADS 256
  ------------------
  122|  12.9k|    *n_fc = s->max_frame_delay ? umin(s->max_frame_delay, *n_tc) :
  ------------------
  |  Branch (122:13): [True: 12.9k, False: 0]
  ------------------
  123|  12.9k|            *n_tc < 50 ? fc_lut[*n_tc - 1] : 8; // min(8, ceil(sqrt(n)))
  ------------------
  |  Branch (123:13): [True: 0, False: 0]
  ------------------
  124|  12.9k|}
lib.c:init_internal:
   53|      1|static COLD void init_internal(void) {
   54|      1|    dav1d_init_cpu();
   55|      1|    dav1d_init_ii_wedge_masks();
   56|      1|    dav1d_init_intra_edge_tree();
   57|      1|    dav1d_init_qm_tables();
   58|      1|    dav1d_init_thread();
  ------------------
  |  |  144|      1|#define dav1d_init_thread() do {} while (0)
  |  |  ------------------
  |  |  |  Branch (144:42): [Folded, False: 1]
  |  |  ------------------
  ------------------
   59|      1|}
lib.c:get_stack_size_internal:
   92|  12.9k|static COLD size_t get_stack_size_internal(const pthread_attr_t *const thread_attr) {
   93|  12.9k|#if defined(__linux__) && HAVE_DLSYM && defined(__GLIBC__)
   94|       |    /* glibc has an issue where the size of the TLS is subtracted from the stack
   95|       |     * size instead of allocated separately. As a result the specified stack
   96|       |     * size may be insufficient when used in an application with large amounts
   97|       |     * of TLS data. The following is a workaround to compensate for that.
   98|       |     * See https://sourceware.org/bugzilla/show_bug.cgi?id=11787 */
   99|  12.9k|    size_t (*const get_minstack)(const pthread_attr_t*) =
  100|  12.9k|        dlsym(RTLD_DEFAULT, "__pthread_get_minstack");
  101|  12.9k|    if (get_minstack)
  ------------------
  |  Branch (101:9): [True: 12.9k, False: 0]
  ------------------
  102|  12.9k|        return get_minstack(thread_attr) - PTHREAD_STACK_MIN;
  103|      0|#endif
  104|      0|    return 0;
  105|  12.9k|}
lib.c:gen_picture:
  411|  37.0k|{
  412|  37.0k|    Dav1dData *const in = &c->in;
  413|       |
  414|  37.0k|    if (output_picture_ready(c, 0))
  ------------------
  |  Branch (414:9): [True: 10.0k, False: 26.9k]
  ------------------
  415|  10.0k|        return 0;
  416|       |
  417|  57.2k|    while (in->sz > 0) {
  ------------------
  |  Branch (417:12): [True: 46.8k, False: 10.4k]
  ------------------
  418|  46.8k|        const ptrdiff_t res = dav1d_parse_obus(c, in);
  419|  46.8k|        if (res < 0) {
  ------------------
  |  Branch (419:13): [True: 5.40k, False: 41.4k]
  ------------------
  420|  5.40k|            dav1d_data_unref_internal(in);
  421|  41.4k|        } else {
  422|  41.4k|            assert((size_t)res <= in->sz);
  ------------------
  |  |  140|  41.4k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 41.4k]
  |  |  |  Branch (140:68): [Folded, False: 41.4k]
  |  |  ------------------
  ------------------
  423|  41.4k|            in->sz -= res;
  424|  41.4k|            in->data += res;
  425|  41.4k|            if (!in->sz) dav1d_data_unref_internal(in);
  ------------------
  |  Branch (425:17): [True: 9.62k, False: 31.8k]
  ------------------
  426|  41.4k|        }
  427|  46.8k|        if (output_picture_ready(c, 0))
  ------------------
  |  Branch (427:13): [True: 11.1k, False: 35.7k]
  ------------------
  428|  11.1k|            break;
  429|  35.7k|        if (res < 0)
  ------------------
  |  Branch (429:13): [True: 5.40k, False: 30.2k]
  ------------------
  430|  5.40k|            return (int)res;
  431|  35.7k|    }
  432|       |
  433|  21.5k|    return 0;
  434|  26.9k|}
lib.c:output_picture_ready:
  330|   104k|static int output_picture_ready(Dav1dContext *const c, const int drain) {
  331|   104k|    if (c->cached_error) return 1;
  ------------------
  |  Branch (331:9): [True: 0, False: 104k]
  ------------------
  332|   104k|    if (!c->all_layers && c->max_spatial_id) {
  ------------------
  |  Branch (332:9): [True: 104k, False: 0]
  |  Branch (332:27): [True: 5.50k, False: 99.4k]
  ------------------
  333|  5.50k|        if (c->out.p.data[0] && c->cache.p.data[0]) {
  ------------------
  |  Branch (333:13): [True: 1.04k, False: 4.46k]
  |  Branch (333:33): [True: 316, False: 732]
  ------------------
  334|    316|            if (c->max_spatial_id == c->cache.p.frame_hdr->spatial_id ||
  ------------------
  |  Branch (334:17): [True: 9, False: 307]
  ------------------
  335|    307|                c->out.flags & PICTURE_FLAG_NEW_TEMPORAL_UNIT)
  ------------------
  |  Branch (335:17): [True: 191, False: 116]
  ------------------
  336|    200|                return 1;
  337|    116|            dav1d_thread_picture_unref(&c->cache);
  338|    116|            dav1d_thread_picture_move_ref(&c->cache, &c->out);
  339|    116|            return 0;
  340|  5.19k|        } else if (c->cache.p.data[0] && drain) {
  ------------------
  |  Branch (340:20): [True: 1.33k, False: 3.85k]
  |  Branch (340:42): [True: 316, False: 1.02k]
  ------------------
  341|    316|            return 1;
  342|  4.87k|        } else if (c->out.p.data[0]) {
  ------------------
  |  Branch (342:20): [True: 732, False: 4.14k]
  ------------------
  343|    732|            dav1d_thread_picture_move_ref(&c->cache, &c->out);
  344|    732|            return 0;
  345|    732|        }
  346|  5.50k|    }
  347|       |
  348|   103k|    return !!c->out.p.data[0];
  349|   104k|}
lib.c:output_image:
  310|  11.4k|{
  311|  11.4k|    int res = 0;
  312|       |
  313|  11.4k|    Dav1dThreadPicture *const in = (c->all_layers || !c->max_spatial_id)
  ------------------
  |  Branch (313:37): [True: 0, False: 11.4k]
  |  Branch (313:54): [True: 11.0k, False: 385]
  ------------------
  314|  11.4k|                                   ? &c->out : &c->cache;
  315|  11.4k|    if (!c->apply_grain || !has_grain(&in->p)) {
  ------------------
  |  Branch (315:9): [True: 0, False: 11.4k]
  |  Branch (315:28): [True: 10.9k, False: 556]
  ------------------
  316|  10.9k|        dav1d_picture_move_ref(out, &in->p);
  317|  10.9k|        dav1d_thread_picture_unref(in);
  318|  10.9k|        goto end;
  319|  10.9k|    }
  320|       |
  321|    556|    res = dav1d_apply_grain(c, out, &in->p);
  322|    556|    dav1d_thread_picture_unref(in);
  323|  11.4k|end:
  324|  11.4k|    if (!c->all_layers && c->max_spatial_id && c->out.p.data[0]) {
  ------------------
  |  Branch (324:9): [True: 11.4k, False: 0]
  |  Branch (324:27): [True: 385, False: 11.0k]
  |  Branch (324:48): [True: 69, False: 316]
  ------------------
  325|     69|        dav1d_thread_picture_move_ref(in, &c->out);
  326|     69|    }
  327|  11.4k|    return res;
  328|    556|}
lib.c:has_grain:
  302|  12.0k|{
  303|  12.0k|    const Dav1dFilmGrainData *fgdata = &pic->frame_hdr->film_grain.data;
  304|  12.0k|    return fgdata->num_y_points || fgdata->num_uv_points[0] ||
  ------------------
  |  Branch (304:12): [True: 698, False: 11.3k]
  |  Branch (304:36): [True: 142, False: 11.1k]
  ------------------
  305|  11.1k|           fgdata->num_uv_points[1] || (fgdata->clip_to_restricted_range &&
  ------------------
  |  Branch (305:12): [True: 42, False: 11.1k]
  |  Branch (305:41): [True: 253, False: 10.8k]
  ------------------
  306|    253|                                        fgdata->chroma_scaling_from_luma);
  ------------------
  |  Branch (306:41): [True: 230, False: 23]
  ------------------
  307|  12.0k|}
lib.c:close_internal:
  608|  12.9k|static COLD void close_internal(Dav1dContext **const c_out, int flush) {
  609|  12.9k|    Dav1dContext *const c = *c_out;
  610|  12.9k|    if (!c) return;
  ------------------
  |  Branch (610:9): [True: 0, False: 12.9k]
  ------------------
  611|       |
  612|  12.9k|    if (flush) dav1d_flush(c);
  ------------------
  |  Branch (612:9): [True: 12.9k, False: 0]
  ------------------
  613|       |
  614|  12.9k|    if (c->tc) {
  ------------------
  |  Branch (614:9): [True: 12.9k, False: 0]
  ------------------
  615|  12.9k|        struct TaskThreadData *ttd = &c->task_thread;
  616|  12.9k|        if (ttd->inited) {
  ------------------
  |  Branch (616:13): [True: 0, False: 12.9k]
  ------------------
  617|      0|            pthread_mutex_lock(&ttd->lock);
  618|      0|            for (unsigned n = 0; n < c->n_tc && c->tc[n].task_thread.td.inited; n++)
  ------------------
  |  Branch (618:34): [True: 0, False: 0]
  |  Branch (618:49): [True: 0, False: 0]
  ------------------
  619|      0|                c->tc[n].task_thread.die = 1;
  620|      0|            pthread_cond_broadcast(&ttd->cond);
  621|      0|            pthread_mutex_unlock(&ttd->lock);
  622|      0|            for (unsigned n = 0; n < c->n_tc; n++) {
  ------------------
  |  Branch (622:34): [True: 0, False: 0]
  ------------------
  623|      0|                Dav1dTaskContext *const pf = &c->tc[n];
  624|      0|                if (!pf->task_thread.td.inited) break;
  ------------------
  |  Branch (624:21): [True: 0, False: 0]
  ------------------
  625|      0|                pthread_join(pf->task_thread.td.thread, NULL);
  626|      0|                pthread_cond_destroy(&pf->task_thread.td.cond);
  627|      0|                pthread_mutex_destroy(&pf->task_thread.td.lock);
  628|      0|            }
  629|      0|            pthread_cond_destroy(&ttd->delayed_fg.cond);
  630|      0|            pthread_cond_destroy(&ttd->cond);
  631|      0|            pthread_mutex_destroy(&ttd->lock);
  632|      0|        }
  633|  12.9k|        dav1d_free_aligned(c->tc);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  634|  12.9k|    }
  635|       |
  636|  25.9k|    for (unsigned n = 0; c->fc && n < c->n_fc; n++) {
  ------------------
  |  Branch (636:26): [True: 25.9k, False: 0]
  |  Branch (636:35): [True: 12.9k, False: 12.9k]
  ------------------
  637|  12.9k|        Dav1dFrameContext *const f = &c->fc[n];
  638|       |
  639|       |        // clean-up threading stuff
  640|  12.9k|        if (c->n_fc > 1) {
  ------------------
  |  Branch (640:13): [True: 0, False: 12.9k]
  ------------------
  641|      0|            dav1d_free(f->tile_thread.lowest_pixel_mem);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
  642|      0|            dav1d_free(f->frame_thread.b);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
  643|      0|            dav1d_free_aligned(f->frame_thread.cbi);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  644|      0|            dav1d_free_aligned(f->frame_thread.pal_idx);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  645|      0|            dav1d_free_aligned(f->frame_thread.cf);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  646|      0|            dav1d_free(f->frame_thread.tile_start_off);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
  647|      0|            dav1d_free_aligned(f->frame_thread.pal);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  648|      0|        }
  649|  12.9k|        if (c->n_tc > 1) {
  ------------------
  |  Branch (649:13): [True: 0, False: 12.9k]
  ------------------
  650|      0|            pthread_mutex_destroy(&f->task_thread.pending_tasks.lock);
  651|      0|            pthread_cond_destroy(&f->task_thread.cond);
  652|      0|            pthread_mutex_destroy(&f->task_thread.lock);
  653|      0|        }
  654|  12.9k|        dav1d_free(f->frame_thread.frame_progress);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  655|  12.9k|        dav1d_free(f->task_thread.tasks);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  656|  12.9k|        dav1d_free(f->task_thread.tile_tasks[0]);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  657|  12.9k|        dav1d_free_aligned(f->ts);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  658|  12.9k|        dav1d_free_aligned(f->ipred_edge[0]);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  659|  12.9k|        dav1d_free(f->a);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  660|  12.9k|        dav1d_free(f->tile);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  661|  12.9k|        dav1d_free(f->lf.mask);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  662|  12.9k|        dav1d_free(f->lf.level);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  663|  12.9k|        dav1d_free(f->lf.lr_mask);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  664|  12.9k|        dav1d_free(f->lf.tx_lpf_right_edge[0]);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  665|  12.9k|        dav1d_free(f->lf.start_of_tile_row);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  666|  12.9k|        dav1d_free_aligned(f->rf.r);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  667|  12.9k|        dav1d_free_aligned(f->lf.cdef_line_buf);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  668|  12.9k|        dav1d_free_aligned(f->lf.lr_line_buf);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  669|  12.9k|    }
  670|  12.9k|    dav1d_free_aligned(c->fc);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  671|  12.9k|    if (c->n_fc > 1 && c->frame_thread.out_delayed) {
  ------------------
  |  Branch (671:9): [True: 0, False: 12.9k]
  |  Branch (671:24): [True: 0, False: 0]
  ------------------
  672|      0|        for (unsigned n = 0; n < c->n_fc; n++)
  ------------------
  |  Branch (672:30): [True: 0, False: 0]
  ------------------
  673|      0|            if (c->frame_thread.out_delayed[n].p.frame_hdr)
  ------------------
  |  Branch (673:17): [True: 0, False: 0]
  ------------------
  674|      0|                dav1d_thread_picture_unref(&c->frame_thread.out_delayed[n]);
  675|      0|        dav1d_free(c->frame_thread.out_delayed);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
  676|      0|    }
  677|  13.0k|    for (int n = 0; n < c->n_tile_data; n++)
  ------------------
  |  Branch (677:21): [True: 32, False: 12.9k]
  ------------------
  678|     32|        dav1d_data_unref_internal(&c->tile[n].data);
  679|  12.9k|    dav1d_free(c->tile);
  ------------------
  |  |  135|  12.9k|#define dav1d_free(ptr) free(ptr)
  ------------------
  680|   116k|    for (int n = 0; n < 8; n++) {
  ------------------
  |  Branch (680:21): [True: 103k, False: 12.9k]
  ------------------
  681|   103k|        dav1d_cdf_thread_unref(&c->cdf[n]);
  682|   103k|        if (c->refs[n].p.p.frame_hdr)
  ------------------
  |  Branch (682:13): [True: 0, False: 103k]
  ------------------
  683|      0|            dav1d_thread_picture_unref(&c->refs[n].p);
  684|   103k|        dav1d_ref_dec(&c->refs[n].refmvs);
  685|   103k|        dav1d_ref_dec(&c->refs[n].segmap);
  686|   103k|    }
  687|  12.9k|    dav1d_ref_dec(&c->seq_hdr_ref);
  688|  12.9k|    dav1d_ref_dec(&c->frame_hdr_ref);
  689|       |
  690|  12.9k|    dav1d_ref_dec(&c->mastering_display_ref);
  691|  12.9k|    dav1d_ref_dec(&c->content_light_ref);
  692|  12.9k|    dav1d_ref_dec(&c->itut_t35_ref);
  693|       |
  694|  12.9k|    dav1d_mem_pool_end(c->seq_hdr_pool);
  695|  12.9k|    dav1d_mem_pool_end(c->frame_hdr_pool);
  696|  12.9k|    dav1d_mem_pool_end(c->segmap_pool);
  697|  12.9k|    dav1d_mem_pool_end(c->refmvs_pool);
  698|  12.9k|    dav1d_mem_pool_end(c->cdf_pool);
  699|  12.9k|    dav1d_mem_pool_end(c->picture_pool);
  700|  12.9k|    dav1d_mem_pool_end(c->pic_ctx_pool);
  701|       |
  702|  12.9k|    dav1d_freep_aligned(c_out);
  703|  12.9k|}

dav1d_log:
   46|  6.47k|COLD void dav1d_log(Dav1dContext *const c, const char *const format, ...) {
   47|  6.47k|    assert(c != NULL);
  ------------------
  |  |  140|  6.47k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 6.47k]
  |  |  |  Branch (140:68): [Folded, False: 6.47k]
  |  |  ------------------
  ------------------
   48|       |
   49|  6.47k|    if (!c->logger.callback)
  ------------------
  |  Branch (49:9): [True: 0, False: 6.47k]
  ------------------
   50|      0|        return;
   51|       |
   52|  6.47k|    va_list ap;
   53|  6.47k|    va_start(ap, format);
   54|  6.47k|    c->logger.callback(c->logger.cookie, format, ap);
   55|       |    va_end(ap);
   56|  6.47k|}

dav1d_loop_filter_dsp_init_8bpc:
  259|  4.86k|COLD void bitfn(dav1d_loop_filter_dsp_init)(Dav1dLoopFilterDSPContext *const c) {
  260|  4.86k|    c->loop_filter_sb[0][0] = loop_filter_h_sb128y_c;
  261|  4.86k|    c->loop_filter_sb[0][1] = loop_filter_v_sb128y_c;
  262|  4.86k|    c->loop_filter_sb[1][0] = loop_filter_h_sb128uv_c;
  263|  4.86k|    c->loop_filter_sb[1][1] = loop_filter_v_sb128uv_c;
  264|       |
  265|  4.86k|#if HAVE_ASM
  266|       |#if ARCH_AARCH64 || ARCH_ARM
  267|       |    loop_filter_dsp_init_arm(c);
  268|       |#elif ARCH_LOONGARCH64
  269|       |    loop_filter_dsp_init_loongarch(c);
  270|       |#elif ARCH_PPC64LE
  271|       |    loop_filter_dsp_init_ppc(c);
  272|       |#elif ARCH_X86
  273|       |    loop_filter_dsp_init_x86(c);
  274|  4.86k|#endif
  275|  4.86k|#endif
  276|  4.86k|}
dav1d_loop_filter_dsp_init_16bpc:
  259|  6.93k|COLD void bitfn(dav1d_loop_filter_dsp_init)(Dav1dLoopFilterDSPContext *const c) {
  260|  6.93k|    c->loop_filter_sb[0][0] = loop_filter_h_sb128y_c;
  261|  6.93k|    c->loop_filter_sb[0][1] = loop_filter_v_sb128y_c;
  262|  6.93k|    c->loop_filter_sb[1][0] = loop_filter_h_sb128uv_c;
  263|  6.93k|    c->loop_filter_sb[1][1] = loop_filter_v_sb128uv_c;
  264|       |
  265|  6.93k|#if HAVE_ASM
  266|       |#if ARCH_AARCH64 || ARCH_ARM
  267|       |    loop_filter_dsp_init_arm(c);
  268|       |#elif ARCH_LOONGARCH64
  269|       |    loop_filter_dsp_init_loongarch(c);
  270|       |#elif ARCH_PPC64LE
  271|       |    loop_filter_dsp_init_ppc(c);
  272|       |#elif ARCH_X86
  273|       |    loop_filter_dsp_init_x86(c);
  274|  6.93k|#endif
  275|  6.93k|#endif
  276|  6.93k|}

dav1d_loop_restoration_dsp_init_8bpc:
 1367|  4.86k|{
 1368|  4.86k|    c->wiener[0] = c->wiener[1] = wiener_c;
 1369|  4.86k|    c->sgr[0] = sgr_5x5_c;
 1370|  4.86k|    c->sgr[1] = sgr_3x3_c;
 1371|  4.86k|    c->sgr[2] = sgr_mix_c;
 1372|       |
 1373|  4.86k|#if HAVE_ASM
 1374|       |#if ARCH_AARCH64 || ARCH_ARM
 1375|       |    loop_restoration_dsp_init_arm(c, bpc);
 1376|       |#elif ARCH_LOONGARCH64
 1377|       |    loop_restoration_dsp_init_loongarch(c, bpc);
 1378|       |#elif ARCH_PPC64LE
 1379|       |    loop_restoration_dsp_init_ppc(c, bpc);
 1380|       |#elif ARCH_X86
 1381|       |    loop_restoration_dsp_init_x86(c, bpc);
 1382|  4.86k|#endif
 1383|  4.86k|#endif
 1384|  4.86k|}
looprestoration_tmpl.c:sgr_5x5_c:
  830|  2.02k|{
  831|  2.02k|    ALIGN_STK_16(int32_t, sumsq_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  2.02k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.02k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  832|  2.02k|    ALIGN_STK_16(coef, sum_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  2.02k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.02k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  833|  2.02k|    int32_t *sumsq_ptrs[5], *sumsq_rows[5];
  834|  2.02k|    coef *sum_ptrs[5], *sum_rows[5];
  835|  12.1k|    for (int i = 0; i < 5; i++) {
  ------------------
  |  Branch (835:21): [True: 10.1k, False: 2.02k]
  ------------------
  836|  10.1k|        sumsq_rows[i] = &sumsq_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  10.1k|#define BUF_STRIDE (384 + 16)
  ------------------
  837|  10.1k|        sum_rows[i] = &sum_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  10.1k|#define BUF_STRIDE (384 + 16)
  ------------------
  838|  10.1k|    }
  839|       |
  840|  2.02k|    ALIGN_STK_16(int32_t, A_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  2.02k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.02k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  841|  2.02k|    ALIGN_STK_16(coef, B_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  2.02k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.02k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  842|  2.02k|    int32_t *A_ptrs[2];
  843|  2.02k|    coef *B_ptrs[2];
  844|  6.06k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (844:21): [True: 4.04k, False: 2.02k]
  ------------------
  845|  4.04k|        A_ptrs[i] = &A_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  4.04k|#define BUF_STRIDE (384 + 16)
  ------------------
  846|  4.04k|        B_ptrs[i] = &B_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  4.04k|#define BUF_STRIDE (384 + 16)
  ------------------
  847|  4.04k|    }
  848|  2.02k|    const pixel *src = dst;
  849|  2.02k|    const pixel *lpf_bottom = lpf + 6*PXSTRIDE(stride);
  ------------------
  |  |   53|  2.02k|#define PXSTRIDE(x) (x)
  ------------------
  850|       |
  851|  2.02k|    if (edges & LR_HAVE_TOP) {
  ------------------
  |  Branch (851:9): [True: 1.06k, False: 957]
  ------------------
  852|  1.06k|        sumsq_ptrs[0] = sumsq_rows[0];
  853|  1.06k|        sumsq_ptrs[1] = sumsq_rows[0];
  854|  1.06k|        sumsq_ptrs[2] = sumsq_rows[1];
  855|  1.06k|        sumsq_ptrs[3] = sumsq_rows[2];
  856|  1.06k|        sumsq_ptrs[4] = sumsq_rows[3];
  857|  1.06k|        sum_ptrs[0] = sum_rows[0];
  858|  1.06k|        sum_ptrs[1] = sum_rows[0];
  859|  1.06k|        sum_ptrs[2] = sum_rows[1];
  860|  1.06k|        sum_ptrs[3] = sum_rows[2];
  861|  1.06k|        sum_ptrs[4] = sum_rows[3];
  862|       |
  863|  1.06k|        sgr_box5_row_h(sumsq_rows[0], sum_rows[0], NULL, lpf, w, edges);
  864|  1.06k|        lpf += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.06k|#define PXSTRIDE(x) (x)
  ------------------
  865|  1.06k|        sgr_box5_row_h(sumsq_rows[1], sum_rows[1], NULL, lpf, w, edges);
  866|       |
  867|  1.06k|        sgr_box5_row_h(sumsq_rows[2], sum_rows[2], left, src, w, edges);
  868|  1.06k|        left++;
  869|  1.06k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.06k|#define PXSTRIDE(x) (x)
  ------------------
  870|       |
  871|  1.06k|        if (--h <= 0)
  ------------------
  |  Branch (871:13): [True: 73, False: 990]
  ------------------
  872|     73|            goto vert_1;
  873|       |
  874|    990|        sgr_box5_row_h(sumsq_rows[3], sum_rows[3], left, src, w, edges);
  875|    990|        left++;
  876|    990|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|    990|#define PXSTRIDE(x) (x)
  ------------------
  877|    990|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  878|    990|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    990|#define BITDEPTH_MAX 0xff
  ------------------
  879|    990|        rotate(A_ptrs, B_ptrs, 2);
  880|       |
  881|    990|        if (--h <= 0)
  ------------------
  |  Branch (881:13): [True: 51, False: 939]
  ------------------
  882|     51|            goto vert_2;
  883|       |
  884|       |        // ptrs are rotated by 2; both [3] and [4] now point at rows[0]; set
  885|       |        // one of them to point at the previously unused rows[4].
  886|    939|        sumsq_ptrs[3] = sumsq_rows[4];
  887|    939|        sum_ptrs[3] = sum_rows[4];
  888|    957|    } else {
  889|    957|        sumsq_ptrs[0] = sumsq_rows[0];
  890|    957|        sumsq_ptrs[1] = sumsq_rows[0];
  891|    957|        sumsq_ptrs[2] = sumsq_rows[0];
  892|    957|        sumsq_ptrs[3] = sumsq_rows[0];
  893|    957|        sumsq_ptrs[4] = sumsq_rows[0];
  894|    957|        sum_ptrs[0] = sum_rows[0];
  895|    957|        sum_ptrs[1] = sum_rows[0];
  896|    957|        sum_ptrs[2] = sum_rows[0];
  897|    957|        sum_ptrs[3] = sum_rows[0];
  898|    957|        sum_ptrs[4] = sum_rows[0];
  899|       |
  900|    957|        sgr_box5_row_h(sumsq_rows[0], sum_rows[0], left, src, w, edges);
  901|    957|        left++;
  902|    957|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|    957|#define PXSTRIDE(x) (x)
  ------------------
  903|       |
  904|    957|        if (--h <= 0)
  ------------------
  |  Branch (904:13): [True: 55, False: 902]
  ------------------
  905|     55|            goto vert_1;
  906|       |
  907|    902|        sumsq_ptrs[4] = sumsq_rows[1];
  908|    902|        sum_ptrs[4] = sum_rows[1];
  909|       |
  910|    902|        sgr_box5_row_h(sumsq_rows[1], sum_rows[1], left, src, w, edges);
  911|    902|        left++;
  912|    902|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|    902|#define PXSTRIDE(x) (x)
  ------------------
  913|       |
  914|    902|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  915|    902|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    902|#define BITDEPTH_MAX 0xff
  ------------------
  916|    902|        rotate(A_ptrs, B_ptrs, 2);
  917|       |
  918|    902|        if (--h <= 0)
  ------------------
  |  Branch (918:13): [True: 59, False: 843]
  ------------------
  919|     59|            goto vert_2;
  920|       |
  921|    843|        sumsq_ptrs[3] = sumsq_rows[2];
  922|    843|        sumsq_ptrs[4] = sumsq_rows[3];
  923|    843|        sum_ptrs[3] = sum_rows[2];
  924|    843|        sum_ptrs[4] = sum_rows[3];
  925|       |
  926|    843|        sgr_box5_row_h(sumsq_rows[2], sum_rows[2], left, src, w, edges);
  927|    843|        left++;
  928|    843|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|    843|#define PXSTRIDE(x) (x)
  ------------------
  929|       |
  930|    843|        if (--h <= 0)
  ------------------
  |  Branch (930:13): [True: 64, False: 779]
  ------------------
  931|     64|            goto odd;
  932|       |
  933|    779|        sgr_box5_row_h(sumsq_rows[3], sum_rows[3], left, src, w, edges);
  934|    779|        left++;
  935|    779|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|    779|#define PXSTRIDE(x) (x)
  ------------------
  936|       |
  937|    779|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  938|    779|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    779|#define BITDEPTH_MAX 0xff
  ------------------
  939|    779|        sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  940|    779|                    w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
  941|       |
  942|    779|        if (--h <= 0)
  ------------------
  |  Branch (942:13): [True: 131, False: 648]
  ------------------
  943|    131|            goto vert_2;
  944|       |
  945|       |        // ptrs are rotated by 2; both [3] and [4] now point at rows[0]; set
  946|       |        // one of them to point at the previously unused rows[4].
  947|    648|        sumsq_ptrs[3] = sumsq_rows[4];
  948|    648|        sum_ptrs[3] = sum_rows[4];
  949|    648|    }
  950|       |
  951|  28.2k|    do {
  952|  28.2k|        sgr_box5_row_h(sumsq_ptrs[3], sum_ptrs[3], left, src, w, edges);
  953|  28.2k|        left++;
  954|  28.2k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  28.2k|#define PXSTRIDE(x) (x)
  ------------------
  955|       |
  956|  28.2k|        if (--h <= 0)
  ------------------
  |  Branch (956:13): [True: 269, False: 27.9k]
  ------------------
  957|    269|            goto odd;
  958|       |
  959|  27.9k|        sgr_box5_row_h(sumsq_ptrs[4], sum_ptrs[4], left, src, w, edges);
  960|  27.9k|        left++;
  961|  27.9k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  27.9k|#define PXSTRIDE(x) (x)
  ------------------
  962|       |
  963|  27.9k|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  964|  27.9k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  27.9k|#define BITDEPTH_MAX 0xff
  ------------------
  965|  27.9k|        sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  966|  27.9k|                    w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
  967|  27.9k|    } while (--h > 0);
  ------------------
  |  Branch (967:14): [True: 26.6k, False: 1.31k]
  ------------------
  968|       |
  969|  1.31k|    if (!(edges & LR_HAVE_BOTTOM))
  ------------------
  |  Branch (969:9): [True: 239, False: 1.07k]
  ------------------
  970|    239|        goto vert_2;
  971|       |
  972|  1.07k|    sgr_box5_row_h(sumsq_ptrs[3], sum_ptrs[3], NULL, lpf_bottom, w, edges);
  973|  1.07k|    lpf_bottom += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.07k|#define PXSTRIDE(x) (x)
  ------------------
  974|  1.07k|    sgr_box5_row_h(sumsq_ptrs[4], sum_ptrs[4], NULL, lpf_bottom, w, edges);
  975|       |
  976|  1.55k|output_2:
  977|  1.55k|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  978|  1.55k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.55k|#define BITDEPTH_MAX 0xff
  ------------------
  979|  1.55k|    sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  980|  1.55k|                w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
  981|  1.55k|    return;
  982|       |
  983|    480|vert_2:
  984|       |    // Duplicate the last row twice more
  985|    480|    sumsq_ptrs[3] = sumsq_ptrs[2];
  986|    480|    sumsq_ptrs[4] = sumsq_ptrs[2];
  987|    480|    sum_ptrs[3] = sum_ptrs[2];
  988|    480|    sum_ptrs[4] = sum_ptrs[2];
  989|    480|    goto output_2;
  990|       |
  991|    333|odd:
  992|       |    // Copy the last row as padding once
  993|    333|    sumsq_ptrs[4] = sumsq_ptrs[3];
  994|    333|    sum_ptrs[4] = sum_ptrs[3];
  995|       |
  996|    333|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  997|    333|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    333|#define BITDEPTH_MAX 0xff
  ------------------
  998|    333|    sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  999|    333|                w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
 1000|       |
 1001|    461|output_1:
 1002|       |    // Duplicate the last row twice more
 1003|    461|    sumsq_ptrs[3] = sumsq_ptrs[2];
 1004|    461|    sumsq_ptrs[4] = sumsq_ptrs[2];
 1005|    461|    sum_ptrs[3] = sum_ptrs[2];
 1006|    461|    sum_ptrs[4] = sum_ptrs[2];
 1007|       |
 1008|    461|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
 1009|    461|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    461|#define BITDEPTH_MAX 0xff
  ------------------
 1010|       |    // Output only one row
 1011|    461|    sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
 1012|    461|                w, 1, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
 1013|    461|    return;
 1014|       |
 1015|    128|vert_1:
 1016|       |    // Copy the last row as padding once
 1017|    128|    sumsq_ptrs[4] = sumsq_ptrs[3];
 1018|    128|    sum_ptrs[4] = sum_ptrs[3];
 1019|       |
 1020|    128|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
 1021|    128|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    128|#define BITDEPTH_MAX 0xff
  ------------------
 1022|    128|    rotate(A_ptrs, B_ptrs, 2);
 1023|       |
 1024|    128|    goto output_1;
 1025|    333|}
looprestoration_tmpl.c:sgr_box5_row_h:
  441|   310k|{
  442|   310k|    sumsq++;
  443|   310k|    sum++;
  444|   310k|    int a = edges & LR_HAVE_LEFT ? (left ? left[0][1] : src[-3]) : src[0];
  ------------------
  |  Branch (444:13): [True: 160k, False: 150k]
  |  Branch (444:37): [True: 150k, False: 9.79k]
  ------------------
  445|   310k|    int b = edges & LR_HAVE_LEFT ? (left ? left[0][2] : src[-2]) : src[0];
  ------------------
  |  Branch (445:13): [True: 160k, False: 150k]
  |  Branch (445:37): [True: 150k, False: 9.79k]
  ------------------
  446|   310k|    int c = edges & LR_HAVE_LEFT ? (left ? left[0][3] : src[-1]) : src[0];
  ------------------
  |  Branch (446:13): [True: 160k, False: 150k]
  |  Branch (446:37): [True: 150k, False: 9.79k]
  ------------------
  447|   310k|    int d = src[0];
  448|  22.1M|    for (int x = -1; x < w + 1; x++) {
  ------------------
  |  Branch (448:22): [True: 21.8M, False: 310k]
  ------------------
  449|  21.8M|        int e = (x + 2 < w || (edges & LR_HAVE_RIGHT)) ? src[x + 2] : src[w - 1];
  ------------------
  |  Branch (449:18): [True: 20.8M, False: 932k]
  |  Branch (449:31): [True: 487k, False: 444k]
  ------------------
  450|  21.8M|        sum[x] = a + b + c + d + e;
  451|  21.8M|        sumsq[x] = a * a + b * b + c * c + d * d + e * e;
  452|  21.8M|        a = b;
  453|  21.8M|        b = c;
  454|  21.8M|        c = d;
  455|  21.8M|        d = e;
  456|  21.8M|    }
  457|   310k|}
looprestoration_tmpl.c:sgr_box5_vert:
  537|   156k|{
  538|   156k|    sgr_box5_row_v(sumsq, sum, sumsq_out, sum_out, w);
  539|   156k|    sgr_calc_row_ab(sumsq_out, sum_out, w, s, bitdepth_max, 25, 164);
  540|   156k|    rotate5_x2(sumsq, sum);
  541|   156k|}
looprestoration_tmpl.c:sgr_box5_row_v:
  488|   156k|{
  489|  11.2M|    for (int x = 0; x < w + 2; x++) {
  ------------------
  |  Branch (489:21): [True: 11.0M, False: 156k]
  ------------------
  490|  11.0M|        int sq_a = sumsq[0][x];
  491|  11.0M|        int sq_b = sumsq[1][x];
  492|  11.0M|        int sq_c = sumsq[2][x];
  493|  11.0M|        int sq_d = sumsq[3][x];
  494|  11.0M|        int sq_e = sumsq[4][x];
  495|  11.0M|        int s_a = sum[0][x];
  496|  11.0M|        int s_b = sum[1][x];
  497|  11.0M|        int s_c = sum[2][x];
  498|  11.0M|        int s_d = sum[3][x];
  499|  11.0M|        int s_e = sum[4][x];
  500|  11.0M|        sumsq_out[x] = sq_a + sq_b + sq_c + sq_d + sq_e;
  501|  11.0M|        sum_out[x] = s_a + s_b + s_c + s_d + s_e;
  502|  11.0M|    }
  503|   156k|}
looprestoration_tmpl.c:sgr_calc_row_ab:
  507|   503k|{
  508|   503k|    const int bitdepth_min_8 = bitdepth_from_max(bitdepth_max) - 8;
  ------------------
  |  |   58|   503k|#define bitdepth_from_max(x) 8
  ------------------
  509|  35.3M|    for (int i = 0; i < w + 2; i++) {
  ------------------
  |  Branch (509:21): [True: 34.8M, False: 503k]
  ------------------
  510|  34.8M|        const int a =
  511|  34.8M|            (AA[i] + ((1 << (2 * bitdepth_min_8)) >> 1)) >> (2 * bitdepth_min_8);
  512|  34.8M|        const int b =
  513|  34.8M|            (BB[i] + ((1 << bitdepth_min_8) >> 1)) >> bitdepth_min_8;
  514|       |
  515|  34.8M|        const unsigned p = imax(a * n - b * b, 0);
  516|  34.8M|        const unsigned z = (p * s + (1 << 19)) >> 20;
  517|  34.8M|        const unsigned x = dav1d_sgr_x_by_x[umin(z, 255)];
  518|       |
  519|       |        // This is where we invert A and B, so that B is of size coef.
  520|  34.8M|        AA[i] = (x * BB[i] * sgr_one_by_x + (1 << 11)) >> 12;
  521|  34.8M|        BB[i] = x;
  522|  34.8M|    }
  523|   503k|}
looprestoration_tmpl.c:rotate5_x2:
  402|   156k|{
  403|   156k|    int32_t *tmp32[2];
  404|   156k|    coef *tmpc[2];
  405|   468k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (405:21): [True: 312k, False: 156k]
  ------------------
  406|   312k|        tmp32[i] = sumsq_ptrs[i];
  407|   312k|        tmpc[i] = sum_ptrs[i];
  408|   312k|    }
  409|   624k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (409:21): [True: 468k, False: 156k]
  ------------------
  410|   468k|        sumsq_ptrs[i] = sumsq_ptrs[i + 2];
  411|   468k|        sum_ptrs[i] = sum_ptrs[i + 2];
  412|   468k|    }
  413|   468k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (413:21): [True: 312k, False: 156k]
  ------------------
  414|   312k|        sumsq_ptrs[3 + i] = tmp32[i];
  415|   312k|        sum_ptrs[3 + i] = tmpc[i];
  416|   312k|    }
  417|   156k|}
looprestoration_tmpl.c:rotate:
  390|   853k|{
  391|   853k|    int32_t *tmp32 = sumsq_ptrs[0];
  392|   853k|    coef *tmpc = sum_ptrs[0];
  393|  2.64M|    for (int i = 0; i < n - 1; i++) {
  ------------------
  |  Branch (393:21): [True: 1.79M, False: 853k]
  ------------------
  394|  1.79M|        sumsq_ptrs[i] = sumsq_ptrs[i + 1];
  395|  1.79M|        sum_ptrs[i] = sum_ptrs[i + 1];
  396|  1.79M|    }
  397|   853k|    sumsq_ptrs[n - 1] = tmp32;
  398|   853k|    sum_ptrs[n - 1] = tmpc;
  399|   853k|}
looprestoration_tmpl.c:sgr_finish2:
  645|  31.0k|{
  646|  31.0k|    ALIGN_STK_16(coef, tmp, 2*FILTER_OUT_STRIDE,);
  ------------------
  |  |  100|  31.0k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  31.0k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  647|       |
  648|  31.0k|    sgr_finish_filter2(tmp, *dst, stride, A_ptrs, B_ptrs, w, h);
  649|  31.0k|    sgr_weighted_row1(*dst, tmp, w, w1 HIGHBD_TAIL_SUFFIX);
  650|  31.0k|    *dst += PXSTRIDE(stride);
  ------------------
  |  |   53|  31.0k|#define PXSTRIDE(x) (x)
  ------------------
  651|  31.0k|    if (h > 1) {
  ------------------
  |  Branch (651:9): [True: 30.6k, False: 461]
  ------------------
  652|  30.6k|        sgr_weighted_row1(*dst, tmp + FILTER_OUT_STRIDE, w, w1 HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |  572|  30.6k|#define FILTER_OUT_STRIDE (384)
  ------------------
  653|  30.6k|        *dst += PXSTRIDE(stride);
  ------------------
  |  |   53|  30.6k|#define PXSTRIDE(x) (x)
  ------------------
  654|  30.6k|    }
  655|  31.0k|    rotate(A_ptrs, B_ptrs, 2);
  656|  31.0k|}
looprestoration_tmpl.c:sgr_finish_filter2:
  579|   146k|{
  580|   146k|#define SIX_NEIGHBORS(P, i)\
  581|   146k|    ((P[0][i]     + P[1][i]) * 6 +   \
  582|   146k|     (P[0][i - 1] + P[1][i - 1] +    \
  583|   146k|      P[0][i + 1] + P[1][i + 1]) * 5)
  584|  10.2M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (584:21): [True: 10.0M, False: 146k]
  ------------------
  585|  10.0M|        const int a = SIX_NEIGHBORS(B_ptrs, i + 1);
  ------------------
  |  |  581|  10.0M|    ((P[0][i]     + P[1][i]) * 6 +   \
  |  |  582|  10.0M|     (P[0][i - 1] + P[1][i - 1] +    \
  |  |  583|  10.0M|      P[0][i + 1] + P[1][i + 1]) * 5)
  ------------------
  586|  10.0M|        const int b = SIX_NEIGHBORS(A_ptrs, i + 1);
  ------------------
  |  |  581|  10.0M|    ((P[0][i]     + P[1][i]) * 6 +   \
  |  |  582|  10.0M|     (P[0][i - 1] + P[1][i - 1] +    \
  |  |  583|  10.0M|      P[0][i + 1] + P[1][i + 1]) * 5)
  ------------------
  587|  10.0M|        tmp[i] = (b - a * src[i] + (1 << 8)) >> 9;
  588|  10.0M|    }
  589|   146k|    if (h <= 1)
  ------------------
  |  Branch (589:9): [True: 2.33k, False: 144k]
  ------------------
  590|  2.33k|        return;
  591|   144k|    tmp += FILTER_OUT_STRIDE;
  ------------------
  |  |  572|   144k|#define FILTER_OUT_STRIDE (384)
  ------------------
  592|   144k|    src += PXSTRIDE(src_stride);
  ------------------
  |  |   53|   144k|#define PXSTRIDE(x) (x)
  ------------------
  593|   144k|    const int32_t *A = &A_ptrs[1][1];
  594|   144k|    const coef *B = &B_ptrs[1][1];
  595|  10.0M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (595:21): [True: 9.86M, False: 144k]
  ------------------
  596|  9.86M|        const int a = B[i] * 6 + (B[i - 1] + B[i + 1]) * 5;
  597|  9.86M|        const int b = A[i] * 6 + (A[i - 1] + A[i + 1]) * 5;
  598|  9.86M|        tmp[i] = (b - a * src[i] + (1 << 7)) >> 8;
  599|  9.86M|    }
  600|   144k|#undef SIX_NEIGHBORS
  601|   144k|}
looprestoration_tmpl.c:sgr_weighted_row1:
  605|   158k|{
  606|  10.8M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (606:21): [True: 10.7M, False: 158k]
  ------------------
  607|  10.7M|        const int v = w1 * t1[i];
  608|  10.7M|        dst[i] = iclip_pixel(dst[i] + ((v + (1 << 10)) >> 11));
  ------------------
  |  |   49|  10.7M|#define iclip_pixel iclip_u8
  ------------------
  609|  10.7M|    }
  610|   158k|}
looprestoration_tmpl.c:sgr_3x3_c:
  684|  3.20k|{
  685|  3.20k|#define BUF_STRIDE (384 + 16)
  686|  3.20k|    ALIGN_STK_16(int32_t, sumsq_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.20k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.20k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  687|  3.20k|    ALIGN_STK_16(coef, sum_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.20k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.20k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  688|  3.20k|    int32_t *sumsq_ptrs[3], *sumsq_rows[3];
  689|  3.20k|    coef *sum_ptrs[3], *sum_rows[3];
  690|  12.8k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (690:21): [True: 9.61k, False: 3.20k]
  ------------------
  691|  9.61k|        sumsq_rows[i] = &sumsq_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  9.61k|#define BUF_STRIDE (384 + 16)
  ------------------
  692|  9.61k|        sum_rows[i] = &sum_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  9.61k|#define BUF_STRIDE (384 + 16)
  ------------------
  693|  9.61k|    }
  694|       |
  695|  3.20k|    ALIGN_STK_16(int32_t, A_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.20k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.20k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  696|  3.20k|    ALIGN_STK_16(coef, B_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.20k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.20k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  697|  3.20k|    int32_t *A_ptrs[3];
  698|  3.20k|    coef *B_ptrs[3];
  699|  12.8k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (699:21): [True: 9.61k, False: 3.20k]
  ------------------
  700|  9.61k|        A_ptrs[i] = &A_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  9.61k|#define BUF_STRIDE (384 + 16)
  ------------------
  701|  9.61k|        B_ptrs[i] = &B_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  9.61k|#define BUF_STRIDE (384 + 16)
  ------------------
  702|  9.61k|    }
  703|  3.20k|    const pixel *src = dst;
  704|  3.20k|    const pixel *lpf_bottom = lpf + 6*PXSTRIDE(stride);
  ------------------
  |  |   53|  3.20k|#define PXSTRIDE(x) (x)
  ------------------
  705|       |
  706|  3.20k|    if (edges & LR_HAVE_TOP) {
  ------------------
  |  Branch (706:9): [True: 1.68k, False: 1.51k]
  ------------------
  707|  1.68k|        sumsq_ptrs[0] = sumsq_rows[0];
  708|  1.68k|        sumsq_ptrs[1] = sumsq_rows[1];
  709|  1.68k|        sumsq_ptrs[2] = sumsq_rows[2];
  710|  1.68k|        sum_ptrs[0] = sum_rows[0];
  711|  1.68k|        sum_ptrs[1] = sum_rows[1];
  712|  1.68k|        sum_ptrs[2] = sum_rows[2];
  713|       |
  714|  1.68k|        sgr_box3_row_h(sumsq_rows[0], sum_rows[0], NULL, lpf, w, edges);
  715|  1.68k|        lpf += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.68k|#define PXSTRIDE(x) (x)
  ------------------
  716|  1.68k|        sgr_box3_row_h(sumsq_rows[1], sum_rows[1], NULL, lpf, w, edges);
  717|       |
  718|  1.68k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  719|  1.68k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.68k|#define BITDEPTH_MAX 0xff
  ------------------
  720|  1.68k|        left++;
  721|  1.68k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.68k|#define PXSTRIDE(x) (x)
  ------------------
  722|  1.68k|        rotate(A_ptrs, B_ptrs, 3);
  723|       |
  724|  1.68k|        if (--h <= 0)
  ------------------
  |  Branch (724:13): [True: 95, False: 1.59k]
  ------------------
  725|     95|            goto vert_1;
  726|       |
  727|  1.59k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  728|  1.59k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.59k|#define BITDEPTH_MAX 0xff
  ------------------
  729|  1.59k|        left++;
  730|  1.59k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.59k|#define PXSTRIDE(x) (x)
  ------------------
  731|  1.59k|        rotate(A_ptrs, B_ptrs, 3);
  732|       |
  733|  1.59k|        if (--h <= 0)
  ------------------
  |  Branch (733:13): [True: 117, False: 1.47k]
  ------------------
  734|    117|            goto vert_2;
  735|  1.59k|    } else {
  736|  1.51k|        sumsq_ptrs[0] = sumsq_rows[0];
  737|  1.51k|        sumsq_ptrs[1] = sumsq_rows[0];
  738|  1.51k|        sumsq_ptrs[2] = sumsq_rows[0];
  739|  1.51k|        sum_ptrs[0] = sum_rows[0];
  740|  1.51k|        sum_ptrs[1] = sum_rows[0];
  741|  1.51k|        sum_ptrs[2] = sum_rows[0];
  742|       |
  743|  1.51k|        sgr_box3_row_h(sumsq_rows[0], sum_rows[0], left, src, w, edges);
  744|  1.51k|        left++;
  745|  1.51k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.51k|#define PXSTRIDE(x) (x)
  ------------------
  746|       |
  747|  1.51k|        sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  748|  1.51k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.51k|#define BITDEPTH_MAX 0xff
  ------------------
  749|  1.51k|        rotate(A_ptrs, B_ptrs, 3);
  750|       |
  751|  1.51k|        if (--h <= 0)
  ------------------
  |  Branch (751:13): [True: 101, False: 1.41k]
  ------------------
  752|    101|            goto vert_1;
  753|       |
  754|  1.41k|        sumsq_ptrs[2] = sumsq_rows[1];
  755|  1.41k|        sum_ptrs[2] = sum_rows[1];
  756|       |
  757|  1.41k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  758|  1.41k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.41k|#define BITDEPTH_MAX 0xff
  ------------------
  759|  1.41k|        left++;
  760|  1.41k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.41k|#define PXSTRIDE(x) (x)
  ------------------
  761|  1.41k|        rotate(A_ptrs, B_ptrs, 3);
  762|       |
  763|  1.41k|        if (--h <= 0)
  ------------------
  |  Branch (763:13): [True: 99, False: 1.31k]
  ------------------
  764|     99|            goto vert_2;
  765|       |
  766|  1.31k|        sumsq_ptrs[2] = sumsq_rows[2];
  767|  1.31k|        sum_ptrs[2] = sum_rows[2];
  768|  1.31k|    }
  769|       |
  770|  90.6k|    do {
  771|  90.6k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  772|  90.6k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  90.6k|#define BITDEPTH_MAX 0xff
  ------------------
  773|  90.6k|        left++;
  774|  90.6k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  90.6k|#define PXSTRIDE(x) (x)
  ------------------
  775|       |
  776|  90.6k|        sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  777|  90.6k|                    w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  778|  90.6k|    } while (--h > 0);
  ------------------
  |  Branch (778:14): [True: 87.8k, False: 2.79k]
  ------------------
  779|       |
  780|  2.79k|    if (!(edges & LR_HAVE_BOTTOM))
  ------------------
  |  Branch (780:9): [True: 1.05k, False: 1.74k]
  ------------------
  781|  1.05k|        goto vert_2;
  782|       |
  783|  1.74k|    sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  784|  1.74k|                NULL, lpf_bottom, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.74k|#define BITDEPTH_MAX 0xff
  ------------------
  785|  1.74k|    lpf_bottom += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.74k|#define PXSTRIDE(x) (x)
  ------------------
  786|       |
  787|  1.74k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  788|  1.74k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  789|       |
  790|  1.74k|    sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  791|  1.74k|                NULL, lpf_bottom, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.74k|#define BITDEPTH_MAX 0xff
  ------------------
  792|       |
  793|  1.74k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  794|  1.74k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  795|  1.74k|    return;
  796|       |
  797|  1.26k|vert_2:
  798|  1.26k|    sumsq_ptrs[2] = sumsq_ptrs[1];
  799|  1.26k|    sum_ptrs[2] = sum_ptrs[1];
  800|  1.26k|    sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  801|  1.26k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.26k|#define BITDEPTH_MAX 0xff
  ------------------
  802|       |
  803|  1.26k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  804|  1.26k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  805|       |
  806|  1.46k|output_1:
  807|  1.46k|    sumsq_ptrs[2] = sumsq_ptrs[1];
  808|  1.46k|    sum_ptrs[2] = sum_ptrs[1];
  809|  1.46k|    sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  810|  1.46k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.46k|#define BITDEPTH_MAX 0xff
  ------------------
  811|       |
  812|  1.46k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  813|  1.46k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  814|  1.46k|    return;
  815|       |
  816|    196|vert_1:
  817|    196|    sumsq_ptrs[2] = sumsq_ptrs[1];
  818|    196|    sum_ptrs[2] = sum_ptrs[1];
  819|    196|    sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  820|    196|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|    196|#define BITDEPTH_MAX 0xff
  ------------------
  821|    196|    rotate(A_ptrs, B_ptrs, 3);
  822|    196|    goto output_1;
  823|  1.26k|}
looprestoration_tmpl.c:sgr_box3_row_h:
  423|   348k|{
  424|   348k|    sumsq++;
  425|   348k|    sum++;
  426|   348k|    int a = edges & LR_HAVE_LEFT ? (left ? left[0][2] : src[-2]) : src[0];
  ------------------
  |  Branch (426:13): [True: 182k, False: 166k]
  |  Branch (426:37): [True: 171k, False: 11.2k]
  ------------------
  427|   348k|    int b = edges & LR_HAVE_LEFT ? (left ? left[0][3] : src[-1]) : src[0];
  ------------------
  |  Branch (427:13): [True: 182k, False: 166k]
  |  Branch (427:37): [True: 171k, False: 11.2k]
  ------------------
  428|  23.8M|    for (int x = -1; x < w + 1; x++) {
  ------------------
  |  Branch (428:22): [True: 23.5M, False: 348k]
  ------------------
  429|  23.5M|        int c = (x + 1 < w || (edges & LR_HAVE_RIGHT)) ? src[x + 1] : src[w - 1];
  ------------------
  |  Branch (429:18): [True: 22.8M, False: 696k]
  |  Branch (429:31): [True: 369k, False: 327k]
  ------------------
  430|  23.5M|        sum[x] = a + b + c;
  431|  23.5M|        sumsq[x] = a * a + b * b + c * c;
  432|  23.5M|        a = b;
  433|  23.5M|        b = c;
  434|  23.5M|    }
  435|   348k|}
looprestoration_tmpl.c:sgr_box3_hv:
  550|  98.8k|{
  551|  98.8k|    sgr_box3_row_h(sumsq[2], sum[2], left, src, w, edges);
  552|  98.8k|    sgr_box3_vert(sumsq, sum, AA, BB, w, s, bitdepth_max);
  553|  98.8k|}
looprestoration_tmpl.c:sgr_box3_vert:
  528|   347k|{
  529|   347k|    sgr_box3_row_v(sumsq, sum, sumsq_out, sum_out, w);
  530|   347k|    sgr_calc_row_ab(sumsq_out, sum_out, w, s, bitdepth_max, 9, 455);
  531|   347k|    rotate(sumsq, sum, 3);
  532|   347k|}
looprestoration_tmpl.c:sgr_box3_row_v:
  472|   347k|{
  473|  24.0M|    for (int x = 0; x < w + 2; x++) {
  ------------------
  |  Branch (473:21): [True: 23.7M, False: 347k]
  ------------------
  474|  23.7M|        int sq_a = sumsq[0][x];
  475|  23.7M|        int sq_b = sumsq[1][x];
  476|  23.7M|        int sq_c = sumsq[2][x];
  477|  23.7M|        int s_a = sum[0][x];
  478|  23.7M|        int s_b = sum[1][x];
  479|  23.7M|        int s_c = sum[2][x];
  480|  23.7M|        sumsq_out[x] = sq_a + sq_b + sq_c;
  481|  23.7M|        sum_out[x] = s_a + s_b + s_c;
  482|  23.7M|    }
  483|   347k|}
looprestoration_tmpl.c:sgr_finish1:
  631|  96.8k|{
  632|       |    // Only one single row, no stride needed
  633|  96.8k|    ALIGN_STK_16(coef, tmp, 384,);
  ------------------
  |  |  100|  96.8k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  96.8k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  634|       |
  635|  96.8k|    sgr_finish_filter_row1(tmp, *dst, A_ptrs, B_ptrs, w);
  636|  96.8k|    sgr_weighted_row1(*dst, tmp, w, w1 HIGHBD_TAIL_SUFFIX);
  637|  96.8k|    *dst += PXSTRIDE(stride);
  ------------------
  |  |   53|  96.8k|#define PXSTRIDE(x) (x)
  ------------------
  638|  96.8k|    rotate(A_ptrs, B_ptrs, 3);
  639|  96.8k|}
looprestoration_tmpl.c:sgr_finish_filter_row1:
  559|   326k|{
  560|   326k|#define EIGHT_NEIGHBORS(P, i)\
  561|   326k|    ((P[1][i] + P[1][i - 1] + P[1][i + 1] + P[0][i] + P[2][i]) * 4 + \
  562|   326k|     (P[0][i - 1] + P[2][i - 1] +                           \
  563|   326k|      P[0][i + 1] + P[2][i + 1]) * 3)
  564|  21.8M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (564:21): [True: 21.4M, False: 326k]
  ------------------
  565|  21.4M|        const int a = EIGHT_NEIGHBORS(B_ptrs, i + 1);
  ------------------
  |  |  561|  21.4M|    ((P[1][i] + P[1][i - 1] + P[1][i + 1] + P[0][i] + P[2][i]) * 4 + \
  |  |  562|  21.4M|     (P[0][i - 1] + P[2][i - 1] +                           \
  |  |  563|  21.4M|      P[0][i + 1] + P[2][i + 1]) * 3)
  ------------------
  566|  21.4M|        const int b = EIGHT_NEIGHBORS(A_ptrs, i + 1);
  ------------------
  |  |  561|  21.4M|    ((P[1][i] + P[1][i - 1] + P[1][i + 1] + P[0][i] + P[2][i]) * 4 + \
  |  |  562|  21.4M|     (P[0][i - 1] + P[2][i - 1] +                           \
  |  |  563|  21.4M|      P[0][i + 1] + P[2][i + 1]) * 3)
  ------------------
  567|  21.4M|        tmp[i] = (b - a * src[i] + (1 << 8)) >> 9;
  568|  21.4M|    }
  569|   326k|#undef EIGHT_NEIGHBORS
  570|   326k|}
looprestoration_tmpl.c:sgr_mix_c:
 1032|  7.52k|{
 1033|  7.52k|    ALIGN_STK_16(int32_t, sumsq5_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1034|  7.52k|    ALIGN_STK_16(coef, sum5_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1035|  7.52k|    int32_t *sumsq5_ptrs[5], *sumsq5_rows[5];
 1036|  7.52k|    coef *sum5_ptrs[5], *sum5_rows[5];
 1037|  45.1k|    for (int i = 0; i < 5; i++) {
  ------------------
  |  Branch (1037:21): [True: 37.6k, False: 7.52k]
  ------------------
 1038|  37.6k|        sumsq5_rows[i] = &sumsq5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  37.6k|#define BUF_STRIDE (384 + 16)
  ------------------
 1039|  37.6k|        sum5_rows[i] = &sum5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  37.6k|#define BUF_STRIDE (384 + 16)
  ------------------
 1040|  37.6k|    }
 1041|  7.52k|    ALIGN_STK_16(int32_t, sumsq3_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1042|  7.52k|    ALIGN_STK_16(coef, sum3_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1043|  7.52k|    int32_t *sumsq3_ptrs[3], *sumsq3_rows[3];
 1044|  7.52k|    coef *sum3_ptrs[3], *sum3_rows[3];
 1045|  30.0k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1045:21): [True: 22.5k, False: 7.52k]
  ------------------
 1046|  22.5k|        sumsq3_rows[i] = &sumsq3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  22.5k|#define BUF_STRIDE (384 + 16)
  ------------------
 1047|  22.5k|        sum3_rows[i] = &sum3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  22.5k|#define BUF_STRIDE (384 + 16)
  ------------------
 1048|  22.5k|    }
 1049|       |
 1050|  7.52k|    ALIGN_STK_16(int32_t, A5_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1051|  7.52k|    ALIGN_STK_16(coef, B5_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1052|  7.52k|    int32_t *A5_ptrs[2];
 1053|  7.52k|    coef *B5_ptrs[2];
 1054|  22.5k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1054:21): [True: 15.0k, False: 7.52k]
  ------------------
 1055|  15.0k|        A5_ptrs[i] = &A5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  15.0k|#define BUF_STRIDE (384 + 16)
  ------------------
 1056|  15.0k|        B5_ptrs[i] = &B5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  15.0k|#define BUF_STRIDE (384 + 16)
  ------------------
 1057|  15.0k|    }
 1058|  7.52k|    ALIGN_STK_16(int32_t, A3_buf, BUF_STRIDE * 4 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1059|  7.52k|    ALIGN_STK_16(coef, B3_buf, BUF_STRIDE * 4 + 16,);
  ------------------
  |  |  100|  7.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  7.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1060|  7.52k|    int32_t *A3_ptrs[4];
 1061|  7.52k|    coef *B3_ptrs[4];
 1062|  37.6k|    for (int i = 0; i < 4; i++) {
  ------------------
  |  Branch (1062:21): [True: 30.0k, False: 7.52k]
  ------------------
 1063|  30.0k|        A3_ptrs[i] = &A3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  30.0k|#define BUF_STRIDE (384 + 16)
  ------------------
 1064|  30.0k|        B3_ptrs[i] = &B3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  30.0k|#define BUF_STRIDE (384 + 16)
  ------------------
 1065|  30.0k|    }
 1066|  7.52k|    const pixel *src = dst;
 1067|  7.52k|    const pixel *lpf_bottom = lpf + 6*PXSTRIDE(stride);
  ------------------
  |  |   53|  7.52k|#define PXSTRIDE(x) (x)
  ------------------
 1068|       |
 1069|  7.52k|    if (edges & LR_HAVE_TOP) {
  ------------------
  |  Branch (1069:9): [True: 3.83k, False: 3.69k]
  ------------------
 1070|  3.83k|        sumsq5_ptrs[0] = sumsq5_rows[0];
 1071|  3.83k|        sumsq5_ptrs[1] = sumsq5_rows[0];
 1072|  3.83k|        sumsq5_ptrs[2] = sumsq5_rows[1];
 1073|  3.83k|        sumsq5_ptrs[3] = sumsq5_rows[2];
 1074|  3.83k|        sumsq5_ptrs[4] = sumsq5_rows[3];
 1075|  3.83k|        sum5_ptrs[0] = sum5_rows[0];
 1076|  3.83k|        sum5_ptrs[1] = sum5_rows[0];
 1077|  3.83k|        sum5_ptrs[2] = sum5_rows[1];
 1078|  3.83k|        sum5_ptrs[3] = sum5_rows[2];
 1079|  3.83k|        sum5_ptrs[4] = sum5_rows[3];
 1080|       |
 1081|  3.83k|        sumsq3_ptrs[0] = sumsq3_rows[0];
 1082|  3.83k|        sumsq3_ptrs[1] = sumsq3_rows[1];
 1083|  3.83k|        sumsq3_ptrs[2] = sumsq3_rows[2];
 1084|  3.83k|        sum3_ptrs[0] = sum3_rows[0];
 1085|  3.83k|        sum3_ptrs[1] = sum3_rows[1];
 1086|  3.83k|        sum3_ptrs[2] = sum3_rows[2];
 1087|       |
 1088|  3.83k|        sgr_box35_row_h(sumsq3_rows[0], sum3_rows[0],
 1089|  3.83k|                        sumsq5_rows[0], sum5_rows[0],
 1090|  3.83k|                        NULL, lpf, w, edges);
 1091|  3.83k|        lpf += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.83k|#define PXSTRIDE(x) (x)
  ------------------
 1092|  3.83k|        sgr_box35_row_h(sumsq3_rows[1], sum3_rows[1],
 1093|  3.83k|                        sumsq5_rows[1], sum5_rows[1],
 1094|  3.83k|                        NULL, lpf, w, edges);
 1095|       |
 1096|  3.83k|        sgr_box35_row_h(sumsq3_rows[2], sum3_rows[2],
 1097|  3.83k|                        sumsq5_rows[2], sum5_rows[2],
 1098|  3.83k|                        left, src, w, edges);
 1099|  3.83k|        left++;
 1100|  3.83k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.83k|#define PXSTRIDE(x) (x)
  ------------------
 1101|       |
 1102|  3.83k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1103|  3.83k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.83k|#define BITDEPTH_MAX 0xff
  ------------------
 1104|  3.83k|        rotate(A3_ptrs, B3_ptrs, 4);
 1105|       |
 1106|  3.83k|        if (--h <= 0)
  ------------------
  |  Branch (1106:13): [True: 197, False: 3.63k]
  ------------------
 1107|    197|            goto vert_1;
 1108|       |
 1109|  3.63k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1110|  3.63k|                        sumsq5_rows[3], sum5_rows[3],
 1111|  3.63k|                        left, src, w, edges);
 1112|  3.63k|        left++;
 1113|  3.63k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.63k|#define PXSTRIDE(x) (x)
  ------------------
 1114|  3.63k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1115|  3.63k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.63k|#define BITDEPTH_MAX 0xff
  ------------------
 1116|  3.63k|        rotate(A5_ptrs, B5_ptrs, 2);
 1117|  3.63k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1118|  3.63k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.63k|#define BITDEPTH_MAX 0xff
  ------------------
 1119|  3.63k|        rotate(A3_ptrs, B3_ptrs, 4);
 1120|       |
 1121|  3.63k|        if (--h <= 0)
  ------------------
  |  Branch (1121:13): [True: 206, False: 3.42k]
  ------------------
 1122|    206|            goto vert_2;
 1123|       |
 1124|       |        // ptrs are rotated by 2; both [3] and [4] now point at rows[0]; set
 1125|       |        // one of them to point at the previously unused rows[4].
 1126|  3.42k|        sumsq5_ptrs[3] = sumsq5_rows[4];
 1127|  3.42k|        sum5_ptrs[3] = sum5_rows[4];
 1128|  3.69k|    } else {
 1129|  3.69k|        sumsq5_ptrs[0] = sumsq5_rows[0];
 1130|  3.69k|        sumsq5_ptrs[1] = sumsq5_rows[0];
 1131|  3.69k|        sumsq5_ptrs[2] = sumsq5_rows[0];
 1132|  3.69k|        sumsq5_ptrs[3] = sumsq5_rows[0];
 1133|  3.69k|        sumsq5_ptrs[4] = sumsq5_rows[0];
 1134|  3.69k|        sum5_ptrs[0] = sum5_rows[0];
 1135|  3.69k|        sum5_ptrs[1] = sum5_rows[0];
 1136|  3.69k|        sum5_ptrs[2] = sum5_rows[0];
 1137|  3.69k|        sum5_ptrs[3] = sum5_rows[0];
 1138|  3.69k|        sum5_ptrs[4] = sum5_rows[0];
 1139|       |
 1140|  3.69k|        sumsq3_ptrs[0] = sumsq3_rows[0];
 1141|  3.69k|        sumsq3_ptrs[1] = sumsq3_rows[0];
 1142|  3.69k|        sumsq3_ptrs[2] = sumsq3_rows[0];
 1143|  3.69k|        sum3_ptrs[0] = sum3_rows[0];
 1144|  3.69k|        sum3_ptrs[1] = sum3_rows[0];
 1145|  3.69k|        sum3_ptrs[2] = sum3_rows[0];
 1146|       |
 1147|  3.69k|        sgr_box35_row_h(sumsq3_rows[0], sum3_rows[0],
 1148|  3.69k|                        sumsq5_rows[0], sum5_rows[0],
 1149|  3.69k|                        left, src, w, edges);
 1150|  3.69k|        left++;
 1151|  3.69k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.69k|#define PXSTRIDE(x) (x)
  ------------------
 1152|       |
 1153|  3.69k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1154|  3.69k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.69k|#define BITDEPTH_MAX 0xff
  ------------------
 1155|  3.69k|        rotate(A3_ptrs, B3_ptrs, 4);
 1156|       |
 1157|  3.69k|        if (--h <= 0)
  ------------------
  |  Branch (1157:13): [True: 201, False: 3.49k]
  ------------------
 1158|    201|            goto vert_1;
 1159|       |
 1160|  3.49k|        sumsq5_ptrs[4] = sumsq5_rows[1];
 1161|  3.49k|        sum5_ptrs[4] = sum5_rows[1];
 1162|       |
 1163|  3.49k|        sumsq3_ptrs[2] = sumsq3_rows[1];
 1164|  3.49k|        sum3_ptrs[2] = sum3_rows[1];
 1165|       |
 1166|  3.49k|        sgr_box35_row_h(sumsq3_rows[1], sum3_rows[1],
 1167|  3.49k|                        sumsq5_rows[1], sum5_rows[1],
 1168|  3.49k|                        left, src, w, edges);
 1169|  3.49k|        left++;
 1170|  3.49k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.49k|#define PXSTRIDE(x) (x)
  ------------------
 1171|       |
 1172|  3.49k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1173|  3.49k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.49k|#define BITDEPTH_MAX 0xff
  ------------------
 1174|  3.49k|        rotate(A5_ptrs, B5_ptrs, 2);
 1175|  3.49k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1176|  3.49k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.49k|#define BITDEPTH_MAX 0xff
  ------------------
 1177|  3.49k|        rotate(A3_ptrs, B3_ptrs, 4);
 1178|       |
 1179|  3.49k|        if (--h <= 0)
  ------------------
  |  Branch (1179:13): [True: 212, False: 3.27k]
  ------------------
 1180|    212|            goto vert_2;
 1181|       |
 1182|  3.27k|        sumsq5_ptrs[3] = sumsq5_rows[2];
 1183|  3.27k|        sumsq5_ptrs[4] = sumsq5_rows[3];
 1184|  3.27k|        sum5_ptrs[3] = sum5_rows[2];
 1185|  3.27k|        sum5_ptrs[4] = sum5_rows[3];
 1186|       |
 1187|  3.27k|        sumsq3_ptrs[2] = sumsq3_rows[2];
 1188|  3.27k|        sum3_ptrs[2] = sum3_rows[2];
 1189|       |
 1190|  3.27k|        sgr_box35_row_h(sumsq3_rows[2], sum3_rows[2],
 1191|  3.27k|                        sumsq5_rows[2], sum5_rows[2],
 1192|  3.27k|                        left, src, w, edges);
 1193|  3.27k|        left++;
 1194|  3.27k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.27k|#define PXSTRIDE(x) (x)
  ------------------
 1195|       |
 1196|  3.27k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1197|  3.27k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.27k|#define BITDEPTH_MAX 0xff
  ------------------
 1198|  3.27k|        rotate(A3_ptrs, B3_ptrs, 4);
 1199|       |
 1200|  3.27k|        if (--h <= 0)
  ------------------
  |  Branch (1200:13): [True: 208, False: 3.07k]
  ------------------
 1201|    208|            goto odd;
 1202|       |
 1203|  3.07k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1204|  3.07k|                        sumsq5_rows[3], sum5_rows[3],
 1205|  3.07k|                        left, src, w, edges);
 1206|  3.07k|        left++;
 1207|  3.07k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.07k|#define PXSTRIDE(x) (x)
  ------------------
 1208|       |
 1209|  3.07k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1210|  3.07k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.07k|#define BITDEPTH_MAX 0xff
  ------------------
 1211|  3.07k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1212|  3.07k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.07k|#define BITDEPTH_MAX 0xff
  ------------------
 1213|  3.07k|        sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1214|  3.07k|                       w, 2, params->sgr.w0, params->sgr.w1
 1215|  3.07k|                       HIGHBD_TAIL_SUFFIX);
 1216|       |
 1217|  3.07k|        if (--h <= 0)
  ------------------
  |  Branch (1217:13): [True: 531, False: 2.53k]
  ------------------
 1218|    531|            goto vert_2;
 1219|       |
 1220|       |        // ptrs are rotated by 2; both [3] and [4] now point at rows[0]; set
 1221|       |        // one of them to point at the previously unused rows[4].
 1222|  2.53k|        sumsq5_ptrs[3] = sumsq5_rows[4];
 1223|  2.53k|        sum5_ptrs[3] = sum5_rows[4];
 1224|  2.53k|    }
 1225|       |
 1226|   104k|    do {
 1227|   104k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1228|   104k|                        sumsq5_ptrs[3], sum5_ptrs[3],
 1229|   104k|                        left, src, w, edges);
 1230|   104k|        left++;
 1231|   104k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|   104k|#define PXSTRIDE(x) (x)
  ------------------
 1232|       |
 1233|   104k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1234|   104k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|   104k|#define BITDEPTH_MAX 0xff
  ------------------
 1235|   104k|        rotate(A3_ptrs, B3_ptrs, 4);
 1236|       |
 1237|   104k|        if (--h <= 0)
  ------------------
  |  Branch (1237:13): [True: 1.26k, False: 103k]
  ------------------
 1238|  1.26k|            goto odd;
 1239|       |
 1240|   103k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1241|   103k|                        sumsq5_ptrs[4], sum5_ptrs[4],
 1242|   103k|                        left, src, w, edges);
 1243|   103k|        left++;
 1244|   103k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|   103k|#define PXSTRIDE(x) (x)
  ------------------
 1245|       |
 1246|   103k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1247|   103k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|   103k|#define BITDEPTH_MAX 0xff
  ------------------
 1248|   103k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1249|   103k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|   103k|#define BITDEPTH_MAX 0xff
  ------------------
 1250|   103k|        sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1251|   103k|                       w, 2, params->sgr.w0, params->sgr.w1
 1252|   103k|                       HIGHBD_TAIL_SUFFIX);
 1253|   103k|    } while (--h > 0);
  ------------------
  |  Branch (1253:14): [True: 98.7k, False: 4.70k]
  ------------------
 1254|       |
 1255|  4.70k|    if (!(edges & LR_HAVE_BOTTOM))
  ------------------
  |  Branch (1255:9): [True: 758, False: 3.94k]
  ------------------
 1256|    758|        goto vert_2;
 1257|       |
 1258|  3.94k|    sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1259|  3.94k|                    sumsq5_ptrs[3], sum5_ptrs[3],
 1260|  3.94k|                    NULL, lpf_bottom, w, edges);
 1261|  3.94k|    lpf_bottom += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.94k|#define PXSTRIDE(x) (x)
  ------------------
 1262|  3.94k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1263|  3.94k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.94k|#define BITDEPTH_MAX 0xff
  ------------------
 1264|  3.94k|    rotate(A3_ptrs, B3_ptrs, 4);
 1265|       |
 1266|  3.94k|    sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1267|  3.94k|                    sumsq5_ptrs[4], sum5_ptrs[4],
 1268|  3.94k|                    NULL, lpf_bottom, w, edges);
 1269|       |
 1270|  5.65k|output_2:
 1271|  5.65k|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1272|  5.65k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  5.65k|#define BITDEPTH_MAX 0xff
  ------------------
 1273|  5.65k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1274|  5.65k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  5.65k|#define BITDEPTH_MAX 0xff
  ------------------
 1275|  5.65k|    sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1276|  5.65k|                   w, 2, params->sgr.w0, params->sgr.w1
 1277|  5.65k|                   HIGHBD_TAIL_SUFFIX);
 1278|  5.65k|    return;
 1279|       |
 1280|  1.70k|vert_2:
 1281|       |    // Duplicate the last row twice more
 1282|  1.70k|    sumsq5_ptrs[3] = sumsq5_ptrs[2];
 1283|  1.70k|    sumsq5_ptrs[4] = sumsq5_ptrs[2];
 1284|  1.70k|    sum5_ptrs[3] = sum5_ptrs[2];
 1285|  1.70k|    sum5_ptrs[4] = sum5_ptrs[2];
 1286|       |
 1287|  1.70k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1288|  1.70k|    sum3_ptrs[2] = sum3_ptrs[1];
 1289|  1.70k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1290|  1.70k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.70k|#define BITDEPTH_MAX 0xff
  ------------------
 1291|  1.70k|    rotate(A3_ptrs, B3_ptrs, 4);
 1292|       |
 1293|  1.70k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1294|  1.70k|    sum3_ptrs[2] = sum3_ptrs[1];
 1295|       |
 1296|  1.70k|    goto output_2;
 1297|       |
 1298|  1.47k|odd:
 1299|       |    // Copy the last row as padding once
 1300|  1.47k|    sumsq5_ptrs[4] = sumsq5_ptrs[3];
 1301|  1.47k|    sum5_ptrs[4] = sum5_ptrs[3];
 1302|       |
 1303|  1.47k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1304|  1.47k|    sum3_ptrs[2] = sum3_ptrs[1];
 1305|       |
 1306|  1.47k|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1307|  1.47k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.47k|#define BITDEPTH_MAX 0xff
  ------------------
 1308|  1.47k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1309|  1.47k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.47k|#define BITDEPTH_MAX 0xff
  ------------------
 1310|  1.47k|    sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1311|  1.47k|                   w, 2, params->sgr.w0, params->sgr.w1
 1312|  1.47k|                   HIGHBD_TAIL_SUFFIX);
 1313|       |
 1314|  1.86k|output_1:
 1315|       |    // Duplicate the last row twice more
 1316|  1.86k|    sumsq5_ptrs[3] = sumsq5_ptrs[2];
 1317|  1.86k|    sumsq5_ptrs[4] = sumsq5_ptrs[2];
 1318|  1.86k|    sum5_ptrs[3] = sum5_ptrs[2];
 1319|  1.86k|    sum5_ptrs[4] = sum5_ptrs[2];
 1320|       |
 1321|  1.86k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1322|  1.86k|    sum3_ptrs[2] = sum3_ptrs[1];
 1323|       |
 1324|  1.86k|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1325|  1.86k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.86k|#define BITDEPTH_MAX 0xff
  ------------------
 1326|  1.86k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1327|  1.86k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.86k|#define BITDEPTH_MAX 0xff
  ------------------
 1328|  1.86k|    rotate(A3_ptrs, B3_ptrs, 4);
 1329|       |    // Output only one row
 1330|  1.86k|    sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1331|  1.86k|                   w, 1, params->sgr.w0, params->sgr.w1
 1332|  1.86k|                   HIGHBD_TAIL_SUFFIX);
 1333|  1.86k|    return;
 1334|       |
 1335|    398|vert_1:
 1336|       |    // Copy the last row as padding once
 1337|    398|    sumsq5_ptrs[4] = sumsq5_ptrs[3];
 1338|    398|    sum5_ptrs[4] = sum5_ptrs[3];
 1339|       |
 1340|    398|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1341|    398|    sum3_ptrs[2] = sum3_ptrs[1];
 1342|       |
 1343|    398|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1344|    398|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    398|#define BITDEPTH_MAX 0xff
  ------------------
 1345|    398|    rotate(A5_ptrs, B5_ptrs, 2);
 1346|    398|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1347|    398|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|    398|#define BITDEPTH_MAX 0xff
  ------------------
 1348|    398|    rotate(A3_ptrs, B3_ptrs, 4);
 1349|       |
 1350|    398|    goto output_1;
 1351|  1.47k|}
looprestoration_tmpl.c:sgr_box35_row_h:
  464|   244k|{
  465|   244k|    sgr_box3_row_h(sumsq3, sum3, left, src, w, edges);
  466|   244k|    sgr_box5_row_h(sumsq5, sum5, left, src, w, edges);
  467|   244k|}
looprestoration_tmpl.c:sgr_finish_mix:
  663|   115k|{
  664|   115k|    ALIGN_STK_16(coef, tmp5, 2*FILTER_OUT_STRIDE,);
  ------------------
  |  |  100|   115k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   115k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  665|   115k|    ALIGN_STK_16(coef, tmp3, 2*FILTER_OUT_STRIDE,);
  ------------------
  |  |  100|   115k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   115k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  666|       |
  667|   115k|    sgr_finish_filter2(tmp5, *dst, stride, A5_ptrs, B5_ptrs, w, h);
  668|   115k|    sgr_finish_filter_row1(tmp3, *dst, A3_ptrs, B3_ptrs, w);
  669|   115k|    if (h > 1)
  ------------------
  |  Branch (669:9): [True: 113k, False: 1.86k]
  ------------------
  670|   113k|        sgr_finish_filter_row1(tmp3 + FILTER_OUT_STRIDE, *dst + PXSTRIDE(stride),
  ------------------
  |  |  572|   113k|#define FILTER_OUT_STRIDE (384)
  ------------------
                      sgr_finish_filter_row1(tmp3 + FILTER_OUT_STRIDE, *dst + PXSTRIDE(stride),
  ------------------
  |  |   53|   113k|#define PXSTRIDE(x) (x)
  ------------------
  671|   113k|                               &A3_ptrs[1], &B3_ptrs[1], w);
  672|   115k|    sgr_weighted2(*dst, stride, tmp5, tmp3, w, h, w0, w1 HIGHBD_TAIL_SUFFIX);
  673|   115k|    *dst += h*PXSTRIDE(stride);
  ------------------
  |  |   53|   115k|#define PXSTRIDE(x) (x)
  ------------------
  674|   115k|    rotate(A5_ptrs, B5_ptrs, 2);
  675|   115k|    rotate(A3_ptrs, B3_ptrs, 4);
  676|   115k|}
looprestoration_tmpl.c:sgr_weighted2:
  616|   115k|{
  617|   344k|    for (int j = 0; j < h; j++) {
  ------------------
  |  Branch (617:21): [True: 229k, False: 115k]
  ------------------
  618|  15.5M|        for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (618:25): [True: 15.3M, False: 229k]
  ------------------
  619|  15.3M|            const int v = w0 * t1[i] + w1 * t2[i];
  620|  15.3M|            dst[i] = iclip_pixel(dst[i] + ((v + (1 << 10)) >> 11));
  ------------------
  |  |   49|  15.3M|#define iclip_pixel iclip_u8
  ------------------
  621|  15.3M|        }
  622|   229k|        dst += PXSTRIDE(dst_stride);
  ------------------
  |  |   53|   229k|#define PXSTRIDE(x) (x)
  ------------------
  623|   229k|        t1 += FILTER_OUT_STRIDE;
  ------------------
  |  |  572|   229k|#define FILTER_OUT_STRIDE (384)
  ------------------
  624|   229k|        t2 += FILTER_OUT_STRIDE;
  ------------------
  |  |  572|   229k|#define FILTER_OUT_STRIDE (384)
  ------------------
  625|   229k|    }
  626|   115k|}
dav1d_loop_restoration_dsp_init_16bpc:
 1367|  6.93k|{
 1368|  6.93k|    c->wiener[0] = c->wiener[1] = wiener_c;
 1369|  6.93k|    c->sgr[0] = sgr_5x5_c;
 1370|  6.93k|    c->sgr[1] = sgr_3x3_c;
 1371|  6.93k|    c->sgr[2] = sgr_mix_c;
 1372|       |
 1373|  6.93k|#if HAVE_ASM
 1374|       |#if ARCH_AARCH64 || ARCH_ARM
 1375|       |    loop_restoration_dsp_init_arm(c, bpc);
 1376|       |#elif ARCH_LOONGARCH64
 1377|       |    loop_restoration_dsp_init_loongarch(c, bpc);
 1378|       |#elif ARCH_PPC64LE
 1379|       |    loop_restoration_dsp_init_ppc(c, bpc);
 1380|       |#elif ARCH_X86
 1381|       |    loop_restoration_dsp_init_x86(c, bpc);
 1382|  6.93k|#endif
 1383|  6.93k|#endif
 1384|  6.93k|}

dav1d_lr_sbrow_8bpc:
  170|  8.14k|{
  171|  8.14k|    const int offset_y = 8 * !!sby;
  172|  8.14k|    const ptrdiff_t *const dst_stride = f->sr_cur.p.stride;
  173|  8.14k|    const int restore_planes = f->lf.restore_planes;
  174|  8.14k|    const int not_last = sby + 1 < f->sbh;
  175|       |
  176|  8.14k|    if (restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (176:9): [True: 6.01k, False: 2.12k]
  ------------------
  177|  6.01k|        const int h = f->sr_cur.p.p.h;
  178|  6.01k|        const int w = f->sr_cur.p.p.w;
  179|  6.01k|        const int next_row_y = (sby + 1) << (6 + f->seq_hdr->sb128);
  180|  6.01k|        const int row_h = imin(next_row_y - 8 * not_last, h);
  181|  6.01k|        const int y_stripe = (sby << (6 + f->seq_hdr->sb128)) - offset_y;
  182|  6.01k|        lr_sbrow(f, dst[0] - offset_y * PXSTRIDE(dst_stride[0]), y_stripe, w,
  ------------------
  |  |   53|  6.01k|#define PXSTRIDE(x) (x)
  ------------------
  183|  6.01k|                 h, row_h, 0);
  184|  6.01k|    }
  185|  8.14k|    if (restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) {
  ------------------
  |  Branch (185:9): [True: 5.76k, False: 2.37k]
  ------------------
  186|  5.76k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  187|  5.76k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  188|  5.76k|        const int h = (f->sr_cur.p.p.h + ss_ver) >> ss_ver;
  189|  5.76k|        const int w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
  190|  5.76k|        const int next_row_y = (sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128);
  191|  5.76k|        const int row_h = imin(next_row_y - (8 >> ss_ver) * not_last, h);
  192|  5.76k|        const int offset_uv = offset_y >> ss_ver;
  193|  5.76k|        const int y_stripe = (sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
  194|  5.76k|        if (restore_planes & LR_RESTORE_U)
  ------------------
  |  Branch (194:13): [True: 4.52k, False: 1.24k]
  ------------------
  195|  4.52k|            lr_sbrow(f, dst[1] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  ------------------
  |  |   53|  4.52k|#define PXSTRIDE(x) (x)
  ------------------
  196|  4.52k|                     w, h, row_h, 1);
  197|       |
  198|  5.76k|        if (restore_planes & LR_RESTORE_V)
  ------------------
  |  Branch (198:13): [True: 3.87k, False: 1.89k]
  ------------------
  199|  3.87k|            lr_sbrow(f, dst[2] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  ------------------
  |  |   53|  3.87k|#define PXSTRIDE(x) (x)
  ------------------
  200|  3.87k|                     w, h, row_h, 2);
  201|  5.76k|    }
  202|  8.14k|}
lr_apply_tmpl.c:lr_sbrow:
  109|  35.0k|{
  110|  35.0k|    const int chroma = !!plane;
  111|  35.0k|    const int ss_ver = chroma & (f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420);
  112|  35.0k|    const int ss_hor = chroma & (f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444);
  113|  35.0k|    const ptrdiff_t p_stride = f->sr_cur.p.stride[chroma];
  114|       |
  115|  35.0k|    const int unit_size_log2 = f->frame_hdr->restoration.unit_size[!!plane];
  116|  35.0k|    const int unit_size = 1 << unit_size_log2;
  117|  35.0k|    const int half_unit_size = unit_size >> 1;
  118|  35.0k|    const int max_unit_size = unit_size + half_unit_size;
  119|       |
  120|       |    // Y coordinate of the sbrow (y is 8 luma pixel rows above row_y)
  121|  35.0k|    const int row_y = y + ((8 >> ss_ver) * !!y);
  122|       |
  123|       |    // FIXME This is an ugly hack to lookup the proper AV1Filter unit for
  124|       |    // chroma planes. Question: For Multithreaded decoding, is it better
  125|       |    // to store the chroma LR information with collocated Luma information?
  126|       |    // In other words. For a chroma restoration unit locate at 128,128 and
  127|       |    // with a 4:2:0 chroma subsampling, do we store the filter information at
  128|       |    // the AV1Filter unit located at (128,128) or (256,256)
  129|       |    // TODO Support chroma subsampling.
  130|  35.0k|    const int shift_hor = 7 - ss_hor;
  131|       |
  132|       |    /* maximum sbrow height is 128 + 8 rows offset */
  133|  35.0k|    ALIGN_STK_16(pixel, pre_lr_border, 2, [128 + 8][4]);
  ------------------
  |  |  100|  35.0k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  35.0k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  134|  35.0k|    const Av1RestorationUnit *lr[2];
  135|       |
  136|  35.0k|    enum LrEdgeFlags edges = (y > 0 ? LR_HAVE_TOP : 0) | LR_HAVE_RIGHT;
  ------------------
  |  Branch (136:31): [True: 25.0k, False: 9.93k]
  ------------------
  137|       |
  138|  35.0k|    int aligned_unit_pos = row_y & ~(unit_size - 1);
  139|  35.0k|    if (aligned_unit_pos && aligned_unit_pos + half_unit_size > h)
  ------------------
  |  Branch (139:9): [True: 23.2k, False: 11.7k]
  |  Branch (139:29): [True: 846, False: 22.3k]
  ------------------
  140|    846|        aligned_unit_pos -= unit_size;
  141|  35.0k|    aligned_unit_pos <<= ss_ver;
  142|  35.0k|    const int sb_idx = (aligned_unit_pos >> 7) * f->sr_sb128w;
  143|  35.0k|    const int unit_idx = ((aligned_unit_pos >> 6) & 1) << 1;
  144|  35.0k|    lr[0] = &f->lf.lr_mask[sb_idx].lr[plane][unit_idx];
  145|  35.0k|    int restore = lr[0]->type != DAV1D_RESTORATION_NONE;
  146|  35.0k|    int x = 0, bit = 0;
  147|  76.6k|    for (; x + max_unit_size <= w; p += unit_size, edges |= LR_HAVE_LEFT, bit ^= 1) {
  ------------------
  |  Branch (147:12): [True: 41.6k, False: 35.0k]
  ------------------
  148|  41.6k|        const int next_x = x + unit_size;
  149|  41.6k|        const int next_u_idx = unit_idx + ((next_x >> (shift_hor - 1)) & 1);
  150|  41.6k|        lr[!bit] =
  151|  41.6k|            &f->lf.lr_mask[sb_idx + (next_x >> shift_hor)].lr[plane][next_u_idx];
  152|  41.6k|        const int restore_next = lr[!bit]->type != DAV1D_RESTORATION_NONE;
  153|  41.6k|        if (restore_next)
  ------------------
  |  Branch (153:13): [True: 19.4k, False: 22.2k]
  ------------------
  154|  19.4k|            backup4xU(pre_lr_border[bit], p + unit_size - 4, p_stride, row_h - y);
  155|  41.6k|        if (restore)
  ------------------
  |  Branch (155:13): [True: 19.5k, False: 22.1k]
  ------------------
  156|  19.5k|            lr_stripe(f, p, pre_lr_border[!bit], x, y, plane, unit_size, row_h,
  157|  19.5k|                      lr[bit], edges);
  158|  41.6k|        x = next_x;
  159|  41.6k|        restore = restore_next;
  160|  41.6k|    }
  161|  35.0k|    if (restore) {
  ------------------
  |  Branch (161:9): [True: 18.4k, False: 16.5k]
  ------------------
  162|  18.4k|        edges &= ~LR_HAVE_RIGHT;
  163|  18.4k|        const int unit_w = w - x;
  164|  18.4k|        lr_stripe(f, p, pre_lr_border[!bit], x, y, plane, unit_w, row_h, lr[bit], edges);
  165|  18.4k|    }
  166|  35.0k|}
lr_apply_tmpl.c:backup4xU:
  102|  19.4k|{
  103|   744k|    for (; u > 0; u--, dst++, src += PXSTRIDE(src_stride))
  ------------------
  |  |   53|   724k|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (103:12): [True: 724k, False: 19.4k]
  ------------------
  104|   724k|        pixel_copy(dst, src, 4);
  ------------------
  |  |   47|   724k|#define pixel_copy memcpy
  ------------------
  105|  19.4k|}
lr_apply_tmpl.c:lr_stripe:
   40|  37.9k|{
   41|  37.9k|    const Dav1dDSPContext *const dsp = f->dsp;
   42|  37.9k|    const int chroma = !!plane;
   43|  37.9k|    const int ss_ver = chroma & (f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420);
   44|  37.9k|    const ptrdiff_t stride = f->sr_cur.p.stride[chroma];
   45|  37.9k|    const int sby = (y + (y ? 8 << ss_ver : 0)) >> (6 - ss_ver + f->seq_hdr->sb128);
  ------------------
  |  Branch (45:27): [True: 17.6k, False: 20.3k]
  ------------------
   46|  37.9k|    const int have_tt = f->c->n_tc > 1;
   47|  37.9k|    const pixel *lpf = f->lf.lr_lpf_line[plane] +
   48|  37.9k|        have_tt * (sby * (4 << f->seq_hdr->sb128) - 4) * PXSTRIDE(stride) + x;
  ------------------
  |  |   53|  37.9k|#define PXSTRIDE(x) (x)
  ------------------
   49|       |
   50|       |    // The first stripe of the frame is shorter by 8 luma pixel rows.
   51|  37.9k|    int stripe_h = imin((64 - 8 * !y) >> ss_ver, row_h - y);
   52|       |
   53|  37.9k|    looprestorationfilter_fn lr_fn;
   54|  37.9k|    LooprestorationParams params;
   55|  37.9k|    if (lr->type == DAV1D_RESTORATION_WIENER) {
  ------------------
  |  Branch (55:9): [True: 20.3k, False: 17.5k]
  ------------------
   56|  20.3k|        int16_t (*const filter)[8] = params.filter;
   57|  20.3k|        filter[0][0] = filter[0][6] = lr->filter_h[0];
   58|  20.3k|        filter[0][1] = filter[0][5] = lr->filter_h[1];
   59|  20.3k|        filter[0][2] = filter[0][4] = lr->filter_h[2];
   60|  20.3k|        filter[0][3] = -(filter[0][0] + filter[0][1] + filter[0][2]) * 2;
   61|       |#if BITDEPTH != 8
   62|       |        /* For 8-bit SIMD it's beneficial to handle the +128 separately
   63|       |         * in order to avoid overflows. */
   64|       |        filter[0][3] += 128;
   65|       |#endif
   66|       |
   67|  20.3k|        filter[1][0] = filter[1][6] = lr->filter_v[0];
   68|  20.3k|        filter[1][1] = filter[1][5] = lr->filter_v[1];
   69|  20.3k|        filter[1][2] = filter[1][4] = lr->filter_v[2];
   70|  20.3k|        filter[1][3] = 128 - (filter[1][0] + filter[1][1] + filter[1][2]) * 2;
   71|       |
   72|  20.3k|        lr_fn = dsp->lr.wiener[!(filter[0][0] | filter[1][0])];
   73|  20.3k|    } else {
   74|  17.5k|        assert(lr->type >= DAV1D_RESTORATION_SGRPROJ);
  ------------------
  |  |  140|  17.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 17.5k]
  |  |  |  Branch (140:68): [Folded, False: 17.5k]
  |  |  ------------------
  ------------------
   75|  17.5k|        const int sgr_idx = lr->type - DAV1D_RESTORATION_SGRPROJ;
   76|  17.5k|        const uint16_t *const sgr_params = dav1d_sgr_params[sgr_idx];
   77|  17.5k|        params.sgr.s0 = sgr_params[0];
   78|  17.5k|        params.sgr.s1 = sgr_params[1];
   79|  17.5k|        params.sgr.w0 = lr->sgr_weights[0];
   80|  17.5k|        params.sgr.w1 = 128 - (lr->sgr_weights[0] + lr->sgr_weights[1]);
   81|       |
   82|  17.5k|        lr_fn = dsp->lr.sgr[!!sgr_params[0] + !!sgr_params[1] * 2 - 1];
   83|  17.5k|    }
   84|       |
   85|  51.3k|    while (y + stripe_h <= row_h) {
  ------------------
  |  Branch (85:12): [True: 51.3k, False: 0]
  ------------------
   86|       |        // Change the HAVE_BOTTOM bit in edges to (sby + 1 != f->sbh || y + stripe_h != row_h)
   87|  51.3k|        edges ^= (-(sby + 1 != f->sbh || y + stripe_h != row_h) ^ edges) & LR_HAVE_BOTTOM;
  ------------------
  |  Branch (87:21): [True: 25.2k, False: 26.1k]
  |  Branch (87:42): [True: 6.51k, False: 19.6k]
  ------------------
   88|  51.3k|        lr_fn(p, stride, left, lpf, unit_w, stripe_h, &params, edges HIGHBD_CALL_SUFFIX);
   89|       |
   90|  51.3k|        left += stripe_h;
   91|  51.3k|        y += stripe_h;
   92|  51.3k|        p += stripe_h * PXSTRIDE(stride);
  ------------------
  |  |   53|  51.3k|#define PXSTRIDE(x) (x)
  ------------------
   93|  51.3k|        edges |= LR_HAVE_TOP;
   94|  51.3k|        stripe_h = imin(64 >> ss_ver, row_h - y);
   95|  51.3k|        if (stripe_h == 0) break;
  ------------------
  |  Branch (95:13): [True: 37.9k, False: 13.4k]
  ------------------
   96|  13.4k|        lpf += 4 * PXSTRIDE(stride);
  ------------------
  |  |   53|  13.4k|#define PXSTRIDE(x) (x)
  ------------------
   97|  13.4k|    }
   98|  37.9k|}
dav1d_lr_sbrow_16bpc:
  170|  10.8k|{
  171|  10.8k|    const int offset_y = 8 * !!sby;
  172|  10.8k|    const ptrdiff_t *const dst_stride = f->sr_cur.p.stride;
  173|  10.8k|    const int restore_planes = f->lf.restore_planes;
  174|  10.8k|    const int not_last = sby + 1 < f->sbh;
  175|       |
  176|  10.8k|    if (restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (176:9): [True: 7.97k, False: 2.83k]
  ------------------
  177|  7.97k|        const int h = f->sr_cur.p.p.h;
  178|  7.97k|        const int w = f->sr_cur.p.p.w;
  179|  7.97k|        const int next_row_y = (sby + 1) << (6 + f->seq_hdr->sb128);
  180|  7.97k|        const int row_h = imin(next_row_y - 8 * not_last, h);
  181|  7.97k|        const int y_stripe = (sby << (6 + f->seq_hdr->sb128)) - offset_y;
  182|  7.97k|        lr_sbrow(f, dst[0] - offset_y * PXSTRIDE(dst_stride[0]), y_stripe, w,
  183|  7.97k|                 h, row_h, 0);
  184|  7.97k|    }
  185|  10.8k|    if (restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) {
  ------------------
  |  Branch (185:9): [True: 8.02k, False: 2.78k]
  ------------------
  186|  8.02k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  187|  8.02k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  188|  8.02k|        const int h = (f->sr_cur.p.p.h + ss_ver) >> ss_ver;
  189|  8.02k|        const int w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
  190|  8.02k|        const int next_row_y = (sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128);
  191|  8.02k|        const int row_h = imin(next_row_y - (8 >> ss_ver) * not_last, h);
  192|  8.02k|        const int offset_uv = offset_y >> ss_ver;
  193|  8.02k|        const int y_stripe = (sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
  194|  8.02k|        if (restore_planes & LR_RESTORE_U)
  ------------------
  |  Branch (194:13): [True: 6.37k, False: 1.65k]
  ------------------
  195|  6.37k|            lr_sbrow(f, dst[1] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  196|  6.37k|                     w, h, row_h, 1);
  197|       |
  198|  8.02k|        if (restore_planes & LR_RESTORE_V)
  ------------------
  |  Branch (198:13): [True: 6.24k, False: 1.78k]
  ------------------
  199|  6.24k|            lr_sbrow(f, dst[2] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  200|  6.24k|                     w, h, row_h, 2);
  201|  8.02k|    }
  202|  10.8k|}

dav1d_mc_dsp_init_8bpc:
  960|  4.86k|COLD void bitfn(dav1d_mc_dsp_init)(Dav1dMCDSPContext *const c) {
  961|  4.86k|#define init_mc_fns(type, name) do { \
  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  966|  4.86k|} while (0)
  967|       |
  968|  4.86k|    init_mc_fns(FILTER_2D_8TAP_REGULAR,        8tap_regular);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  969|  4.86k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  970|  4.86k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  971|  4.86k|    init_mc_fns(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  972|  4.86k|    init_mc_fns(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  973|  4.86k|    init_mc_fns(FILTER_2D_8TAP_SHARP,          8tap_sharp);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  974|  4.86k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  975|  4.86k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH,         8tap_smooth);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  976|  4.86k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  977|  4.86k|    init_mc_fns(FILTER_2D_BILINEAR,            bilin);
  ------------------
  |  |  961|  4.86k|#define init_mc_fns(type, name) do { \
  |  |  962|  4.86k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  4.86k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  4.86k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  4.86k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  4.86k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 4.86k]
  |  |  ------------------
  ------------------
  978|       |
  979|  4.86k|    c->avg      = avg_c;
  980|  4.86k|    c->w_avg    = w_avg_c;
  981|  4.86k|    c->mask     = mask_c;
  982|  4.86k|    c->blend    = blend_c;
  983|  4.86k|    c->blend_v  = blend_v_c;
  984|  4.86k|    c->blend_h  = blend_h_c;
  985|  4.86k|    c->w_mask[0] = w_mask_444_c;
  986|  4.86k|    c->w_mask[1] = w_mask_422_c;
  987|  4.86k|    c->w_mask[2] = w_mask_420_c;
  988|  4.86k|    c->warp8x8  = warp_affine_8x8_c;
  989|  4.86k|    c->warp8x8t = warp_affine_8x8t_c;
  990|  4.86k|    c->emu_edge = emu_edge_c;
  991|  4.86k|    c->resize   = resize_c;
  992|       |
  993|  4.86k|#if HAVE_ASM
  994|       |#if ARCH_AARCH64 || ARCH_ARM
  995|       |    mc_dsp_init_arm(c);
  996|       |#elif ARCH_LOONGARCH64
  997|       |    mc_dsp_init_loongarch(c);
  998|       |#elif ARCH_PPC64LE
  999|       |    mc_dsp_init_ppc(c);
 1000|       |#elif ARCH_RISCV
 1001|       |    mc_dsp_init_riscv(c);
 1002|       |#elif ARCH_X86
 1003|       |    mc_dsp_init_x86(c);
 1004|  4.86k|#endif
 1005|  4.86k|#endif
 1006|  4.86k|}
dav1d_mc_dsp_init_16bpc:
  960|  6.93k|COLD void bitfn(dav1d_mc_dsp_init)(Dav1dMCDSPContext *const c) {
  961|  6.93k|#define init_mc_fns(type, name) do { \
  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  966|  6.93k|} while (0)
  967|       |
  968|  6.93k|    init_mc_fns(FILTER_2D_8TAP_REGULAR,        8tap_regular);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  969|  6.93k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  970|  6.93k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  971|  6.93k|    init_mc_fns(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  972|  6.93k|    init_mc_fns(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  973|  6.93k|    init_mc_fns(FILTER_2D_8TAP_SHARP,          8tap_sharp);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  974|  6.93k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  975|  6.93k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH,         8tap_smooth);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  976|  6.93k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  977|  6.93k|    init_mc_fns(FILTER_2D_BILINEAR,            bilin);
  ------------------
  |  |  961|  6.93k|#define init_mc_fns(type, name) do { \
  |  |  962|  6.93k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  6.93k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  6.93k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  6.93k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  6.93k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 6.93k]
  |  |  ------------------
  ------------------
  978|       |
  979|  6.93k|    c->avg      = avg_c;
  980|  6.93k|    c->w_avg    = w_avg_c;
  981|  6.93k|    c->mask     = mask_c;
  982|  6.93k|    c->blend    = blend_c;
  983|  6.93k|    c->blend_v  = blend_v_c;
  984|  6.93k|    c->blend_h  = blend_h_c;
  985|  6.93k|    c->w_mask[0] = w_mask_444_c;
  986|  6.93k|    c->w_mask[1] = w_mask_422_c;
  987|  6.93k|    c->w_mask[2] = w_mask_420_c;
  988|  6.93k|    c->warp8x8  = warp_affine_8x8_c;
  989|  6.93k|    c->warp8x8t = warp_affine_8x8t_c;
  990|  6.93k|    c->emu_edge = emu_edge_c;
  991|  6.93k|    c->resize   = resize_c;
  992|       |
  993|  6.93k|#if HAVE_ASM
  994|       |#if ARCH_AARCH64 || ARCH_ARM
  995|       |    mc_dsp_init_arm(c);
  996|       |#elif ARCH_LOONGARCH64
  997|       |    mc_dsp_init_loongarch(c);
  998|       |#elif ARCH_PPC64LE
  999|       |    mc_dsp_init_ppc(c);
 1000|       |#elif ARCH_RISCV
 1001|       |    mc_dsp_init_riscv(c);
 1002|       |#elif ARCH_X86
 1003|       |    mc_dsp_init_x86(c);
 1004|  6.93k|#endif
 1005|  6.93k|#endif
 1006|  6.93k|}

dav1d_mem_pool_push:
  224|  88.6k|void dav1d_mem_pool_push(Dav1dMemPool *const pool, Dav1dMemPoolBuffer *const buf) {
  225|  88.6k|    pthread_mutex_lock(&pool->lock);
  226|  88.6k|    const int ref_cnt = --pool->ref_cnt;
  227|  88.6k|    if (!pool->end) {
  ------------------
  |  Branch (227:9): [True: 88.6k, False: 0]
  ------------------
  228|  88.6k|        buf->next = pool->buf;
  229|  88.6k|        pool->buf = buf;
  230|  88.6k|        pthread_mutex_unlock(&pool->lock);
  231|  88.6k|        assert(ref_cnt > 0);
  ------------------
  |  |  140|  88.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 88.6k]
  |  |  |  Branch (140:68): [Folded, False: 88.6k]
  |  |  ------------------
  ------------------
  232|  88.6k|    } else {
  233|      0|        pthread_mutex_unlock(&pool->lock);
  234|      0|        dav1d_free_aligned(buf->data);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  235|      0|        if (!ref_cnt) mem_pool_destroy(pool);
  ------------------
  |  Branch (235:13): [True: 0, False: 0]
  ------------------
  236|      0|    }
  237|  88.6k|}
dav1d_mem_pool_pop:
  239|  88.6k|Dav1dMemPoolBuffer *dav1d_mem_pool_pop(Dav1dMemPool *const pool, const size_t size) {
  240|  88.6k|    assert(!(size & (sizeof(void*) - 1)));
  ------------------
  |  |  140|  88.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 88.6k]
  |  |  |  Branch (140:68): [Folded, False: 88.6k]
  |  |  ------------------
  ------------------
  241|  88.6k|    pthread_mutex_lock(&pool->lock);
  242|  88.6k|    Dav1dMemPoolBuffer *buf = pool->buf;
  243|  88.6k|    pool->ref_cnt++;
  244|  88.6k|    uint8_t *data;
  245|  88.6k|    if (buf) {
  ------------------
  |  Branch (245:9): [True: 10.4k, False: 78.1k]
  ------------------
  246|  10.4k|        pool->buf = buf->next;
  247|  10.4k|        pthread_mutex_unlock(&pool->lock);
  248|  10.4k|        data = buf->data;
  249|  10.4k|        if ((uintptr_t)buf - (uintptr_t)data != size) {
  ------------------
  |  Branch (249:13): [True: 194, False: 10.2k]
  ------------------
  250|       |            /* Reallocate if the size has changed */
  251|    194|            dav1d_free_aligned(data);
  ------------------
  |  |  136|    194|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  252|    194|            goto alloc;
  253|    194|        }
  254|       |#if TRACK_HEAP_ALLOCATIONS
  255|       |        dav1d_track_reuse(pool->type);
  256|       |#endif
  257|  78.1k|    } else {
  258|  78.1k|        pthread_mutex_unlock(&pool->lock);
  259|  78.3k|alloc:
  260|  78.3k|        data = dav1d_alloc_aligned(pool->type,
  ------------------
  |  |  134|  78.3k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
  261|  78.3k|                                   size + sizeof(Dav1dMemPoolBuffer), 64);
  262|  78.3k|        if (!data) {
  ------------------
  |  Branch (262:13): [True: 0, False: 78.3k]
  ------------------
  263|      0|            pthread_mutex_lock(&pool->lock);
  264|      0|            const int ref_cnt = --pool->ref_cnt;
  265|      0|            pthread_mutex_unlock(&pool->lock);
  266|      0|            if (!ref_cnt) mem_pool_destroy(pool);
  ------------------
  |  Branch (266:17): [True: 0, False: 0]
  ------------------
  267|      0|            return NULL;
  268|      0|        }
  269|  78.3k|        buf = (Dav1dMemPoolBuffer*)(data + size);
  270|  78.3k|        buf->data = data;
  271|  78.3k|    }
  272|       |
  273|  88.6k|    return buf;
  274|  88.6k|}
dav1d_mem_pool_init:
  278|  90.8k|{
  279|  90.8k|    Dav1dMemPool *const pool = dav1d_malloc(ALLOC_COMMON_CTX,
  ------------------
  |  |  132|  90.8k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
  280|  90.8k|                                            sizeof(Dav1dMemPool));
  281|  90.8k|    if (pool) {
  ------------------
  |  Branch (281:9): [True: 90.8k, False: 0]
  ------------------
  282|  90.8k|        if (!pthread_mutex_init(&pool->lock, NULL)) {
  ------------------
  |  Branch (282:13): [True: 90.8k, False: 0]
  ------------------
  283|  90.8k|            pool->buf = NULL;
  284|  90.8k|            pool->ref_cnt = 1;
  285|  90.8k|            pool->end = 0;
  286|       |#if TRACK_HEAP_ALLOCATIONS
  287|       |            pool->type = type;
  288|       |#endif
  289|  90.8k|            *ppool = pool;
  290|  90.8k|            return 0;
  291|  90.8k|        }
  292|      0|        dav1d_free(pool);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
  293|      0|    }
  294|      0|    *ppool = NULL;
  295|      0|    return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  296|  90.8k|}
dav1d_mem_pool_end:
  298|  90.8k|COLD void dav1d_mem_pool_end(Dav1dMemPool *const pool) {
  299|  90.8k|    if (pool) {
  ------------------
  |  Branch (299:9): [True: 90.8k, False: 0]
  ------------------
  300|  90.8k|        pthread_mutex_lock(&pool->lock);
  301|  90.8k|        Dav1dMemPoolBuffer *buf = pool->buf;
  302|  90.8k|        const int ref_cnt = --pool->ref_cnt;
  303|  90.8k|        pool->buf = NULL;
  304|  90.8k|        pool->end = 1;
  305|  90.8k|        pthread_mutex_unlock(&pool->lock);
  306|       |
  307|   169k|        while (buf) {
  ------------------
  |  Branch (307:16): [True: 78.1k, False: 90.8k]
  ------------------
  308|  78.1k|            void *const data = buf->data;
  309|  78.1k|            buf = buf->next;
  310|  78.1k|            dav1d_free_aligned(data);
  ------------------
  |  |  136|  78.1k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  311|  78.1k|        }
  312|  90.8k|        if (!ref_cnt) mem_pool_destroy(pool);
  ------------------
  |  Branch (312:13): [True: 90.8k, False: 0]
  ------------------
  313|  90.8k|    }
  314|  90.8k|}
mem.c:mem_pool_destroy:
  219|  90.8k|static COLD void mem_pool_destroy(Dav1dMemPool *const pool) {
  220|  90.8k|    pthread_mutex_destroy(&pool->lock);
  221|  90.8k|    dav1d_free(pool);
  ------------------
  |  |  135|  90.8k|#define dav1d_free(ptr) free(ptr)
  ------------------
  222|  90.8k|}

lib.c:dav1d_alloc_aligned_internal:
   89|  38.9k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  38.9k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  38.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 38.9k]
  |  |  |  Branch (140:68): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  38.9k|    void *ptr;
   95|  38.9k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 38.9k]
  ------------------
   96|  38.9k|    return ptr;
   97|       |#elif HAVE_MEMALIGN
   98|       |    return memalign(align, sz);
   99|       |#elif HAVE_ALIGNED_ALLOC
  100|       |    // The C11 standard specifies that the size parameter
  101|       |    // must be an integral multiple of alignment.
  102|       |    return aligned_alloc(align, ROUND_UP(sz, align));
  103|       |#else
  104|       |    void *const buf = malloc(sz + align + sizeof(void *));
  105|       |    if (!buf) return NULL;
  106|       |
  107|       |    void *const ptr = (void *)(((uintptr_t)buf + sizeof(void *) + align - 1) & ~(align - 1));
  108|       |    ((void **)ptr)[-1] = buf;
  109|       |    return ptr;
  110|       |#endif
  111|  38.9k|}
lib.c:dav1d_free_aligned_internal:
  113|   103k|static inline void dav1d_free_aligned_internal(void *ptr) {
  114|       |#ifdef _WIN32
  115|       |    _aligned_free(ptr);
  116|       |#elif HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_ALIGNED_ALLOC
  117|       |    free(ptr);
  118|       |#else
  119|       |    if (ptr) free(((void **)ptr)[-1]);
  120|       |#endif
  121|   103k|}
lib.c:dav1d_freep_aligned:
  144|  12.9k|static inline void dav1d_freep_aligned(void *ptr) {
  145|  12.9k|    void **mem = (void **) ptr;
  146|  12.9k|    if (*mem) {
  ------------------
  |  Branch (146:9): [True: 12.9k, False: 0]
  ------------------
  147|  12.9k|        dav1d_free_aligned(*mem);
  ------------------
  |  |  136|  12.9k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  148|       |        *mem = NULL;
  149|  12.9k|    }
  150|  12.9k|}
mem.c:dav1d_free_aligned_internal:
  113|  78.3k|static inline void dav1d_free_aligned_internal(void *ptr) {
  114|       |#ifdef _WIN32
  115|       |    _aligned_free(ptr);
  116|       |#elif HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_ALIGNED_ALLOC
  117|       |    free(ptr);
  118|       |#else
  119|       |    if (ptr) free(((void **)ptr)[-1]);
  120|       |#endif
  121|  78.3k|}
mem.c:dav1d_alloc_aligned_internal:
   89|  78.3k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  78.3k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  78.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 78.3k]
  |  |  |  Branch (140:68): [Folded, False: 78.3k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  78.3k|    void *ptr;
   95|  78.3k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 78.3k]
  ------------------
   96|  78.3k|    return ptr;
   97|       |#elif HAVE_MEMALIGN
   98|       |    return memalign(align, sz);
   99|       |#elif HAVE_ALIGNED_ALLOC
  100|       |    // The C11 standard specifies that the size parameter
  101|       |    // must be an integral multiple of alignment.
  102|       |    return aligned_alloc(align, ROUND_UP(sz, align));
  103|       |#else
  104|       |    void *const buf = malloc(sz + align + sizeof(void *));
  105|       |    if (!buf) return NULL;
  106|       |
  107|       |    void *const ptr = (void *)(((uintptr_t)buf + sizeof(void *) + align - 1) & ~(align - 1));
  108|       |    ((void **)ptr)[-1] = buf;
  109|       |    return ptr;
  110|       |#endif
  111|  78.3k|}
ref.c:dav1d_alloc_aligned_internal:
   89|     62|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|     62|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|     62|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 62]
  |  |  |  Branch (140:68): [Folded, False: 62]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|     62|    void *ptr;
   95|     62|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 62]
  ------------------
   96|     62|    return ptr;
   97|       |#elif HAVE_MEMALIGN
   98|       |    return memalign(align, sz);
   99|       |#elif HAVE_ALIGNED_ALLOC
  100|       |    // The C11 standard specifies that the size parameter
  101|       |    // must be an integral multiple of alignment.
  102|       |    return aligned_alloc(align, ROUND_UP(sz, align));
  103|       |#else
  104|       |    void *const buf = malloc(sz + align + sizeof(void *));
  105|       |    if (!buf) return NULL;
  106|       |
  107|       |    void *const ptr = (void *)(((uintptr_t)buf + sizeof(void *) + align - 1) & ~(align - 1));
  108|       |    ((void **)ptr)[-1] = buf;
  109|       |    return ptr;
  110|       |#endif
  111|     62|}
ref.c:dav1d_free_aligned_internal:
  113|     62|static inline void dav1d_free_aligned_internal(void *ptr) {
  114|       |#ifdef _WIN32
  115|       |    _aligned_free(ptr);
  116|       |#elif HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_ALIGNED_ALLOC
  117|       |    free(ptr);
  118|       |#else
  119|       |    if (ptr) free(((void **)ptr)[-1]);
  120|       |#endif
  121|     62|}
refmvs.c:dav1d_free_aligned_internal:
  113|  4.27k|static inline void dav1d_free_aligned_internal(void *ptr) {
  114|       |#ifdef _WIN32
  115|       |    _aligned_free(ptr);
  116|       |#elif HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_ALIGNED_ALLOC
  117|       |    free(ptr);
  118|       |#else
  119|       |    if (ptr) free(((void **)ptr)[-1]);
  120|       |#endif
  121|  4.27k|}
refmvs.c:dav1d_alloc_aligned_internal:
   89|  4.27k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  4.27k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  4.27k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.27k]
  |  |  |  Branch (140:68): [Folded, False: 4.27k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  4.27k|    void *ptr;
   95|  4.27k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 4.27k]
  ------------------
   96|  4.27k|    return ptr;
   97|       |#elif HAVE_MEMALIGN
   98|       |    return memalign(align, sz);
   99|       |#elif HAVE_ALIGNED_ALLOC
  100|       |    // The C11 standard specifies that the size parameter
  101|       |    // must be an integral multiple of alignment.
  102|       |    return aligned_alloc(align, ROUND_UP(sz, align));
  103|       |#else
  104|       |    void *const buf = malloc(sz + align + sizeof(void *));
  105|       |    if (!buf) return NULL;
  106|       |
  107|       |    void *const ptr = (void *)(((uintptr_t)buf + sizeof(void *) + align - 1) & ~(align - 1));
  108|       |    ((void **)ptr)[-1] = buf;
  109|       |    return ptr;
  110|       |#endif
  111|  4.27k|}
decode.c:dav1d_free_aligned_internal:
  113|  47.8k|static inline void dav1d_free_aligned_internal(void *ptr) {
  114|       |#ifdef _WIN32
  115|       |    _aligned_free(ptr);
  116|       |#elif HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_ALIGNED_ALLOC
  117|       |    free(ptr);
  118|       |#else
  119|       |    if (ptr) free(((void **)ptr)[-1]);
  120|       |#endif
  121|  47.8k|}
decode.c:dav1d_alloc_aligned_internal:
   89|  47.8k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  47.8k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  47.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 47.8k]
  |  |  |  Branch (140:68): [Folded, False: 47.8k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  47.8k|    void *ptr;
   95|  47.8k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 47.8k]
  ------------------
   96|  47.8k|    return ptr;
   97|       |#elif HAVE_MEMALIGN
   98|       |    return memalign(align, sz);
   99|       |#elif HAVE_ALIGNED_ALLOC
  100|       |    // The C11 standard specifies that the size parameter
  101|       |    // must be an integral multiple of alignment.
  102|       |    return aligned_alloc(align, ROUND_UP(sz, align));
  103|       |#else
  104|       |    void *const buf = malloc(sz + align + sizeof(void *));
  105|       |    if (!buf) return NULL;
  106|       |
  107|       |    void *const ptr = (void *)(((uintptr_t)buf + sizeof(void *) + align - 1) & ~(align - 1));
  108|       |    ((void **)ptr)[-1] = buf;
  109|       |    return ptr;
  110|       |#endif
  111|  47.8k|}

dav1d_msac_decode_subexp:
   62|   135k|{
   63|   135k|    assert(n >> k == 8);
  ------------------
  |  |  140|   135k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 135k]
  |  |  |  Branch (140:68): [Folded, False: 135k]
  |  |  ------------------
  ------------------
   64|       |
   65|   135k|    unsigned a = 0;
   66|   135k|    if (dav1d_msac_decode_bool_equi(s)) {
  ------------------
  |  |   53|   135k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (66:9): [True: 72.6k, False: 63.1k]
  ------------------
   67|  72.6k|        if (dav1d_msac_decode_bool_equi(s))
  ------------------
  |  |   53|  72.6k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (67:13): [True: 41.5k, False: 31.0k]
  ------------------
   68|  41.5k|            k += dav1d_msac_decode_bool_equi(s) + 1;
  ------------------
  |  |   53|  41.5k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
   69|  72.6k|        a = 1 << k;
   70|  72.6k|    }
   71|   135k|    const unsigned v = dav1d_msac_decode_bools(s, k) + a;
   72|   135k|    return ref * 2 <= n ? inv_recenter(ref, v) :
  ------------------
  |  Branch (72:12): [True: 85.6k, False: 50.1k]
  ------------------
   73|   135k|                          n - 1 - inv_recenter(n - 1 - ref, v);
   74|   135k|}
dav1d_msac_init:
  206|  19.1k|{
  207|  19.1k|    s->buf_pos = data;
  208|  19.1k|    s->buf_end = data + sz;
  209|  19.1k|    s->dif = 0;
  210|  19.1k|    s->rng = 0x8000;
  211|  19.1k|    s->cnt = -15;
  212|  19.1k|    s->allow_update_cdf = !disable_cdf_update_flag;
  213|  19.1k|    ctx_refill(s);
  214|       |
  215|  19.1k|#if ARCH_X86_64 && HAVE_ASM
  216|  19.1k|    s->symbol_adapt16 = dav1d_msac_decode_symbol_adapt_c;
  217|       |
  218|  19.1k|    msac_init_x86(s);
  219|  19.1k|#endif
  220|  19.1k|}
msac.c:ctx_refill:
   41|  19.1k|static inline void ctx_refill(MsacContext *const s) {
   42|  19.1k|    const uint8_t *buf_pos = s->buf_pos;
   43|  19.1k|    const uint8_t *buf_end = s->buf_end;
   44|  19.1k|    int c = EC_WIN_SIZE - s->cnt - 24;
  ------------------
  |  |   39|  19.1k|#define EC_WIN_SIZE (sizeof(ec_win) << 3)
  ------------------
   45|  19.1k|    ec_win dif = s->dif;
   46|   125k|    do {
   47|   125k|        if (buf_pos >= buf_end) {
  ------------------
  |  Branch (47:13): [True: 2.65k, False: 122k]
  ------------------
   48|       |            // set remaining bits to 1;
   49|  2.65k|            dif |= ~(~(ec_win)0xff << c);
   50|  2.65k|            break;
   51|  2.65k|        }
   52|   122k|        dif |= (ec_win)(*buf_pos++ ^ 0xff) << c;
   53|   122k|        c -= 8;
   54|   122k|    } while (c >= 0);
  ------------------
  |  Branch (54:14): [True: 106k, False: 16.5k]
  ------------------
   55|  19.1k|    s->dif = dif;
   56|  19.1k|    s->cnt = EC_WIN_SIZE - c - 24;
  ------------------
  |  |   39|  19.1k|#define EC_WIN_SIZE (sizeof(ec_win) << 3)
  ------------------
   57|  19.1k|    s->buf_pos = buf_pos;
   58|  19.1k|}

decode.c:dav1d_msac_decode_bools:
   94|   202k|static inline unsigned dav1d_msac_decode_bools(MsacContext *const s, unsigned n) {
   95|   202k|    unsigned v = 0;
   96|   433k|    while (n--)
  ------------------
  |  Branch (96:12): [True: 231k, False: 202k]
  ------------------
   97|   231k|        v = (v << 1) | dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|   231k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
   98|   202k|    return v;
   99|   202k|}
decode.c:dav1d_msac_decode_uniform:
  101|  16.2k|static inline int dav1d_msac_decode_uniform(MsacContext *const s, const unsigned n) {
  102|  16.2k|    assert(n > 0);
  ------------------
  |  |  140|  16.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 16.2k]
  |  |  |  Branch (140:68): [Folded, False: 16.2k]
  |  |  ------------------
  ------------------
  103|  16.2k|    const int l = ulog2(n) + 1;
  104|  16.2k|    assert(l > 1);
  ------------------
  |  |  140|  16.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 16.2k]
  |  |  |  Branch (140:68): [Folded, False: 16.2k]
  |  |  ------------------
  ------------------
  105|  16.2k|    const unsigned m = (1 << l) - n;
  106|  16.2k|    const unsigned v = dav1d_msac_decode_bools(s, l - 1);
  107|  16.2k|    return v < m ? v : (v << 1) - m + dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|  3.88k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (107:12): [True: 12.3k, False: 3.88k]
  ------------------
  108|  16.2k|}
msac.c:dav1d_msac_decode_bools:
   94|   135k|static inline unsigned dav1d_msac_decode_bools(MsacContext *const s, unsigned n) {
   95|   135k|    unsigned v = 0;
   96|   562k|    while (n--)
  ------------------
  |  Branch (96:12): [True: 427k, False: 135k]
  ------------------
   97|   427k|        v = (v << 1) | dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|   427k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
   98|   135k|    return v;
   99|   135k|}
recon_tmpl.c:dav1d_msac_decode_bools:
   94|  1.09M|static inline unsigned dav1d_msac_decode_bools(MsacContext *const s, unsigned n) {
   95|  1.09M|    unsigned v = 0;
   96|  3.84M|    while (n--)
  ------------------
  |  Branch (96:12): [True: 2.75M, False: 1.09M]
  ------------------
   97|  2.75M|        v = (v << 1) | dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|  2.75M|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
   98|  1.09M|    return v;
   99|  1.09M|}

dav1d_parse_obus:
 1169|  46.8k|ptrdiff_t dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
 1170|  46.8k|    GetBits gb;
 1171|  46.8k|    int res;
 1172|       |
 1173|  46.8k|    dav1d_init_get_bits(&gb, in->data, in->sz);
 1174|       |
 1175|       |    // obu header
 1176|  46.8k|    const int obu_forbidden_bit = dav1d_get_bit(&gb);
 1177|  46.8k|    if (c->strict_std_compliance && obu_forbidden_bit) goto error;
  ------------------
  |  Branch (1177:9): [True: 0, False: 46.8k]
  |  Branch (1177:37): [True: 0, False: 0]
  ------------------
 1178|  46.8k|    const enum Dav1dObuType type = dav1d_get_bits(&gb, 4);
 1179|  46.8k|    const int has_extension = dav1d_get_bit(&gb);
 1180|  46.8k|    const int has_length_field = dav1d_get_bit(&gb);
 1181|  46.8k|    dav1d_get_bit(&gb); // reserved
 1182|       |
 1183|  46.8k|    int temporal_id = 0, spatial_id = 0;
 1184|  46.8k|    if (has_extension) {
  ------------------
  |  Branch (1184:9): [True: 11.2k, False: 35.6k]
  ------------------
 1185|  11.2k|        temporal_id = dav1d_get_bits(&gb, 3);
 1186|  11.2k|        spatial_id = dav1d_get_bits(&gb, 2);
 1187|  11.2k|        dav1d_get_bits(&gb, 3); // reserved
 1188|  11.2k|    }
 1189|       |
 1190|  46.8k|    if (has_length_field) {
  ------------------
  |  Branch (1190:9): [True: 36.9k, False: 9.89k]
  ------------------
 1191|  36.9k|        const size_t len = dav1d_get_uleb128(&gb);
 1192|  36.9k|        if (len > (size_t)(gb.ptr_end - gb.ptr)) goto error;
  ------------------
  |  Branch (1192:13): [True: 202, False: 36.7k]
  ------------------
 1193|  36.7k|        gb.ptr_end = gb.ptr + len;
 1194|  36.7k|    }
 1195|  46.6k|    if (gb.error) goto error;
  ------------------
  |  Branch (1195:9): [True: 111, False: 46.5k]
  ------------------
 1196|       |
 1197|       |    // We must have read a whole number of bytes at this point (1 byte
 1198|       |    // for the header and whole bytes at a time when reading the
 1199|       |    // leb128 length field).
 1200|  46.5k|    assert(gb.bits_left == 0);
  ------------------
  |  |  140|  46.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 46.5k]
  |  |  |  Branch (140:68): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
 1201|       |
 1202|       |    // skip obu not belonging to the selected temporal/spatial layer
 1203|  46.5k|    if (type != DAV1D_OBU_SEQ_HDR && type != DAV1D_OBU_TD &&
  ------------------
  |  Branch (1203:9): [True: 31.4k, False: 15.0k]
  |  Branch (1203:38): [True: 25.0k, False: 6.39k]
  ------------------
 1204|  25.0k|        has_extension && c->operating_point_idc != 0)
  ------------------
  |  Branch (1204:9): [True: 9.81k, False: 15.2k]
  |  Branch (1204:26): [True: 1.41k, False: 8.39k]
  ------------------
 1205|  1.41k|    {
 1206|  1.41k|        const int in_temporal_layer = (c->operating_point_idc >> temporal_id) & 1;
 1207|  1.41k|        const int in_spatial_layer = (c->operating_point_idc >> (spatial_id + 8)) & 1;
 1208|  1.41k|        if (!in_temporal_layer || !in_spatial_layer)
  ------------------
  |  Branch (1208:13): [True: 265, False: 1.15k]
  |  Branch (1208:35): [True: 359, False: 795]
  ------------------
 1209|    624|            return gb.ptr_end - gb.ptr_start;
 1210|  1.41k|    }
 1211|       |
 1212|  45.9k|    switch (type) {
 1213|  15.0k|    case DAV1D_OBU_SEQ_HDR: {
  ------------------
  |  Branch (1213:5): [True: 15.0k, False: 30.8k]
  ------------------
 1214|  15.0k|        Dav1dRef *ref = dav1d_ref_create_using_pool(c->seq_hdr_pool,
 1215|  15.0k|                                                    sizeof(Dav1dSequenceHeader));
 1216|  15.0k|        if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1216:13): [True: 0, False: 15.0k]
  ------------------
 1217|  15.0k|        Dav1dSequenceHeader *seq_hdr = ref->data;
 1218|  15.0k|        if ((res = parse_seq_hdr(seq_hdr, &gb, c->strict_std_compliance)) < 0) {
  ------------------
  |  Branch (1218:13): [True: 633, False: 14.4k]
  ------------------
 1219|    633|            dav1d_log(c, "Error parsing sequence header\n");
  ------------------
  |  |   39|    633|#define dav1d_log dav1d_log
  ------------------
 1220|    633|            dav1d_ref_dec(&ref);
 1221|    633|            goto error;
 1222|    633|        }
 1223|       |
 1224|  14.4k|        const int op_idx =
 1225|  14.4k|            c->operating_point < seq_hdr->num_operating_points ? c->operating_point : 0;
  ------------------
  |  Branch (1225:13): [True: 14.4k, False: 0]
  ------------------
 1226|  14.4k|        c->operating_point_idc = seq_hdr->operating_points[op_idx].idc;
 1227|  14.4k|        const unsigned spatial_mask = c->operating_point_idc >> 8;
 1228|  14.4k|        c->max_spatial_id = spatial_mask ? ulog2(spatial_mask) : 0;
  ------------------
  |  Branch (1228:29): [True: 1.14k, False: 13.2k]
  ------------------
 1229|       |
 1230|       |        // If we have read a sequence header which is different from
 1231|       |        // the old one, this is a new video sequence and can't use any
 1232|       |        // previous state. Free that state.
 1233|       |
 1234|  14.4k|        if (!c->seq_hdr) {
  ------------------
  |  Branch (1234:13): [True: 12.0k, False: 2.34k]
  ------------------
 1235|  12.0k|            c->frame_hdr = NULL;
 1236|  12.0k|            c->frame_flags |= PICTURE_FLAG_NEW_SEQUENCE;
 1237|       |        // see 7.5, operating_parameter_info is allowed to change in
 1238|       |        // sequence headers of a single sequence
 1239|  12.0k|        } else if (memcmp(seq_hdr, c->seq_hdr, offsetof(Dav1dSequenceHeader, operating_parameter_info))) {
  ------------------
  |  Branch (1239:20): [True: 567, False: 1.77k]
  ------------------
 1240|    567|            c->frame_hdr = NULL;
 1241|    567|            c->mastering_display = NULL;
 1242|    567|            c->content_light = NULL;
 1243|    567|            dav1d_ref_dec(&c->mastering_display_ref);
 1244|    567|            dav1d_ref_dec(&c->content_light_ref);
 1245|  5.10k|            for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (1245:29): [True: 4.53k, False: 567]
  ------------------
 1246|  4.53k|                if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (1246:21): [True: 2.72k, False: 1.81k]
  ------------------
 1247|  2.72k|                    dav1d_thread_picture_unref(&c->refs[i].p);
 1248|  4.53k|                dav1d_ref_dec(&c->refs[i].segmap);
 1249|  4.53k|                dav1d_ref_dec(&c->refs[i].refmvs);
 1250|  4.53k|                dav1d_cdf_thread_unref(&c->cdf[i]);
 1251|  4.53k|            }
 1252|    567|            c->frame_flags |= PICTURE_FLAG_NEW_SEQUENCE;
 1253|       |        // If operating_parameter_info changed, signal it
 1254|  1.77k|        } else if (memcmp(seq_hdr->operating_parameter_info, c->seq_hdr->operating_parameter_info,
  ------------------
  |  Branch (1254:20): [True: 0, False: 1.77k]
  ------------------
 1255|  1.77k|                          sizeof(seq_hdr->operating_parameter_info)))
 1256|      0|        {
 1257|      0|            c->frame_flags |= PICTURE_FLAG_NEW_OP_PARAMS_INFO;
 1258|      0|        }
 1259|  14.4k|        dav1d_ref_dec(&c->seq_hdr_ref);
 1260|  14.4k|        c->seq_hdr_ref = ref;
 1261|  14.4k|        c->seq_hdr = seq_hdr;
 1262|  14.4k|        break;
 1263|  15.0k|    }
 1264|    820|    case DAV1D_OBU_REDUNDANT_FRAME_HDR:
  ------------------
  |  Branch (1264:5): [True: 820, False: 45.1k]
  ------------------
 1265|    820|        if (c->frame_hdr) break;
  ------------------
  |  Branch (1265:13): [True: 133, False: 687]
  ------------------
 1266|       |        // fall-through
 1267|  18.0k|    case DAV1D_OBU_FRAME:
  ------------------
  |  Branch (1267:5): [True: 17.3k, False: 28.5k]
  ------------------
 1268|  19.2k|    case DAV1D_OBU_FRAME_HDR:
  ------------------
  |  Branch (1268:5): [True: 1.24k, False: 44.6k]
  ------------------
 1269|  19.2k|        if (!c->seq_hdr) goto error;
  ------------------
  |  Branch (1269:13): [True: 39, False: 19.2k]
  ------------------
 1270|  19.2k|        if (!c->frame_hdr_ref) {
  ------------------
  |  Branch (1270:13): [True: 17.9k, False: 1.29k]
  ------------------
 1271|  17.9k|            c->frame_hdr_ref = dav1d_ref_create_using_pool(c->frame_hdr_pool,
 1272|  17.9k|                                                           sizeof(Dav1dFrameHeader));
 1273|  17.9k|            if (!c->frame_hdr_ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1273:17): [True: 0, False: 17.9k]
  ------------------
 1274|  17.9k|        }
 1275|       |#ifndef NDEBUG
 1276|       |        // ensure that the reference is writable
 1277|       |        assert(dav1d_ref_is_writable(c->frame_hdr_ref));
 1278|       |#endif
 1279|  19.2k|        c->frame_hdr = c->frame_hdr_ref->data;
 1280|  19.2k|        memset(c->frame_hdr, 0, sizeof(*c->frame_hdr));
 1281|  19.2k|        c->frame_hdr->temporal_id = temporal_id;
 1282|  19.2k|        c->frame_hdr->spatial_id = spatial_id;
 1283|  19.2k|        if ((res = parse_frame_hdr(c, &gb)) < 0) {
  ------------------
  |  Branch (1283:13): [True: 86, False: 19.1k]
  ------------------
 1284|     86|            c->frame_hdr = NULL;
 1285|     86|            goto error;
 1286|     86|        }
 1287|  19.1k|        for (int n = 0; n < c->n_tile_data; n++)
  ------------------
  |  Branch (1287:25): [True: 36, False: 19.1k]
  ------------------
 1288|     36|            dav1d_data_unref_internal(&c->tile[n].data);
 1289|  19.1k|        c->n_tile_data = 0;
 1290|  19.1k|        c->n_tiles = 0;
 1291|  19.1k|        if (type != DAV1D_OBU_FRAME) {
  ------------------
  |  Branch (1291:13): [True: 1.87k, False: 17.2k]
  ------------------
 1292|       |            // This is actually a frame header OBU so read the
 1293|       |            // trailing bit and check for overrun.
 1294|  1.87k|            if (check_trailing_bits(&gb, c->strict_std_compliance) < 0) {
  ------------------
  |  Branch (1294:17): [True: 66, False: 1.81k]
  ------------------
 1295|     66|                c->frame_hdr = NULL;
 1296|     66|                goto error;
 1297|     66|            }
 1298|  1.87k|        }
 1299|       |
 1300|  19.0k|        if (c->frame_size_limit && (int64_t)c->frame_hdr->width[1] *
  ------------------
  |  Branch (1300:13): [True: 19.0k, False: 0]
  |  Branch (1300:36): [True: 11, False: 19.0k]
  ------------------
 1301|  19.0k|            c->frame_hdr->height > c->frame_size_limit)
 1302|     11|        {
 1303|     11|            dav1d_log(c, "Frame size %dx%d exceeds limit %u\n", c->frame_hdr->width[1],
  ------------------
  |  |   39|     11|#define dav1d_log dav1d_log
  ------------------
 1304|     11|                      c->frame_hdr->height, c->frame_size_limit);
 1305|     11|            c->frame_hdr = NULL;
 1306|     11|            return DAV1D_ERR(ERANGE);
  ------------------
  |  |   56|     11|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 1307|     11|        }
 1308|       |
 1309|  19.0k|        if (type != DAV1D_OBU_FRAME)
  ------------------
  |  Branch (1309:13): [True: 1.81k, False: 17.2k]
  ------------------
 1310|  1.81k|            break;
 1311|       |        // OBU_FRAMEs shouldn't be signaled with show_existing_frame
 1312|  17.2k|        if (c->frame_hdr->show_existing_frame) {
  ------------------
  |  Branch (1312:13): [True: 6, False: 17.2k]
  ------------------
 1313|      6|            c->frame_hdr = NULL;
 1314|      6|            goto error;
 1315|      6|        }
 1316|       |
 1317|       |        // This is the frame header at the start of a frame OBU.
 1318|       |        // There's no trailing bit at the end to skip, but we do need
 1319|       |        // to align to the next byte.
 1320|  17.2k|        dav1d_bytealign_get_bits(&gb);
 1321|       |        // fall-through
 1322|  17.4k|    case DAV1D_OBU_TILE_GRP: {
  ------------------
  |  Branch (1322:5): [True: 187, False: 45.7k]
  ------------------
 1323|  17.4k|        if (!c->frame_hdr) goto error;
  ------------------
  |  Branch (1323:13): [True: 14, False: 17.4k]
  ------------------
 1324|  17.4k|        if (c->n_tile_data_alloc < c->n_tile_data + 1) {
  ------------------
  |  Branch (1324:13): [True: 11.8k, False: 5.54k]
  ------------------
 1325|  11.8k|            if ((c->n_tile_data + 1) > INT_MAX / (int)sizeof(*c->tile)) goto error;
  ------------------
  |  Branch (1325:17): [True: 0, False: 11.8k]
  ------------------
 1326|  11.8k|            struct Dav1dTileGroup *tile = dav1d_realloc(ALLOC_TILE, c->tile,
  ------------------
  |  |  133|  11.8k|#define dav1d_realloc(type, ptr, sz) realloc(ptr, sz)
  ------------------
 1327|  11.8k|                                                        (c->n_tile_data + 1) * sizeof(*c->tile));
 1328|  11.8k|            if (!tile) goto error;
  ------------------
  |  Branch (1328:17): [True: 0, False: 11.8k]
  ------------------
 1329|  11.8k|            c->tile = tile;
 1330|  11.8k|            memset(c->tile + c->n_tile_data, 0, sizeof(*c->tile));
 1331|  11.8k|            c->n_tile_data_alloc = c->n_tile_data + 1;
 1332|  11.8k|        }
 1333|  17.4k|        parse_tile_hdr(c, &gb);
 1334|       |        // Align to the next byte boundary and check for overrun.
 1335|  17.4k|        dav1d_bytealign_get_bits(&gb);
 1336|  17.4k|        if (gb.error) goto error;
  ------------------
  |  Branch (1336:13): [True: 118, False: 17.3k]
  ------------------
 1337|       |
 1338|  17.3k|        dav1d_data_ref(&c->tile[c->n_tile_data].data, in);
 1339|  17.3k|        c->tile[c->n_tile_data].data.data = gb.ptr;
 1340|  17.3k|        c->tile[c->n_tile_data].data.sz = (size_t)(gb.ptr_end - gb.ptr);
 1341|       |        // ensure tile groups are in order and sane, see 6.10.1
 1342|  17.3k|        if (c->tile[c->n_tile_data].start > c->tile[c->n_tile_data].end ||
  ------------------
  |  Branch (1342:13): [True: 6, False: 17.3k]
  ------------------
 1343|  17.3k|            c->tile[c->n_tile_data].start != c->n_tiles)
  ------------------
  |  Branch (1343:13): [True: 6, False: 17.3k]
  ------------------
 1344|     12|        {
 1345|     27|            for (int i = 0; i <= c->n_tile_data; i++)
  ------------------
  |  Branch (1345:29): [True: 15, False: 12]
  ------------------
 1346|     15|                dav1d_data_unref_internal(&c->tile[i].data);
 1347|     12|            c->n_tile_data = 0;
 1348|     12|            c->n_tiles = 0;
 1349|     12|            goto error;
 1350|     12|        }
 1351|  17.3k|        c->n_tiles += 1 + c->tile[c->n_tile_data].end -
 1352|  17.3k|                          c->tile[c->n_tile_data].start;
 1353|  17.3k|        c->n_tile_data++;
 1354|  17.3k|        break;
 1355|  17.3k|    }
 1356|    425|    case DAV1D_OBU_METADATA: {
  ------------------
  |  Branch (1356:5): [True: 425, False: 45.4k]
  ------------------
 1357|    425|#define DEBUG_OBU_METADATA 0
 1358|       |#if DEBUG_OBU_METADATA
 1359|       |        const uint8_t *const init_ptr = gb.ptr;
 1360|       |#endif
 1361|       |        // obu metadta type field
 1362|    425|        const enum ObuMetaType meta_type = dav1d_get_uleb128(&gb);
 1363|    425|        if (gb.error) goto error;
  ------------------
  |  Branch (1363:13): [True: 8, False: 417]
  ------------------
 1364|       |
 1365|    417|        switch (meta_type) {
 1366|     41|        case OBU_META_HDR_CLL: {
  ------------------
  |  Branch (1366:9): [True: 41, False: 376]
  ------------------
 1367|     41|            Dav1dRef *ref = dav1d_ref_create(ALLOC_OBU_META,
  ------------------
  |  |   49|     41|#define dav1d_ref_create(type, size) dav1d_ref_create(size)
  ------------------
 1368|     41|                                             sizeof(Dav1dContentLightLevel));
 1369|     41|            if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1369:17): [True: 0, False: 41]
  ------------------
 1370|     41|            Dav1dContentLightLevel *const content_light = ref->data;
 1371|       |
 1372|     41|            content_light->max_content_light_level = dav1d_get_bits(&gb, 16);
 1373|       |#if DEBUG_OBU_METADATA
 1374|       |            printf("CLLOBU: max-content-light-level: %d [off=%td]\n",
 1375|       |                   content_light->max_content_light_level,
 1376|       |                   (gb.ptr - init_ptr) * 8 - gb.bits_left);
 1377|       |#endif
 1378|     41|            content_light->max_frame_average_light_level = dav1d_get_bits(&gb, 16);
 1379|       |#if DEBUG_OBU_METADATA
 1380|       |            printf("CLLOBU: max-frame-average-light-level: %d [off=%td]\n",
 1381|       |                   content_light->max_frame_average_light_level,
 1382|       |                   (gb.ptr - init_ptr) * 8 - gb.bits_left);
 1383|       |#endif
 1384|       |
 1385|     41|            if (check_trailing_bits(&gb, c->strict_std_compliance) < 0) {
  ------------------
  |  Branch (1385:17): [True: 1, False: 40]
  ------------------
 1386|      1|                dav1d_ref_dec(&ref);
 1387|      1|                goto error;
 1388|      1|            }
 1389|       |
 1390|     40|            dav1d_ref_dec(&c->content_light_ref);
 1391|     40|            c->content_light = content_light;
 1392|     40|            c->content_light_ref = ref;
 1393|     40|            break;
 1394|     41|        }
 1395|     21|        case OBU_META_HDR_MDCV: {
  ------------------
  |  Branch (1395:9): [True: 21, False: 396]
  ------------------
 1396|     21|            Dav1dRef *ref = dav1d_ref_create(ALLOC_OBU_META,
  ------------------
  |  |   49|     21|#define dav1d_ref_create(type, size) dav1d_ref_create(size)
  ------------------
 1397|     21|                                             sizeof(Dav1dMasteringDisplay));
 1398|     21|            if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1398:17): [True: 0, False: 21]
  ------------------
 1399|     21|            Dav1dMasteringDisplay *const mastering_display = ref->data;
 1400|       |
 1401|     84|            for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1401:29): [True: 63, False: 21]
  ------------------
 1402|     63|                mastering_display->primaries[i][0] = dav1d_get_bits(&gb, 16);
 1403|     63|                mastering_display->primaries[i][1] = dav1d_get_bits(&gb, 16);
 1404|       |#if DEBUG_OBU_METADATA
 1405|       |                printf("MDCVOBU: primaries[%d]: (%d, %d) [off=%td]\n", i,
 1406|       |                       mastering_display->primaries[i][0],
 1407|       |                       mastering_display->primaries[i][1],
 1408|       |                       (gb.ptr - init_ptr) * 8 - gb.bits_left);
 1409|       |#endif
 1410|     63|            }
 1411|     21|            mastering_display->white_point[0] = dav1d_get_bits(&gb, 16);
 1412|       |#if DEBUG_OBU_METADATA
 1413|       |            printf("MDCVOBU: white-point-x: %d [off=%td]\n",
 1414|       |                   mastering_display->white_point[0],
 1415|       |                   (gb.ptr - init_ptr) * 8 - gb.bits_left);
 1416|       |#endif
 1417|     21|            mastering_display->white_point[1] = dav1d_get_bits(&gb, 16);
 1418|       |#if DEBUG_OBU_METADATA
 1419|       |            printf("MDCVOBU: white-point-y: %d [off=%td]\n",
 1420|       |                   mastering_display->white_point[1],
 1421|       |                   (gb.ptr - init_ptr) * 8 - gb.bits_left);
 1422|       |#endif
 1423|     21|            mastering_display->max_luminance = dav1d_get_bits(&gb, 32);
 1424|       |#if DEBUG_OBU_METADATA
 1425|       |            printf("MDCVOBU: max-luminance: %d [off=%td]\n",
 1426|       |                   mastering_display->max_luminance,
 1427|       |                   (gb.ptr - init_ptr) * 8 - gb.bits_left);
 1428|       |#endif
 1429|     21|            mastering_display->min_luminance = dav1d_get_bits(&gb, 32);
 1430|       |#if DEBUG_OBU_METADATA
 1431|       |            printf("MDCVOBU: min-luminance: %d [off=%td]\n",
 1432|       |                   mastering_display->min_luminance,
 1433|       |                   (gb.ptr - init_ptr) * 8 - gb.bits_left);
 1434|       |#endif
 1435|     21|            if (check_trailing_bits(&gb, c->strict_std_compliance) < 0) {
  ------------------
  |  Branch (1435:17): [True: 1, False: 20]
  ------------------
 1436|      1|                dav1d_ref_dec(&ref);
 1437|      1|                goto error;
 1438|      1|            }
 1439|       |
 1440|     20|            dav1d_ref_dec(&c->mastering_display_ref);
 1441|     20|            c->mastering_display = mastering_display;
 1442|     20|            c->mastering_display_ref = ref;
 1443|     20|            break;
 1444|     21|        }
 1445|     79|        case OBU_META_ITUT_T35: {
  ------------------
  |  Branch (1445:9): [True: 79, False: 338]
  ------------------
 1446|     79|            ptrdiff_t payload_size = gb.ptr_end - gb.ptr;
 1447|       |            // Don't take into account all the trailing bits for payload_size
 1448|    178|            while (payload_size > 0 && !gb.ptr[payload_size - 1])
  ------------------
  |  Branch (1448:20): [True: 156, False: 22]
  |  Branch (1448:40): [True: 99, False: 57]
  ------------------
 1449|     99|                payload_size--; // trailing_zero_bit x 8
 1450|     79|            payload_size--; // trailing_one_bit + trailing_zero_bit x 7
 1451|       |
 1452|     79|            int country_code_extension_byte = 0;
 1453|     79|            const int country_code = dav1d_get_bits(&gb, 8);
 1454|     79|            payload_size--;
 1455|     79|            if (country_code == 0xFF) {
  ------------------
  |  Branch (1455:17): [True: 3, False: 76]
  ------------------
 1456|      3|                country_code_extension_byte = dav1d_get_bits(&gb, 8);
 1457|      3|                payload_size--;
 1458|      3|            }
 1459|       |
 1460|     79|            if (payload_size <= 0 || gb.ptr[payload_size] != 0x80) {
  ------------------
  |  Branch (1460:17): [True: 26, False: 53]
  |  Branch (1460:38): [True: 50, False: 3]
  ------------------
 1461|     76|                dav1d_log(c, "Malformed ITU-T T.35 metadata message format\n");
  ------------------
  |  |   39|     76|#define dav1d_log dav1d_log
  ------------------
 1462|     76|                break;
 1463|     76|            }
 1464|       |
 1465|      3|            if ((c->n_itut_t35 + 1) > INT_MAX / (int)sizeof(*c->itut_t35)) goto error;
  ------------------
  |  Branch (1465:17): [True: 0, False: 3]
  ------------------
 1466|      3|            struct Dav1dITUTT35 *itut_t35 = dav1d_realloc(ALLOC_OBU_META, c->itut_t35,
  ------------------
  |  |  133|      3|#define dav1d_realloc(type, ptr, sz) realloc(ptr, sz)
  ------------------
 1467|      3|                                                          (c->n_itut_t35 + 1) * sizeof(*c->itut_t35));
 1468|      3|            if (!itut_t35) goto error;
  ------------------
  |  Branch (1468:17): [True: 0, False: 3]
  ------------------
 1469|      3|            c->itut_t35 = itut_t35;
 1470|      3|            memset(c->itut_t35 + c->n_itut_t35, 0, sizeof(*c->itut_t35));
 1471|       |
 1472|      3|            struct itut_t35_ctx_context *itut_t35_ctx;
 1473|      3|            if (!c->n_itut_t35) {
  ------------------
  |  Branch (1473:17): [True: 3, False: 0]
  ------------------
 1474|      3|                assert(!c->itut_t35_ref);
  ------------------
  |  |  140|      3|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3]
  |  |  |  Branch (140:68): [Folded, False: 3]
  |  |  ------------------
  ------------------
 1475|      3|                itut_t35_ctx = dav1d_malloc(ALLOC_OBU_META, sizeof(struct itut_t35_ctx_context));
  ------------------
  |  |  132|      3|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 1476|      3|                if (!itut_t35_ctx) goto error;
  ------------------
  |  Branch (1476:21): [True: 0, False: 3]
  ------------------
 1477|      3|                c->itut_t35_ref = dav1d_ref_init(&itut_t35_ctx->ref, c->itut_t35,
 1478|      3|                                                 dav1d_picture_free_itut_t35, itut_t35_ctx, 0);
 1479|      3|            } else {
 1480|      0|                assert(c->itut_t35_ref && atomic_load(&c->itut_t35_ref->ref_cnt) == 1);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 0, False: 0]
  |  |  |  Branch (140:30): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1481|      0|                itut_t35_ctx = c->itut_t35_ref->user_data;
 1482|      0|                c->itut_t35_ref->const_data = (uint8_t *)c->itut_t35;
 1483|      0|            }
 1484|      3|            itut_t35_ctx->itut_t35 = c->itut_t35;
 1485|      3|            itut_t35_ctx->n_itut_t35 = c->n_itut_t35 + 1;
 1486|       |
 1487|      3|            Dav1dITUTT35 *const itut_t35_metadata = &c->itut_t35[c->n_itut_t35];
 1488|      3|            itut_t35_metadata->payload = dav1d_malloc(ALLOC_OBU_META, payload_size);
  ------------------
  |  |  132|      3|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 1489|      3|            if (!itut_t35_metadata->payload) goto error;
  ------------------
  |  Branch (1489:17): [True: 0, False: 3]
  ------------------
 1490|       |
 1491|      3|            itut_t35_metadata->country_code = country_code;
 1492|      3|            itut_t35_metadata->country_code_extension_byte = country_code_extension_byte;
 1493|      3|            itut_t35_metadata->payload_size = payload_size;
 1494|       |
 1495|       |            // We know that we've read a whole number of bytes and that the
 1496|       |            // payload is within the OBU boundaries, so just use memcpy()
 1497|      3|            assert(gb.bits_left == 0);
  ------------------
  |  |  140|      3|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3]
  |  |  |  Branch (140:68): [Folded, False: 3]
  |  |  ------------------
  ------------------
 1498|      3|            memcpy(itut_t35_metadata->payload, gb.ptr, payload_size);
 1499|       |
 1500|      3|            c->n_itut_t35++;
 1501|      3|            break;
 1502|      3|        }
 1503|     24|        case OBU_META_SCALABILITY:
  ------------------
  |  Branch (1503:9): [True: 24, False: 393]
  ------------------
 1504|     41|        case OBU_META_TIMECODE:
  ------------------
  |  Branch (1504:9): [True: 17, False: 400]
  ------------------
 1505|       |            // ignore metadata OBUs we don't care about
 1506|     41|            break;
 1507|    235|        default:
  ------------------
  |  Branch (1507:9): [True: 235, False: 182]
  ------------------
 1508|       |            // print a warning but don't fail for unknown types
 1509|    235|            if (meta_type > 31) // Types 6 to 31 are "Unregistered user private", so ignore them.
  ------------------
  |  Branch (1509:17): [True: 157, False: 78]
  ------------------
 1510|    157|                dav1d_log(c, "Unknown Metadata OBU type %d\n", meta_type);
  ------------------
  |  |   39|    157|#define dav1d_log dav1d_log
  ------------------
 1511|    235|            break;
 1512|    417|        }
 1513|       |
 1514|    415|        break;
 1515|    417|    }
 1516|  6.39k|    case DAV1D_OBU_TD:
  ------------------
  |  Branch (1516:5): [True: 6.39k, False: 39.5k]
  ------------------
 1517|  6.39k|        c->frame_flags |= PICTURE_FLAG_NEW_TEMPORAL_UNIT;
 1518|  6.39k|        break;
 1519|    238|    case DAV1D_OBU_PADDING:
  ------------------
  |  Branch (1519:5): [True: 238, False: 45.6k]
  ------------------
 1520|       |        // ignore OBUs we don't care about
 1521|    238|        break;
 1522|  4.20k|    default:
  ------------------
  |  Branch (1522:5): [True: 4.20k, False: 41.7k]
  ------------------
 1523|       |        // print a warning but don't fail for unknown types
 1524|  4.20k|        dav1d_log(c, "Unknown OBU type %d of size %td\n", type, gb.ptr_end - gb.ptr);
  ------------------
  |  |   39|  4.20k|#define dav1d_log dav1d_log
  ------------------
 1525|  4.20k|        break;
 1526|  45.9k|    }
 1527|       |
 1528|  44.9k|    if (c->seq_hdr && c->frame_hdr) {
  ------------------
  |  Branch (1528:9): [True: 39.0k, False: 5.89k]
  |  Branch (1528:23): [True: 19.8k, False: 19.1k]
  ------------------
 1529|  19.8k|        if (c->frame_hdr->show_existing_frame) {
  ------------------
  |  Branch (1529:13): [True: 92, False: 19.7k]
  ------------------
 1530|     92|            if (!c->refs[c->frame_hdr->existing_frame_idx].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (1530:17): [True: 1, False: 91]
  ------------------
 1531|     91|            switch (c->refs[c->frame_hdr->existing_frame_idx].p.p.frame_hdr->frame_type) {
 1532|     18|            case DAV1D_FRAME_TYPE_INTER:
  ------------------
  |  Branch (1532:13): [True: 18, False: 73]
  ------------------
 1533|     18|            case DAV1D_FRAME_TYPE_SWITCH:
  ------------------
  |  Branch (1533:13): [True: 0, False: 91]
  ------------------
 1534|     18|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_REFERENCE)
  ------------------
  |  Branch (1534:21): [True: 0, False: 18]
  ------------------
 1535|      0|                    goto skip;
 1536|     18|                break;
 1537|     18|            case DAV1D_FRAME_TYPE_INTRA:
  ------------------
  |  Branch (1537:13): [True: 3, False: 88]
  ------------------
 1538|      3|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_INTRA)
  ------------------
  |  Branch (1538:21): [True: 0, False: 3]
  ------------------
 1539|      0|                    goto skip;
 1540|       |                // fall-through
 1541|     73|            default:
  ------------------
  |  Branch (1541:13): [True: 70, False: 21]
  ------------------
 1542|     73|                break;
 1543|     91|            }
 1544|     91|            if (!c->refs[c->frame_hdr->existing_frame_idx].p.p.data[0]) goto error;
  ------------------
  |  Branch (1544:17): [True: 0, False: 91]
  ------------------
 1545|     91|            if (c->strict_std_compliance &&
  ------------------
  |  Branch (1545:17): [True: 0, False: 91]
  ------------------
 1546|      0|                !c->refs[c->frame_hdr->existing_frame_idx].p.showable)
  ------------------
  |  Branch (1546:17): [True: 0, False: 0]
  ------------------
 1547|      0|            {
 1548|      0|                goto error;
 1549|      0|            }
 1550|     91|            if (c->n_fc == 1) {
  ------------------
  |  Branch (1550:17): [True: 91, False: 0]
  ------------------
 1551|     91|                dav1d_thread_picture_ref(&c->out,
 1552|     91|                                         &c->refs[c->frame_hdr->existing_frame_idx].p);
 1553|     91|                dav1d_picture_copy_props(&c->out.p,
 1554|     91|                                         c->content_light, c->content_light_ref,
 1555|     91|                                         c->mastering_display, c->mastering_display_ref,
 1556|     91|                                         c->itut_t35, c->itut_t35_ref, c->n_itut_t35,
 1557|     91|                                         &in->m);
 1558|       |                // Must be removed from the context after being attached to the frame
 1559|     91|                dav1d_ref_dec(&c->itut_t35_ref);
 1560|     91|                c->itut_t35 = NULL;
 1561|     91|                c->n_itut_t35 = 0;
 1562|     91|                c->event_flags |= dav1d_picture_get_event_flags(&c->refs[c->frame_hdr->existing_frame_idx].p);
 1563|     91|            } else {
 1564|      0|                pthread_mutex_lock(&c->task_thread.lock);
 1565|       |                // need to append this to the frame output queue
 1566|      0|                const unsigned next = c->frame_thread.next++;
 1567|      0|                if (c->frame_thread.next == c->n_fc)
  ------------------
  |  Branch (1567:21): [True: 0, False: 0]
  ------------------
 1568|      0|                    c->frame_thread.next = 0;
 1569|       |
 1570|      0|                Dav1dFrameContext *const f = &c->fc[next];
 1571|      0|                while (f->n_tile_data > 0)
  ------------------
  |  Branch (1571:24): [True: 0, False: 0]
  ------------------
 1572|      0|                    pthread_cond_wait(&f->task_thread.cond,
 1573|      0|                                      &f->task_thread.ttd->lock);
 1574|      0|                Dav1dThreadPicture *const out_delayed =
 1575|      0|                    &c->frame_thread.out_delayed[next];
 1576|      0|                if (out_delayed->p.data[0] || atomic_load(&f->task_thread.error)) {
  ------------------
  |  Branch (1576:21): [True: 0, False: 0]
  |  Branch (1576:47): [True: 0, False: 0]
  ------------------
 1577|      0|                    unsigned first = atomic_load(&c->task_thread.first);
 1578|      0|                    if (first + 1U < c->n_fc)
  ------------------
  |  Branch (1578:25): [True: 0, False: 0]
  ------------------
 1579|      0|                        atomic_fetch_add(&c->task_thread.first, 1U);
 1580|      0|                    else
 1581|      0|                        atomic_store(&c->task_thread.first, 0);
 1582|      0|                    atomic_compare_exchange_strong(&c->task_thread.reset_task_cur,
 1583|      0|                                                   &first, UINT_MAX);
 1584|      0|                    if (c->task_thread.cur && c->task_thread.cur < c->n_fc)
  ------------------
  |  Branch (1584:25): [True: 0, False: 0]
  |  Branch (1584:47): [True: 0, False: 0]
  ------------------
 1585|      0|                        c->task_thread.cur--;
 1586|      0|                }
 1587|      0|                const int error = f->task_thread.retval;
 1588|      0|                if (error) {
  ------------------
  |  Branch (1588:21): [True: 0, False: 0]
  ------------------
 1589|      0|                    c->cached_error = error;
 1590|      0|                    f->task_thread.retval = 0;
 1591|      0|                    dav1d_data_props_copy(&c->cached_error_props, &out_delayed->p.m);
 1592|      0|                    dav1d_thread_picture_unref(out_delayed);
 1593|      0|                } else if (out_delayed->p.data[0]) {
  ------------------
  |  Branch (1593:28): [True: 0, False: 0]
  ------------------
 1594|      0|                    const unsigned progress = atomic_load_explicit(&out_delayed->progress[1],
 1595|      0|                                                                   memory_order_relaxed);
 1596|      0|                    if ((out_delayed->visible || c->output_invisible_frames) &&
  ------------------
  |  Branch (1596:26): [True: 0, False: 0]
  |  Branch (1596:50): [True: 0, False: 0]
  ------------------
 1597|      0|                        progress != FRAME_ERROR)
  ------------------
  |  |   35|      0|#define FRAME_ERROR (UINT_MAX - 1)
  ------------------
  |  Branch (1597:25): [True: 0, False: 0]
  ------------------
 1598|      0|                    {
 1599|      0|                        dav1d_thread_picture_ref(&c->out, out_delayed);
 1600|      0|                        c->event_flags |= dav1d_picture_get_event_flags(out_delayed);
 1601|      0|                    }
 1602|      0|                    dav1d_thread_picture_unref(out_delayed);
 1603|      0|                }
 1604|      0|                dav1d_thread_picture_ref(out_delayed,
 1605|      0|                                         &c->refs[c->frame_hdr->existing_frame_idx].p);
 1606|      0|                out_delayed->visible = 1;
 1607|      0|                dav1d_picture_copy_props(&out_delayed->p,
 1608|      0|                                         c->content_light, c->content_light_ref,
 1609|      0|                                         c->mastering_display, c->mastering_display_ref,
 1610|      0|                                         c->itut_t35, c->itut_t35_ref, c->n_itut_t35,
 1611|      0|                                         &in->m);
 1612|       |                // Must be removed from the context after being attached to the frame
 1613|      0|                dav1d_ref_dec(&c->itut_t35_ref);
 1614|      0|                c->itut_t35 = NULL;
 1615|      0|                c->n_itut_t35 = 0;
 1616|       |
 1617|      0|                pthread_mutex_unlock(&c->task_thread.lock);
 1618|      0|            }
 1619|     91|            if (c->refs[c->frame_hdr->existing_frame_idx].p.p.frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY) {
  ------------------
  |  Branch (1619:17): [True: 70, False: 21]
  ------------------
 1620|     70|                const int r = c->frame_hdr->existing_frame_idx;
 1621|     70|                c->refs[r].p.showable = 0;
 1622|    630|                for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (1622:33): [True: 560, False: 70]
  ------------------
 1623|    560|                    if (i == r) continue;
  ------------------
  |  Branch (1623:25): [True: 70, False: 490]
  ------------------
 1624|       |
 1625|    490|                    if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (1625:25): [True: 460, False: 30]
  ------------------
 1626|    460|                        dav1d_thread_picture_unref(&c->refs[i].p);
 1627|    490|                    dav1d_thread_picture_ref(&c->refs[i].p, &c->refs[r].p);
 1628|       |
 1629|    490|                    dav1d_cdf_thread_unref(&c->cdf[i]);
 1630|    490|                    dav1d_cdf_thread_ref(&c->cdf[i], &c->cdf[r]);
 1631|       |
 1632|    490|                    dav1d_ref_dec(&c->refs[i].segmap);
 1633|    490|                    c->refs[i].segmap = c->refs[r].segmap;
 1634|    490|                    if (c->refs[r].segmap)
  ------------------
  |  Branch (1634:25): [True: 49, False: 441]
  ------------------
 1635|     49|                        dav1d_ref_inc(c->refs[r].segmap);
 1636|    490|                    dav1d_ref_dec(&c->refs[i].refmvs);
 1637|    490|                }
 1638|     70|            }
 1639|     91|            c->frame_hdr = NULL;
 1640|  19.7k|        } else if (c->n_tiles == c->frame_hdr->tiling.cols * c->frame_hdr->tiling.rows) {
  ------------------
  |  Branch (1640:20): [True: 17.2k, False: 2.50k]
  ------------------
 1641|  17.2k|            switch (c->frame_hdr->frame_type) {
 1642|  2.55k|            case DAV1D_FRAME_TYPE_INTER:
  ------------------
  |  Branch (1642:13): [True: 2.55k, False: 14.6k]
  ------------------
 1643|  2.70k|            case DAV1D_FRAME_TYPE_SWITCH:
  ------------------
  |  Branch (1643:13): [True: 150, False: 17.0k]
  ------------------
 1644|  2.70k|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_REFERENCE ||
  ------------------
  |  Branch (1644:21): [True: 0, False: 2.70k]
  ------------------
 1645|  2.70k|                    (c->decode_frame_type == DAV1D_DECODEFRAMETYPE_REFERENCE &&
  ------------------
  |  Branch (1645:22): [True: 0, False: 2.70k]
  ------------------
 1646|      0|                     !c->frame_hdr->refresh_frame_flags))
  ------------------
  |  Branch (1646:22): [True: 0, False: 0]
  ------------------
 1647|      0|                    goto skip;
 1648|  2.70k|                break;
 1649|  2.70k|            case DAV1D_FRAME_TYPE_INTRA:
  ------------------
  |  Branch (1649:13): [True: 186, False: 17.0k]
  ------------------
 1650|    186|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_INTRA ||
  ------------------
  |  Branch (1650:21): [True: 0, False: 186]
  ------------------
 1651|    186|                    (c->decode_frame_type == DAV1D_DECODEFRAMETYPE_REFERENCE &&
  ------------------
  |  Branch (1651:22): [True: 0, False: 186]
  ------------------
 1652|      0|                     !c->frame_hdr->refresh_frame_flags))
  ------------------
  |  Branch (1652:22): [True: 0, False: 0]
  ------------------
 1653|      0|                    goto skip;
 1654|       |                // fall-through
 1655|  14.5k|            default:
  ------------------
  |  Branch (1655:13): [True: 14.3k, False: 2.88k]
  ------------------
 1656|  14.5k|                break;
 1657|  17.2k|            }
 1658|  17.2k|            if (!c->n_tile_data)
  ------------------
  |  Branch (1658:17): [True: 0, False: 17.2k]
  ------------------
 1659|      0|                goto error;
 1660|  17.2k|            if ((res = dav1d_submit_frame(c)) < 0)
  ------------------
  |  Branch (1660:17): [True: 4.09k, False: 13.1k]
  ------------------
 1661|  4.09k|                return res;
 1662|  13.1k|            assert(!c->n_tile_data);
  ------------------
  |  |  140|  13.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 13.1k]
  |  |  |  Branch (140:68): [Folded, False: 13.1k]
  |  |  ------------------
  ------------------
 1663|  13.1k|            c->frame_hdr = NULL;
 1664|  13.1k|            c->n_tiles = 0;
 1665|  13.1k|        }
 1666|  19.8k|    }
 1667|       |
 1668|  40.8k|    return gb.ptr_end - gb.ptr_start;
 1669|       |
 1670|      0|skip:
 1671|       |    // update refs with only the headers in case we skip the frame
 1672|      0|    for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (1672:21): [True: 0, False: 0]
  ------------------
 1673|      0|        if (c->frame_hdr->refresh_frame_flags & (1 << i)) {
  ------------------
  |  Branch (1673:13): [True: 0, False: 0]
  ------------------
 1674|      0|            dav1d_thread_picture_unref(&c->refs[i].p);
 1675|      0|            c->refs[i].p.p.frame_hdr = c->frame_hdr;
 1676|      0|            c->refs[i].p.p.seq_hdr = c->seq_hdr;
 1677|      0|            c->refs[i].p.p.frame_hdr_ref = c->frame_hdr_ref;
 1678|      0|            c->refs[i].p.p.seq_hdr_ref = c->seq_hdr_ref;
 1679|      0|            dav1d_ref_inc(c->frame_hdr_ref);
 1680|      0|            dav1d_ref_inc(c->seq_hdr_ref);
 1681|      0|        }
 1682|      0|    }
 1683|       |
 1684|      0|    dav1d_ref_dec(&c->frame_hdr_ref);
 1685|      0|    c->frame_hdr = NULL;
 1686|      0|    c->n_tiles = 0;
 1687|       |
 1688|      0|    return gb.ptr_end - gb.ptr_start;
 1689|       |
 1690|  1.29k|error:
 1691|  1.29k|    dav1d_data_props_copy(&c->cached_error_props, &in->m);
 1692|  1.29k|    dav1d_log(c, gb.error ? "Overrun in OBU bit buffer\n" :
  ------------------
  |  |   39|  1.29k|#define dav1d_log dav1d_log
  ------------------
  |  Branch (1692:18): [True: 757, False: 541]
  ------------------
 1693|  1.29k|                            "Error parsing OBU data\n");
 1694|  1.29k|    return DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|  1.29k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 1695|  44.9k|}
obu.c:parse_seq_hdr:
   75|  15.0k|{
   76|  15.0k|#define DEBUG_SEQ_HDR 0
   77|       |
   78|       |#if DEBUG_SEQ_HDR
   79|       |    const unsigned init_bit_pos = dav1d_get_bits_pos(gb);
   80|       |#endif
   81|       |
   82|  15.0k|    memset(hdr, 0, sizeof(*hdr));
   83|  15.0k|    hdr->profile = dav1d_get_bits(gb, 3);
   84|  15.0k|    if (hdr->profile > 2) goto error;
  ------------------
  |  Branch (84:9): [True: 22, False: 15.0k]
  ------------------
   85|       |#if DEBUG_SEQ_HDR
   86|       |    printf("SEQHDR: post-profile: off=%u\n",
   87|       |           dav1d_get_bits_pos(gb) - init_bit_pos);
   88|       |#endif
   89|       |
   90|  15.0k|    hdr->still_picture = dav1d_get_bit(gb);
   91|  15.0k|    hdr->reduced_still_picture_header = dav1d_get_bit(gb);
   92|  15.0k|    if (hdr->reduced_still_picture_header && !hdr->still_picture) goto error;
  ------------------
  |  Branch (92:9): [True: 9.75k, False: 5.28k]
  |  Branch (92:46): [True: 15, False: 9.74k]
  ------------------
   93|       |#if DEBUG_SEQ_HDR
   94|       |    printf("SEQHDR: post-stillpicture_flags: off=%u\n",
   95|       |           dav1d_get_bits_pos(gb) - init_bit_pos);
   96|       |#endif
   97|       |
   98|  15.0k|    if (hdr->reduced_still_picture_header) {
  ------------------
  |  Branch (98:9): [True: 9.74k, False: 5.28k]
  ------------------
   99|  9.74k|        hdr->num_operating_points = 1;
  100|  9.74k|        hdr->operating_points[0].major_level = dav1d_get_bits(gb, 3);
  101|  9.74k|        hdr->operating_points[0].minor_level = dav1d_get_bits(gb, 2);
  102|  9.74k|        hdr->operating_points[0].initial_display_delay = 10;
  103|  9.74k|    } else {
  104|  5.28k|        hdr->timing_info_present = dav1d_get_bit(gb);
  105|  5.28k|        if (hdr->timing_info_present) {
  ------------------
  |  Branch (105:13): [True: 535, False: 4.74k]
  ------------------
  106|    535|            hdr->num_units_in_tick = dav1d_get_bits(gb, 32);
  107|    535|            hdr->time_scale = dav1d_get_bits(gb, 32);
  108|    535|            if (strict_std_compliance && (!hdr->num_units_in_tick || !hdr->time_scale))
  ------------------
  |  Branch (108:17): [True: 0, False: 535]
  |  Branch (108:43): [True: 0, False: 0]
  |  Branch (108:70): [True: 0, False: 0]
  ------------------
  109|      0|                goto error;
  110|    535|            hdr->equal_picture_interval = dav1d_get_bit(gb);
  111|    535|            if (hdr->equal_picture_interval) {
  ------------------
  |  Branch (111:17): [True: 257, False: 278]
  ------------------
  112|    257|                const unsigned num_ticks_per_picture = dav1d_get_vlc(gb);
  113|    257|                if (num_ticks_per_picture == UINT32_MAX)
  ------------------
  |  Branch (113:21): [True: 10, False: 247]
  ------------------
  114|     10|                    goto error;
  115|    247|                hdr->num_ticks_per_picture = num_ticks_per_picture + 1;
  116|    247|            }
  117|       |
  118|    525|            hdr->decoder_model_info_present = dav1d_get_bit(gb);
  119|    525|            if (hdr->decoder_model_info_present) {
  ------------------
  |  Branch (119:17): [True: 328, False: 197]
  ------------------
  120|    328|                hdr->encoder_decoder_buffer_delay_length = dav1d_get_bits(gb, 5) + 1;
  121|    328|                hdr->num_units_in_decoding_tick = dav1d_get_bits(gb, 32);
  122|    328|                if (strict_std_compliance && !hdr->num_units_in_decoding_tick)
  ------------------
  |  Branch (122:21): [True: 0, False: 328]
  |  Branch (122:46): [True: 0, False: 0]
  ------------------
  123|      0|                    goto error;
  124|    328|                hdr->buffer_removal_delay_length = dav1d_get_bits(gb, 5) + 1;
  125|    328|                hdr->frame_presentation_delay_length = dav1d_get_bits(gb, 5) + 1;
  126|    328|            }
  127|    525|        }
  128|       |#if DEBUG_SEQ_HDR
  129|       |        printf("SEQHDR: post-timinginfo: off=%u\n",
  130|       |               dav1d_get_bits_pos(gb) - init_bit_pos);
  131|       |#endif
  132|       |
  133|  5.27k|        hdr->display_model_info_present = dav1d_get_bit(gb);
  134|  5.27k|        hdr->num_operating_points = dav1d_get_bits(gb, 5) + 1;
  135|  19.7k|        for (int i = 0; i < hdr->num_operating_points; i++) {
  ------------------
  |  Branch (135:25): [True: 14.6k, False: 5.06k]
  ------------------
  136|  14.6k|            struct Dav1dSequenceHeaderOperatingPoint *const op =
  137|  14.6k|                &hdr->operating_points[i];
  138|  14.6k|            op->idc = dav1d_get_bits(gb, 12);
  139|  14.6k|            if (op->idc && (!(op->idc & 0xff) || !(op->idc & 0xf00)))
  ------------------
  |  Branch (139:17): [True: 9.16k, False: 5.51k]
  |  Branch (139:29): [True: 42, False: 9.12k]
  |  Branch (139:50): [True: 171, False: 8.95k]
  ------------------
  140|    213|                goto error;
  141|  14.4k|            op->major_level = 2 + dav1d_get_bits(gb, 3);
  142|  14.4k|            op->minor_level = dav1d_get_bits(gb, 2);
  143|  14.4k|            if (op->major_level > 3)
  ------------------
  |  Branch (143:17): [True: 5.63k, False: 8.83k]
  ------------------
  144|  5.63k|                op->tier = dav1d_get_bit(gb);
  145|  14.4k|            if (hdr->decoder_model_info_present) {
  ------------------
  |  Branch (145:17): [True: 2.69k, False: 11.7k]
  ------------------
  146|  2.69k|                op->decoder_model_param_present = dav1d_get_bit(gb);
  147|  2.69k|                if (op->decoder_model_param_present) {
  ------------------
  |  Branch (147:21): [True: 810, False: 1.88k]
  ------------------
  148|    810|                    struct Dav1dSequenceHeaderOperatingParameterInfo *const opi =
  149|    810|                        &hdr->operating_parameter_info[i];
  150|    810|                    opi->decoder_buffer_delay =
  151|    810|                        dav1d_get_bits(gb, hdr->encoder_decoder_buffer_delay_length);
  152|    810|                    opi->encoder_buffer_delay =
  153|    810|                        dav1d_get_bits(gb, hdr->encoder_decoder_buffer_delay_length);
  154|    810|                    opi->low_delay_mode = dav1d_get_bit(gb);
  155|    810|                }
  156|  2.69k|            }
  157|  14.4k|            if (hdr->display_model_info_present)
  ------------------
  |  Branch (157:17): [True: 6.88k, False: 7.58k]
  ------------------
  158|  6.88k|                op->display_model_param_present = dav1d_get_bit(gb);
  159|  14.4k|            op->initial_display_delay =
  160|  14.4k|                op->display_model_param_present ? dav1d_get_bits(gb, 4) + 1 : 10;
  ------------------
  |  Branch (160:17): [True: 2.50k, False: 11.9k]
  ------------------
  161|  14.4k|        }
  162|       |#if DEBUG_SEQ_HDR
  163|       |        printf("SEQHDR: post-operating-points: off=%u\n",
  164|       |               dav1d_get_bits_pos(gb) - init_bit_pos);
  165|       |#endif
  166|  5.27k|    }
  167|       |
  168|  14.8k|    hdr->width_n_bits = dav1d_get_bits(gb, 4) + 1;
  169|  14.8k|    hdr->height_n_bits = dav1d_get_bits(gb, 4) + 1;
  170|  14.8k|    hdr->max_width = dav1d_get_bits(gb, hdr->width_n_bits) + 1;
  171|  14.8k|    hdr->max_height = dav1d_get_bits(gb, hdr->height_n_bits) + 1;
  172|       |#if DEBUG_SEQ_HDR
  173|       |    printf("SEQHDR: post-size: off=%u\n",
  174|       |           dav1d_get_bits_pos(gb) - init_bit_pos);
  175|       |#endif
  176|  14.8k|    if (!hdr->reduced_still_picture_header) {
  ------------------
  |  Branch (176:9): [True: 5.06k, False: 9.74k]
  ------------------
  177|  5.06k|        hdr->frame_id_numbers_present = dav1d_get_bit(gb);
  178|  5.06k|        if (hdr->frame_id_numbers_present) {
  ------------------
  |  Branch (178:13): [True: 523, False: 4.53k]
  ------------------
  179|    523|            hdr->delta_frame_id_n_bits = dav1d_get_bits(gb, 4) + 2;
  180|    523|            hdr->frame_id_n_bits = dav1d_get_bits(gb, 3) + hdr->delta_frame_id_n_bits + 1;
  181|    523|        }
  182|  5.06k|    }
  183|       |#if DEBUG_SEQ_HDR
  184|       |    printf("SEQHDR: post-frame-id-numbers-present: off=%u\n",
  185|       |           dav1d_get_bits_pos(gb) - init_bit_pos);
  186|       |#endif
  187|       |
  188|  14.8k|    hdr->sb128 = dav1d_get_bit(gb);
  189|  14.8k|    hdr->filter_intra = dav1d_get_bit(gb);
  190|  14.8k|    hdr->intra_edge_filter = dav1d_get_bit(gb);
  191|  14.8k|    if (hdr->reduced_still_picture_header) {
  ------------------
  |  Branch (191:9): [True: 9.74k, False: 5.06k]
  ------------------
  192|  9.74k|        hdr->screen_content_tools = DAV1D_ADAPTIVE;
  193|  9.74k|        hdr->force_integer_mv = DAV1D_ADAPTIVE;
  194|  9.74k|    } else {
  195|  5.06k|        hdr->inter_intra = dav1d_get_bit(gb);
  196|  5.06k|        hdr->masked_compound = dav1d_get_bit(gb);
  197|  5.06k|        hdr->warped_motion = dav1d_get_bit(gb);
  198|  5.06k|        hdr->dual_filter = dav1d_get_bit(gb);
  199|  5.06k|        hdr->order_hint = dav1d_get_bit(gb);
  200|  5.06k|        if (hdr->order_hint) {
  ------------------
  |  Branch (200:13): [True: 2.68k, False: 2.37k]
  ------------------
  201|  2.68k|            hdr->jnt_comp = dav1d_get_bit(gb);
  202|  2.68k|            hdr->ref_frame_mvs = dav1d_get_bit(gb);
  203|  2.68k|        }
  204|  5.06k|        hdr->screen_content_tools = dav1d_get_bit(gb) ? DAV1D_ADAPTIVE : dav1d_get_bit(gb);
  ------------------
  |  Branch (204:37): [True: 2.97k, False: 2.08k]
  ------------------
  205|       |    #if DEBUG_SEQ_HDR
  206|       |        printf("SEQHDR: post-screentools: off=%u\n",
  207|       |               dav1d_get_bits_pos(gb) - init_bit_pos);
  208|       |    #endif
  209|  5.06k|        hdr->force_integer_mv = hdr->screen_content_tools ?
  ------------------
  |  Branch (209:33): [True: 4.20k, False: 855]
  ------------------
  210|  4.20k|                                dav1d_get_bit(gb) ? DAV1D_ADAPTIVE : dav1d_get_bit(gb) : 2;
  ------------------
  |  Branch (210:33): [True: 3.39k, False: 812]
  ------------------
  211|  5.06k|        if (hdr->order_hint)
  ------------------
  |  Branch (211:13): [True: 2.68k, False: 2.37k]
  ------------------
  212|  2.68k|            hdr->order_hint_n_bits = dav1d_get_bits(gb, 3) + 1;
  213|  5.06k|    }
  214|  14.8k|    hdr->super_res = dav1d_get_bit(gb);
  215|  14.8k|    hdr->cdef = dav1d_get_bit(gb);
  216|  14.8k|    hdr->restoration = dav1d_get_bit(gb);
  217|       |#if DEBUG_SEQ_HDR
  218|       |    printf("SEQHDR: post-featurebits: off=%u\n",
  219|       |           dav1d_get_bits_pos(gb) - init_bit_pos);
  220|       |#endif
  221|       |
  222|  14.8k|    hdr->hbd = dav1d_get_bit(gb);
  223|  14.8k|    if (hdr->profile == 2 && hdr->hbd)
  ------------------
  |  Branch (223:9): [True: 4.17k, False: 10.6k]
  |  Branch (223:30): [True: 3.37k, False: 804]
  ------------------
  224|  3.37k|        hdr->hbd += dav1d_get_bit(gb);
  225|  14.8k|    if (hdr->profile != 1)
  ------------------
  |  Branch (225:9): [True: 8.96k, False: 5.83k]
  ------------------
  226|  8.96k|        hdr->monochrome = dav1d_get_bit(gb);
  227|  14.8k|    hdr->color_description_present = dav1d_get_bit(gb);
  228|  14.8k|    if (hdr->color_description_present) {
  ------------------
  |  Branch (228:9): [True: 4.46k, False: 10.3k]
  ------------------
  229|  4.46k|        hdr->pri = dav1d_get_bits(gb, 8);
  230|  4.46k|        hdr->trc = dav1d_get_bits(gb, 8);
  231|  4.46k|        hdr->mtrx = dav1d_get_bits(gb, 8);
  232|  10.3k|    } else {
  233|  10.3k|        hdr->pri = DAV1D_COLOR_PRI_UNKNOWN;
  234|  10.3k|        hdr->trc = DAV1D_TRC_UNKNOWN;
  235|  10.3k|        hdr->mtrx = DAV1D_MC_UNKNOWN;
  236|  10.3k|    }
  237|  14.8k|    if (hdr->monochrome) {
  ------------------
  |  Branch (237:9): [True: 3.57k, False: 11.2k]
  ------------------
  238|  3.57k|        hdr->color_range = dav1d_get_bit(gb);
  239|  3.57k|        hdr->layout = DAV1D_PIXEL_LAYOUT_I400;
  240|  3.57k|        hdr->ss_hor = hdr->ss_ver = 1;
  241|  3.57k|        hdr->chr = DAV1D_CHR_UNKNOWN;
  242|  11.2k|    } else if (hdr->pri == DAV1D_COLOR_PRI_BT709 &&
  ------------------
  |  Branch (242:16): [True: 800, False: 10.4k]
  ------------------
  243|    800|               hdr->trc == DAV1D_TRC_SRGB &&
  ------------------
  |  Branch (243:16): [True: 332, False: 468]
  ------------------
  244|    332|               hdr->mtrx == DAV1D_MC_IDENTITY)
  ------------------
  |  Branch (244:16): [True: 8, False: 324]
  ------------------
  245|      8|    {
  246|      8|        hdr->layout = DAV1D_PIXEL_LAYOUT_I444;
  247|      8|        hdr->color_range = 1;
  248|      8|        if (hdr->profile != 1 && !(hdr->profile == 2 && hdr->hbd == 2))
  ------------------
  |  Branch (248:13): [True: 2, False: 6]
  |  Branch (248:36): [True: 1, False: 1]
  |  Branch (248:57): [True: 0, False: 1]
  ------------------
  249|      2|            goto error;
  250|  11.2k|    } else {
  251|  11.2k|        hdr->color_range = dav1d_get_bit(gb);
  252|  11.2k|        switch (hdr->profile) {
  ------------------
  |  Branch (252:17): [True: 11.2k, False: 0]
  ------------------
  253|  2.55k|        case 0: hdr->layout = DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (253:9): [True: 2.55k, False: 8.66k]
  ------------------
  254|  2.55k|                hdr->ss_hor = hdr->ss_ver = 1;
  255|  2.55k|                break;
  256|  5.82k|        case 1: hdr->layout = DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (256:9): [True: 5.82k, False: 5.38k]
  ------------------
  257|  5.82k|                break;
  258|  2.83k|        case 2:
  ------------------
  |  Branch (258:9): [True: 2.83k, False: 8.38k]
  ------------------
  259|  2.83k|            if (hdr->hbd == 2) {
  ------------------
  |  Branch (259:17): [True: 2.28k, False: 548]
  ------------------
  260|  2.28k|                hdr->ss_hor = dav1d_get_bit(gb);
  261|  2.28k|                if (hdr->ss_hor)
  ------------------
  |  Branch (261:21): [True: 1.52k, False: 765]
  ------------------
  262|  1.52k|                    hdr->ss_ver = dav1d_get_bit(gb);
  263|  2.28k|            } else
  264|    548|                hdr->ss_hor = 1;
  265|  2.83k|            hdr->layout = hdr->ss_hor ?
  ------------------
  |  Branch (265:27): [True: 2.06k, False: 765]
  ------------------
  266|  2.06k|                          hdr->ss_ver ? DAV1D_PIXEL_LAYOUT_I420 :
  ------------------
  |  Branch (266:27): [True: 1.41k, False: 653]
  ------------------
  267|  2.06k|                                        DAV1D_PIXEL_LAYOUT_I422 :
  268|  2.83k|                                        DAV1D_PIXEL_LAYOUT_I444;
  269|  2.83k|            break;
  270|  11.2k|        }
  271|  11.2k|        hdr->chr = (hdr->ss_hor & hdr->ss_ver) ?
  ------------------
  |  Branch (271:20): [True: 3.97k, False: 7.24k]
  ------------------
  272|  7.24k|                   dav1d_get_bits(gb, 2) : DAV1D_CHR_UNKNOWN;
  273|  11.2k|    }
  274|  14.7k|    if (strict_std_compliance &&
  ------------------
  |  Branch (274:9): [True: 0, False: 14.7k]
  ------------------
  275|      0|        hdr->mtrx == DAV1D_MC_IDENTITY && hdr->layout != DAV1D_PIXEL_LAYOUT_I444)
  ------------------
  |  Branch (275:9): [True: 0, False: 0]
  |  Branch (275:43): [True: 0, False: 0]
  ------------------
  276|      0|    {
  277|      0|        goto error;
  278|      0|    }
  279|  14.7k|    if (!hdr->monochrome)
  ------------------
  |  Branch (279:9): [True: 11.2k, False: 3.57k]
  ------------------
  280|  11.2k|        hdr->separate_uv_delta_q = dav1d_get_bit(gb);
  281|       |#if DEBUG_SEQ_HDR
  282|       |    printf("SEQHDR: post-colorinfo: off=%u\n",
  283|       |           dav1d_get_bits_pos(gb) - init_bit_pos);
  284|       |#endif
  285|       |
  286|  14.7k|    hdr->film_grain_present = dav1d_get_bit(gb);
  287|       |#if DEBUG_SEQ_HDR
  288|       |    printf("SEQHDR: post-filmgrain: off=%u\n",
  289|       |           dav1d_get_bits_pos(gb) - init_bit_pos);
  290|       |#endif
  291|       |
  292|       |    // We needn't bother flushing the OBU here: we'll check we didn't
  293|       |    // overrun in the caller and will then discard gb, so there's no
  294|       |    // point in setting its position properly.
  295|       |
  296|  14.7k|    return check_trailing_bits(gb, strict_std_compliance);
  297|       |
  298|    262|error:
  299|    262|    return DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|    262|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  300|  14.7k|}
obu.c:parse_frame_hdr:
  409|  19.2k|static int parse_frame_hdr(Dav1dContext *const c, GetBits *const gb) {
  410|  19.2k|#define DEBUG_FRAME_HDR 0
  411|       |
  412|       |#if DEBUG_FRAME_HDR
  413|       |    const uint8_t *const init_ptr = gb->ptr;
  414|       |#endif
  415|  19.2k|    const Dav1dSequenceHeader *const seqhdr = c->seq_hdr;
  416|  19.2k|    Dav1dFrameHeader *const hdr = c->frame_hdr;
  417|       |
  418|  19.2k|    if (!seqhdr->reduced_still_picture_header)
  ------------------
  |  Branch (418:9): [True: 7.61k, False: 11.6k]
  ------------------
  419|  7.61k|        hdr->show_existing_frame = dav1d_get_bit(gb);
  420|       |#if DEBUG_FRAME_HDR
  421|       |    printf("HDR: post-show_existing_frame: off=%td\n",
  422|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  423|       |#endif
  424|  19.2k|    if (hdr->show_existing_frame) {
  ------------------
  |  Branch (424:9): [True: 104, False: 19.1k]
  ------------------
  425|    104|        hdr->existing_frame_idx = dav1d_get_bits(gb, 3);
  426|    104|        if (seqhdr->decoder_model_info_present && !seqhdr->equal_picture_interval)
  ------------------
  |  Branch (426:13): [True: 3, False: 101]
  |  Branch (426:51): [True: 2, False: 1]
  ------------------
  427|      2|            hdr->frame_presentation_delay = dav1d_get_bits(gb, seqhdr->frame_presentation_delay_length);
  428|    104|        if (seqhdr->frame_id_numbers_present) {
  ------------------
  |  Branch (428:13): [True: 9, False: 95]
  ------------------
  429|      9|            hdr->frame_id = dav1d_get_bits(gb, seqhdr->frame_id_n_bits);
  430|      9|            Dav1dFrameHeader *const ref_frame_hdr = c->refs[hdr->existing_frame_idx].p.p.frame_hdr;
  431|      9|            if (!ref_frame_hdr || ref_frame_hdr->frame_id != hdr->frame_id) goto error;
  ------------------
  |  Branch (431:17): [True: 2, False: 7]
  |  Branch (431:35): [True: 4, False: 3]
  ------------------
  432|      9|        }
  433|     98|        return 0;
  434|    104|    }
  435|       |
  436|  19.1k|    if (seqhdr->reduced_still_picture_header) {
  ------------------
  |  Branch (436:9): [True: 11.6k, False: 7.50k]
  ------------------
  437|  11.6k|        hdr->frame_type = DAV1D_FRAME_TYPE_KEY;
  438|  11.6k|        hdr->show_frame = 1;
  439|  11.6k|    } else {
  440|  7.50k|        hdr->frame_type = dav1d_get_bits(gb, 2);
  441|  7.50k|        hdr->show_frame = dav1d_get_bit(gb);
  442|  7.50k|    }
  443|  19.1k|    if (hdr->show_frame) {
  ------------------
  |  Branch (443:9): [True: 17.0k, False: 2.13k]
  ------------------
  444|  17.0k|        if (seqhdr->decoder_model_info_present && !seqhdr->equal_picture_interval)
  ------------------
  |  Branch (444:13): [True: 142, False: 16.8k]
  |  Branch (444:51): [True: 127, False: 15]
  ------------------
  445|    127|            hdr->frame_presentation_delay = dav1d_get_bits(gb, seqhdr->frame_presentation_delay_length);
  446|  17.0k|        hdr->showable_frame = hdr->frame_type != DAV1D_FRAME_TYPE_KEY;
  447|  17.0k|    } else
  448|  2.13k|        hdr->showable_frame = dav1d_get_bit(gb);
  449|  19.1k|    hdr->error_resilient_mode =
  450|  19.1k|        (hdr->frame_type == DAV1D_FRAME_TYPE_KEY && hdr->show_frame) ||
  ------------------
  |  Branch (450:10): [True: 16.1k, False: 3.03k]
  |  Branch (450:53): [True: 15.8k, False: 260]
  ------------------
  451|  3.29k|        hdr->frame_type == DAV1D_FRAME_TYPE_SWITCH ||
  ------------------
  |  Branch (451:9): [True: 169, False: 3.12k]
  ------------------
  452|  3.12k|        seqhdr->reduced_still_picture_header || dav1d_get_bit(gb);
  ------------------
  |  Branch (452:9): [True: 0, False: 3.12k]
  |  Branch (452:49): [True: 296, False: 2.82k]
  ------------------
  453|       |#if DEBUG_FRAME_HDR
  454|       |    printf("HDR: post-frametype_bits: off=%td\n",
  455|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  456|       |#endif
  457|  19.1k|    hdr->disable_cdf_update = dav1d_get_bit(gb);
  458|  19.1k|    hdr->allow_screen_content_tools = seqhdr->screen_content_tools == DAV1D_ADAPTIVE ?
  ------------------
  |  Branch (458:39): [True: 16.7k, False: 2.39k]
  ------------------
  459|  16.7k|                                      dav1d_get_bit(gb) : seqhdr->screen_content_tools;
  460|  19.1k|    if (hdr->allow_screen_content_tools)
  ------------------
  |  Branch (460:9): [True: 8.34k, False: 10.7k]
  ------------------
  461|  8.34k|        hdr->force_integer_mv = seqhdr->force_integer_mv == DAV1D_ADAPTIVE ?
  ------------------
  |  Branch (461:33): [True: 7.36k, False: 980]
  ------------------
  462|  7.36k|                                dav1d_get_bit(gb) : seqhdr->force_integer_mv;
  463|       |
  464|  19.1k|    if (IS_KEY_OR_INTRA(hdr))
  ------------------
  |  |   43|  19.1k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  19.1k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 16.2k, False: 2.84k]
  |  |  ------------------
  ------------------
  465|  16.2k|        hdr->force_integer_mv = 1;
  466|       |
  467|  19.1k|    if (seqhdr->frame_id_numbers_present)
  ------------------
  |  Branch (467:9): [True: 426, False: 18.7k]
  ------------------
  468|    426|        hdr->frame_id = dav1d_get_bits(gb, seqhdr->frame_id_n_bits);
  469|       |
  470|  19.1k|    if (!seqhdr->reduced_still_picture_header)
  ------------------
  |  Branch (470:9): [True: 7.50k, False: 11.6k]
  ------------------
  471|  7.50k|        hdr->frame_size_override = hdr->frame_type == DAV1D_FRAME_TYPE_SWITCH ? 1 : dav1d_get_bit(gb);
  ------------------
  |  Branch (471:36): [True: 169, False: 7.33k]
  ------------------
  472|       |#if DEBUG_FRAME_HDR
  473|       |    printf("HDR: post-frame_size_override_flag: off=%td\n",
  474|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  475|       |#endif
  476|  19.1k|    if (seqhdr->order_hint)
  ------------------
  |  Branch (476:9): [True: 4.79k, False: 14.3k]
  ------------------
  477|  4.79k|        hdr->frame_offset = dav1d_get_bits(gb, seqhdr->order_hint_n_bits);
  478|  19.1k|    hdr->primary_ref_frame = !hdr->error_resilient_mode && IS_INTER_OR_SWITCH(hdr) ?
  ------------------
  |  |   36|  2.82k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.48k, False: 341]
  |  |  ------------------
  ------------------
  |  Branch (478:30): [True: 2.82k, False: 16.3k]
  ------------------
  479|  16.6k|                             dav1d_get_bits(gb, 3) : DAV1D_PRIMARY_REF_NONE;
  ------------------
  |  |   45|  35.7k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  480|       |
  481|  19.1k|    if (seqhdr->decoder_model_info_present) {
  ------------------
  |  Branch (481:9): [True: 155, False: 18.9k]
  ------------------
  482|    155|        hdr->buffer_removal_time_present = dav1d_get_bit(gb);
  483|    155|        if (hdr->buffer_removal_time_present) {
  ------------------
  |  Branch (483:13): [True: 56, False: 99]
  ------------------
  484|    415|            for (int i = 0; i < c->seq_hdr->num_operating_points; i++) {
  ------------------
  |  Branch (484:29): [True: 359, False: 56]
  ------------------
  485|    359|                const struct Dav1dSequenceHeaderOperatingPoint *const seqop = &seqhdr->operating_points[i];
  486|    359|                struct Dav1dFrameHeaderOperatingPoint *const op = &hdr->operating_points[i];
  487|    359|                if (seqop->decoder_model_param_present) {
  ------------------
  |  Branch (487:21): [True: 177, False: 182]
  ------------------
  488|    177|                    int in_temporal_layer = (seqop->idc >> hdr->temporal_id) & 1;
  489|    177|                    int in_spatial_layer  = (seqop->idc >> (hdr->spatial_id + 8)) & 1;
  490|    177|                    if (!seqop->idc || (in_temporal_layer && in_spatial_layer))
  ------------------
  |  Branch (490:25): [True: 0, False: 177]
  |  Branch (490:41): [True: 99, False: 78]
  |  Branch (490:62): [True: 79, False: 20]
  ------------------
  491|     79|                        op->buffer_removal_time = dav1d_get_bits(gb, seqhdr->buffer_removal_delay_length);
  492|    177|                }
  493|    359|            }
  494|     56|        }
  495|    155|    }
  496|       |
  497|  19.1k|    if (IS_KEY_OR_INTRA(hdr)) {
  ------------------
  |  |   43|  19.1k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  19.1k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 16.2k, False: 2.84k]
  |  |  ------------------
  ------------------
  498|  16.2k|        hdr->refresh_frame_flags = (hdr->frame_type == DAV1D_FRAME_TYPE_KEY &&
  ------------------
  |  Branch (498:37): [True: 16.1k, False: 191]
  ------------------
  499|  16.1k|                                    hdr->show_frame) ? 0xff : dav1d_get_bits(gb, 8);
  ------------------
  |  Branch (499:37): [True: 15.8k, False: 260]
  ------------------
  500|  16.2k|        if (hdr->refresh_frame_flags != 0xff && hdr->error_resilient_mode && seqhdr->order_hint)
  ------------------
  |  Branch (500:13): [True: 443, False: 15.8k]
  |  Branch (500:49): [True: 110, False: 333]
  |  Branch (500:78): [True: 64, False: 46]
  ------------------
  501|    576|            for (int i = 0; i < 8; i++)
  ------------------
  |  Branch (501:29): [True: 512, False: 64]
  ------------------
  502|    512|                dav1d_get_bits(gb, seqhdr->order_hint_n_bits);
  503|  16.2k|        if (c->strict_std_compliance &&
  ------------------
  |  Branch (503:13): [True: 0, False: 16.2k]
  ------------------
  504|      0|            hdr->frame_type == DAV1D_FRAME_TYPE_INTRA && hdr->refresh_frame_flags == 0xff)
  ------------------
  |  Branch (504:13): [True: 0, False: 0]
  |  Branch (504:58): [True: 0, False: 0]
  ------------------
  505|      0|        {
  506|      0|            goto error;
  507|      0|        }
  508|  16.2k|        if (read_frame_size(c, gb, 0) < 0) goto error;
  ------------------
  |  Branch (508:13): [True: 0, False: 16.2k]
  ------------------
  509|  16.2k|        if (hdr->allow_screen_content_tools && !hdr->super_res.enabled)
  ------------------
  |  Branch (509:13): [True: 6.81k, False: 9.47k]
  |  Branch (509:48): [True: 5.83k, False: 979]
  ------------------
  510|  5.83k|            hdr->allow_intrabc = dav1d_get_bit(gb);
  511|  16.2k|    } else {
  512|  2.84k|        hdr->refresh_frame_flags = hdr->frame_type == DAV1D_FRAME_TYPE_SWITCH ? 0xff :
  ------------------
  |  Branch (512:36): [True: 169, False: 2.67k]
  ------------------
  513|  2.84k|                                   dav1d_get_bits(gb, 8);
  514|  2.84k|        if (hdr->error_resilient_mode && seqhdr->order_hint)
  ------------------
  |  Branch (514:13): [True: 355, False: 2.48k]
  |  Branch (514:42): [True: 214, False: 141]
  ------------------
  515|  1.92k|            for (int i = 0; i < 8; i++)
  ------------------
  |  Branch (515:29): [True: 1.71k, False: 214]
  ------------------
  516|  1.71k|                dav1d_get_bits(gb, seqhdr->order_hint_n_bits);
  517|  2.84k|        if (seqhdr->order_hint) {
  ------------------
  |  Branch (517:13): [True: 2.12k, False: 715]
  ------------------
  518|  2.12k|            hdr->frame_ref_short_signaling = dav1d_get_bit(gb);
  519|  2.12k|            if (hdr->frame_ref_short_signaling) {
  ------------------
  |  Branch (519:17): [True: 735, False: 1.39k]
  ------------------
  520|    735|                hdr->refidx[0] = dav1d_get_bits(gb, 3);
  521|    735|                hdr->refidx[1] = hdr->refidx[2] = -1;
  522|    735|                hdr->refidx[3] = dav1d_get_bits(gb, 3);
  523|       |
  524|       |                /* +1 allows for unconditional stores, as unused
  525|       |                 * values can be dumped into frame_offset[-1]. */
  526|    735|                int frame_offset_mem[8+1];
  527|    735|                int *const frame_offset = &frame_offset_mem[1];
  528|    735|                int earliest_ref = -1;
  529|  6.58k|                for (int i = 0, earliest_offset = INT_MAX; i < 8; i++) {
  ------------------
  |  Branch (529:60): [True: 5.85k, False: 729]
  ------------------
  530|  5.85k|                    const Dav1dFrameHeader *const refhdr = c->refs[i].p.p.frame_hdr;
  531|  5.85k|                    if (!refhdr) goto error;
  ------------------
  |  Branch (531:25): [True: 6, False: 5.84k]
  ------------------
  532|  5.84k|                    const int diff = get_poc_diff(seqhdr->order_hint_n_bits,
  533|  5.84k|                                                  refhdr->frame_offset,
  534|  5.84k|                                                  hdr->frame_offset);
  535|  5.84k|                    frame_offset[i] = diff;
  536|  5.84k|                    if (diff < earliest_offset) {
  ------------------
  |  Branch (536:25): [True: 1.12k, False: 4.72k]
  ------------------
  537|  1.12k|                        earliest_offset = diff;
  538|  1.12k|                        earliest_ref = i;
  539|  1.12k|                    }
  540|  5.84k|                }
  541|    729|                frame_offset[hdr->refidx[0]] = INT_MIN; // = reference frame is used
  542|    729|                frame_offset[hdr->refidx[3]] = INT_MIN;
  543|    729|                assert(earliest_ref >= 0);
  ------------------
  |  |  140|    729|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 729]
  |  |  |  Branch (140:68): [Folded, False: 729]
  |  |  ------------------
  ------------------
  544|       |
  545|    729|                int refidx = -1;
  546|  6.56k|                for (int i = 0, latest_offset = 0; i < 8; i++) {
  ------------------
  |  Branch (546:52): [True: 5.83k, False: 729]
  ------------------
  547|  5.83k|                    const int hint = frame_offset[i];
  548|  5.83k|                    if (hint >= latest_offset) {
  ------------------
  |  Branch (548:25): [True: 1.36k, False: 4.46k]
  ------------------
  549|  1.36k|                        latest_offset = hint;
  550|  1.36k|                        refidx = i;
  551|  1.36k|                    }
  552|  5.83k|                }
  553|    729|                frame_offset[refidx] = INT_MIN;
  554|    729|                hdr->refidx[6] = refidx;
  555|       |
  556|  2.18k|                for (int i = 4; i < 6; i++) {
  ------------------
  |  Branch (556:33): [True: 1.45k, False: 729]
  ------------------
  557|       |                    /* Unsigned compares to handle negative values. */
  558|  1.45k|                    unsigned earliest_offset = UINT8_MAX;
  559|  1.45k|                    refidx = -1;
  560|  13.1k|                    for (int j = 0; j < 8; j++) {
  ------------------
  |  Branch (560:37): [True: 11.6k, False: 1.45k]
  ------------------
  561|  11.6k|                        const unsigned hint = frame_offset[j];
  562|  11.6k|                        if (hint < earliest_offset) {
  ------------------
  |  Branch (562:29): [True: 655, False: 11.0k]
  ------------------
  563|    655|                            earliest_offset = hint;
  564|    655|                            refidx = j;
  565|    655|                        }
  566|  11.6k|                    }
  567|  1.45k|                    frame_offset[refidx] = INT_MIN;
  568|  1.45k|                    hdr->refidx[i] = refidx;
  569|  1.45k|                }
  570|       |
  571|  5.10k|                for (int i = 1; i < 7; i++) {
  ------------------
  |  Branch (571:33): [True: 4.37k, False: 729]
  ------------------
  572|  4.37k|                    refidx = hdr->refidx[i];
  573|  4.37k|                    if (refidx < 0) {
  ------------------
  |  Branch (573:25): [True: 2.77k, False: 1.60k]
  ------------------
  574|  2.77k|                        unsigned latest_offset = ~UINT8_MAX;
  575|  24.9k|                        for (int j = 0; j < 8; j++) {
  ------------------
  |  Branch (575:41): [True: 22.1k, False: 2.77k]
  ------------------
  576|  22.1k|                            const unsigned hint = frame_offset[j];
  577|  22.1k|                            if (hint >= latest_offset) {
  ------------------
  |  Branch (577:33): [True: 8.94k, False: 13.2k]
  ------------------
  578|  8.94k|                                latest_offset = hint;
  579|  8.94k|                                refidx = j;
  580|  8.94k|                            }
  581|  22.1k|                        }
  582|  2.77k|                        frame_offset[refidx] = INT_MIN;
  583|  2.77k|                        hdr->refidx[i] = refidx >= 0 ? refidx : earliest_ref;
  ------------------
  |  Branch (583:42): [True: 2.37k, False: 392]
  ------------------
  584|  2.77k|                    }
  585|  4.37k|                }
  586|    729|            }
  587|  2.12k|        }
  588|  22.5k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (588:25): [True: 19.7k, False: 2.81k]
  ------------------
  589|  19.7k|            if (!hdr->frame_ref_short_signaling)
  ------------------
  |  Branch (589:17): [True: 14.6k, False: 5.08k]
  ------------------
  590|  14.6k|                hdr->refidx[i] = dav1d_get_bits(gb, 3);
  591|  19.7k|            if (seqhdr->frame_id_numbers_present) {
  ------------------
  |  Branch (591:17): [True: 32, False: 19.7k]
  ------------------
  592|     32|                const unsigned delta_ref_frame_id = dav1d_get_bits(gb, seqhdr->delta_frame_id_n_bits) + 1;
  593|     32|                const unsigned ref_frame_id = (hdr->frame_id + (1 << seqhdr->frame_id_n_bits) - delta_ref_frame_id) & ((1 << seqhdr->frame_id_n_bits) - 1);
  594|     32|                Dav1dFrameHeader *const ref_frame_hdr = c->refs[hdr->refidx[i]].p.p.frame_hdr;
  595|     32|                if (!ref_frame_hdr || ref_frame_hdr->frame_id != ref_frame_id) goto error;
  ------------------
  |  Branch (595:21): [True: 6, False: 26]
  |  Branch (595:39): [True: 12, False: 14]
  ------------------
  596|     32|            }
  597|  19.7k|        }
  598|  2.81k|        const int use_ref = !hdr->error_resilient_mode &&
  ------------------
  |  Branch (598:29): [True: 2.47k, False: 346]
  ------------------
  599|  2.47k|                            hdr->frame_size_override;
  ------------------
  |  Branch (599:29): [True: 499, False: 1.97k]
  ------------------
  600|  2.81k|        if (read_frame_size(c, gb, use_ref) < 0) goto error;
  ------------------
  |  Branch (600:13): [True: 2, False: 2.81k]
  ------------------
  601|  2.81k|        if (!hdr->force_integer_mv)
  ------------------
  |  Branch (601:13): [True: 2.22k, False: 595]
  ------------------
  602|  2.22k|            hdr->hp = dav1d_get_bit(gb);
  603|  2.81k|        hdr->subpel_filter_mode = dav1d_get_bit(gb) ? DAV1D_FILTER_SWITCHABLE :
  ------------------
  |  Branch (603:35): [True: 1.00k, False: 1.81k]
  ------------------
  604|  2.81k|                                                      dav1d_get_bits(gb, 2);
  605|  2.81k|        hdr->switchable_motion_mode = dav1d_get_bit(gb);
  606|  2.81k|        if (!hdr->error_resilient_mode && seqhdr->ref_frame_mvs &&
  ------------------
  |  Branch (606:13): [True: 2.46k, False: 346]
  |  Branch (606:43): [True: 1.42k, False: 1.04k]
  ------------------
  607|  1.42k|            seqhdr->order_hint && IS_INTER_OR_SWITCH(hdr))
  ------------------
  |  |   36|  1.42k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 1.42k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (607:13): [True: 1.42k, False: 0]
  ------------------
  608|  1.42k|        {
  609|  1.42k|            hdr->use_ref_frame_mvs = dav1d_get_bit(gb);
  610|  1.42k|        }
  611|  2.81k|    }
  612|       |#if DEBUG_FRAME_HDR
  613|       |    printf("HDR: post-frametype-specific-bits: off=%td\n",
  614|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  615|       |#endif
  616|       |
  617|  19.1k|    if (!seqhdr->reduced_still_picture_header && !hdr->disable_cdf_update)
  ------------------
  |  Branch (617:9): [True: 7.48k, False: 11.6k]
  |  Branch (617:50): [True: 6.20k, False: 1.27k]
  ------------------
  618|  6.20k|        hdr->refresh_context = !dav1d_get_bit(gb);
  619|       |#if DEBUG_FRAME_HDR
  620|       |    printf("HDR: post-refresh_context: off=%td\n",
  621|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  622|       |#endif
  623|       |
  624|       |    // tile data
  625|  19.1k|    hdr->tiling.uniform = dav1d_get_bit(gb);
  626|  19.1k|    const int sbsz_min1 = (64 << seqhdr->sb128) - 1;
  627|  19.1k|    const int sbsz_log2 = 6 + seqhdr->sb128;
  628|  19.1k|    const int sbw = (hdr->width[0] + sbsz_min1) >> sbsz_log2;
  629|  19.1k|    const int sbh = (hdr->height + sbsz_min1) >> sbsz_log2;
  630|  19.1k|    const int max_tile_width_sb = 4096 >> sbsz_log2;
  631|  19.1k|    const int max_tile_area_sb = 4096 * 2304 >> (2 * sbsz_log2);
  632|  19.1k|    hdr->tiling.min_log2_cols = tile_log2(max_tile_width_sb, sbw);
  633|  19.1k|    hdr->tiling.max_log2_cols = tile_log2(1, imin(sbw, DAV1D_MAX_TILE_COLS));
  ------------------
  |  |   41|  19.1k|#define DAV1D_MAX_TILE_COLS 64
  ------------------
  634|  19.1k|    hdr->tiling.max_log2_rows = tile_log2(1, imin(sbh, DAV1D_MAX_TILE_ROWS));
  ------------------
  |  |   42|  19.1k|#define DAV1D_MAX_TILE_ROWS 64
  ------------------
  635|  19.1k|    const int min_log2_tiles = imax(tile_log2(max_tile_area_sb, sbw * sbh),
  636|  19.1k|                              hdr->tiling.min_log2_cols);
  637|  19.1k|    if (hdr->tiling.uniform) {
  ------------------
  |  Branch (637:9): [True: 12.5k, False: 6.56k]
  ------------------
  638|  12.5k|        for (hdr->tiling.log2_cols = hdr->tiling.min_log2_cols;
  639|  13.5k|             hdr->tiling.log2_cols < hdr->tiling.max_log2_cols && dav1d_get_bit(gb);
  ------------------
  |  Branch (639:14): [True: 7.38k, False: 6.14k]
  |  Branch (639:67): [True: 987, False: 6.40k]
  ------------------
  640|  12.5k|             hdr->tiling.log2_cols++) ;
  641|  12.5k|        const int tile_w = 1 + ((sbw - 1) >> hdr->tiling.log2_cols);
  642|  12.5k|        hdr->tiling.cols = 0;
  643|  28.8k|        for (int sbx = 0; sbx < sbw; sbx += tile_w, hdr->tiling.cols++)
  ------------------
  |  Branch (643:27): [True: 16.2k, False: 12.5k]
  ------------------
  644|  16.2k|            hdr->tiling.col_start_sb[hdr->tiling.cols] = sbx;
  645|  12.5k|        hdr->tiling.min_log2_rows =
  646|  12.5k|            imax(min_log2_tiles - hdr->tiling.log2_cols, 0);
  647|       |
  648|  12.5k|        for (hdr->tiling.log2_rows = hdr->tiling.min_log2_rows;
  649|  13.2k|             hdr->tiling.log2_rows < hdr->tiling.max_log2_rows && dav1d_get_bit(gb);
  ------------------
  |  Branch (649:14): [True: 4.88k, False: 8.36k]
  |  Branch (649:67): [True: 706, False: 4.18k]
  ------------------
  650|  12.5k|             hdr->tiling.log2_rows++) ;
  651|  12.5k|        const int tile_h = 1 + ((sbh - 1) >> hdr->tiling.log2_rows);
  652|  12.5k|        hdr->tiling.rows = 0;
  653|  26.9k|        for (int sby = 0; sby < sbh; sby += tile_h, hdr->tiling.rows++)
  ------------------
  |  Branch (653:27): [True: 14.3k, False: 12.5k]
  ------------------
  654|  14.3k|            hdr->tiling.row_start_sb[hdr->tiling.rows] = sby;
  655|  12.5k|    } else {
  656|  6.56k|        hdr->tiling.cols = 0;
  657|  6.56k|        int widest_tile = 0, max_tile_area_sb = sbw * sbh;
  658|  14.8k|        for (int sbx = 0; sbx < sbw && hdr->tiling.cols < DAV1D_MAX_TILE_COLS; hdr->tiling.cols++) {
  ------------------
  |  |   41|  8.27k|#define DAV1D_MAX_TILE_COLS 64
  ------------------
  |  Branch (658:27): [True: 8.27k, False: 6.55k]
  |  Branch (658:40): [True: 8.26k, False: 2]
  ------------------
  659|  8.26k|            const int tile_width_sb = imin(sbw - sbx, max_tile_width_sb);
  660|  8.26k|            const int tile_w = (tile_width_sb > 1) ? 1 + dav1d_get_uniform(gb, tile_width_sb) : 1;
  ------------------
  |  Branch (660:32): [True: 2.38k, False: 5.88k]
  ------------------
  661|  8.26k|            hdr->tiling.col_start_sb[hdr->tiling.cols] = sbx;
  662|  8.26k|            sbx += tile_w;
  663|  8.26k|            widest_tile = imax(widest_tile, tile_w);
  664|  8.26k|        }
  665|  6.56k|        hdr->tiling.log2_cols = tile_log2(1, hdr->tiling.cols);
  666|  6.56k|        if (min_log2_tiles) max_tile_area_sb >>= min_log2_tiles + 1;
  ------------------
  |  Branch (666:13): [True: 65, False: 6.49k]
  ------------------
  667|  6.56k|        const int max_tile_height_sb = imax(max_tile_area_sb / widest_tile, 1);
  668|       |
  669|  6.56k|        hdr->tiling.rows = 0;
  670|  15.2k|        for (int sby = 0; sby < sbh && hdr->tiling.rows < DAV1D_MAX_TILE_ROWS; hdr->tiling.rows++) {
  ------------------
  |  |   42|  8.74k|#define DAV1D_MAX_TILE_ROWS 64
  ------------------
  |  Branch (670:27): [True: 8.74k, False: 6.55k]
  |  Branch (670:40): [True: 8.73k, False: 11]
  ------------------
  671|  8.73k|            const int tile_height_sb = imin(sbh - sby, max_tile_height_sb);
  672|  8.73k|            const int tile_h = (tile_height_sb > 1) ? 1 + dav1d_get_uniform(gb, tile_height_sb) : 1;
  ------------------
  |  Branch (672:32): [True: 2.65k, False: 6.07k]
  ------------------
  673|  8.73k|            hdr->tiling.row_start_sb[hdr->tiling.rows] = sby;
  674|  8.73k|            sby += tile_h;
  675|  8.73k|        }
  676|  6.56k|        hdr->tiling.log2_rows = tile_log2(1, hdr->tiling.rows);
  677|  6.56k|    }
  678|  19.1k|    hdr->tiling.col_start_sb[hdr->tiling.cols] = sbw;
  679|  19.1k|    hdr->tiling.row_start_sb[hdr->tiling.rows] = sbh;
  680|  19.1k|    if (hdr->tiling.log2_cols || hdr->tiling.log2_rows) {
  ------------------
  |  Branch (680:9): [True: 968, False: 18.1k]
  |  Branch (680:34): [True: 579, False: 17.5k]
  ------------------
  681|  1.54k|        hdr->tiling.update = dav1d_get_bits(gb, hdr->tiling.log2_cols + hdr->tiling.log2_rows);
  682|  1.54k|        if (hdr->tiling.update >= hdr->tiling.cols * hdr->tiling.rows)
  ------------------
  |  Branch (682:13): [True: 14, False: 1.53k]
  ------------------
  683|     14|            goto error;
  684|  1.53k|        hdr->tiling.n_bytes = dav1d_get_bits(gb, 2) + 1;
  685|  1.53k|    }
  686|       |#if DEBUG_FRAME_HDR
  687|       |    printf("HDR: post-tiling: off=%td\n",
  688|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  689|       |#endif
  690|       |
  691|       |    // quant data
  692|  19.0k|    hdr->quant.yac = dav1d_get_bits(gb, 8);
  693|  19.0k|    if (dav1d_get_bit(gb))
  ------------------
  |  Branch (693:9): [True: 6.66k, False: 12.4k]
  ------------------
  694|  6.66k|        hdr->quant.ydc_delta = dav1d_get_sbits(gb, 7);
  695|  19.0k|    if (!seqhdr->monochrome) {
  ------------------
  |  Branch (695:9): [True: 13.6k, False: 5.40k]
  ------------------
  696|       |        // If the sequence header says that delta_q might be different
  697|       |        // for U, V, we must check whether it actually is for this
  698|       |        // frame.
  699|  13.6k|        const int diff_uv_delta = seqhdr->separate_uv_delta_q ? dav1d_get_bit(gb) : 0;
  ------------------
  |  Branch (699:35): [True: 5.68k, False: 8.00k]
  ------------------
  700|  13.6k|        if (dav1d_get_bit(gb))
  ------------------
  |  Branch (700:13): [True: 4.84k, False: 8.84k]
  ------------------
  701|  4.84k|            hdr->quant.udc_delta = dav1d_get_sbits(gb, 7);
  702|  13.6k|        if (dav1d_get_bit(gb))
  ------------------
  |  Branch (702:13): [True: 5.34k, False: 8.34k]
  ------------------
  703|  5.34k|            hdr->quant.uac_delta = dav1d_get_sbits(gb, 7);
  704|  13.6k|        if (diff_uv_delta) {
  ------------------
  |  Branch (704:13): [True: 3.02k, False: 10.6k]
  ------------------
  705|  3.02k|            if (dav1d_get_bit(gb))
  ------------------
  |  Branch (705:17): [True: 1.47k, False: 1.55k]
  ------------------
  706|  1.47k|                hdr->quant.vdc_delta = dav1d_get_sbits(gb, 7);
  707|  3.02k|            if (dav1d_get_bit(gb))
  ------------------
  |  Branch (707:17): [True: 1.68k, False: 1.34k]
  ------------------
  708|  1.68k|                hdr->quant.vac_delta = dav1d_get_sbits(gb, 7);
  709|  10.6k|        } else {
  710|  10.6k|            hdr->quant.vdc_delta = hdr->quant.udc_delta;
  711|  10.6k|            hdr->quant.vac_delta = hdr->quant.uac_delta;
  712|  10.6k|        }
  713|  13.6k|    }
  714|       |#if DEBUG_FRAME_HDR
  715|       |    printf("HDR: post-quant: off=%td\n",
  716|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  717|       |#endif
  718|  19.0k|    hdr->quant.qm = dav1d_get_bit(gb);
  719|  19.0k|    if (hdr->quant.qm) {
  ------------------
  |  Branch (719:9): [True: 8.19k, False: 10.9k]
  ------------------
  720|  8.19k|        hdr->quant.qm_y = dav1d_get_bits(gb, 4);
  721|  8.19k|        hdr->quant.qm_u = dav1d_get_bits(gb, 4);
  722|  8.19k|        hdr->quant.qm_v = seqhdr->separate_uv_delta_q ? dav1d_get_bits(gb, 4) :
  ------------------
  |  Branch (722:27): [True: 3.59k, False: 4.59k]
  ------------------
  723|  8.19k|                                                        hdr->quant.qm_u;
  724|  8.19k|    }
  725|       |#if DEBUG_FRAME_HDR
  726|       |    printf("HDR: post-qm: off=%td\n",
  727|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  728|       |#endif
  729|       |
  730|       |    // segmentation data
  731|  19.0k|    hdr->segmentation.enabled = dav1d_get_bit(gb);
  732|  19.0k|    if (hdr->segmentation.enabled) {
  ------------------
  |  Branch (732:9): [True: 6.30k, False: 12.7k]
  ------------------
  733|  6.30k|        if (hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  6.30k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (733:13): [True: 5.52k, False: 776]
  ------------------
  734|  5.52k|            hdr->segmentation.update_map = 1;
  735|  5.52k|            hdr->segmentation.update_data = 1;
  736|  5.52k|        } else {
  737|    776|            hdr->segmentation.update_map = dav1d_get_bit(gb);
  738|    776|            if (hdr->segmentation.update_map)
  ------------------
  |  Branch (738:17): [True: 401, False: 375]
  ------------------
  739|    401|                hdr->segmentation.temporal = dav1d_get_bit(gb);
  740|    776|            hdr->segmentation.update_data = dav1d_get_bit(gb);
  741|    776|        }
  742|       |
  743|  6.30k|        if (hdr->segmentation.update_data) {
  ------------------
  |  Branch (743:13): [True: 5.79k, False: 510]
  ------------------
  744|  5.79k|            hdr->segmentation.seg_data.last_active_segid = -1;
  745|  52.1k|            for (int i = 0; i < DAV1D_MAX_SEGMENTS; i++) {
  ------------------
  |  |   43|  52.1k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (745:29): [True: 46.3k, False: 5.79k]
  ------------------
  746|  46.3k|                Dav1dSegmentationData *const seg =
  747|  46.3k|                    &hdr->segmentation.seg_data.d[i];
  748|  46.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (748:21): [True: 22.6k, False: 23.6k]
  ------------------
  749|  22.6k|                    seg->delta_q = dav1d_get_sbits(gb, 9);
  750|  22.6k|                    hdr->segmentation.seg_data.last_active_segid = i;
  751|  22.6k|                }
  752|  46.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (752:21): [True: 21.6k, False: 24.6k]
  ------------------
  753|  21.6k|                    seg->delta_lf_y_v = dav1d_get_sbits(gb, 7);
  754|  21.6k|                    hdr->segmentation.seg_data.last_active_segid = i;
  755|  21.6k|                }
  756|  46.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (756:21): [True: 25.4k, False: 20.8k]
  ------------------
  757|  25.4k|                    seg->delta_lf_y_h = dav1d_get_sbits(gb, 7);
  758|  25.4k|                    hdr->segmentation.seg_data.last_active_segid = i;
  759|  25.4k|                }
  760|  46.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (760:21): [True: 24.9k, False: 21.3k]
  ------------------
  761|  24.9k|                    seg->delta_lf_u = dav1d_get_sbits(gb, 7);
  762|  24.9k|                    hdr->segmentation.seg_data.last_active_segid = i;
  763|  24.9k|                }
  764|  46.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (764:21): [True: 24.2k, False: 22.1k]
  ------------------
  765|  24.2k|                    seg->delta_lf_v = dav1d_get_sbits(gb, 7);
  766|  24.2k|                    hdr->segmentation.seg_data.last_active_segid = i;
  767|  24.2k|                }
  768|  46.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (768:21): [True: 26.0k, False: 20.2k]
  ------------------
  769|  26.0k|                    seg->ref = dav1d_get_bits(gb, 3);
  770|  26.0k|                    hdr->segmentation.seg_data.last_active_segid = i;
  771|  26.0k|                    hdr->segmentation.seg_data.preskip = 1;
  772|  26.0k|                } else {
  773|  20.2k|                    seg->ref = -1;
  774|  20.2k|                }
  775|  46.3k|                if ((seg->skip = dav1d_get_bit(gb))) {
  ------------------
  |  Branch (775:21): [True: 22.9k, False: 23.4k]
  ------------------
  776|  22.9k|                    hdr->segmentation.seg_data.last_active_segid = i;
  777|  22.9k|                    hdr->segmentation.seg_data.preskip = 1;
  778|  22.9k|                }
  779|  46.3k|                if ((seg->globalmv = dav1d_get_bit(gb))) {
  ------------------
  |  Branch (779:21): [True: 21.3k, False: 25.0k]
  ------------------
  780|  21.3k|                    hdr->segmentation.seg_data.last_active_segid = i;
  781|  21.3k|                    hdr->segmentation.seg_data.preskip = 1;
  782|  21.3k|                }
  783|  46.3k|            }
  784|  5.79k|        } else {
  785|       |            // segmentation.update_data was false so we should copy
  786|       |            // segmentation data from the reference frame.
  787|    510|            assert(hdr->primary_ref_frame != DAV1D_PRIMARY_REF_NONE);
  ------------------
  |  |  140|    510|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 510]
  |  |  |  Branch (140:68): [Folded, False: 510]
  |  |  ------------------
  ------------------
  788|    510|            const int pri_ref = hdr->refidx[hdr->primary_ref_frame];
  789|    510|            if (!c->refs[pri_ref].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (789:17): [True: 2, False: 508]
  ------------------
  790|    508|            hdr->segmentation.seg_data =
  791|    508|                c->refs[pri_ref].p.p.frame_hdr->segmentation.seg_data;
  792|    508|        }
  793|  12.7k|    } else {
  794|   115k|        for (int i = 0; i < DAV1D_MAX_SEGMENTS; i++)
  ------------------
  |  |   43|   115k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (794:25): [True: 102k, False: 12.7k]
  ------------------
  795|   102k|            hdr->segmentation.seg_data.d[i].ref = -1;
  796|  12.7k|    }
  797|       |#if DEBUG_FRAME_HDR
  798|       |    printf("HDR: post-segmentation: off=%td\n",
  799|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  800|       |#endif
  801|       |
  802|       |    // delta q
  803|  19.0k|    if (hdr->quant.yac) {
  ------------------
  |  Branch (803:9): [True: 17.9k, False: 1.12k]
  ------------------
  804|  17.9k|        hdr->delta.q.present = dav1d_get_bit(gb);
  805|  17.9k|        if (hdr->delta.q.present) {
  ------------------
  |  Branch (805:13): [True: 5.78k, False: 12.1k]
  ------------------
  806|  5.78k|            hdr->delta.q.res_log2 = dav1d_get_bits(gb, 2);
  807|  5.78k|            if (!hdr->allow_intrabc) {
  ------------------
  |  Branch (807:17): [True: 4.80k, False: 978]
  ------------------
  808|  4.80k|                hdr->delta.lf.present = dav1d_get_bit(gb);
  809|  4.80k|                if (hdr->delta.lf.present) {
  ------------------
  |  Branch (809:21): [True: 2.39k, False: 2.41k]
  ------------------
  810|  2.39k|                    hdr->delta.lf.res_log2 = dav1d_get_bits(gb, 2);
  811|  2.39k|                    hdr->delta.lf.multi = dav1d_get_bit(gb);
  812|  2.39k|                }
  813|  4.80k|            }
  814|  5.78k|        }
  815|  17.9k|    }
  816|       |#if DEBUG_FRAME_HDR
  817|       |    printf("HDR: post-delta_q_lf_flags: off=%td\n",
  818|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  819|       |#endif
  820|       |
  821|       |    // derive lossless flags
  822|  19.0k|    const int delta_lossless = !hdr->quant.ydc_delta && !hdr->quant.udc_delta &&
  ------------------
  |  Branch (822:32): [True: 12.7k, False: 6.32k]
  |  Branch (822:57): [True: 10.0k, False: 2.76k]
  ------------------
  823|  10.0k|        !hdr->quant.uac_delta && !hdr->quant.vdc_delta && !hdr->quant.vac_delta;
  ------------------
  |  Branch (823:9): [True: 8.39k, False: 1.61k]
  |  Branch (823:34): [True: 8.23k, False: 155]
  |  Branch (823:59): [True: 8.12k, False: 113]
  ------------------
  824|  19.0k|    hdr->all_lossless = 1;
  825|   171k|    for (int i = 0; i < DAV1D_MAX_SEGMENTS; i++) {
  ------------------
  |  |   43|   171k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (825:21): [True: 152k, False: 19.0k]
  ------------------
  826|   152k|        hdr->segmentation.qidx[i] = hdr->segmentation.enabled ?
  ------------------
  |  Branch (826:37): [True: 50.3k, False: 102k]
  ------------------
  827|  50.3k|            iclip_u8(hdr->quant.yac + hdr->segmentation.seg_data.d[i].delta_q) :
  828|   152k|            hdr->quant.yac;
  829|   152k|        hdr->segmentation.lossless[i] =
  830|   152k|            !hdr->segmentation.qidx[i] && delta_lossless;
  ------------------
  |  Branch (830:13): [True: 15.5k, False: 137k]
  |  Branch (830:43): [True: 8.58k, False: 6.93k]
  ------------------
  831|   152k|        hdr->all_lossless &= hdr->segmentation.lossless[i];
  832|   152k|    }
  833|       |
  834|       |    // loopfilter
  835|  19.0k|    if (hdr->all_lossless || hdr->allow_intrabc) {
  ------------------
  |  Branch (835:9): [True: 924, False: 18.1k]
  |  Branch (835:30): [True: 2.82k, False: 15.3k]
  ------------------
  836|  3.74k|        hdr->loopfilter.mode_ref_delta_enabled = 1;
  837|  3.74k|        hdr->loopfilter.mode_ref_delta_update = 1;
  838|  3.74k|        hdr->loopfilter.mode_ref_deltas = default_mode_ref_deltas;
  839|  15.3k|    } else {
  840|  15.3k|        hdr->loopfilter.level_y[0] = dav1d_get_bits(gb, 6);
  841|  15.3k|        hdr->loopfilter.level_y[1] = dav1d_get_bits(gb, 6);
  842|  15.3k|        if (!seqhdr->monochrome &&
  ------------------
  |  Branch (842:13): [True: 10.7k, False: 4.63k]
  ------------------
  843|  10.7k|            (hdr->loopfilter.level_y[0] || hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (843:14): [True: 8.50k, False: 2.20k]
  |  Branch (843:44): [True: 796, False: 1.40k]
  ------------------
  844|  9.30k|        {
  845|  9.30k|            hdr->loopfilter.level_u = dav1d_get_bits(gb, 6);
  846|  9.30k|            hdr->loopfilter.level_v = dav1d_get_bits(gb, 6);
  847|  9.30k|        }
  848|  15.3k|        hdr->loopfilter.sharpness = dav1d_get_bits(gb, 3);
  849|       |
  850|  15.3k|        if (hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  15.3k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (850:13): [True: 13.3k, False: 2.01k]
  ------------------
  851|  13.3k|            hdr->loopfilter.mode_ref_deltas = default_mode_ref_deltas;
  852|  13.3k|        } else {
  853|  2.01k|            const int ref = hdr->refidx[hdr->primary_ref_frame];
  854|  2.01k|            if (!c->refs[ref].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (854:17): [True: 3, False: 2.01k]
  ------------------
  855|  2.01k|            hdr->loopfilter.mode_ref_deltas =
  856|  2.01k|                c->refs[ref].p.p.frame_hdr->loopfilter.mode_ref_deltas;
  857|  2.01k|        }
  858|  15.3k|        hdr->loopfilter.mode_ref_delta_enabled = dav1d_get_bit(gb);
  859|  15.3k|        if (hdr->loopfilter.mode_ref_delta_enabled) {
  ------------------
  |  Branch (859:13): [True: 6.62k, False: 8.71k]
  ------------------
  860|  6.62k|            hdr->loopfilter.mode_ref_delta_update = dav1d_get_bit(gb);
  861|  6.62k|            if (hdr->loopfilter.mode_ref_delta_update) {
  ------------------
  |  Branch (861:17): [True: 2.63k, False: 3.99k]
  ------------------
  862|  23.6k|                for (int i = 0; i < 8; i++)
  ------------------
  |  Branch (862:33): [True: 21.0k, False: 2.63k]
  ------------------
  863|  21.0k|                    if (dav1d_get_bit(gb))
  ------------------
  |  Branch (863:25): [True: 10.8k, False: 10.2k]
  ------------------
  864|  10.8k|                        hdr->loopfilter.mode_ref_deltas.ref_delta[i] =
  865|  10.8k|                            dav1d_get_sbits(gb, 7);
  866|  7.89k|                for (int i = 0; i < 2; i++)
  ------------------
  |  Branch (866:33): [True: 5.26k, False: 2.63k]
  ------------------
  867|  5.26k|                    if (dav1d_get_bit(gb))
  ------------------
  |  Branch (867:25): [True: 2.67k, False: 2.59k]
  ------------------
  868|  2.67k|                        hdr->loopfilter.mode_ref_deltas.mode_delta[i] =
  869|  2.67k|                            dav1d_get_sbits(gb, 7);
  870|  2.63k|            }
  871|  6.62k|        }
  872|  15.3k|    }
  873|       |#if DEBUG_FRAME_HDR
  874|       |    printf("HDR: post-lpf: off=%td\n",
  875|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  876|       |#endif
  877|       |
  878|       |    // cdef
  879|  19.0k|    if (!hdr->all_lossless && seqhdr->cdef && !hdr->allow_intrabc) {
  ------------------
  |  Branch (879:9): [True: 18.1k, False: 924]
  |  Branch (879:31): [True: 9.48k, False: 8.68k]
  |  Branch (879:47): [True: 7.83k, False: 1.65k]
  ------------------
  880|  7.83k|        hdr->cdef.damping = dav1d_get_bits(gb, 2) + 3;
  881|  7.83k|        hdr->cdef.n_bits = dav1d_get_bits(gb, 2);
  882|  30.2k|        for (int i = 0; i < (1 << hdr->cdef.n_bits); i++) {
  ------------------
  |  Branch (882:25): [True: 22.4k, False: 7.83k]
  ------------------
  883|  22.4k|            hdr->cdef.y_strength[i] = dav1d_get_bits(gb, 6);
  884|  22.4k|            if (!seqhdr->monochrome)
  ------------------
  |  Branch (884:17): [True: 15.4k, False: 6.97k]
  ------------------
  885|  15.4k|                hdr->cdef.uv_strength[i] = dav1d_get_bits(gb, 6);
  886|  22.4k|        }
  887|  7.83k|    }
  888|       |#if DEBUG_FRAME_HDR
  889|       |    printf("HDR: post-cdef: off=%td\n",
  890|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  891|       |#endif
  892|       |
  893|       |    // restoration
  894|  19.0k|    if ((!hdr->all_lossless || hdr->super_res.enabled) &&
  ------------------
  |  Branch (894:10): [True: 18.1k, False: 924]
  |  Branch (894:32): [True: 52, False: 872]
  ------------------
  895|  18.2k|        seqhdr->restoration && !hdr->allow_intrabc)
  ------------------
  |  Branch (895:9): [True: 9.85k, False: 8.36k]
  |  Branch (895:32): [True: 7.94k, False: 1.90k]
  ------------------
  896|  7.94k|    {
  897|  7.94k|        hdr->restoration.type[0] = dav1d_get_bits(gb, 2);
  898|  7.94k|        if (!seqhdr->monochrome) {
  ------------------
  |  Branch (898:13): [True: 5.67k, False: 2.27k]
  ------------------
  899|  5.67k|            hdr->restoration.type[1] = dav1d_get_bits(gb, 2);
  900|  5.67k|            hdr->restoration.type[2] = dav1d_get_bits(gb, 2);
  901|  5.67k|        }
  902|       |
  903|  7.94k|        if (hdr->restoration.type[0] || hdr->restoration.type[1] ||
  ------------------
  |  Branch (903:13): [True: 5.08k, False: 2.86k]
  |  Branch (903:41): [True: 1.01k, False: 1.85k]
  ------------------
  904|  1.85k|            hdr->restoration.type[2])
  ------------------
  |  Branch (904:13): [True: 365, False: 1.48k]
  ------------------
  905|  6.46k|        {
  906|       |            // Log2 of the restoration unit size.
  907|  6.46k|            hdr->restoration.unit_size[0] = 6 + seqhdr->sb128;
  908|  6.46k|            if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (908:17): [True: 3.01k, False: 3.44k]
  ------------------
  909|  3.01k|                hdr->restoration.unit_size[0]++;
  910|  3.01k|                if (!seqhdr->sb128)
  ------------------
  |  Branch (910:21): [True: 1.29k, False: 1.72k]
  ------------------
  911|  1.29k|                    hdr->restoration.unit_size[0] += dav1d_get_bit(gb);
  912|  3.01k|            }
  913|  6.46k|            hdr->restoration.unit_size[1] = hdr->restoration.unit_size[0];
  914|  6.46k|            if ((hdr->restoration.type[1] || hdr->restoration.type[2]) &&
  ------------------
  |  Branch (914:18): [True: 3.68k, False: 2.78k]
  |  Branch (914:46): [True: 1.13k, False: 1.65k]
  ------------------
  915|  4.81k|                seqhdr->ss_hor == 1 && seqhdr->ss_ver == 1)
  ------------------
  |  Branch (915:17): [True: 2.14k, False: 2.67k]
  |  Branch (915:40): [True: 1.90k, False: 236]
  ------------------
  916|  1.90k|            {
  917|  1.90k|                hdr->restoration.unit_size[1] -= dav1d_get_bit(gb);
  918|  1.90k|            }
  919|  6.46k|        } else {
  920|  1.48k|            hdr->restoration.unit_size[0] = 8;
  921|  1.48k|        }
  922|  7.94k|    }
  923|       |#if DEBUG_FRAME_HDR
  924|       |    printf("HDR: post-restoration: off=%td\n",
  925|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  926|       |#endif
  927|       |
  928|  19.0k|    if (!hdr->all_lossless)
  ------------------
  |  Branch (928:9): [True: 18.1k, False: 924]
  ------------------
  929|  18.1k|        hdr->txfm_mode = dav1d_get_bit(gb) ? DAV1D_TX_SWITCHABLE : DAV1D_TX_LARGEST;
  ------------------
  |  Branch (929:26): [True: 6.20k, False: 11.9k]
  ------------------
  930|       |#if DEBUG_FRAME_HDR
  931|       |    printf("HDR: post-txfmmode: off=%td\n",
  932|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  933|       |#endif
  934|  19.0k|    if (IS_INTER_OR_SWITCH(hdr))
  ------------------
  |  |   36|  19.0k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.81k, False: 16.2k]
  |  |  ------------------
  ------------------
  935|  2.81k|        hdr->switchable_comp_refs = dav1d_get_bit(gb);
  936|       |#if DEBUG_FRAME_HDR
  937|       |    printf("HDR: post-refmode: off=%td\n",
  938|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  939|       |#endif
  940|  19.0k|    if (hdr->switchable_comp_refs && IS_INTER_OR_SWITCH(hdr) && seqhdr->order_hint) {
  ------------------
  |  |   36|  20.7k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 1.67k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (940:9): [True: 1.67k, False: 17.4k]
  |  Branch (940:65): [True: 1.28k, False: 393]
  ------------------
  941|  1.28k|        const int poc = hdr->frame_offset;
  942|  1.28k|        int off_before = -1, off_after = -1;
  943|  1.28k|        int off_before_idx, off_after_idx;
  944|  10.2k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (944:25): [True: 8.94k, False: 1.27k]
  ------------------
  945|  8.94k|            if (!c->refs[hdr->refidx[i]].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (945:17): [True: 5, False: 8.93k]
  ------------------
  946|  8.93k|            const int refpoc = c->refs[hdr->refidx[i]].p.p.frame_hdr->frame_offset;
  947|       |
  948|  8.93k|            const int diff = get_poc_diff(seqhdr->order_hint_n_bits, refpoc, poc);
  949|  8.93k|            if (diff > 0) {
  ------------------
  |  Branch (949:17): [True: 2.34k, False: 6.59k]
  ------------------
  950|  2.34k|                if (off_after < 0 || get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (950:21): [True: 443, False: 1.90k]
  |  Branch (950:38): [True: 23, False: 1.87k]
  ------------------
  951|  1.90k|                                                  off_after, refpoc) > 0)
  952|    466|                {
  953|    466|                    off_after = refpoc;
  954|    466|                    off_after_idx = i;
  955|    466|                }
  956|  6.59k|            } else if (diff < 0 && (off_before < 0 ||
  ------------------
  |  Branch (956:24): [True: 5.84k, False: 750]
  |  Branch (956:37): [True: 947, False: 4.89k]
  ------------------
  957|  4.89k|                                    get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (957:37): [True: 39, False: 4.85k]
  ------------------
  958|  4.89k|                                                 refpoc, off_before) > 0))
  959|    986|            {
  960|    986|                off_before = refpoc;
  961|    986|                off_before_idx = i;
  962|    986|            }
  963|  8.93k|        }
  964|       |
  965|  1.27k|        if ((off_before | off_after) >= 0) {
  ------------------
  |  Branch (965:13): [True: 178, False: 1.09k]
  ------------------
  966|    178|            hdr->skip_mode_refs[0] = imin(off_before_idx, off_after_idx);
  967|    178|            hdr->skip_mode_refs[1] = imax(off_before_idx, off_after_idx);
  968|    178|            hdr->skip_mode_allowed = 1;
  969|  1.09k|        } else if (off_before >= 0) {
  ------------------
  |  Branch (969:20): [True: 766, False: 331]
  ------------------
  970|    766|            int off_before2 = -1;
  971|    766|            int off_before2_idx;
  972|  6.12k|            for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (972:29): [True: 5.36k, False: 766]
  ------------------
  973|  5.36k|                if (!c->refs[hdr->refidx[i]].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (973:21): [True: 0, False: 5.36k]
  ------------------
  974|  5.36k|                const int refpoc = c->refs[hdr->refidx[i]].p.p.frame_hdr->frame_offset;
  975|  5.36k|                if (get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (975:21): [True: 534, False: 4.82k]
  ------------------
  976|  5.36k|                                 refpoc, off_before) < 0) {
  977|    534|                    if (off_before2 < 0 || get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (977:25): [True: 128, False: 406]
  |  Branch (977:44): [True: 15, False: 391]
  ------------------
  978|    406|                                                        refpoc, off_before2) > 0)
  979|    143|                    {
  980|    143|                        off_before2 = refpoc;
  981|    143|                        off_before2_idx = i;
  982|    143|                    }
  983|    534|                }
  984|  5.36k|            }
  985|       |
  986|    766|            if (off_before2 >= 0) {
  ------------------
  |  Branch (986:17): [True: 128, False: 638]
  ------------------
  987|    128|                hdr->skip_mode_refs[0] = imin(off_before_idx, off_before2_idx);
  988|    128|                hdr->skip_mode_refs[1] = imax(off_before_idx, off_before2_idx);
  989|    128|                hdr->skip_mode_allowed = 1;
  990|    128|            }
  991|    766|        }
  992|  1.27k|    }
  993|  19.0k|    if (hdr->skip_mode_allowed)
  ------------------
  |  Branch (993:9): [True: 306, False: 18.7k]
  ------------------
  994|    306|        hdr->skip_mode_enabled = dav1d_get_bit(gb);
  995|       |#if DEBUG_FRAME_HDR
  996|       |    printf("HDR: post-extskip: off=%td\n",
  997|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
  998|       |#endif
  999|  19.0k|    if (!hdr->error_resilient_mode && IS_INTER_OR_SWITCH(hdr) && seqhdr->warped_motion)
  ------------------
  |  |   36|  21.8k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.46k, False: 339]
  |  |  ------------------
  ------------------
  |  Branch (999:9): [True: 2.79k, False: 16.2k]
  |  Branch (999:66): [True: 1.33k, False: 1.12k]
  ------------------
 1000|  1.33k|        hdr->warp_motion = dav1d_get_bit(gb);
 1001|       |#if DEBUG_FRAME_HDR
 1002|       |    printf("HDR: post-warpmotionbit: off=%td\n",
 1003|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
 1004|       |#endif
 1005|  19.0k|    hdr->reduced_txtp_set = dav1d_get_bit(gb);
 1006|       |#if DEBUG_FRAME_HDR
 1007|       |    printf("HDR: post-reducedtxtpset: off=%td\n",
 1008|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
 1009|       |#endif
 1010|       |
 1011|   152k|    for (int i = 0; i < 7; i++)
  ------------------
  |  Branch (1011:21): [True: 133k, False: 19.0k]
  ------------------
 1012|   133k|        hdr->gmv[i] = dav1d_default_wm_params;
 1013|       |
 1014|  19.0k|    if (IS_INTER_OR_SWITCH(hdr)) {
  ------------------
  |  |   36|  19.0k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.80k, False: 16.2k]
  |  |  ------------------
  ------------------
 1015|  22.4k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (1015:25): [True: 19.6k, False: 2.80k]
  ------------------
 1016|  19.6k|            hdr->gmv[i].type = !dav1d_get_bit(gb) ? DAV1D_WM_TYPE_IDENTITY :
  ------------------
  |  Branch (1016:32): [True: 13.2k, False: 6.41k]
  ------------------
 1017|  19.6k|                                dav1d_get_bit(gb) ? DAV1D_WM_TYPE_ROT_ZOOM :
  ------------------
  |  Branch (1017:33): [True: 3.71k, False: 2.69k]
  ------------------
 1018|  6.41k|                                dav1d_get_bit(gb) ? DAV1D_WM_TYPE_TRANSLATION :
  ------------------
  |  Branch (1018:33): [True: 1.00k, False: 1.69k]
  ------------------
 1019|  2.69k|                                                    DAV1D_WM_TYPE_AFFINE;
 1020|       |
 1021|  19.6k|            if (hdr->gmv[i].type == DAV1D_WM_TYPE_IDENTITY) continue;
  ------------------
  |  Branch (1021:17): [True: 13.2k, False: 6.41k]
  ------------------
 1022|       |
 1023|  6.41k|            const Dav1dWarpedMotionParams *ref_gmv;
 1024|  6.41k|            if (hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  6.41k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (1024:17): [True: 1.21k, False: 5.19k]
  ------------------
 1025|  1.21k|                ref_gmv = &dav1d_default_wm_params;
 1026|  5.19k|            } else {
 1027|  5.19k|                const int pri_ref = hdr->refidx[hdr->primary_ref_frame];
 1028|  5.19k|                if (!c->refs[pri_ref].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (1028:21): [True: 3, False: 5.19k]
  ------------------
 1029|  5.19k|                ref_gmv = &c->refs[pri_ref].p.p.frame_hdr->gmv[i];
 1030|  5.19k|            }
 1031|  6.41k|            int32_t *const mat = hdr->gmv[i].matrix;
 1032|  6.41k|            const int32_t *const ref_mat = ref_gmv->matrix;
 1033|  6.41k|            int bits, shift;
 1034|       |
 1035|  6.41k|            if (hdr->gmv[i].type >= DAV1D_WM_TYPE_ROT_ZOOM) {
  ------------------
  |  Branch (1035:17): [True: 5.40k, False: 1.00k]
  ------------------
 1036|  5.40k|                mat[2] = (1 << 16) + 2 *
 1037|  5.40k|                    dav1d_get_bits_subexp(gb, (ref_mat[2] - (1 << 16)) >> 1, 12);
 1038|  5.40k|                mat[3] = 2 * dav1d_get_bits_subexp(gb, ref_mat[3] >> 1, 12);
 1039|       |
 1040|  5.40k|                bits = 12;
 1041|  5.40k|                shift = 10;
 1042|  5.40k|            } else {
 1043|  1.00k|                bits = 9 - !hdr->hp;
 1044|  1.00k|                shift = 13 + !hdr->hp;
 1045|  1.00k|            }
 1046|       |
 1047|  6.41k|            if (hdr->gmv[i].type == DAV1D_WM_TYPE_AFFINE) {
  ------------------
  |  Branch (1047:17): [True: 1.69k, False: 4.72k]
  ------------------
 1048|  1.69k|                mat[4] = 2 * dav1d_get_bits_subexp(gb, ref_mat[4] >> 1, 12);
 1049|  1.69k|                mat[5] = (1 << 16) + 2 *
 1050|  1.69k|                    dav1d_get_bits_subexp(gb, (ref_mat[5] - (1 << 16)) >> 1, 12);
 1051|  4.72k|            } else {
 1052|  4.72k|                mat[4] = -mat[3];
 1053|  4.72k|                mat[5] = mat[2];
 1054|  4.72k|            }
 1055|       |
 1056|  6.41k|            mat[0] = dav1d_get_bits_subexp(gb, ref_mat[0] >> shift, bits) * (1 << shift);
 1057|  6.41k|            mat[1] = dav1d_get_bits_subexp(gb, ref_mat[1] >> shift, bits) * (1 << shift);
 1058|  6.41k|        }
 1059|  2.80k|    }
 1060|       |#if DEBUG_FRAME_HDR
 1061|       |    printf("HDR: post-gmv: off=%td\n",
 1062|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
 1063|       |#endif
 1064|       |
 1065|  19.0k|    if (seqhdr->film_grain_present && (hdr->show_frame || hdr->showable_frame)) {
  ------------------
  |  Branch (1065:9): [True: 4.53k, False: 14.5k]
  |  Branch (1065:40): [True: 3.87k, False: 661]
  |  Branch (1065:59): [True: 274, False: 387]
  ------------------
 1066|  4.14k|        hdr->film_grain.present = dav1d_get_bit(gb);
 1067|  4.14k|        if (hdr->film_grain.present) {
  ------------------
  |  Branch (1067:13): [True: 920, False: 3.22k]
  ------------------
 1068|    920|            const unsigned seed = dav1d_get_bits(gb, 16);
 1069|    920|            hdr->film_grain.update = hdr->frame_type != DAV1D_FRAME_TYPE_INTER || dav1d_get_bit(gb);
  ------------------
  |  Branch (1069:38): [True: 780, False: 140]
  |  Branch (1069:83): [True: 13, False: 127]
  ------------------
 1070|    920|            if (!hdr->film_grain.update) {
  ------------------
  |  Branch (1070:17): [True: 127, False: 793]
  ------------------
 1071|    127|                const int refidx = dav1d_get_bits(gb, 3);
 1072|    127|                int i;
 1073|    601|                for (i = 0; i < 7; i++)
  ------------------
  |  Branch (1073:29): [True: 597, False: 4]
  ------------------
 1074|    597|                    if (hdr->refidx[i] == refidx)
  ------------------
  |  Branch (1074:25): [True: 123, False: 474]
  ------------------
 1075|    123|                        break;
 1076|    127|                if (i == 7 || !c->refs[refidx].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (1076:21): [True: 4, False: 123]
  |  Branch (1076:31): [True: 3, False: 120]
  ------------------
 1077|    120|                hdr->film_grain.data = c->refs[refidx].p.p.frame_hdr->film_grain.data;
 1078|    120|                hdr->film_grain.data.seed = seed;
 1079|    793|            } else {
 1080|    793|                Dav1dFilmGrainData *const fgd = &hdr->film_grain.data;
 1081|    793|                fgd->seed = seed;
 1082|       |
 1083|    793|                fgd->num_y_points = dav1d_get_bits(gb, 4);
 1084|    793|                if (fgd->num_y_points > 14) goto error;
  ------------------
  |  Branch (1084:21): [True: 1, False: 792]
  ------------------
 1085|  1.46k|                for (int i = 0; i < fgd->num_y_points; i++) {
  ------------------
  |  Branch (1085:33): [True: 682, False: 781]
  ------------------
 1086|    682|                    fgd->y_points[i][0] = dav1d_get_bits(gb, 8);
 1087|    682|                    if (i && fgd->y_points[i - 1][0] >= fgd->y_points[i][0])
  ------------------
  |  Branch (1087:25): [True: 312, False: 370]
  |  Branch (1087:30): [True: 11, False: 301]
  ------------------
 1088|     11|                        goto error;
 1089|    671|                    fgd->y_points[i][1] = dav1d_get_bits(gb, 8);
 1090|    671|                }
 1091|       |
 1092|    781|                if (!seqhdr->monochrome)
  ------------------
  |  Branch (1092:21): [True: 625, False: 156]
  ------------------
 1093|    625|                    fgd->chroma_scaling_from_luma = dav1d_get_bit(gb);
 1094|    781|                if (seqhdr->monochrome || fgd->chroma_scaling_from_luma ||
  ------------------
  |  Branch (1094:21): [True: 156, False: 625]
  |  Branch (1094:43): [True: 315, False: 310]
  ------------------
 1095|    310|                    (seqhdr->ss_ver == 1 && seqhdr->ss_hor == 1 && !fgd->num_y_points))
  ------------------
  |  Branch (1095:22): [True: 89, False: 221]
  |  Branch (1095:45): [True: 89, False: 0]
  |  Branch (1095:68): [True: 85, False: 4]
  ------------------
 1096|    556|                {
 1097|    556|                    fgd->num_uv_points[0] = fgd->num_uv_points[1] = 0;
 1098|    664|                } else for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1098:41): [True: 446, False: 218]
  ------------------
 1099|    446|                    fgd->num_uv_points[pl] = dav1d_get_bits(gb, 4);
 1100|    446|                    if (fgd->num_uv_points[pl] > 10) goto error;
  ------------------
  |  Branch (1100:25): [True: 2, False: 444]
  ------------------
 1101|    944|                    for (int i = 0; i < fgd->num_uv_points[pl]; i++) {
  ------------------
  |  Branch (1101:37): [True: 505, False: 439]
  ------------------
 1102|    505|                        fgd->uv_points[pl][i][0] = dav1d_get_bits(gb, 8);
 1103|    505|                        if (i && fgd->uv_points[pl][i - 1][0] >= fgd->uv_points[pl][i][0])
  ------------------
  |  Branch (1103:29): [True: 216, False: 289]
  |  Branch (1103:34): [True: 5, False: 211]
  ------------------
 1104|      5|                            goto error;
 1105|    500|                        fgd->uv_points[pl][i][1] = dav1d_get_bits(gb, 8);
 1106|    500|                    }
 1107|    444|                }
 1108|       |
 1109|    774|                if (seqhdr->ss_hor == 1 && seqhdr->ss_ver == 1 &&
  ------------------
  |  Branch (1109:21): [True: 373, False: 401]
  |  Branch (1109:44): [True: 316, False: 57]
  ------------------
 1110|    316|                    !!fgd->num_uv_points[0] != !!fgd->num_uv_points[1])
  ------------------
  |  Branch (1110:21): [True: 1, False: 315]
  ------------------
 1111|      1|                {
 1112|      1|                    goto error;
 1113|      1|                }
 1114|       |
 1115|    773|                fgd->scaling_shift = dav1d_get_bits(gb, 2) + 8;
 1116|    773|                fgd->ar_coeff_lag = dav1d_get_bits(gb, 2);
 1117|    773|                const int num_y_pos = 2 * fgd->ar_coeff_lag * (fgd->ar_coeff_lag + 1);
 1118|    773|                if (fgd->num_y_points)
  ------------------
  |  Branch (1118:21): [True: 355, False: 418]
  ------------------
 1119|  3.16k|                    for (int i = 0; i < num_y_pos; i++)
  ------------------
  |  Branch (1119:37): [True: 2.80k, False: 355]
  ------------------
 1120|  2.80k|                        fgd->ar_coeffs_y[i] = dav1d_get_bits(gb, 8) - 128;
 1121|  2.31k|                for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (1121:34): [True: 1.54k, False: 773]
  ------------------
 1122|  1.54k|                    if (fgd->num_uv_points[pl] || fgd->chroma_scaling_from_luma) {
  ------------------
  |  Branch (1122:25): [True: 281, False: 1.26k]
  |  Branch (1122:51): [True: 630, False: 635]
  ------------------
 1123|    911|                        const int num_uv_pos = num_y_pos + !!fgd->num_y_points;
 1124|  8.92k|                        for (int i = 0; i < num_uv_pos; i++)
  ------------------
  |  Branch (1124:41): [True: 8.01k, False: 911]
  ------------------
 1125|  8.01k|                            fgd->ar_coeffs_uv[pl][i] = dav1d_get_bits(gb, 8) - 128;
 1126|    911|                        if (!fgd->num_y_points)
  ------------------
  |  Branch (1126:29): [True: 425, False: 486]
  ------------------
 1127|    425|                            fgd->ar_coeffs_uv[pl][num_uv_pos] = 0;
 1128|    911|                    }
 1129|    773|                fgd->ar_coeff_shift = dav1d_get_bits(gb, 2) + 6;
 1130|    773|                fgd->grain_scale_shift = dav1d_get_bits(gb, 2);
 1131|  2.31k|                for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (1131:34): [True: 1.54k, False: 773]
  ------------------
 1132|  1.54k|                    if (fgd->num_uv_points[pl]) {
  ------------------
  |  Branch (1132:25): [True: 281, False: 1.26k]
  ------------------
 1133|    281|                        fgd->uv_mult[pl] = dav1d_get_bits(gb, 8) - 128;
 1134|    281|                        fgd->uv_luma_mult[pl] = dav1d_get_bits(gb, 8) - 128;
 1135|    281|                        fgd->uv_offset[pl] = dav1d_get_bits(gb, 9) - 256;
 1136|    281|                    }
 1137|    773|                fgd->overlap_flag = dav1d_get_bit(gb);
 1138|    773|                fgd->clip_to_restricted_range = dav1d_get_bit(gb);
 1139|    773|            }
 1140|    920|        }
 1141|  4.14k|    }
 1142|       |#if DEBUG_FRAME_HDR
 1143|       |    printf("HDR: post-filmgrain: off=%td\n",
 1144|       |           (gb->ptr - init_ptr) * 8 - gb->bits_left);
 1145|       |#endif
 1146|       |
 1147|  19.0k|    return 0;
 1148|       |
 1149|     86|error:
 1150|     86|    dav1d_log(c, "Error parsing frame header\n");
  ------------------
  |  |   39|     86|#define dav1d_log dav1d_log
  ------------------
 1151|     86|    return DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|     86|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 1152|  19.0k|}
obu.c:read_frame_size:
  343|  19.1k|{
  344|  19.1k|    const Dav1dSequenceHeader *const seqhdr = c->seq_hdr;
  345|  19.1k|    Dav1dFrameHeader *const hdr = c->frame_hdr;
  346|       |
  347|  19.1k|    if (use_ref) {
  ------------------
  |  Branch (347:9): [True: 499, False: 18.6k]
  ------------------
  348|  1.10k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (348:25): [True: 1.09k, False: 14]
  ------------------
  349|  1.09k|            if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (349:17): [True: 485, False: 610]
  ------------------
  350|    485|                const Dav1dThreadPicture *const ref =
  351|    485|                    &c->refs[c->frame_hdr->refidx[i]].p;
  352|    485|                if (!ref->p.frame_hdr) return -1;
  ------------------
  |  Branch (352:21): [True: 2, False: 483]
  ------------------
  353|    483|                hdr->width[1] = ref->p.frame_hdr->width[1];
  354|    483|                hdr->height = ref->p.frame_hdr->height;
  355|    483|                hdr->render_width = ref->p.frame_hdr->render_width;
  356|    483|                hdr->render_height = ref->p.frame_hdr->render_height;
  357|    483|                hdr->super_res.enabled = seqhdr->super_res && dav1d_get_bit(gb);
  ------------------
  |  Branch (357:42): [True: 365, False: 118]
  |  Branch (357:63): [True: 108, False: 257]
  ------------------
  358|    483|                if (hdr->super_res.enabled) {
  ------------------
  |  Branch (358:21): [True: 108, False: 375]
  ------------------
  359|    108|                    const int d = hdr->super_res.width_scale_denominator =
  360|    108|                        9 + dav1d_get_bits(gb, 3);
  361|    108|                    hdr->width[0] = imax((hdr->width[1] * 8 + (d >> 1)) / d,
  362|    108|                                         imin(16, hdr->width[1]));
  363|    375|                } else {
  364|    375|                    hdr->super_res.width_scale_denominator = 8;
  365|    375|                    hdr->width[0] = hdr->width[1];
  366|    375|                }
  367|    483|                return 0;
  368|    485|            }
  369|  1.09k|        }
  370|    499|    }
  371|       |
  372|  18.6k|    if (hdr->frame_size_override) {
  ------------------
  |  Branch (372:9): [True: 1.06k, False: 17.5k]
  ------------------
  373|  1.06k|        hdr->width[1] = dav1d_get_bits(gb, seqhdr->width_n_bits) + 1;
  374|  1.06k|        hdr->height = dav1d_get_bits(gb, seqhdr->height_n_bits) + 1;
  375|  17.5k|    } else {
  376|  17.5k|        hdr->width[1] = seqhdr->max_width;
  377|  17.5k|        hdr->height = seqhdr->max_height;
  378|  17.5k|    }
  379|  18.6k|    hdr->super_res.enabled = seqhdr->super_res && dav1d_get_bit(gb);
  ------------------
  |  Branch (379:30): [True: 7.71k, False: 10.9k]
  |  Branch (379:51): [True: 3.34k, False: 4.37k]
  ------------------
  380|  18.6k|    if (hdr->super_res.enabled) {
  ------------------
  |  Branch (380:9): [True: 3.34k, False: 15.2k]
  ------------------
  381|  3.34k|        const int d = hdr->super_res.width_scale_denominator = 9 + dav1d_get_bits(gb, 3);
  382|  3.34k|        hdr->width[0] = imax((hdr->width[1] * 8 + (d >> 1)) / d, imin(16, hdr->width[1]));
  383|  15.2k|    } else {
  384|  15.2k|        hdr->super_res.width_scale_denominator = 8;
  385|  15.2k|        hdr->width[0] = hdr->width[1];
  386|  15.2k|    }
  387|  18.6k|    hdr->have_render_size = dav1d_get_bit(gb);
  388|  18.6k|    if (hdr->have_render_size) {
  ------------------
  |  Branch (388:9): [True: 5.98k, False: 12.6k]
  ------------------
  389|  5.98k|        hdr->render_width = dav1d_get_bits(gb, 16) + 1;
  390|  5.98k|        hdr->render_height = dav1d_get_bits(gb, 16) + 1;
  391|  12.6k|    } else {
  392|  12.6k|        hdr->render_width = hdr->width[1];
  393|  12.6k|        hdr->render_height = hdr->height;
  394|  12.6k|    }
  395|  18.6k|    return 0;
  396|  19.1k|}
obu.c:tile_log2:
  398|  89.5k|static inline int tile_log2(const int sz, const int tgt) {
  399|  89.5k|    int k;
  400|   130k|    for (k = 0; (sz << k) < tgt; k++) ;
  ------------------
  |  Branch (400:17): [True: 40.7k, False: 89.5k]
  ------------------
  401|  89.5k|    return k;
  402|  89.5k|}
obu.c:check_trailing_bits:
   50|  16.7k|{
   51|  16.7k|    const int trailing_one_bit = dav1d_get_bit(gb);
   52|       |
   53|  16.7k|    if (gb->error)
  ------------------
  |  Branch (53:9): [True: 439, False: 16.2k]
  ------------------
   54|    439|        return DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|    439|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
   55|       |
   56|  16.2k|    if (!strict_std_compliance)
  ------------------
  |  Branch (56:9): [True: 16.2k, False: 0]
  ------------------
   57|  16.2k|        return 0;
   58|       |
   59|      0|    if (!trailing_one_bit || gb->state)
  ------------------
  |  Branch (59:9): [True: 0, False: 0]
  |  Branch (59:30): [True: 0, False: 0]
  ------------------
   60|      0|        return DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
   61|       |
   62|      0|    ptrdiff_t size = gb->ptr_end - gb->ptr;
   63|      0|    while (size > 0 && gb->ptr[size - 1] == 0)
  ------------------
  |  Branch (63:12): [True: 0, False: 0]
  |  Branch (63:24): [True: 0, False: 0]
  ------------------
   64|      0|        size--;
   65|       |
   66|      0|    if (size)
  ------------------
  |  Branch (66:9): [True: 0, False: 0]
  ------------------
   67|      0|        return DAV1D_ERR(EINVAL);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
   68|       |
   69|      0|    return 0;
   70|      0|}
obu.c:parse_tile_hdr:
 1154|  17.4k|static void parse_tile_hdr(Dav1dContext *const c, GetBits *const gb) {
 1155|  17.4k|    const int n_tiles = c->frame_hdr->tiling.cols * c->frame_hdr->tiling.rows;
 1156|  17.4k|    const int have_tile_pos = n_tiles > 1 ? dav1d_get_bit(gb) : 0;
  ------------------
  |  Branch (1156:31): [True: 858, False: 16.5k]
  ------------------
 1157|       |
 1158|  17.4k|    if (have_tile_pos) {
  ------------------
  |  Branch (1158:9): [True: 95, False: 17.3k]
  ------------------
 1159|     95|        const int n_bits = c->frame_hdr->tiling.log2_cols +
 1160|     95|                           c->frame_hdr->tiling.log2_rows;
 1161|     95|        c->tile[c->n_tile_data].start = dav1d_get_bits(gb, n_bits);
 1162|     95|        c->tile[c->n_tile_data].end = dav1d_get_bits(gb, n_bits);
 1163|  17.3k|    } else {
 1164|  17.3k|        c->tile[c->n_tile_data].start = 0;
 1165|  17.3k|        c->tile[c->n_tile_data].end = n_tiles - 1;
 1166|  17.3k|    }
 1167|  17.4k|}

dav1d_pal_dsp_init:
   71|  12.9k|COLD void dav1d_pal_dsp_init(Dav1dPalDSPContext *const c) {
   72|  12.9k|    c->pal_idx_finish = pal_idx_finish_c;
   73|       |
   74|  12.9k|#if HAVE_ASM
   75|       |#if ARCH_RISCV
   76|       |    pal_dsp_init_riscv(c);
   77|       |#elif ARCH_X86
   78|       |    pal_dsp_init_x86(c);
   79|  12.9k|#endif
   80|  12.9k|#endif
   81|  12.9k|}

dav1d_default_picture_alloc:
   46|  19.8k|int dav1d_default_picture_alloc(Dav1dPicture *const p, void *const cookie) {
   47|  19.8k|    assert(sizeof(Dav1dMemPoolBuffer) <= DAV1D_PICTURE_ALIGNMENT);
  ------------------
  |  |  140|  19.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [Folded, False: 19.8k]
  |  |  |  Branch (140:68): [Folded, False: 19.8k]
  |  |  ------------------
  ------------------
   48|  19.8k|    const int hbd = p->p.bpc > 8;
   49|  19.8k|    const int aligned_w = (p->p.w + 127) & ~127;
   50|  19.8k|    const int aligned_h = (p->p.h + 127) & ~127;
   51|  19.8k|    const int has_chroma = p->p.layout != DAV1D_PIXEL_LAYOUT_I400;
   52|  19.8k|    const int ss_ver = p->p.layout == DAV1D_PIXEL_LAYOUT_I420;
   53|  19.8k|    const int ss_hor = p->p.layout != DAV1D_PIXEL_LAYOUT_I444;
   54|  19.8k|    ptrdiff_t y_stride = aligned_w << hbd;
   55|  19.8k|    ptrdiff_t uv_stride = has_chroma ? y_stride >> ss_hor : 0;
  ------------------
  |  Branch (55:27): [True: 14.2k, False: 5.57k]
  ------------------
   56|       |    /* Due to how mapping of addresses to sets works in most L1 and L2 cache
   57|       |     * implementations, strides of multiples of certain power-of-two numbers
   58|       |     * may cause multiple rows of the same superblock to map to the same set,
   59|       |     * causing evictions of previous rows resulting in a reduction in cache
   60|       |     * hit rate. Avoid that by slightly padding the stride when necessary. */
   61|  19.8k|    if (!(y_stride & 1023))
  ------------------
  |  Branch (61:9): [True: 2.83k, False: 17.0k]
  ------------------
   62|  2.83k|        y_stride += DAV1D_PICTURE_ALIGNMENT;
  ------------------
  |  |   44|  2.83k|#define DAV1D_PICTURE_ALIGNMENT 64
  ------------------
   63|  19.8k|    if (!(uv_stride & 1023) && has_chroma)
  ------------------
  |  Branch (63:9): [True: 7.75k, False: 12.0k]
  |  Branch (63:32): [True: 2.17k, False: 5.57k]
  ------------------
   64|  2.17k|        uv_stride += DAV1D_PICTURE_ALIGNMENT;
  ------------------
  |  |   44|  2.17k|#define DAV1D_PICTURE_ALIGNMENT 64
  ------------------
   65|  19.8k|    p->stride[0] = y_stride;
   66|  19.8k|    p->stride[1] = uv_stride;
   67|  19.8k|    const size_t y_sz = y_stride * aligned_h;
   68|  19.8k|    const size_t uv_sz = uv_stride * (aligned_h >> ss_ver);
   69|  19.8k|    const size_t pic_size = y_sz + 2 * uv_sz;
   70|       |
   71|  19.8k|    Dav1dMemPoolBuffer *const buf = dav1d_mem_pool_pop(cookie, pic_size +
   72|  19.8k|                                                       DAV1D_PICTURE_ALIGNMENT -
  ------------------
  |  |   44|  19.8k|#define DAV1D_PICTURE_ALIGNMENT 64
  ------------------
   73|  19.8k|                                                       sizeof(Dav1dMemPoolBuffer));
   74|  19.8k|    if (!buf) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (74:9): [True: 0, False: 19.8k]
  ------------------
   75|  19.8k|    p->allocator_data = buf;
   76|       |
   77|  19.8k|    uint8_t *const data = buf->data;
   78|  19.8k|    p->data[0] = data;
   79|  19.8k|    p->data[1] = has_chroma ? data + y_sz : NULL;
  ------------------
  |  Branch (79:18): [True: 14.2k, False: 5.57k]
  ------------------
   80|  19.8k|    p->data[2] = has_chroma ? data + y_sz + uv_sz : NULL;
  ------------------
  |  Branch (80:18): [True: 14.2k, False: 5.57k]
  ------------------
   81|       |
   82|  19.8k|    return 0;
   83|  19.8k|}
dav1d_default_picture_release:
   85|  19.8k|void dav1d_default_picture_release(Dav1dPicture *const p, void *const cookie) {
   86|  19.8k|    dav1d_mem_pool_push(cookie, p->allocator_data);
   87|  19.8k|}
dav1d_picture_free_itut_t35:
  105|      3|void dav1d_picture_free_itut_t35(const uint8_t *const data, void *const user_data) {
  106|      3|    struct itut_t35_ctx_context *itut_t35_ctx = user_data;
  107|       |
  108|      6|    for (size_t i = 0; i < itut_t35_ctx->n_itut_t35; i++)
  ------------------
  |  Branch (108:24): [True: 3, False: 3]
  ------------------
  109|      3|        dav1d_free(itut_t35_ctx->itut_t35[i].payload);
  ------------------
  |  |  135|      3|#define dav1d_free(ptr) free(ptr)
  ------------------
  110|      3|    dav1d_free(itut_t35_ctx->itut_t35);
  ------------------
  |  |  135|      3|#define dav1d_free(ptr) free(ptr)
  ------------------
  111|      3|    dav1d_free(itut_t35_ctx);
  ------------------
  |  |  135|      3|#define dav1d_free(ptr) free(ptr)
  ------------------
  112|      3|}
dav1d_picture_copy_props:
  172|  17.9k|{
  173|  17.9k|    dav1d_data_props_copy(&p->m, props);
  174|       |
  175|  17.9k|    dav1d_ref_dec(&p->content_light_ref);
  176|  17.9k|    p->content_light_ref = content_light_ref;
  177|  17.9k|    p->content_light = content_light;
  178|  17.9k|    if (content_light_ref) dav1d_ref_inc(content_light_ref);
  ------------------
  |  Branch (178:9): [True: 37, False: 17.8k]
  ------------------
  179|       |
  180|  17.9k|    dav1d_ref_dec(&p->mastering_display_ref);
  181|  17.9k|    p->mastering_display_ref = mastering_display_ref;
  182|  17.9k|    p->mastering_display = mastering_display;
  183|  17.9k|    if (mastering_display_ref) dav1d_ref_inc(mastering_display_ref);
  ------------------
  |  Branch (183:9): [True: 23, False: 17.8k]
  ------------------
  184|       |
  185|  17.9k|    dav1d_ref_dec(&p->itut_t35_ref);
  186|  17.9k|    p->itut_t35_ref = itut_t35_ref;
  187|  17.9k|    p->itut_t35 = itut_t35;
  188|  17.9k|    p->n_itut_t35 = n_itut_t35;
  189|  17.9k|    if (itut_t35_ref) dav1d_ref_inc(itut_t35_ref);
  ------------------
  |  Branch (189:9): [True: 0, False: 17.9k]
  ------------------
  190|  17.9k|}
dav1d_thread_picture_alloc:
  194|  17.2k|{
  195|  17.2k|    Dav1dThreadPicture *const p = &f->sr_cur;
  196|       |
  197|  17.2k|    const int res = picture_alloc(c, &p->p, f->frame_hdr->width[1], f->frame_hdr->height,
  198|  17.2k|                                  f->seq_hdr, f->seq_hdr_ref,
  199|  17.2k|                                  f->frame_hdr, f->frame_hdr_ref,
  200|  17.2k|                                  bpc, &f->tile[0].data.m, &c->allocator,
  201|  17.2k|                                  (void **) &p->progress);
  202|  17.2k|    if (res) return res;
  ------------------
  |  Branch (202:9): [True: 0, False: 17.2k]
  ------------------
  203|       |
  204|       |    // Don't clear these flags from c->frame_flags if the frame is not going to be output.
  205|       |    // This way they will be added to the next visible frame too.
  206|  17.2k|    const int flags_mask = ((f->frame_hdr->show_frame || c->output_invisible_frames) &&
  ------------------
  |  Branch (206:30): [True: 15.2k, False: 2.02k]
  |  Branch (206:58): [True: 0, False: 2.02k]
  ------------------
  207|  15.2k|                            c->max_spatial_id == f->frame_hdr->spatial_id)
  ------------------
  |  Branch (207:29): [True: 10.3k, False: 4.86k]
  ------------------
  208|  17.2k|                           ? 0 : (PICTURE_FLAG_NEW_SEQUENCE | PICTURE_FLAG_NEW_OP_PARAMS_INFO);
  209|  17.2k|    p->flags = c->frame_flags;
  210|  17.2k|    c->frame_flags &= flags_mask;
  211|       |
  212|  17.2k|    p->visible = f->frame_hdr->show_frame;
  213|  17.2k|    p->showable = f->frame_hdr->showable_frame;
  214|       |
  215|  17.2k|    if (p->visible) {
  ------------------
  |  Branch (215:9): [True: 15.2k, False: 2.02k]
  ------------------
  216|       |        // Only add HDR10+ and T35 metadata when show frame flag is enabled
  217|  15.2k|        dav1d_picture_copy_props(&p->p, c->content_light, c->content_light_ref,
  218|  15.2k|                                 c->mastering_display, c->mastering_display_ref,
  219|  15.2k|                                 c->itut_t35, c->itut_t35_ref, c->n_itut_t35,
  220|  15.2k|                                 &f->tile[0].data.m);
  221|       |
  222|       |        // Must be removed from the context after being attached to the frame
  223|  15.2k|        dav1d_ref_dec(&c->itut_t35_ref);
  224|  15.2k|        c->itut_t35 = NULL;
  225|  15.2k|        c->n_itut_t35 = 0;
  226|  15.2k|    } else {
  227|  2.02k|        dav1d_data_props_copy(&p->p.m, &f->tile[0].data.m);
  228|  2.02k|    }
  229|       |
  230|  17.2k|    if (c->n_fc > 1) {
  ------------------
  |  Branch (230:9): [True: 0, False: 17.2k]
  ------------------
  231|      0|        atomic_init(&p->progress[0], 0);
  232|       |        atomic_init(&p->progress[1], 0);
  233|      0|    }
  234|  17.2k|    return res;
  235|  17.2k|}
dav1d_picture_alloc_copy:
  239|  2.61k|{
  240|  2.61k|    Dav1dMemPoolBuffer *const buf = (Dav1dMemPoolBuffer *)src->ref->const_data;
  241|  2.61k|    struct pic_ctx_context *const pic_ctx = buf->data;
  242|  2.61k|    const int res = picture_alloc(c, dst, w, src->p.h,
  243|  2.61k|                                  src->seq_hdr, src->seq_hdr_ref,
  244|  2.61k|                                  src->frame_hdr, src->frame_hdr_ref,
  245|  2.61k|                                  src->p.bpc, &src->m, &pic_ctx->allocator,
  246|  2.61k|                                  NULL);
  247|  2.61k|    if (res) return res;
  ------------------
  |  Branch (247:9): [True: 0, False: 2.61k]
  ------------------
  248|       |
  249|  2.61k|    dav1d_picture_copy_props(dst, src->content_light, src->content_light_ref,
  250|  2.61k|                             src->mastering_display, src->mastering_display_ref,
  251|  2.61k|                             src->itut_t35, src->itut_t35_ref, src->n_itut_t35,
  252|  2.61k|                             &src->m);
  253|       |
  254|  2.61k|    return 0;
  255|  2.61k|}
dav1d_picture_ref:
  257|   171k|void dav1d_picture_ref(Dav1dPicture *const dst, const Dav1dPicture *const src) {
  258|   171k|    assert(dst != NULL);
  ------------------
  |  |  140|   171k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 171k]
  |  |  |  Branch (140:68): [Folded, False: 171k]
  |  |  ------------------
  ------------------
  259|   171k|    assert(dst->data[0] == NULL);
  ------------------
  |  |  140|   171k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 171k]
  |  |  |  Branch (140:68): [Folded, False: 171k]
  |  |  ------------------
  ------------------
  260|   171k|    assert(src != NULL);
  ------------------
  |  |  140|   171k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 171k]
  |  |  |  Branch (140:68): [Folded, False: 171k]
  |  |  ------------------
  ------------------
  261|       |
  262|   171k|    if (src->ref) {
  ------------------
  |  Branch (262:9): [True: 171k, False: 0]
  ------------------
  263|   171k|        assert(src->data[0] != NULL);
  ------------------
  |  |  140|   171k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 171k]
  |  |  |  Branch (140:68): [Folded, False: 171k]
  |  |  ------------------
  ------------------
  264|   171k|        dav1d_ref_inc(src->ref);
  265|   171k|    }
  266|   171k|    if (src->frame_hdr_ref) dav1d_ref_inc(src->frame_hdr_ref);
  ------------------
  |  Branch (266:9): [True: 171k, False: 0]
  ------------------
  267|   171k|    if (src->seq_hdr_ref) dav1d_ref_inc(src->seq_hdr_ref);
  ------------------
  |  Branch (267:9): [True: 171k, False: 0]
  ------------------
  268|   171k|    if (src->m.user_data.ref) dav1d_ref_inc(src->m.user_data.ref);
  ------------------
  |  Branch (268:9): [True: 0, False: 171k]
  ------------------
  269|   171k|    if (src->content_light_ref) dav1d_ref_inc(src->content_light_ref);
  ------------------
  |  Branch (269:9): [True: 320, False: 171k]
  ------------------
  270|   171k|    if (src->mastering_display_ref) dav1d_ref_inc(src->mastering_display_ref);
  ------------------
  |  Branch (270:9): [True: 42, False: 171k]
  ------------------
  271|   171k|    if (src->itut_t35_ref) dav1d_ref_inc(src->itut_t35_ref);
  ------------------
  |  Branch (271:9): [True: 0, False: 171k]
  ------------------
  272|   171k|    *dst = *src;
  273|   171k|}
dav1d_picture_move_ref:
  275|  11.8k|void dav1d_picture_move_ref(Dav1dPicture *const dst, Dav1dPicture *const src) {
  276|  11.8k|    assert(dst != NULL);
  ------------------
  |  |  140|  11.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 11.8k]
  |  |  |  Branch (140:68): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  277|  11.8k|    assert(dst->data[0] == NULL);
  ------------------
  |  |  140|  11.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 11.8k]
  |  |  |  Branch (140:68): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  278|  11.8k|    assert(src != NULL);
  ------------------
  |  |  140|  11.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 11.8k]
  |  |  |  Branch (140:68): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  279|       |
  280|  11.8k|    if (src->ref)
  ------------------
  |  Branch (280:9): [True: 11.8k, False: 0]
  ------------------
  281|  11.8k|        assert(src->data[0] != NULL);
  ------------------
  |  |  140|  11.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 11.8k]
  |  |  |  Branch (140:68): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  282|       |
  283|  11.8k|    *dst = *src;
  284|  11.8k|    memset(src, 0, sizeof(*src));
  285|  11.8k|}
dav1d_thread_picture_ref:
  289|   156k|{
  290|   156k|    dav1d_picture_ref(&dst->p, &src->p);
  291|   156k|    dst->visible = src->visible;
  292|   156k|    dst->showable = src->showable;
  293|   156k|    dst->progress = src->progress;
  294|   156k|    dst->flags = src->flags;
  295|   156k|}
dav1d_thread_picture_move_ref:
  299|    917|{
  300|    917|    dav1d_picture_move_ref(&dst->p, &src->p);
  301|    917|    dst->visible = src->visible;
  302|    917|    dst->showable = src->showable;
  303|    917|    dst->progress = src->progress;
  304|    917|    dst->flags = src->flags;
  305|    917|    memset(src, 0, sizeof(*src));
  306|    917|}
dav1d_picture_unref_internal:
  308|   222k|void dav1d_picture_unref_internal(Dav1dPicture *const p) {
  309|   222k|    validate_input(p != NULL);
  ------------------
  |  |   59|   222k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|   222k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 222k]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   54|      0|                    #x, __func__); \
  |  |  |  |   55|      0|        debug_abort(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   56|      0|        return r; \
  |  |  |  |   57|      0|    }
  |  |  ------------------
  ------------------
  310|       |
  311|   222k|    if (p->ref) {
  ------------------
  |  Branch (311:9): [True: 191k, False: 31.4k]
  ------------------
  312|   191k|        validate_input(p->data[0] != NULL);
  ------------------
  |  |   59|   191k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|   191k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 191k]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|        debug_print("Input validation check \'%s\' failed in %s!\n", \
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|      0|#define debug_print(...) do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (35:39): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   54|      0|                    #x, __func__); \
  |  |  |  |   55|      0|        debug_abort(); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define debug_abort() do {} while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:36): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   56|      0|        return r; \
  |  |  |  |   57|      0|    }
  |  |  ------------------
  ------------------
  313|   191k|        dav1d_ref_dec(&p->ref);
  314|   191k|    }
  315|   222k|    dav1d_ref_dec(&p->seq_hdr_ref);
  316|   222k|    dav1d_ref_dec(&p->frame_hdr_ref);
  317|   222k|    dav1d_ref_dec(&p->m.user_data.ref);
  318|   222k|    dav1d_ref_dec(&p->content_light_ref);
  319|   222k|    dav1d_ref_dec(&p->mastering_display_ref);
  320|   222k|    dav1d_ref_dec(&p->itut_t35_ref);
  321|   222k|    memset(p, 0, sizeof(*p));
  322|   222k|    dav1d_data_props_set_defaults(&p->m);
  323|   222k|}
dav1d_thread_picture_unref:
  325|   182k|void dav1d_thread_picture_unref(Dav1dThreadPicture *const p) {
  326|   182k|    dav1d_picture_unref_internal(&p->p);
  327|       |
  328|       |    p->progress = NULL;
  329|   182k|}
dav1d_picture_get_event_flags:
  331|  15.2k|enum Dav1dEventFlags dav1d_picture_get_event_flags(const Dav1dThreadPicture *const p) {
  332|  15.2k|    if (!p->flags)
  ------------------
  |  Branch (332:9): [True: 1.90k, False: 13.3k]
  ------------------
  333|  1.90k|        return 0;
  334|       |
  335|  13.3k|    enum Dav1dEventFlags flags = 0;
  336|  13.3k|    if (p->flags & PICTURE_FLAG_NEW_SEQUENCE)
  ------------------
  |  Branch (336:9): [True: 12.5k, False: 846]
  ------------------
  337|  12.5k|       flags |= DAV1D_EVENT_FLAG_NEW_SEQUENCE;
  338|  13.3k|    if (p->flags & PICTURE_FLAG_NEW_OP_PARAMS_INFO)
  ------------------
  |  Branch (338:9): [True: 0, False: 13.3k]
  ------------------
  339|      0|       flags |= DAV1D_EVENT_FLAG_NEW_OP_PARAMS_INFO;
  340|       |
  341|  13.3k|    return flags;
  342|  15.2k|}
picture.c:picture_alloc:
  123|  19.8k|{
  124|  19.8k|    if (p->data[0]) {
  ------------------
  |  Branch (124:9): [True: 0, False: 19.8k]
  ------------------
  125|      0|        dav1d_log(c, "Picture already allocated!\n");
  ------------------
  |  |   39|      0|#define dav1d_log dav1d_log
  ------------------
  126|      0|        return -1;
  127|      0|    }
  128|  19.8k|    assert(bpc > 0 && bpc <= 16);
  ------------------
  |  |  140|  39.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 19.8k, False: 0]
  |  |  |  Branch (140:30): [True: 19.8k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 19.8k]
  |  |  ------------------
  ------------------
  129|       |
  130|  19.8k|    size_t extra = c->n_fc > 1 ? sizeof(atomic_int) * 2 : 0;
  ------------------
  |  Branch (130:20): [True: 0, False: 19.8k]
  ------------------
  131|  19.8k|    Dav1dMemPoolBuffer *buf = dav1d_mem_pool_pop(c->pic_ctx_pool,
  132|  19.8k|                                                 extra + sizeof(struct pic_ctx_context));
  133|  19.8k|    if (buf == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 19.8k]
  ------------------
  134|      0|        return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  135|       |
  136|  19.8k|    struct pic_ctx_context *pic_ctx = buf->data;
  137|       |
  138|  19.8k|    p->p.w = w;
  139|  19.8k|    p->p.h = h;
  140|  19.8k|    p->seq_hdr = seq_hdr;
  141|  19.8k|    p->frame_hdr = frame_hdr;
  142|  19.8k|    p->p.layout = seq_hdr->layout;
  143|  19.8k|    p->p.bpc = bpc;
  144|  19.8k|    dav1d_data_props_set_defaults(&p->m);
  145|  19.8k|    const int res = p_allocator->alloc_picture_callback(p, p_allocator->cookie);
  146|  19.8k|    if (res < 0) {
  ------------------
  |  Branch (146:9): [True: 0, False: 19.8k]
  ------------------
  147|      0|        dav1d_mem_pool_push(c->pic_ctx_pool, buf);
  148|      0|        return res;
  149|      0|    }
  150|       |
  151|  19.8k|    pic_ctx->allocator = *p_allocator;
  152|  19.8k|    pic_ctx->pic = *p;
  153|  19.8k|    p->ref = dav1d_ref_init(&pic_ctx->ref, buf, free_buffer, c->pic_ctx_pool, 0);
  154|       |
  155|  19.8k|    p->seq_hdr_ref = seq_hdr_ref;
  156|  19.8k|    if (seq_hdr_ref) dav1d_ref_inc(seq_hdr_ref);
  ------------------
  |  Branch (156:9): [True: 19.8k, False: 0]
  ------------------
  157|       |
  158|  19.8k|    p->frame_hdr_ref = frame_hdr_ref;
  159|  19.8k|    if (frame_hdr_ref) dav1d_ref_inc(frame_hdr_ref);
  ------------------
  |  Branch (159:9): [True: 19.8k, False: 0]
  ------------------
  160|       |
  161|  19.8k|    if (extra && extra_ptr)
  ------------------
  |  Branch (161:9): [True: 0, False: 19.8k]
  |  Branch (161:18): [True: 0, False: 0]
  ------------------
  162|      0|        *extra_ptr = &pic_ctx->extra_data;
  163|       |
  164|  19.8k|    return 0;
  165|  19.8k|}
picture.c:free_buffer:
   96|  19.8k|static void free_buffer(const uint8_t *const data, void *const user_data) {
   97|  19.8k|    Dav1dMemPoolBuffer *buf = (Dav1dMemPoolBuffer *)data;
   98|  19.8k|    struct pic_ctx_context *pic_ctx = buf->data;
   99|       |
  100|  19.8k|    pic_ctx->allocator.release_picture_callback(&pic_ctx->pic,
  101|  19.8k|                                                pic_ctx->allocator.cookie);
  102|  19.8k|    dav1d_mem_pool_push(user_data, buf);
  103|  19.8k|}

dav1d_init_qm_tables:
 1648|      1|COLD void dav1d_init_qm_tables(void) {
 1649|       |    // This function is guaranteed to be called only once
 1650|       |
 1651|     16|    for (int i = 0; i < 15; i++)
  ------------------
  |  Branch (1651:21): [True: 15, False: 1]
  ------------------
 1652|     45|        for (int j = 0; j < 2; j++) {
  ------------------
  |  Branch (1652:25): [True: 30, False: 15]
  ------------------
 1653|       |            // note that the w/h in the assignment is inverted, this is on purpose
 1654|       |            // because we store coefficients transposed
 1655|     30|            dav1d_qm_tbl[i][j][RTX_4X8  ] = qm_tbl_8x4[i][j];
 1656|     30|            dav1d_qm_tbl[i][j][RTX_8X4  ] = qm_tbl_4x8[i][j];
 1657|     30|            dav1d_qm_tbl[i][j][RTX_4X16 ] = qm_tbl_16x4[i][j];
 1658|     30|            dav1d_qm_tbl[i][j][RTX_16X4 ] = qm_tbl_4x16[i][j];
 1659|     30|            dav1d_qm_tbl[i][j][RTX_8X16 ] = qm_tbl_16x8[i][j];
 1660|     30|            dav1d_qm_tbl[i][j][RTX_16X8 ] = qm_tbl_8x16[i][j];
 1661|     30|            dav1d_qm_tbl[i][j][RTX_8X32 ] = qm_tbl_32x8[i][j];
 1662|     30|            dav1d_qm_tbl[i][j][RTX_32X8 ] = qm_tbl_8x32[i][j];
 1663|     30|            dav1d_qm_tbl[i][j][RTX_16X32] = qm_tbl_32x16[i][j];
 1664|     30|            dav1d_qm_tbl[i][j][RTX_32X16] = qm_tbl_16x32[i][j];
 1665|       |
 1666|     30|            dav1d_qm_tbl[i][j][ TX_4X4  ] = qm_tbl_4x4[i][j];
 1667|     30|            dav1d_qm_tbl[i][j][ TX_8X8  ] = qm_tbl_8x8[i][j];
 1668|     30|            dav1d_qm_tbl[i][j][ TX_16X16] = qm_tbl_16x16[i][j];
 1669|     30|            dav1d_qm_tbl[i][j][ TX_32X32] = qm_tbl_32x32[i][j];
 1670|       |
 1671|     30|            untriangle(qm_tbl_32x32[i][j], qm_tbl_32x32_t[i][j], 32);
 1672|     30|            subsample(qm_tbl_4x4[i][j],   &qm_tbl_32x32[i][j][32*3+3], 32, 8, 8);
 1673|     30|            subsample(qm_tbl_8x4[i][j],   &qm_tbl_32x16[i][j][32*1+1], 16, 4, 4);
 1674|     30|            subsample(qm_tbl_8x8[i][j],   &qm_tbl_32x32[i][j][32*1+1], 32, 4, 4);
 1675|     30|            subsample(qm_tbl_16x4[i][j],  &qm_tbl_32x16[i][j][32*1+0], 16, 2, 4);
 1676|     30|            subsample(qm_tbl_16x8[i][j],  &qm_tbl_32x16[i][j][32*0+0], 16, 2, 2);
 1677|     30|            subsample(qm_tbl_16x16[i][j], &qm_tbl_32x32[i][j][32*0+0], 32, 2, 2);
 1678|     30|            subsample(qm_tbl_32x8[i][j],  &qm_tbl_32x16[i][j][32*0+0], 16, 1, 2);
 1679|     30|            transpose(qm_tbl_4x8[i][j], qm_tbl_8x4[i][j], 8, 4);
 1680|     30|            transpose(qm_tbl_4x16[i][j], qm_tbl_16x4[i][j], 16, 4);
 1681|     30|            transpose(qm_tbl_8x16[i][j], qm_tbl_16x8[i][j], 16, 8);
 1682|     30|            transpose(qm_tbl_8x32[i][j], qm_tbl_32x8[i][j], 32, 8);
 1683|     30|            transpose(qm_tbl_16x32[i][j], qm_tbl_32x16[i][j], 32, 16);
 1684|       |
 1685|     30|            dav1d_qm_tbl[i][j][ TX_64X64] = dav1d_qm_tbl[i][j][ TX_32X32];
 1686|     30|            dav1d_qm_tbl[i][j][RTX_64X32] = dav1d_qm_tbl[i][j][ TX_32X32];
 1687|     30|            dav1d_qm_tbl[i][j][RTX_64X16] = dav1d_qm_tbl[i][j][RTX_32X16];
 1688|     30|            dav1d_qm_tbl[i][j][RTX_32X64] = dav1d_qm_tbl[i][j][ TX_32X32];
 1689|     30|            dav1d_qm_tbl[i][j][RTX_16X64] = dav1d_qm_tbl[i][j][RTX_16X32];
 1690|     30|        }
 1691|       |
 1692|       |    // dav1d_qm_tbl[15][*][*] == NULL
 1693|      1|}
qm.c:untriangle:
 1635|     30|static void untriangle(uint8_t *dst, const uint8_t *src, const int sz) {
 1636|    990|    for (int y = 0; y < sz; y++) {
  ------------------
  |  Branch (1636:21): [True: 960, False: 30]
  ------------------
 1637|    960|        memcpy(dst, src, y + 1);
 1638|    960|        const uint8_t *src_ptr = &src[y];
 1639|  15.8k|        for (int x = y + 1; x < sz; x++) {
  ------------------
  |  Branch (1639:29): [True: 14.8k, False: 960]
  ------------------
 1640|  14.8k|            src_ptr += x;
 1641|  14.8k|            dst[x] = *src_ptr;
 1642|  14.8k|        }
 1643|    960|        dst += sz;
 1644|    960|        src += y + 1;
 1645|    960|    }
 1646|     30|}
qm.c:subsample:
 1621|    210|{
 1622|  1.77k|    for (int y = 0; y < h; y += vstep)
  ------------------
  |  Branch (1622:21): [True: 1.56k, False: 210]
  ------------------
 1623|  26.0k|        for (int x = 0; x < 32; x += hstep)
  ------------------
  |  Branch (1623:25): [True: 24.4k, False: 1.56k]
  ------------------
 1624|  24.4k|            *dst++ = src[y * 32 + x];
 1625|    210|}
qm.c:transpose:
 1629|    150|{
 1630|  1.35k|    for (int y = 0, y_off = 0; y < h; y++, y_off += w)
  ------------------
  |  Branch (1630:32): [True: 1.20k, False: 150]
  ------------------
 1631|  30.9k|        for (int x = 0, x_off = 0; x < w; x++, x_off += h)
  ------------------
  |  Branch (1631:36): [True: 29.7k, False: 1.20k]
  ------------------
 1632|  29.7k|            dst[x_off + y] = src[y_off + x];
 1633|    150|}

dav1d_recon_b_intra_8bpc:
 1179|   552k|{
 1180|   552k|    Dav1dTileState *const ts = t->ts;
 1181|   552k|    const Dav1dFrameContext *const f = t->f;
 1182|   552k|    const Dav1dDSPContext *const dsp = f->dsp;
 1183|   552k|    const int bx4 = t->bx & 31, by4 = t->by & 31;
 1184|   552k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1185|   552k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 1186|   552k|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
 1187|   552k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
 1188|   552k|    const int bw4 = b_dim[0], bh4 = b_dim[1];
 1189|   552k|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
 1190|   552k|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
 1191|   552k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (1191:28): [True: 496k, False: 55.1k]
  ------------------
 1192|   496k|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1192:29): [True: 475k, False: 20.9k]
  |  Branch (1192:45): [True: 10.4k, False: 10.4k]
  ------------------
 1193|   486k|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1193:29): [True: 474k, False: 12.0k]
  |  Branch (1193:45): [True: 6.01k, False: 6.02k]
  ------------------
 1194|   552k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[b->tx];
 1195|   552k|    const TxfmInfo *const uv_t_dim = &dav1d_txfm_dimensions[b->uvtx];
 1196|       |
 1197|       |    // coefficient coding
 1198|   552k|    pixel *const edge = bitfn(t->scratch.edge) + 128;
  ------------------
  |  |   51|   552k|#define bitfn(x) x##_8bpc
  ------------------
 1199|   552k|    const int cbw4 = (bw4 + ss_hor) >> ss_hor, cbh4 = (bh4 + ss_ver) >> ss_ver;
 1200|       |
 1201|   552k|    const int intra_edge_filter_flag = f->seq_hdr->intra_edge_filter << 10;
 1202|       |
 1203|  1.11M|    for (int init_y = 0; init_y < h4; init_y += 16) {
  ------------------
  |  Branch (1203:26): [True: 564k, False: 552k]
  ------------------
 1204|   564k|        const int sub_h4 = imin(h4, 16 + init_y);
 1205|   564k|        const int sub_ch4 = imin(ch4, (init_y + 16) >> ss_ver);
 1206|  1.14M|        for (int init_x = 0; init_x < w4; init_x += 16) {
  ------------------
  |  Branch (1206:30): [True: 582k, False: 564k]
  ------------------
 1207|   582k|            if (b->pal_sz[0]) {
  ------------------
  |  Branch (1207:17): [True: 6.09k, False: 576k]
  ------------------
 1208|  6.09k|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1209|  6.09k|                             4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
  ------------------
  |  |   53|  6.09k|#define PXSTRIDE(x) (x)
  ------------------
 1210|  6.09k|                const uint8_t *pal_idx;
 1211|  6.09k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1211:21): [True: 0, False: 6.09k]
  ------------------
 1212|      0|                    const int p = t->frame_thread.pass & 1;
 1213|      0|                    assert(ts->frame_thread[p].pal_idx);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1214|      0|                    pal_idx = ts->frame_thread[p].pal_idx;
 1215|      0|                    ts->frame_thread[p].pal_idx += bw4 * bh4 * 8;
 1216|  6.09k|                } else {
 1217|  6.09k|                    pal_idx = t->scratch.pal_idx_y;
 1218|  6.09k|                }
 1219|  6.09k|                const pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (1219:42): [True: 0, False: 6.09k]
  ------------------
 1220|      0|                    f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 1221|      0|                                        ((t->bx >> 1) + (t->by & 1))][0] :
 1222|  6.09k|                    bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  6.09k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  6.09k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1223|  6.09k|                f->dsp->ipred.pal_pred(dst, f->cur.stride[0], pal,
 1224|  6.09k|                                       pal_idx, bw4 * 4, bh4 * 4);
 1225|  6.09k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  6.09k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 6.09k]
  |  |  ------------------
  |  |   35|  6.09k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  6.09k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1226|      0|                    hex_dump(dst, PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|      0|#define PXSTRIDE(x) (x)
  ------------------
 1227|      0|                             bw4 * 4, bh4 * 4, "y-pal-pred");
 1228|  6.09k|            }
 1229|       |
 1230|   582k|            const int intra_flags = (sm_flag(t->a, bx4) |
 1231|   582k|                                     sm_flag(&t->l, by4) |
 1232|   582k|                                     intra_edge_filter_flag);
 1233|   582k|            const int sb_has_tr = init_x + 16 < w4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1233:35): [True: 18.5k, False: 564k]
  |  Branch (1233:58): [True: 12.4k, False: 552k]
  ------------------
 1234|   564k|                              intra_edge_flags & EDGE_I444_TOP_HAS_RIGHT;
 1235|   582k|            const int sb_has_bl = init_x ? 0 : init_y + 16 < h4 ? 1 :
  ------------------
  |  Branch (1235:35): [True: 18.5k, False: 564k]
  |  Branch (1235:48): [True: 12.4k, False: 552k]
  ------------------
 1236|   564k|                              intra_edge_flags & EDGE_I444_LEFT_HAS_BOTTOM;
 1237|   582k|            int y, x;
 1238|   582k|            const int sub_w4 = imin(w4, init_x + 16);
 1239|  1.31M|            for (y = init_y, t->by += init_y; y < sub_h4;
  ------------------
  |  Branch (1239:47): [True: 729k, False: 582k]
  ------------------
 1240|   729k|                 y += t_dim->h, t->by += t_dim->h)
 1241|   729k|            {
 1242|   729k|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1243|   729k|                               4 * (t->by * PXSTRIDE(f->cur.stride[0]) +
  ------------------
  |  |   53|   729k|#define PXSTRIDE(x) (x)
  ------------------
 1244|   729k|                                    t->bx + init_x);
 1245|  1.97M|                for (x = init_x, t->bx += init_x; x < sub_w4;
  ------------------
  |  Branch (1245:51): [True: 1.24M, False: 729k]
  ------------------
 1246|  1.24M|                     x += t_dim->w, t->bx += t_dim->w)
 1247|  1.24M|                {
 1248|  1.24M|                    if (b->pal_sz[0]) goto skip_y_pred;
  ------------------
  |  Branch (1248:25): [True: 14.4k, False: 1.22M]
  ------------------
 1249|       |
 1250|  1.22M|                    int angle = b->y_angle;
 1251|  1.22M|                    const enum EdgeFlags edge_flags =
 1252|  1.22M|                        (((y > init_y || !sb_has_tr) && (x + t_dim->w >= sub_w4)) ?
  ------------------
  |  Branch (1252:28): [True: 500k, False: 729k]
  |  Branch (1252:42): [True: 246k, False: 483k]
  |  Branch (1252:57): [True: 334k, False: 411k]
  ------------------
 1253|   894k|                             0 : EDGE_I444_TOP_HAS_RIGHT) |
 1254|  1.22M|                        ((x > init_x || (!sb_has_bl && y + t_dim->h >= sub_h4)) ?
  ------------------
  |  Branch (1254:27): [True: 507k, False: 722k]
  |  Branch (1254:42): [True: 411k, False: 310k]
  |  Branch (1254:56): [True: 316k, False: 95.3k]
  ------------------
 1255|   823k|                             0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1256|  1.22M|                    const pixel *top_sb_edge = NULL;
 1257|  1.22M|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1257:25): [True: 233k, False: 996k]
  ------------------
 1258|   233k|                        top_sb_edge = f->ipred_edge[0];
 1259|   233k|                        const int sby = t->by >> f->sb_shift;
 1260|   233k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1261|   233k|                    }
 1262|  1.22M|                    const enum IntraPredMode m =
 1263|  1.22M|                        bytefn(dav1d_prepare_intra_edges)(t->bx,
  ------------------
  |  |   87|  1.22M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  1.22M|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1264|  1.22M|                                                          t->bx > ts->tiling.col_start,
 1265|  1.22M|                                                          t->by,
 1266|  1.22M|                                                          t->by > ts->tiling.row_start,
 1267|  1.22M|                                                          ts->tiling.col_end,
 1268|  1.22M|                                                          ts->tiling.row_end,
 1269|  1.22M|                                                          edge_flags, dst,
 1270|  1.22M|                                                          f->cur.stride[0], top_sb_edge,
 1271|  1.22M|                                                          b->y_mode, &angle,
 1272|  1.22M|                                                          t_dim->w, t_dim->h,
 1273|  1.22M|                                                          f->seq_hdr->intra_edge_filter,
 1274|  1.22M|                                                          edge HIGHBD_CALL_SUFFIX);
 1275|  1.22M|                    dsp->ipred.intra_pred[m](dst, f->cur.stride[0], edge,
 1276|  1.22M|                                             t_dim->w * 4, t_dim->h * 4,
 1277|  1.22M|                                             angle | intra_flags,
 1278|  1.22M|                                             4 * f->bw - 4 * t->bx,
 1279|  1.22M|                                             4 * f->bh - 4 * t->by
 1280|  1.22M|                                             HIGHBD_CALL_SUFFIX);
 1281|       |
 1282|  1.22M|                    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  1.22M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.22M]
  |  |  ------------------
  |  |   35|  1.22M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.22M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                  if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1283|      0|                        hex_dump(edge - t_dim->h * 4, t_dim->h * 4,
 1284|      0|                                 t_dim->h * 4, 2, "l");
 1285|      0|                        hex_dump(edge, 0, 1, 1, "tl");
 1286|      0|                        hex_dump(edge + 1, t_dim->w * 4,
 1287|      0|                                 t_dim->w * 4, 2, "t");
 1288|      0|                        hex_dump(dst, f->cur.stride[0],
 1289|      0|                                 t_dim->w * 4, t_dim->h * 4, "y-intra-pred");
 1290|      0|                    }
 1291|       |
 1292|  1.24M|                skip_y_pred: {}
 1293|  1.24M|                    if (!b->skip) {
  ------------------
  |  Branch (1293:25): [True: 668k, False: 574k]
  ------------------
 1294|   668k|                        coef *cf;
 1295|   668k|                        int eob;
 1296|   668k|                        enum TxfmType txtp;
 1297|   668k|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1297:29): [True: 0, False: 668k]
  ------------------
 1298|      0|                            const int p = t->frame_thread.pass & 1;
 1299|      0|                            const int cbi = *ts->frame_thread[p].cbi++;
 1300|      0|                            cf = ts->frame_thread[p].cf;
 1301|      0|                            ts->frame_thread[p].cf += imin(t_dim->w, 8) * imin(t_dim->h, 8) * 16;
 1302|      0|                            eob  = cbi >> 5;
 1303|      0|                            txtp = cbi & 0x1f;
 1304|   668k|                        } else {
 1305|   668k|                            uint8_t cf_ctx;
 1306|   668k|                            cf = bitfn(t->cf);
  ------------------
  |  |   51|   668k|#define bitfn(x) x##_8bpc
  ------------------
 1307|   668k|                            eob = decode_coefs(t, &t->a->lcoef[bx4 + x],
 1308|   668k|                                               &t->l.lcoef[by4 + y], b->tx, bs,
 1309|   668k|                                               b, 1, 0, cf, &txtp, &cf_ctx);
 1310|   668k|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   668k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 668k]
  |  |  ------------------
  |  |   35|   668k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   668k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1311|      0|                                printf("Post-y-cf-blk[tx=%d,txtp=%d,eob=%d]: r=%d\n",
 1312|      0|                                       b->tx, txtp, eob, ts->msac.rng);
 1313|   668k|                            dav1d_memset_likely_pow2(&t->a->lcoef[bx4 + x], cf_ctx, imin(t_dim->w, f->bw - t->bx));
 1314|   668k|                            dav1d_memset_likely_pow2(&t->l.lcoef[by4 + y], cf_ctx, imin(t_dim->h, f->bh - t->by));
 1315|   668k|                        }
 1316|   668k|                        if (eob >= 0) {
  ------------------
  |  Branch (1316:29): [True: 462k, False: 206k]
  ------------------
 1317|   462k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   462k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 462k]
  |  |  ------------------
  |  |   35|   462k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   462k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1318|      0|                                coef_dump(cf, imin(t_dim->h, 8) * 4,
 1319|      0|                                          imin(t_dim->w, 8) * 4, 3, "dq");
 1320|   462k|                            dsp->itx.itxfm_add[b->tx]
 1321|   462k|                                              [txtp](dst,
 1322|   462k|                                                     f->cur.stride[0],
 1323|   462k|                                                     cf, eob HIGHBD_CALL_SUFFIX);
 1324|   462k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   462k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 462k]
  |  |  ------------------
  |  |   35|   462k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   462k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1325|      0|                                hex_dump(dst, f->cur.stride[0],
 1326|      0|                                         t_dim->w * 4, t_dim->h * 4, "recon");
 1327|   462k|                        }
 1328|   668k|                    } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1328:32): [True: 574k, False: 0]
  ------------------
 1329|   574k|                        dav1d_memset_pow2[t_dim->lw](&t->a->lcoef[bx4 + x], 0x40);
 1330|   574k|                        dav1d_memset_pow2[t_dim->lh](&t->l.lcoef[by4 + y], 0x40);
 1331|   574k|                    }
 1332|  1.24M|                    dst += 4 * t_dim->w;
 1333|  1.24M|                }
 1334|   729k|                t->bx -= x;
 1335|   729k|            }
 1336|   582k|            t->by -= y;
 1337|       |
 1338|   582k|            if (!has_chroma) continue;
  ------------------
  |  Branch (1338:17): [True: 78.2k, False: 504k]
  ------------------
 1339|       |
 1340|   504k|            const ptrdiff_t stride = f->cur.stride[1];
 1341|       |
 1342|   504k|            if (b->uv_mode == CFL_PRED) {
  ------------------
  |  Branch (1342:17): [True: 83.3k, False: 421k]
  ------------------
 1343|  83.3k|                assert(!init_x && !init_y);
  ------------------
  |  |  140|   166k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 83.3k, False: 0]
  |  |  |  Branch (140:30): [True: 83.3k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 83.3k]
  |  |  ------------------
  ------------------
 1344|       |
 1345|  83.3k|                int16_t *const ac = t->scratch.ac;
 1346|  83.3k|                pixel *y_src = ((pixel *) f->cur.data[0]) + 4 * (t->bx & ~ss_hor) +
 1347|  83.3k|                                 4 * (t->by & ~ss_ver) * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|  83.3k|#define PXSTRIDE(x) (x)
  ------------------
 1348|  83.3k|                const ptrdiff_t uv_off = 4 * ((t->bx >> ss_hor) +
 1349|  83.3k|                                              (t->by >> ss_ver) * PXSTRIDE(stride));
  ------------------
  |  |   53|  83.3k|#define PXSTRIDE(x) (x)
  ------------------
 1350|  83.3k|                pixel *const uv_dst[2] = { ((pixel *) f->cur.data[1]) + uv_off,
 1351|  83.3k|                                           ((pixel *) f->cur.data[2]) + uv_off };
 1352|       |
 1353|  83.3k|                const int furthest_r =
 1354|  83.3k|                    ((cw4 << ss_hor) + t_dim->w - 1) & ~(t_dim->w - 1);
 1355|  83.3k|                const int furthest_b =
 1356|  83.3k|                    ((ch4 << ss_ver) + t_dim->h - 1) & ~(t_dim->h - 1);
 1357|  83.3k|                dsp->ipred.cfl_ac[f->cur.p.layout - 1](ac, y_src, f->cur.stride[0],
 1358|  83.3k|                                                         cbw4 - (furthest_r >> ss_hor),
 1359|  83.3k|                                                         cbh4 - (furthest_b >> ss_ver),
 1360|  83.3k|                                                         cbw4 * 4, cbh4 * 4);
 1361|   250k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1361:34): [True: 166k, False: 83.3k]
  ------------------
 1362|   166k|                    if (!b->cfl_alpha[pl]) continue;
  ------------------
  |  Branch (1362:25): [True: 31.1k, False: 135k]
  ------------------
 1363|   135k|                    int angle = 0;
 1364|   135k|                    const pixel *top_sb_edge = NULL;
 1365|   135k|                    if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1365:25): [True: 38.2k, False: 97.3k]
  ------------------
 1366|  38.2k|                        top_sb_edge = f->ipred_edge[pl + 1];
 1367|  38.2k|                        const int sby = t->by >> f->sb_shift;
 1368|  38.2k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1369|  38.2k|                    }
 1370|   135k|                    const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1371|   135k|                    const int xstart = ts->tiling.col_start >> ss_hor;
 1372|   135k|                    const int ystart = ts->tiling.row_start >> ss_ver;
 1373|   135k|                    const enum IntraPredMode m =
 1374|   135k|                        bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|   135k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|   135k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1375|   135k|                                                          ypos, ypos > ystart,
 1376|   135k|                                                          ts->tiling.col_end >> ss_hor,
 1377|   135k|                                                          ts->tiling.row_end >> ss_ver,
 1378|   135k|                                                          0, uv_dst[pl], stride,
 1379|   135k|                                                          top_sb_edge, DC_PRED, &angle,
 1380|   135k|                                                          uv_t_dim->w, uv_t_dim->h, 0,
 1381|   135k|                                                          edge HIGHBD_CALL_SUFFIX);
 1382|   135k|                    dsp->ipred.cfl_pred[m](uv_dst[pl], stride, edge,
 1383|   135k|                                           uv_t_dim->w * 4,
 1384|   135k|                                           uv_t_dim->h * 4,
 1385|   135k|                                           ac, b->cfl_alpha[pl]
 1386|   135k|                                           HIGHBD_CALL_SUFFIX);
 1387|   135k|                }
 1388|  83.3k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  83.3k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 83.3k]
  |  |  ------------------
  |  |   35|  83.3k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  83.3k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1389|      0|                    ac_dump(ac, 4*cbw4, 4*cbh4, "ac");
 1390|      0|                    hex_dump(uv_dst[0], stride, cbw4 * 4, cbh4 * 4, "u-cfl-pred");
 1391|      0|                    hex_dump(uv_dst[1], stride, cbw4 * 4, cbh4 * 4, "v-cfl-pred");
 1392|      0|                }
 1393|   421k|            } else if (b->pal_sz[1]) {
  ------------------
  |  Branch (1393:24): [True: 2.16k, False: 419k]
  ------------------
 1394|  2.16k|                const ptrdiff_t uv_dstoff = 4 * ((t->bx >> ss_hor) +
 1395|  2.16k|                                              (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
  ------------------
  |  |   53|  2.16k|#define PXSTRIDE(x) (x)
  ------------------
 1396|  2.16k|                const pixel (*pal)[8];
 1397|  2.16k|                const uint8_t *pal_idx;
 1398|  2.16k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1398:21): [True: 0, False: 2.16k]
  ------------------
 1399|      0|                    const int p = t->frame_thread.pass & 1;
 1400|      0|                    assert(ts->frame_thread[p].pal_idx);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1401|      0|                    pal = f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 1402|      0|                                              ((t->bx >> 1) + (t->by & 1))];
 1403|      0|                    pal_idx = ts->frame_thread[p].pal_idx;
 1404|      0|                    ts->frame_thread[p].pal_idx += cbw4 * cbh4 * 8;
 1405|  2.16k|                } else {
 1406|  2.16k|                    pal = bytefn(t->scratch.pal);
  ------------------
  |  |   87|  2.16k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.16k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1407|  2.16k|                    pal_idx = t->scratch.pal_idx_uv;
 1408|  2.16k|                }
 1409|       |
 1410|  2.16k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[1]) + uv_dstoff,
 1411|  2.16k|                                       f->cur.stride[1], pal[1],
 1412|  2.16k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1413|  2.16k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[2]) + uv_dstoff,
 1414|  2.16k|                                       f->cur.stride[1], pal[2],
 1415|  2.16k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1416|  2.16k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  2.16k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.16k]
  |  |  ------------------
  |  |   35|  2.16k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  2.16k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1417|      0|                    hex_dump(((pixel *) f->cur.data[1]) + uv_dstoff,
 1418|      0|                             PXSTRIDE(f->cur.stride[1]),
  ------------------
  |  |   53|      0|#define PXSTRIDE(x) (x)
  ------------------
 1419|      0|                             cbw4 * 4, cbh4 * 4, "u-pal-pred");
 1420|      0|                    hex_dump(((pixel *) f->cur.data[2]) + uv_dstoff,
 1421|      0|                             PXSTRIDE(f->cur.stride[1]),
  ------------------
  |  |   53|      0|#define PXSTRIDE(x) (x)
  ------------------
 1422|      0|                             cbw4 * 4, cbh4 * 4, "v-pal-pred");
 1423|      0|                }
 1424|  2.16k|            }
 1425|       |
 1426|   504k|            const int sm_uv_fl = sm_uv_flag(t->a, cbx4) |
 1427|   504k|                                 sm_uv_flag(&t->l, cby4);
 1428|   504k|            const int uv_sb_has_tr =
 1429|   504k|                ((init_x + 16) >> ss_hor) < cw4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1429:17): [True: 14.6k, False: 490k]
  |  Branch (1429:55): [True: 9.63k, False: 480k]
  ------------------
 1430|   490k|                intra_edge_flags & (EDGE_I420_TOP_HAS_RIGHT >> (f->cur.p.layout - 1));
 1431|   504k|            const int uv_sb_has_bl =
 1432|   504k|                init_x ? 0 : ((init_y + 16) >> ss_ver) < ch4 ? 1 :
  ------------------
  |  Branch (1432:17): [True: 14.6k, False: 490k]
  |  Branch (1432:30): [True: 9.63k, False: 480k]
  ------------------
 1433|   490k|                intra_edge_flags & (EDGE_I420_LEFT_HAS_BOTTOM >> (f->cur.p.layout - 1));
 1434|   504k|            const int sub_cw4 = imin(cw4, (init_x + 16) >> ss_hor);
 1435|  1.51M|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1435:30): [True: 1.00M, False: 504k]
  ------------------
 1436|  2.15M|                for (y = init_y >> ss_ver, t->by += init_y; y < sub_ch4;
  ------------------
  |  Branch (1436:61): [True: 1.14M, False: 1.00M]
  ------------------
 1437|  1.14M|                     y += uv_t_dim->h, t->by += uv_t_dim->h << ss_ver)
 1438|  1.14M|                {
 1439|  1.14M|                    pixel *dst = ((pixel *) f->cur.data[1 + pl]) +
 1440|  1.14M|                                   4 * ((t->by >> ss_ver) * PXSTRIDE(stride) +
  ------------------
  |  |   53|  1.14M|#define PXSTRIDE(x) (x)
  ------------------
 1441|  1.14M|                                        ((t->bx + init_x) >> ss_hor));
 1442|  2.64M|                    for (x = init_x >> ss_hor, t->bx += init_x; x < sub_cw4;
  ------------------
  |  Branch (1442:65): [True: 1.49M, False: 1.14M]
  ------------------
 1443|  1.49M|                         x += uv_t_dim->w, t->bx += uv_t_dim->w << ss_hor)
 1444|  1.49M|                    {
 1445|  1.49M|                        if ((b->uv_mode == CFL_PRED && b->cfl_alpha[pl]) ||
  ------------------
  |  Branch (1445:30): [True: 166k, False: 1.32M]
  |  Branch (1445:56): [True: 135k, False: 31.1k]
  ------------------
 1446|  1.35M|                            b->pal_sz[1])
  ------------------
  |  Branch (1446:29): [True: 8.44k, False: 1.35M]
  ------------------
 1447|   143k|                        {
 1448|   143k|                            goto skip_uv_pred;
 1449|   143k|                        }
 1450|       |
 1451|  1.35M|                        int angle = b->uv_angle;
 1452|       |                        // this probably looks weird because we're using
 1453|       |                        // luma flags in a chroma loop, but that's because
 1454|       |                        // prepare_intra_edges() expects luma flags as input
 1455|  1.35M|                        const enum EdgeFlags edge_flags =
 1456|  1.35M|                            (((y > (init_y >> ss_ver) || !uv_sb_has_tr) &&
  ------------------
  |  Branch (1456:32): [True: 369k, False: 981k]
  |  Branch (1456:58): [True: 316k, False: 664k]
  ------------------
 1457|   686k|                              (x + uv_t_dim->w >= sub_cw4)) ?
  ------------------
  |  Branch (1457:31): [True: 424k, False: 261k]
  ------------------
 1458|   926k|                                 0 : EDGE_I444_TOP_HAS_RIGHT) |
 1459|  1.35M|                            ((x > (init_x >> ss_hor) ||
  ------------------
  |  Branch (1459:31): [True: 346k, False: 1.00M]
  ------------------
 1460|  1.00M|                              (!uv_sb_has_bl && y + uv_t_dim->h >= sub_ch4)) ?
  ------------------
  |  Branch (1460:32): [True: 579k, False: 425k]
  |  Branch (1460:49): [True: 479k, False: 100k]
  ------------------
 1461|   825k|                                 0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1462|  1.35M|                        const pixel *top_sb_edge = NULL;
 1463|  1.35M|                        if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1463:29): [True: 315k, False: 1.03M]
  ------------------
 1464|   315k|                            top_sb_edge = f->ipred_edge[1 + pl];
 1465|   315k|                            const int sby = t->by >> f->sb_shift;
 1466|   315k|                            top_sb_edge += f->sb128w * 128 * (sby - 1);
 1467|   315k|                        }
 1468|  1.35M|                        const enum IntraPredMode uv_mode =
 1469|  1.35M|                             b->uv_mode == CFL_PRED ? DC_PRED : b->uv_mode;
  ------------------
  |  Branch (1469:30): [True: 31.1k, False: 1.31M]
  ------------------
 1470|  1.35M|                        const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1471|  1.35M|                        const int xstart = ts->tiling.col_start >> ss_hor;
 1472|  1.35M|                        const int ystart = ts->tiling.row_start >> ss_ver;
 1473|  1.35M|                        const enum IntraPredMode m =
 1474|  1.35M|                            bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|  1.35M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  1.35M|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1475|  1.35M|                                                              ypos, ypos > ystart,
 1476|  1.35M|                                                              ts->tiling.col_end >> ss_hor,
 1477|  1.35M|                                                              ts->tiling.row_end >> ss_ver,
 1478|  1.35M|                                                              edge_flags, dst, stride,
 1479|  1.35M|                                                              top_sb_edge, uv_mode,
 1480|  1.35M|                                                              &angle, uv_t_dim->w,
 1481|  1.35M|                                                              uv_t_dim->h,
 1482|  1.35M|                                                              f->seq_hdr->intra_edge_filter,
 1483|  1.35M|                                                              edge HIGHBD_CALL_SUFFIX);
 1484|  1.35M|                        angle |= intra_edge_filter_flag;
 1485|  1.35M|                        dsp->ipred.intra_pred[m](dst, stride, edge,
 1486|  1.35M|                                                 uv_t_dim->w * 4,
 1487|  1.35M|                                                 uv_t_dim->h * 4,
 1488|  1.35M|                                                 angle | sm_uv_fl,
 1489|  1.35M|                                                 (4 * f->bw + ss_hor -
 1490|  1.35M|                                                  4 * (t->bx & ~ss_hor)) >> ss_hor,
 1491|  1.35M|                                                 (4 * f->bh + ss_ver -
 1492|  1.35M|                                                  4 * (t->by & ~ss_ver)) >> ss_ver
 1493|  1.35M|                                                 HIGHBD_CALL_SUFFIX);
 1494|  1.35M|                        if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  1.35M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.35M]
  |  |  ------------------
  |  |   35|  1.35M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.35M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                      if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1495|      0|                            hex_dump(edge - uv_t_dim->h * 4, uv_t_dim->h * 4,
 1496|      0|                                     uv_t_dim->h * 4, 2, "l");
 1497|      0|                            hex_dump(edge, 0, 1, 1, "tl");
 1498|      0|                            hex_dump(edge + 1, uv_t_dim->w * 4,
 1499|      0|                                     uv_t_dim->w * 4, 2, "t");
 1500|      0|                            hex_dump(dst, stride, uv_t_dim->w * 4,
 1501|      0|                                     uv_t_dim->h * 4, pl ? "v-intra-pred" : "u-intra-pred");
  ------------------
  |  Branch (1501:55): [True: 0, False: 0]
  ------------------
 1502|      0|                        }
 1503|       |
 1504|  1.49M|                    skip_uv_pred: {}
 1505|  1.49M|                        if (!b->skip) {
  ------------------
  |  Branch (1505:29): [True: 871k, False: 623k]
  ------------------
 1506|   871k|                            enum TxfmType txtp;
 1507|   871k|                            int eob;
 1508|   871k|                            coef *cf;
 1509|   871k|                            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1509:33): [True: 0, False: 871k]
  ------------------
 1510|      0|                                const int p = t->frame_thread.pass & 1;
 1511|      0|                                const int cbi = *ts->frame_thread[p].cbi++;
 1512|      0|                                cf = ts->frame_thread[p].cf;
 1513|      0|                                ts->frame_thread[p].cf += uv_t_dim->w * uv_t_dim->h * 16;
 1514|      0|                                eob  = cbi >> 5;
 1515|      0|                                txtp = cbi & 0x1f;
 1516|   871k|                            } else {
 1517|   871k|                                uint8_t cf_ctx;
 1518|   871k|                                cf = bitfn(t->cf);
  ------------------
  |  |   51|   871k|#define bitfn(x) x##_8bpc
  ------------------
 1519|   871k|                                eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1520|   871k|                                                   &t->l.ccoef[pl][cby4 + y],
 1521|   871k|                                                   b->uvtx, bs, b, 1, 1 + pl, cf,
 1522|   871k|                                                   &txtp, &cf_ctx);
 1523|   871k|                                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   871k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 871k]
  |  |  ------------------
  |  |   35|   871k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   871k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1524|      0|                                    printf("Post-uv-cf-blk[pl=%d,tx=%d,"
 1525|      0|                                           "txtp=%d,eob=%d]: r=%d [x=%d,cbx4=%d]\n",
 1526|      0|                                           pl, b->uvtx, txtp, eob, ts->msac.rng, x, cbx4);
 1527|   871k|                                int ctw = imin(uv_t_dim->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1528|   871k|                                int cth = imin(uv_t_dim->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1529|   871k|                                dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1530|   871k|                                dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1531|   871k|                            }
 1532|   871k|                            if (eob >= 0) {
  ------------------
  |  Branch (1532:33): [True: 288k, False: 583k]
  ------------------
 1533|   288k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   288k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 288k]
  |  |  ------------------
  |  |   35|   288k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   288k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1534|      0|                                    coef_dump(cf, uv_t_dim->h * 4,
 1535|      0|                                              uv_t_dim->w * 4, 3, "dq");
 1536|   288k|                                dsp->itx.itxfm_add[b->uvtx]
 1537|   288k|                                                  [txtp](dst, stride,
 1538|   288k|                                                         cf, eob HIGHBD_CALL_SUFFIX);
 1539|   288k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   288k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 288k]
  |  |  ------------------
  |  |   35|   288k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   288k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1540|      0|                                    hex_dump(dst, stride, uv_t_dim->w * 4,
 1541|      0|                                             uv_t_dim->h * 4, "recon");
 1542|   288k|                            }
 1543|   871k|                        } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1543:36): [True: 623k, False: 0]
  ------------------
 1544|   623k|                            dav1d_memset_pow2[uv_t_dim->lw](&t->a->ccoef[pl][cbx4 + x], 0x40);
 1545|   623k|                            dav1d_memset_pow2[uv_t_dim->lh](&t->l.ccoef[pl][cby4 + y], 0x40);
 1546|   623k|                        }
 1547|  1.49M|                        dst += uv_t_dim->w * 4;
 1548|  1.49M|                    }
 1549|  1.14M|                    t->bx -= x << ss_hor;
 1550|  1.14M|                }
 1551|  1.00M|                t->by -= y << ss_ver;
 1552|  1.00M|            }
 1553|   504k|        }
 1554|   564k|    }
 1555|   552k|}
dav1d_recon_b_inter_8bpc:
 1559|   106k|{
 1560|   106k|    Dav1dTileState *const ts = t->ts;
 1561|   106k|    const Dav1dFrameContext *const f = t->f;
 1562|   106k|    const Dav1dDSPContext *const dsp = f->dsp;
 1563|   106k|    const int bx4 = t->bx & 31, by4 = t->by & 31;
 1564|   106k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1565|   106k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 1566|   106k|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
 1567|   106k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
 1568|   106k|    const int bw4 = b_dim[0], bh4 = b_dim[1];
 1569|   106k|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
 1570|   106k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (1570:28): [True: 86.4k, False: 20.0k]
  ------------------
 1571|  86.4k|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1571:29): [True: 47.5k, False: 38.8k]
  |  Branch (1571:45): [True: 19.4k, False: 19.4k]
  ------------------
 1572|  66.9k|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1572:29): [True: 46.6k, False: 20.2k]
  |  Branch (1572:45): [True: 10.1k, False: 10.1k]
  ------------------
 1573|   106k|    const int chr_layout_idx = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I400 ? 0 :
  ------------------
  |  Branch (1573:32): [True: 20.0k, False: 86.4k]
  ------------------
 1574|   106k|                               DAV1D_PIXEL_LAYOUT_I444 - f->cur.p.layout;
 1575|   106k|    int res;
 1576|       |
 1577|       |    // prediction
 1578|   106k|    const int cbh4 = (bh4 + ss_ver) >> ss_ver, cbw4 = (bw4 + ss_hor) >> ss_hor;
 1579|   106k|    pixel *dst = ((pixel *) f->cur.data[0]) +
 1580|   106k|        4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
  ------------------
  |  |   53|   106k|#define PXSTRIDE(x) (x)
  ------------------
 1581|   106k|    const ptrdiff_t uvdstoff =
 1582|   106k|        4 * ((t->bx >> ss_hor) + (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
  ------------------
  |  |   53|   106k|#define PXSTRIDE(x) (x)
  ------------------
 1583|   106k|    if (IS_KEY_OR_INTRA(f->frame_hdr)) {
  ------------------
  |  |   43|   106k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|   106k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 75.5k, False: 30.9k]
  |  |  ------------------
  ------------------
 1584|       |        // intrabc
 1585|  75.5k|        assert(!f->frame_hdr->super_res.enabled);
  ------------------
  |  |  140|  75.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 75.5k]
  |  |  |  Branch (140:68): [Folded, False: 75.5k]
  |  |  ------------------
  ------------------
 1586|  75.5k|        res = mc(t, dst, NULL, f->cur.stride[0], bw4, bh4, t->bx, t->by, 0,
 1587|  75.5k|                 b->mv[0], &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1588|  75.5k|        if (res) return res;
  ------------------
  |  Branch (1588:13): [True: 0, False: 75.5k]
  ------------------
 1589|   129k|        if (has_chroma) for (int pl = 1; pl < 3; pl++) {
  ------------------
  |  Branch (1589:13): [True: 43.1k, False: 32.3k]
  |  Branch (1589:42): [True: 86.2k, False: 43.1k]
  ------------------
 1590|  86.2k|            res = mc(t, ((pixel *)f->cur.data[pl]) + uvdstoff, NULL, f->cur.stride[1],
 1591|  86.2k|                     bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1592|  86.2k|                     t->bx & ~ss_hor, t->by & ~ss_ver, pl, b->mv[0],
 1593|  86.2k|                     &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1594|  86.2k|            if (res) return res;
  ------------------
  |  Branch (1594:17): [True: 0, False: 86.2k]
  ------------------
 1595|  86.2k|        }
 1596|  75.5k|    } else if (b->comp_type == COMP_INTER_NONE) {
  ------------------
  |  Branch (1596:16): [True: 25.2k, False: 5.67k]
  ------------------
 1597|  25.2k|        const Dav1dThreadPicture *const refp = &f->refp[b->ref[0]];
 1598|  25.2k|        const enum Filter2d filter_2d = b->filter2d;
 1599|       |
 1600|  25.2k|        if (imin(bw4, bh4) > 1 &&
  ------------------
  |  Branch (1600:13): [True: 13.8k, False: 11.3k]
  ------------------
 1601|  13.8k|            ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1601:15): [True: 2.24k, False: 11.6k]
  |  Branch (1601:44): [True: 811, False: 1.43k]
  ------------------
 1602|  13.0k|             (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1602:15): [True: 2.08k, False: 10.9k]
  |  Branch (1602:44): [True: 1.72k, False: 356]
  ------------------
 1603|  2.53k|        {
 1604|  2.53k|            res = warp_affine(t, dst, NULL, f->cur.stride[0], b_dim, 0, refp,
 1605|  2.53k|                              b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1605:31): [True: 1.72k, False: 811]
  ------------------
 1606|  2.53k|                                  &f->frame_hdr->gmv[b->ref[0]]);
 1607|  2.53k|            if (res) return res;
  ------------------
  |  Branch (1607:17): [True: 0, False: 2.53k]
  ------------------
 1608|  22.7k|        } else {
 1609|  22.7k|            res = mc(t, dst, NULL, f->cur.stride[0],
 1610|  22.7k|                     bw4, bh4, t->bx, t->by, 0, b->mv[0], refp, b->ref[0], filter_2d);
 1611|  22.7k|            if (res) return res;
  ------------------
  |  Branch (1611:17): [True: 0, False: 22.7k]
  ------------------
 1612|  22.7k|            if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1612:17): [True: 4.35k, False: 18.3k]
  ------------------
 1613|  4.35k|                res = obmc(t, dst, f->cur.stride[0], b_dim, 0, bx4, by4, w4, h4);
 1614|  4.35k|                if (res) return res;
  ------------------
  |  Branch (1614:21): [True: 0, False: 4.35k]
  ------------------
 1615|  4.35k|            }
 1616|  22.7k|        }
 1617|  25.2k|        if (b->interintra_type) {
  ------------------
  |  Branch (1617:13): [True: 348, False: 24.8k]
  ------------------
 1618|    348|            pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   51|    348|#define bitfn(x) x##_8bpc
  ------------------
 1619|    348|            enum IntraPredMode m = b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1619:36): [True: 66, False: 282]
  ------------------
 1620|    282|                                   SMOOTH_PRED : b->interintra_mode;
 1621|    348|            pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   51|    348|#define bitfn(x) x##_8bpc
  ------------------
 1622|    348|            int angle = 0;
 1623|    348|            const pixel *top_sb_edge = NULL;
 1624|    348|            if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1624:17): [True: 59, False: 289]
  ------------------
 1625|     59|                top_sb_edge = f->ipred_edge[0];
 1626|     59|                const int sby = t->by >> f->sb_shift;
 1627|     59|                top_sb_edge += f->sb128w * 128 * (sby - 1);
 1628|     59|            }
 1629|    348|            m = bytefn(dav1d_prepare_intra_edges)(t->bx, t->bx > ts->tiling.col_start,
  ------------------
  |  |   87|    348|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|    348|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1630|    348|                                                  t->by, t->by > ts->tiling.row_start,
 1631|    348|                                                  ts->tiling.col_end, ts->tiling.row_end,
 1632|    348|                                                  0, dst, f->cur.stride[0], top_sb_edge,
 1633|    348|                                                  m, &angle, bw4, bh4, 0, tl_edge
 1634|    348|                                                  HIGHBD_CALL_SUFFIX);
 1635|    348|            dsp->ipred.intra_pred[m](tmp, 4 * bw4 * sizeof(pixel),
 1636|    348|                                     tl_edge, bw4 * 4, bh4 * 4, 0, 0, 0
 1637|    348|                                     HIGHBD_CALL_SUFFIX);
 1638|    348|            dsp->mc.blend(dst, f->cur.stride[0], tmp,
 1639|    348|                          bw4 * 4, bh4 * 4, II_MASK(0, bs, b));
  ------------------
  |  |   83|    348|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|    348|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 266, False: 82]
  |  |  ------------------
  |  |   85|    348|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|    348|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1640|    348|        }
 1641|       |
 1642|  25.2k|        if (!has_chroma) goto skip_inter_chroma_pred;
  ------------------
  |  Branch (1642:13): [True: 13.6k, False: 11.5k]
  ------------------
 1643|       |
 1644|       |        // sub8x8 derivation
 1645|  11.5k|        int is_sub8x8 = bw4 == ss_hor || bh4 == ss_ver;
  ------------------
  |  Branch (1645:25): [True: 567, False: 10.9k]
  |  Branch (1645:42): [True: 467, False: 10.5k]
  ------------------
 1646|  11.5k|        refmvs_block *const *r;
 1647|  11.5k|        if (is_sub8x8) {
  ------------------
  |  Branch (1647:13): [True: 1.03k, False: 10.5k]
  ------------------
 1648|  1.03k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  1.03k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.03k]
  |  |  |  Branch (140:68): [Folded, False: 1.03k]
  |  |  ------------------
  ------------------
 1649|  1.03k|            r = &t->rt.r[(t->by & 31) + 5];
 1650|  1.03k|            if (bw4 == 1) is_sub8x8 &= r[0][t->bx - 1].ref.ref[0] > 0;
  ------------------
  |  Branch (1650:17): [True: 567, False: 467]
  ------------------
 1651|  1.03k|            if (bh4 == ss_ver) is_sub8x8 &= r[-1][t->bx].ref.ref[0] > 0;
  ------------------
  |  Branch (1651:17): [True: 647, False: 387]
  ------------------
 1652|  1.03k|            if (bw4 == 1 && bh4 == ss_ver)
  ------------------
  |  Branch (1652:17): [True: 567, False: 467]
  |  Branch (1652:29): [True: 180, False: 387]
  ------------------
 1653|    180|                is_sub8x8 &= r[-1][t->bx - 1].ref.ref[0] > 0;
 1654|  1.03k|        }
 1655|       |
 1656|       |        // chroma prediction
 1657|  11.5k|        if (is_sub8x8) {
  ------------------
  |  Branch (1657:13): [True: 1.01k, False: 10.5k]
  ------------------
 1658|  1.01k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  1.01k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.01k]
  |  |  |  Branch (140:68): [Folded, False: 1.01k]
  |  |  ------------------
  ------------------
 1659|  1.01k|            ptrdiff_t h_off = 0, v_off = 0;
 1660|  1.01k|            if (bw4 == 1 && bh4 == ss_ver) {
  ------------------
  |  Branch (1660:17): [True: 558, False: 459]
  |  Branch (1660:29): [True: 174, False: 384]
  ------------------
 1661|    522|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1661:34): [True: 348, False: 174]
  ------------------
 1662|    348|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1663|    348|                             NULL, f->cur.stride[1],
 1664|    348|                             bw4, bh4, t->bx - 1, t->by - 1, 1 + pl,
 1665|    348|                             r[-1][t->bx - 1].mv.mv[0],
 1666|    348|                             &f->refp[r[-1][t->bx - 1].ref.ref[0] - 1],
 1667|    348|                             r[-1][t->bx - 1].ref.ref[0] - 1,
 1668|    348|                             t->frame_thread.pass != 2 ? t->tl_4x4_filter :
  ------------------
  |  Branch (1668:30): [True: 348, False: 0]
  ------------------
 1669|    348|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx - 1].filter2d);
 1670|    348|                    if (res) return res;
  ------------------
  |  Branch (1670:25): [True: 0, False: 348]
  ------------------
 1671|    348|                }
 1672|    174|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
  ------------------
  |  |   53|    174|#define PXSTRIDE(x) (x)
  ------------------
 1673|    174|                h_off = 2;
 1674|    174|            }
 1675|  1.01k|            if (bw4 == 1) {
  ------------------
  |  Branch (1675:17): [True: 558, False: 459]
  ------------------
 1676|    558|                const enum Filter2d left_filter_2d =
 1677|    558|                    dav1d_filter_2d[t->l.filter[1][by4]][t->l.filter[0][by4]];
 1678|  1.67k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1678:34): [True: 1.11k, False: 558]
  ------------------
 1679|  1.11k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + v_off, NULL,
 1680|  1.11k|                             f->cur.stride[1], bw4, bh4, t->bx - 1,
 1681|  1.11k|                             t->by, 1 + pl, r[0][t->bx - 1].mv.mv[0],
 1682|  1.11k|                             &f->refp[r[0][t->bx - 1].ref.ref[0] - 1],
 1683|  1.11k|                             r[0][t->bx - 1].ref.ref[0] - 1,
 1684|  1.11k|                             t->frame_thread.pass != 2 ? left_filter_2d :
  ------------------
  |  Branch (1684:30): [True: 1.11k, False: 0]
  ------------------
 1685|  1.11k|                                 f->frame_thread.b[(t->by * f->b4_stride) + t->bx - 1].filter2d);
 1686|  1.11k|                    if (res) return res;
  ------------------
  |  Branch (1686:25): [True: 0, False: 1.11k]
  ------------------
 1687|  1.11k|                }
 1688|    558|                h_off = 2;
 1689|    558|            }
 1690|  1.01k|            if (bh4 == ss_ver) {
  ------------------
  |  Branch (1690:17): [True: 633, False: 384]
  ------------------
 1691|    633|                const enum Filter2d top_filter_2d =
 1692|    633|                    dav1d_filter_2d[t->a->filter[1][bx4]][t->a->filter[0][bx4]];
 1693|  1.89k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1693:34): [True: 1.26k, False: 633]
  ------------------
 1694|  1.26k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off, NULL,
 1695|  1.26k|                             f->cur.stride[1], bw4, bh4, t->bx, t->by - 1,
 1696|  1.26k|                             1 + pl, r[-1][t->bx].mv.mv[0],
 1697|  1.26k|                             &f->refp[r[-1][t->bx].ref.ref[0] - 1],
 1698|  1.26k|                             r[-1][t->bx].ref.ref[0] - 1,
 1699|  1.26k|                             t->frame_thread.pass != 2 ? top_filter_2d :
  ------------------
  |  Branch (1699:30): [True: 1.26k, False: 0]
  ------------------
 1700|  1.26k|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx].filter2d);
 1701|  1.26k|                    if (res) return res;
  ------------------
  |  Branch (1701:25): [True: 0, False: 1.26k]
  ------------------
 1702|  1.26k|                }
 1703|    633|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
  ------------------
  |  |   53|    633|#define PXSTRIDE(x) (x)
  ------------------
 1704|    633|            }
 1705|  3.05k|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1705:30): [True: 2.03k, False: 1.01k]
  ------------------
 1706|  2.03k|                res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off + v_off, NULL, f->cur.stride[1],
 1707|  2.03k|                         bw4, bh4, t->bx, t->by, 1 + pl, b->mv[0],
 1708|  2.03k|                         refp, b->ref[0], filter_2d);
 1709|  2.03k|                if (res) return res;
  ------------------
  |  Branch (1709:21): [True: 0, False: 2.03k]
  ------------------
 1710|  2.03k|            }
 1711|  10.5k|        } else {
 1712|  10.5k|            if (imin(cbw4, cbh4) > 1 &&
  ------------------
  |  Branch (1712:17): [True: 4.45k, False: 6.09k]
  ------------------
 1713|  4.45k|                ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1713:19): [True: 707, False: 3.74k]
  |  Branch (1713:48): [True: 282, False: 425]
  ------------------
 1714|  4.17k|                 (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1714:19): [True: 398, False: 3.77k]
  |  Branch (1714:48): [True: 370, False: 28]
  ------------------
 1715|    652|            {
 1716|  1.95k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1716:34): [True: 1.30k, False: 652]
  ------------------
 1717|  1.30k|                    res = warp_affine(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff, NULL,
 1718|  1.30k|                                      f->cur.stride[1], b_dim, 1 + pl, refp,
 1719|  1.30k|                                      b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1719:39): [True: 740, False: 564]
  ------------------
 1720|  1.30k|                                          &f->frame_hdr->gmv[b->ref[0]]);
 1721|  1.30k|                    if (res) return res;
  ------------------
  |  Branch (1721:25): [True: 0, False: 1.30k]
  ------------------
 1722|  1.30k|                }
 1723|  9.89k|            } else {
 1724|  29.6k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1724:34): [True: 19.7k, False: 9.89k]
  ------------------
 1725|  19.7k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1726|  19.7k|                             NULL, f->cur.stride[1],
 1727|  19.7k|                             bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1728|  19.7k|                             t->bx & ~ss_hor, t->by & ~ss_ver,
 1729|  19.7k|                             1 + pl, b->mv[0], refp, b->ref[0], filter_2d);
 1730|  19.7k|                    if (res) return res;
  ------------------
  |  Branch (1730:25): [True: 0, False: 19.7k]
  ------------------
 1731|  19.7k|                    if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1731:25): [True: 4.09k, False: 15.7k]
  ------------------
 1732|  4.09k|                        res = obmc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1733|  4.09k|                                   f->cur.stride[1], b_dim, 1 + pl, bx4, by4, w4, h4);
 1734|  4.09k|                        if (res) return res;
  ------------------
  |  Branch (1734:29): [True: 0, False: 4.09k]
  ------------------
 1735|  4.09k|                    }
 1736|  19.7k|                }
 1737|  9.89k|            }
 1738|  10.5k|            if (b->interintra_type) {
  ------------------
  |  Branch (1738:17): [True: 310, False: 10.2k]
  ------------------
 1739|       |                // FIXME for 8x32 with 4:2:2 subsampling, this probably does
 1740|       |                // the wrong thing since it will select 4x16, not 4x32, as a
 1741|       |                // transform size...
 1742|    310|                const uint8_t *const ii_mask = II_MASK(chr_layout_idx, bs, b);
  ------------------
  |  |   83|    310|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|    310|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 239, False: 71]
  |  |  ------------------
  |  |   85|    310|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|    310|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1743|       |
 1744|    930|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1744:34): [True: 620, False: 310]
  ------------------
 1745|    620|                    pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   51|    620|#define bitfn(x) x##_8bpc
  ------------------
 1746|    620|                    pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   51|    620|#define bitfn(x) x##_8bpc
  ------------------
 1747|    620|                    enum IntraPredMode m =
 1748|    620|                        b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1748:25): [True: 122, False: 498]
  ------------------
 1749|    498|                        SMOOTH_PRED : b->interintra_mode;
 1750|    620|                    int angle = 0;
 1751|    620|                    pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1752|    620|                    const pixel *top_sb_edge = NULL;
 1753|    620|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1753:25): [True: 106, False: 514]
  ------------------
 1754|    106|                        top_sb_edge = f->ipred_edge[pl + 1];
 1755|    106|                        const int sby = t->by >> f->sb_shift;
 1756|    106|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1757|    106|                    }
 1758|    620|                    m = bytefn(dav1d_prepare_intra_edges)(t->bx >> ss_hor,
  ------------------
  |  |   87|    620|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|    620|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1759|    620|                                                          (t->bx >> ss_hor) >
 1760|    620|                                                              (ts->tiling.col_start >> ss_hor),
 1761|    620|                                                          t->by >> ss_ver,
 1762|    620|                                                          (t->by >> ss_ver) >
 1763|    620|                                                              (ts->tiling.row_start >> ss_ver),
 1764|    620|                                                          ts->tiling.col_end >> ss_hor,
 1765|    620|                                                          ts->tiling.row_end >> ss_ver,
 1766|    620|                                                          0, uvdst, f->cur.stride[1],
 1767|    620|                                                          top_sb_edge, m,
 1768|    620|                                                          &angle, cbw4, cbh4, 0, tl_edge
 1769|    620|                                                          HIGHBD_CALL_SUFFIX);
 1770|    620|                    dsp->ipred.intra_pred[m](tmp, cbw4 * 4 * sizeof(pixel),
 1771|    620|                                             tl_edge, cbw4 * 4, cbh4 * 4, 0, 0, 0
 1772|    620|                                             HIGHBD_CALL_SUFFIX);
 1773|    620|                    dsp->mc.blend(uvdst, f->cur.stride[1], tmp,
 1774|    620|                                  cbw4 * 4, cbh4 * 4, ii_mask);
 1775|    620|                }
 1776|    310|            }
 1777|  10.5k|        }
 1778|       |
 1779|  25.2k|    skip_inter_chroma_pred: {}
 1780|  25.2k|        t->tl_4x4_filter = filter_2d;
 1781|  25.2k|    } else {
 1782|  5.67k|        const enum Filter2d filter_2d = b->filter2d;
 1783|       |        // Maximum super block size is 128x128
 1784|  5.67k|        int16_t (*tmp)[128 * 128] = t->scratch.compinter;
 1785|  5.67k|        int jnt_weight;
 1786|  5.67k|        uint8_t *const seg_mask = t->scratch.seg_mask;
 1787|  5.67k|        const uint8_t *mask;
 1788|       |
 1789|  17.0k|        for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1789:25): [True: 11.3k, False: 5.67k]
  ------------------
 1790|  11.3k|            const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1791|       |
 1792|  11.3k|            if (b->inter_mode == GLOBALMV_GLOBALMV && f->gmv_warp_allowed[b->ref[i]]) {
  ------------------
  |  Branch (1792:17): [True: 1.23k, False: 10.1k]
  |  Branch (1792:55): [True: 179, False: 1.05k]
  ------------------
 1793|    179|                res = warp_affine(t, NULL, tmp[i], bw4 * 4, b_dim, 0, refp,
 1794|    179|                                  &f->frame_hdr->gmv[b->ref[i]]);
 1795|    179|                if (res) return res;
  ------------------
  |  Branch (1795:21): [True: 0, False: 179]
  ------------------
 1796|  11.1k|            } else {
 1797|  11.1k|                res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by, 0,
 1798|  11.1k|                         b->mv[i], refp, b->ref[i], filter_2d);
 1799|  11.1k|                if (res) return res;
  ------------------
  |  Branch (1799:21): [True: 0, False: 11.1k]
  ------------------
 1800|  11.1k|            }
 1801|  11.3k|        }
 1802|  5.67k|        switch (b->comp_type) {
  ------------------
  |  Branch (1802:17): [True: 5.67k, False: 0]
  ------------------
 1803|  4.40k|        case COMP_INTER_AVG:
  ------------------
  |  Branch (1803:9): [True: 4.40k, False: 1.27k]
  ------------------
 1804|  4.40k|            dsp->mc.avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1805|  4.40k|                        bw4 * 4, bh4 * 4 HIGHBD_CALL_SUFFIX);
 1806|  4.40k|            break;
 1807|    534|        case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1807:9): [True: 534, False: 5.14k]
  ------------------
 1808|    534|            jnt_weight = f->jnt_weights[b->ref[0]][b->ref[1]];
 1809|    534|            dsp->mc.w_avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1810|    534|                          bw4 * 4, bh4 * 4, jnt_weight HIGHBD_CALL_SUFFIX);
 1811|    534|            break;
 1812|    499|        case COMP_INTER_SEG:
  ------------------
  |  Branch (1812:9): [True: 499, False: 5.18k]
  ------------------
 1813|    499|            dsp->mc.w_mask[chr_layout_idx](dst, f->cur.stride[0],
 1814|    499|                                           tmp[b->mask_sign], tmp[!b->mask_sign],
 1815|    499|                                           bw4 * 4, bh4 * 4, seg_mask,
 1816|    499|                                           b->mask_sign HIGHBD_CALL_SUFFIX);
 1817|    499|            mask = seg_mask;
 1818|    499|            break;
 1819|    239|        case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1819:9): [True: 239, False: 5.44k]
  ------------------
 1820|    239|            mask = WEDGE_MASK(0, bs, 0, b->wedge_idx);
  ------------------
  |  |   89|    239|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|    239|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1821|    239|            dsp->mc.mask(dst, f->cur.stride[0],
 1822|    239|                         tmp[b->mask_sign], tmp[!b->mask_sign],
 1823|    239|                         bw4 * 4, bh4 * 4, mask HIGHBD_CALL_SUFFIX);
 1824|    239|            if (has_chroma)
  ------------------
  |  Branch (1824:17): [True: 70, False: 169]
  ------------------
 1825|     70|                mask = WEDGE_MASK(chr_layout_idx, bs, b->mask_sign, b->wedge_idx);
  ------------------
  |  |   89|     70|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|     70|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1826|    239|            break;
 1827|  5.67k|        }
 1828|       |
 1829|       |        // chroma
 1830|  6.41k|        if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1830:13): [True: 2.13k, False: 3.54k]
  |  Branch (1830:42): [True: 4.27k, False: 2.13k]
  ------------------
 1831|  12.8k|            for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1831:29): [True: 8.55k, False: 4.27k]
  ------------------
 1832|  8.55k|                const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1833|  8.55k|                if (b->inter_mode == GLOBALMV_GLOBALMV &&
  ------------------
  |  Branch (1833:21): [True: 988, False: 7.56k]
  ------------------
 1834|    988|                    imin(cbw4, cbh4) > 1 && f->gmv_warp_allowed[b->ref[i]])
  ------------------
  |  Branch (1834:21): [True: 672, False: 316]
  |  Branch (1834:45): [True: 62, False: 610]
  ------------------
 1835|     62|                {
 1836|     62|                    res = warp_affine(t, NULL, tmp[i], bw4 * 4 >> ss_hor,
 1837|     62|                                      b_dim, 1 + pl,
 1838|     62|                                      refp, &f->frame_hdr->gmv[b->ref[i]]);
 1839|     62|                    if (res) return res;
  ------------------
  |  Branch (1839:25): [True: 0, False: 62]
  ------------------
 1840|  8.49k|                } else {
 1841|  8.49k|                    res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by,
 1842|  8.49k|                             1 + pl, b->mv[i], refp, b->ref[i], filter_2d);
 1843|  8.49k|                    if (res) return res;
  ------------------
  |  Branch (1843:25): [True: 0, False: 8.49k]
  ------------------
 1844|  8.49k|                }
 1845|  8.55k|            }
 1846|  4.27k|            pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1847|  4.27k|            switch (b->comp_type) {
  ------------------
  |  Branch (1847:21): [True: 4.27k, False: 0]
  ------------------
 1848|  3.61k|            case COMP_INTER_AVG:
  ------------------
  |  Branch (1848:13): [True: 3.61k, False: 668]
  ------------------
 1849|  3.61k|                dsp->mc.avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1850|  3.61k|                            bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver
 1851|  3.61k|                            HIGHBD_CALL_SUFFIX);
 1852|  3.61k|                break;
 1853|    310|            case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1853:13): [True: 310, False: 3.96k]
  ------------------
 1854|    310|                dsp->mc.w_avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1855|    310|                              bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, jnt_weight
 1856|    310|                              HIGHBD_CALL_SUFFIX);
 1857|    310|                break;
 1858|    140|            case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1858:13): [True: 140, False: 4.13k]
  ------------------
 1859|    358|            case COMP_INTER_SEG:
  ------------------
  |  Branch (1859:13): [True: 218, False: 4.06k]
  ------------------
 1860|    358|                dsp->mc.mask(uvdst, f->cur.stride[1],
 1861|    358|                             tmp[b->mask_sign], tmp[!b->mask_sign],
 1862|    358|                             bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, mask
 1863|    358|                             HIGHBD_CALL_SUFFIX);
 1864|    358|                break;
 1865|  4.27k|            }
 1866|  4.27k|        }
 1867|  5.67k|    }
 1868|       |
 1869|   106k|    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|   106k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 106k]
  |  |  ------------------
  |  |   35|   106k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   106k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1870|      0|        hex_dump(dst, f->cur.stride[0], b_dim[0] * 4, b_dim[1] * 4, "y-pred");
 1871|      0|        if (has_chroma) {
  ------------------
  |  Branch (1871:13): [True: 0, False: 0]
  ------------------
 1872|      0|            hex_dump(&((pixel *) f->cur.data[1])[uvdstoff], f->cur.stride[1],
 1873|      0|                     cbw4 * 4, cbh4 * 4, "u-pred");
 1874|      0|            hex_dump(&((pixel *) f->cur.data[2])[uvdstoff], f->cur.stride[1],
 1875|      0|                     cbw4 * 4, cbh4 * 4, "v-pred");
 1876|      0|        }
 1877|      0|    }
 1878|       |
 1879|   106k|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
 1880|       |
 1881|   106k|    if (b->skip) {
  ------------------
  |  Branch (1881:9): [True: 72.1k, False: 34.2k]
  ------------------
 1882|       |        // reset coef contexts
 1883|  72.1k|        BlockContext *const a = t->a;
 1884|  72.1k|        dav1d_memset_pow2[b_dim[2]](&a->lcoef[bx4], 0x40);
 1885|  72.1k|        dav1d_memset_pow2[b_dim[3]](&t->l.lcoef[by4], 0x40);
 1886|  72.1k|        if (has_chroma) {
  ------------------
  |  Branch (1886:13): [True: 36.9k, False: 35.2k]
  ------------------
 1887|  36.9k|            dav1d_memset_pow2_fn memset_cw = dav1d_memset_pow2[ulog2(cbw4)];
 1888|  36.9k|            dav1d_memset_pow2_fn memset_ch = dav1d_memset_pow2[ulog2(cbh4)];
 1889|  36.9k|            memset_cw(&a->ccoef[0][cbx4], 0x40);
 1890|  36.9k|            memset_cw(&a->ccoef[1][cbx4], 0x40);
 1891|  36.9k|            memset_ch(&t->l.ccoef[0][cby4], 0x40);
 1892|  36.9k|            memset_ch(&t->l.ccoef[1][cby4], 0x40);
 1893|  36.9k|        }
 1894|  72.1k|        return 0;
 1895|  72.1k|    }
 1896|       |
 1897|  34.2k|    const TxfmInfo *const uvtx = &dav1d_txfm_dimensions[b->uvtx];
 1898|  34.2k|    const TxfmInfo *const ytx = &dav1d_txfm_dimensions[b->max_ytx];
 1899|  34.2k|    const uint16_t tx_split[2] = { b->tx_split0, b->tx_split1 };
 1900|       |
 1901|  69.3k|    for (int init_y = 0; init_y < bh4; init_y += 16) {
  ------------------
  |  Branch (1901:26): [True: 35.0k, False: 34.2k]
  ------------------
 1902|  71.1k|        for (int init_x = 0; init_x < bw4; init_x += 16) {
  ------------------
  |  Branch (1902:30): [True: 36.0k, False: 35.0k]
  ------------------
 1903|       |            // coefficient coding & inverse transforms
 1904|  36.0k|            int y_off = !!init_y, y;
 1905|  36.0k|            dst += PXSTRIDE(f->cur.stride[0]) * 4 * init_y;
  ------------------
  |  |   53|  36.0k|#define PXSTRIDE(x) (x)
  ------------------
 1906|  74.2k|            for (y = init_y, t->by += init_y; y < imin(h4, init_y + 16);
  ------------------
  |  Branch (1906:47): [True: 38.1k, False: 36.0k]
  ------------------
 1907|  38.1k|                 y += ytx->h, y_off++)
 1908|  38.1k|            {
 1909|  38.1k|                int x, x_off = !!init_x;
 1910|  86.2k|                for (x = init_x, t->bx += init_x; x < imin(w4, init_x + 16);
  ------------------
  |  Branch (1910:51): [True: 48.0k, False: 38.1k]
  ------------------
 1911|  48.0k|                     x += ytx->w, x_off++)
 1912|  48.0k|                {
 1913|  48.0k|                    read_coef_tree(t, bs, b, b->max_ytx, 0, tx_split,
 1914|  48.0k|                                   x_off, y_off, &dst[x * 4]);
 1915|  48.0k|                    t->bx += ytx->w;
 1916|  48.0k|                }
 1917|  38.1k|                dst += PXSTRIDE(f->cur.stride[0]) * 4 * ytx->h;
  ------------------
  |  |   53|  38.1k|#define PXSTRIDE(x) (x)
  ------------------
 1918|  38.1k|                t->bx -= x;
 1919|  38.1k|                t->by += ytx->h;
 1920|  38.1k|            }
 1921|  36.0k|            dst -= PXSTRIDE(f->cur.stride[0]) * 4 * y;
  ------------------
  |  |   53|  36.0k|#define PXSTRIDE(x) (x)
  ------------------
 1922|  36.0k|            t->by -= y;
 1923|       |
 1924|       |            // chroma coefs and inverse transform
 1925|  62.0k|            if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1925:17): [True: 20.6k, False: 15.3k]
  |  Branch (1925:46): [True: 41.3k, False: 20.6k]
  ------------------
 1926|  41.3k|                pixel *uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff +
 1927|  41.3k|                    (PXSTRIDE(f->cur.stride[1]) * init_y * 4 >> ss_ver);
  ------------------
  |  |   53|  41.3k|#define PXSTRIDE(x) (x)
  ------------------
 1928|  41.3k|                for (y = init_y >> ss_ver, t->by += init_y;
 1929|  87.5k|                     y < imin(ch4, (init_y + 16) >> ss_ver); y += uvtx->h)
  ------------------
  |  Branch (1929:22): [True: 46.1k, False: 41.3k]
  ------------------
 1930|  46.1k|                {
 1931|  46.1k|                    int x;
 1932|  46.1k|                    for (x = init_x >> ss_hor, t->bx += init_x;
 1933|   104k|                         x < imin(cw4, (init_x + 16) >> ss_hor); x += uvtx->w)
  ------------------
  |  Branch (1933:26): [True: 58.0k, False: 46.1k]
  ------------------
 1934|  58.0k|                    {
 1935|  58.0k|                        coef *cf;
 1936|  58.0k|                        int eob;
 1937|  58.0k|                        enum TxfmType txtp;
 1938|  58.0k|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1938:29): [True: 0, False: 58.0k]
  ------------------
 1939|      0|                            const int p = t->frame_thread.pass & 1;
 1940|      0|                            const int cbi = *ts->frame_thread[p].cbi++;
 1941|      0|                            cf = ts->frame_thread[p].cf;
 1942|      0|                            ts->frame_thread[p].cf += uvtx->w * uvtx->h * 16;
 1943|      0|                            eob  = cbi >> 5;
 1944|      0|                            txtp = cbi & 0x1f;
 1945|  58.0k|                        } else {
 1946|  58.0k|                            uint8_t cf_ctx;
 1947|  58.0k|                            cf = bitfn(t->cf);
  ------------------
  |  |   51|  58.0k|#define bitfn(x) x##_8bpc
  ------------------
 1948|  58.0k|                            txtp = t->scratch.txtp_map[(by4 + (y << ss_ver)) * 32 +
 1949|  58.0k|                                                        bx4 + (x << ss_hor)];
 1950|  58.0k|                            eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1951|  58.0k|                                               &t->l.ccoef[pl][cby4 + y],
 1952|  58.0k|                                               b->uvtx, bs, b, 0, 1 + pl,
 1953|  58.0k|                                               cf, &txtp, &cf_ctx);
 1954|  58.0k|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  58.0k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 58.0k]
  |  |  ------------------
  |  |   35|  58.0k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  58.0k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1955|      0|                                printf("Post-uv-cf-blk[pl=%d,tx=%d,"
 1956|      0|                                       "txtp=%d,eob=%d]: r=%d\n",
 1957|      0|                                       pl, b->uvtx, txtp, eob, ts->msac.rng);
 1958|  58.0k|                            int ctw = imin(uvtx->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1959|  58.0k|                            int cth = imin(uvtx->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1960|  58.0k|                            dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1961|  58.0k|                            dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1962|  58.0k|                        }
 1963|  58.0k|                        if (eob >= 0) {
  ------------------
  |  Branch (1963:29): [True: 17.0k, False: 41.0k]
  ------------------
 1964|  17.0k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  17.0k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 17.0k]
  |  |  ------------------
  |  |   35|  17.0k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  17.0k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1965|      0|                                coef_dump(cf, uvtx->h * 4, uvtx->w * 4, 3, "dq");
 1966|  17.0k|                            dsp->itx.itxfm_add[b->uvtx]
 1967|  17.0k|                                              [txtp](&uvdst[4 * x],
 1968|  17.0k|                                                     f->cur.stride[1],
 1969|  17.0k|                                                     cf, eob HIGHBD_CALL_SUFFIX);
 1970|  17.0k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  17.0k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 17.0k]
  |  |  ------------------
  |  |   35|  17.0k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  17.0k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1971|      0|                                hex_dump(&uvdst[4 * x], f->cur.stride[1],
 1972|      0|                                         uvtx->w * 4, uvtx->h * 4, "recon");
 1973|  17.0k|                        }
 1974|  58.0k|                        t->bx += uvtx->w << ss_hor;
 1975|  58.0k|                    }
 1976|  46.1k|                    uvdst += PXSTRIDE(f->cur.stride[1]) * 4 * uvtx->h;
  ------------------
  |  |   53|  46.1k|#define PXSTRIDE(x) (x)
  ------------------
 1977|  46.1k|                    t->bx -= x << ss_hor;
 1978|  46.1k|                    t->by += uvtx->h << ss_ver;
 1979|  46.1k|                }
 1980|  41.3k|                t->by -= y << ss_ver;
 1981|  41.3k|            }
 1982|  36.0k|        }
 1983|  35.0k|    }
 1984|  34.2k|    return 0;
 1985|   106k|}
dav1d_filter_sbrow_deblock_cols_8bpc:
 1987|  29.4k|void bytefn(dav1d_filter_sbrow_deblock_cols)(Dav1dFrameContext *const f, const int sby) {
 1988|  29.4k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK) ||
  ------------------
  |  Branch (1988:9): [True: 0, False: 29.4k]
  ------------------
 1989|  29.4k|        (!f->frame_hdr->loopfilter.level_y[0] && !f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (1989:10): [True: 11.3k, False: 18.0k]
  |  Branch (1989:50): [True: 10.3k, False: 1.03k]
  ------------------
 1990|  10.3k|    {
 1991|  10.3k|        return;
 1992|  10.3k|    }
 1993|  19.1k|    const int y = sby * f->sb_step * 4;
 1994|  19.1k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1995|  19.1k|    pixel *const p[3] = {
 1996|  19.1k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  19.1k|#define PXSTRIDE(x) (x)
  ------------------
 1997|  19.1k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  19.1k|#define PXSTRIDE(x) (x)
  ------------------
 1998|  19.1k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  19.1k|#define PXSTRIDE(x) (x)
  ------------------
 1999|  19.1k|    };
 2000|  19.1k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2001|  19.1k|    bytefn(dav1d_loopfilter_sbrow_cols)(f, p, mask, sby,
  ------------------
  |  |   87|  19.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  19.1k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2002|  19.1k|                                        f->lf.start_of_tile_row[sby]);
 2003|  19.1k|}
dav1d_filter_sbrow_deblock_rows_8bpc:
 2005|  29.4k|void bytefn(dav1d_filter_sbrow_deblock_rows)(Dav1dFrameContext *const f, const int sby) {
 2006|  29.4k|    const int y = sby * f->sb_step * 4;
 2007|  29.4k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2008|  29.4k|    pixel *const p[3] = {
 2009|  29.4k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  29.4k|#define PXSTRIDE(x) (x)
  ------------------
 2010|  29.4k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  29.4k|#define PXSTRIDE(x) (x)
  ------------------
 2011|  29.4k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  29.4k|#define PXSTRIDE(x) (x)
  ------------------
 2012|  29.4k|    };
 2013|  29.4k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2014|  29.4k|    if (f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK &&
  ------------------
  |  Branch (2014:9): [True: 29.4k, False: 0]
  ------------------
 2015|  29.4k|        (f->frame_hdr->loopfilter.level_y[0] || f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (2015:10): [True: 18.0k, False: 11.3k]
  |  Branch (2015:49): [True: 1.03k, False: 10.3k]
  ------------------
 2016|  19.1k|    {
 2017|  19.1k|        bytefn(dav1d_loopfilter_sbrow_rows)(f, p, mask, sby);
  ------------------
  |  |   87|  19.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  19.1k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2018|  19.1k|    }
 2019|  29.4k|    if (f->seq_hdr->cdef || f->lf.restore_planes) {
  ------------------
  |  Branch (2019:9): [True: 13.0k, False: 16.3k]
  |  Branch (2019:29): [True: 4.51k, False: 11.8k]
  ------------------
 2020|       |        // Store loop filtered pixels required by CDEF / LR
 2021|  17.6k|        bytefn(dav1d_copy_lpf)(f, p, sby);
  ------------------
  |  |   87|  17.6k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  17.6k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2022|  17.6k|    }
 2023|  29.4k|}
dav1d_filter_sbrow_cdef_8bpc:
 2025|  13.0k|void bytefn(dav1d_filter_sbrow_cdef)(Dav1dTaskContext *const tc, const int sby) {
 2026|  13.0k|    const Dav1dFrameContext *const f = tc->f;
 2027|  13.0k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_CDEF)) return;
  ------------------
  |  Branch (2027:9): [True: 0, False: 13.0k]
  ------------------
 2028|  13.0k|    const int sbsz = f->sb_step;
 2029|  13.0k|    const int y = sby * sbsz * 4;
 2030|  13.0k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2031|  13.0k|    pixel *const p[3] = {
 2032|  13.0k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  13.0k|#define PXSTRIDE(x) (x)
  ------------------
 2033|  13.0k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  13.0k|#define PXSTRIDE(x) (x)
  ------------------
 2034|  13.0k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  13.0k|#define PXSTRIDE(x) (x)
  ------------------
 2035|  13.0k|    };
 2036|  13.0k|    Av1Filter *prev_mask = f->lf.mask + ((sby - 1) >> !f->seq_hdr->sb128) * f->sb128w;
 2037|  13.0k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2038|  13.0k|    const int start = sby * sbsz;
 2039|  13.0k|    if (sby) {
  ------------------
  |  Branch (2039:9): [True: 9.91k, False: 3.17k]
  ------------------
 2040|  9.91k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2041|  9.91k|        pixel *p_up[3] = {
 2042|  9.91k|            p[0] - 8 * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  9.91k|#define PXSTRIDE(x) (x)
  ------------------
 2043|  9.91k|            p[1] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  9.91k|#define PXSTRIDE(x) (x)
  ------------------
 2044|  9.91k|            p[2] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  9.91k|#define PXSTRIDE(x) (x)
  ------------------
 2045|  9.91k|        };
 2046|  9.91k|        bytefn(dav1d_cdef_brow)(tc, p_up, prev_mask, start - 2, start, 1, sby);
  ------------------
  |  |   87|  9.91k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  9.91k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2047|  9.91k|    }
 2048|  13.0k|    const int n_blks = sbsz - 2 * (sby + 1 < f->sbh);
 2049|  13.0k|    const int end = imin(start + n_blks, f->bh);
 2050|  13.0k|    bytefn(dav1d_cdef_brow)(tc, p, mask, start, end, 0, sby);
  ------------------
  |  |   87|  13.0k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  13.0k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2051|  13.0k|}
dav1d_filter_sbrow_resize_8bpc:
 2053|  5.26k|void bytefn(dav1d_filter_sbrow_resize)(Dav1dFrameContext *const f, const int sby) {
 2054|  5.26k|    const int sbsz = f->sb_step;
 2055|  5.26k|    const int y = sby * sbsz * 4;
 2056|  5.26k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2057|  5.26k|    const pixel *const p[3] = {
 2058|  5.26k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  5.26k|#define PXSTRIDE(x) (x)
  ------------------
 2059|  5.26k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  5.26k|#define PXSTRIDE(x) (x)
  ------------------
 2060|  5.26k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  5.26k|#define PXSTRIDE(x) (x)
  ------------------
 2061|  5.26k|    };
 2062|  5.26k|    pixel *const sr_p[3] = {
 2063|  5.26k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
  ------------------
  |  |   53|  5.26k|#define PXSTRIDE(x) (x)
  ------------------
 2064|  5.26k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  5.26k|#define PXSTRIDE(x) (x)
  ------------------
 2065|  5.26k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  5.26k|#define PXSTRIDE(x) (x)
  ------------------
 2066|  5.26k|    };
 2067|  5.26k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400;
 2068|  19.5k|    for (int pl = 0; pl < 1 + 2 * has_chroma; pl++) {
  ------------------
  |  Branch (2068:22): [True: 14.2k, False: 5.26k]
  ------------------
 2069|  14.2k|        const int ss_ver = pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (2069:28): [True: 8.98k, False: 5.26k]
  |  Branch (2069:34): [True: 332, False: 8.64k]
  ------------------
 2070|  14.2k|        const int h_start = 8 * !!sby >> ss_ver;
 2071|  14.2k|        const ptrdiff_t dst_stride = f->sr_cur.p.stride[!!pl];
 2072|  14.2k|        pixel *dst = sr_p[pl] - h_start * PXSTRIDE(dst_stride);
  ------------------
  |  |   53|  14.2k|#define PXSTRIDE(x) (x)
  ------------------
 2073|  14.2k|        const ptrdiff_t src_stride = f->cur.stride[!!pl];
 2074|  14.2k|        const pixel *src = p[pl] - h_start * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  14.2k|#define PXSTRIDE(x) (x)
  ------------------
 2075|  14.2k|        const int h_end = 4 * (sbsz - 2 * (sby + 1 < f->sbh)) >> ss_ver;
 2076|  14.2k|        const int ss_hor = pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2076:28): [True: 8.98k, False: 5.26k]
  |  Branch (2076:34): [True: 554, False: 8.42k]
  ------------------
 2077|  14.2k|        const int dst_w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 2078|  14.2k|        const int src_w = (4 * f->bw + ss_hor) >> ss_hor;
 2079|  14.2k|        const int img_h = (f->cur.p.h - sbsz * 4 * sby + ss_ver) >> ss_ver;
 2080|       |
 2081|  14.2k|        f->dsp->mc.resize(dst, dst_stride, src, src_stride, dst_w,
 2082|  14.2k|                          imin(img_h, h_end) + h_start, src_w,
 2083|  14.2k|                          f->resize_step[!!pl], f->resize_start[!!pl]
 2084|  14.2k|                          HIGHBD_CALL_SUFFIX);
 2085|  14.2k|    }
 2086|  5.26k|}
dav1d_filter_sbrow_lr_8bpc:
 2088|  8.14k|void bytefn(dav1d_filter_sbrow_lr)(Dav1dFrameContext *const f, const int sby) {
 2089|  8.14k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_RESTORATION)) return;
  ------------------
  |  Branch (2089:9): [True: 0, False: 8.14k]
  ------------------
 2090|  8.14k|    const int y = sby * f->sb_step * 4;
 2091|  8.14k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2092|  8.14k|    pixel *const sr_p[3] = {
 2093|  8.14k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
  ------------------
  |  |   53|  8.14k|#define PXSTRIDE(x) (x)
  ------------------
 2094|  8.14k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  8.14k|#define PXSTRIDE(x) (x)
  ------------------
 2095|  8.14k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  8.14k|#define PXSTRIDE(x) (x)
  ------------------
 2096|  8.14k|    };
 2097|  8.14k|    bytefn(dav1d_lr_sbrow)(f, sr_p, sby);
  ------------------
  |  |   87|  8.14k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.14k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2098|  8.14k|}
dav1d_filter_sbrow_8bpc:
 2100|  29.4k|void bytefn(dav1d_filter_sbrow)(Dav1dFrameContext *const f, const int sby) {
 2101|  29.4k|    bytefn(dav1d_filter_sbrow_deblock_cols)(f, sby);
  ------------------
  |  |   87|  29.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  29.4k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2102|  29.4k|    bytefn(dav1d_filter_sbrow_deblock_rows)(f, sby);
  ------------------
  |  |   87|  29.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  29.4k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2103|  29.4k|    if (f->seq_hdr->cdef)
  ------------------
  |  Branch (2103:9): [True: 13.0k, False: 16.3k]
  ------------------
 2104|  13.0k|        bytefn(dav1d_filter_sbrow_cdef)(f->c->tc, sby);
  ------------------
  |  |   87|  13.0k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  13.0k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2105|  29.4k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1])
  ------------------
  |  Branch (2105:9): [True: 5.26k, False: 24.1k]
  ------------------
 2106|  5.26k|        bytefn(dav1d_filter_sbrow_resize)(f, sby);
  ------------------
  |  |   87|  5.26k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  5.26k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2107|  29.4k|    if (f->lf.restore_planes)
  ------------------
  |  Branch (2107:9): [True: 8.14k, False: 21.3k]
  ------------------
 2108|  8.14k|        bytefn(dav1d_filter_sbrow_lr)(f, sby);
  ------------------
  |  |   87|  8.14k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.14k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2109|  29.4k|}
dav1d_backup_ipred_edge_8bpc:
 2111|  31.7k|void bytefn(dav1d_backup_ipred_edge)(Dav1dTaskContext *const t) {
 2112|  31.7k|    const Dav1dFrameContext *const f = t->f;
 2113|  31.7k|    Dav1dTileState *const ts = t->ts;
 2114|  31.7k|    const int sby = t->by >> f->sb_shift;
 2115|  31.7k|    const int sby_off = f->sb128w * 128 * sby;
 2116|  31.7k|    const int x_off = ts->tiling.col_start;
 2117|       |
 2118|  31.7k|    const pixel *const y =
 2119|  31.7k|        ((const pixel *) f->cur.data[0]) + x_off * 4 +
 2120|  31.7k|                    ((t->by + f->sb_step) * 4 - 1) * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|  31.7k|#define PXSTRIDE(x) (x)
  ------------------
 2121|  31.7k|    pixel_copy(&f->ipred_edge[0][sby_off + x_off * 4], y,
  ------------------
  |  |   47|  31.7k|#define pixel_copy memcpy
  ------------------
 2122|  31.7k|               4 * (ts->tiling.col_end - x_off));
 2123|       |
 2124|  31.7k|    if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (2124:9): [True: 27.3k, False: 4.39k]
  ------------------
 2125|  27.3k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2126|  27.3k|        const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 2127|       |
 2128|  27.3k|        const ptrdiff_t uv_off = (x_off * 4 >> ss_hor) +
 2129|  27.3k|            (((t->by + f->sb_step) * 4 >> ss_ver) - 1) * PXSTRIDE(f->cur.stride[1]);
  ------------------
  |  |   53|  27.3k|#define PXSTRIDE(x) (x)
  ------------------
 2130|  81.9k|        for (int pl = 1; pl <= 2; pl++)
  ------------------
  |  Branch (2130:26): [True: 54.6k, False: 27.3k]
  ------------------
 2131|  54.6k|            pixel_copy(&f->ipred_edge[pl][sby_off + (x_off * 4 >> ss_hor)],
  ------------------
  |  |   47|  54.6k|#define pixel_copy memcpy
  ------------------
 2132|  54.6k|                       &((const pixel *) f->cur.data[pl])[uv_off],
 2133|  54.6k|                       4 * (ts->tiling.col_end - x_off) >> ss_hor);
 2134|  27.3k|    }
 2135|  31.7k|}
dav1d_copy_pal_block_y_8bpc:
 2141|  6.09k|{
 2142|  6.09k|    const Dav1dFrameContext *const f = t->f;
 2143|  6.09k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2143:24): [True: 0, False: 6.09k]
  ------------------
 2144|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2145|      0|                            ((t->bx >> 1) + (t->by & 1))][0] :
 2146|  6.09k|        bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  6.09k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  6.09k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2147|  29.2k|    for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2147:21): [True: 23.1k, False: 6.09k]
  ------------------
 2148|  23.1k|        memcpy(bytefn(t->al_pal)[0][bx4 + x][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  23.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  23.1k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2149|  24.2k|    for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2149:21): [True: 18.1k, False: 6.09k]
  ------------------
 2150|  18.1k|        memcpy(bytefn(t->al_pal)[1][by4 + y][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  18.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  18.1k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2151|  6.09k|}
dav1d_copy_pal_block_uv_8bpc:
 2157|  2.16k|{
 2158|  2.16k|    const Dav1dFrameContext *const f = t->f;
 2159|  2.16k|    const pixel (*const pal)[8] = t->frame_thread.pass ?
  ------------------
  |  Branch (2159:35): [True: 0, False: 2.16k]
  ------------------
 2160|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2161|      0|                            ((t->bx >> 1) + (t->by & 1))] :
 2162|  2.16k|        bytefn(t->scratch.pal);
  ------------------
  |  |   87|  2.16k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.16k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2163|       |    // see aomedia bug 2183 for why we use luma coordinates here
 2164|  6.49k|    for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (2164:22): [True: 4.33k, False: 2.16k]
  ------------------
 2165|  24.6k|        for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2165:25): [True: 20.3k, False: 4.33k]
  ------------------
 2166|  20.3k|            memcpy(bytefn(t->al_pal)[0][bx4 + x][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  20.3k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  20.3k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2167|  23.3k|        for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2167:25): [True: 19.0k, False: 4.33k]
  ------------------
 2168|  19.0k|            memcpy(bytefn(t->al_pal)[1][by4 + y][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  19.0k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  19.0k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2169|  4.33k|    }
 2170|  2.16k|}
dav1d_read_pal_plane_8bpc:
 2175|  8.26k|{
 2176|  8.26k|    Dav1dTileState *const ts = t->ts;
 2177|  8.26k|    const Dav1dFrameContext *const f = t->f;
 2178|  8.26k|    const int pal_sz = b->pal_sz[pl] = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  8.26k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 2179|  8.26k|                                           ts->cdf.m.pal_sz[pl][sz_ctx], 6) + 2;
 2180|  8.26k|    pixel cache[16], used_cache[8];
 2181|  8.26k|    int l_cache = pl ? t->pal_sz_uv[1][by4] : t->l.pal_sz[by4];
  ------------------
  |  Branch (2181:19): [True: 2.16k, False: 6.09k]
  ------------------
 2182|  8.26k|    int n_cache = 0;
 2183|       |    // don't reuse above palette outside SB64 boundaries
 2184|  8.26k|    int a_cache = by4 & 15 ? pl ? t->pal_sz_uv[0][bx4] : t->a->pal_sz[bx4] : 0;
  ------------------
  |  Branch (2184:19): [True: 5.43k, False: 2.83k]
  |  Branch (2184:30): [True: 1.20k, False: 4.22k]
  ------------------
 2185|  8.26k|    const pixel *l = bytefn(t->al_pal)[1][by4][pl];
  ------------------
  |  |   87|  8.26k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.26k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2186|  8.26k|    const pixel *a = bytefn(t->al_pal)[0][bx4][pl];
  ------------------
  |  |   87|  8.26k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.26k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2187|       |
 2188|       |    // fill/sort cache
 2189|  13.9k|    while (l_cache && a_cache) {
  ------------------
  |  Branch (2189:12): [True: 8.18k, False: 5.80k]
  |  Branch (2189:23): [True: 5.72k, False: 2.46k]
  ------------------
 2190|  5.72k|        if (*l < *a) {
  ------------------
  |  Branch (2190:13): [True: 2.11k, False: 3.61k]
  ------------------
 2191|  2.11k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2191:17): [True: 414, False: 1.70k]
  |  Branch (2191:29): [True: 1.67k, False: 22]
  ------------------
 2192|  2.09k|                cache[n_cache++] = *l;
 2193|  2.11k|            l++;
 2194|  2.11k|            l_cache--;
 2195|  3.61k|        } else {
 2196|  3.61k|            if (*a == *l) {
  ------------------
  |  Branch (2196:17): [True: 1.44k, False: 2.16k]
  ------------------
 2197|  1.44k|                l++;
 2198|  1.44k|                l_cache--;
 2199|  1.44k|            }
 2200|  3.61k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2200:17): [True: 654, False: 2.95k]
  |  Branch (2200:29): [True: 2.79k, False: 161]
  ------------------
 2201|  3.44k|                cache[n_cache++] = *a;
 2202|  3.61k|            a++;
 2203|  3.61k|            a_cache--;
 2204|  3.61k|        }
 2205|  5.72k|    }
 2206|  8.26k|    if (l_cache) {
  ------------------
  |  Branch (2206:9): [True: 2.46k, False: 5.80k]
  ------------------
 2207|  9.83k|        do {
 2208|  9.83k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2208:17): [True: 1.99k, False: 7.83k]
  |  Branch (2208:29): [True: 5.99k, False: 1.83k]
  ------------------
 2209|  7.99k|                cache[n_cache++] = *l;
 2210|  9.83k|            l++;
 2211|  9.83k|        } while (--l_cache > 0);
  ------------------
  |  Branch (2211:18): [True: 7.37k, False: 2.46k]
  ------------------
 2212|  5.80k|    } else if (a_cache) {
  ------------------
  |  Branch (2212:16): [True: 1.66k, False: 4.13k]
  ------------------
 2213|  6.59k|        do {
 2214|  6.59k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2214:17): [True: 1.19k, False: 5.39k]
  |  Branch (2214:29): [True: 4.02k, False: 1.37k]
  ------------------
 2215|  5.22k|                cache[n_cache++] = *a;
 2216|  6.59k|            a++;
 2217|  6.59k|        } while (--a_cache > 0);
  ------------------
  |  Branch (2217:18): [True: 4.92k, False: 1.66k]
  ------------------
 2218|  1.66k|    }
 2219|       |
 2220|       |    // find reused cache entries
 2221|  8.26k|    int i = 0;
 2222|  24.7k|    for (int n = 0; n < n_cache && i < pal_sz; n++)
  ------------------
  |  Branch (2222:21): [True: 17.2k, False: 7.51k]
  |  Branch (2222:36): [True: 16.5k, False: 751]
  ------------------
 2223|  16.5k|        if (dav1d_msac_decode_bool_equi(&ts->msac))
  ------------------
  |  |   53|  16.5k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2223:13): [True: 8.33k, False: 8.18k]
  ------------------
 2224|  8.33k|            used_cache[i++] = cache[n];
 2225|  8.26k|    const int n_used_cache = i;
 2226|       |
 2227|       |    // parse new entries
 2228|  8.26k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2228:24): [True: 0, False: 8.26k]
  ------------------
 2229|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2230|      0|                            ((t->bx >> 1) + (t->by & 1))][pl] :
 2231|  8.26k|        bytefn(t->scratch.pal)[pl];
  ------------------
  |  |   87|  8.26k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.26k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2232|  8.26k|    if (i < pal_sz) {
  ------------------
  |  Branch (2232:9): [True: 7.16k, False: 1.10k]
  ------------------
 2233|  7.16k|        const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2233:25): [True: 7.16k, Folded]
  ------------------
 2234|  7.16k|        int prev = pal[i++] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2235|       |
 2236|  7.16k|        if (i < pal_sz) {
  ------------------
  |  Branch (2236:13): [True: 6.31k, False: 853]
  ------------------
 2237|  6.31k|            int bits = bpc - 3 + dav1d_msac_decode_bools(&ts->msac, 2);
 2238|  6.31k|            const int max = (1 << bpc) - 1;
 2239|       |
 2240|  14.2k|            do {
 2241|  14.2k|                const int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2242|  14.2k|                prev = pal[i++] = imin(prev + delta + !pl, max);
 2243|  14.2k|                if (prev + !pl >= max) {
  ------------------
  |  Branch (2243:21): [True: 2.88k, False: 11.3k]
  ------------------
 2244|  8.03k|                    for (; i < pal_sz; i++)
  ------------------
  |  Branch (2244:28): [True: 5.15k, False: 2.88k]
  ------------------
 2245|  5.15k|                        pal[i] = max;
 2246|  2.88k|                    break;
 2247|  2.88k|                }
 2248|  11.3k|                bits = imin(bits, 1 + ulog2(max - prev - !pl));
 2249|  11.3k|            } while (i < pal_sz);
  ------------------
  |  Branch (2249:22): [True: 7.95k, False: 3.42k]
  ------------------
 2250|  6.31k|        }
 2251|       |
 2252|       |        // merge cache+new entries
 2253|  7.16k|        int n = 0, m = n_used_cache;
 2254|  39.1k|        for (i = 0; i < pal_sz; i++) {
  ------------------
  |  Branch (2254:21): [True: 31.9k, False: 7.16k]
  ------------------
 2255|  31.9k|            if (n < n_used_cache && (m >= pal_sz || used_cache[n] <= pal[m])) {
  ------------------
  |  Branch (2255:17): [True: 9.54k, False: 22.4k]
  |  Branch (2255:38): [True: 2.06k, False: 7.48k]
  |  Branch (2255:53): [True: 3.34k, False: 4.13k]
  ------------------
 2256|  5.40k|                pal[i] = used_cache[n++];
 2257|  26.5k|            } else {
 2258|  26.5k|                assert(m < pal_sz);
  ------------------
  |  |  140|  26.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 26.5k]
  |  |  |  Branch (140:68): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
 2259|  26.5k|                pal[i] = pal[m++];
 2260|  26.5k|            }
 2261|  31.9k|        }
 2262|  7.16k|    } else {
 2263|  1.10k|        memcpy(pal, used_cache, n_used_cache * sizeof(*used_cache));
 2264|  1.10k|    }
 2265|       |
 2266|  8.26k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  8.26k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 8.26k]
  |  |  ------------------
  |  |   35|  8.26k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  8.26k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2267|      0|        printf("Post-pal[pl=%d,sz=%d,cache_size=%d,used_cache=%d]: r=%d, cache=",
 2268|      0|               pl, pal_sz, n_cache, n_used_cache, ts->msac.rng);
 2269|      0|        for (int n = 0; n < n_cache; n++)
  ------------------
  |  Branch (2269:25): [True: 0, False: 0]
  ------------------
 2270|      0|            printf("%c%02x", n ? ' ' : '[', cache[n]);
  ------------------
  |  Branch (2270:30): [True: 0, False: 0]
  ------------------
 2271|      0|        printf("%s, pal=", n_cache ? "]" : "[]");
  ------------------
  |  Branch (2271:28): [True: 0, False: 0]
  ------------------
 2272|      0|        for (int n = 0; n < pal_sz; n++)
  ------------------
  |  Branch (2272:25): [True: 0, False: 0]
  ------------------
 2273|      0|            printf("%c%02x", n ? ' ' : '[', pal[n]);
  ------------------
  |  Branch (2273:30): [True: 0, False: 0]
  ------------------
 2274|      0|        printf("]\n");
 2275|      0|    }
 2276|  8.26k|}
dav1d_read_pal_uv_8bpc:
 2280|  2.16k|{
 2281|  2.16k|    bytefn(dav1d_read_pal_plane)(t, b, 1, sz_ctx, bx4, by4);
  ------------------
  |  |   87|  2.16k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.16k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2282|       |
 2283|       |    // V pal coding
 2284|  2.16k|    Dav1dTileState *const ts = t->ts;
 2285|  2.16k|    const Dav1dFrameContext *const f = t->f;
 2286|  2.16k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2286:24): [True: 0, False: 2.16k]
  ------------------
 2287|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2288|      0|                            ((t->bx >> 1) + (t->by & 1))][2] :
 2289|  2.16k|        bytefn(t->scratch.pal)[2];
  ------------------
  |  |   87|  2.16k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.16k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2290|  2.16k|    const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2290:21): [True: 2.16k, Folded]
  ------------------
 2291|  2.16k|    if (dav1d_msac_decode_bool_equi(&ts->msac)) {
  ------------------
  |  |   53|  2.16k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2291:9): [True: 1.01k, False: 1.15k]
  ------------------
 2292|  1.01k|        const int bits = bpc - 4 + dav1d_msac_decode_bools(&ts->msac, 2);
 2293|  1.01k|        int prev = pal[0] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2294|  1.01k|        const int max = (1 << bpc) - 1;
 2295|  4.24k|        for (int i = 1; i < b->pal_sz[1]; i++) {
  ------------------
  |  Branch (2295:25): [True: 3.22k, False: 1.01k]
  ------------------
 2296|  3.22k|            int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2297|  3.22k|            if (delta && dav1d_msac_decode_bool_equi(&ts->msac)) delta = -delta;
  ------------------
  |  |   53|  3.10k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2297:17): [True: 3.10k, False: 125]
  |  Branch (2297:26): [True: 1.50k, False: 1.59k]
  ------------------
 2298|  3.22k|            prev = pal[i] = (prev + delta) & max;
 2299|  3.22k|        }
 2300|  1.15k|    } else {
 2301|  5.35k|        for (int i = 0; i < b->pal_sz[1]; i++)
  ------------------
  |  Branch (2301:25): [True: 4.20k, False: 1.15k]
  ------------------
 2302|  4.20k|            pal[i] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2303|  1.15k|    }
 2304|  2.16k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  2.16k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.16k]
  |  |  ------------------
  |  |   35|  2.16k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  2.16k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2305|      0|        printf("Post-pal[pl=2]: r=%d ", ts->msac.rng);
 2306|      0|        for (int n = 0; n < b->pal_sz[1]; n++)
  ------------------
  |  Branch (2306:25): [True: 0, False: 0]
  ------------------
 2307|      0|            printf("%c%02x", n ? ' ' : '[', pal[n]);
  ------------------
  |  Branch (2307:30): [True: 0, False: 0]
  ------------------
 2308|      0|        printf("]\n");
 2309|      0|    }
 2310|  2.16k|}
recon_tmpl.c:read_coef_tree:
  736|   132k|{
  737|   132k|    const Dav1dFrameContext *const f = t->f;
  738|   132k|    Dav1dTileState *const ts = t->ts;
  739|   132k|    const Dav1dDSPContext *const dsp = f->dsp;
  740|   132k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[ytx];
  741|   132k|    const int txw = t_dim->w, txh = t_dim->h;
  742|       |
  743|       |    /* y_off can be larger than 3 since lossless blocks use TX_4X4 but can't
  744|       |     * be splitted. Aviods an undefined left shift. */
  745|   132k|    if (depth < 2 && tx_split[depth] &&
  ------------------
  |  Branch (745:9): [True: 116k, False: 15.7k]
  |  Branch (745:22): [True: 17.3k, False: 99.4k]
  ------------------
  746|  17.3k|        tx_split[depth] & (1 << (y_off * 4 + x_off)))
  ------------------
  |  Branch (746:9): [True: 12.8k, False: 4.48k]
  ------------------
  747|  12.8k|    {
  748|  12.8k|        const enum RectTxfmSize sub = t_dim->sub;
  749|  12.8k|        const TxfmInfo *const sub_t_dim = &dav1d_txfm_dimensions[sub];
  750|  12.8k|        const int txsw = sub_t_dim->w, txsh = sub_t_dim->h;
  751|       |
  752|  12.8k|        read_coef_tree(t, bs, b, sub, depth + 1, tx_split,
  753|  12.8k|                       x_off * 2 + 0, y_off * 2 + 0, dst);
  754|  12.8k|        t->bx += txsw;
  755|  12.8k|        if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (755:13): [True: 10.4k, False: 2.41k]
  |  Branch (755:27): [True: 9.62k, False: 823]
  ------------------
  756|  9.62k|            read_coef_tree(t, bs, b, sub, depth + 1, tx_split, x_off * 2 + 1,
  757|  9.62k|                           y_off * 2 + 0, dst ? &dst[4 * txsw] : NULL);
  ------------------
  |  Branch (757:43): [True: 9.62k, False: 0]
  ------------------
  758|  12.8k|        t->bx -= txsw;
  759|  12.8k|        t->by += txsh;
  760|  12.8k|        if (txh >= txw && t->by < f->bh) {
  ------------------
  |  Branch (760:13): [True: 9.25k, False: 3.61k]
  |  Branch (760:27): [True: 8.78k, False: 471]
  ------------------
  761|  8.78k|            if (dst)
  ------------------
  |  Branch (761:17): [True: 8.78k, False: 0]
  ------------------
  762|  8.78k|                dst += 4 * txsh * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|  8.78k|#define PXSTRIDE(x) (x)
  ------------------
  763|  8.78k|            read_coef_tree(t, bs, b, sub, depth + 1, tx_split,
  764|  8.78k|                           x_off * 2 + 0, y_off * 2 + 1, dst);
  765|  8.78k|            t->bx += txsw;
  766|  8.78k|            if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (766:17): [True: 6.38k, False: 2.39k]
  |  Branch (766:31): [True: 5.60k, False: 782]
  ------------------
  767|  5.60k|                read_coef_tree(t, bs, b, sub, depth + 1, tx_split, x_off * 2 + 1,
  768|  5.60k|                               y_off * 2 + 1, dst ? &dst[4 * txsw] : NULL);
  ------------------
  |  Branch (768:47): [True: 5.60k, False: 0]
  ------------------
  769|  8.78k|            t->bx -= txsw;
  770|  8.78k|        }
  771|  12.8k|        t->by -= txsh;
  772|   119k|    } else {
  773|   119k|        const int bx4 = t->bx & 31, by4 = t->by & 31;
  774|   119k|        enum TxfmType txtp;
  775|   119k|        uint8_t cf_ctx;
  776|   119k|        int eob;
  777|   119k|        coef *cf;
  778|       |
  779|   119k|        if (t->frame_thread.pass) {
  ------------------
  |  Branch (779:13): [True: 0, False: 119k]
  ------------------
  780|      0|            const int p = t->frame_thread.pass & 1;
  781|      0|            assert(ts->frame_thread[p].cf);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  782|      0|            cf = ts->frame_thread[p].cf;
  783|      0|            ts->frame_thread[p].cf += imin(t_dim->w, 8) * imin(t_dim->h, 8) * 16;
  784|   119k|        } else {
  785|   119k|            cf = bitfn(t->cf);
  ------------------
  |  |   51|   119k|#define bitfn(x) x##_8bpc
  ------------------
  786|   119k|        }
  787|   119k|        if (t->frame_thread.pass != 2) {
  ------------------
  |  Branch (787:13): [True: 119k, False: 0]
  ------------------
  788|   119k|            eob = decode_coefs(t, &t->a->lcoef[bx4], &t->l.lcoef[by4],
  789|   119k|                               ytx, bs, b, 0, 0, cf, &txtp, &cf_ctx);
  790|   119k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   119k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 119k]
  |  |  ------------------
  |  |   35|   119k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   119k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  791|      0|                printf("Post-y-cf-blk[tx=%d,txtp=%d,eob=%d]: r=%d\n",
  792|      0|                       ytx, txtp, eob, ts->msac.rng);
  793|   119k|            dav1d_memset_likely_pow2(&t->a->lcoef[bx4], cf_ctx, imin(txw, f->bw - t->bx));
  794|   119k|            dav1d_memset_likely_pow2(&t->l.lcoef[by4], cf_ctx, imin(txh, f->bh - t->by));
  795|   119k|#define set_ctx(rep_macro) \
  796|   119k|            for (int y = 0; y < txh; y++) { \
  797|   119k|                rep_macro(txtp_map, 0, txtp); \
  798|   119k|                txtp_map += 32; \
  799|   119k|            }
  800|   119k|            uint8_t *txtp_map = &t->scratch.txtp_map[by4 * 32 + bx4];
  801|   119k|            case_set_upto16(t_dim->lw);
  ------------------
  |  |   80|   119k|    switch (var) { \
  |  |   81|  40.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  |  796|  92.5k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 51.5k, False: 40.9k]
  |  |  |  |  ------------------
  |  |  |  |  797|  51.5k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  51.5k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  51.5k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|  51.5k|                txtp_map += 32; \
  |  |  |  |  799|  51.5k|            }
  |  |  ------------------
  |  |  |  Branch (81:5): [True: 40.9k, False: 78.7k]
  |  |  ------------------
  |  |   82|  34.8k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  |  796|   116k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 81.3k, False: 34.8k]
  |  |  |  |  ------------------
  |  |  |  |  797|  81.3k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|  81.3k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  81.3k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|  81.3k|                txtp_map += 32; \
  |  |  |  |  799|  81.3k|            }
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 34.8k, False: 84.8k]
  |  |  ------------------
  |  |   83|  26.4k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  |  796|   111k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 85.3k, False: 26.4k]
  |  |  |  |  ------------------
  |  |  |  |  797|  85.3k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|  85.3k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  85.3k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|  85.3k|                txtp_map += 32; \
  |  |  |  |  799|  85.3k|            }
  |  |  ------------------
  |  |  |  Branch (83:5): [True: 26.4k, False: 93.2k]
  |  |  ------------------
  |  |   84|  9.31k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  |  796|  68.5k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 59.1k, False: 9.31k]
  |  |  |  |  ------------------
  |  |  |  |  797|  59.1k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  59.1k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  59.1k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|  59.1k|                txtp_map += 32; \
  |  |  |  |  799|  59.1k|            }
  |  |  ------------------
  |  |  |  Branch (84:5): [True: 9.31k, False: 110k]
  |  |  ------------------
  |  |   85|  8.08k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  |  796|   123k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 115k, False: 8.08k]
  |  |  |  |  ------------------
  |  |  |  |  797|   115k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|   115k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   115k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   115k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   115k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 115k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|   115k|                txtp_map += 32; \
  |  |  |  |  799|   115k|            }
  |  |  ------------------
  |  |  |  Branch (85:5): [True: 8.08k, False: 111k]
  |  |  ------------------
  |  |   86|      0|    default: assert(0); \
  |  |  ------------------
  |  |  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (86:5): [True: 0, False: 119k]
  |  |  ------------------
  |  |   87|   119k|    }
  ------------------
  802|   119k|#undef set_ctx
  803|   119k|            if (t->frame_thread.pass == 1)
  ------------------
  |  Branch (803:17): [True: 0, False: 119k]
  ------------------
  804|      0|                *ts->frame_thread[1].cbi++ = eob * (1 << 5) + txtp;
  805|   119k|        } else {
  806|      0|            const int cbi = *ts->frame_thread[0].cbi++;
  807|      0|            eob  = cbi >> 5;
  808|      0|            txtp = cbi & 0x1f;
  809|      0|        }
  810|   119k|        if (!(t->frame_thread.pass & 1)) {
  ------------------
  |  Branch (810:13): [True: 119k, False: 0]
  ------------------
  811|   119k|            assert(dst);
  ------------------
  |  |  140|   119k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 119k]
  |  |  |  Branch (140:68): [Folded, False: 119k]
  |  |  ------------------
  ------------------
  812|   119k|            if (eob >= 0) {
  ------------------
  |  Branch (812:17): [True: 83.7k, False: 35.9k]
  ------------------
  813|  83.7k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  83.7k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 83.7k]
  |  |  ------------------
  |  |   35|  83.7k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  83.7k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
  814|      0|                    coef_dump(cf, imin(t_dim->h, 8) * 4, imin(t_dim->w, 8) * 4, 3, "dq");
  815|  83.7k|                dsp->itx.itxfm_add[ytx][txtp](dst, f->cur.stride[0], cf, eob
  816|  83.7k|                                              HIGHBD_CALL_SUFFIX);
  817|  83.7k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  83.7k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 83.7k]
  |  |  ------------------
  |  |   35|  83.7k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  83.7k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
  818|      0|                    hex_dump(dst, f->cur.stride[0], t_dim->w * 4, t_dim->h * 4, "recon");
  819|  83.7k|            }
  820|   119k|        }
  821|   119k|    }
  822|   132k|}
recon_tmpl.c:decode_coefs:
  327|  4.38M|{
  328|  4.38M|    Dav1dTileState *const ts = t->ts;
  329|  4.38M|    const int chroma = !!plane;
  330|  4.38M|    const Dav1dFrameContext *const f = t->f;
  331|  4.38M|    const int lossless = f->frame_hdr->segmentation.lossless[b->seg_id];
  332|  4.38M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
  333|  4.38M|    const int dbg = DEBUG_BLOCK_INFO && plane && 0;
  ------------------
  |  |   34|  4.38M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 4.38M]
  |  |  ------------------
  |  |   35|  4.38M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  4.38M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (333:41): [True: 0, False: 0]
  |  Branch (333:50): [Folded, False: 0]
  ------------------
  334|       |
  335|  4.38M|    if (dbg)
  ------------------
  |  Branch (335:9): [Folded, False: 4.38M]
  ------------------
  336|      0|        printf("Start: r=%d\n", ts->msac.rng);
  337|       |
  338|       |    // does this block have any non-zero coefficients
  339|  4.38M|    const int sctx = get_skip_ctx(t_dim, bs, a, l, chroma, f->cur.p.layout);
  340|  4.38M|    const int all_skip = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  4.38M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  341|  4.38M|                             ts->cdf.coef.skip[t_dim->ctx][sctx]);
  342|  4.38M|    if (dbg)
  ------------------
  |  Branch (342:9): [Folded, False: 4.38M]
  ------------------
  343|      0|        printf("Post-non-zero[%d][%d][%d]: r=%d\n",
  344|      0|               t_dim->ctx, sctx, all_skip, ts->msac.rng);
  345|  4.38M|    if (all_skip) {
  ------------------
  |  Branch (345:9): [True: 2.62M, False: 1.76M]
  ------------------
  346|  2.62M|        *res_ctx = 0x40;
  347|  2.62M|        *txtp = lossless * WHT_WHT; /* lossless ? WHT_WHT : DCT_DCT */
  348|  2.62M|        return -1;
  349|  2.62M|    }
  350|       |
  351|       |    // transform type (chroma: derived, luma: explicitly coded)
  352|  1.76M|    if (lossless) {
  ------------------
  |  Branch (352:9): [True: 88.3k, False: 1.67M]
  ------------------
  353|  88.3k|        assert(t_dim->max == TX_4X4);
  ------------------
  |  |  140|  88.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 88.3k]
  |  |  |  Branch (140:68): [Folded, False: 88.3k]
  |  |  ------------------
  ------------------
  354|  88.3k|        *txtp = WHT_WHT;
  355|  1.67M|    } else if (t_dim->max + intra >= TX_64X64) {
  ------------------
  |  Branch (355:16): [True: 290k, False: 1.38M]
  ------------------
  356|   290k|        *txtp = DCT_DCT;
  357|  1.38M|    } else if (chroma) {
  ------------------
  |  Branch (357:16): [True: 358k, False: 1.02M]
  ------------------
  358|       |        // inferred from either the luma txtp (inter) or a LUT (intra)
  359|   358k|        *txtp = intra ? dav1d_txtp_from_uvmode[b->uv_mode] :
  ------------------
  |  Branch (359:17): [True: 337k, False: 20.3k]
  ------------------
  360|   358k|                        get_uv_inter_txtp(t_dim, *txtp);
  361|  1.02M|    } else if (!f->frame_hdr->segmentation.qidx[b->seg_id]) {
  ------------------
  |  Branch (361:16): [True: 8.59k, False: 1.01M]
  ------------------
  362|       |        // In libaom, lossless is checked by a literal qidx == 0, but not all
  363|       |        // such blocks are actually lossless. The remainder gets an implicit
  364|       |        // transform type (for luma)
  365|  8.59k|        *txtp = DCT_DCT;
  366|  1.01M|    } else {
  367|  1.01M|        unsigned idx;
  368|  1.01M|        if (intra) {
  ------------------
  |  Branch (368:13): [True: 945k, False: 72.3k]
  ------------------
  369|   945k|            const enum IntraPredMode y_mode_nofilt = b->y_mode == FILTER_PRED ?
  ------------------
  |  Branch (369:54): [True: 84.2k, False: 860k]
  ------------------
  370|   860k|                dav1d_filter_mode_to_y_mode[b->y_angle] : b->y_mode;
  371|   945k|            if (f->frame_hdr->reduced_txtp_set || t_dim->min == TX_16X16) {
  ------------------
  |  Branch (371:17): [True: 310k, False: 634k]
  |  Branch (371:51): [True: 126k, False: 508k]
  ------------------
  372|   436k|                idx = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   436k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  373|   436k|                          ts->cdf.m.txtp_intra2[t_dim->min][y_mode_nofilt], 4);
  374|   436k|                *txtp = dav1d_tx_types_per_set[idx + 0];
  375|   508k|            } else {
  376|   508k|                idx = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   508k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  377|   508k|                          ts->cdf.m.txtp_intra1[t_dim->min][y_mode_nofilt], 6);
  378|   508k|                *txtp = dav1d_tx_types_per_set[idx + 5];
  379|   508k|            }
  380|   945k|            if (dbg)
  ------------------
  |  Branch (380:17): [Folded, False: 945k]
  ------------------
  381|      0|                printf("Post-txtp-intra[%d->%d][%d][%d->%d]: r=%d\n",
  382|      0|                       tx, t_dim->min, y_mode_nofilt, idx, *txtp, ts->msac.rng);
  383|   945k|        } else {
  384|  72.3k|            if (f->frame_hdr->reduced_txtp_set || t_dim->max == TX_32X32) {
  ------------------
  |  Branch (384:17): [True: 24.7k, False: 47.6k]
  |  Branch (384:51): [True: 6.18k, False: 41.4k]
  ------------------
  385|  30.8k|                idx = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  30.8k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  386|  30.8k|                          ts->cdf.m.txtp_inter3[t_dim->min]);
  387|  30.8k|                *txtp = (idx - 1) & IDTX; /* idx ? DCT_DCT : IDTX */
  388|  41.4k|            } else if (t_dim->min == TX_16X16) {
  ------------------
  |  Branch (388:24): [True: 5.56k, False: 35.8k]
  ------------------
  389|  5.56k|                idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|  5.56k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
  390|  5.56k|                          ts->cdf.m.txtp_inter2, 11);
  391|  5.56k|                *txtp = dav1d_tx_types_per_set[idx + 12];
  392|  35.8k|            } else {
  393|  35.8k|                idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|  35.8k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
  394|  35.8k|                          ts->cdf.m.txtp_inter1[t_dim->min], 15);
  395|  35.8k|                *txtp = dav1d_tx_types_per_set[idx + 24];
  396|  35.8k|            }
  397|  72.3k|            if (dbg)
  ------------------
  |  Branch (397:17): [Folded, False: 72.3k]
  ------------------
  398|      0|                printf("Post-txtp-inter[%d->%d][%d->%d]: r=%d\n",
  399|      0|                       tx, t_dim->min, idx, *txtp, ts->msac.rng);
  400|  72.3k|        }
  401|  1.01M|    }
  402|       |
  403|       |    // find end-of-block (eob)
  404|  1.76M|    int eob;
  405|  1.76M|    const int slw = imin(t_dim->lw, TX_32X32), slh = imin(t_dim->lh, TX_32X32);
  406|  1.76M|    const int tx2dszctx = slw + slh;
  407|  1.76M|    const enum TxClass tx_class = dav1d_tx_type_class[*txtp];
  408|  1.76M|    const int is_1d = tx_class != TX_CLASS_2D;
  409|  1.76M|    switch (tx2dszctx) {
  ------------------
  |  Branch (409:13): [True: 1.76M, False: 0]
  ------------------
  410|      0|#define case_sz(sz, bin, ns, is_1d) \
  411|      0|    case sz: { \
  412|      0|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  413|      0|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  414|      0|        break; \
  415|      0|    }
  416|   267k|    case_sz(0,   16,  8, [is_1d]);
  ------------------
  |  |  411|   267k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 267k, False: 1.49M]
  |  |  ------------------
  |  |  412|   267k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   267k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   267k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   267k|        break; \
  |  |  415|   267k|    }
  ------------------
  417|   157k|    case_sz(1,   32,  8, [is_1d]);
  ------------------
  |  |  411|   157k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 157k, False: 1.60M]
  |  |  ------------------
  |  |  412|   157k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   157k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   157k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   157k|        break; \
  |  |  415|   157k|    }
  ------------------
  418|   624k|    case_sz(2,   64,  8, [is_1d]);
  ------------------
  |  |  411|   624k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 624k, False: 1.13M]
  |  |  ------------------
  |  |  412|   624k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   624k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   624k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   624k|        break; \
  |  |  415|   624k|    }
  ------------------
  419|   172k|    case_sz(3,  128,  8, [is_1d]);
  ------------------
  |  |  411|   172k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 172k, False: 1.59M]
  |  |  ------------------
  |  |  412|   172k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   172k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   172k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   172k|        break; \
  |  |  415|   172k|    }
  ------------------
  420|   291k|    case_sz(4,  256, 16, [is_1d]);
  ------------------
  |  |  411|   291k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 291k, False: 1.47M]
  |  |  ------------------
  |  |  412|   291k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   291k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   57|   291k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  |  |  ------------------
  |  |  414|   291k|        break; \
  |  |  415|   291k|    }
  ------------------
  421|  74.1k|    case_sz(5,  512, 16,        );
  ------------------
  |  |  411|  74.1k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 74.1k, False: 1.68M]
  |  |  ------------------
  |  |  412|  74.1k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|  74.1k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   57|  74.1k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  |  |  ------------------
  |  |  414|  74.1k|        break; \
  |  |  415|  74.1k|    }
  ------------------
  422|   175k|    case_sz(6, 1024, 16,        );
  ------------------
  |  |  411|   175k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 175k, False: 1.58M]
  |  |  ------------------
  |  |  412|   175k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   175k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   57|   175k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  |  |  ------------------
  |  |  414|   175k|        break; \
  |  |  415|   175k|    }
  ------------------
  423|  1.76M|#undef case_sz
  424|  1.76M|    }
  425|  1.76M|    if (dbg)
  ------------------
  |  Branch (425:9): [Folded, False: 1.76M]
  ------------------
  426|      0|        printf("Post-eob_bin_%d[%d][%d][%d]: r=%d\n",
  427|      0|               16 << tx2dszctx, chroma, is_1d, eob, ts->msac.rng);
  428|  1.76M|    if (eob > 1) {
  ------------------
  |  Branch (428:9): [True: 1.02M, False: 742k]
  ------------------
  429|  1.02M|        const int eob_bin = eob - 2;
  430|  1.02M|        uint16_t *const eob_hi_bit_cdf =
  431|  1.02M|            ts->cdf.coef.eob_hi_bit[t_dim->ctx][chroma][eob_bin];
  432|  1.02M|        const int eob_hi_bit = dav1d_msac_decode_bool_adapt(&ts->msac, eob_hi_bit_cdf);
  ------------------
  |  |   52|  1.02M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  433|  1.02M|        if (dbg)
  ------------------
  |  Branch (433:13): [Folded, False: 1.02M]
  ------------------
  434|      0|            printf("Post-eob_hi_bit[%d][%d][%d][%d]: r=%d\n",
  435|      0|                   t_dim->ctx, chroma, eob_bin, eob_hi_bit, ts->msac.rng);
  436|  1.02M|        eob = ((eob_hi_bit | 2) << eob_bin) | dav1d_msac_decode_bools(&ts->msac, eob_bin);
  437|  1.02M|        if (dbg)
  ------------------
  |  Branch (437:13): [Folded, False: 1.02M]
  ------------------
  438|      0|            printf("Post-eob[%d]: r=%d\n", eob, ts->msac.rng);
  439|  1.02M|    }
  440|  1.76M|    assert(eob >= 0);
  ------------------
  |  |  140|  1.76M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.76M]
  |  |  |  Branch (140:68): [Folded, False: 1.76M]
  |  |  ------------------
  ------------------
  441|       |
  442|       |    // base tokens
  443|  1.76M|    uint16_t (*const eob_cdf)[4] = ts->cdf.coef.eob_base_tok[t_dim->ctx][chroma];
  444|  1.76M|    uint16_t (*const hi_cdf)[4] = ts->cdf.coef.br_tok[imin(t_dim->ctx, 3)][chroma];
  445|  1.76M|    unsigned rc, dc_tok;
  446|       |
  447|  1.76M|    if (eob) {
  ------------------
  |  Branch (447:9): [True: 1.08M, False: 676k]
  ------------------
  448|  1.08M|        uint16_t (*const lo_cdf)[4] = ts->cdf.coef.base_tok[t_dim->ctx][chroma];
  449|  1.08M|        uint8_t *const levels = t->scratch.levels; // bits 0-5: tok, 6-7: lo_tok
  450|       |
  451|       |        /* eob */
  452|  1.08M|        unsigned ctx = 1 + (eob > 2 << tx2dszctx) + (eob > 4 << tx2dszctx);
  453|  1.08M|        int eob_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, eob_cdf[ctx], 2);
  ------------------
  |  |   47|  1.08M|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  454|  1.08M|        int tok = eob_tok + 1;
  455|  1.08M|        int level_tok = tok * 0x41;
  456|  1.08M|        unsigned mag;
  457|       |
  458|  1.08M|#define DECODE_COEFS_CLASS(tx_class) \
  459|  1.08M|        unsigned x, y; \
  460|  1.08M|        uint8_t *level; \
  461|  1.08M|        if (tx_class == TX_CLASS_2D) \
  462|  1.08M|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  463|  1.08M|        else if (tx_class == TX_CLASS_H) \
  464|       |            /* Transposing reduces the stride and padding requirements */ \
  465|  1.08M|            x = eob & mask, y = eob >> shift, rc = eob; \
  466|  1.08M|        else /* tx_class == TX_CLASS_V */ \
  467|  1.08M|            x = eob & mask, y = eob >> shift, rc = (x << shift2) | y; \
  468|  1.08M|        if (dbg) \
  469|  1.08M|            printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  470|  1.08M|                   t_dim->ctx, chroma, ctx, eob, rc, tok, ts->msac.rng); \
  471|  1.08M|        if (eob_tok == 2) { \
  472|  1.08M|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  473|  1.08M|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  474|  1.08M|            level_tok = tok + (3 << 6); \
  475|  1.08M|            if (dbg) \
  476|  1.08M|                printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  477|  1.08M|                       imin(t_dim->ctx, 3), chroma, ctx, eob, rc, tok, \
  478|  1.08M|                       ts->msac.rng); \
  479|  1.08M|        } \
  480|  1.08M|        cf[rc] = tok << 11; \
  481|  1.08M|        if (tx_class == TX_CLASS_2D) \
  482|  1.08M|            level = levels + rc; \
  483|  1.08M|        else \
  484|  1.08M|            level = levels + x * stride + y; \
  485|  1.08M|        *level = (uint8_t) level_tok; \
  486|  1.08M|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  487|  1.08M|            unsigned rc_i; \
  488|  1.08M|            if (tx_class == TX_CLASS_2D) \
  489|  1.08M|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  490|  1.08M|            else if (tx_class == TX_CLASS_H) \
  491|  1.08M|                x = i & mask, y = i >> shift, rc_i = i; \
  492|  1.08M|            else /* tx_class == TX_CLASS_V */ \
  493|  1.08M|                x = i & mask, y = i >> shift, rc_i = (x << shift2) | y; \
  494|  1.08M|            assert(x < 32 && y < 32); \
  495|  1.08M|            if (tx_class == TX_CLASS_2D) \
  496|  1.08M|                level = levels + rc_i; \
  497|  1.08M|            else \
  498|  1.08M|                level = levels + x * stride + y; \
  499|  1.08M|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  500|  1.08M|            if (tx_class == TX_CLASS_2D) \
  501|  1.08M|                y |= x; \
  502|  1.08M|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  503|  1.08M|            if (dbg) \
  504|  1.08M|                printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  505|  1.08M|                       t_dim->ctx, chroma, ctx, i, rc_i, tok, ts->msac.rng); \
  506|  1.08M|            if (tok == 3) { \
  507|  1.08M|                mag &= 63; \
  508|  1.08M|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  509|  1.08M|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  510|  1.08M|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  511|  1.08M|                if (dbg) \
  512|  1.08M|                    printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  513|  1.08M|                           imin(t_dim->ctx, 3), chroma, ctx, i, rc_i, tok, \
  514|  1.08M|                           ts->msac.rng); \
  515|  1.08M|                *level = (uint8_t) (tok + (3 << 6)); \
  516|  1.08M|                cf[rc_i] = (tok << 11) | rc; \
  517|  1.08M|                rc = rc_i; \
  518|  1.08M|            } else { \
  519|       |                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  520|  1.08M|                tok *= 0x17ff41; \
  521|  1.08M|                *level = (uint8_t) tok; \
  522|       |                /* tok ? (tok << 11) | rc : 0 */ \
  523|  1.08M|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  524|  1.08M|                if (tok) rc = rc_i; \
  525|  1.08M|                cf[rc_i] = tok; \
  526|  1.08M|            } \
  527|  1.08M|        } \
  528|       |        /* dc */ \
  529|  1.08M|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  530|  1.08M|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  531|  1.08M|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  532|  1.08M|        if (dbg) \
  533|  1.08M|            printf("Post-dc_lo_tok[%d][%d][%d][%d]: r=%d\n", \
  534|  1.08M|                   t_dim->ctx, chroma, ctx, dc_tok, ts->msac.rng); \
  535|  1.08M|        if (dc_tok == 3) { \
  536|  1.08M|            if (tx_class == TX_CLASS_2D) \
  537|  1.08M|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  538|  1.08M|                      levels[1 * stride + 1]; \
  539|  1.08M|            mag &= 63; \
  540|  1.08M|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  541|  1.08M|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  542|  1.08M|            if (dbg) \
  543|  1.08M|                printf("Post-dc_hi_tok[%d][%d][0][%d]: r=%d\n", \
  544|  1.08M|                       imin(t_dim->ctx, 3), chroma, dc_tok, ts->msac.rng); \
  545|  1.08M|        } \
  546|  1.08M|        break
  547|       |
  548|  1.08M|        const uint16_t *scan;
  549|  1.08M|        switch (tx_class) {
  550|  1.02M|        case TX_CLASS_2D: {
  ------------------
  |  Branch (550:9): [True: 1.02M, False: 59.3k]
  ------------------
  551|  1.02M|            const unsigned nonsquare_tx = tx >= RTX_4X8;
  552|  1.02M|            const uint8_t (*const lo_ctx_offsets)[5] =
  553|  1.02M|                dav1d_lo_ctx_offsets[nonsquare_tx + (tx & nonsquare_tx)];
  554|  1.02M|            scan = dav1d_scans[tx];
  555|  1.02M|            const ptrdiff_t stride = 4 << slh;
  556|  1.02M|            const unsigned shift = slh + 2, shift2 = 0;
  557|  1.02M|            const unsigned mask = (4 << slh) - 1;
  558|  1.02M|            memset(levels, 0, stride * ((4 << slw) + 2));
  559|  1.02M|            DECODE_COEFS_CLASS(TX_CLASS_2D);
  ------------------
  |  |  459|  1.02M|        unsigned x, y; \
  |  |  460|  1.02M|        uint8_t *level; \
  |  |  461|  1.02M|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (461:13): [True: 1.02M, Folded]
  |  |  ------------------
  |  |  462|  1.02M|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  |  |  463|  1.02M|        else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (463:18): [Folded, False: 0]
  |  |  ------------------
  |  |  464|      0|            /* Transposing reduces the stride and padding requirements */ \
  |  |  465|      0|            x = eob & mask, y = eob >> shift, rc = eob; \
  |  |  466|      0|        else /* tx_class == TX_CLASS_V */ \
  |  |  467|      0|            x = eob & mask, y = eob >> shift, rc = (x << shift2) | y; \
  |  |  468|  1.02M|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (468:13): [Folded, False: 1.02M]
  |  |  ------------------
  |  |  469|  1.02M|            printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  470|      0|                   t_dim->ctx, chroma, ctx, eob, rc, tok, ts->msac.rng); \
  |  |  471|  1.02M|        if (eob_tok == 2) { \
  |  |  ------------------
  |  |  |  Branch (471:13): [True: 35.8k, False: 991k]
  |  |  ------------------
  |  |  472|  35.8k|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  |  |  ------------------
  |  |  |  Branch (472:19): [True: 17.7k, False: 18.0k]
  |  |  |  Branch (472:20): [True: 35.8k, Folded]
  |  |  ------------------
  |  |  473|  35.8k|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  35.8k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  474|  35.8k|            level_tok = tok + (3 << 6); \
  |  |  475|  35.8k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (475:17): [Folded, False: 35.8k]
  |  |  ------------------
  |  |  476|  35.8k|                printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  477|      0|                       imin(t_dim->ctx, 3), chroma, ctx, eob, rc, tok, \
  |  |  478|      0|                       ts->msac.rng); \
  |  |  479|  35.8k|        } \
  |  |  480|  1.02M|        cf[rc] = tok << 11; \
  |  |  481|  1.02M|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (481:13): [True: 1.02M, Folded]
  |  |  ------------------
  |  |  482|  1.02M|            level = levels + rc; \
  |  |  483|  1.02M|        else \
  |  |  484|  1.02M|            level = levels + x * stride + y; \
  |  |  485|  1.02M|        *level = (uint8_t) level_tok; \
  |  |  486|  29.8M|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  |  |  ------------------
  |  |  |  Branch (486:31): [True: 28.7M, False: 1.02M]
  |  |  ------------------
  |  |  487|  28.7M|            unsigned rc_i; \
  |  |  488|  28.7M|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (488:17): [True: 28.7M, Folded]
  |  |  ------------------
  |  |  489|  28.7M|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  |  |  490|  28.7M|            else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (490:22): [Folded, False: 0]
  |  |  ------------------
  |  |  491|      0|                x = i & mask, y = i >> shift, rc_i = i; \
  |  |  492|      0|            else /* tx_class == TX_CLASS_V */ \
  |  |  493|      0|                x = i & mask, y = i >> shift, rc_i = (x << shift2) | y; \
  |  |  494|  28.7M|            assert(x < 32 && y < 32); \
  |  |  ------------------
  |  |  |  |  140|  57.5M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:30): [True: 28.7M, False: 0]
  |  |  |  |  |  Branch (140:30): [True: 28.7M, False: 0]
  |  |  |  |  |  Branch (140:68): [Folded, False: 28.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  495|  28.7M|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (495:17): [True: 28.7M, Folded]
  |  |  ------------------
  |  |  496|  28.7M|                level = levels + rc_i; \
  |  |  497|  28.7M|            else \
  |  |  498|  28.7M|                level = levels + x * stride + y; \
  |  |  499|  28.7M|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  |  |  500|  28.7M|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (500:17): [True: 28.7M, Folded]
  |  |  ------------------
  |  |  501|  28.7M|                y |= x; \
  |  |  502|  28.7M|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  28.7M|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  503|  28.7M|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (503:17): [Folded, False: 28.7M]
  |  |  ------------------
  |  |  504|  28.7M|                printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  505|      0|                       t_dim->ctx, chroma, ctx, i, rc_i, tok, ts->msac.rng); \
  |  |  506|  28.7M|            if (tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (506:17): [True: 2.14M, False: 26.6M]
  |  |  ------------------
  |  |  507|  2.14M|                mag &= 63; \
  |  |  508|  2.14M|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  |  |  ------------------
  |  |  |  Branch (508:24): [True: 1.79M, False: 345k]
  |  |  ------------------
  |  |  509|  2.14M|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  |  |  ------------------
  |  |  |  Branch (509:24): [True: 503k, False: 1.63M]
  |  |  ------------------
  |  |  510|  2.14M|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  2.14M|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  511|  2.14M|                if (dbg) \
  |  |  ------------------
  |  |  |  Branch (511:21): [Folded, False: 2.14M]
  |  |  ------------------
  |  |  512|  2.14M|                    printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  513|      0|                           imin(t_dim->ctx, 3), chroma, ctx, i, rc_i, tok, \
  |  |  514|      0|                           ts->msac.rng); \
  |  |  515|  2.14M|                *level = (uint8_t) (tok + (3 << 6)); \
  |  |  516|  2.14M|                cf[rc_i] = (tok << 11) | rc; \
  |  |  517|  2.14M|                rc = rc_i; \
  |  |  518|  26.6M|            } else { \
  |  |  519|  26.6M|                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  |  |  520|  26.6M|                tok *= 0x17ff41; \
  |  |  521|  26.6M|                *level = (uint8_t) tok; \
  |  |  522|  26.6M|                /* tok ? (tok << 11) | rc : 0 */ \
  |  |  523|  26.6M|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  |  |  524|  26.6M|                if (tok) rc = rc_i; \
  |  |  ------------------
  |  |  |  Branch (524:21): [True: 7.50M, False: 19.1M]
  |  |  ------------------
  |  |  525|  26.6M|                cf[rc_i] = tok; \
  |  |  526|  26.6M|            } \
  |  |  527|  28.7M|        } \
  |  |  528|  1.02M|        /* dc */ \
  |  |  529|  1.02M|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  |  |  ------------------
  |  |  |  Branch (529:15): [True: 1.02M, Folded]
  |  |  ------------------
  |  |  530|  1.02M|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  |  |  531|  1.02M|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  1.02M|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  532|  1.02M|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (532:13): [Folded, False: 1.02M]
  |  |  ------------------
  |  |  533|  1.02M|            printf("Post-dc_lo_tok[%d][%d][%d][%d]: r=%d\n", \
  |  |  534|      0|                   t_dim->ctx, chroma, ctx, dc_tok, ts->msac.rng); \
  |  |  535|  1.02M|        if (dc_tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (535:13): [True: 394k, False: 633k]
  |  |  ------------------
  |  |  536|   394k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (536:17): [True: 394k, Folded]
  |  |  ------------------
  |  |  537|   394k|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  |  |  538|   394k|                      levels[1 * stride + 1]; \
  |  |  539|   394k|            mag &= 63; \
  |  |  540|   394k|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  |  |  ------------------
  |  |  |  Branch (540:19): [True: 31.3k, False: 362k]
  |  |  ------------------
  |  |  541|   394k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|   394k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  542|   394k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (542:17): [Folded, False: 394k]
  |  |  ------------------
  |  |  543|   394k|                printf("Post-dc_hi_tok[%d][%d][0][%d]: r=%d\n", \
  |  |  544|      0|                       imin(t_dim->ctx, 3), chroma, dc_tok, ts->msac.rng); \
  |  |  545|   394k|        } \
  |  |  546|  1.02M|        break
  ------------------
  560|  1.02M|        }
  561|  38.4k|        case TX_CLASS_H: {
  ------------------
  |  Branch (561:9): [True: 38.4k, False: 1.04M]
  ------------------
  562|  38.4k|            const uint8_t (*const lo_ctx_offsets)[5] = NULL;
  563|  38.4k|            const ptrdiff_t stride = 16;
  564|  38.4k|            const unsigned shift = slh + 2, shift2 = 0;
  565|  38.4k|            const unsigned mask = (4 << slh) - 1;
  566|  38.4k|            memset(levels, 0, stride * ((4 << slh) + 2));
  567|  38.4k|            DECODE_COEFS_CLASS(TX_CLASS_H);
  ------------------
  |  |  459|  38.4k|        unsigned x, y; \
  |  |  460|  38.4k|        uint8_t *level; \
  |  |  461|  38.4k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (461:13): [Folded, False: 38.4k]
  |  |  ------------------
  |  |  462|  38.4k|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  |  |  463|  38.4k|        else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (463:18): [True: 38.4k, Folded]
  |  |  ------------------
  |  |  464|  38.4k|            /* Transposing reduces the stride and padding requirements */ \
  |  |  465|  38.4k|            x = eob & mask, y = eob >> shift, rc = eob; \
  |  |  466|  38.4k|        else /* tx_class == TX_CLASS_V */ \
  |  |  467|  38.4k|            x = eob & mask, y = eob >> shift, rc = (x << shift2) | y; \
  |  |  468|  38.4k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (468:13): [Folded, False: 38.4k]
  |  |  ------------------
  |  |  469|  38.4k|            printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  470|      0|                   t_dim->ctx, chroma, ctx, eob, rc, tok, ts->msac.rng); \
  |  |  471|  38.4k|        if (eob_tok == 2) { \
  |  |  ------------------
  |  |  |  Branch (471:13): [True: 1.43k, False: 37.0k]
  |  |  ------------------
  |  |  472|  1.43k|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  |  |  ------------------
  |  |  |  Branch (472:19): [True: 1.37k, False: 59]
  |  |  |  Branch (472:20): [Folded, False: 1.43k]
  |  |  ------------------
  |  |  473|  1.43k|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  1.43k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  474|  1.43k|            level_tok = tok + (3 << 6); \
  |  |  475|  1.43k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (475:17): [Folded, False: 1.43k]
  |  |  ------------------
  |  |  476|  1.43k|                printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  477|      0|                       imin(t_dim->ctx, 3), chroma, ctx, eob, rc, tok, \
  |  |  478|      0|                       ts->msac.rng); \
  |  |  479|  1.43k|        } \
  |  |  480|  38.4k|        cf[rc] = tok << 11; \
  |  |  481|  38.4k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (481:13): [Folded, False: 38.4k]
  |  |  ------------------
  |  |  482|  38.4k|            level = levels + rc; \
  |  |  483|  38.4k|        else \
  |  |  484|  38.4k|            level = levels + x * stride + y; \
  |  |  485|  38.4k|        *level = (uint8_t) level_tok; \
  |  |  486|   804k|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  |  |  ------------------
  |  |  |  Branch (486:31): [True: 765k, False: 38.4k]
  |  |  ------------------
  |  |  487|   765k|            unsigned rc_i; \
  |  |  488|   765k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (488:17): [Folded, False: 765k]
  |  |  ------------------
  |  |  489|   765k|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  |  |  490|   765k|            else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (490:22): [True: 765k, Folded]
  |  |  ------------------
  |  |  491|   765k|                x = i & mask, y = i >> shift, rc_i = i; \
  |  |  492|   765k|            else /* tx_class == TX_CLASS_V */ \
  |  |  493|   765k|                x = i & mask, y = i >> shift, rc_i = (x << shift2) | y; \
  |  |  494|   765k|            assert(x < 32 && y < 32); \
  |  |  ------------------
  |  |  |  |  140|  1.53M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:30): [True: 765k, False: 0]
  |  |  |  |  |  Branch (140:30): [True: 765k, False: 0]
  |  |  |  |  |  Branch (140:68): [Folded, False: 765k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  495|   765k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (495:17): [Folded, False: 765k]
  |  |  ------------------
  |  |  496|   765k|                level = levels + rc_i; \
  |  |  497|   765k|            else \
  |  |  498|   765k|                level = levels + x * stride + y; \
  |  |  499|   765k|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  |  |  500|   765k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (500:17): [Folded, False: 765k]
  |  |  ------------------
  |  |  501|   765k|                y |= x; \
  |  |  502|   765k|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|   765k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  503|   765k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (503:17): [Folded, False: 765k]
  |  |  ------------------
  |  |  504|   765k|                printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  505|      0|                       t_dim->ctx, chroma, ctx, i, rc_i, tok, ts->msac.rng); \
  |  |  506|   765k|            if (tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (506:17): [True: 38.7k, False: 726k]
  |  |  ------------------
  |  |  507|  38.7k|                mag &= 63; \
  |  |  508|  38.7k|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  |  |  ------------------
  |  |  |  Branch (508:24): [True: 24.9k, False: 13.8k]
  |  |  ------------------
  |  |  509|  38.7k|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  |  |  ------------------
  |  |  |  Branch (509:24): [True: 3.98k, False: 34.8k]
  |  |  ------------------
  |  |  510|  38.7k|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  38.7k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  511|  38.7k|                if (dbg) \
  |  |  ------------------
  |  |  |  Branch (511:21): [Folded, False: 38.7k]
  |  |  ------------------
  |  |  512|  38.7k|                    printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  513|      0|                           imin(t_dim->ctx, 3), chroma, ctx, i, rc_i, tok, \
  |  |  514|      0|                           ts->msac.rng); \
  |  |  515|  38.7k|                *level = (uint8_t) (tok + (3 << 6)); \
  |  |  516|  38.7k|                cf[rc_i] = (tok << 11) | rc; \
  |  |  517|  38.7k|                rc = rc_i; \
  |  |  518|   726k|            } else { \
  |  |  519|   726k|                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  |  |  520|   726k|                tok *= 0x17ff41; \
  |  |  521|   726k|                *level = (uint8_t) tok; \
  |  |  522|   726k|                /* tok ? (tok << 11) | rc : 0 */ \
  |  |  523|   726k|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  |  |  524|   726k|                if (tok) rc = rc_i; \
  |  |  ------------------
  |  |  |  Branch (524:21): [True: 199k, False: 527k]
  |  |  ------------------
  |  |  525|   726k|                cf[rc_i] = tok; \
  |  |  526|   726k|            } \
  |  |  527|   765k|        } \
  |  |  528|  38.4k|        /* dc */ \
  |  |  529|  38.4k|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  |  |  ------------------
  |  |  |  Branch (529:15): [Folded, False: 38.4k]
  |  |  ------------------
  |  |  530|  38.4k|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  |  |  531|  38.4k|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  38.4k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  532|  38.4k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (532:13): [Folded, False: 38.4k]
  |  |  ------------------
  |  |  533|  38.4k|            printf("Post-dc_lo_tok[%d][%d][%d][%d]: r=%d\n", \
  |  |  534|      0|                   t_dim->ctx, chroma, ctx, dc_tok, ts->msac.rng); \
  |  |  535|  38.4k|        if (dc_tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (535:13): [True: 4.68k, False: 33.7k]
  |  |  ------------------
  |  |  536|  4.68k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (536:17): [Folded, False: 4.68k]
  |  |  ------------------
  |  |  537|  4.68k|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  |  |  538|      0|                      levels[1 * stride + 1]; \
  |  |  539|  4.68k|            mag &= 63; \
  |  |  540|  4.68k|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  |  |  ------------------
  |  |  |  Branch (540:19): [True: 726, False: 3.96k]
  |  |  ------------------
  |  |  541|  4.68k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  4.68k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  542|  4.68k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (542:17): [Folded, False: 4.68k]
  |  |  ------------------
  |  |  543|  4.68k|                printf("Post-dc_hi_tok[%d][%d][0][%d]: r=%d\n", \
  |  |  544|      0|                       imin(t_dim->ctx, 3), chroma, dc_tok, ts->msac.rng); \
  |  |  545|  4.68k|        } \
  |  |  546|  38.4k|        break
  ------------------
  568|  38.4k|        }
  569|  20.8k|        case TX_CLASS_V: {
  ------------------
  |  Branch (569:9): [True: 20.8k, False: 1.06M]
  ------------------
  570|  20.8k|            const uint8_t (*const lo_ctx_offsets)[5] = NULL;
  571|  20.8k|            const ptrdiff_t stride = 16;
  572|  20.8k|            const unsigned shift = slw + 2, shift2 = slh + 2;
  573|  20.8k|            const unsigned mask = (4 << slw) - 1;
  574|  20.8k|            memset(levels, 0, stride * ((4 << slw) + 2));
  575|  20.8k|            DECODE_COEFS_CLASS(TX_CLASS_V);
  ------------------
  |  |  459|  20.8k|        unsigned x, y; \
  |  |  460|  20.8k|        uint8_t *level; \
  |  |  461|  20.8k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (461:13): [Folded, False: 20.8k]
  |  |  ------------------
  |  |  462|  20.8k|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  |  |  463|  20.8k|        else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (463:18): [Folded, False: 20.8k]
  |  |  ------------------
  |  |  464|  20.8k|            /* Transposing reduces the stride and padding requirements */ \
  |  |  465|  20.8k|            x = eob & mask, y = eob >> shift, rc = eob; \
  |  |  466|  20.8k|        else /* tx_class == TX_CLASS_V */ \
  |  |  467|  20.8k|            x = eob & mask, y = eob >> shift, rc = (x << shift2) | y; \
  |  |  468|  20.8k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (468:13): [Folded, False: 20.8k]
  |  |  ------------------
  |  |  469|  20.8k|            printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  470|      0|                   t_dim->ctx, chroma, ctx, eob, rc, tok, ts->msac.rng); \
  |  |  471|  20.8k|        if (eob_tok == 2) { \
  |  |  ------------------
  |  |  |  Branch (471:13): [True: 810, False: 20.0k]
  |  |  ------------------
  |  |  472|    810|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  |  |  ------------------
  |  |  |  Branch (472:19): [True: 769, False: 41]
  |  |  |  Branch (472:20): [Folded, False: 810]
  |  |  ------------------
  |  |  473|    810|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|    810|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  474|    810|            level_tok = tok + (3 << 6); \
  |  |  475|    810|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (475:17): [Folded, False: 810]
  |  |  ------------------
  |  |  476|    810|                printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  477|      0|                       imin(t_dim->ctx, 3), chroma, ctx, eob, rc, tok, \
  |  |  478|      0|                       ts->msac.rng); \
  |  |  479|    810|        } \
  |  |  480|  20.8k|        cf[rc] = tok << 11; \
  |  |  481|  20.8k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (481:13): [Folded, False: 20.8k]
  |  |  ------------------
  |  |  482|  20.8k|            level = levels + rc; \
  |  |  483|  20.8k|        else \
  |  |  484|  20.8k|            level = levels + x * stride + y; \
  |  |  485|  20.8k|        *level = (uint8_t) level_tok; \
  |  |  486|   439k|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  |  |  ------------------
  |  |  |  Branch (486:31): [True: 419k, False: 20.8k]
  |  |  ------------------
  |  |  487|   419k|            unsigned rc_i; \
  |  |  488|   419k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (488:17): [Folded, False: 419k]
  |  |  ------------------
  |  |  489|   419k|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  |  |  490|   419k|            else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (490:22): [Folded, False: 419k]
  |  |  ------------------
  |  |  491|   419k|                x = i & mask, y = i >> shift, rc_i = i; \
  |  |  492|   419k|            else /* tx_class == TX_CLASS_V */ \
  |  |  493|   419k|                x = i & mask, y = i >> shift, rc_i = (x << shift2) | y; \
  |  |  494|   419k|            assert(x < 32 && y < 32); \
  |  |  ------------------
  |  |  |  |  140|   838k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:30): [True: 419k, False: 0]
  |  |  |  |  |  Branch (140:30): [True: 419k, False: 0]
  |  |  |  |  |  Branch (140:68): [Folded, False: 419k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  495|   419k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (495:17): [Folded, False: 419k]
  |  |  ------------------
  |  |  496|   419k|                level = levels + rc_i; \
  |  |  497|   419k|            else \
  |  |  498|   419k|                level = levels + x * stride + y; \
  |  |  499|   419k|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  |  |  500|   419k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (500:17): [Folded, False: 419k]
  |  |  ------------------
  |  |  501|   419k|                y |= x; \
  |  |  502|   419k|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|   419k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  503|   419k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (503:17): [Folded, False: 419k]
  |  |  ------------------
  |  |  504|   419k|                printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  505|      0|                       t_dim->ctx, chroma, ctx, i, rc_i, tok, ts->msac.rng); \
  |  |  506|   419k|            if (tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (506:17): [True: 19.8k, False: 399k]
  |  |  ------------------
  |  |  507|  19.8k|                mag &= 63; \
  |  |  508|  19.8k|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  |  |  ------------------
  |  |  |  Branch (508:24): [True: 11.9k, False: 7.93k]
  |  |  ------------------
  |  |  509|  19.8k|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  |  |  ------------------
  |  |  |  Branch (509:24): [True: 2.74k, False: 17.1k]
  |  |  ------------------
  |  |  510|  19.8k|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  19.8k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  511|  19.8k|                if (dbg) \
  |  |  ------------------
  |  |  |  Branch (511:21): [Folded, False: 19.8k]
  |  |  ------------------
  |  |  512|  19.8k|                    printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  |  |  513|      0|                           imin(t_dim->ctx, 3), chroma, ctx, i, rc_i, tok, \
  |  |  514|      0|                           ts->msac.rng); \
  |  |  515|  19.8k|                *level = (uint8_t) (tok + (3 << 6)); \
  |  |  516|  19.8k|                cf[rc_i] = (tok << 11) | rc; \
  |  |  517|  19.8k|                rc = rc_i; \
  |  |  518|   399k|            } else { \
  |  |  519|   399k|                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  |  |  520|   399k|                tok *= 0x17ff41; \
  |  |  521|   399k|                *level = (uint8_t) tok; \
  |  |  522|   399k|                /* tok ? (tok << 11) | rc : 0 */ \
  |  |  523|   399k|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  |  |  524|   399k|                if (tok) rc = rc_i; \
  |  |  ------------------
  |  |  |  Branch (524:21): [True: 105k, False: 293k]
  |  |  ------------------
  |  |  525|   399k|                cf[rc_i] = tok; \
  |  |  526|   399k|            } \
  |  |  527|   419k|        } \
  |  |  528|  20.8k|        /* dc */ \
  |  |  529|  20.8k|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  |  |  ------------------
  |  |  |  Branch (529:15): [Folded, False: 20.8k]
  |  |  ------------------
  |  |  530|  20.8k|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  |  |  531|  20.8k|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  20.8k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  532|  20.8k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (532:13): [Folded, False: 20.8k]
  |  |  ------------------
  |  |  533|  20.8k|            printf("Post-dc_lo_tok[%d][%d][%d][%d]: r=%d\n", \
  |  |  534|      0|                   t_dim->ctx, chroma, ctx, dc_tok, ts->msac.rng); \
  |  |  535|  20.8k|        if (dc_tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (535:13): [True: 2.32k, False: 18.5k]
  |  |  ------------------
  |  |  536|  2.32k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (536:17): [Folded, False: 2.32k]
  |  |  ------------------
  |  |  537|  2.32k|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  |  |  538|      0|                      levels[1 * stride + 1]; \
  |  |  539|  2.32k|            mag &= 63; \
  |  |  540|  2.32k|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  |  |  ------------------
  |  |  |  Branch (540:19): [True: 331, False: 1.99k]
  |  |  ------------------
  |  |  541|  2.32k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  2.32k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  542|  2.32k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (542:17): [Folded, False: 2.32k]
  |  |  ------------------
  |  |  543|  2.32k|                printf("Post-dc_hi_tok[%d][%d][0][%d]: r=%d\n", \
  |  |  544|      0|                       imin(t_dim->ctx, 3), chroma, dc_tok, ts->msac.rng); \
  |  |  545|  2.32k|        } \
  |  |  546|  20.8k|        break
  ------------------
  576|  20.8k|        }
  577|      0|#undef DECODE_COEFS_CLASS
  578|      0|        default: assert(0);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (578:9): [True: 0, False: 1.08M]
  ------------------
  579|  1.08M|        }
  580|  1.08M|    } else { // dc-only
  581|   676k|        int tok_br = dav1d_msac_decode_symbol_adapt4(&ts->msac, eob_cdf[0], 2);
  ------------------
  |  |   47|   676k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  582|   676k|        dc_tok = 1 + tok_br;
  583|   676k|        if (dbg)
  ------------------
  |  Branch (583:13): [Folded, False: 676k]
  ------------------
  584|      0|            printf("Post-dc_lo_tok[%d][%d][%d][%d]: r=%d\n",
  585|      0|                   t_dim->ctx, chroma, 0, dc_tok, ts->msac.rng);
  586|   676k|        if (tok_br == 2) {
  ------------------
  |  Branch (586:13): [True: 45.7k, False: 630k]
  ------------------
  587|  45.7k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[0]);
  ------------------
  |  |   49|  45.7k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  ------------------
  588|  45.7k|            if (dbg)
  ------------------
  |  Branch (588:17): [Folded, False: 45.7k]
  ------------------
  589|      0|                printf("Post-dc_hi_tok[%d][%d][0][%d]: r=%d\n",
  590|      0|                       imin(t_dim->ctx, 3), chroma, dc_tok, ts->msac.rng);
  591|  45.7k|        }
  592|   676k|        rc = 0;
  593|   676k|    }
  594|       |
  595|       |    // residual and sign
  596|  1.76M|    const uint16_t *const dq_tbl = ts->dq[b->seg_id][plane];
  597|  1.76M|    const uint8_t *const qm_tbl = *txtp < IDTX ? f->qm[tx][plane] : NULL;
  ------------------
  |  Branch (597:35): [True: 1.53M, False: 232k]
  ------------------
  598|  1.76M|    const int dq_shift = imax(0, t_dim->ctx - 2);
  599|  1.76M|    const int cf_max = ~(~127U << (BITDEPTH == 8 ? 8 : f->cur.p.bpc));
  ------------------
  |  Branch (599:36): [True: 807k, Folded]
  ------------------
  600|  1.76M|    unsigned cul_level, dc_sign_level;
  601|       |
  602|  1.76M|    if (!dc_tok) {
  ------------------
  |  Branch (602:9): [True: 264k, False: 1.49M]
  ------------------
  603|   264k|        cul_level = 0;
  604|   264k|        dc_sign_level = 1 << 6;
  605|   264k|        if (qm_tbl) goto ac_qm;
  ------------------
  |  Branch (605:13): [True: 79.6k, False: 184k]
  ------------------
  606|   184k|        goto ac_noqm;
  607|   264k|    }
  608|       |
  609|  1.49M|    const int dc_sign_ctx = get_dc_sign_ctx(tx, a, l);
  610|  1.49M|    uint16_t *const dc_sign_cdf = ts->cdf.coef.dc_sign[chroma][dc_sign_ctx];
  611|  1.49M|    const int dc_sign = dav1d_msac_decode_bool_adapt(&ts->msac, dc_sign_cdf);
  ------------------
  |  |   52|  1.49M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  612|  1.49M|    if (dbg)
  ------------------
  |  Branch (612:9): [Folded, False: 1.49M]
  ------------------
  613|      0|        printf("Post-dc_sign[%d][%d][%d]: r=%d\n",
  614|      0|               chroma, dc_sign_ctx, dc_sign, ts->msac.rng);
  615|       |
  616|  1.49M|    int dc_dq = dq_tbl[0];
  617|  1.49M|    dc_sign_level = (dc_sign - 1) & (2 << 6);
  618|       |
  619|  1.49M|    if (qm_tbl) {
  ------------------
  |  Branch (619:9): [True: 389k, False: 1.10M]
  ------------------
  620|   389k|        dc_dq = (dc_dq * qm_tbl[0] + 16) >> 5;
  621|       |
  622|   389k|        if (dc_tok == 15) {
  ------------------
  |  Branch (622:13): [True: 11.5k, False: 377k]
  ------------------
  623|  11.5k|            dc_tok = read_golomb(&ts->msac) + 15;
  624|  11.5k|            if (dbg)
  ------------------
  |  Branch (624:17): [Folded, False: 11.5k]
  ------------------
  625|      0|                printf("Post-dc_residual[%d->%d]: r=%d\n",
  626|      0|                       dc_tok - 15, dc_tok, ts->msac.rng);
  627|       |
  628|  11.5k|            dc_tok &= 0xfffff;
  629|  11.5k|            dc_dq = (dc_dq * dc_tok) & 0xffffff;
  630|   377k|        } else {
  631|   377k|            dc_dq *= dc_tok;
  632|   377k|            assert(dc_dq <= 0xffffff);
  ------------------
  |  |  140|   377k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 377k]
  |  |  |  Branch (140:68): [Folded, False: 377k]
  |  |  ------------------
  ------------------
  633|   377k|        }
  634|   389k|        cul_level = dc_tok;
  635|   389k|        dc_dq >>= dq_shift;
  636|   389k|        dc_dq = umin(dc_dq, cf_max + dc_sign);
  637|   389k|        cf[0] = (coef) (dc_sign ? -dc_dq : dc_dq);
  ------------------
  |  Branch (637:25): [True: 196k, False: 192k]
  ------------------
  638|       |
  639|   575k|        if (rc) ac_qm: {
  ------------------
  |  Branch (639:13): [True: 247k, False: 141k]
  ------------------
  640|   575k|            const unsigned ac_dq = dq_tbl[1];
  641|  4.38M|            do {
  642|  4.38M|                const int sign = dav1d_msac_decode_bool_equi(&ts->msac);
  ------------------
  |  |   53|  4.38M|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  643|  4.38M|                if (dbg)
  ------------------
  |  Branch (643:21): [Folded, False: 4.38M]
  ------------------
  644|      0|                    printf("Post-sign[%d=%d]: r=%d\n", rc, sign, ts->msac.rng);
  645|  4.38M|                const unsigned rc_tok = cf[rc];
  646|  4.38M|                unsigned tok, dq = (ac_dq * qm_tbl[rc] + 16) >> 5;
  647|  4.38M|                int dq_sat;
  648|       |
  649|  4.38M|                if (rc_tok >= (15 << 11)) {
  ------------------
  |  Branch (649:21): [True: 182k, False: 4.20M]
  ------------------
  650|   182k|                    tok = read_golomb(&ts->msac) + 15;
  651|   182k|                    if (dbg)
  ------------------
  |  Branch (651:25): [Folded, False: 182k]
  ------------------
  652|      0|                        printf("Post-residual[%d=%d->%d]: r=%d\n",
  653|      0|                               rc, tok - 15, tok, ts->msac.rng);
  654|       |
  655|   182k|                    tok &= 0xfffff;
  656|   182k|                    dq = (dq * tok) & 0xffffff;
  657|  4.20M|                } else {
  658|  4.20M|                    tok = rc_tok >> 11;
  659|  4.20M|                    dq *= tok;
  660|  4.20M|                    assert(dq <= 0xffffff);
  ------------------
  |  |  140|  4.20M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.20M]
  |  |  |  Branch (140:68): [Folded, False: 4.20M]
  |  |  ------------------
  ------------------
  661|  4.20M|                }
  662|  4.38M|                cul_level += tok;
  663|  4.38M|                dq >>= dq_shift;
  664|  4.38M|                dq_sat = umin(dq, cf_max + sign);
  665|  4.38M|                cf[rc] = (coef) (sign ? -dq_sat : dq_sat);
  ------------------
  |  Branch (665:34): [True: 2.24M, False: 2.14M]
  ------------------
  666|       |
  667|  4.38M|                rc = rc_tok & 0x3ff;
  668|  4.38M|            } while (rc);
  ------------------
  |  Branch (668:22): [True: 4.05M, False: 327k]
  ------------------
  669|   575k|        }
  670|  1.10M|    } else {
  671|       |        // non-qmatrix is the common case and allows for additional optimizations
  672|  1.10M|        if (dc_tok == 15) {
  ------------------
  |  Branch (672:13): [True: 27.2k, False: 1.08M]
  ------------------
  673|  27.2k|            dc_tok = read_golomb(&ts->msac) + 15;
  674|  27.2k|            if (dbg)
  ------------------
  |  Branch (674:17): [Folded, False: 27.2k]
  ------------------
  675|      0|                printf("Post-dc_residual[%d->%d]: r=%d\n",
  676|      0|                       dc_tok - 15, dc_tok, ts->msac.rng);
  677|       |
  678|  27.2k|            dc_tok &= 0xfffff;
  679|  27.2k|            dc_dq = ((dc_dq * dc_tok) & 0xffffff) >> dq_shift;
  680|  27.2k|            dc_dq = umin(dc_dq, cf_max + dc_sign);
  681|  1.08M|        } else {
  682|  1.08M|            dc_dq = ((dc_dq * dc_tok) >> dq_shift);
  683|  1.08M|            assert(dc_dq <= cf_max);
  ------------------
  |  |  140|  1.08M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.08M]
  |  |  |  Branch (140:68): [Folded, False: 1.08M]
  |  |  ------------------
  ------------------
  684|  1.08M|        }
  685|  1.10M|        cul_level = dc_tok;
  686|  1.10M|        cf[0] = (coef) (dc_sign ? -dc_dq : dc_dq);
  ------------------
  |  Branch (686:25): [True: 559k, False: 550k]
  ------------------
  687|       |
  688|  1.33M|        if (rc) ac_noqm: {
  ------------------
  |  Branch (688:13): [True: 574k, False: 535k]
  ------------------
  689|  1.33M|            const unsigned ac_dq = dq_tbl[1];
  690|  6.71M|            do {
  691|  6.71M|                const int sign = dav1d_msac_decode_bool_equi(&ts->msac);
  ------------------
  |  |   53|  6.71M|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  692|  6.71M|                if (dbg)
  ------------------
  |  Branch (692:21): [Folded, False: 6.71M]
  ------------------
  693|      0|                    printf("Post-sign[%d=%d]: r=%d\n", rc, sign, ts->msac.rng);
  694|  6.71M|                const unsigned rc_tok = cf[rc];
  695|  6.71M|                unsigned tok;
  696|  6.71M|                int dq;
  697|       |
  698|       |                // residual
  699|  6.71M|                if (rc_tok >= (15 << 11)) {
  ------------------
  |  Branch (699:21): [True: 104k, False: 6.61M]
  ------------------
  700|   104k|                    tok = read_golomb(&ts->msac) + 15;
  701|   104k|                    if (dbg)
  ------------------
  |  Branch (701:25): [Folded, False: 104k]
  ------------------
  702|      0|                        printf("Post-residual[%d=%d->%d]: r=%d\n",
  703|      0|                               rc, tok - 15, tok, ts->msac.rng);
  704|       |
  705|       |                    // coefficient parsing, see 5.11.39
  706|   104k|                    tok &= 0xfffff;
  707|       |
  708|       |                    // dequant, see 7.12.3
  709|   104k|                    dq = ((ac_dq * tok) & 0xffffff) >> dq_shift;
  710|   104k|                    dq = umin(dq, cf_max + sign);
  711|  6.61M|                } else {
  712|       |                    // cannot exceed cf_max, so we can avoid the clipping
  713|  6.61M|                    tok = rc_tok >> 11;
  714|  6.61M|                    dq = ((ac_dq * tok) >> dq_shift);
  715|  6.61M|                    assert(dq <= cf_max);
  ------------------
  |  |  140|  6.61M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 6.61M]
  |  |  |  Branch (140:68): [Folded, False: 6.61M]
  |  |  ------------------
  ------------------
  716|  6.61M|                }
  717|  6.71M|                cul_level += tok;
  718|  6.71M|                cf[rc] = (coef) (sign ? -dq : dq);
  ------------------
  |  Branch (718:34): [True: 3.39M, False: 3.31M]
  ------------------
  719|       |
  720|  6.71M|                rc = rc_tok & 0x3ff; // next non-zero rc, zero if eob
  721|  6.71M|            } while (rc);
  ------------------
  |  Branch (721:22): [True: 5.95M, False: 759k]
  ------------------
  722|  1.33M|        }
  723|  1.10M|    }
  724|       |
  725|       |    // context
  726|  1.76M|    *res_ctx = umin(cul_level, 63) | dc_sign_level;
  727|       |
  728|  1.76M|    return eob;
  729|  1.49M|}
recon_tmpl.c:get_skip_ctx:
   65|  4.38M|{
   66|  4.38M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
   67|       |
   68|  4.38M|    if (chroma) {
  ------------------
  |  Branch (68:9): [True: 2.57M, False: 1.81M]
  ------------------
   69|  2.57M|        const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
   70|  2.57M|        const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
   71|  2.57M|        const int not_one_blk = b_dim[2] - (!!b_dim[2] && ss_hor) > t_dim->lw ||
  ------------------
  |  Branch (71:33): [True: 435k, False: 2.13M]
  |  Branch (71:45): [True: 2.36M, False: 201k]
  |  Branch (71:59): [True: 204k, False: 2.16M]
  ------------------
   72|  2.13M|                                b_dim[3] - (!!b_dim[3] && ss_ver) > t_dim->lh;
  ------------------
  |  Branch (72:33): [True: 51.3k, False: 2.08M]
  |  Branch (72:45): [True: 1.86M, False: 274k]
  |  Branch (72:59): [True: 153k, False: 1.70M]
  ------------------
   73|  2.57M|        unsigned ca, cl;
   74|       |
   75|  2.57M|#define MERGE_CTX(dir, type, no_val) \
   76|  2.57M|        c##dir = *(const type *) dir != no_val; \
   77|  2.57M|        break
   78|       |
   79|  2.57M|        switch (t_dim->lw) {
   80|       |        /* For some reason the MSVC CRT _wassert() function is not flagged as
   81|       |         * __declspec(noreturn), so when using those headers the compiler will
   82|       |         * expect execution to continue after an assertion has been triggered
   83|       |         * and will therefore complain about the use of uninitialized variables
   84|       |         * when compiled in debug mode if we put the default case at the end. */
   85|      0|        default: assert(0); /* fall-through */
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (85:9): [True: 0, False: 2.57M]
  ------------------
   86|   329k|        case TX_4X4:   MERGE_CTX(a, uint8_t,  0x40);
  ------------------
  |  |   76|   329k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   329k|        break
  ------------------
  |  Branch (86:9): [True: 329k, False: 2.24M]
  ------------------
   87|  1.07M|        case TX_8X8:   MERGE_CTX(a, uint16_t, 0x4040);
  ------------------
  |  |   76|  1.07M|        c##dir = *(const type *) dir != no_val; \
  |  |   77|  1.07M|        break
  ------------------
  |  Branch (87:9): [True: 1.07M, False: 1.49M]
  ------------------
   88|   586k|        case TX_16X16: MERGE_CTX(a, uint32_t, 0x40404040U);
  ------------------
  |  |   76|   586k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   586k|        break
  ------------------
  |  Branch (88:9): [True: 586k, False: 1.98M]
  ------------------
   89|   579k|        case TX_32X32: MERGE_CTX(a, uint64_t, 0x4040404040404040ULL);
  ------------------
  |  |   76|   579k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   579k|        break
  ------------------
  |  Branch (89:9): [True: 579k, False: 1.99M]
  ------------------
   90|  2.57M|        }
   91|  2.57M|        switch (t_dim->lh) {
   92|      0|        default: assert(0); /* fall-through */
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (92:9): [True: 0, False: 2.57M]
  ------------------
   93|   424k|        case TX_4X4:   MERGE_CTX(l, uint8_t,  0x40);
  ------------------
  |  |   76|   424k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   424k|        break
  ------------------
  |  Branch (93:9): [True: 424k, False: 2.14M]
  ------------------
   94|  1.10M|        case TX_8X8:   MERGE_CTX(l, uint16_t, 0x4040);
  ------------------
  |  |   76|  1.10M|        c##dir = *(const type *) dir != no_val; \
  |  |   77|  1.10M|        break
  ------------------
  |  Branch (94:9): [True: 1.10M, False: 1.46M]
  ------------------
   95|   486k|        case TX_16X16: MERGE_CTX(l, uint32_t, 0x40404040U);
  ------------------
  |  |   76|   486k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   486k|        break
  ------------------
  |  Branch (95:9): [True: 486k, False: 2.08M]
  ------------------
   96|   556k|        case TX_32X32: MERGE_CTX(l, uint64_t, 0x4040404040404040ULL);
  ------------------
  |  |   76|   556k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   556k|        break
  ------------------
  |  Branch (96:9): [True: 556k, False: 2.01M]
  ------------------
   97|  2.57M|        }
   98|  2.57M|#undef MERGE_CTX
   99|       |
  100|  2.57M|        return 7 + not_one_blk * 3 + ca + cl;
  101|  2.57M|    } else if (b_dim[2] == t_dim->lw && b_dim[3] == t_dim->lh) {
  ------------------
  |  Branch (101:16): [True: 1.13M, False: 685k]
  |  Branch (101:41): [True: 1.06M, False: 64.3k]
  ------------------
  102|  1.06M|        return 0;
  103|  1.06M|    } else {
  104|   749k|        unsigned la, ll;
  105|       |
  106|   749k|#define MERGE_CTX(dir, type, tx) \
  107|   749k|        if (tx == TX_64X64) { \
  108|   749k|            uint64_t tmp = *(const uint64_t *) dir; \
  109|   749k|            tmp |= *(const uint64_t *) &dir[8]; \
  110|   749k|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  111|   749k|        } else \
  112|   749k|            l##dir = *(const type *) dir; \
  113|   749k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  114|   749k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  115|   749k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  116|   749k|        break
  117|       |
  118|   749k|        switch (t_dim->lw) {
  119|      0|        default: assert(0); /* fall-through */
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 0, False: 749k]
  ------------------
  120|   284k|        case TX_4X4:   MERGE_CTX(a, uint8_t,  TX_4X4);
  ------------------
  |  |  107|   284k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 284k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|   284k|            l##dir = *(const type *) dir; \
  |  |  113|   284k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 284k]
  |  |  ------------------
  |  |  114|   284k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 284k]
  |  |  ------------------
  |  |  115|   284k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [Folded, False: 284k]
  |  |  ------------------
  |  |  116|   284k|        break
  ------------------
  |  Branch (120:9): [True: 284k, False: 465k]
  ------------------
  121|   267k|        case TX_8X8:   MERGE_CTX(a, uint16_t, TX_8X8);
  ------------------
  |  |  107|   267k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 267k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|   267k|            l##dir = *(const type *) dir; \
  |  |  113|   267k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 267k]
  |  |  ------------------
  |  |  114|   267k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 267k]
  |  |  ------------------
  |  |  115|   267k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 267k, Folded]
  |  |  ------------------
  |  |  116|   267k|        break
  ------------------
  |  Branch (121:9): [True: 267k, False: 482k]
  ------------------
  122|   128k|        case TX_16X16: MERGE_CTX(a, uint32_t, TX_16X16);
  ------------------
  |  |  107|   128k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 128k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|   128k|            l##dir = *(const type *) dir; \
  |  |  113|   128k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 128k]
  |  |  ------------------
  |  |  114|   128k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 128k, Folded]
  |  |  ------------------
  |  |  115|   128k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 128k, Folded]
  |  |  ------------------
  |  |  116|   128k|        break
  ------------------
  |  Branch (122:9): [True: 128k, False: 621k]
  ------------------
  123|  10.8k|        case TX_32X32: MERGE_CTX(a, uint32_t, TX_32X32);
  ------------------
  |  |  107|  10.8k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 10.8k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|  10.8k|            l##dir = *(const type *) dir; \
  |  |  113|  10.8k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [True: 10.8k, Folded]
  |  |  ------------------
  |  |  114|  10.8k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 10.8k, Folded]
  |  |  ------------------
  |  |  115|  10.8k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 10.8k, Folded]
  |  |  ------------------
  |  |  116|  10.8k|        break
  ------------------
  |  Branch (123:9): [True: 10.8k, False: 739k]
  ------------------
  124|  59.4k|        case TX_64X64: MERGE_CTX(a, uint32_t, TX_64X64);
  ------------------
  |  |  107|  59.4k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [True: 59.4k, Folded]
  |  |  ------------------
  |  |  108|  59.4k|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|  59.4k|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|  59.4k|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|  59.4k|        } else \
  |  |  112|  59.4k|            l##dir = *(const type *) dir; \
  |  |  113|  59.4k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 59.4k]
  |  |  ------------------
  |  |  114|  59.4k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 59.4k, Folded]
  |  |  ------------------
  |  |  115|  59.4k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 59.4k, Folded]
  |  |  ------------------
  |  |  116|  59.4k|        break
  ------------------
  |  Branch (124:9): [True: 59.4k, False: 690k]
  ------------------
  125|   749k|        }
  126|   749k|        switch (t_dim->lh) {
  127|      0|        default: assert(0); /* fall-through */
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (127:9): [True: 0, False: 749k]
  ------------------
  128|   293k|        case TX_4X4:   MERGE_CTX(l, uint8_t,  TX_4X4);
  ------------------
  |  |  107|   293k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 293k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|   293k|            l##dir = *(const type *) dir; \
  |  |  113|   293k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 293k]
  |  |  ------------------
  |  |  114|   293k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 293k]
  |  |  ------------------
  |  |  115|   293k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [Folded, False: 293k]
  |  |  ------------------
  |  |  116|   293k|        break
  ------------------
  |  Branch (128:9): [True: 293k, False: 456k]
  ------------------
  129|   258k|        case TX_8X8:   MERGE_CTX(l, uint16_t, TX_8X8);
  ------------------
  |  |  107|   258k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 258k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|   258k|            l##dir = *(const type *) dir; \
  |  |  113|   258k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 258k]
  |  |  ------------------
  |  |  114|   258k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 258k]
  |  |  ------------------
  |  |  115|   258k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 258k, Folded]
  |  |  ------------------
  |  |  116|   258k|        break
  ------------------
  |  Branch (129:9): [True: 258k, False: 491k]
  ------------------
  130|   127k|        case TX_16X16: MERGE_CTX(l, uint32_t, TX_16X16);
  ------------------
  |  |  107|   127k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 127k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|   127k|            l##dir = *(const type *) dir; \
  |  |  113|   127k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 127k]
  |  |  ------------------
  |  |  114|   127k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 127k, Folded]
  |  |  ------------------
  |  |  115|   127k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 127k, Folded]
  |  |  ------------------
  |  |  116|   127k|        break
  ------------------
  |  Branch (130:9): [True: 127k, False: 622k]
  ------------------
  131|  10.8k|        case TX_32X32: MERGE_CTX(l, uint32_t, TX_32X32);
  ------------------
  |  |  107|  10.8k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 10.8k]
  |  |  ------------------
  |  |  108|      0|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|      0|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|      0|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|      0|        } else \
  |  |  112|  10.8k|            l##dir = *(const type *) dir; \
  |  |  113|  10.8k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [True: 10.8k, Folded]
  |  |  ------------------
  |  |  114|  10.8k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 10.8k, Folded]
  |  |  ------------------
  |  |  115|  10.8k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 10.8k, Folded]
  |  |  ------------------
  |  |  116|  10.8k|        break
  ------------------
  |  Branch (131:9): [True: 10.8k, False: 739k]
  ------------------
  132|  59.4k|        case TX_64X64: MERGE_CTX(l, uint32_t, TX_64X64);
  ------------------
  |  |  107|  59.4k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [True: 59.4k, Folded]
  |  |  ------------------
  |  |  108|  59.4k|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|  59.4k|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|  59.4k|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|  59.4k|        } else \
  |  |  112|  59.4k|            l##dir = *(const type *) dir; \
  |  |  113|  59.4k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 59.4k]
  |  |  ------------------
  |  |  114|  59.4k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 59.4k, Folded]
  |  |  ------------------
  |  |  115|  59.4k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 59.4k, Folded]
  |  |  ------------------
  |  |  116|  59.4k|        break
  ------------------
  |  Branch (132:9): [True: 59.4k, False: 690k]
  ------------------
  133|   749k|        }
  134|   749k|#undef MERGE_CTX
  135|       |
  136|   749k|        return dav1d_skip_ctx[umin(la & 0x3F, 4)][umin(ll & 0x3F, 4)];
  137|   749k|    }
  138|  4.38M|}
recon_tmpl.c:get_lo_ctx:
  304|  30.0M|{
  305|  30.0M|    unsigned mag = levels[0 * stride + 1] + levels[1 * stride + 0];
  306|  30.0M|    unsigned offset;
  307|  30.0M|    if (tx_class == TX_CLASS_2D) {
  ------------------
  |  Branch (307:9): [True: 28.7M, False: 1.24M]
  ------------------
  308|  28.7M|        mag += levels[1 * stride + 1];
  309|  28.7M|        *hi_mag = mag;
  310|  28.7M|        mag += levels[0 * stride + 2] + levels[2 * stride + 0];
  311|  28.7M|        offset = ctx_offsets[umin(y, 4)][umin(x, 4)];
  312|  28.7M|    } else {
  313|  1.24M|        mag += levels[0 * stride + 2];
  314|  1.24M|        *hi_mag = mag;
  315|  1.24M|        mag += levels[0 * stride + 3] + levels[0 * stride + 4];
  316|  1.24M|        offset = 26 + (y > 1 ? 10 : y * 5);
  ------------------
  |  Branch (316:24): [True: 596k, False: 647k]
  ------------------
  317|  1.24M|    }
  318|  30.0M|    return offset + (mag > 512 ? 4 : (mag + 64) >> 7);
  ------------------
  |  Branch (318:22): [True: 2.03M, False: 28.0M]
  ------------------
  319|  30.0M|}
recon_tmpl.c:get_dc_sign_ctx:
  143|  1.49M|{
  144|  1.49M|    uint64_t mask = 0xC0C0C0C0C0C0C0C0ULL, mul = 0x0101010101010101ULL;
  145|  1.49M|    int s;
  146|       |
  147|  1.49M|#if ARCH_X86_64 && defined(__GNUC__)
  148|       |    /* Coerce compilers into producing better code. For some reason
  149|       |     * every x86-64 compiler is awful at handling 64-bit constants. */
  150|  1.49M|    __asm__("" : "+r"(mask), "+r"(mul));
  151|  1.49M|#endif
  152|       |
  153|  1.49M|    switch(tx) {
  154|      0|    default: assert(0); /* fall-through */
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, Folded]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (154:5): [True: 0, False: 1.49M]
  ------------------
  155|   219k|    case TX_4X4: {
  ------------------
  |  Branch (155:5): [True: 219k, False: 1.27M]
  ------------------
  156|   219k|        int t = *(const uint8_t *) a >> 6;
  157|   219k|        t    += *(const uint8_t *) l >> 6;
  158|   219k|        s = t - 1 - 1;
  159|   219k|        break;
  160|      0|    }
  161|   457k|    case TX_8X8: {
  ------------------
  |  Branch (161:5): [True: 457k, False: 1.04M]
  ------------------
  162|   457k|        uint32_t t = *(const uint16_t *) a & (uint32_t) mask;
  163|   457k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  164|   457k|        t *= 0x04040404U;
  165|   457k|        s = (int) (t >> 24) - 2 - 2;
  166|   457k|        break;
  167|      0|    }
  168|   204k|    case TX_16X16: {
  ------------------
  |  Branch (168:5): [True: 204k, False: 1.29M]
  ------------------
  169|   204k|        uint32_t t = (*(const uint32_t *) a & (uint32_t) mask) >> 6;
  170|   204k|        t         += (*(const uint32_t *) l & (uint32_t) mask) >> 6;
  171|   204k|        t *= (uint32_t) mul;
  172|   204k|        s = (int) (t >> 24) - 4 - 4;
  173|   204k|        break;
  174|      0|    }
  175|   109k|    case TX_32X32: {
  ------------------
  |  Branch (175:5): [True: 109k, False: 1.38M]
  ------------------
  176|   109k|        uint64_t t = (*(const uint64_t *) a & mask) >> 6;
  177|   109k|        t         += (*(const uint64_t *) l & mask) >> 6;
  178|   109k|        t *= mul;
  179|   109k|        s = (int) (t >> 56) - 8 - 8;
  180|   109k|        break;
  181|      0|    }
  182|  32.0k|    case TX_64X64: {
  ------------------
  |  Branch (182:5): [True: 32.0k, False: 1.46M]
  ------------------
  183|  32.0k|        uint64_t t = (*(const uint64_t *) &a[0] & mask) >> 6;
  184|  32.0k|        t         += (*(const uint64_t *) &a[8] & mask) >> 6;
  185|  32.0k|        t         += (*(const uint64_t *) &l[0] & mask) >> 6;
  186|  32.0k|        t         += (*(const uint64_t *) &l[8] & mask) >> 6;
  187|  32.0k|        t *= mul;
  188|  32.0k|        s = (int) (t >> 56) - 16 - 16;
  189|  32.0k|        break;
  190|      0|    }
  191|  51.0k|    case RTX_4X8: {
  ------------------
  |  Branch (191:5): [True: 51.0k, False: 1.44M]
  ------------------
  192|  51.0k|        uint32_t t = *(const uint8_t  *) a & (uint32_t) mask;
  193|  51.0k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  194|  51.0k|        t *= 0x04040404U;
  195|  51.0k|        s = (int) (t >> 24) - 1 - 2;
  196|  51.0k|        break;
  197|      0|    }
  198|  74.1k|    case RTX_8X4: {
  ------------------
  |  Branch (198:5): [True: 74.1k, False: 1.42M]
  ------------------
  199|  74.1k|        uint32_t t = *(const uint16_t *) a & (uint32_t) mask;
  200|  74.1k|        t         += *(const uint8_t  *) l & (uint32_t) mask;
  201|  74.1k|        t *= 0x04040404U;
  202|  74.1k|        s = (int) (t >> 24) - 2 - 1;
  203|  74.1k|        break;
  204|      0|    }
  205|  48.4k|    case RTX_8X16: {
  ------------------
  |  Branch (205:5): [True: 48.4k, False: 1.45M]
  ------------------
  206|  48.4k|        uint32_t t = *(const uint16_t *) a & (uint32_t) mask;
  207|  48.4k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  208|  48.4k|        t = (t >> 6) * (uint32_t) mul;
  209|  48.4k|        s = (int) (t >> 24) - 2 - 4;
  210|  48.4k|        break;
  211|      0|    }
  212|  91.7k|    case RTX_16X8: {
  ------------------
  |  Branch (212:5): [True: 91.7k, False: 1.40M]
  ------------------
  213|  91.7k|        uint32_t t = *(const uint32_t *) a & (uint32_t) mask;
  214|  91.7k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  215|  91.7k|        t = (t >> 6) * (uint32_t) mul;
  216|  91.7k|        s = (int) (t >> 24) - 4 - 2;
  217|  91.7k|        break;
  218|      0|    }
  219|  23.7k|    case RTX_16X32: {
  ------------------
  |  Branch (219:5): [True: 23.7k, False: 1.47M]
  ------------------
  220|  23.7k|        uint64_t t = *(const uint32_t *) a & (uint32_t) mask;
  221|  23.7k|        t         += *(const uint64_t *) l & mask;
  222|  23.7k|        t = (t >> 6) * mul;
  223|  23.7k|        s = (int) (t >> 56) - 4 - 8;
  224|  23.7k|        break;
  225|      0|    }
  226|  33.6k|    case RTX_32X16: {
  ------------------
  |  Branch (226:5): [True: 33.6k, False: 1.46M]
  ------------------
  227|  33.6k|        uint64_t t = *(const uint64_t *) a & mask;
  228|  33.6k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  229|  33.6k|        t = (t >> 6) * mul;
  230|  33.6k|        s = (int) (t >> 56) - 8 - 4;
  231|  33.6k|        break;
  232|      0|    }
  233|  5.17k|    case RTX_32X64: {
  ------------------
  |  Branch (233:5): [True: 5.17k, False: 1.49M]
  ------------------
  234|  5.17k|        uint64_t t = (*(const uint64_t *) &a[0] & mask) >> 6;
  235|  5.17k|        t         += (*(const uint64_t *) &l[0] & mask) >> 6;
  236|  5.17k|        t         += (*(const uint64_t *) &l[8] & mask) >> 6;
  237|  5.17k|        t *= mul;
  238|  5.17k|        s = (int) (t >> 56) - 8 - 16;
  239|  5.17k|        break;
  240|      0|    }
  241|  10.1k|    case RTX_64X32: {
  ------------------
  |  Branch (241:5): [True: 10.1k, False: 1.48M]
  ------------------
  242|  10.1k|        uint64_t t = (*(const uint64_t *) &a[0] & mask) >> 6;
  243|  10.1k|        t         += (*(const uint64_t *) &a[8] & mask) >> 6;
  244|  10.1k|        t         += (*(const uint64_t *) &l[0] & mask) >> 6;
  245|  10.1k|        t *= mul;
  246|  10.1k|        s = (int) (t >> 56) - 16 - 8;
  247|  10.1k|        break;
  248|      0|    }
  249|  26.1k|    case RTX_4X16: {
  ------------------
  |  Branch (249:5): [True: 26.1k, False: 1.47M]
  ------------------
  250|  26.1k|        uint32_t t = *(const uint8_t  *) a & (uint32_t) mask;
  251|  26.1k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  252|  26.1k|        t = (t >> 6) * (uint32_t) mul;
  253|  26.1k|        s = (int) (t >> 24) - 1 - 4;
  254|  26.1k|        break;
  255|      0|    }
  256|  58.2k|    case RTX_16X4: {
  ------------------
  |  Branch (256:5): [True: 58.2k, False: 1.44M]
  ------------------
  257|  58.2k|        uint32_t t = *(const uint32_t *) a & (uint32_t) mask;
  258|  58.2k|        t         += *(const uint8_t  *) l & (uint32_t) mask;
  259|  58.2k|        t = (t >> 6) * (uint32_t) mul;
  260|  58.2k|        s = (int) (t >> 24) - 4 - 1;
  261|  58.2k|        break;
  262|      0|    }
  263|  20.1k|    case RTX_8X32: {
  ------------------
  |  Branch (263:5): [True: 20.1k, False: 1.47M]
  ------------------
  264|  20.1k|        uint64_t t = *(const uint16_t *) a & (uint32_t) mask;
  265|  20.1k|        t         += *(const uint64_t *) l & mask;
  266|  20.1k|        t = (t >> 6) * mul;
  267|  20.1k|        s = (int) (t >> 56) - 2 - 8;
  268|  20.1k|        break;
  269|      0|    }
  270|  26.1k|    case RTX_32X8: {
  ------------------
  |  Branch (270:5): [True: 26.1k, False: 1.47M]
  ------------------
  271|  26.1k|        uint64_t t = *(const uint64_t *) a & mask;
  272|  26.1k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  273|  26.1k|        t = (t >> 6) * mul;
  274|  26.1k|        s = (int) (t >> 56) - 8 - 2;
  275|  26.1k|        break;
  276|      0|    }
  277|  3.98k|    case RTX_16X64: {
  ------------------
  |  Branch (277:5): [True: 3.98k, False: 1.49M]
  ------------------
  278|  3.98k|        uint64_t t = *(const uint32_t *) a & (uint32_t) mask;
  279|  3.98k|        t         += *(const uint64_t *) &l[0] & mask;
  280|  3.98k|        t = (t >> 6) + ((*(const uint64_t *) &l[8] & mask) >> 6);
  281|  3.98k|        t *= mul;
  282|  3.98k|        s = (int) (t >> 56) - 4 - 16;
  283|  3.98k|        break;
  284|      0|    }
  285|  2.98k|    case RTX_64X16: {
  ------------------
  |  Branch (285:5): [True: 2.98k, False: 1.49M]
  ------------------
  286|  2.98k|        uint64_t t = *(const uint64_t *) &a[0] & mask;
  287|  2.98k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  288|  2.98k|        t = (t >> 6) + ((*(const uint64_t *) &a[8] & mask) >> 6);
  289|  2.98k|        t *= mul;
  290|  2.98k|        s = (int) (t >> 56) - 16 - 4;
  291|  2.98k|        break;
  292|      0|    }
  293|  1.49M|    }
  294|       |
  295|  1.49M|    return (s != 0) + (s > 0);
  296|  1.49M|}
recon_tmpl.c:read_golomb:
   49|   325k|static inline unsigned read_golomb(MsacContext *const msac) {
   50|   325k|    int len = 0;
   51|   325k|    unsigned val = 1;
   52|       |
   53|   575k|    while (!dav1d_msac_decode_bool_equi(msac) && len < 32) len++;
  ------------------
  |  |   53|   575k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (53:12): [True: 249k, False: 325k]
  |  Branch (53:50): [True: 249k, False: 1]
  ------------------
   54|   575k|    while (len--) val = (val << 1) + dav1d_msac_decode_bool_equi(msac);
  ------------------
  |  |   53|   249k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (54:12): [True: 249k, False: 325k]
  ------------------
   55|       |
   56|   325k|    return val - 1;
   57|   325k|}
recon_tmpl.c:mc:
  944|   567k|{
  945|   567k|    assert((dst8 != NULL) ^ (dst16 != NULL));
  ------------------
  |  |  140|   567k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 567k]
  |  |  |  Branch (140:68): [Folded, False: 567k]
  |  |  ------------------
  ------------------
  946|   567k|    const Dav1dFrameContext *const f = t->f;
  947|   567k|    const int ss_ver = !!pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (947:24): [True: 298k, False: 268k]
  |  Branch (947:32): [True: 87.3k, False: 211k]
  ------------------
  948|   567k|    const int ss_hor = !!pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (948:24): [True: 298k, False: 268k]
  |  Branch (948:32): [True: 88.4k, False: 210k]
  ------------------
  949|   567k|    const int h_mul = 4 >> ss_hor, v_mul = 4 >> ss_ver;
  950|   567k|    const int mvx = mv.x, mvy = mv.y;
  951|   567k|    const int mx = mvx & (15 >> !ss_hor), my = mvy & (15 >> !ss_ver);
  952|   567k|    ptrdiff_t ref_stride = refp->p.stride[!!pl];
  953|   567k|    const pixel *ref;
  954|       |
  955|   567k|    if (refp->p.p.w == f->cur.p.w && refp->p.p.h == f->cur.p.h) {
  ------------------
  |  Branch (955:9): [True: 529k, False: 37.9k]
  |  Branch (955:38): [True: 527k, False: 1.26k]
  ------------------
  956|   527k|        const int dx = bx * h_mul + (mvx >> (3 + ss_hor));
  957|   527k|        const int dy = by * v_mul + (mvy >> (3 + ss_ver));
  958|   527k|        int w, h;
  959|       |
  960|   527k|        if (refp->p.data[0] != f->cur.data[0]) { // i.e. not for intrabc
  ------------------
  |  Branch (960:13): [True: 116k, False: 411k]
  ------------------
  961|   116k|            w = (f->cur.p.w + ss_hor) >> ss_hor;
  962|   116k|            h = (f->cur.p.h + ss_ver) >> ss_ver;
  963|   411k|        } else {
  964|   411k|            w = f->bw * 4 >> ss_hor;
  965|   411k|            h = f->bh * 4 >> ss_ver;
  966|   411k|        }
  967|   527k|        if (dx < !!mx * 3 || dy < !!my * 3 ||
  ------------------
  |  Branch (967:13): [True: 10.5k, False: 517k]
  |  Branch (967:30): [True: 8.88k, False: 508k]
  ------------------
  968|   508k|            dx + bw4 * h_mul + !!mx * 4 > w ||
  ------------------
  |  Branch (968:13): [True: 26.1k, False: 482k]
  ------------------
  969|   482k|            dy + bh4 * v_mul + !!my * 4 > h)
  ------------------
  |  Branch (969:13): [True: 73.2k, False: 409k]
  ------------------
  970|   118k|        {
  971|   118k|            pixel *const emu_edge_buf = bitfn(t->scratch.emu_edge);
  ------------------
  |  |   51|   118k|#define bitfn(x) x##_8bpc
  ------------------
  972|   118k|            f->dsp->mc.emu_edge(bw4 * h_mul + !!mx * 7, bh4 * v_mul + !!my * 7,
  973|   118k|                                w, h, dx - !!mx * 3, dy - !!my * 3,
  974|   118k|                                emu_edge_buf, 192 * sizeof(pixel),
  975|   118k|                                refp->p.data[pl], ref_stride);
  976|   118k|            ref = &emu_edge_buf[192 * !!my * 3 + !!mx * 3];
  977|   118k|            ref_stride = 192 * sizeof(pixel);
  978|   409k|        } else {
  979|   409k|            ref = ((pixel *) refp->p.data[pl]) + PXSTRIDE(ref_stride) * dy + dx;
  ------------------
  |  |   53|   409k|#define PXSTRIDE(x) (x)
  ------------------
  980|   409k|        }
  981|       |
  982|   527k|        if (dst8 != NULL) {
  ------------------
  |  Branch (982:13): [True: 501k, False: 25.9k]
  ------------------
  983|   501k|            f->dsp->mc.mc[filter_2d](dst8, dst_stride, ref, ref_stride, bw4 * h_mul,
  984|   501k|                                     bh4 * v_mul, mx << !ss_hor, my << !ss_ver
  985|   501k|                                     HIGHBD_CALL_SUFFIX);
  986|   501k|        } else {
  987|  25.9k|            f->dsp->mc.mct[filter_2d](dst16, ref, ref_stride, bw4 * h_mul,
  988|  25.9k|                                      bh4 * v_mul, mx << !ss_hor, my << !ss_ver
  989|  25.9k|                                      HIGHBD_CALL_SUFFIX);
  990|  25.9k|        }
  991|   527k|    } else {
  992|  39.2k|        assert(refp != &f->sr_cur);
  ------------------
  |  |  140|  39.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 39.2k]
  |  |  |  Branch (140:68): [Folded, False: 39.2k]
  |  |  ------------------
  ------------------
  993|       |
  994|  39.2k|        const int orig_pos_y = (by * v_mul << 4) + mvy * (1 << !ss_ver);
  995|  39.2k|        const int orig_pos_x = (bx * h_mul << 4) + mvx * (1 << !ss_hor);
  996|  39.2k|#define scale_mv(res, val, scale) do { \
  997|  39.2k|            const int64_t tmp = (int64_t)(val) * scale + (scale - 0x4000) * 8; \
  998|  39.2k|            res = apply_sign64((int) ((llabs(tmp) + 128) >> 8), tmp) + 32;     \
  999|  39.2k|        } while (0)
 1000|  39.2k|        int pos_y, pos_x;
 1001|  39.2k|        scale_mv(pos_x, orig_pos_x, f->svc[refidx][0].scale);
  ------------------
  |  |  996|  39.2k|#define scale_mv(res, val, scale) do { \
  |  |  997|  39.2k|            const int64_t tmp = (int64_t)(val) * scale + (scale - 0x4000) * 8; \
  |  |  998|  39.2k|            res = apply_sign64((int) ((llabs(tmp) + 128) >> 8), tmp) + 32;     \
  |  |  999|  39.2k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (999:18): [Folded, False: 39.2k]
  |  |  ------------------
  ------------------
 1002|  39.2k|        scale_mv(pos_y, orig_pos_y, f->svc[refidx][1].scale);
  ------------------
  |  |  996|  39.2k|#define scale_mv(res, val, scale) do { \
  |  |  997|  39.2k|            const int64_t tmp = (int64_t)(val) * scale + (scale - 0x4000) * 8; \
  |  |  998|  39.2k|            res = apply_sign64((int) ((llabs(tmp) + 128) >> 8), tmp) + 32;     \
  |  |  999|  39.2k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (999:18): [Folded, False: 39.2k]
  |  |  ------------------
  ------------------
 1003|  39.2k|#undef scale_mv
 1004|  39.2k|        const int left = pos_x >> 10;
 1005|  39.2k|        const int top = pos_y >> 10;
 1006|  39.2k|        const int right =
 1007|  39.2k|            ((pos_x + (bw4 * h_mul - 1) * f->svc[refidx][0].step) >> 10) + 1;
 1008|  39.2k|        const int bottom =
 1009|  39.2k|            ((pos_y + (bh4 * v_mul - 1) * f->svc[refidx][1].step) >> 10) + 1;
 1010|       |
 1011|  39.2k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  39.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 39.2k]
  |  |  ------------------
  |  |   35|  39.2k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  39.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1012|      0|            printf("Off %dx%d [%d,%d,%d], size %dx%d [%d,%d]\n",
 1013|      0|                   left, top, orig_pos_x, f->svc[refidx][0].scale, refidx,
 1014|      0|                   right-left, bottom-top,
 1015|      0|                   f->svc[refidx][0].step, f->svc[refidx][1].step);
 1016|       |
 1017|  39.2k|        const int w = (refp->p.p.w + ss_hor) >> ss_hor;
 1018|  39.2k|        const int h = (refp->p.p.h + ss_ver) >> ss_ver;
 1019|  39.2k|        if (left < 3 || top < 3 || right + 4 > w || bottom + 4 > h) {
  ------------------
  |  Branch (1019:13): [True: 7.48k, False: 31.7k]
  |  Branch (1019:25): [True: 4.07k, False: 27.6k]
  |  Branch (1019:36): [True: 3.22k, False: 24.4k]
  |  Branch (1019:53): [True: 6.64k, False: 17.7k]
  ------------------
 1020|  21.4k|            pixel *const emu_edge_buf = bitfn(t->scratch.emu_edge);
  ------------------
  |  |   51|  21.4k|#define bitfn(x) x##_8bpc
  ------------------
 1021|  21.4k|            f->dsp->mc.emu_edge(right - left + 7, bottom - top + 7,
 1022|  21.4k|                                w, h, left - 3, top - 3,
 1023|  21.4k|                                emu_edge_buf, 320 * sizeof(pixel),
 1024|  21.4k|                                refp->p.data[pl], ref_stride);
 1025|  21.4k|            ref = &emu_edge_buf[320 * 3 + 3];
 1026|  21.4k|            ref_stride = 320 * sizeof(pixel);
 1027|  21.4k|            if (DEBUG_BLOCK_INFO) printf("Emu\n");
  ------------------
  |  |   34|  21.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 21.4k]
  |  |  ------------------
  |  |   35|  21.4k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  21.4k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1028|  21.4k|        } else {
 1029|  17.7k|            ref = ((pixel *) refp->p.data[pl]) + PXSTRIDE(ref_stride) * top + left;
  ------------------
  |  |   53|  17.7k|#define PXSTRIDE(x) (x)
  ------------------
 1030|  17.7k|        }
 1031|       |
 1032|  39.2k|        if (dst8 != NULL) {
  ------------------
  |  Branch (1032:13): [True: 26.9k, False: 12.2k]
  ------------------
 1033|  26.9k|            f->dsp->mc.mc_scaled[filter_2d](dst8, dst_stride, ref, ref_stride,
 1034|  26.9k|                                            bw4 * h_mul, bh4 * v_mul,
 1035|  26.9k|                                            pos_x & 0x3ff, pos_y & 0x3ff,
 1036|  26.9k|                                            f->svc[refidx][0].step,
 1037|  26.9k|                                            f->svc[refidx][1].step
 1038|  26.9k|                                            HIGHBD_CALL_SUFFIX);
 1039|  26.9k|        } else {
 1040|  12.2k|            f->dsp->mc.mct_scaled[filter_2d](dst16, ref, ref_stride,
 1041|  12.2k|                                             bw4 * h_mul, bh4 * v_mul,
 1042|  12.2k|                                             pos_x & 0x3ff, pos_y & 0x3ff,
 1043|  12.2k|                                             f->svc[refidx][0].step,
 1044|  12.2k|                                             f->svc[refidx][1].step
 1045|  12.2k|                                             HIGHBD_CALL_SUFFIX);
 1046|  12.2k|        }
 1047|  39.2k|    }
 1048|       |
 1049|   567k|    return 0;
 1050|   567k|}
recon_tmpl.c:warp_affine:
 1120|  7.80k|{
 1121|  7.80k|    assert((dst8 != NULL) ^ (dst16 != NULL));
  ------------------
  |  |  140|  7.80k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 7.80k]
  |  |  |  Branch (140:68): [Folded, False: 7.80k]
  |  |  ------------------
  ------------------
 1122|  7.80k|    const Dav1dFrameContext *const f = t->f;
 1123|  7.80k|    const Dav1dDSPContext *const dsp = f->dsp;
 1124|  7.80k|    const int ss_ver = !!pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (1124:24): [True: 2.25k, False: 5.55k]
  |  Branch (1124:32): [True: 1.45k, False: 796]
  ------------------
 1125|  7.80k|    const int ss_hor = !!pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (1125:24): [True: 2.25k, False: 5.55k]
  |  Branch (1125:32): [True: 1.45k, False: 796]
  ------------------
 1126|  7.80k|    const int h_mul = 4 >> ss_hor, v_mul = 4 >> ss_ver;
 1127|  7.80k|    assert(!((b_dim[0] * h_mul) & 7) && !((b_dim[1] * v_mul) & 7));
  ------------------
  |  |  140|  15.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 7.80k, False: 0]
  |  |  |  Branch (140:30): [True: 7.80k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 7.80k]
  |  |  ------------------
  ------------------
 1128|  7.80k|    const int32_t *const mat = wmp->matrix;
 1129|  7.80k|    const int width = (refp->p.p.w + ss_hor) >> ss_hor;
 1130|  7.80k|    const int height = (refp->p.p.h + ss_ver) >> ss_ver;
 1131|       |
 1132|  31.9k|    for (int y = 0; y < b_dim[1] * v_mul; y += 8) {
  ------------------
  |  Branch (1132:21): [True: 24.1k, False: 7.80k]
  ------------------
 1133|  24.1k|        const int src_y = t->by * 4 + ((y + 4) << ss_ver);
 1134|  24.1k|        const int64_t mat3_y = (int64_t) mat[3] * src_y + mat[0];
 1135|  24.1k|        const int64_t mat5_y = (int64_t) mat[5] * src_y + mat[1];
 1136|  97.2k|        for (int x = 0; x < b_dim[0] * h_mul; x += 8) {
  ------------------
  |  Branch (1136:25): [True: 73.1k, False: 24.1k]
  ------------------
 1137|       |            // calculate transformation relative to center of 8x8 block in
 1138|       |            // luma pixel units
 1139|  73.1k|            const int src_x = t->bx * 4 + ((x + 4) << ss_hor);
 1140|  73.1k|            const int64_t mvx = ((int64_t) mat[2] * src_x + mat3_y) >> ss_hor;
 1141|  73.1k|            const int64_t mvy = ((int64_t) mat[4] * src_x + mat5_y) >> ss_ver;
 1142|       |
 1143|  73.1k|            const int dx = (int) (mvx >> 16) - 4;
 1144|  73.1k|            const int mx = (((int) mvx & 0xffff) - wmp->u.p.alpha * 4 -
 1145|  73.1k|                                                   wmp->u.p.beta  * 7) & ~0x3f;
 1146|  73.1k|            const int dy = (int) (mvy >> 16) - 4;
 1147|  73.1k|            const int my = (((int) mvy & 0xffff) - wmp->u.p.gamma * 4 -
 1148|  73.1k|                                                   wmp->u.p.delta * 4) & ~0x3f;
 1149|       |
 1150|  73.1k|            const pixel *ref_ptr;
 1151|  73.1k|            ptrdiff_t ref_stride = refp->p.stride[!!pl];
 1152|       |
 1153|  73.1k|            if (dx < 3 || dx + 8 + 4 > width || dy < 3 || dy + 8 + 4 > height) {
  ------------------
  |  Branch (1153:17): [True: 5.24k, False: 67.8k]
  |  Branch (1153:27): [True: 13.5k, False: 54.3k]
  |  Branch (1153:49): [True: 3.21k, False: 51.1k]
  |  Branch (1153:59): [True: 10.5k, False: 40.6k]
  ------------------
 1154|  32.5k|                pixel *const emu_edge_buf = bitfn(t->scratch.emu_edge);
  ------------------
  |  |   51|  32.5k|#define bitfn(x) x##_8bpc
  ------------------
 1155|  32.5k|                f->dsp->mc.emu_edge(15, 15, width, height, dx - 3, dy - 3,
 1156|  32.5k|                                    emu_edge_buf, 32 * sizeof(pixel),
 1157|  32.5k|                                    refp->p.data[pl], ref_stride);
 1158|  32.5k|                ref_ptr = &emu_edge_buf[32 * 3 + 3];
 1159|  32.5k|                ref_stride = 32 * sizeof(pixel);
 1160|  40.6k|            } else {
 1161|  40.6k|                ref_ptr = ((pixel *) refp->p.data[pl]) + PXSTRIDE(ref_stride) * dy + dx;
  ------------------
  |  |   53|  40.6k|#define PXSTRIDE(x) (x)
  ------------------
 1162|  40.6k|            }
 1163|  73.1k|            if (dst16 != NULL)
  ------------------
  |  Branch (1163:17): [True: 12.7k, False: 60.3k]
  ------------------
 1164|  12.7k|                dsp->mc.warp8x8t(&dst16[x], dstride, ref_ptr, ref_stride,
 1165|  12.7k|                                 wmp->u.abcd, mx, my HIGHBD_CALL_SUFFIX);
 1166|  60.3k|            else
 1167|  60.3k|                dsp->mc.warp8x8(&dst8[x], dstride, ref_ptr, ref_stride,
 1168|  60.3k|                                wmp->u.abcd, mx, my HIGHBD_CALL_SUFFIX);
 1169|  73.1k|        }
 1170|  24.1k|        if (dst8) dst8  += 8 * PXSTRIDE(dstride);
  ------------------
  |  |   53|  21.8k|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (1170:13): [True: 21.8k, False: 2.35k]
  ------------------
 1171|  2.35k|        else      dst16 += 8 * dstride;
 1172|  24.1k|    }
 1173|  7.80k|    return 0;
 1174|  7.80k|}
recon_tmpl.c:obmc:
 1056|  16.8k|{
 1057|  16.8k|    assert(!(t->bx & 1) && !(t->by & 1));
  ------------------
  |  |  140|  33.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 16.8k, False: 0]
  |  |  |  Branch (140:30): [True: 16.8k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 16.8k]
  |  |  ------------------
  ------------------
 1058|  16.8k|    const Dav1dFrameContext *const f = t->f;
 1059|  16.8k|    /*const*/ refmvs_block **r = &t->rt.r[(t->by & 31) + 5];
 1060|  16.8k|    pixel *const lap = bitfn(t->scratch.lap);
  ------------------
  |  |   51|  16.8k|#define bitfn(x) x##_8bpc
  ------------------
 1061|  16.8k|    const int ss_ver = !!pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (1061:24): [True: 7.70k, False: 9.14k]
  |  Branch (1061:32): [True: 4.74k, False: 2.96k]
  ------------------
 1062|  16.8k|    const int ss_hor = !!pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (1062:24): [True: 7.70k, False: 9.14k]
  |  Branch (1062:32): [True: 4.74k, False: 2.96k]
  ------------------
 1063|  16.8k|    const int h_mul = 4 >> ss_hor, v_mul = 4 >> ss_ver;
 1064|  16.8k|    int res;
 1065|       |
 1066|  16.8k|    if (t->by > t->ts->tiling.row_start &&
  ------------------
  |  Branch (1066:9): [True: 14.2k, False: 2.65k]
  ------------------
 1067|  14.2k|        (!pl || b_dim[0] * h_mul + b_dim[1] * v_mul >= 16))
  ------------------
  |  Branch (1067:10): [True: 7.83k, False: 6.36k]
  |  Branch (1067:17): [True: 3.60k, False: 2.75k]
  ------------------
 1068|  11.4k|    {
 1069|  24.2k|        for (int i = 0, x = 0; x < w4 && i < imin(b_dim[2], 4); ) {
  ------------------
  |  Branch (1069:32): [True: 12.8k, False: 11.3k]
  |  Branch (1069:42): [True: 12.8k, False: 47]
  ------------------
 1070|       |            // only odd blocks are considered for overlap handling, hence +1
 1071|  12.8k|            const refmvs_block *const a_r = &r[-1][t->bx + x + 1];
 1072|  12.8k|            const uint8_t *const a_b_dim = dav1d_block_dimensions[a_r->bs];
 1073|  12.8k|            const int step4 = iclip(a_b_dim[0], 2, 16);
 1074|       |
 1075|  12.8k|            if (a_r->ref.ref[0] > 0) {
  ------------------
  |  Branch (1075:17): [True: 12.4k, False: 414]
  ------------------
 1076|  12.4k|                const int ow4 = imin(step4, b_dim[0]);
 1077|  12.4k|                const int oh4 = imin(b_dim[1], 16) >> 1;
 1078|  12.4k|                res = mc(t, lap, NULL, ow4 * h_mul * sizeof(pixel), ow4, (oh4 * 3 + 3) >> 2,
 1079|  12.4k|                         t->bx + x, t->by, pl, a_r->mv.mv[0],
 1080|  12.4k|                         &f->refp[a_r->ref.ref[0] - 1], a_r->ref.ref[0] - 1,
 1081|  12.4k|                         dav1d_filter_2d[t->a->filter[1][bx4 + x + 1]][t->a->filter[0][bx4 + x + 1]]);
 1082|  12.4k|                if (res) return res;
  ------------------
  |  Branch (1082:21): [True: 0, False: 12.4k]
  ------------------
 1083|  12.4k|                f->dsp->mc.blend_h(&dst[x * h_mul], dst_stride, lap,
 1084|  12.4k|                                   h_mul * ow4, v_mul * oh4);
 1085|  12.4k|                i++;
 1086|  12.4k|            }
 1087|  12.8k|            x += step4;
 1088|  12.8k|        }
 1089|  11.4k|    }
 1090|       |
 1091|  16.8k|    if (t->bx > t->ts->tiling.col_start)
  ------------------
  |  Branch (1091:9): [True: 15.0k, False: 1.82k]
  ------------------
 1092|  31.7k|        for (int i = 0, y = 0; y < h4 && i < imin(b_dim[3], 4); ) {
  ------------------
  |  Branch (1092:32): [True: 16.8k, False: 14.9k]
  |  Branch (1092:42): [True: 16.7k, False: 86]
  ------------------
 1093|       |            // only odd blocks are considered for overlap handling, hence +1
 1094|  16.7k|            const refmvs_block *const l_r = &r[y + 1][t->bx - 1];
 1095|  16.7k|            const uint8_t *const l_b_dim = dav1d_block_dimensions[l_r->bs];
 1096|  16.7k|            const int step4 = iclip(l_b_dim[1], 2, 16);
 1097|       |
 1098|  16.7k|            if (l_r->ref.ref[0] > 0) {
  ------------------
  |  Branch (1098:17): [True: 16.1k, False: 552]
  ------------------
 1099|  16.1k|                const int ow4 = imin(b_dim[0], 16) >> 1;
 1100|  16.1k|                const int oh4 = imin(step4, b_dim[1]);
 1101|  16.1k|                res = mc(t, lap, NULL, h_mul * ow4 * sizeof(pixel), ow4, oh4,
 1102|  16.1k|                         t->bx, t->by + y, pl, l_r->mv.mv[0],
 1103|  16.1k|                         &f->refp[l_r->ref.ref[0] - 1], l_r->ref.ref[0] - 1,
 1104|  16.1k|                         dav1d_filter_2d[t->l.filter[1][by4 + y + 1]][t->l.filter[0][by4 + y + 1]]);
 1105|  16.1k|                if (res) return res;
  ------------------
  |  Branch (1105:21): [True: 0, False: 16.1k]
  ------------------
 1106|  16.1k|                f->dsp->mc.blend_v(&dst[y * v_mul * PXSTRIDE(dst_stride)],
  ------------------
  |  |   53|  16.1k|#define PXSTRIDE(x) (x)
  ------------------
 1107|  16.1k|                                   dst_stride, lap, h_mul * ow4, v_mul * oh4);
 1108|  16.1k|                i++;
 1109|  16.1k|            }
 1110|  16.7k|            y += step4;
 1111|  16.7k|        }
 1112|  16.8k|    return 0;
 1113|  16.8k|}
dav1d_recon_b_intra_16bpc:
 1179|  1.20M|{
 1180|  1.20M|    Dav1dTileState *const ts = t->ts;
 1181|  1.20M|    const Dav1dFrameContext *const f = t->f;
 1182|  1.20M|    const Dav1dDSPContext *const dsp = f->dsp;
 1183|  1.20M|    const int bx4 = t->bx & 31, by4 = t->by & 31;
 1184|  1.20M|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1185|  1.20M|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 1186|  1.20M|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
 1187|  1.20M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
 1188|  1.20M|    const int bw4 = b_dim[0], bh4 = b_dim[1];
 1189|  1.20M|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
 1190|  1.20M|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
 1191|  1.20M|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (1191:28): [True: 1.08M, False: 118k]
  ------------------
 1192|  1.08M|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1192:29): [True: 1.06M, False: 24.2k]
  |  Branch (1192:45): [True: 12.1k, False: 12.0k]
  ------------------
 1193|  1.07M|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1193:29): [True: 1.05M, False: 25.6k]
  |  Branch (1193:45): [True: 12.8k, False: 12.8k]
  ------------------
 1194|  1.20M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[b->tx];
 1195|  1.20M|    const TxfmInfo *const uv_t_dim = &dav1d_txfm_dimensions[b->uvtx];
 1196|       |
 1197|       |    // coefficient coding
 1198|  1.20M|    pixel *const edge = bitfn(t->scratch.edge) + 128;
  ------------------
  |  |   77|  1.20M|#define bitfn(x) x##_16bpc
  ------------------
 1199|  1.20M|    const int cbw4 = (bw4 + ss_hor) >> ss_hor, cbh4 = (bh4 + ss_ver) >> ss_ver;
 1200|       |
 1201|  1.20M|    const int intra_edge_filter_flag = f->seq_hdr->intra_edge_filter << 10;
 1202|       |
 1203|  2.43M|    for (int init_y = 0; init_y < h4; init_y += 16) {
  ------------------
  |  Branch (1203:26): [True: 1.22M, False: 1.20M]
  ------------------
 1204|  1.22M|        const int sub_h4 = imin(h4, 16 + init_y);
 1205|  1.22M|        const int sub_ch4 = imin(ch4, (init_y + 16) >> ss_ver);
 1206|  2.47M|        for (int init_x = 0; init_x < w4; init_x += 16) {
  ------------------
  |  Branch (1206:30): [True: 1.24M, False: 1.22M]
  ------------------
 1207|  1.24M|            if (b->pal_sz[0]) {
  ------------------
  |  Branch (1207:17): [True: 6.14k, False: 1.24M]
  ------------------
 1208|  6.14k|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1209|  6.14k|                             4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
 1210|  6.14k|                const uint8_t *pal_idx;
 1211|  6.14k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1211:21): [True: 0, False: 6.14k]
  ------------------
 1212|      0|                    const int p = t->frame_thread.pass & 1;
 1213|      0|                    assert(ts->frame_thread[p].pal_idx);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1214|      0|                    pal_idx = ts->frame_thread[p].pal_idx;
 1215|      0|                    ts->frame_thread[p].pal_idx += bw4 * bh4 * 8;
 1216|  6.14k|                } else {
 1217|  6.14k|                    pal_idx = t->scratch.pal_idx_y;
 1218|  6.14k|                }
 1219|  6.14k|                const pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (1219:42): [True: 0, False: 6.14k]
  ------------------
 1220|      0|                    f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 1221|      0|                                        ((t->bx >> 1) + (t->by & 1))][0] :
 1222|  6.14k|                    bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  6.14k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  6.14k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1223|  6.14k|                f->dsp->ipred.pal_pred(dst, f->cur.stride[0], pal,
 1224|  6.14k|                                       pal_idx, bw4 * 4, bh4 * 4);
 1225|  6.14k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  6.14k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 6.14k]
  |  |  ------------------
  |  |   35|  6.14k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  6.14k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1226|      0|                    hex_dump(dst, PXSTRIDE(f->cur.stride[0]),
 1227|      0|                             bw4 * 4, bh4 * 4, "y-pal-pred");
 1228|  6.14k|            }
 1229|       |
 1230|  1.24M|            const int intra_flags = (sm_flag(t->a, bx4) |
 1231|  1.24M|                                     sm_flag(&t->l, by4) |
 1232|  1.24M|                                     intra_edge_filter_flag);
 1233|  1.24M|            const int sb_has_tr = init_x + 16 < w4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1233:35): [True: 25.6k, False: 1.22M]
  |  Branch (1233:58): [True: 15.4k, False: 1.20M]
  ------------------
 1234|  1.22M|                              intra_edge_flags & EDGE_I444_TOP_HAS_RIGHT;
 1235|  1.24M|            const int sb_has_bl = init_x ? 0 : init_y + 16 < h4 ? 1 :
  ------------------
  |  Branch (1235:35): [True: 25.6k, False: 1.22M]
  |  Branch (1235:48): [True: 15.4k, False: 1.20M]
  ------------------
 1236|  1.22M|                              intra_edge_flags & EDGE_I444_LEFT_HAS_BOTTOM;
 1237|  1.24M|            int y, x;
 1238|  1.24M|            const int sub_w4 = imin(w4, init_x + 16);
 1239|  2.66M|            for (y = init_y, t->by += init_y; y < sub_h4;
  ------------------
  |  Branch (1239:47): [True: 1.41M, False: 1.24M]
  ------------------
 1240|  1.41M|                 y += t_dim->h, t->by += t_dim->h)
 1241|  1.41M|            {
 1242|  1.41M|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1243|  1.41M|                               4 * (t->by * PXSTRIDE(f->cur.stride[0]) +
 1244|  1.41M|                                    t->bx + init_x);
 1245|  3.32M|                for (x = init_x, t->bx += init_x; x < sub_w4;
  ------------------
  |  Branch (1245:51): [True: 1.91M, False: 1.41M]
  ------------------
 1246|  1.91M|                     x += t_dim->w, t->bx += t_dim->w)
 1247|  1.91M|                {
 1248|  1.91M|                    if (b->pal_sz[0]) goto skip_y_pred;
  ------------------
  |  Branch (1248:25): [True: 9.02k, False: 1.90M]
  ------------------
 1249|       |
 1250|  1.90M|                    int angle = b->y_angle;
 1251|  1.90M|                    const enum EdgeFlags edge_flags =
 1252|  1.90M|                        (((y > init_y || !sb_has_tr) && (x + t_dim->w >= sub_w4)) ?
  ------------------
  |  Branch (1252:28): [True: 511k, False: 1.39M]
  |  Branch (1252:42): [True: 454k, False: 937k]
  |  Branch (1252:57): [True: 563k, False: 401k]
  ------------------
 1253|  1.33M|                             0 : EDGE_I444_TOP_HAS_RIGHT) |
 1254|  1.90M|                        ((x > init_x || (!sb_has_bl && y + t_dim->h >= sub_h4)) ?
  ------------------
  |  Branch (1254:27): [True: 498k, False: 1.40M]
  |  Branch (1254:42): [True: 842k, False: 561k]
  |  Branch (1254:56): [True: 731k, False: 111k]
  ------------------
 1255|  1.23M|                             0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1256|  1.90M|                    const pixel *top_sb_edge = NULL;
 1257|  1.90M|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1257:25): [True: 385k, False: 1.51M]
  ------------------
 1258|   385k|                        top_sb_edge = f->ipred_edge[0];
 1259|   385k|                        const int sby = t->by >> f->sb_shift;
 1260|   385k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1261|   385k|                    }
 1262|  1.90M|                    const enum IntraPredMode m =
 1263|  1.90M|                        bytefn(dav1d_prepare_intra_edges)(t->bx,
  ------------------
  |  |   87|  1.90M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  1.90M|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1264|  1.90M|                                                          t->bx > ts->tiling.col_start,
 1265|  1.90M|                                                          t->by,
 1266|  1.90M|                                                          t->by > ts->tiling.row_start,
 1267|  1.90M|                                                          ts->tiling.col_end,
 1268|  1.90M|                                                          ts->tiling.row_end,
 1269|  1.90M|                                                          edge_flags, dst,
 1270|  1.90M|                                                          f->cur.stride[0], top_sb_edge,
 1271|  1.90M|                                                          b->y_mode, &angle,
 1272|  1.90M|                                                          t_dim->w, t_dim->h,
 1273|  1.90M|                                                          f->seq_hdr->intra_edge_filter,
 1274|  1.90M|                                                          edge HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.90M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1275|  1.90M|                    dsp->ipred.intra_pred[m](dst, f->cur.stride[0], edge,
 1276|  1.90M|                                             t_dim->w * 4, t_dim->h * 4,
 1277|  1.90M|                                             angle | intra_flags,
 1278|  1.90M|                                             4 * f->bw - 4 * t->bx,
 1279|  1.90M|                                             4 * f->bh - 4 * t->by
 1280|  1.90M|                                             HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.90M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1281|       |
 1282|  1.90M|                    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  1.90M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.90M]
  |  |  ------------------
  |  |   35|  1.90M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.90M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                  if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1283|      0|                        hex_dump(edge - t_dim->h * 4, t_dim->h * 4,
 1284|      0|                                 t_dim->h * 4, 2, "l");
 1285|      0|                        hex_dump(edge, 0, 1, 1, "tl");
 1286|      0|                        hex_dump(edge + 1, t_dim->w * 4,
 1287|      0|                                 t_dim->w * 4, 2, "t");
 1288|      0|                        hex_dump(dst, f->cur.stride[0],
 1289|      0|                                 t_dim->w * 4, t_dim->h * 4, "y-intra-pred");
 1290|      0|                    }
 1291|       |
 1292|  1.91M|                skip_y_pred: {}
 1293|  1.91M|                    if (!b->skip) {
  ------------------
  |  Branch (1293:25): [True: 1.02M, False: 884k]
  ------------------
 1294|  1.02M|                        coef *cf;
 1295|  1.02M|                        int eob;
 1296|  1.02M|                        enum TxfmType txtp;
 1297|  1.02M|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1297:29): [True: 0, False: 1.02M]
  ------------------
 1298|      0|                            const int p = t->frame_thread.pass & 1;
 1299|      0|                            const int cbi = *ts->frame_thread[p].cbi++;
 1300|      0|                            cf = ts->frame_thread[p].cf;
 1301|      0|                            ts->frame_thread[p].cf += imin(t_dim->w, 8) * imin(t_dim->h, 8) * 16;
 1302|      0|                            eob  = cbi >> 5;
 1303|      0|                            txtp = cbi & 0x1f;
 1304|  1.02M|                        } else {
 1305|  1.02M|                            uint8_t cf_ctx;
 1306|  1.02M|                            cf = bitfn(t->cf);
  ------------------
  |  |   77|  1.02M|#define bitfn(x) x##_16bpc
  ------------------
 1307|  1.02M|                            eob = decode_coefs(t, &t->a->lcoef[bx4 + x],
 1308|  1.02M|                                               &t->l.lcoef[by4 + y], b->tx, bs,
 1309|  1.02M|                                               b, 1, 0, cf, &txtp, &cf_ctx);
 1310|  1.02M|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.02M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.02M]
  |  |  ------------------
  |  |   35|  1.02M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.02M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1311|      0|                                printf("Post-y-cf-blk[tx=%d,txtp=%d,eob=%d]: r=%d\n",
 1312|      0|                                       b->tx, txtp, eob, ts->msac.rng);
 1313|  1.02M|                            dav1d_memset_likely_pow2(&t->a->lcoef[bx4 + x], cf_ctx, imin(t_dim->w, f->bw - t->bx));
 1314|  1.02M|                            dav1d_memset_likely_pow2(&t->l.lcoef[by4 + y], cf_ctx, imin(t_dim->h, f->bh - t->by));
 1315|  1.02M|                        }
 1316|  1.02M|                        if (eob >= 0) {
  ------------------
  |  Branch (1316:29): [True: 679k, False: 348k]
  ------------------
 1317|   679k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   679k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 679k]
  |  |  ------------------
  |  |   35|   679k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   679k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1318|      0|                                coef_dump(cf, imin(t_dim->h, 8) * 4,
 1319|      0|                                          imin(t_dim->w, 8) * 4, 3, "dq");
 1320|   679k|                            dsp->itx.itxfm_add[b->tx]
 1321|   679k|                                              [txtp](dst,
 1322|   679k|                                                     f->cur.stride[0],
 1323|   679k|                                                     cf, eob HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   679k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1324|   679k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   679k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 679k]
  |  |  ------------------
  |  |   35|   679k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   679k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1325|      0|                                hex_dump(dst, f->cur.stride[0],
 1326|      0|                                         t_dim->w * 4, t_dim->h * 4, "recon");
 1327|   679k|                        }
 1328|  1.02M|                    } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1328:32): [True: 884k, False: 0]
  ------------------
 1329|   884k|                        dav1d_memset_pow2[t_dim->lw](&t->a->lcoef[bx4 + x], 0x40);
 1330|   884k|                        dav1d_memset_pow2[t_dim->lh](&t->l.lcoef[by4 + y], 0x40);
 1331|   884k|                    }
 1332|  1.91M|                    dst += 4 * t_dim->w;
 1333|  1.91M|                }
 1334|  1.41M|                t->bx -= x;
 1335|  1.41M|            }
 1336|  1.24M|            t->by -= y;
 1337|       |
 1338|  1.24M|            if (!has_chroma) continue;
  ------------------
  |  Branch (1338:17): [True: 154k, False: 1.09M]
  ------------------
 1339|       |
 1340|  1.09M|            const ptrdiff_t stride = f->cur.stride[1];
 1341|       |
 1342|  1.09M|            if (b->uv_mode == CFL_PRED) {
  ------------------
  |  Branch (1342:17): [True: 147k, False: 947k]
  ------------------
 1343|   147k|                assert(!init_x && !init_y);
  ------------------
  |  |  140|   294k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 147k, False: 0]
  |  |  |  Branch (140:30): [True: 147k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 147k]
  |  |  ------------------
  ------------------
 1344|       |
 1345|   147k|                int16_t *const ac = t->scratch.ac;
 1346|   147k|                pixel *y_src = ((pixel *) f->cur.data[0]) + 4 * (t->bx & ~ss_hor) +
 1347|   147k|                                 4 * (t->by & ~ss_ver) * PXSTRIDE(f->cur.stride[0]);
 1348|   147k|                const ptrdiff_t uv_off = 4 * ((t->bx >> ss_hor) +
 1349|   147k|                                              (t->by >> ss_ver) * PXSTRIDE(stride));
 1350|   147k|                pixel *const uv_dst[2] = { ((pixel *) f->cur.data[1]) + uv_off,
 1351|   147k|                                           ((pixel *) f->cur.data[2]) + uv_off };
 1352|       |
 1353|   147k|                const int furthest_r =
 1354|   147k|                    ((cw4 << ss_hor) + t_dim->w - 1) & ~(t_dim->w - 1);
 1355|   147k|                const int furthest_b =
 1356|   147k|                    ((ch4 << ss_ver) + t_dim->h - 1) & ~(t_dim->h - 1);
 1357|   147k|                dsp->ipred.cfl_ac[f->cur.p.layout - 1](ac, y_src, f->cur.stride[0],
 1358|   147k|                                                         cbw4 - (furthest_r >> ss_hor),
 1359|   147k|                                                         cbh4 - (furthest_b >> ss_ver),
 1360|   147k|                                                         cbw4 * 4, cbh4 * 4);
 1361|   441k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1361:34): [True: 294k, False: 147k]
  ------------------
 1362|   294k|                    if (!b->cfl_alpha[pl]) continue;
  ------------------
  |  Branch (1362:25): [True: 62.0k, False: 232k]
  ------------------
 1363|   232k|                    int angle = 0;
 1364|   232k|                    const pixel *top_sb_edge = NULL;
 1365|   232k|                    if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1365:25): [True: 52.2k, False: 179k]
  ------------------
 1366|  52.2k|                        top_sb_edge = f->ipred_edge[pl + 1];
 1367|  52.2k|                        const int sby = t->by >> f->sb_shift;
 1368|  52.2k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1369|  52.2k|                    }
 1370|   232k|                    const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1371|   232k|                    const int xstart = ts->tiling.col_start >> ss_hor;
 1372|   232k|                    const int ystart = ts->tiling.row_start >> ss_ver;
 1373|   232k|                    const enum IntraPredMode m =
 1374|   232k|                        bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|   232k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|   232k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1375|   232k|                                                          ypos, ypos > ystart,
 1376|   232k|                                                          ts->tiling.col_end >> ss_hor,
 1377|   232k|                                                          ts->tiling.row_end >> ss_ver,
 1378|   232k|                                                          0, uv_dst[pl], stride,
 1379|   232k|                                                          top_sb_edge, DC_PRED, &angle,
 1380|   232k|                                                          uv_t_dim->w, uv_t_dim->h, 0,
 1381|   232k|                                                          edge HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   232k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1382|   232k|                    dsp->ipred.cfl_pred[m](uv_dst[pl], stride, edge,
 1383|   232k|                                           uv_t_dim->w * 4,
 1384|   232k|                                           uv_t_dim->h * 4,
 1385|   232k|                                           ac, b->cfl_alpha[pl]
 1386|   232k|                                           HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   232k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1387|   232k|                }
 1388|   147k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|   147k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 147k]
  |  |  ------------------
  |  |   35|   147k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   147k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1389|      0|                    ac_dump(ac, 4*cbw4, 4*cbh4, "ac");
 1390|      0|                    hex_dump(uv_dst[0], stride, cbw4 * 4, cbh4 * 4, "u-cfl-pred");
 1391|      0|                    hex_dump(uv_dst[1], stride, cbw4 * 4, cbh4 * 4, "v-cfl-pred");
 1392|      0|                }
 1393|   947k|            } else if (b->pal_sz[1]) {
  ------------------
  |  Branch (1393:24): [True: 1.80k, False: 945k]
  ------------------
 1394|  1.80k|                const ptrdiff_t uv_dstoff = 4 * ((t->bx >> ss_hor) +
 1395|  1.80k|                                              (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
 1396|  1.80k|                const pixel (*pal)[8];
 1397|  1.80k|                const uint8_t *pal_idx;
 1398|  1.80k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1398:21): [True: 0, False: 1.80k]
  ------------------
 1399|      0|                    const int p = t->frame_thread.pass & 1;
 1400|      0|                    assert(ts->frame_thread[p].pal_idx);
  ------------------
  |  |  140|      0|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1401|      0|                    pal = f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 1402|      0|                                              ((t->bx >> 1) + (t->by & 1))];
 1403|      0|                    pal_idx = ts->frame_thread[p].pal_idx;
 1404|      0|                    ts->frame_thread[p].pal_idx += cbw4 * cbh4 * 8;
 1405|  1.80k|                } else {
 1406|  1.80k|                    pal = bytefn(t->scratch.pal);
  ------------------
  |  |   87|  1.80k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  1.80k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1407|  1.80k|                    pal_idx = t->scratch.pal_idx_uv;
 1408|  1.80k|                }
 1409|       |
 1410|  1.80k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[1]) + uv_dstoff,
 1411|  1.80k|                                       f->cur.stride[1], pal[1],
 1412|  1.80k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1413|  1.80k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[2]) + uv_dstoff,
 1414|  1.80k|                                       f->cur.stride[1], pal[2],
 1415|  1.80k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1416|  1.80k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  1.80k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.80k]
  |  |  ------------------
  |  |   35|  1.80k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.80k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1417|      0|                    hex_dump(((pixel *) f->cur.data[1]) + uv_dstoff,
 1418|      0|                             PXSTRIDE(f->cur.stride[1]),
 1419|      0|                             cbw4 * 4, cbh4 * 4, "u-pal-pred");
 1420|      0|                    hex_dump(((pixel *) f->cur.data[2]) + uv_dstoff,
 1421|      0|                             PXSTRIDE(f->cur.stride[1]),
 1422|      0|                             cbw4 * 4, cbh4 * 4, "v-pal-pred");
 1423|      0|                }
 1424|  1.80k|            }
 1425|       |
 1426|  1.09M|            const int sm_uv_fl = sm_uv_flag(t->a, cbx4) |
 1427|  1.09M|                                 sm_uv_flag(&t->l, cby4);
 1428|  1.09M|            const int uv_sb_has_tr =
 1429|  1.09M|                ((init_x + 16) >> ss_hor) < cw4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1429:17): [True: 18.8k, False: 1.07M]
  |  Branch (1429:55): [True: 11.3k, False: 1.06M]
  ------------------
 1430|  1.07M|                intra_edge_flags & (EDGE_I420_TOP_HAS_RIGHT >> (f->cur.p.layout - 1));
 1431|  1.09M|            const int uv_sb_has_bl =
 1432|  1.09M|                init_x ? 0 : ((init_y + 16) >> ss_ver) < ch4 ? 1 :
  ------------------
  |  Branch (1432:17): [True: 18.8k, False: 1.07M]
  |  Branch (1432:30): [True: 11.3k, False: 1.06M]
  ------------------
 1433|  1.07M|                intra_edge_flags & (EDGE_I420_LEFT_HAS_BOTTOM >> (f->cur.p.layout - 1));
 1434|  1.09M|            const int sub_cw4 = imin(cw4, (init_x + 16) >> ss_hor);
 1435|  3.28M|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1435:30): [True: 2.18M, False: 1.09M]
  ------------------
 1436|  4.49M|                for (y = init_y >> ss_ver, t->by += init_y; y < sub_ch4;
  ------------------
  |  Branch (1436:61): [True: 2.30M, False: 2.18M]
  ------------------
 1437|  2.30M|                     y += uv_t_dim->h, t->by += uv_t_dim->h << ss_ver)
 1438|  2.30M|                {
 1439|  2.30M|                    pixel *dst = ((pixel *) f->cur.data[1 + pl]) +
 1440|  2.30M|                                   4 * ((t->by >> ss_ver) * PXSTRIDE(stride) +
 1441|  2.30M|                                        ((t->bx + init_x) >> ss_hor));
 1442|  4.82M|                    for (x = init_x >> ss_hor, t->bx += init_x; x < sub_cw4;
  ------------------
  |  Branch (1442:65): [True: 2.51M, False: 2.30M]
  ------------------
 1443|  2.51M|                         x += uv_t_dim->w, t->bx += uv_t_dim->w << ss_hor)
 1444|  2.51M|                    {
 1445|  2.51M|                        if ((b->uv_mode == CFL_PRED && b->cfl_alpha[pl]) ||
  ------------------
  |  Branch (1445:30): [True: 294k, False: 2.22M]
  |  Branch (1445:56): [True: 232k, False: 62.0k]
  ------------------
 1446|  2.28M|                            b->pal_sz[1])
  ------------------
  |  Branch (1446:29): [True: 5.76k, False: 2.28M]
  ------------------
 1447|   237k|                        {
 1448|   237k|                            goto skip_uv_pred;
 1449|   237k|                        }
 1450|       |
 1451|  2.28M|                        int angle = b->uv_angle;
 1452|       |                        // this probably looks weird because we're using
 1453|       |                        // luma flags in a chroma loop, but that's because
 1454|       |                        // prepare_intra_edges() expects luma flags as input
 1455|  2.28M|                        const enum EdgeFlags edge_flags =
 1456|  2.28M|                            (((y > (init_y >> ss_ver) || !uv_sb_has_tr) &&
  ------------------
  |  Branch (1456:32): [True: 237k, False: 2.04M]
  |  Branch (1456:58): [True: 664k, False: 1.37M]
  ------------------
 1457|   901k|                              (x + uv_t_dim->w >= sub_cw4)) ?
  ------------------
  |  Branch (1457:31): [True: 754k, False: 147k]
  ------------------
 1458|  1.52M|                                 0 : EDGE_I444_TOP_HAS_RIGHT) |
 1459|  2.28M|                            ((x > (init_x >> ss_hor) ||
  ------------------
  |  Branch (1459:31): [True: 216k, False: 2.06M]
  ------------------
 1460|  2.06M|                              (!uv_sb_has_bl && y + uv_t_dim->h >= sub_ch4)) ?
  ------------------
  |  Branch (1460:32): [True: 1.25M, False: 805k]
  |  Branch (1460:49): [True: 1.17M, False: 85.0k]
  ------------------
 1461|  1.39M|                                 0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1462|  2.28M|                        const pixel *top_sb_edge = NULL;
 1463|  2.28M|                        if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1463:29): [True: 524k, False: 1.75M]
  ------------------
 1464|   524k|                            top_sb_edge = f->ipred_edge[1 + pl];
 1465|   524k|                            const int sby = t->by >> f->sb_shift;
 1466|   524k|                            top_sb_edge += f->sb128w * 128 * (sby - 1);
 1467|   524k|                        }
 1468|  2.28M|                        const enum IntraPredMode uv_mode =
 1469|  2.28M|                             b->uv_mode == CFL_PRED ? DC_PRED : b->uv_mode;
  ------------------
  |  Branch (1469:30): [True: 62.0k, False: 2.21M]
  ------------------
 1470|  2.28M|                        const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1471|  2.28M|                        const int xstart = ts->tiling.col_start >> ss_hor;
 1472|  2.28M|                        const int ystart = ts->tiling.row_start >> ss_ver;
 1473|  2.28M|                        const enum IntraPredMode m =
 1474|  2.28M|                            bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|  2.28M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  2.28M|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1475|  2.28M|                                                              ypos, ypos > ystart,
 1476|  2.28M|                                                              ts->tiling.col_end >> ss_hor,
 1477|  2.28M|                                                              ts->tiling.row_end >> ss_ver,
 1478|  2.28M|                                                              edge_flags, dst, stride,
 1479|  2.28M|                                                              top_sb_edge, uv_mode,
 1480|  2.28M|                                                              &angle, uv_t_dim->w,
 1481|  2.28M|                                                              uv_t_dim->h,
 1482|  2.28M|                                                              f->seq_hdr->intra_edge_filter,
 1483|  2.28M|                                                              edge HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  2.28M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1484|  2.28M|                        angle |= intra_edge_filter_flag;
 1485|  2.28M|                        dsp->ipred.intra_pred[m](dst, stride, edge,
 1486|  2.28M|                                                 uv_t_dim->w * 4,
 1487|  2.28M|                                                 uv_t_dim->h * 4,
 1488|  2.28M|                                                 angle | sm_uv_fl,
 1489|  2.28M|                                                 (4 * f->bw + ss_hor -
 1490|  2.28M|                                                  4 * (t->bx & ~ss_hor)) >> ss_hor,
 1491|  2.28M|                                                 (4 * f->bh + ss_ver -
 1492|  2.28M|                                                  4 * (t->by & ~ss_ver)) >> ss_ver
 1493|  2.28M|                                                 HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  2.28M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1494|  2.28M|                        if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  2.28M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.28M]
  |  |  ------------------
  |  |   35|  2.28M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  2.28M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                      if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1495|      0|                            hex_dump(edge - uv_t_dim->h * 4, uv_t_dim->h * 4,
 1496|      0|                                     uv_t_dim->h * 4, 2, "l");
 1497|      0|                            hex_dump(edge, 0, 1, 1, "tl");
 1498|      0|                            hex_dump(edge + 1, uv_t_dim->w * 4,
 1499|      0|                                     uv_t_dim->w * 4, 2, "t");
 1500|      0|                            hex_dump(dst, stride, uv_t_dim->w * 4,
 1501|      0|                                     uv_t_dim->h * 4, pl ? "v-intra-pred" : "u-intra-pred");
  ------------------
  |  Branch (1501:55): [True: 0, False: 0]
  ------------------
 1502|      0|                        }
 1503|       |
 1504|  2.51M|                    skip_uv_pred: {}
 1505|  2.51M|                        if (!b->skip) {
  ------------------
  |  Branch (1505:29): [True: 1.58M, False: 930k]
  ------------------
 1506|  1.58M|                            enum TxfmType txtp;
 1507|  1.58M|                            int eob;
 1508|  1.58M|                            coef *cf;
 1509|  1.58M|                            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1509:33): [True: 0, False: 1.58M]
  ------------------
 1510|      0|                                const int p = t->frame_thread.pass & 1;
 1511|      0|                                const int cbi = *ts->frame_thread[p].cbi++;
 1512|      0|                                cf = ts->frame_thread[p].cf;
 1513|      0|                                ts->frame_thread[p].cf += uv_t_dim->w * uv_t_dim->h * 16;
 1514|      0|                                eob  = cbi >> 5;
 1515|      0|                                txtp = cbi & 0x1f;
 1516|  1.58M|                            } else {
 1517|  1.58M|                                uint8_t cf_ctx;
 1518|  1.58M|                                cf = bitfn(t->cf);
  ------------------
  |  |   77|  1.58M|#define bitfn(x) x##_16bpc
  ------------------
 1519|  1.58M|                                eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1520|  1.58M|                                                   &t->l.ccoef[pl][cby4 + y],
 1521|  1.58M|                                                   b->uvtx, bs, b, 1, 1 + pl, cf,
 1522|  1.58M|                                                   &txtp, &cf_ctx);
 1523|  1.58M|                                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.58M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.58M]
  |  |  ------------------
  |  |   35|  1.58M|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.58M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1524|      0|                                    printf("Post-uv-cf-blk[pl=%d,tx=%d,"
 1525|      0|                                           "txtp=%d,eob=%d]: r=%d [x=%d,cbx4=%d]\n",
 1526|      0|                                           pl, b->uvtx, txtp, eob, ts->msac.rng, x, cbx4);
 1527|  1.58M|                                int ctw = imin(uv_t_dim->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1528|  1.58M|                                int cth = imin(uv_t_dim->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1529|  1.58M|                                dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1530|  1.58M|                                dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1531|  1.58M|                            }
 1532|  1.58M|                            if (eob >= 0) {
  ------------------
  |  Branch (1532:33): [True: 219k, False: 1.36M]
  ------------------
 1533|   219k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   219k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 219k]
  |  |  ------------------
  |  |   35|   219k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   219k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1534|      0|                                    coef_dump(cf, uv_t_dim->h * 4,
 1535|      0|                                              uv_t_dim->w * 4, 3, "dq");
 1536|   219k|                                dsp->itx.itxfm_add[b->uvtx]
 1537|   219k|                                                  [txtp](dst, stride,
 1538|   219k|                                                         cf, eob HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   219k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1539|   219k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   219k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 219k]
  |  |  ------------------
  |  |   35|   219k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   219k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                              if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1540|      0|                                    hex_dump(dst, stride, uv_t_dim->w * 4,
 1541|      0|                                             uv_t_dim->h * 4, "recon");
 1542|   219k|                            }
 1543|  1.58M|                        } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1543:36): [True: 930k, False: 0]
  ------------------
 1544|   930k|                            dav1d_memset_pow2[uv_t_dim->lw](&t->a->ccoef[pl][cbx4 + x], 0x40);
 1545|   930k|                            dav1d_memset_pow2[uv_t_dim->lh](&t->l.ccoef[pl][cby4 + y], 0x40);
 1546|   930k|                        }
 1547|  2.51M|                        dst += uv_t_dim->w * 4;
 1548|  2.51M|                    }
 1549|  2.30M|                    t->bx -= x << ss_hor;
 1550|  2.30M|                }
 1551|  2.18M|                t->by -= y << ss_ver;
 1552|  2.18M|            }
 1553|  1.09M|        }
 1554|  1.22M|    }
 1555|  1.20M|}
dav1d_recon_b_inter_16bpc:
 1559|   137k|{
 1560|   137k|    Dav1dTileState *const ts = t->ts;
 1561|   137k|    const Dav1dFrameContext *const f = t->f;
 1562|   137k|    const Dav1dDSPContext *const dsp = f->dsp;
 1563|   137k|    const int bx4 = t->bx & 31, by4 = t->by & 31;
 1564|   137k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1565|   137k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 1566|   137k|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
 1567|   137k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
 1568|   137k|    const int bw4 = b_dim[0], bh4 = b_dim[1];
 1569|   137k|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
 1570|   137k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (1570:28): [True: 86.7k, False: 50.5k]
  ------------------
 1571|  86.7k|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1571:29): [True: 81.2k, False: 5.58k]
  |  Branch (1571:45): [True: 2.75k, False: 2.83k]
  ------------------
 1572|  83.9k|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1572:29): [True: 79.6k, False: 4.33k]
  |  Branch (1572:45): [True: 2.16k, False: 2.16k]
  ------------------
 1573|   137k|    const int chr_layout_idx = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I400 ? 0 :
  ------------------
  |  Branch (1573:32): [True: 50.5k, False: 86.7k]
  ------------------
 1574|   137k|                               DAV1D_PIXEL_LAYOUT_I444 - f->cur.p.layout;
 1575|   137k|    int res;
 1576|       |
 1577|       |    // prediction
 1578|   137k|    const int cbh4 = (bh4 + ss_ver) >> ss_ver, cbw4 = (bw4 + ss_hor) >> ss_hor;
 1579|   137k|    pixel *dst = ((pixel *) f->cur.data[0]) +
 1580|   137k|        4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
 1581|   137k|    const ptrdiff_t uvdstoff =
 1582|   137k|        4 * ((t->bx >> ss_hor) + (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
 1583|   137k|    if (IS_KEY_OR_INTRA(f->frame_hdr)) {
  ------------------
  |  |   43|   137k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|   137k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 103k, False: 34.3k]
  |  |  ------------------
  ------------------
 1584|       |        // intrabc
 1585|   103k|        assert(!f->frame_hdr->super_res.enabled);
  ------------------
  |  |  140|   103k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 103k]
  |  |  |  Branch (140:68): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 1586|   103k|        res = mc(t, dst, NULL, f->cur.stride[0], bw4, bh4, t->bx, t->by, 0,
 1587|   103k|                 b->mv[0], &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1588|   103k|        if (res) return res;
  ------------------
  |  Branch (1588:13): [True: 0, False: 103k]
  ------------------
 1589|   219k|        if (has_chroma) for (int pl = 1; pl < 3; pl++) {
  ------------------
  |  Branch (1589:13): [True: 73.1k, False: 29.9k]
  |  Branch (1589:42): [True: 146k, False: 73.1k]
  ------------------
 1590|   146k|            res = mc(t, ((pixel *)f->cur.data[pl]) + uvdstoff, NULL, f->cur.stride[1],
 1591|   146k|                     bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1592|   146k|                     t->bx & ~ss_hor, t->by & ~ss_ver, pl, b->mv[0],
 1593|   146k|                     &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1594|   146k|            if (res) return res;
  ------------------
  |  Branch (1594:17): [True: 0, False: 146k]
  ------------------
 1595|   146k|        }
 1596|   103k|    } else if (b->comp_type == COMP_INTER_NONE) {
  ------------------
  |  Branch (1596:16): [True: 26.8k, False: 7.42k]
  ------------------
 1597|  26.8k|        const Dav1dThreadPicture *const refp = &f->refp[b->ref[0]];
 1598|  26.8k|        const enum Filter2d filter_2d = b->filter2d;
 1599|       |
 1600|  26.8k|        if (imin(bw4, bh4) > 1 &&
  ------------------
  |  Branch (1600:13): [True: 15.0k, False: 11.8k]
  ------------------
 1601|  15.0k|            ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1601:15): [True: 4.68k, False: 10.3k]
  |  Branch (1601:44): [True: 1.27k, False: 3.40k]
  ------------------
 1602|  13.7k|             (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1602:15): [True: 1.20k, False: 12.5k]
  |  Branch (1602:44): [True: 1.05k, False: 146]
  ------------------
 1603|  2.33k|        {
 1604|  2.33k|            res = warp_affine(t, dst, NULL, f->cur.stride[0], b_dim, 0, refp,
 1605|  2.33k|                              b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1605:31): [True: 1.05k, False: 1.27k]
  ------------------
 1606|  2.33k|                                  &f->frame_hdr->gmv[b->ref[0]]);
 1607|  2.33k|            if (res) return res;
  ------------------
  |  Branch (1607:17): [True: 0, False: 2.33k]
  ------------------
 1608|  24.5k|        } else {
 1609|  24.5k|            res = mc(t, dst, NULL, f->cur.stride[0],
 1610|  24.5k|                     bw4, bh4, t->bx, t->by, 0, b->mv[0], refp, b->ref[0], filter_2d);
 1611|  24.5k|            if (res) return res;
  ------------------
  |  Branch (1611:17): [True: 0, False: 24.5k]
  ------------------
 1612|  24.5k|            if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1612:17): [True: 4.79k, False: 19.7k]
  ------------------
 1613|  4.79k|                res = obmc(t, dst, f->cur.stride[0], b_dim, 0, bx4, by4, w4, h4);
 1614|  4.79k|                if (res) return res;
  ------------------
  |  Branch (1614:21): [True: 0, False: 4.79k]
  ------------------
 1615|  4.79k|            }
 1616|  24.5k|        }
 1617|  26.8k|        if (b->interintra_type) {
  ------------------
  |  Branch (1617:13): [True: 861, False: 26.0k]
  ------------------
 1618|    861|            pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   77|    861|#define bitfn(x) x##_16bpc
  ------------------
 1619|    861|            enum IntraPredMode m = b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1619:36): [True: 155, False: 706]
  ------------------
 1620|    706|                                   SMOOTH_PRED : b->interintra_mode;
 1621|    861|            pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   77|    861|#define bitfn(x) x##_16bpc
  ------------------
 1622|    861|            int angle = 0;
 1623|    861|            const pixel *top_sb_edge = NULL;
 1624|    861|            if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1624:17): [True: 147, False: 714]
  ------------------
 1625|    147|                top_sb_edge = f->ipred_edge[0];
 1626|    147|                const int sby = t->by >> f->sb_shift;
 1627|    147|                top_sb_edge += f->sb128w * 128 * (sby - 1);
 1628|    147|            }
 1629|    861|            m = bytefn(dav1d_prepare_intra_edges)(t->bx, t->bx > ts->tiling.col_start,
  ------------------
  |  |   87|    861|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|    861|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1630|    861|                                                  t->by, t->by > ts->tiling.row_start,
 1631|    861|                                                  ts->tiling.col_end, ts->tiling.row_end,
 1632|    861|                                                  0, dst, f->cur.stride[0], top_sb_edge,
 1633|    861|                                                  m, &angle, bw4, bh4, 0, tl_edge
 1634|    861|                                                  HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    861|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1635|    861|            dsp->ipred.intra_pred[m](tmp, 4 * bw4 * sizeof(pixel),
 1636|    861|                                     tl_edge, bw4 * 4, bh4 * 4, 0, 0, 0
 1637|    861|                                     HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    861|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1638|    861|            dsp->mc.blend(dst, f->cur.stride[0], tmp,
 1639|    861|                          bw4 * 4, bh4 * 4, II_MASK(0, bs, b));
  ------------------
  |  |   83|    861|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|    861|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 640, False: 221]
  |  |  ------------------
  |  |   85|    861|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|    861|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1640|    861|        }
 1641|       |
 1642|  26.8k|        if (!has_chroma) goto skip_inter_chroma_pred;
  ------------------
  |  Branch (1642:13): [True: 19.2k, False: 7.62k]
  ------------------
 1643|       |
 1644|       |        // sub8x8 derivation
 1645|  7.62k|        int is_sub8x8 = bw4 == ss_hor || bh4 == ss_ver;
  ------------------
  |  Branch (1645:25): [True: 606, False: 7.01k]
  |  Branch (1645:42): [True: 540, False: 6.47k]
  ------------------
 1646|  7.62k|        refmvs_block *const *r;
 1647|  7.62k|        if (is_sub8x8) {
  ------------------
  |  Branch (1647:13): [True: 1.14k, False: 6.47k]
  ------------------
 1648|  1.14k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  1.14k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.14k]
  |  |  |  Branch (140:68): [Folded, False: 1.14k]
  |  |  ------------------
  ------------------
 1649|  1.14k|            r = &t->rt.r[(t->by & 31) + 5];
 1650|  1.14k|            if (bw4 == 1) is_sub8x8 &= r[0][t->bx - 1].ref.ref[0] > 0;
  ------------------
  |  Branch (1650:17): [True: 606, False: 540]
  ------------------
 1651|  1.14k|            if (bh4 == ss_ver) is_sub8x8 &= r[-1][t->bx].ref.ref[0] > 0;
  ------------------
  |  Branch (1651:17): [True: 747, False: 399]
  ------------------
 1652|  1.14k|            if (bw4 == 1 && bh4 == ss_ver)
  ------------------
  |  Branch (1652:17): [True: 606, False: 540]
  |  Branch (1652:29): [True: 207, False: 399]
  ------------------
 1653|    207|                is_sub8x8 &= r[-1][t->bx - 1].ref.ref[0] > 0;
 1654|  1.14k|        }
 1655|       |
 1656|       |        // chroma prediction
 1657|  7.62k|        if (is_sub8x8) {
  ------------------
  |  Branch (1657:13): [True: 1.13k, False: 6.48k]
  ------------------
 1658|  1.13k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  1.13k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.13k]
  |  |  |  Branch (140:68): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1659|  1.13k|            ptrdiff_t h_off = 0, v_off = 0;
 1660|  1.13k|            if (bw4 == 1 && bh4 == ss_ver) {
  ------------------
  |  Branch (1660:17): [True: 601, False: 532]
  |  Branch (1660:29): [True: 205, False: 396]
  ------------------
 1661|    615|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1661:34): [True: 410, False: 205]
  ------------------
 1662|    410|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1663|    410|                             NULL, f->cur.stride[1],
 1664|    410|                             bw4, bh4, t->bx - 1, t->by - 1, 1 + pl,
 1665|    410|                             r[-1][t->bx - 1].mv.mv[0],
 1666|    410|                             &f->refp[r[-1][t->bx - 1].ref.ref[0] - 1],
 1667|    410|                             r[-1][t->bx - 1].ref.ref[0] - 1,
 1668|    410|                             t->frame_thread.pass != 2 ? t->tl_4x4_filter :
  ------------------
  |  Branch (1668:30): [True: 410, False: 0]
  ------------------
 1669|    410|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx - 1].filter2d);
 1670|    410|                    if (res) return res;
  ------------------
  |  Branch (1670:25): [True: 0, False: 410]
  ------------------
 1671|    410|                }
 1672|    205|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
 1673|    205|                h_off = 2;
 1674|    205|            }
 1675|  1.13k|            if (bw4 == 1) {
  ------------------
  |  Branch (1675:17): [True: 601, False: 532]
  ------------------
 1676|    601|                const enum Filter2d left_filter_2d =
 1677|    601|                    dav1d_filter_2d[t->l.filter[1][by4]][t->l.filter[0][by4]];
 1678|  1.80k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1678:34): [True: 1.20k, False: 601]
  ------------------
 1679|  1.20k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + v_off, NULL,
 1680|  1.20k|                             f->cur.stride[1], bw4, bh4, t->bx - 1,
 1681|  1.20k|                             t->by, 1 + pl, r[0][t->bx - 1].mv.mv[0],
 1682|  1.20k|                             &f->refp[r[0][t->bx - 1].ref.ref[0] - 1],
 1683|  1.20k|                             r[0][t->bx - 1].ref.ref[0] - 1,
 1684|  1.20k|                             t->frame_thread.pass != 2 ? left_filter_2d :
  ------------------
  |  Branch (1684:30): [True: 1.20k, False: 0]
  ------------------
 1685|  1.20k|                                 f->frame_thread.b[(t->by * f->b4_stride) + t->bx - 1].filter2d);
 1686|  1.20k|                    if (res) return res;
  ------------------
  |  Branch (1686:25): [True: 0, False: 1.20k]
  ------------------
 1687|  1.20k|                }
 1688|    601|                h_off = 2;
 1689|    601|            }
 1690|  1.13k|            if (bh4 == ss_ver) {
  ------------------
  |  Branch (1690:17): [True: 737, False: 396]
  ------------------
 1691|    737|                const enum Filter2d top_filter_2d =
 1692|    737|                    dav1d_filter_2d[t->a->filter[1][bx4]][t->a->filter[0][bx4]];
 1693|  2.21k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1693:34): [True: 1.47k, False: 737]
  ------------------
 1694|  1.47k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off, NULL,
 1695|  1.47k|                             f->cur.stride[1], bw4, bh4, t->bx, t->by - 1,
 1696|  1.47k|                             1 + pl, r[-1][t->bx].mv.mv[0],
 1697|  1.47k|                             &f->refp[r[-1][t->bx].ref.ref[0] - 1],
 1698|  1.47k|                             r[-1][t->bx].ref.ref[0] - 1,
 1699|  1.47k|                             t->frame_thread.pass != 2 ? top_filter_2d :
  ------------------
  |  Branch (1699:30): [True: 1.47k, False: 0]
  ------------------
 1700|  1.47k|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx].filter2d);
 1701|  1.47k|                    if (res) return res;
  ------------------
  |  Branch (1701:25): [True: 0, False: 1.47k]
  ------------------
 1702|  1.47k|                }
 1703|    737|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
 1704|    737|            }
 1705|  3.39k|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1705:30): [True: 2.26k, False: 1.13k]
  ------------------
 1706|  2.26k|                res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off + v_off, NULL, f->cur.stride[1],
 1707|  2.26k|                         bw4, bh4, t->bx, t->by, 1 + pl, b->mv[0],
 1708|  2.26k|                         refp, b->ref[0], filter_2d);
 1709|  2.26k|                if (res) return res;
  ------------------
  |  Branch (1709:21): [True: 0, False: 2.26k]
  ------------------
 1710|  2.26k|            }
 1711|  6.48k|        } else {
 1712|  6.48k|            if (imin(cbw4, cbh4) > 1 &&
  ------------------
  |  Branch (1712:17): [True: 2.68k, False: 3.80k]
  ------------------
 1713|  2.68k|                ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1713:19): [True: 1.36k, False: 1.32k]
  |  Branch (1713:48): [True: 303, False: 1.05k]
  ------------------
 1714|  2.38k|                 (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1714:19): [True: 140, False: 2.24k]
  |  Branch (1714:48): [True: 125, False: 15]
  ------------------
 1715|    428|            {
 1716|  1.28k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1716:34): [True: 856, False: 428]
  ------------------
 1717|    856|                    res = warp_affine(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff, NULL,
 1718|    856|                                      f->cur.stride[1], b_dim, 1 + pl, refp,
 1719|    856|                                      b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1719:39): [True: 250, False: 606]
  ------------------
 1720|    856|                                          &f->frame_hdr->gmv[b->ref[0]]);
 1721|    856|                    if (res) return res;
  ------------------
  |  Branch (1721:25): [True: 0, False: 856]
  ------------------
 1722|    856|                }
 1723|  6.06k|            } else {
 1724|  18.1k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1724:34): [True: 12.1k, False: 6.06k]
  ------------------
 1725|  12.1k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1726|  12.1k|                             NULL, f->cur.stride[1],
 1727|  12.1k|                             bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1728|  12.1k|                             t->bx & ~ss_hor, t->by & ~ss_ver,
 1729|  12.1k|                             1 + pl, b->mv[0], refp, b->ref[0], filter_2d);
 1730|  12.1k|                    if (res) return res;
  ------------------
  |  Branch (1730:25): [True: 0, False: 12.1k]
  ------------------
 1731|  12.1k|                    if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1731:25): [True: 3.61k, False: 8.50k]
  ------------------
 1732|  3.61k|                        res = obmc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1733|  3.61k|                                   f->cur.stride[1], b_dim, 1 + pl, bx4, by4, w4, h4);
 1734|  3.61k|                        if (res) return res;
  ------------------
  |  Branch (1734:29): [True: 0, False: 3.61k]
  ------------------
 1735|  3.61k|                    }
 1736|  12.1k|                }
 1737|  6.06k|            }
 1738|  6.48k|            if (b->interintra_type) {
  ------------------
  |  Branch (1738:17): [True: 181, False: 6.30k]
  ------------------
 1739|       |                // FIXME for 8x32 with 4:2:2 subsampling, this probably does
 1740|       |                // the wrong thing since it will select 4x16, not 4x32, as a
 1741|       |                // transform size...
 1742|    181|                const uint8_t *const ii_mask = II_MASK(chr_layout_idx, bs, b);
  ------------------
  |  |   83|    181|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|    181|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 128, False: 53]
  |  |  ------------------
  |  |   85|    181|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|    181|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1743|       |
 1744|    543|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1744:34): [True: 362, False: 181]
  ------------------
 1745|    362|                    pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   77|    362|#define bitfn(x) x##_16bpc
  ------------------
 1746|    362|                    pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   77|    362|#define bitfn(x) x##_16bpc
  ------------------
 1747|    362|                    enum IntraPredMode m =
 1748|    362|                        b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1748:25): [True: 82, False: 280]
  ------------------
 1749|    280|                        SMOOTH_PRED : b->interintra_mode;
 1750|    362|                    int angle = 0;
 1751|    362|                    pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1752|    362|                    const pixel *top_sb_edge = NULL;
 1753|    362|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1753:25): [True: 106, False: 256]
  ------------------
 1754|    106|                        top_sb_edge = f->ipred_edge[pl + 1];
 1755|    106|                        const int sby = t->by >> f->sb_shift;
 1756|    106|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1757|    106|                    }
 1758|    362|                    m = bytefn(dav1d_prepare_intra_edges)(t->bx >> ss_hor,
  ------------------
  |  |   87|    362|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|    362|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1759|    362|                                                          (t->bx >> ss_hor) >
 1760|    362|                                                              (ts->tiling.col_start >> ss_hor),
 1761|    362|                                                          t->by >> ss_ver,
 1762|    362|                                                          (t->by >> ss_ver) >
 1763|    362|                                                              (ts->tiling.row_start >> ss_ver),
 1764|    362|                                                          ts->tiling.col_end >> ss_hor,
 1765|    362|                                                          ts->tiling.row_end >> ss_ver,
 1766|    362|                                                          0, uvdst, f->cur.stride[1],
 1767|    362|                                                          top_sb_edge, m,
 1768|    362|                                                          &angle, cbw4, cbh4, 0, tl_edge
 1769|    362|                                                          HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    362|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1770|    362|                    dsp->ipred.intra_pred[m](tmp, cbw4 * 4 * sizeof(pixel),
 1771|    362|                                             tl_edge, cbw4 * 4, cbh4 * 4, 0, 0, 0
 1772|    362|                                             HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    362|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1773|    362|                    dsp->mc.blend(uvdst, f->cur.stride[1], tmp,
 1774|    362|                                  cbw4 * 4, cbh4 * 4, ii_mask);
 1775|    362|                }
 1776|    181|            }
 1777|  6.48k|        }
 1778|       |
 1779|  26.8k|    skip_inter_chroma_pred: {}
 1780|  26.8k|        t->tl_4x4_filter = filter_2d;
 1781|  26.8k|    } else {
 1782|  7.42k|        const enum Filter2d filter_2d = b->filter2d;
 1783|       |        // Maximum super block size is 128x128
 1784|  7.42k|        int16_t (*tmp)[128 * 128] = t->scratch.compinter;
 1785|  7.42k|        int jnt_weight;
 1786|  7.42k|        uint8_t *const seg_mask = t->scratch.seg_mask;
 1787|  7.42k|        const uint8_t *mask;
 1788|       |
 1789|  22.2k|        for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1789:25): [True: 14.8k, False: 7.42k]
  ------------------
 1790|  14.8k|            const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1791|       |
 1792|  14.8k|            if (b->inter_mode == GLOBALMV_GLOBALMV && f->gmv_warp_allowed[b->ref[i]]) {
  ------------------
  |  Branch (1792:17): [True: 1.32k, False: 13.5k]
  |  Branch (1792:55): [True: 505, False: 817]
  ------------------
 1793|    505|                res = warp_affine(t, NULL, tmp[i], bw4 * 4, b_dim, 0, refp,
 1794|    505|                                  &f->frame_hdr->gmv[b->ref[i]]);
 1795|    505|                if (res) return res;
  ------------------
  |  Branch (1795:21): [True: 0, False: 505]
  ------------------
 1796|  14.3k|            } else {
 1797|  14.3k|                res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by, 0,
 1798|  14.3k|                         b->mv[i], refp, b->ref[i], filter_2d);
 1799|  14.3k|                if (res) return res;
  ------------------
  |  Branch (1799:21): [True: 0, False: 14.3k]
  ------------------
 1800|  14.3k|            }
 1801|  14.8k|        }
 1802|  7.42k|        switch (b->comp_type) {
  ------------------
  |  Branch (1802:17): [True: 7.42k, False: 0]
  ------------------
 1803|  5.49k|        case COMP_INTER_AVG:
  ------------------
  |  Branch (1803:9): [True: 5.49k, False: 1.93k]
  ------------------
 1804|  5.49k|            dsp->mc.avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1805|  5.49k|                        bw4 * 4, bh4 * 4 HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  5.49k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1806|  5.49k|            break;
 1807|  1.45k|        case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1807:9): [True: 1.45k, False: 5.96k]
  ------------------
 1808|  1.45k|            jnt_weight = f->jnt_weights[b->ref[0]][b->ref[1]];
 1809|  1.45k|            dsp->mc.w_avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1810|  1.45k|                          bw4 * 4, bh4 * 4, jnt_weight HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.45k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1811|  1.45k|            break;
 1812|    372|        case COMP_INTER_SEG:
  ------------------
  |  Branch (1812:9): [True: 372, False: 7.05k]
  ------------------
 1813|    372|            dsp->mc.w_mask[chr_layout_idx](dst, f->cur.stride[0],
 1814|    372|                                           tmp[b->mask_sign], tmp[!b->mask_sign],
 1815|    372|                                           bw4 * 4, bh4 * 4, seg_mask,
 1816|    372|                                           b->mask_sign HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    372|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1817|    372|            mask = seg_mask;
 1818|    372|            break;
 1819|    100|        case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1819:9): [True: 100, False: 7.32k]
  ------------------
 1820|    100|            mask = WEDGE_MASK(0, bs, 0, b->wedge_idx);
  ------------------
  |  |   89|    100|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|    100|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1821|    100|            dsp->mc.mask(dst, f->cur.stride[0],
 1822|    100|                         tmp[b->mask_sign], tmp[!b->mask_sign],
 1823|    100|                         bw4 * 4, bh4 * 4, mask HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    100|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1824|    100|            if (has_chroma)
  ------------------
  |  Branch (1824:17): [True: 47, False: 53]
  ------------------
 1825|     47|                mask = WEDGE_MASK(chr_layout_idx, bs, b->mask_sign, b->wedge_idx);
  ------------------
  |  |   89|     47|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|     47|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1826|    100|            break;
 1827|  7.42k|        }
 1828|       |
 1829|       |        // chroma
 1830|  7.42k|        if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1830:13): [True: 1.05k, False: 6.36k]
  |  Branch (1830:42): [True: 2.11k, False: 1.05k]
  ------------------
 1831|  6.33k|            for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1831:29): [True: 4.22k, False: 2.11k]
  ------------------
 1832|  4.22k|                const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1833|  4.22k|                if (b->inter_mode == GLOBALMV_GLOBALMV &&
  ------------------
  |  Branch (1833:21): [True: 500, False: 3.72k]
  ------------------
 1834|    500|                    imin(cbw4, cbh4) > 1 && f->gmv_warp_allowed[b->ref[i]])
  ------------------
  |  Branch (1834:21): [True: 296, False: 204]
  |  Branch (1834:45): [True: 30, False: 266]
  ------------------
 1835|     30|                {
 1836|     30|                    res = warp_affine(t, NULL, tmp[i], bw4 * 4 >> ss_hor,
 1837|     30|                                      b_dim, 1 + pl,
 1838|     30|                                      refp, &f->frame_hdr->gmv[b->ref[i]]);
 1839|     30|                    if (res) return res;
  ------------------
  |  Branch (1839:25): [True: 0, False: 30]
  ------------------
 1840|  4.19k|                } else {
 1841|  4.19k|                    res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by,
 1842|  4.19k|                             1 + pl, b->mv[i], refp, b->ref[i], filter_2d);
 1843|  4.19k|                    if (res) return res;
  ------------------
  |  Branch (1843:25): [True: 0, False: 4.19k]
  ------------------
 1844|  4.19k|                }
 1845|  4.22k|            }
 1846|  2.11k|            pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1847|  2.11k|            switch (b->comp_type) {
  ------------------
  |  Branch (1847:21): [True: 2.11k, False: 0]
  ------------------
 1848|  1.55k|            case COMP_INTER_AVG:
  ------------------
  |  Branch (1848:13): [True: 1.55k, False: 554]
  ------------------
 1849|  1.55k|                dsp->mc.avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1850|  1.55k|                            bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver
 1851|  1.55k|                            HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.55k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1852|  1.55k|                break;
 1853|     98|            case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1853:13): [True: 98, False: 2.01k]
  ------------------
 1854|     98|                dsp->mc.w_avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1855|     98|                              bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, jnt_weight
 1856|     98|                              HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|     98|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1857|     98|                break;
 1858|     94|            case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1858:13): [True: 94, False: 2.01k]
  ------------------
 1859|    456|            case COMP_INTER_SEG:
  ------------------
  |  Branch (1859:13): [True: 362, False: 1.74k]
  ------------------
 1860|    456|                dsp->mc.mask(uvdst, f->cur.stride[1],
 1861|    456|                             tmp[b->mask_sign], tmp[!b->mask_sign],
 1862|    456|                             bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, mask
 1863|    456|                             HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    456|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1864|    456|                break;
 1865|  2.11k|            }
 1866|  2.11k|        }
 1867|  7.42k|    }
 1868|       |
 1869|   137k|    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|   137k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 137k]
  |  |  ------------------
  |  |   35|   137k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|   137k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1870|      0|        hex_dump(dst, f->cur.stride[0], b_dim[0] * 4, b_dim[1] * 4, "y-pred");
 1871|      0|        if (has_chroma) {
  ------------------
  |  Branch (1871:13): [True: 0, False: 0]
  ------------------
 1872|      0|            hex_dump(&((pixel *) f->cur.data[1])[uvdstoff], f->cur.stride[1],
 1873|      0|                     cbw4 * 4, cbh4 * 4, "u-pred");
 1874|      0|            hex_dump(&((pixel *) f->cur.data[2])[uvdstoff], f->cur.stride[1],
 1875|      0|                     cbw4 * 4, cbh4 * 4, "v-pred");
 1876|      0|        }
 1877|      0|    }
 1878|       |
 1879|   137k|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
 1880|       |
 1881|   137k|    if (b->skip) {
  ------------------
  |  Branch (1881:9): [True: 96.1k, False: 41.1k]
  ------------------
 1882|       |        // reset coef contexts
 1883|  96.1k|        BlockContext *const a = t->a;
 1884|  96.1k|        dav1d_memset_pow2[b_dim[2]](&a->lcoef[bx4], 0x40);
 1885|  96.1k|        dav1d_memset_pow2[b_dim[3]](&t->l.lcoef[by4], 0x40);
 1886|  96.1k|        if (has_chroma) {
  ------------------
  |  Branch (1886:13): [True: 62.9k, False: 33.2k]
  ------------------
 1887|  62.9k|            dav1d_memset_pow2_fn memset_cw = dav1d_memset_pow2[ulog2(cbw4)];
 1888|  62.9k|            dav1d_memset_pow2_fn memset_ch = dav1d_memset_pow2[ulog2(cbh4)];
 1889|  62.9k|            memset_cw(&a->ccoef[0][cbx4], 0x40);
 1890|  62.9k|            memset_cw(&a->ccoef[1][cbx4], 0x40);
 1891|  62.9k|            memset_ch(&t->l.ccoef[0][cby4], 0x40);
 1892|  62.9k|            memset_ch(&t->l.ccoef[1][cby4], 0x40);
 1893|  62.9k|        }
 1894|  96.1k|        return 0;
 1895|  96.1k|    }
 1896|       |
 1897|  41.1k|    const TxfmInfo *const uvtx = &dav1d_txfm_dimensions[b->uvtx];
 1898|  41.1k|    const TxfmInfo *const ytx = &dav1d_txfm_dimensions[b->max_ytx];
 1899|  41.1k|    const uint16_t tx_split[2] = { b->tx_split0, b->tx_split1 };
 1900|       |
 1901|  83.4k|    for (int init_y = 0; init_y < bh4; init_y += 16) {
  ------------------
  |  Branch (1901:26): [True: 42.2k, False: 41.1k]
  ------------------
 1902|  85.6k|        for (int init_x = 0; init_x < bw4; init_x += 16) {
  ------------------
  |  Branch (1902:30): [True: 43.3k, False: 42.2k]
  ------------------
 1903|       |            // coefficient coding & inverse transforms
 1904|  43.3k|            int y_off = !!init_y, y;
 1905|  43.3k|            dst += PXSTRIDE(f->cur.stride[0]) * 4 * init_y;
 1906|  87.4k|            for (y = init_y, t->by += init_y; y < imin(h4, init_y + 16);
  ------------------
  |  Branch (1906:47): [True: 44.1k, False: 43.3k]
  ------------------
 1907|  44.1k|                 y += ytx->h, y_off++)
 1908|  44.1k|            {
 1909|  44.1k|                int x, x_off = !!init_x;
 1910|  91.7k|                for (x = init_x, t->bx += init_x; x < imin(w4, init_x + 16);
  ------------------
  |  Branch (1910:51): [True: 47.6k, False: 44.1k]
  ------------------
 1911|  47.6k|                     x += ytx->w, x_off++)
 1912|  47.6k|                {
 1913|  47.6k|                    read_coef_tree(t, bs, b, b->max_ytx, 0, tx_split,
 1914|  47.6k|                                   x_off, y_off, &dst[x * 4]);
 1915|  47.6k|                    t->bx += ytx->w;
 1916|  47.6k|                }
 1917|  44.1k|                dst += PXSTRIDE(f->cur.stride[0]) * 4 * ytx->h;
 1918|  44.1k|                t->bx -= x;
 1919|  44.1k|                t->by += ytx->h;
 1920|  44.1k|            }
 1921|  43.3k|            dst -= PXSTRIDE(f->cur.stride[0]) * 4 * y;
 1922|  43.3k|            t->by -= y;
 1923|       |
 1924|       |            // chroma coefs and inverse transform
 1925|  59.3k|            if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1925:17): [True: 19.7k, False: 23.5k]
  |  Branch (1925:46): [True: 39.5k, False: 19.7k]
  ------------------
 1926|  39.5k|                pixel *uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff +
 1927|  39.5k|                    (PXSTRIDE(f->cur.stride[1]) * init_y * 4 >> ss_ver);
 1928|  39.5k|                for (y = init_y >> ss_ver, t->by += init_y;
 1929|  82.3k|                     y < imin(ch4, (init_y + 16) >> ss_ver); y += uvtx->h)
  ------------------
  |  Branch (1929:22): [True: 42.7k, False: 39.5k]
  ------------------
 1930|  42.7k|                {
 1931|  42.7k|                    int x;
 1932|  42.7k|                    for (x = init_x >> ss_hor, t->bx += init_x;
 1933|  94.6k|                         x < imin(cw4, (init_x + 16) >> ss_hor); x += uvtx->w)
  ------------------
  |  Branch (1933:26): [True: 51.8k, False: 42.7k]
  ------------------
 1934|  51.8k|                    {
 1935|  51.8k|                        coef *cf;
 1936|  51.8k|                        int eob;
 1937|  51.8k|                        enum TxfmType txtp;
 1938|  51.8k|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1938:29): [True: 0, False: 51.8k]
  ------------------
 1939|      0|                            const int p = t->frame_thread.pass & 1;
 1940|      0|                            const int cbi = *ts->frame_thread[p].cbi++;
 1941|      0|                            cf = ts->frame_thread[p].cf;
 1942|      0|                            ts->frame_thread[p].cf += uvtx->w * uvtx->h * 16;
 1943|      0|                            eob  = cbi >> 5;
 1944|      0|                            txtp = cbi & 0x1f;
 1945|  51.8k|                        } else {
 1946|  51.8k|                            uint8_t cf_ctx;
 1947|  51.8k|                            cf = bitfn(t->cf);
  ------------------
  |  |   77|  51.8k|#define bitfn(x) x##_16bpc
  ------------------
 1948|  51.8k|                            txtp = t->scratch.txtp_map[(by4 + (y << ss_ver)) * 32 +
 1949|  51.8k|                                                        bx4 + (x << ss_hor)];
 1950|  51.8k|                            eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1951|  51.8k|                                               &t->l.ccoef[pl][cby4 + y],
 1952|  51.8k|                                               b->uvtx, bs, b, 0, 1 + pl,
 1953|  51.8k|                                               cf, &txtp, &cf_ctx);
 1954|  51.8k|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  51.8k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 51.8k]
  |  |  ------------------
  |  |   35|  51.8k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  51.8k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1955|      0|                                printf("Post-uv-cf-blk[pl=%d,tx=%d,"
 1956|      0|                                       "txtp=%d,eob=%d]: r=%d\n",
 1957|      0|                                       pl, b->uvtx, txtp, eob, ts->msac.rng);
 1958|  51.8k|                            int ctw = imin(uvtx->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1959|  51.8k|                            int cth = imin(uvtx->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1960|  51.8k|                            dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1961|  51.8k|                            dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1962|  51.8k|                        }
 1963|  51.8k|                        if (eob >= 0) {
  ------------------
  |  Branch (1963:29): [True: 13.1k, False: 38.7k]
  ------------------
 1964|  13.1k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  13.1k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 13.1k]
  |  |  ------------------
  |  |   35|  13.1k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  13.1k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1965|      0|                                coef_dump(cf, uvtx->h * 4, uvtx->w * 4, 3, "dq");
 1966|  13.1k|                            dsp->itx.itxfm_add[b->uvtx]
 1967|  13.1k|                                              [txtp](&uvdst[4 * x],
 1968|  13.1k|                                                     f->cur.stride[1],
 1969|  13.1k|                                                     cf, eob HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  13.1k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1970|  13.1k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  13.1k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 13.1k]
  |  |  ------------------
  |  |   35|  13.1k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  13.1k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   37|      0|#define DEBUG_B_PIXELS 0
  |  |  ------------------
  |  |  |  Branch (37:24): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1971|      0|                                hex_dump(&uvdst[4 * x], f->cur.stride[1],
 1972|      0|                                         uvtx->w * 4, uvtx->h * 4, "recon");
 1973|  13.1k|                        }
 1974|  51.8k|                        t->bx += uvtx->w << ss_hor;
 1975|  51.8k|                    }
 1976|  42.7k|                    uvdst += PXSTRIDE(f->cur.stride[1]) * 4 * uvtx->h;
 1977|  42.7k|                    t->bx -= x << ss_hor;
 1978|  42.7k|                    t->by += uvtx->h << ss_ver;
 1979|  42.7k|                }
 1980|  39.5k|                t->by -= y << ss_ver;
 1981|  39.5k|            }
 1982|  43.3k|        }
 1983|  42.2k|    }
 1984|  41.1k|    return 0;
 1985|   137k|}
dav1d_filter_sbrow_deblock_cols_16bpc:
 1987|  34.8k|void bytefn(dav1d_filter_sbrow_deblock_cols)(Dav1dFrameContext *const f, const int sby) {
 1988|  34.8k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK) ||
  ------------------
  |  Branch (1988:9): [True: 0, False: 34.8k]
  ------------------
 1989|  34.8k|        (!f->frame_hdr->loopfilter.level_y[0] && !f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (1989:10): [True: 12.0k, False: 22.8k]
  |  Branch (1989:50): [True: 10.7k, False: 1.27k]
  ------------------
 1990|  10.7k|    {
 1991|  10.7k|        return;
 1992|  10.7k|    }
 1993|  24.1k|    const int y = sby * f->sb_step * 4;
 1994|  24.1k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1995|  24.1k|    pixel *const p[3] = {
 1996|  24.1k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
 1997|  24.1k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 1998|  24.1k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
 1999|  24.1k|    };
 2000|  24.1k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2001|  24.1k|    bytefn(dav1d_loopfilter_sbrow_cols)(f, p, mask, sby,
  ------------------
  |  |   87|  24.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  24.1k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2002|  24.1k|                                        f->lf.start_of_tile_row[sby]);
 2003|  24.1k|}
dav1d_filter_sbrow_deblock_rows_16bpc:
 2005|  34.8k|void bytefn(dav1d_filter_sbrow_deblock_rows)(Dav1dFrameContext *const f, const int sby) {
 2006|  34.8k|    const int y = sby * f->sb_step * 4;
 2007|  34.8k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2008|  34.8k|    pixel *const p[3] = {
 2009|  34.8k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
 2010|  34.8k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2011|  34.8k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
 2012|  34.8k|    };
 2013|  34.8k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2014|  34.8k|    if (f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK &&
  ------------------
  |  Branch (2014:9): [True: 34.8k, False: 0]
  ------------------
 2015|  34.8k|        (f->frame_hdr->loopfilter.level_y[0] || f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (2015:10): [True: 22.8k, False: 12.0k]
  |  Branch (2015:49): [True: 1.27k, False: 10.7k]
  ------------------
 2016|  24.1k|    {
 2017|  24.1k|        bytefn(dav1d_loopfilter_sbrow_rows)(f, p, mask, sby);
  ------------------
  |  |   87|  24.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  24.1k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2018|  24.1k|    }
 2019|  34.8k|    if (f->seq_hdr->cdef || f->lf.restore_planes) {
  ------------------
  |  Branch (2019:9): [True: 21.6k, False: 13.2k]
  |  Branch (2019:29): [True: 3.15k, False: 10.1k]
  ------------------
 2020|       |        // Store loop filtered pixels required by CDEF / LR
 2021|  24.7k|        bytefn(dav1d_copy_lpf)(f, p, sby);
  ------------------
  |  |   87|  24.7k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  24.7k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2022|  24.7k|    }
 2023|  34.8k|}
dav1d_filter_sbrow_cdef_16bpc:
 2025|  21.6k|void bytefn(dav1d_filter_sbrow_cdef)(Dav1dTaskContext *const tc, const int sby) {
 2026|  21.6k|    const Dav1dFrameContext *const f = tc->f;
 2027|  21.6k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_CDEF)) return;
  ------------------
  |  Branch (2027:9): [True: 0, False: 21.6k]
  ------------------
 2028|  21.6k|    const int sbsz = f->sb_step;
 2029|  21.6k|    const int y = sby * sbsz * 4;
 2030|  21.6k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2031|  21.6k|    pixel *const p[3] = {
 2032|  21.6k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
 2033|  21.6k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2034|  21.6k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
 2035|  21.6k|    };
 2036|  21.6k|    Av1Filter *prev_mask = f->lf.mask + ((sby - 1) >> !f->seq_hdr->sb128) * f->sb128w;
 2037|  21.6k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2038|  21.6k|    const int start = sby * sbsz;
 2039|  21.6k|    if (sby) {
  ------------------
  |  Branch (2039:9): [True: 17.0k, False: 4.53k]
  ------------------
 2040|  17.0k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2041|  17.0k|        pixel *p_up[3] = {
 2042|  17.0k|            p[0] - 8 * PXSTRIDE(f->cur.stride[0]),
 2043|  17.0k|            p[1] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2044|  17.0k|            p[2] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2045|  17.0k|        };
 2046|  17.0k|        bytefn(dav1d_cdef_brow)(tc, p_up, prev_mask, start - 2, start, 1, sby);
  ------------------
  |  |   87|  17.0k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  17.0k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2047|  17.0k|    }
 2048|  21.6k|    const int n_blks = sbsz - 2 * (sby + 1 < f->sbh);
 2049|  21.6k|    const int end = imin(start + n_blks, f->bh);
 2050|  21.6k|    bytefn(dav1d_cdef_brow)(tc, p, mask, start, end, 0, sby);
  ------------------
  |  |   87|  21.6k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  21.6k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2051|  21.6k|}
dav1d_filter_sbrow_resize_16bpc:
 2053|  5.22k|void bytefn(dav1d_filter_sbrow_resize)(Dav1dFrameContext *const f, const int sby) {
 2054|  5.22k|    const int sbsz = f->sb_step;
 2055|  5.22k|    const int y = sby * sbsz * 4;
 2056|  5.22k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2057|  5.22k|    const pixel *const p[3] = {
 2058|  5.22k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
 2059|  5.22k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2060|  5.22k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
 2061|  5.22k|    };
 2062|  5.22k|    pixel *const sr_p[3] = {
 2063|  5.22k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
 2064|  5.22k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
 2065|  5.22k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
 2066|  5.22k|    };
 2067|  5.22k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400;
 2068|  18.4k|    for (int pl = 0; pl < 1 + 2 * has_chroma; pl++) {
  ------------------
  |  Branch (2068:22): [True: 13.2k, False: 5.22k]
  ------------------
 2069|  13.2k|        const int ss_ver = pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (2069:28): [True: 8.00k, False: 5.22k]
  |  Branch (2069:34): [True: 3.25k, False: 4.74k]
  ------------------
 2070|  13.2k|        const int h_start = 8 * !!sby >> ss_ver;
 2071|  13.2k|        const ptrdiff_t dst_stride = f->sr_cur.p.stride[!!pl];
 2072|  13.2k|        pixel *dst = sr_p[pl] - h_start * PXSTRIDE(dst_stride);
 2073|  13.2k|        const ptrdiff_t src_stride = f->cur.stride[!!pl];
 2074|  13.2k|        const pixel *src = p[pl] - h_start * PXSTRIDE(src_stride);
 2075|  13.2k|        const int h_end = 4 * (sbsz - 2 * (sby + 1 < f->sbh)) >> ss_ver;
 2076|  13.2k|        const int ss_hor = pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2076:28): [True: 8.00k, False: 5.22k]
  |  Branch (2076:34): [True: 3.28k, False: 4.72k]
  ------------------
 2077|  13.2k|        const int dst_w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 2078|  13.2k|        const int src_w = (4 * f->bw + ss_hor) >> ss_hor;
 2079|  13.2k|        const int img_h = (f->cur.p.h - sbsz * 4 * sby + ss_ver) >> ss_ver;
 2080|       |
 2081|  13.2k|        f->dsp->mc.resize(dst, dst_stride, src, src_stride, dst_w,
 2082|  13.2k|                          imin(img_h, h_end) + h_start, src_w,
 2083|  13.2k|                          f->resize_step[!!pl], f->resize_start[!!pl]
 2084|  13.2k|                          HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  13.2k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 2085|  13.2k|    }
 2086|  5.22k|}
dav1d_filter_sbrow_lr_16bpc:
 2088|  10.8k|void bytefn(dav1d_filter_sbrow_lr)(Dav1dFrameContext *const f, const int sby) {
 2089|  10.8k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_RESTORATION)) return;
  ------------------
  |  Branch (2089:9): [True: 0, False: 10.8k]
  ------------------
 2090|  10.8k|    const int y = sby * f->sb_step * 4;
 2091|  10.8k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2092|  10.8k|    pixel *const sr_p[3] = {
 2093|  10.8k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
 2094|  10.8k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
 2095|  10.8k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
 2096|  10.8k|    };
 2097|  10.8k|    bytefn(dav1d_lr_sbrow)(f, sr_p, sby);
  ------------------
  |  |   87|  10.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  10.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2098|  10.8k|}
dav1d_filter_sbrow_16bpc:
 2100|  34.8k|void bytefn(dav1d_filter_sbrow)(Dav1dFrameContext *const f, const int sby) {
 2101|  34.8k|    bytefn(dav1d_filter_sbrow_deblock_cols)(f, sby);
  ------------------
  |  |   87|  34.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  34.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2102|  34.8k|    bytefn(dav1d_filter_sbrow_deblock_rows)(f, sby);
  ------------------
  |  |   87|  34.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  34.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2103|  34.8k|    if (f->seq_hdr->cdef)
  ------------------
  |  Branch (2103:9): [True: 21.6k, False: 13.2k]
  ------------------
 2104|  21.6k|        bytefn(dav1d_filter_sbrow_cdef)(f->c->tc, sby);
  ------------------
  |  |   87|  21.6k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  21.6k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2105|  34.8k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1])
  ------------------
  |  Branch (2105:9): [True: 5.22k, False: 29.6k]
  ------------------
 2106|  5.22k|        bytefn(dav1d_filter_sbrow_resize)(f, sby);
  ------------------
  |  |   87|  5.22k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  5.22k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2107|  34.8k|    if (f->lf.restore_planes)
  ------------------
  |  Branch (2107:9): [True: 10.8k, False: 24.0k]
  ------------------
 2108|  10.8k|        bytefn(dav1d_filter_sbrow_lr)(f, sby);
  ------------------
  |  |   87|  10.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  10.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2109|  34.8k|}
dav1d_backup_ipred_edge_16bpc:
 2111|  37.6k|void bytefn(dav1d_backup_ipred_edge)(Dav1dTaskContext *const t) {
 2112|  37.6k|    const Dav1dFrameContext *const f = t->f;
 2113|  37.6k|    Dav1dTileState *const ts = t->ts;
 2114|  37.6k|    const int sby = t->by >> f->sb_shift;
 2115|  37.6k|    const int sby_off = f->sb128w * 128 * sby;
 2116|  37.6k|    const int x_off = ts->tiling.col_start;
 2117|       |
 2118|  37.6k|    const pixel *const y =
 2119|  37.6k|        ((const pixel *) f->cur.data[0]) + x_off * 4 +
 2120|  37.6k|                    ((t->by + f->sb_step) * 4 - 1) * PXSTRIDE(f->cur.stride[0]);
 2121|  37.6k|    pixel_copy(&f->ipred_edge[0][sby_off + x_off * 4], y,
  ------------------
  |  |   65|  37.6k|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
 2122|  37.6k|               4 * (ts->tiling.col_end - x_off));
 2123|       |
 2124|  37.6k|    if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (2124:9): [True: 30.0k, False: 7.63k]
  ------------------
 2125|  30.0k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2126|  30.0k|        const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 2127|       |
 2128|  30.0k|        const ptrdiff_t uv_off = (x_off * 4 >> ss_hor) +
 2129|  30.0k|            (((t->by + f->sb_step) * 4 >> ss_ver) - 1) * PXSTRIDE(f->cur.stride[1]);
 2130|  90.0k|        for (int pl = 1; pl <= 2; pl++)
  ------------------
  |  Branch (2130:26): [True: 60.0k, False: 30.0k]
  ------------------
 2131|  60.0k|            pixel_copy(&f->ipred_edge[pl][sby_off + (x_off * 4 >> ss_hor)],
  ------------------
  |  |   65|  60.0k|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
 2132|  30.0k|                       &((const pixel *) f->cur.data[pl])[uv_off],
 2133|  30.0k|                       4 * (ts->tiling.col_end - x_off) >> ss_hor);
 2134|  30.0k|    }
 2135|  37.6k|}
dav1d_copy_pal_block_y_16bpc:
 2141|  6.14k|{
 2142|  6.14k|    const Dav1dFrameContext *const f = t->f;
 2143|  6.14k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2143:24): [True: 0, False: 6.14k]
  ------------------
 2144|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2145|      0|                            ((t->bx >> 1) + (t->by & 1))][0] :
 2146|  6.14k|        bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  6.14k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  6.14k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2147|  30.1k|    for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2147:21): [True: 23.9k, False: 6.14k]
  ------------------
 2148|  23.9k|        memcpy(bytefn(t->al_pal)[0][bx4 + x][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  23.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  23.9k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2149|  24.5k|    for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2149:21): [True: 18.4k, False: 6.14k]
  ------------------
 2150|  18.4k|        memcpy(bytefn(t->al_pal)[1][by4 + y][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  18.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  18.4k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2151|  6.14k|}
dav1d_copy_pal_block_uv_16bpc:
 2157|  1.80k|{
 2158|  1.80k|    const Dav1dFrameContext *const f = t->f;
 2159|  1.80k|    const pixel (*const pal)[8] = t->frame_thread.pass ?
  ------------------
  |  Branch (2159:35): [True: 0, False: 1.80k]
  ------------------
 2160|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2161|      0|                            ((t->bx >> 1) + (t->by & 1))] :
 2162|  1.80k|        bytefn(t->scratch.pal);
  ------------------
  |  |   87|  1.80k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  1.80k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2163|       |    // see aomedia bug 2183 for why we use luma coordinates here
 2164|  5.40k|    for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (2164:22): [True: 3.60k, False: 1.80k]
  ------------------
 2165|  19.7k|        for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2165:25): [True: 16.1k, False: 3.60k]
  ------------------
 2166|  16.1k|            memcpy(bytefn(t->al_pal)[0][bx4 + x][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  16.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  16.1k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2167|  19.8k|        for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2167:25): [True: 16.2k, False: 3.60k]
  ------------------
 2168|  16.2k|            memcpy(bytefn(t->al_pal)[1][by4 + y][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  16.2k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  16.2k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2169|  3.60k|    }
 2170|  1.80k|}
dav1d_read_pal_plane_16bpc:
 2175|  7.94k|{
 2176|  7.94k|    Dav1dTileState *const ts = t->ts;
 2177|  7.94k|    const Dav1dFrameContext *const f = t->f;
 2178|  7.94k|    const int pal_sz = b->pal_sz[pl] = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  7.94k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 2179|  7.94k|                                           ts->cdf.m.pal_sz[pl][sz_ctx], 6) + 2;
 2180|  7.94k|    pixel cache[16], used_cache[8];
 2181|  7.94k|    int l_cache = pl ? t->pal_sz_uv[1][by4] : t->l.pal_sz[by4];
  ------------------
  |  Branch (2181:19): [True: 1.80k, False: 6.14k]
  ------------------
 2182|  7.94k|    int n_cache = 0;
 2183|       |    // don't reuse above palette outside SB64 boundaries
 2184|  7.94k|    int a_cache = by4 & 15 ? pl ? t->pal_sz_uv[0][bx4] : t->a->pal_sz[bx4] : 0;
  ------------------
  |  Branch (2184:19): [True: 5.86k, False: 2.08k]
  |  Branch (2184:30): [True: 1.19k, False: 4.66k]
  ------------------
 2185|  7.94k|    const pixel *l = bytefn(t->al_pal)[1][by4][pl];
  ------------------
  |  |   87|  7.94k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  7.94k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2186|  7.94k|    const pixel *a = bytefn(t->al_pal)[0][bx4][pl];
  ------------------
  |  |   87|  7.94k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  7.94k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2187|       |
 2188|       |    // fill/sort cache
 2189|  16.4k|    while (l_cache && a_cache) {
  ------------------
  |  Branch (2189:12): [True: 10.9k, False: 5.45k]
  |  Branch (2189:23): [True: 8.46k, False: 2.49k]
  ------------------
 2190|  8.46k|        if (*l < *a) {
  ------------------
  |  Branch (2190:13): [True: 3.26k, False: 5.19k]
  ------------------
 2191|  3.26k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2191:17): [True: 636, False: 2.63k]
  |  Branch (2191:29): [True: 2.58k, False: 45]
  ------------------
 2192|  3.22k|                cache[n_cache++] = *l;
 2193|  3.26k|            l++;
 2194|  3.26k|            l_cache--;
 2195|  5.19k|        } else {
 2196|  5.19k|            if (*a == *l) {
  ------------------
  |  Branch (2196:17): [True: 2.05k, False: 3.13k]
  ------------------
 2197|  2.05k|                l++;
 2198|  2.05k|                l_cache--;
 2199|  2.05k|            }
 2200|  5.19k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2200:17): [True: 903, False: 4.29k]
  |  Branch (2200:29): [True: 4.09k, False: 192]
  ------------------
 2201|  5.00k|                cache[n_cache++] = *a;
 2202|  5.19k|            a++;
 2203|  5.19k|            a_cache--;
 2204|  5.19k|        }
 2205|  8.46k|    }
 2206|  7.94k|    if (l_cache) {
  ------------------
  |  Branch (2206:9): [True: 2.49k, False: 5.45k]
  ------------------
 2207|  10.2k|        do {
 2208|  10.2k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2208:17): [True: 1.81k, False: 8.39k]
  |  Branch (2208:29): [True: 6.53k, False: 1.86k]
  ------------------
 2209|  8.34k|                cache[n_cache++] = *l;
 2210|  10.2k|            l++;
 2211|  10.2k|        } while (--l_cache > 0);
  ------------------
  |  Branch (2211:18): [True: 7.71k, False: 2.49k]
  ------------------
 2212|  5.45k|    } else if (a_cache) {
  ------------------
  |  Branch (2212:16): [True: 1.87k, False: 3.58k]
  ------------------
 2213|  7.27k|        do {
 2214|  7.27k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2214:17): [True: 1.18k, False: 6.08k]
  |  Branch (2214:29): [True: 4.68k, False: 1.40k]
  ------------------
 2215|  5.86k|                cache[n_cache++] = *a;
 2216|  7.27k|            a++;
 2217|  7.27k|        } while (--a_cache > 0);
  ------------------
  |  Branch (2217:18): [True: 5.40k, False: 1.87k]
  ------------------
 2218|  1.87k|    }
 2219|       |
 2220|       |    // find reused cache entries
 2221|  7.94k|    int i = 0;
 2222|  27.4k|    for (int n = 0; n < n_cache && i < pal_sz; n++)
  ------------------
  |  Branch (2222:21): [True: 20.5k, False: 6.98k]
  |  Branch (2222:36): [True: 19.5k, False: 960]
  ------------------
 2223|  19.5k|        if (dav1d_msac_decode_bool_equi(&ts->msac))
  ------------------
  |  |   53|  19.5k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2223:13): [True: 9.70k, False: 9.83k]
  ------------------
 2224|  9.70k|            used_cache[i++] = cache[n];
 2225|  7.94k|    const int n_used_cache = i;
 2226|       |
 2227|       |    // parse new entries
 2228|  7.94k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2228:24): [True: 0, False: 7.94k]
  ------------------
 2229|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2230|      0|                            ((t->bx >> 1) + (t->by & 1))][pl] :
 2231|  7.94k|        bytefn(t->scratch.pal)[pl];
  ------------------
  |  |   87|  7.94k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  7.94k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2232|  7.94k|    if (i < pal_sz) {
  ------------------
  |  Branch (2232:9): [True: 6.67k, False: 1.27k]
  ------------------
 2233|  6.67k|        const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2233:25): [Folded, False: 6.67k]
  ------------------
 2234|  6.67k|        int prev = pal[i++] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2235|       |
 2236|  6.67k|        if (i < pal_sz) {
  ------------------
  |  Branch (2236:13): [True: 5.99k, False: 675]
  ------------------
 2237|  5.99k|            int bits = bpc - 3 + dav1d_msac_decode_bools(&ts->msac, 2);
 2238|  5.99k|            const int max = (1 << bpc) - 1;
 2239|       |
 2240|  13.9k|            do {
 2241|  13.9k|                const int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2242|  13.9k|                prev = pal[i++] = imin(prev + delta + !pl, max);
 2243|  13.9k|                if (prev + !pl >= max) {
  ------------------
  |  Branch (2243:21): [True: 2.63k, False: 11.3k]
  ------------------
 2244|  7.65k|                    for (; i < pal_sz; i++)
  ------------------
  |  Branch (2244:28): [True: 5.01k, False: 2.63k]
  ------------------
 2245|  5.01k|                        pal[i] = max;
 2246|  2.63k|                    break;
 2247|  2.63k|                }
 2248|  11.3k|                bits = imin(bits, 1 + ulog2(max - prev - !pl));
 2249|  11.3k|            } while (i < pal_sz);
  ------------------
  |  Branch (2249:22): [True: 7.95k, False: 3.35k]
  ------------------
 2250|  5.99k|        }
 2251|       |
 2252|       |        // merge cache+new entries
 2253|  6.67k|        int n = 0, m = n_used_cache;
 2254|  38.4k|        for (i = 0; i < pal_sz; i++) {
  ------------------
  |  Branch (2254:21): [True: 31.7k, False: 6.67k]
  ------------------
 2255|  31.7k|            if (n < n_used_cache && (m >= pal_sz || used_cache[n] <= pal[m])) {
  ------------------
  |  Branch (2255:17): [True: 10.6k, False: 21.0k]
  |  Branch (2255:38): [True: 2.27k, False: 8.36k]
  |  Branch (2255:53): [True: 3.82k, False: 4.53k]
  ------------------
 2256|  6.09k|                pal[i] = used_cache[n++];
 2257|  25.6k|            } else {
 2258|  25.6k|                assert(m < pal_sz);
  ------------------
  |  |  140|  25.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 25.6k]
  |  |  |  Branch (140:68): [Folded, False: 25.6k]
  |  |  ------------------
  ------------------
 2259|  25.6k|                pal[i] = pal[m++];
 2260|  25.6k|            }
 2261|  31.7k|        }
 2262|  6.67k|    } else {
 2263|  1.27k|        memcpy(pal, used_cache, n_used_cache * sizeof(*used_cache));
 2264|  1.27k|    }
 2265|       |
 2266|  7.94k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  7.94k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 7.94k]
  |  |  ------------------
  |  |   35|  7.94k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  7.94k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2267|      0|        printf("Post-pal[pl=%d,sz=%d,cache_size=%d,used_cache=%d]: r=%d, cache=",
 2268|      0|               pl, pal_sz, n_cache, n_used_cache, ts->msac.rng);
 2269|      0|        for (int n = 0; n < n_cache; n++)
  ------------------
  |  Branch (2269:25): [True: 0, False: 0]
  ------------------
 2270|      0|            printf("%c%02x", n ? ' ' : '[', cache[n]);
  ------------------
  |  Branch (2270:30): [True: 0, False: 0]
  ------------------
 2271|      0|        printf("%s, pal=", n_cache ? "]" : "[]");
  ------------------
  |  Branch (2271:28): [True: 0, False: 0]
  ------------------
 2272|      0|        for (int n = 0; n < pal_sz; n++)
  ------------------
  |  Branch (2272:25): [True: 0, False: 0]
  ------------------
 2273|      0|            printf("%c%02x", n ? ' ' : '[', pal[n]);
  ------------------
  |  Branch (2273:30): [True: 0, False: 0]
  ------------------
 2274|      0|        printf("]\n");
 2275|      0|    }
 2276|  7.94k|}
dav1d_read_pal_uv_16bpc:
 2280|  1.80k|{
 2281|  1.80k|    bytefn(dav1d_read_pal_plane)(t, b, 1, sz_ctx, bx4, by4);
  ------------------
  |  |   87|  1.80k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  1.80k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2282|       |
 2283|       |    // V pal coding
 2284|  1.80k|    Dav1dTileState *const ts = t->ts;
 2285|  1.80k|    const Dav1dFrameContext *const f = t->f;
 2286|  1.80k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2286:24): [True: 0, False: 1.80k]
  ------------------
 2287|      0|        f->frame_thread.pal[((t->by >> 1) + (t->bx & 1)) * (f->b4_stride >> 1) +
 2288|      0|                            ((t->bx >> 1) + (t->by & 1))][2] :
 2289|  1.80k|        bytefn(t->scratch.pal)[2];
  ------------------
  |  |   87|  1.80k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  1.80k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2290|  1.80k|    const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2290:21): [Folded, False: 1.80k]
  ------------------
 2291|  1.80k|    if (dav1d_msac_decode_bool_equi(&ts->msac)) {
  ------------------
  |  |   53|  1.80k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2291:9): [True: 969, False: 832]
  ------------------
 2292|    969|        const int bits = bpc - 4 + dav1d_msac_decode_bools(&ts->msac, 2);
 2293|    969|        int prev = pal[0] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2294|    969|        const int max = (1 << bpc) - 1;
 2295|  3.99k|        for (int i = 1; i < b->pal_sz[1]; i++) {
  ------------------
  |  Branch (2295:25): [True: 3.02k, False: 969]
  ------------------
 2296|  3.02k|            int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2297|  3.02k|            if (delta && dav1d_msac_decode_bool_equi(&ts->msac)) delta = -delta;
  ------------------
  |  |   53|  3.00k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2297:17): [True: 3.00k, False: 27]
  |  Branch (2297:26): [True: 1.55k, False: 1.45k]
  ------------------
 2298|  3.02k|            prev = pal[i] = (prev + delta) & max;
 2299|  3.02k|        }
 2300|    969|    } else {
 2301|  4.23k|        for (int i = 0; i < b->pal_sz[1]; i++)
  ------------------
  |  Branch (2301:25): [True: 3.39k, False: 832]
  ------------------
 2302|  3.39k|            pal[i] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2303|    832|    }
 2304|  1.80k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  1.80k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.80k]
  |  |  ------------------
  |  |   35|  1.80k|        f->frame_hdr->frame_offset == 2 && t->by >= 0 && t->by < 4 && \
  |  |  ------------------
  |  |  |  Branch (35:9): [True: 0, False: 0]
  |  |  |  Branch (35:44): [True: 0, False: 0]
  |  |  |  Branch (35:58): [True: 0, False: 0]
  |  |  ------------------
  |  |   36|  1.80k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2305|      0|        printf("Post-pal[pl=2]: r=%d ", ts->msac.rng);
 2306|      0|        for (int n = 0; n < b->pal_sz[1]; n++)
  ------------------
  |  Branch (2306:25): [True: 0, False: 0]
  ------------------
 2307|      0|            printf("%c%02x", n ? ' ' : '[', pal[n]);
  ------------------
  |  Branch (2307:30): [True: 0, False: 0]
  ------------------
 2308|      0|        printf("]\n");
 2309|      0|    }
 2310|  1.80k|}

dav1d_ref_create:
   37|     62|Dav1dRef *dav1d_ref_create(const enum AllocationType type, size_t size) {
   38|     62|    size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
   39|       |
   40|     62|    uint8_t *const data = dav1d_alloc_aligned(type, size + sizeof(Dav1dRef), 64);
  ------------------
  |  |  134|     62|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
   41|     62|    if (!data) return NULL;
  ------------------
  |  Branch (41:9): [True: 0, False: 62]
  ------------------
   42|       |
   43|     62|    Dav1dRef *const res = (Dav1dRef*)(data + size);
   44|     62|    res->const_data = res->user_data = res->data = data;
   45|     62|    atomic_init(&res->ref_cnt, 1);
   46|     62|    res->free_ref = 0;
   47|     62|    res->free_callback = default_free_callback;
   48|       |
   49|     62|    return res;
   50|     62|}
dav1d_ref_create_using_pool:
   56|  48.9k|Dav1dRef *dav1d_ref_create_using_pool(Dav1dMemPool *const pool, size_t size) {
   57|  48.9k|    size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
   58|       |
   59|  48.9k|    Dav1dMemPoolBuffer *const buf =
   60|  48.9k|        dav1d_mem_pool_pop(pool, size + sizeof(Dav1dRef));
   61|  48.9k|    if (!buf) return NULL;
  ------------------
  |  Branch (61:9): [True: 0, False: 48.9k]
  ------------------
   62|       |
   63|  48.9k|    Dav1dRef *const res = &((Dav1dRef*)buf)[-1];
   64|  48.9k|    res->data = buf->data;
   65|  48.9k|    res->const_data = pool;
   66|  48.9k|    atomic_init(&res->ref_cnt, 1);
   67|  48.9k|    res->free_ref = 0;
   68|  48.9k|    res->free_callback = pool_free_callback;
   69|  48.9k|    res->user_data = buf;
   70|       |
   71|  48.9k|    return res;
   72|  48.9k|}
dav1d_ref_dec:
   74|  3.22M|void dav1d_ref_dec(Dav1dRef **const pref) {
   75|  3.22M|    assert(pref != NULL);
  ------------------
  |  |  140|  3.22M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.22M]
  |  |  |  Branch (140:68): [Folded, False: 3.22M]
  |  |  ------------------
  ------------------
   76|       |
   77|  3.22M|    Dav1dRef *const ref = *pref;
   78|  3.22M|    if (!ref) return;
  ------------------
  |  Branch (78:9): [True: 2.45M, False: 772k]
  ------------------
   79|       |
   80|   772k|    *pref = NULL;
   81|   772k|    if (atomic_fetch_sub(&ref->ref_cnt, 1) == 1) {
  ------------------
  |  Branch (81:9): [True: 83.8k, False: 688k]
  ------------------
   82|  83.8k|        const int free_ref = ref->free_ref;
   83|  83.8k|        ref->free_callback(ref->const_data, ref->user_data);
   84|  83.8k|        if (free_ref) dav1d_free(ref);
  ------------------
  |  |  135|  15.0k|#define dav1d_free(ptr) free(ptr)
  ------------------
  |  Branch (84:13): [True: 15.0k, False: 68.8k]
  ------------------
   85|  83.8k|    }
   86|   772k|}
ref.c:default_free_callback:
   32|     62|static void default_free_callback(const uint8_t *const data, void *const user_data) {
   33|     62|    assert(data == user_data);
  ------------------
  |  |  140|     62|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 62]
  |  |  |  Branch (140:68): [Folded, False: 62]
  |  |  ------------------
  ------------------
   34|     62|    dav1d_free_aligned(user_data);
  ------------------
  |  |  136|     62|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
   35|     62|}
ref.c:pool_free_callback:
   52|  48.9k|static void pool_free_callback(const uint8_t *const data, void *const user_data) {
   53|  48.9k|    dav1d_mem_pool_push((Dav1dMemPool*)data, user_data);
   54|  48.9k|}

obu.c:dav1d_ref_init:
   59|      3|{
   60|      3|    ref->data = NULL;
   61|      3|    ref->const_data = ptr;
   62|       |    atomic_init(&ref->ref_cnt, 1);
   63|      3|    ref->free_ref = free_ref;
   64|      3|    ref->free_callback = free_callback;
   65|      3|    ref->user_data = user_data;
   66|      3|    return ref;
   67|      3|}
obu.c:dav1d_ref_inc:
   69|     49|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|     49|}
picture.c:dav1d_ref_inc:
   69|   554k|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|   554k|}
picture.c:dav1d_ref_init:
   59|  19.8k|{
   60|  19.8k|    ref->data = NULL;
   61|  19.8k|    ref->const_data = ptr;
   62|       |    atomic_init(&ref->ref_cnt, 1);
   63|  19.8k|    ref->free_ref = free_ref;
   64|  19.8k|    ref->free_callback = free_callback;
   65|  19.8k|    ref->user_data = user_data;
   66|  19.8k|    return ref;
   67|  19.8k|}
cdf.c:dav1d_ref_inc:
   69|  35.1k|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|  35.1k|}
data.c:dav1d_ref_init:
   59|  15.0k|{
   60|  15.0k|    ref->data = NULL;
   61|  15.0k|    ref->const_data = ptr;
   62|       |    atomic_init(&ref->ref_cnt, 1);
   63|  15.0k|    ref->free_ref = free_ref;
   64|  15.0k|    ref->free_callback = free_callback;
   65|  15.0k|    ref->user_data = user_data;
   66|  15.0k|    return ref;
   67|  15.0k|}
data.c:dav1d_ref_inc:
   69|  32.3k|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|  32.3k|}
decode.c:dav1d_ref_inc:
   69|  67.1k|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|  67.1k|}

dav1d_refmvs_find:
  354|   243k|{
  355|   243k|    const refmvs_frame *const rf = rt->rf;
  356|   243k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  357|   243k|    const int bw4 = b_dim[0], w4 = imin(imin(bw4, 16), rt->tile_col.end - bx4);
  358|   243k|    const int bh4 = b_dim[1], h4 = imin(imin(bh4, 16), rt->tile_row.end - by4);
  359|   243k|    mv gmv[2], tgmv[2];
  360|       |
  361|   243k|    *cnt = 0;
  362|   243k|    assert(ref.ref[0] >=  0 && ref.ref[0] <= 8 &&
  ------------------
  |  |  140|  1.46M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 243k, False: 0]
  |  |  |  Branch (140:30): [True: 243k, False: 0]
  |  |  |  Branch (140:30): [True: 243k, False: 0]
  |  |  |  Branch (140:30): [True: 243k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 243k]
  |  |  ------------------
  ------------------
  363|   243k|           ref.ref[1] >= -1 && ref.ref[1] <= 8);
  364|   243k|    if (ref.ref[0] > 0) {
  ------------------
  |  Branch (364:9): [True: 65.2k, False: 178k]
  ------------------
  365|  65.2k|        tgmv[0] = get_gmv_2d(&rf->frm_hdr->gmv[ref.ref[0] - 1],
  366|  65.2k|                             bx4, by4, bw4, bh4, rf->frm_hdr);
  367|  65.2k|        gmv[0] = rf->frm_hdr->gmv[ref.ref[0] - 1].type > DAV1D_WM_TYPE_TRANSLATION ?
  ------------------
  |  Branch (367:18): [True: 26.0k, False: 39.2k]
  ------------------
  368|  39.2k|                 tgmv[0] : (mv) { .n = INVALID_MV };
  ------------------
  |  |   40|  39.2k|#define INVALID_MV 0x80008000
  ------------------
  369|   178k|    } else {
  370|   178k|        tgmv[0] = (mv) { .n = 0 };
  371|   178k|        gmv[0] = (mv) { .n = INVALID_MV };
  ------------------
  |  |   40|   178k|#define INVALID_MV 0x80008000
  ------------------
  372|   178k|    }
  373|   243k|    if (ref.ref[1] > 0) {
  ------------------
  |  Branch (373:9): [True: 13.1k, False: 230k]
  ------------------
  374|  13.1k|        tgmv[1] = get_gmv_2d(&rf->frm_hdr->gmv[ref.ref[1] - 1],
  375|  13.1k|                             bx4, by4, bw4, bh4, rf->frm_hdr);
  376|  13.1k|        gmv[1] = rf->frm_hdr->gmv[ref.ref[1] - 1].type > DAV1D_WM_TYPE_TRANSLATION ?
  ------------------
  |  Branch (376:18): [True: 3.33k, False: 9.76k]
  ------------------
  377|  9.76k|                 tgmv[1] : (mv) { .n = INVALID_MV };
  ------------------
  |  |   40|  9.76k|#define INVALID_MV 0x80008000
  ------------------
  378|  13.1k|    }
  379|       |
  380|       |    // top
  381|   243k|    int have_newmv = 0, have_col_mvs = 0, have_row_mvs = 0;
  382|   243k|    unsigned max_rows = 0, n_rows = ~0;
  383|   243k|    const refmvs_block *b_top;
  384|   243k|    if (by4 > rt->tile_row.start) {
  ------------------
  |  Branch (384:9): [True: 152k, False: 91.0k]
  ------------------
  385|   152k|        max_rows = imin((by4 - rt->tile_row.start + 1) >> 1, 2 + (bh4 > 1));
  386|   152k|        b_top = &rt->r[(by4 & 31) - 1 + 5][bx4];
  387|   152k|        n_rows = scan_row(mvstack, cnt, ref, gmv, b_top,
  388|   152k|                          bw4, w4, max_rows, bw4 >= 16 ? 4 : 1,
  ------------------
  |  Branch (388:46): [True: 4.02k, False: 148k]
  ------------------
  389|   152k|                          &have_newmv, &have_row_mvs);
  390|   152k|    }
  391|       |
  392|       |    // left
  393|   243k|    unsigned max_cols = 0, n_cols = ~0U;
  394|   243k|    refmvs_block *const *b_left;
  395|   243k|    if (bx4 > rt->tile_col.start) {
  ------------------
  |  Branch (395:9): [True: 223k, False: 19.9k]
  ------------------
  396|   223k|        max_cols = imin((bx4 - rt->tile_col.start + 1) >> 1, 2 + (bw4 > 1));
  397|   223k|        b_left = &rt->r[(by4 & 31) + 5];
  398|   223k|        n_cols = scan_col(mvstack, cnt, ref, gmv, b_left,
  399|   223k|                          bh4, h4, bx4 - 1, max_cols, bh4 >= 16 ? 4 : 1,
  ------------------
  |  Branch (399:55): [True: 13.3k, False: 210k]
  ------------------
  400|   223k|                          &have_newmv, &have_col_mvs);
  401|   223k|    }
  402|       |
  403|       |    // top/right
  404|   243k|    if (n_rows != ~0U && edge_flags & EDGE_I444_TOP_HAS_RIGHT &&
  ------------------
  |  Branch (404:9): [True: 152k, False: 91.0k]
  |  Branch (404:26): [True: 90.0k, False: 62.7k]
  ------------------
  405|  90.0k|        imax(bw4, bh4) <= 16 && bw4 + bx4 < rt->tile_col.end)
  ------------------
  |  Branch (405:9): [True: 88.8k, False: 1.24k]
  |  Branch (405:33): [True: 74.5k, False: 14.2k]
  ------------------
  406|  74.5k|    {
  407|  74.5k|        add_spatial_candidate(mvstack, cnt, 4, &b_top[bw4], ref, gmv,
  408|  74.5k|                              &have_newmv, &have_row_mvs);
  409|  74.5k|    }
  410|       |
  411|   243k|    const int nearest_match = have_col_mvs + have_row_mvs;
  412|   243k|    const int nearest_cnt = *cnt;
  413|   565k|    for (int n = 0; n < nearest_cnt; n++)
  ------------------
  |  Branch (413:21): [True: 321k, False: 243k]
  ------------------
  414|   321k|        mvstack[n].weight += 640;
  415|       |
  416|       |    // temporal
  417|   243k|    int globalmv_ctx = rf->frm_hdr->use_ref_frame_mvs;
  418|   243k|    if (rf->use_ref_frame_mvs) {
  ------------------
  |  Branch (418:9): [True: 12.8k, False: 230k]
  ------------------
  419|  12.8k|        const ptrdiff_t stride = rf->rp_stride;
  420|  12.8k|        const int by8 = by4 >> 1, bx8 = bx4 >> 1;
  421|  12.8k|        const refmvs_temporal_block *const rbi = &rt->rp_proj[(by8 & 15) * stride + bx8];
  422|  12.8k|        const refmvs_temporal_block *rb = rbi;
  423|  12.8k|        const int step_h = bw4 >= 16 ? 2 : 1, step_v = bh4 >= 16 ? 2 : 1;
  ------------------
  |  Branch (423:28): [True: 212, False: 12.6k]
  |  Branch (423:56): [True: 910, False: 11.9k]
  ------------------
  424|  12.8k|        const int w8 = imin((w4 + 1) >> 1, 8), h8 = imin((h4 + 1) >> 1, 8);
  425|  38.3k|        for (int y = 0; y < h8; y += step_v) {
  ------------------
  |  Branch (425:25): [True: 25.4k, False: 12.8k]
  ------------------
  426|  65.6k|            for (int x = 0; x < w8; x+= step_h) {
  ------------------
  |  Branch (426:29): [True: 40.1k, False: 25.4k]
  ------------------
  427|  40.1k|                add_temporal_candidate(rf, mvstack, cnt, &rb[x], ref,
  428|  40.1k|                                       !(x | y) ? &globalmv_ctx : NULL, tgmv);
  ------------------
  |  Branch (428:40): [True: 12.8k, False: 27.2k]
  ------------------
  429|  40.1k|            }
  430|  25.4k|            rb += stride * step_v;
  431|  25.4k|        }
  432|  12.8k|        if (imin(bw4, bh4) >= 2 && imax(bw4, bh4) < 16) {
  ------------------
  |  Branch (432:13): [True: 8.45k, False: 4.42k]
  |  Branch (432:36): [True: 7.47k, False: 977]
  ------------------
  433|  7.47k|            const int bh8 = bh4 >> 1, bw8 = bw4 >> 1;
  434|  7.47k|            rb = &rbi[bh8 * stride];
  435|  7.47k|            const int has_bottom = by8 + bh8 < imin(rt->tile_row.end >> 1,
  436|  7.47k|                                                    (by8 & ~7) + 8);
  437|  7.47k|            if (has_bottom && bx8 - 1 >= imax(rt->tile_col.start >> 1, bx8 & ~7)) {
  ------------------
  |  Branch (437:17): [True: 5.18k, False: 2.29k]
  |  Branch (437:31): [True: 3.71k, False: 1.47k]
  ------------------
  438|  3.71k|                add_temporal_candidate(rf, mvstack, cnt, &rb[-1], ref,
  439|  3.71k|                                       NULL, NULL);
  440|  3.71k|            }
  441|  7.47k|            if (bx8 + bw8 < imin(rt->tile_col.end >> 1, (bx8 & ~7) + 8)) {
  ------------------
  |  Branch (441:17): [True: 5.45k, False: 2.02k]
  ------------------
  442|  5.45k|                if (has_bottom) {
  ------------------
  |  Branch (442:21): [True: 3.77k, False: 1.67k]
  ------------------
  443|  3.77k|                    add_temporal_candidate(rf, mvstack, cnt, &rb[bw8], ref,
  444|  3.77k|                                           NULL, NULL);
  445|  3.77k|                }
  446|  5.45k|                if (by8 + bh8 - 1 < imin(rt->tile_row.end >> 1, (by8 & ~7) + 8)) {
  ------------------
  |  Branch (446:21): [True: 5.42k, False: 27]
  ------------------
  447|  5.42k|                    add_temporal_candidate(rf, mvstack, cnt, &rb[bw8 - stride],
  448|  5.42k|                                           ref, NULL, NULL);
  449|  5.42k|                }
  450|  5.45k|            }
  451|  7.47k|        }
  452|  12.8k|    }
  453|   243k|    assert(*cnt <= 8);
  ------------------
  |  |  140|   243k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 243k]
  |  |  |  Branch (140:68): [Folded, False: 243k]
  |  |  ------------------
  ------------------
  454|       |
  455|       |    // top/left (which, confusingly, is part of "secondary" references)
  456|   243k|    int have_dummy_newmv_match;
  457|   243k|    if ((n_rows | n_cols) != ~0U) {
  ------------------
  |  Branch (457:9): [True: 135k, False: 108k]
  ------------------
  458|   135k|        add_spatial_candidate(mvstack, cnt, 4, &b_top[-1], ref, gmv,
  459|   135k|                              &have_dummy_newmv_match, &have_row_mvs);
  460|   135k|    }
  461|       |
  462|       |    // "secondary" (non-direct neighbour) top & left edges
  463|       |    // what is different about secondary is that everything is now in 8x8 resolution
  464|   731k|    for (int n = 2; n <= 3; n++) {
  ------------------
  |  Branch (464:21): [True: 487k, False: 243k]
  ------------------
  465|   487k|        if ((unsigned) n > n_rows && (unsigned) n <= max_rows) {
  ------------------
  |  Branch (465:13): [True: 246k, False: 241k]
  |  Branch (465:38): [True: 117k, False: 128k]
  ------------------
  466|   117k|            n_rows += scan_row(mvstack, cnt, ref, gmv,
  467|   117k|                               &rt->r[(((by4 & 31) - 2 * n + 1) | 1) + 5][bx4 | 1],
  468|   117k|                               bw4, w4, 1 + max_rows - n, bw4 >= 16 ? 4 : 2,
  ------------------
  |  Branch (468:59): [True: 1.75k, False: 115k]
  ------------------
  469|   117k|                               &have_dummy_newmv_match, &have_row_mvs);
  470|   117k|        }
  471|       |
  472|   487k|        if ((unsigned) n > n_cols && (unsigned) n <= max_cols) {
  ------------------
  |  Branch (472:13): [True: 380k, False: 107k]
  |  Branch (472:38): [True: 255k, False: 125k]
  ------------------
  473|   255k|            n_cols += scan_col(mvstack, cnt, ref, gmv, &rt->r[((by4 & 31) | 1) + 5],
  474|   255k|                               bh4, h4, (bx4 - n * 2 + 1) | 1,
  475|   255k|                               1 + max_cols - n, bh4 >= 16 ? 4 : 2,
  ------------------
  |  Branch (475:50): [True: 10.5k, False: 244k]
  ------------------
  476|   255k|                               &have_dummy_newmv_match, &have_col_mvs);
  477|   255k|        }
  478|   487k|    }
  479|   243k|    assert(*cnt <= 8);
  ------------------
  |  |  140|   243k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 243k]
  |  |  |  Branch (140:68): [Folded, False: 243k]
  |  |  ------------------
  ------------------
  480|       |
  481|   243k|    const int ref_match_count = have_col_mvs + have_row_mvs;
  482|       |
  483|       |    // context build-up
  484|   243k|    int refmv_ctx, newmv_ctx;
  485|   243k|    switch (nearest_match) {
  ------------------
  |  Branch (485:13): [True: 243k, False: 0]
  ------------------
  486|  34.4k|    case 0:
  ------------------
  |  Branch (486:5): [True: 34.4k, False: 209k]
  ------------------
  487|  34.4k|        refmv_ctx = imin(2, ref_match_count);
  488|  34.4k|        newmv_ctx = ref_match_count > 0;
  489|  34.4k|        break;
  490|   121k|    case 1:
  ------------------
  |  Branch (490:5): [True: 121k, False: 122k]
  ------------------
  491|   121k|        refmv_ctx = imin(ref_match_count * 3, 4);
  492|   121k|        newmv_ctx = 3 - have_newmv;
  493|   121k|        break;
  494|  88.2k|    case 2:
  ------------------
  |  Branch (494:5): [True: 88.2k, False: 155k]
  ------------------
  495|  88.2k|        refmv_ctx = 5;
  496|  88.2k|        newmv_ctx = 5 - have_newmv;
  497|  88.2k|        break;
  498|   243k|    }
  499|       |
  500|       |    // sorting (nearest, then "secondary")
  501|   243k|    int len = nearest_cnt;
  502|   513k|    while (len) {
  ------------------
  |  Branch (502:12): [True: 270k, False: 243k]
  ------------------
  503|   270k|        int last = 0;
  504|   408k|        for (int n = 1; n < len; n++) {
  ------------------
  |  Branch (504:25): [True: 138k, False: 270k]
  ------------------
  505|   138k|            if (mvstack[n - 1].weight < mvstack[n].weight) {
  ------------------
  |  Branch (505:17): [True: 63.8k, False: 74.9k]
  ------------------
  506|  63.8k|#define EXCHANGE(a, b) do { refmvs_candidate tmp = a; a = b; b = tmp; } while (0)
  507|  63.8k|                EXCHANGE(mvstack[n - 1], mvstack[n]);
  ------------------
  |  |  506|  63.8k|#define EXCHANGE(a, b) do { refmvs_candidate tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (506:80): [Folded, False: 63.8k]
  |  |  ------------------
  ------------------
  508|  63.8k|                last = n;
  509|  63.8k|            }
  510|   138k|        }
  511|   270k|        len = last;
  512|   270k|    }
  513|   243k|    len = *cnt;
  514|   418k|    while (len > nearest_cnt) {
  ------------------
  |  Branch (514:12): [True: 175k, False: 243k]
  ------------------
  515|   175k|        int last = nearest_cnt;
  516|   271k|        for (int n = nearest_cnt + 1; n < len; n++) {
  ------------------
  |  Branch (516:39): [True: 96.3k, False: 175k]
  ------------------
  517|  96.3k|            if (mvstack[n - 1].weight < mvstack[n].weight) {
  ------------------
  |  Branch (517:17): [True: 9.13k, False: 87.1k]
  ------------------
  518|  9.13k|                EXCHANGE(mvstack[n - 1], mvstack[n]);
  ------------------
  |  |  506|  9.13k|#define EXCHANGE(a, b) do { refmvs_candidate tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (506:80): [Folded, False: 9.13k]
  |  |  ------------------
  ------------------
  519|  9.13k|#undef EXCHANGE
  520|  9.13k|                last = n;
  521|  9.13k|            }
  522|  96.3k|        }
  523|   175k|        len = last;
  524|   175k|    }
  525|       |
  526|   243k|    if (ref.ref[1] > 0) {
  ------------------
  |  Branch (526:9): [True: 13.1k, False: 230k]
  ------------------
  527|  13.1k|        if (*cnt < 2) {
  ------------------
  |  Branch (527:13): [True: 9.39k, False: 3.71k]
  ------------------
  528|  9.39k|            const int sign0 = rf->sign_bias[ref.ref[0] - 1];
  529|  9.39k|            const int sign1 = rf->sign_bias[ref.ref[1] - 1];
  530|  9.39k|            const int sz4 = imin(w4, h4);
  531|  9.39k|            refmvs_candidate *const same = &mvstack[*cnt];
  532|  9.39k|            int same_count[4] = { 0 };
  533|       |
  534|       |            // non-self references in top
  535|  16.1k|            if (n_rows != ~0U) for (int x = 0; x < sz4;) {
  ------------------
  |  Branch (535:17): [True: 7.65k, False: 1.73k]
  |  Branch (535:48): [True: 8.49k, False: 7.65k]
  ------------------
  536|  8.49k|                const refmvs_block *const cand_b = &b_top[x];
  537|  8.49k|                add_compound_extended_candidate(same, same_count, cand_b,
  538|  8.49k|                                                sign0, sign1, ref, rf->sign_bias);
  539|  8.49k|                x += dav1d_block_dimensions[cand_b->bs][0];
  540|  8.49k|            }
  541|       |
  542|       |            // non-self references in left
  543|  17.1k|            if (n_cols != ~0U) for (int y = 0; y < sz4;) {
  ------------------
  |  Branch (543:17): [True: 8.06k, False: 1.33k]
  |  Branch (543:48): [True: 9.06k, False: 8.06k]
  ------------------
  544|  9.06k|                const refmvs_block *const cand_b = &b_left[y][bx4 - 1];
  545|  9.06k|                add_compound_extended_candidate(same, same_count, cand_b,
  546|  9.06k|                                                sign0, sign1, ref, rf->sign_bias);
  547|  9.06k|                y += dav1d_block_dimensions[cand_b->bs][1];
  548|  9.06k|            }
  549|       |
  550|  9.39k|            refmvs_candidate *const diff = &same[2];
  551|  9.39k|            const int *const diff_count = &same_count[2];
  552|       |
  553|       |            // merge together
  554|  28.1k|            for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (554:29): [True: 18.7k, False: 9.39k]
  ------------------
  555|  18.7k|                int m = same_count[n];
  556|       |
  557|  18.7k|                if (m >= 2) continue;
  ------------------
  |  Branch (557:21): [True: 5.03k, False: 13.7k]
  ------------------
  558|       |
  559|  13.7k|                const int l = diff_count[n];
  560|  13.7k|                if (l) {
  ------------------
  |  Branch (560:21): [True: 12.2k, False: 1.49k]
  ------------------
  561|  12.2k|                    same[m].mv.mv[n] = diff[0].mv.mv[n];
  562|  12.2k|                    if (++m == 2) continue;
  ------------------
  |  Branch (562:25): [True: 7.72k, False: 4.54k]
  ------------------
  563|  4.54k|                    if (l == 2) {
  ------------------
  |  Branch (563:25): [True: 3.49k, False: 1.04k]
  ------------------
  564|  3.49k|                        same[1].mv.mv[n] = diff[1].mv.mv[n];
  565|  3.49k|                        continue;
  566|  3.49k|                    }
  567|  4.54k|                }
  568|  3.39k|                do {
  569|  3.39k|                    same[m].mv.mv[n] = tgmv[n];
  570|  3.39k|                } while (++m < 2);
  ------------------
  |  Branch (570:26): [True: 854, False: 2.53k]
  ------------------
  571|  2.53k|            }
  572|       |
  573|       |            // if the first extended was the same as the non-extended one,
  574|       |            // then replace it with the second extended one
  575|  9.39k|            int n = *cnt;
  576|  9.39k|            if (n == 1 && mvstack[0].mv.n == same[0].mv.n)
  ------------------
  |  Branch (576:17): [True: 5.09k, False: 4.30k]
  |  Branch (576:27): [True: 3.42k, False: 1.66k]
  ------------------
  577|  3.42k|                mvstack[1].mv = mvstack[2].mv;
  578|  13.6k|            do {
  579|  13.6k|                mvstack[n].weight = 2;
  580|  13.6k|            } while (++n < 2);
  ------------------
  |  Branch (580:22): [True: 4.30k, False: 9.39k]
  ------------------
  581|  9.39k|            *cnt = 2;
  582|  9.39k|        }
  583|       |
  584|       |        // clamping
  585|  13.1k|        const int left = -(bx4 + bw4 + 4) * 4 * 8;
  586|  13.1k|        const int right = (rf->iw4 - bx4 + 4) * 4 * 8;
  587|  13.1k|        const int top = -(by4 + bh4 + 4) * 4 * 8;
  588|  13.1k|        const int bottom = (rf->ih4 - by4 + 4) * 4 * 8;
  589|       |
  590|  13.1k|        const int n_refmvs = *cnt;
  591|  13.1k|        int n = 0;
  592|  28.3k|        do {
  593|  28.3k|            mvstack[n].mv.mv[0].x = iclip(mvstack[n].mv.mv[0].x, left, right);
  594|  28.3k|            mvstack[n].mv.mv[0].y = iclip(mvstack[n].mv.mv[0].y, top, bottom);
  595|  28.3k|            mvstack[n].mv.mv[1].x = iclip(mvstack[n].mv.mv[1].x, left, right);
  596|  28.3k|            mvstack[n].mv.mv[1].y = iclip(mvstack[n].mv.mv[1].y, top, bottom);
  597|  28.3k|        } while (++n < n_refmvs);
  ------------------
  |  Branch (597:18): [True: 15.2k, False: 13.1k]
  ------------------
  598|       |
  599|  13.1k|        switch (refmv_ctx >> 1) {
  ------------------
  |  Branch (599:17): [True: 13.1k, False: 0]
  ------------------
  600|  5.25k|        case 0:
  ------------------
  |  Branch (600:9): [True: 5.25k, False: 7.84k]
  ------------------
  601|  5.25k|            *ctx = imin(newmv_ctx, 1);
  602|  5.25k|            break;
  603|  4.75k|        case 1:
  ------------------
  |  Branch (603:9): [True: 4.75k, False: 8.35k]
  ------------------
  604|  4.75k|            *ctx = 1 + imin(newmv_ctx, 3);
  605|  4.75k|            break;
  606|  3.09k|        case 2:
  ------------------
  |  Branch (606:9): [True: 3.09k, False: 10.0k]
  ------------------
  607|  3.09k|            *ctx = iclip(3 + newmv_ctx, 4, 7);
  608|  3.09k|            break;
  609|  13.1k|        }
  610|       |
  611|  13.1k|        return;
  612|   230k|    } else if (*cnt < 2 && ref.ref[0] > 0) {
  ------------------
  |  Branch (612:16): [True: 62.0k, False: 168k]
  |  Branch (612:28): [True: 27.8k, False: 34.1k]
  ------------------
  613|  27.8k|        const int sign = rf->sign_bias[ref.ref[0] - 1];
  614|  27.8k|        const int sz4 = imin(w4, h4);
  615|       |
  616|       |        // non-self references in top
  617|  44.2k|        if (n_rows != ~0U) for (int x = 0; x < sz4 && *cnt < 2;) {
  ------------------
  |  Branch (617:13): [True: 21.6k, False: 6.21k]
  |  Branch (617:44): [True: 22.7k, False: 21.5k]
  |  Branch (617:55): [True: 22.5k, False: 153]
  ------------------
  618|  22.5k|            const refmvs_block *const cand_b = &b_top[x];
  619|  22.5k|            add_single_extended_candidate(mvstack, cnt, cand_b, sign, rf->sign_bias);
  620|  22.5k|            x += dav1d_block_dimensions[cand_b->bs][0];
  621|  22.5k|        }
  622|       |
  623|       |        // non-self references in left
  624|  42.2k|        if (n_cols != ~0U) for (int y = 0; y < sz4 && *cnt < 2;) {
  ------------------
  |  Branch (624:13): [True: 22.3k, False: 5.49k]
  |  Branch (624:44): [True: 23.7k, False: 18.4k]
  |  Branch (624:55): [True: 19.8k, False: 3.91k]
  ------------------
  625|  19.8k|            const refmvs_block *const cand_b = &b_left[y][bx4 - 1];
  626|  19.8k|            add_single_extended_candidate(mvstack, cnt, cand_b, sign, rf->sign_bias);
  627|  19.8k|            y += dav1d_block_dimensions[cand_b->bs][1];
  628|  19.8k|        }
  629|  27.8k|    }
  630|   230k|    assert(*cnt <= 8);
  ------------------
  |  |  140|   230k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 230k]
  |  |  |  Branch (140:68): [Folded, False: 230k]
  |  |  ------------------
  ------------------
  631|       |
  632|       |    // clamping
  633|   230k|    int n_refmvs = *cnt;
  634|   230k|    if (n_refmvs) {
  ------------------
  |  Branch (634:9): [True: 213k, False: 17.3k]
  ------------------
  635|   213k|        const int left = -(bx4 + bw4 + 4) * 4 * 8;
  636|   213k|        const int right = (rf->iw4 - bx4 + 4) * 4 * 8;
  637|   213k|        const int top = -(by4 + bh4 + 4) * 4 * 8;
  638|   213k|        const int bottom = (rf->ih4 - by4 + 4) * 4 * 8;
  639|       |
  640|   213k|        int n = 0;
  641|   578k|        do {
  642|   578k|            mvstack[n].mv.mv[0].x = iclip(mvstack[n].mv.mv[0].x, left, right);
  643|   578k|            mvstack[n].mv.mv[0].y = iclip(mvstack[n].mv.mv[0].y, top, bottom);
  644|   578k|        } while (++n < n_refmvs);
  ------------------
  |  Branch (644:18): [True: 365k, False: 213k]
  ------------------
  645|   213k|    }
  646|       |
  647|   302k|    for (int n = *cnt; n < 2; n++)
  ------------------
  |  Branch (647:24): [True: 71.5k, False: 230k]
  ------------------
  648|  71.5k|        mvstack[n].mv.mv[0] = tgmv[0];
  649|       |
  650|   230k|    *ctx = (refmv_ctx << 4) | (globalmv_ctx << 3) | newmv_ctx;
  651|   230k|}
dav1d_refmvs_tile_sbrow_init:
  657|  20.2k|{
  658|  20.2k|    if (rf->n_tile_threads == 1) tile_row_idx = 0;
  ------------------
  |  Branch (658:9): [True: 20.2k, False: 0]
  ------------------
  659|  20.2k|    rt->rp_proj = &rf->rp_proj[16 * rf->rp_stride * tile_row_idx];
  660|  20.2k|    const ptrdiff_t r_stride = rf->rp_stride * 2;
  661|  20.2k|    const ptrdiff_t pass_off = (rf->n_frame_threads > 1 && pass == 2) ?
  ------------------
  |  Branch (661:33): [True: 0, False: 20.2k]
  |  Branch (661:60): [True: 0, False: 0]
  ------------------
  662|  20.2k|        35 * 2 * rf->n_blocks : 0;
  663|  20.2k|    refmvs_block *r = &rf->r[35 * r_stride * tile_row_idx + pass_off];
  664|  20.2k|    const int sbsz = rf->sbsz;
  665|  20.2k|    const int off = (sbsz * sby) & 16;
  666|   523k|    for (int i = 0; i < sbsz; i++, r += r_stride)
  ------------------
  |  Branch (666:21): [True: 503k, False: 20.2k]
  ------------------
  667|   503k|        rt->r[off + 5 + i] = r;
  668|  20.2k|    rt->r[off + 0] = r;
  669|  20.2k|    r += r_stride;
  670|  20.2k|    rt->r[off + 1] = NULL;
  671|  20.2k|    rt->r[off + 2] = r;
  672|  20.2k|    r += r_stride;
  673|  20.2k|    rt->r[off + 3] = NULL;
  674|  20.2k|    rt->r[off + 4] = r;
  675|  20.2k|    if (sby & 1) {
  ------------------
  |  Branch (675:9): [True: 7.57k, False: 12.6k]
  ------------------
  676|  7.57k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  677|  7.57k|        EXCHANGE(rt->r[off + 0], rt->r[off + sbsz + 0]);
  ------------------
  |  |  676|  7.57k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (676:75): [Folded, False: 7.57k]
  |  |  ------------------
  ------------------
  678|  7.57k|        EXCHANGE(rt->r[off + 2], rt->r[off + sbsz + 2]);
  ------------------
  |  |  676|  7.57k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (676:75): [Folded, False: 7.57k]
  |  |  ------------------
  ------------------
  679|  7.57k|        EXCHANGE(rt->r[off + 4], rt->r[off + sbsz + 4]);
  ------------------
  |  |  676|  7.57k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (676:75): [Folded, False: 7.57k]
  |  |  ------------------
  ------------------
  680|  7.57k|#undef EXCHANGE
  681|  7.57k|    }
  682|       |
  683|  20.2k|    rt->rf = rf;
  684|  20.2k|    rt->tile_row.start = tile_row_start4;
  685|  20.2k|    rt->tile_row.end = imin(tile_row_end4, rf->ih4);
  686|  20.2k|    rt->tile_col.start = tile_col_start4;
  687|  20.2k|    rt->tile_col.end = imin(tile_col_end4, rf->iw4);
  688|  20.2k|}
dav1d_refmvs_init_frame:
  807|  5.40k|{
  808|  5.40k|    const int rp_stride = ((frm_hdr->width[0] + 127) & ~127) >> 3;
  809|  5.40k|    const int n_tile_rows = n_tile_threads > 1 ? frm_hdr->tiling.rows : 1;
  ------------------
  |  Branch (809:29): [True: 0, False: 5.40k]
  ------------------
  810|  5.40k|    const int n_blocks = rp_stride * n_tile_rows;
  811|       |
  812|  5.40k|    rf->sbsz = 16 << seq_hdr->sb128;
  813|  5.40k|    rf->frm_hdr = frm_hdr;
  814|  5.40k|    rf->iw8 = (frm_hdr->width[0] + 7) >> 3;
  815|  5.40k|    rf->ih8 = (frm_hdr->height + 7) >> 3;
  816|  5.40k|    rf->iw4 = rf->iw8 << 1;
  817|  5.40k|    rf->ih4 = rf->ih8 << 1;
  818|  5.40k|    rf->rp = rp;
  819|  5.40k|    rf->rp_stride = rp_stride;
  820|  5.40k|    rf->n_tile_threads = n_tile_threads;
  821|  5.40k|    rf->n_frame_threads = n_frame_threads;
  822|       |
  823|  5.40k|    if (n_blocks != rf->n_blocks) {
  ------------------
  |  Branch (823:9): [True: 4.27k, False: 1.12k]
  ------------------
  824|  4.27k|        const size_t r_sz = sizeof(*rf->r) * 35 * 2 * n_blocks * (1 + (n_frame_threads > 1));
  825|  4.27k|        const size_t rp_proj_sz = sizeof(*rf->rp_proj) * 16 * n_blocks;
  826|       |        /* Note that sizeof(*rf->r) == 12, but it's accessed using 16-byte unaligned
  827|       |         * loads in save_tmvs() asm which can overread 4 bytes into rp_proj. */
  828|  4.27k|        dav1d_free_aligned(rf->r);
  ------------------
  |  |  136|  4.27k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  829|  4.27k|        rf->r = dav1d_alloc_aligned(ALLOC_REFMVS, r_sz + rp_proj_sz, 64);
  ------------------
  |  |  134|  4.27k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
  830|  4.27k|        if (!rf->r) {
  ------------------
  |  Branch (830:13): [True: 0, False: 4.27k]
  ------------------
  831|      0|            rf->n_blocks = 0;
  832|      0|            return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   56|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  833|      0|        }
  834|       |
  835|  4.27k|        rf->rp_proj = (refmvs_temporal_block*)((uintptr_t)rf->r + r_sz);
  836|  4.27k|        rf->n_blocks = n_blocks;
  837|  4.27k|    }
  838|       |
  839|  5.40k|    const int poc = frm_hdr->frame_offset;
  840|  43.2k|    for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (840:21): [True: 37.8k, False: 5.40k]
  ------------------
  841|  37.8k|        const int poc_diff = get_poc_diff(seq_hdr->order_hint_n_bits,
  842|  37.8k|                                          ref_poc[i], poc);
  843|  37.8k|        rf->sign_bias[i] = poc_diff > 0;
  844|  37.8k|        rf->mfmv_sign[i] = poc_diff < 0;
  845|  37.8k|        rf->pocdiff[i] = iclip(get_poc_diff(seq_hdr->order_hint_n_bits,
  846|  37.8k|                                            poc, ref_poc[i]), -31, 31);
  847|  37.8k|    }
  848|       |
  849|       |    // temporal MV setup
  850|  5.40k|    rf->n_mfmvs = 0;
  851|  5.40k|    rf->rp_ref = rp_ref;
  852|  5.40k|    if (frm_hdr->use_ref_frame_mvs && seq_hdr->order_hint_n_bits) {
  ------------------
  |  Branch (852:9): [True: 1.06k, False: 4.34k]
  |  Branch (852:39): [True: 1.06k, False: 0]
  ------------------
  853|  1.06k|        int total = 2;
  854|  1.06k|        if (rp_ref[0] && ref_ref_poc[0][6] != ref_poc[3] /* alt-of-last != gold */) {
  ------------------
  |  Branch (854:13): [True: 297, False: 764]
  |  Branch (854:26): [True: 85, False: 212]
  ------------------
  855|     85|            rf->mfmv_ref[rf->n_mfmvs++] = 0; // last
  856|     85|            total = 3;
  857|     85|        }
  858|  1.06k|        if (rp_ref[4] && get_poc_diff(seq_hdr->order_hint_n_bits, ref_poc[4],
  ------------------
  |  Branch (858:13): [True: 127, False: 934]
  |  Branch (858:26): [True: 72, False: 55]
  ------------------
  859|    127|                                      frm_hdr->frame_offset) > 0)
  860|     72|        {
  861|     72|            rf->mfmv_ref[rf->n_mfmvs++] = 4; // bwd
  862|     72|        }
  863|  1.06k|        if (rp_ref[5] && get_poc_diff(seq_hdr->order_hint_n_bits, ref_poc[5],
  ------------------
  |  Branch (863:13): [True: 83, False: 978]
  |  Branch (863:26): [True: 57, False: 26]
  ------------------
  864|     83|                                      frm_hdr->frame_offset) > 0)
  865|     57|        {
  866|     57|            rf->mfmv_ref[rf->n_mfmvs++] = 5; // altref2
  867|     57|        }
  868|  1.06k|        if (rf->n_mfmvs < total && rp_ref[6] &&
  ------------------
  |  Branch (868:13): [True: 1.01k, False: 51]
  |  Branch (868:36): [True: 77, False: 933]
  ------------------
  869|     77|            get_poc_diff(seq_hdr->order_hint_n_bits, ref_poc[6],
  ------------------
  |  Branch (869:13): [True: 57, False: 20]
  ------------------
  870|     77|                         frm_hdr->frame_offset) > 0)
  871|     57|        {
  872|     57|            rf->mfmv_ref[rf->n_mfmvs++] = 6; // altref
  873|     57|        }
  874|  1.06k|        if (rf->n_mfmvs < total && rp_ref[1])
  ------------------
  |  Branch (874:13): [True: 994, False: 67]
  |  Branch (874:36): [True: 240, False: 754]
  ------------------
  875|    240|            rf->mfmv_ref[rf->n_mfmvs++] = 1; // last2
  876|       |
  877|  1.57k|        for (int n = 0; n < rf->n_mfmvs; n++) {
  ------------------
  |  Branch (877:25): [True: 511, False: 1.06k]
  ------------------
  878|    511|            const int rpoc = ref_poc[rf->mfmv_ref[n]];
  879|    511|            const int diff1 = get_poc_diff(seq_hdr->order_hint_n_bits,
  880|    511|                                           rpoc, frm_hdr->frame_offset);
  881|    511|            if (abs(diff1) > 31) {
  ------------------
  |  Branch (881:17): [True: 40, False: 471]
  ------------------
  882|     40|                rf->mfmv_ref2cur[n] = INVALID_REF2CUR;
  ------------------
  |  |   41|     40|#define INVALID_REF2CUR (-32)
  ------------------
  883|    471|            } else {
  884|    471|                rf->mfmv_ref2cur[n] = rf->mfmv_ref[n] < 4 ? -diff1 : diff1;
  ------------------
  |  Branch (884:39): [True: 294, False: 177]
  ------------------
  885|  3.76k|                for (int m = 0; m < 7; m++) {
  ------------------
  |  Branch (885:33): [True: 3.29k, False: 471]
  ------------------
  886|  3.29k|                    const int rrpoc = ref_ref_poc[rf->mfmv_ref[n]][m];
  887|  3.29k|                    const int diff2 = get_poc_diff(seq_hdr->order_hint_n_bits,
  888|  3.29k|                                                   rpoc, rrpoc);
  889|       |                    // unsigned comparison also catches the < 0 case
  890|  3.29k|                    rf->mfmv_ref2ref[n][m] = (unsigned) diff2 > 31U ? 0 : diff2;
  ------------------
  |  Branch (890:46): [True: 352, False: 2.94k]
  ------------------
  891|  3.29k|                }
  892|    471|            }
  893|    511|        }
  894|  1.06k|    }
  895|  5.40k|    rf->use_ref_frame_mvs = rf->n_mfmvs > 0;
  896|       |
  897|  5.40k|    return 0;
  898|  5.40k|}
dav1d_refmvs_dsp_init:
  921|  12.9k|{
  922|  12.9k|    c->load_tmvs = load_tmvs_c;
  923|  12.9k|    c->save_tmvs = save_tmvs_c;
  924|  12.9k|    c->splat_mv = splat_mv_c;
  925|       |
  926|  12.9k|#if HAVE_ASM
  927|       |#if ARCH_AARCH64 || ARCH_ARM
  928|       |    refmvs_dsp_init_arm(c);
  929|       |#elif ARCH_LOONGARCH64
  930|       |    refmvs_dsp_init_loongarch(c);
  931|       |#elif ARCH_X86
  932|       |    refmvs_dsp_init_x86(c);
  933|  12.9k|#endif
  934|  12.9k|#endif
  935|  12.9k|}
refmvs.c:scan_row:
  102|   270k|{
  103|   270k|    const refmvs_block *cand_b = b;
  104|   270k|    const enum BlockSize first_cand_bs = cand_b->bs;
  105|   270k|    const uint8_t *const first_cand_b_dim = dav1d_block_dimensions[first_cand_bs];
  106|   270k|    int cand_bw4 = first_cand_b_dim[0];
  107|   270k|    int len = imax(step, imin(bw4, cand_bw4));
  108|       |
  109|   270k|    if (bw4 <= cand_bw4) {
  ------------------
  |  Branch (109:9): [True: 238k, False: 31.4k]
  ------------------
  110|       |        // FIXME weight can be higher for odd blocks (bx4 & 1), but then the
  111|       |        // position of the first block has to be odd already, i.e. not just
  112|       |        // for row_offset=-3/-5
  113|       |        // FIXME why can this not be cand_bw4?
  114|   238k|        const int weight = bw4 == 1 ? 2 :
  ------------------
  |  Branch (114:28): [True: 106k, False: 131k]
  ------------------
  115|   238k|                           imax(2, imin(2 * max_rows, first_cand_b_dim[1]));
  116|   238k|        add_spatial_candidate(mvstack, cnt, len * weight, cand_b, ref, gmv,
  117|   238k|                              have_newmv_match, have_refmv_match);
  118|   238k|        return weight >> 1;
  119|   238k|    }
  120|       |
  121|  59.7k|    for (int x = 0;;) {
  122|       |        // FIXME if we overhang above, we could fill a bitmask so we don't have
  123|       |        // to repeat the add_spatial_candidate() for the next row, but just increase
  124|       |        // the weight here
  125|  59.7k|        add_spatial_candidate(mvstack, cnt, len * 2, cand_b, ref, gmv,
  126|  59.7k|                              have_newmv_match, have_refmv_match);
  127|  59.7k|        x += len;
  128|  59.7k|        if (x >= w4) return 1;
  ------------------
  |  Branch (128:13): [True: 31.4k, False: 28.2k]
  ------------------
  129|  28.2k|        cand_b = &b[x];
  130|  28.2k|        cand_bw4 = dav1d_block_dimensions[cand_b->bs][0];
  131|  28.2k|        assert(cand_bw4 < bw4);
  ------------------
  |  |  140|  28.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 28.2k]
  |  |  |  Branch (140:68): [Folded, False: 28.2k]
  |  |  ------------------
  ------------------
  132|  28.2k|        len = imax(step, cand_bw4);
  133|  28.2k|    }
  134|  31.4k|}
refmvs.c:scan_col:
  141|   479k|{
  142|   479k|    const refmvs_block *cand_b = &b[0][bx4];
  143|   479k|    const enum BlockSize first_cand_bs = cand_b->bs;
  144|   479k|    const uint8_t *const first_cand_b_dim = dav1d_block_dimensions[first_cand_bs];
  145|   479k|    int cand_bh4 = first_cand_b_dim[1];
  146|   479k|    int len = imax(step, imin(bh4, cand_bh4));
  147|       |
  148|   479k|    if (bh4 <= cand_bh4) {
  ------------------
  |  Branch (148:9): [True: 439k, False: 39.2k]
  ------------------
  149|       |        // FIXME weight can be higher for odd blocks (by4 & 1), but then the
  150|       |        // position of the first block has to be odd already, i.e. not just
  151|       |        // for col_offset=-3/-5
  152|       |        // FIXME why can this not be cand_bh4?
  153|   439k|        const int weight = bh4 == 1 ? 2 :
  ------------------
  |  Branch (153:28): [True: 240k, False: 199k]
  ------------------
  154|   439k|                           imax(2, imin(2 * max_cols, first_cand_b_dim[0]));
  155|   439k|        add_spatial_candidate(mvstack, cnt, len * weight, cand_b, ref, gmv,
  156|   439k|                            have_newmv_match, have_refmv_match);
  157|   439k|        return weight >> 1;
  158|   439k|    }
  159|       |
  160|  75.7k|    for (int y = 0;;) {
  161|       |        // FIXME if we overhang above, we could fill a bitmask so we don't have
  162|       |        // to repeat the add_spatial_candidate() for the next row, but just increase
  163|       |        // the weight here
  164|  75.7k|        add_spatial_candidate(mvstack, cnt, len * 2, cand_b, ref, gmv,
  165|  75.7k|                              have_newmv_match, have_refmv_match);
  166|  75.7k|        y += len;
  167|  75.7k|        if (y >= h4) return 1;
  ------------------
  |  Branch (167:13): [True: 39.2k, False: 36.4k]
  ------------------
  168|  36.4k|        cand_b = &b[y][bx4];
  169|  36.4k|        cand_bh4 = dav1d_block_dimensions[cand_b->bs][1];
  170|  36.4k|        assert(cand_bh4 < bh4);
  ------------------
  |  |  140|  36.4k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 36.4k]
  |  |  |  Branch (140:68): [Folded, False: 36.4k]
  |  |  ------------------
  ------------------
  171|  36.4k|        len = imax(step, cand_bh4);
  172|  36.4k|    }
  173|  39.2k|}
refmvs.c:add_spatial_candidate:
   46|  1.02M|{
   47|  1.02M|    if (b->mv.mv[0].n == INVALID_MV) return; // intra block, no intrabc
  ------------------
  |  |   40|  1.02M|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (47:9): [True: 163k, False: 860k]
  ------------------
   48|       |
   49|   860k|    if (ref.ref[1] == -1) {
  ------------------
  |  Branch (49:9): [True: 789k, False: 71.2k]
  ------------------
   50|   954k|        for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (50:25): [True: 877k, False: 77.1k]
  ------------------
   51|   877k|            if (b->ref.ref[n] == ref.ref[0]) {
  ------------------
  |  Branch (51:17): [True: 712k, False: 165k]
  ------------------
   52|   712k|                const mv cand_mv = ((b->mf & 1) && gmv[0].n != INVALID_MV) ?
  ------------------
  |  |   40|  42.1k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (52:37): [True: 42.1k, False: 669k]
  |  Branch (52:52): [True: 13.9k, False: 28.2k]
  ------------------
   53|   698k|                                   gmv[0] : b->mv.mv[n];
   54|       |
   55|   712k|                *have_refmv_match = 1;
   56|   712k|                *have_newmv_match |= b->mf >> 1;
   57|       |
   58|   712k|                const int last = *cnt;
   59|  1.43M|                for (int m = 0; m < last; m++)
  ------------------
  |  Branch (59:33): [True: 874k, False: 563k]
  ------------------
   60|   874k|                    if (mvstack[m].mv.mv[0].n == cand_mv.n) {
  ------------------
  |  Branch (60:25): [True: 148k, False: 726k]
  ------------------
   61|   148k|                        mvstack[m].weight += weight;
   62|   148k|                        return;
   63|   148k|                    }
   64|       |
   65|   563k|                if (last < 8) {
  ------------------
  |  Branch (65:21): [True: 563k, False: 437]
  ------------------
   66|   563k|                    mvstack[last].mv.mv[0] = cand_mv;
   67|   563k|                    mvstack[last].weight = weight;
   68|   563k|                    *cnt = last + 1;
   69|   563k|                }
   70|   563k|                return;
   71|   712k|            }
   72|   877k|        }
   73|   789k|    } else if (b->ref.pair == ref.pair) {
  ------------------
  |  Branch (73:16): [True: 22.6k, False: 48.6k]
  ------------------
   74|  22.6k|        const refmvs_mvpair cand_mv = { .mv = {
   75|  22.6k|            [0] = ((b->mf & 1) && gmv[0].n != INVALID_MV) ? gmv[0] : b->mv.mv[0],
  ------------------
  |  |   40|  1.56k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (75:20): [True: 1.56k, False: 21.0k]
  |  Branch (75:35): [True: 838, False: 725]
  ------------------
   76|  22.6k|            [1] = ((b->mf & 1) && gmv[1].n != INVALID_MV) ? gmv[1] : b->mv.mv[1],
  ------------------
  |  |   40|  1.56k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (76:20): [True: 1.56k, False: 21.0k]
  |  Branch (76:35): [True: 430, False: 1.13k]
  ------------------
   77|  22.6k|        }};
   78|       |
   79|  22.6k|        *have_refmv_match = 1;
   80|  22.6k|        *have_newmv_match |= b->mf >> 1;
   81|       |
   82|  22.6k|        const int last = *cnt;
   83|  33.1k|        for (int n = 0; n < last; n++)
  ------------------
  |  Branch (83:25): [True: 19.5k, False: 13.6k]
  ------------------
   84|  19.5k|            if (mvstack[n].mv.n == cand_mv.n) {
  ------------------
  |  Branch (84:17): [True: 9.00k, False: 10.5k]
  ------------------
   85|  9.00k|                mvstack[n].weight += weight;
   86|  9.00k|                return;
   87|  9.00k|            }
   88|       |
   89|  13.6k|        if (last < 8) {
  ------------------
  |  Branch (89:13): [True: 13.6k, False: 0]
  ------------------
   90|  13.6k|            mvstack[last].mv = cand_mv;
   91|  13.6k|            mvstack[last].weight = weight;
   92|  13.6k|            *cnt = last + 1;
   93|  13.6k|        }
   94|  13.6k|    }
   95|   860k|}
refmvs.c:add_temporal_candidate:
  198|  53.0k|{
  199|  53.0k|    if (rb->mv.n == INVALID_MV) return;
  ------------------
  |  |   40|  53.0k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (199:9): [True: 25.3k, False: 27.7k]
  ------------------
  200|       |
  201|  27.7k|    union mv mv = mv_projection(rb->mv, rf->pocdiff[ref.ref[0] - 1], rb->ref);
  202|  27.7k|    fix_mv_precision(rf->frm_hdr, &mv);
  203|       |
  204|  27.7k|    const int last = *cnt;
  205|  27.7k|    if (ref.ref[1] == -1) {
  ------------------
  |  Branch (205:9): [True: 20.9k, False: 6.79k]
  ------------------
  206|  20.9k|        if (globalmv_ctx)
  ------------------
  |  Branch (206:13): [True: 5.68k, False: 15.2k]
  ------------------
  207|  5.68k|            *globalmv_ctx = (abs(mv.x - gmv[0].x) | abs(mv.y - gmv[0].y)) >= 16;
  208|       |
  209|  37.4k|        for (int n = 0; n < last; n++)
  ------------------
  |  Branch (209:25): [True: 33.6k, False: 3.80k]
  ------------------
  210|  33.6k|            if (mvstack[n].mv.mv[0].n == mv.n) {
  ------------------
  |  Branch (210:17): [True: 17.0k, False: 16.5k]
  ------------------
  211|  17.0k|                mvstack[n].weight += 2;
  212|  17.0k|                return;
  213|  17.0k|            }
  214|  3.80k|        if (last < 8) {
  ------------------
  |  Branch (214:13): [True: 3.80k, False: 0]
  ------------------
  215|  3.80k|            mvstack[last].mv.mv[0] = mv;
  216|  3.80k|            mvstack[last].weight = 2;
  217|  3.80k|            *cnt = last + 1;
  218|  3.80k|        }
  219|  6.79k|    } else {
  220|  6.79k|        refmvs_mvpair mvp = { .mv = {
  221|  6.79k|            [0] = mv,
  222|  6.79k|            [1] = mv_projection(rb->mv, rf->pocdiff[ref.ref[1] - 1], rb->ref),
  223|  6.79k|        }};
  224|  6.79k|        fix_mv_precision(rf->frm_hdr, &mvp.mv[1]);
  225|       |
  226|  9.89k|        for (int n = 0; n < last; n++)
  ------------------
  |  Branch (226:25): [True: 8.83k, False: 1.05k]
  ------------------
  227|  8.83k|            if (mvstack[n].mv.n == mvp.n) {
  ------------------
  |  Branch (227:17): [True: 5.74k, False: 3.09k]
  ------------------
  228|  5.74k|                mvstack[n].weight += 2;
  229|  5.74k|                return;
  230|  5.74k|            }
  231|  1.05k|        if (last < 8) {
  ------------------
  |  Branch (231:13): [True: 1.05k, False: 0]
  ------------------
  232|  1.05k|            mvstack[last].mv = mvp;
  233|  1.05k|            mvstack[last].weight = 2;
  234|  1.05k|            *cnt = last + 1;
  235|  1.05k|        }
  236|  1.05k|    }
  237|  27.7k|}
refmvs.c:mv_projection:
  175|  34.4k|static inline union mv mv_projection(const union mv mv, const int num, const int den) {
  176|  34.4k|    static const uint16_t div_mult[32] = {
  177|  34.4k|           0, 16384, 8192, 5461, 4096, 3276, 2730, 2340,
  178|  34.4k|        2048,  1820, 1638, 1489, 1365, 1260, 1170, 1092,
  179|  34.4k|        1024,   963,  910,  862,  819,  780,  744,  712,
  180|  34.4k|         682,   655,  630,  606,  585,  564,  546,  528
  181|  34.4k|    };
  182|  34.4k|    assert(den > 0 && den < 32);
  ------------------
  |  |  140|  68.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 34.4k, False: 0]
  |  |  |  Branch (140:30): [True: 34.4k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 34.4k]
  |  |  ------------------
  ------------------
  183|  34.4k|    assert(num > -32 && num < 32);
  ------------------
  |  |  140|  68.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 34.4k, False: 0]
  |  |  |  Branch (140:30): [True: 34.4k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 34.4k]
  |  |  ------------------
  ------------------
  184|  34.4k|    const int frac = num * div_mult[den];
  185|  34.4k|    const int y = mv.y * frac, x = mv.x * frac;
  186|       |    // Round and clip according to AV1 spec section 7.9.3
  187|  34.4k|    return (union mv) { // 0x3fff == (1 << 14) - 1
  188|  34.4k|        .y = iclip((y + 8192 + (y >> 31)) >> 14, -0x3fff, 0x3fff),
  189|  34.4k|        .x = iclip((x + 8192 + (x >> 31)) >> 14, -0x3fff, 0x3fff)
  190|  34.4k|    };
  191|  34.4k|}
refmvs.c:add_compound_extended_candidate:
  245|  17.5k|{
  246|  17.5k|    refmvs_candidate *const diff = &same[2];
  247|  17.5k|    int *const diff_count = &same_count[2];
  248|       |
  249|  45.0k|    for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (249:21): [True: 34.5k, False: 10.4k]
  ------------------
  250|  34.5k|        const int cand_ref = cand_b->ref.ref[n];
  251|       |
  252|  34.5k|        if (cand_ref <= 0) break;
  ------------------
  |  Branch (252:13): [True: 7.14k, False: 27.4k]
  ------------------
  253|       |
  254|  27.4k|        mv cand_mv = cand_b->mv.mv[n];
  255|  27.4k|        if (cand_ref == ref.ref[0]) {
  ------------------
  |  Branch (255:13): [True: 9.74k, False: 17.7k]
  ------------------
  256|  9.74k|            if (same_count[0] < 2)
  ------------------
  |  Branch (256:17): [True: 9.38k, False: 360]
  ------------------
  257|  9.38k|                same[same_count[0]++].mv.mv[0] = cand_mv;
  258|  9.74k|            if (diff_count[1] < 2) {
  ------------------
  |  Branch (258:17): [True: 8.22k, False: 1.51k]
  ------------------
  259|  8.22k|                if (sign1 ^ sign_bias[cand_ref - 1]) {
  ------------------
  |  Branch (259:21): [True: 237, False: 7.98k]
  ------------------
  260|    237|                    cand_mv.y = -cand_mv.y;
  261|    237|                    cand_mv.x = -cand_mv.x;
  262|    237|                }
  263|  8.22k|                diff[diff_count[1]++].mv.mv[1] = cand_mv;
  264|  8.22k|            }
  265|  17.7k|        } else if (cand_ref == ref.ref[1]) {
  ------------------
  |  Branch (265:20): [True: 9.32k, False: 8.38k]
  ------------------
  266|  9.32k|            if (same_count[1] < 2)
  ------------------
  |  Branch (266:17): [True: 9.04k, False: 288]
  ------------------
  267|  9.04k|                same[same_count[1]++].mv.mv[1] = cand_mv;
  268|  9.32k|            if (diff_count[0] < 2) {
  ------------------
  |  Branch (268:17): [True: 7.53k, False: 1.79k]
  ------------------
  269|  7.53k|                if (sign0 ^ sign_bias[cand_ref - 1]) {
  ------------------
  |  Branch (269:21): [True: 236, False: 7.30k]
  ------------------
  270|    236|                    cand_mv.y = -cand_mv.y;
  271|    236|                    cand_mv.x = -cand_mv.x;
  272|    236|                }
  273|  7.53k|                diff[diff_count[0]++].mv.mv[0] = cand_mv;
  274|  7.53k|            }
  275|  9.32k|        } else {
  276|  8.38k|            mv i_cand_mv = (union mv) {
  277|  8.38k|                .x = -cand_mv.x,
  278|  8.38k|                .y = -cand_mv.y
  279|  8.38k|            };
  280|       |
  281|  8.38k|            if (diff_count[0] < 2) {
  ------------------
  |  Branch (281:17): [True: 6.47k, False: 1.91k]
  ------------------
  282|  6.47k|                diff[diff_count[0]++].mv.mv[0] =
  283|  6.47k|                    sign0 ^ sign_bias[cand_ref - 1] ?
  ------------------
  |  Branch (283:21): [True: 204, False: 6.27k]
  ------------------
  284|  6.27k|                    i_cand_mv : cand_mv;
  285|  6.47k|            }
  286|       |
  287|  8.38k|            if (diff_count[1] < 2) {
  ------------------
  |  Branch (287:17): [True: 6.11k, False: 2.27k]
  ------------------
  288|  6.11k|                diff[diff_count[1]++].mv.mv[1] =
  289|  6.11k|                    sign1 ^ sign_bias[cand_ref - 1] ?
  ------------------
  |  Branch (289:21): [True: 185, False: 5.92k]
  ------------------
  290|  5.92k|                    i_cand_mv : cand_mv;
  291|  6.11k|            }
  292|  8.38k|        }
  293|  27.4k|    }
  294|  17.5k|}
refmvs.c:add_single_extended_candidate:
  299|  42.4k|{
  300|  85.3k|    for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (300:21): [True: 82.8k, False: 2.46k]
  ------------------
  301|  82.8k|        const int cand_ref = cand_b->ref.ref[n];
  302|       |
  303|  82.8k|        if (cand_ref <= 0) break;
  ------------------
  |  Branch (303:13): [True: 39.9k, False: 42.8k]
  ------------------
  304|       |        // we need to continue even if cand_ref == ref.ref[0], since
  305|       |        // the candidate could have been added as a globalmv variant,
  306|       |        // which changes the value
  307|       |        // FIXME if scan_{row,col}() returned a mask for the nearest
  308|       |        // edge, we could skip the appropriate ones here
  309|       |
  310|  42.8k|        mv cand_mv = cand_b->mv.mv[n];
  311|  42.8k|        if (sign ^ sign_bias[cand_ref - 1]) {
  ------------------
  |  Branch (311:13): [True: 406, False: 42.4k]
  ------------------
  312|    406|            cand_mv.y = -cand_mv.y;
  313|    406|            cand_mv.x = -cand_mv.x;
  314|    406|        }
  315|       |
  316|  42.8k|        int m;
  317|  42.8k|        const int last = *cnt;
  318|  51.4k|        for (m = 0; m < last; m++)
  ------------------
  |  Branch (318:21): [True: 39.6k, False: 11.7k]
  ------------------
  319|  39.6k|            if (cand_mv.n == mvstack[m].mv.mv[0].n)
  ------------------
  |  Branch (319:17): [True: 31.0k, False: 8.56k]
  ------------------
  320|  31.0k|                break;
  321|  42.8k|        if (m == last) {
  ------------------
  |  Branch (321:13): [True: 11.7k, False: 31.0k]
  ------------------
  322|  11.7k|            mvstack[m].mv.mv[0] = cand_mv;
  323|  11.7k|            mvstack[m].weight = 2; // "minimal"
  324|  11.7k|            *cnt = last + 1;
  325|  11.7k|        }
  326|  42.8k|    }
  327|  42.4k|}

decode.c:dav1d_refmvs_save_tmvs:
  145|  1.95k|{
  146|  1.95k|    const refmvs_frame *const rf = rt->rf;
  147|       |
  148|  1.95k|    assert(row_start8 >= 0);
  ------------------
  |  |  140|  1.95k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.95k]
  |  |  |  Branch (140:68): [Folded, False: 1.95k]
  |  |  ------------------
  ------------------
  149|  1.95k|    assert((unsigned) (row_end8 - row_start8) <= 16U);
  ------------------
  |  |  140|  1.95k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.95k]
  |  |  |  Branch (140:68): [Folded, False: 1.95k]
  |  |  ------------------
  ------------------
  150|  1.95k|    row_end8 = imin(row_end8, rf->ih8);
  151|  1.95k|    col_end8 = imin(col_end8, rf->iw8);
  152|       |
  153|  1.95k|    const ptrdiff_t stride = rf->rp_stride;
  154|  1.95k|    const uint8_t *const ref_sign = rf->mfmv_sign;
  155|  1.95k|    refmvs_temporal_block *rp = &rf->rp[row_start8 * stride];
  156|       |
  157|  1.95k|    dsp->save_tmvs(rp, stride, rt->r + 6, ref_sign,
  158|  1.95k|                   col_end8, row_end8, col_start8, row_start8);
  159|  1.95k|}

dav1d_init_last_nonzero_col_from_eob_tables:
  350|  3.05k|COLD void dav1d_init_last_nonzero_col_from_eob_tables(void) {
  351|       |    static pthread_once_t initted = PTHREAD_ONCE_INIT;
  352|  3.05k|    pthread_once(&initted, init_internal);
  353|  3.05k|}
scan.c:init_internal:
  333|      1|static COLD void init_internal(void) {
  334|      1|    init_tbl(last_nonzero_col_from_eob_4x4,   scan_4x4,    4,  4);
  335|      1|    init_tbl(last_nonzero_col_from_eob_8x8,   scan_8x8,    8,  8);
  336|      1|    init_tbl(last_nonzero_col_from_eob_16x16, scan_16x16, 16, 16);
  337|      1|    init_tbl(last_nonzero_col_from_eob_32x32, scan_32x32, 32, 32);
  338|      1|    init_tbl(last_nonzero_col_from_eob_4x8,   scan_4x8,    4,  8);
  339|      1|    init_tbl(last_nonzero_col_from_eob_8x4,   scan_8x4,    8,  4);
  340|      1|    init_tbl(last_nonzero_col_from_eob_8x16,  scan_8x16,   8, 16);
  341|      1|    init_tbl(last_nonzero_col_from_eob_16x8,  scan_16x8,  16,  8);
  342|      1|    init_tbl(last_nonzero_col_from_eob_16x32, scan_16x32, 16, 32);
  343|      1|    init_tbl(last_nonzero_col_from_eob_32x16, scan_32x16, 32, 16);
  344|      1|    init_tbl(last_nonzero_col_from_eob_4x16,  scan_4x16,   4, 16);
  345|      1|    init_tbl(last_nonzero_col_from_eob_16x4,  scan_16x4,  16,  4);
  346|      1|    init_tbl(last_nonzero_col_from_eob_8x32,  scan_8x32,   8, 32);
  347|      1|    init_tbl(last_nonzero_col_from_eob_32x8,  scan_32x8,  32,  8);
  348|      1|}
scan.c:init_tbl:
  321|     14|{
  322|     14|    int max_col = 0;
  323|    218|    for (int y = 0, n = 0; y < h; y++) {
  ------------------
  |  Branch (323:28): [True: 204, False: 14]
  ------------------
  324|  3.54k|        for (int x = 0; x < w; x++, n++) {
  ------------------
  |  Branch (324:25): [True: 3.34k, False: 204]
  ------------------
  325|  3.34k|            const int rc = scan[n];
  326|  3.34k|            const int rcx = rc & (h - 1);
  327|  3.34k|            max_col = imax(max_col, rcx);
  328|  3.34k|            last_nonzero_col_from_eob[n] = max_col;
  329|  3.34k|        }
  330|    204|    }
  331|     14|}

dav1d_get_shear_params:
   80|  7.31k|int dav1d_get_shear_params(Dav1dWarpedMotionParams *const wm) {
   81|  7.31k|    const int32_t *const mat = wm->matrix;
   82|       |
   83|  7.31k|    if (mat[2] <= 0) return 1;
  ------------------
  |  Branch (83:9): [True: 0, False: 7.31k]
  ------------------
   84|       |
   85|  7.31k|    wm->u.p.alpha = iclip_wmp(mat[2] - 0x10000);
   86|  7.31k|    wm->u.p.beta = iclip_wmp(mat[3]);
   87|       |
   88|  7.31k|    int shift;
   89|  7.31k|    const int y = apply_sign(resolve_divisor_32(abs(mat[2]), &shift), mat[2]);
   90|  7.31k|    const int64_t v1 = ((int64_t) mat[4] * 0x10000) * y;
   91|  7.31k|    const int rnd = (1 << shift) >> 1;
   92|  7.31k|    wm->u.p.gamma = iclip_wmp(apply_sign64((int) ((llabs(v1) + rnd) >> shift), v1));
   93|  7.31k|    const int64_t v2 = ((int64_t) mat[3] * mat[4]) * y;
   94|  7.31k|    wm->u.p.delta = iclip_wmp(mat[5] -
   95|  7.31k|                          apply_sign64((int) ((llabs(v2) + rnd) >> shift), v2) -
   96|  7.31k|                          0x10000);
   97|       |
   98|  7.31k|    return (4 * abs(wm->u.p.alpha) + 7 * abs(wm->u.p.beta) >= 0x10000) ||
  ------------------
  |  Branch (98:12): [True: 276, False: 7.04k]
  ------------------
   99|  7.04k|           (4 * abs(wm->u.p.gamma) + 4 * abs(wm->u.p.delta) >= 0x10000);
  ------------------
  |  Branch (99:12): [True: 60, False: 6.98k]
  ------------------
  100|  7.31k|}
dav1d_find_affine_int:
  153|  3.28k|{
  154|  3.28k|    int32_t *const mat = wm->matrix;
  155|  3.28k|    int a[2][2] = { { 0, 0 }, { 0, 0 } };
  156|  3.28k|    int bx[2] = { 0, 0 };
  157|  3.28k|    int by[2] = { 0, 0 };
  158|  3.28k|    const int rsuy = 2 * bh4 - 1;
  159|  3.28k|    const int rsux = 2 * bw4 - 1;
  160|  3.28k|    const int suy = rsuy * 8;
  161|  3.28k|    const int sux = rsux * 8;
  162|  3.28k|    const int duy = suy + mv.y;
  163|  3.28k|    const int dux = sux + mv.x;
  164|  3.28k|    const int isuy = by4 * 4 + rsuy;
  165|  3.28k|    const int isux = bx4 * 4 + rsux;
  166|       |
  167|  8.96k|    for (int i = 0; i < np; i++) {
  ------------------
  |  Branch (167:21): [True: 5.68k, False: 3.28k]
  ------------------
  168|  5.68k|        const int dx = pts[i][1][0] - dux;
  169|  5.68k|        const int dy = pts[i][1][1] - duy;
  170|  5.68k|        const int sx = pts[i][0][0] - sux;
  171|  5.68k|        const int sy = pts[i][0][1] - suy;
  172|  5.68k|        if (abs(sx - dx) < 256 && abs(sy - dy) < 256) {
  ------------------
  |  Branch (172:13): [True: 5.54k, False: 136]
  |  Branch (172:35): [True: 5.43k, False: 114]
  ------------------
  173|  5.43k|            a[0][0] += ((sx * sx) >> 2) + sx * 2 + 8;
  174|  5.43k|            a[0][1] += ((sx * sy) >> 2) + sx + sy + 4;
  175|  5.43k|            a[1][1] += ((sy * sy) >> 2) + sy * 2 + 8;
  176|  5.43k|            bx[0] += ((sx * dx) >> 2) + sx + dx + 8;
  177|  5.43k|            bx[1] += ((sy * dx) >> 2) + sy + dx + 4;
  178|  5.43k|            by[0] += ((sx * dy) >> 2) + sx + dy + 4;
  179|  5.43k|            by[1] += ((sy * dy) >> 2) + sy + dy + 8;
  180|  5.43k|        }
  181|  5.68k|    }
  182|       |
  183|       |    // compute determinant of a
  184|  3.28k|    const int64_t det = (int64_t) a[0][0] * a[1][1] - (int64_t) a[0][1] * a[0][1];
  185|  3.28k|    if (det == 0) return 1;
  ------------------
  |  Branch (185:9): [True: 250, False: 3.03k]
  ------------------
  186|  3.03k|    int shift, idet = apply_sign64(resolve_divisor_64(llabs(det), &shift), det);
  187|  3.03k|    shift -= 16;
  188|  3.03k|    if (shift < 0) {
  ------------------
  |  Branch (188:9): [True: 0, False: 3.03k]
  ------------------
  189|      0|        idet <<= -shift;
  190|      0|        shift = 0;
  191|      0|    }
  192|       |
  193|       |    // solve the least-squares
  194|  3.03k|    mat[2] = get_mult_shift_diag((int64_t) a[1][1] * bx[0] -
  195|  3.03k|                                 (int64_t) a[0][1] * bx[1], idet, shift);
  196|  3.03k|    mat[3] = get_mult_shift_ndiag((int64_t) a[0][0] * bx[1] -
  197|  3.03k|                                  (int64_t) a[0][1] * bx[0], idet, shift);
  198|  3.03k|    mat[4] = get_mult_shift_ndiag((int64_t) a[1][1] * by[0] -
  199|  3.03k|                                  (int64_t) a[0][1] * by[1], idet, shift);
  200|  3.03k|    mat[5] = get_mult_shift_diag((int64_t) a[0][0] * by[1] -
  201|  3.03k|                                 (int64_t) a[0][1] * by[0], idet, shift);
  202|       |
  203|  3.03k|    mat[0] = iclip(mv.x * 0x2000 - (isux * (mat[2] - 0x10000) + isuy * mat[3]),
  204|  3.03k|                   -0x800000, 0x7fffff);
  205|  3.03k|    mat[1] = iclip(mv.y * 0x2000 - (isux * mat[4] + isuy * (mat[5] - 0x10000)),
  206|  3.03k|                   -0x800000, 0x7fffff);
  207|       |
  208|  3.03k|    return 0;
  209|  3.28k|}
warpmv.c:iclip_wmp:
   63|  29.2k|static inline int iclip_wmp(const int v) {
   64|  29.2k|    const int cv = iclip(v, INT16_MIN, INT16_MAX);
   65|       |
   66|  29.2k|    return apply_sign((abs(cv) + 32) >> 6, cv) * (1 << 6);
   67|  29.2k|}
warpmv.c:resolve_divisor_32:
   69|  7.31k|static inline int resolve_divisor_32(const unsigned d, int *const shift) {
   70|  7.31k|    *shift = ulog2(d);
   71|  7.31k|    const int e = d - (1 << *shift);
   72|  7.31k|    const int f = *shift > 8 ? (e + (1 << (*shift - 9))) >> (*shift - 8) :
  ------------------
  |  Branch (72:19): [True: 7.31k, False: 0]
  ------------------
   73|  7.31k|                               e << (8 - *shift);
   74|  7.31k|    assert(f <= 256);
  ------------------
  |  |  140|  7.31k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 7.31k]
  |  |  |  Branch (140:68): [Folded, False: 7.31k]
  |  |  ------------------
  ------------------
   75|  7.31k|    *shift += 14;
   76|       |    // Use f as lookup into the precomputed table of multipliers
   77|  7.31k|    return div_lut[f];
   78|  7.31k|}
warpmv.c:resolve_divisor_64:
  102|  3.03k|static int resolve_divisor_64(const uint64_t d, int *const shift) {
  103|  3.03k|    *shift = u64log2(d);
  104|  3.03k|    const int64_t e = d - (1LL << *shift);
  105|  3.03k|    const int64_t f = *shift > 8 ? (e + (1LL << (*shift - 9))) >> (*shift - 8) :
  ------------------
  |  Branch (105:23): [True: 3.03k, False: 0]
  ------------------
  106|  3.03k|                                   e << (8 - *shift);
  107|  3.03k|    assert(f <= 256);
  ------------------
  |  |  140|  3.03k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.03k]
  |  |  |  Branch (140:68): [Folded, False: 3.03k]
  |  |  ------------------
  ------------------
  108|  3.03k|    *shift += 14;
  109|       |    // Use f as lookup into the precomputed table of multipliers
  110|  3.03k|    return div_lut[f];
  111|  3.03k|}
warpmv.c:get_mult_shift_diag:
  125|  6.06k|{
  126|  6.06k|    const int64_t v1 = px * idet;
  127|  6.06k|    const int v2 = apply_sign64((int) ((llabs(v1) +
  128|  6.06k|                                        ((1LL << shift) >> 1)) >> shift),
  129|  6.06k|                                v1);
  130|  6.06k|    return iclip(v2, 0xe001, 0x11fff);
  131|  6.06k|}
warpmv.c:get_mult_shift_ndiag:
  115|  6.06k|{
  116|  6.06k|    const int64_t v1 = px * idet;
  117|  6.06k|    const int v2 = apply_sign64((int) ((llabs(v1) +
  118|  6.06k|                                        ((1LL << shift) >> 1)) >> shift),
  119|  6.06k|                                v1);
  120|  6.06k|    return iclip(v2, -0x1fff, 0x1fff);
  121|  6.06k|}

dav1d_init_ii_wedge_masks:
  207|      1|COLD void dav1d_init_ii_wedge_masks(void) {
  208|       |    // This function is guaranteed to be called only once
  209|       |
  210|      1|    enum WedgeMasterLineType {
  211|      1|        WEDGE_MASTER_LINE_ODD,
  212|      1|        WEDGE_MASTER_LINE_EVEN,
  213|      1|        WEDGE_MASTER_LINE_VERT,
  214|      1|        N_WEDGE_MASTER_LINES,
  215|      1|    };
  216|      1|    static const uint8_t wedge_master_border[N_WEDGE_MASTER_LINES][8] = {
  217|      1|        [WEDGE_MASTER_LINE_ODD]  = {  1,  2,  6, 18, 37, 53, 60, 63 },
  218|      1|        [WEDGE_MASTER_LINE_EVEN] = {  1,  4, 11, 27, 46, 58, 62, 63 },
  219|      1|        [WEDGE_MASTER_LINE_VERT] = {  0,  2,  7, 21, 43, 57, 62, 64 },
  220|      1|    };
  221|      1|    uint8_t master[6][64 * 64];
  222|       |
  223|       |    // create master templates
  224|     65|    for (int y = 0, off = 0; y < 64; y++, off += 64)
  ------------------
  |  Branch (224:30): [True: 64, False: 1]
  ------------------
  225|     64|        insert_border(&master[WEDGE_VERTICAL][off],
  226|     64|                      wedge_master_border[WEDGE_MASTER_LINE_VERT], 32);
  227|     33|    for (int y = 0, off = 0, ctr = 48; y < 64; y += 2, off += 128, ctr--)
  ------------------
  |  Branch (227:40): [True: 32, False: 1]
  ------------------
  228|     32|    {
  229|     32|        insert_border(&master[WEDGE_OBLIQUE63][off],
  230|     32|                      wedge_master_border[WEDGE_MASTER_LINE_EVEN], ctr);
  231|     32|        insert_border(&master[WEDGE_OBLIQUE63][off + 64],
  232|     32|                      wedge_master_border[WEDGE_MASTER_LINE_ODD], ctr - 1);
  233|     32|    }
  234|       |
  235|      1|    transpose(master[WEDGE_OBLIQUE27], master[WEDGE_OBLIQUE63]);
  236|      1|    transpose(master[WEDGE_HORIZONTAL], master[WEDGE_VERTICAL]);
  237|      1|    hflip(master[WEDGE_OBLIQUE117], master[WEDGE_OBLIQUE63]);
  238|      1|    hflip(master[WEDGE_OBLIQUE153], master[WEDGE_OBLIQUE27]);
  239|       |
  240|      1|#define fill(w, h, sz_422, sz_420, hvsw, signs) \
  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  242|      1|                master, wedge_codebook_16_##hvsw, \
  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  246|       |
  247|      1|    fill(32, 32, 16x32, 16x16, heqw, 0x7bfb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  248|      1|    fill(32, 16, 16x16, 16x8,  hltw, 0x7beb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  249|      1|    fill(32,  8, 16x8,  16x4,  hltw, 0x6beb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  250|      1|    fill(16, 32,  8x32,  8x16, hgtw, 0x7beb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  251|      1|    fill(16, 16,  8x16,  8x8,  heqw, 0x7bfb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  252|      1|    fill(16,  8,  8x8,   8x4,  hltw, 0x7beb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  253|      1|    fill( 8, 32,  4x32,  4x16, hgtw, 0x7aeb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  254|      1|    fill( 8, 16,  4x16,  4x8,  hgtw, 0x7beb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  255|      1|    fill( 8,  8,  4x8,   4x4,  heqw, 0x7bfb);
  ------------------
  |  |  241|      1|    fill2d_16x2(w, h, BS_##w##x##h - BS_32x32, \
  |  |  242|      1|                master, wedge_codebook_16_##hvsw, \
  |  |  243|      1|                dav1d_masks.wedge_444_##w##x##h, \
  |  |  244|      1|                dav1d_masks.wedge_422_##sz_422, \
  |  |  245|      1|                dav1d_masks.wedge_420_##sz_420, signs)
  ------------------
  256|      1|#undef fill
  257|       |
  258|      1|    memset(dav1d_masks.ii_dc, 32, 32 * 32);
  259|      4|    for (int c = 0; c < 3; c++) {
  ------------------
  |  Branch (259:21): [True: 3, False: 1]
  ------------------
  260|      3|        dav1d_masks.offsets[c][BS_32x32-BS_32x32].ii[II_DC_PRED] =
  261|      3|        dav1d_masks.offsets[c][BS_32x16-BS_32x32].ii[II_DC_PRED] =
  262|      3|        dav1d_masks.offsets[c][BS_16x32-BS_32x32].ii[II_DC_PRED] =
  263|      3|        dav1d_masks.offsets[c][BS_16x16-BS_32x32].ii[II_DC_PRED] =
  264|      3|        dav1d_masks.offsets[c][BS_16x8 -BS_32x32].ii[II_DC_PRED] =
  265|      3|        dav1d_masks.offsets[c][BS_8x16 -BS_32x32].ii[II_DC_PRED] =
  266|      3|        dav1d_masks.offsets[c][BS_8x8  -BS_32x32].ii[II_DC_PRED] =
  267|      3|            MASK_OFFSET(dav1d_masks.ii_dc);
  ------------------
  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  ------------------
  268|      3|    }
  269|       |
  270|      1|#define BUILD_NONDC_II_MASKS(w, h, step) \
  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  272|       |
  273|      1|#define ASSIGN_NONDC_II_OFFSET(bs, w444, h444, w422, h422, w420, h420) \
  274|      1|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  275|      1|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  276|      1|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  277|      1|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  278|      1|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  279|      1|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  280|       |
  281|      1|    BUILD_NONDC_II_MASKS(32, 32, 1);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  282|      1|    BUILD_NONDC_II_MASKS(16, 32, 1);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  283|      1|    BUILD_NONDC_II_MASKS(16, 16, 2);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  284|      1|    BUILD_NONDC_II_MASKS( 8, 32, 1);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  285|      1|    BUILD_NONDC_II_MASKS( 8, 16, 2);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  286|      1|    BUILD_NONDC_II_MASKS( 8,  8, 4);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  287|      1|    BUILD_NONDC_II_MASKS( 4, 16, 2);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  288|      1|    BUILD_NONDC_II_MASKS( 4,  8, 4);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  289|      1|    BUILD_NONDC_II_MASKS( 4,  4, 8);
  ------------------
  |  |  271|      1|    build_nondc_ii_masks(dav1d_masks.ii_nondc_##w##x##h, w, h, step)
  ------------------
  290|      4|    for (int p = 0; p < 3; p++) {
  ------------------
  |  Branch (290:21): [True: 3, False: 1]
  ------------------
  291|      3|        ASSIGN_NONDC_II_OFFSET(BS_32x32, 32, 32, 16, 32, 16, 16);
  ------------------
  |  |  274|      3|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  |  |  275|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  276|      3|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  |  |  277|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  278|      3|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  |  |  279|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  ------------------
  292|      3|        ASSIGN_NONDC_II_OFFSET(BS_32x16, 32, 32, 16, 16, 16, 16);
  ------------------
  |  |  274|      3|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  |  |  275|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  276|      3|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  |  |  277|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  278|      3|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  |  |  279|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  ------------------
  293|      3|        ASSIGN_NONDC_II_OFFSET(BS_16x32, 16, 32,  8, 32,  8, 16);
  ------------------
  |  |  274|      3|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  |  |  275|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  276|      3|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  |  |  277|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  278|      3|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  |  |  279|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  ------------------
  294|      3|        ASSIGN_NONDC_II_OFFSET(BS_16x16, 16, 16,  8, 16,  8,  8);
  ------------------
  |  |  274|      3|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  |  |  275|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  276|      3|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  |  |  277|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  278|      3|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  |  |  279|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  ------------------
  295|      3|        ASSIGN_NONDC_II_OFFSET(BS_16x8,  16, 16,  8,  8,  8,  8);
  ------------------
  |  |  274|      3|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  |  |  275|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  276|      3|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  |  |  277|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  278|      3|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  |  |  279|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  ------------------
  296|      3|        ASSIGN_NONDC_II_OFFSET(BS_8x16,   8, 16,  4, 16,  4,  8);
  ------------------
  |  |  274|      3|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  |  |  275|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  276|      3|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  |  |  277|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  278|      3|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  |  |  279|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  ------------------
  297|      3|        ASSIGN_NONDC_II_OFFSET(BS_8x8,    8,  8,  4,  8,  4,  4);
  ------------------
  |  |  274|      3|    dav1d_masks.offsets[0][bs-BS_32x32].ii[p + 1] = \
  |  |  275|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w444##x##h444[p*w444*h444]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  276|      3|    dav1d_masks.offsets[1][bs-BS_32x32].ii[p + 1] = \
  |  |  277|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w422##x##h422[p*w422*h422]); \
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  |  |  278|      3|    dav1d_masks.offsets[2][bs-BS_32x32].ii[p + 1] = \
  |  |  279|      3|        MASK_OFFSET(&dav1d_masks.ii_nondc_##w420##x##h420[p*w420*h420])
  |  |  ------------------
  |  |  |  |  129|      3|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  |  |  ------------------
  ------------------
  298|      3|    }
  299|      1|}
wedge.c:insert_border:
   90|    128|{
   91|    128|    if (ctr > 4) memset(dst, 0, ctr - 4);
  ------------------
  |  Branch (91:9): [True: 128, False: 0]
  ------------------
   92|    128|    memcpy(dst + imax(ctr, 4) - 4, src + imax(4 - ctr, 0), imin(64 - ctr, 8));
   93|    128|    if (ctr < 64 - 4)
  ------------------
  |  Branch (93:9): [True: 128, False: 0]
  ------------------
   94|    128|        memset(dst + ctr + 4, 64, 64 - 4 - ctr);
   95|    128|}
wedge.c:transpose:
   97|      2|static void transpose(uint8_t *const dst, const uint8_t *const src) {
   98|    130|    for (int y = 0, y_off = 0; y < 64; y++, y_off += 64)
  ------------------
  |  Branch (98:32): [True: 128, False: 2]
  ------------------
   99|  8.32k|        for (int x = 0, x_off = 0; x < 64; x++, x_off += 64)
  ------------------
  |  Branch (99:36): [True: 8.19k, False: 128]
  ------------------
  100|  8.19k|            dst[x_off + y] = src[y_off + x];
  101|      2|}
wedge.c:hflip:
  103|      2|static void hflip(uint8_t *const dst, const uint8_t *const src) {
  104|    130|    for (int y = 0, y_off = 0; y < 64; y++, y_off += 64)
  ------------------
  |  Branch (104:32): [True: 128, False: 2]
  ------------------
  105|  8.32k|        for (int x = 0; x < 64; x++)
  ------------------
  |  Branch (105:25): [True: 8.19k, False: 128]
  ------------------
  106|  8.19k|            dst[y_off + 64 - 1 - x] = src[y_off + x];
  107|      2|}
wedge.c:fill2d_16x2:
  153|      9|{
  154|      9|    const int n_stride_444 = (w * h);
  155|      9|    const int n_stride_422 = n_stride_444 >> 1;
  156|      9|    const int n_stride_420 = n_stride_444 >> 2;
  157|      9|    const int sign_stride_422 = 16 * n_stride_422;
  158|      9|    const int sign_stride_420 = 16 * n_stride_420;
  159|       |
  160|       |    // assign pointer offsets in lookup table
  161|    153|    for (int n = 0; n < 16; n++) {
  ------------------
  |  Branch (161:21): [True: 144, False: 9]
  ------------------
  162|    144|        const int sign = signs & 1;
  163|       |
  164|    144|        copy2d(masks_444, master[cb[n].direction], sign, w, h,
  165|    144|               32 - (w * cb[n].x_offset >> 3), 32 - (h * cb[n].y_offset >> 3));
  166|       |
  167|       |        // not using !sign is intentional here, since 444 does not require
  168|       |        // any rounding since no chroma subsampling is applied.
  169|    144|        dav1d_masks.offsets[0][bs].wedge[0][n] =
  170|    144|        dav1d_masks.offsets[0][bs].wedge[1][n] = MASK_OFFSET(masks_444);
  ------------------
  |  |  129|    144|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  ------------------
  171|       |
  172|    144|        dav1d_masks.offsets[1][bs].wedge[0][n] =
  173|    144|            init_chroma(&masks_422[ sign * sign_stride_422], masks_444, 0, w, h, 0);
  174|    144|        dav1d_masks.offsets[1][bs].wedge[1][n] =
  175|    144|            init_chroma(&masks_422[!sign * sign_stride_422], masks_444, 1, w, h, 0);
  176|    144|        dav1d_masks.offsets[2][bs].wedge[0][n] =
  177|    144|            init_chroma(&masks_420[ sign * sign_stride_420], masks_444, 0, w, h, 1);
  178|    144|        dav1d_masks.offsets[2][bs].wedge[1][n] =
  179|    144|            init_chroma(&masks_420[!sign * sign_stride_420], masks_444, 1, w, h, 1);
  180|       |
  181|    144|        signs >>= 1;
  182|    144|        masks_444 += n_stride_444;
  183|    144|        masks_422 += n_stride_422;
  184|    144|        masks_420 += n_stride_420;
  185|    144|    }
  186|      9|}
wedge.c:copy2d:
  111|    144|{
  112|    144|    src += y_off * 64 + x_off;
  113|    144|    if (sign) {
  ------------------
  |  Branch (113:9): [True: 109, False: 35]
  ------------------
  114|  2.14k|        for (int y = 0; y < h; y++) {
  ------------------
  |  Branch (114:25): [True: 2.03k, False: 109]
  ------------------
  115|  40.4k|            for (int x = 0; x < w; x++)
  ------------------
  |  Branch (115:29): [True: 38.4k, False: 2.03k]
  ------------------
  116|  38.4k|                dst[x] = 64 - src[x];
  117|  2.03k|            src += 64;
  118|  2.03k|            dst += w;
  119|  2.03k|        }
  120|    109|    } else {
  121|    691|        for (int y = 0; y < h; y++) {
  ------------------
  |  Branch (121:25): [True: 656, False: 35]
  ------------------
  122|    656|            memcpy(dst, src, w);
  123|    656|            src += 64;
  124|    656|            dst += w;
  125|    656|        }
  126|     35|    }
  127|    144|}
wedge.c:init_chroma:
  134|    576|{
  135|    576|    const uint16_t offset = MASK_OFFSET(chroma);
  ------------------
  |  |  129|    576|#define MASK_OFFSET(x) ((uint16_t)(((uintptr_t)(x) - (uintptr_t)&dav1d_masks) >> 3))
  ------------------
  136|  8.64k|    for (int y = 0; y < h; y += 1 + ss_ver) {
  ------------------
  |  Branch (136:21): [True: 8.06k, False: 576]
  ------------------
  137|  83.3k|        for (int x = 0; x < w; x += 2) {
  ------------------
  |  Branch (137:25): [True: 75.2k, False: 8.06k]
  ------------------
  138|  75.2k|            int sum = luma[x] + luma[x + 1] + 1;
  139|  75.2k|            if (ss_ver) sum += luma[w + x] + luma[w + x + 1] + 1;
  ------------------
  |  Branch (139:17): [True: 25.0k, False: 50.1k]
  ------------------
  140|  75.2k|            chroma[x >> 1] = (sum - sign) >> (1 + ss_ver);
  141|  75.2k|        }
  142|  8.06k|        luma += w << ss_ver;
  143|  8.06k|        chroma += w >> 1;
  144|  8.06k|    }
  145|    576|    return offset;
  146|    576|}
wedge.c:build_nondc_ii_masks:
  190|      9|{
  191|      9|    static const uint8_t ii_weights_1d[32] = {
  192|      9|        60, 52, 45, 39, 34, 30, 26, 22, 19, 17, 15, 13, 11, 10,  8,  7,
  193|      9|         6,  6,  5,  4,  4,  3,  3,  2,  2,  2,  2,  1,  1,  1,  1,  1,
  194|      9|    };
  195|       |
  196|      9|    uint8_t *const mask_h  = &mask_v[w * h];
  197|      9|    uint8_t *const mask_sm = &mask_h[w * h];
  198|    173|    for (int y = 0, off = 0; y < h; y++, off += w) {
  ------------------
  |  Branch (198:30): [True: 164, False: 9]
  ------------------
  199|    164|        memset(&mask_v[off], ii_weights_1d[y * step], w);
  200|  2.51k|        for (int x = 0; x < w; x++) {
  ------------------
  |  Branch (200:25): [True: 2.35k, False: 164]
  ------------------
  201|  2.35k|            mask_sm[off + x] = ii_weights_1d[imin(x, y) * step];
  202|  2.35k|            mask_h[off + x] = ii_weights_1d[x * step];
  203|  2.35k|        }
  204|    164|    }
  205|      9|}

cdef_tmpl.c:cdef_dsp_init_x86:
   46|  4.86k|static ALWAYS_INLINE void cdef_dsp_init_x86(Dav1dCdefDSPContext *const c) {
   47|  4.86k|    const unsigned flags = dav1d_get_cpu_flags();
   48|       |
   49|  4.86k|#if BITDEPTH == 8
   50|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (50:9): [True: 0, False: 4.86k]
  ------------------
   51|       |
   52|  4.86k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, sse2);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   53|  4.86k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, sse2);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   54|  4.86k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, sse2);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   55|  4.86k|#endif
   56|       |
   57|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (57:9): [True: 0, False: 4.86k]
  ------------------
   58|       |
   59|  4.86k|    c->dir = BF(dav1d_cdef_dir, ssse3);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   60|  4.86k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, ssse3);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   61|  4.86k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, ssse3);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   62|  4.86k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, ssse3);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   63|       |
   64|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE41)) return;
  ------------------
  |  Branch (64:9): [True: 0, False: 4.86k]
  ------------------
   65|       |
   66|  4.86k|    c->dir = BF(dav1d_cdef_dir, sse4);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   67|  4.86k|#if BITDEPTH == 8
   68|  4.86k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, sse4);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   69|  4.86k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, sse4);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   70|  4.86k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, sse4);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   71|  4.86k|#endif
   72|       |
   73|  4.86k|#if ARCH_X86_64
   74|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (74:9): [True: 0, False: 4.86k]
  ------------------
   75|       |
   76|  4.86k|    c->dir = BF(dav1d_cdef_dir, avx2);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   77|  4.86k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, avx2);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   78|  4.86k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, avx2);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   79|  4.86k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, avx2);
  ------------------
  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   80|       |
   81|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (81:9): [True: 4.86k, False: 0]
  ------------------
   82|       |
   83|      0|    c->fb[0] = BF(dav1d_cdef_filter_8x8, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   84|      0|    c->fb[1] = BF(dav1d_cdef_filter_4x8, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   85|      0|    c->fb[2] = BF(dav1d_cdef_filter_4x4, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   86|      0|#endif
   87|      0|}

dav1d_get_cpu_flags_x86:
   47|      1|COLD unsigned dav1d_get_cpu_flags_x86(void) {
   48|      1|    union {
   49|      1|        CpuidRegisters r;
   50|      1|        struct {
   51|      1|            uint32_t max_leaf;
   52|      1|            char vendor[12];
   53|      1|        };
   54|      1|    } cpu;
   55|      1|    dav1d_cpu_cpuid(&cpu.r, 0, 0);
   56|      1|    unsigned flags = dav1d_get_default_cpu_flags();
   57|       |
   58|      1|    if (cpu.max_leaf >= 1) {
  ------------------
  |  Branch (58:9): [True: 1, False: 0]
  ------------------
   59|      1|        CpuidRegisters r;
   60|      1|        dav1d_cpu_cpuid(&r, 1, 0);
   61|      1|        const unsigned family = ((r.eax >> 8) & 0x0f) + ((r.eax >> 20) & 0xff);
   62|       |
   63|      1|        if (X(r.edx, 0x06008000)) /* CMOV/SSE/SSE2 */ {
  ------------------
  |  |   45|      1|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   64|      1|            flags |= DAV1D_X86_CPU_FLAG_SSE2;
   65|      1|            if (X(r.ecx, 0x00000201)) /* SSE3/SSSE3 */ {
  ------------------
  |  |   45|      1|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   66|      1|                flags |= DAV1D_X86_CPU_FLAG_SSSE3;
   67|      1|                if (X(r.ecx, 0x00080000)) /* SSE4.1 */
  ------------------
  |  |   45|      1|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   68|      1|                    flags |= DAV1D_X86_CPU_FLAG_SSE41;
   69|      1|            }
   70|      1|        }
   71|      1|#if ARCH_X86_64
   72|       |        /* We only support >128-bit SIMD on x86-64. */
   73|      1|        if (X(r.ecx, 0x18000000)) /* OSXSAVE/AVX */ {
  ------------------
  |  |   45|      1|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   74|      1|            const uint64_t xcr0 = dav1d_cpu_xgetbv(0);
   75|      1|            if (X(xcr0, 0x00000006)) /* XMM/YMM */ {
  ------------------
  |  |   45|      1|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   76|      1|                if (cpu.max_leaf >= 7) {
  ------------------
  |  Branch (76:21): [True: 1, False: 0]
  ------------------
   77|      1|                    dav1d_cpu_cpuid(&r, 7, 0);
   78|      1|                    if (X(r.ebx, 0x00000128)) /* BMI1/BMI2/AVX2 */ {
  ------------------
  |  |   45|      1|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1, False: 0]
  |  |  ------------------
  ------------------
   79|      1|                        flags |= DAV1D_X86_CPU_FLAG_AVX2;
   80|      1|                        if (X(xcr0, 0x000000e0)) /* ZMM/OPMASK */ {
  ------------------
  |  |   45|      1|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 1]
  |  |  ------------------
  ------------------
   81|      0|                            if (X(r.ebx, 0xd0230000) && X(r.ecx, 0x00005f42))
  ------------------
  |  |   45|      0|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                          if (X(r.ebx, 0xd0230000) && X(r.ecx, 0x00005f42))
  ------------------
  |  |   45|      0|#define X(reg, mask) (((reg) & (mask)) == (mask))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   82|      0|                                flags |= DAV1D_X86_CPU_FLAG_AVX512ICL;
   83|      0|                        }
   84|      1|                    }
   85|      1|                }
   86|      1|            }
   87|      1|        }
   88|      1|#endif
   89|      1|        if (!memcmp(cpu.vendor, "AuthenticAMD", sizeof(cpu.vendor))) {
  ------------------
  |  Branch (89:13): [True: 1, False: 0]
  ------------------
   90|      1|            if ((flags & DAV1D_X86_CPU_FLAG_AVX2) && family <= 0x19) {
  ------------------
  |  Branch (90:17): [True: 1, False: 0]
  |  Branch (90:54): [True: 1, False: 0]
  ------------------
   91|       |                /* Excavator, Zen, Zen+, Zen 2, Zen 3, Zen 3+, Zen 4 */
   92|      1|                flags |= DAV1D_X86_CPU_FLAG_SLOW_GATHER;
   93|      1|            }
   94|      1|        }
   95|      1|    }
   96|       |
   97|      1|    return flags;
   98|      1|}

filmgrain_tmpl.c:film_grain_dsp_init_x86:
   45|  11.7k|static ALWAYS_INLINE void film_grain_dsp_init_x86(Dav1dFilmGrainDSPContext *const c) {
   46|  11.7k|    const unsigned flags = dav1d_get_cpu_flags();
   47|       |
   48|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (48:9): [True: 0, False: 11.7k]
  ------------------
   49|       |
   50|  11.7k|    c->generate_grain_y = BF(dav1d_generate_grain_y, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   51|  11.7k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_generate_grain_uv_420, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   52|  11.7k|    c->fgy_32x32xn = BF(dav1d_fgy_32x32xn, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   53|  11.7k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_fguv_32x32xn_i420, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   54|  11.7k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_generate_grain_uv_422, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   55|  11.7k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_generate_grain_uv_444, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   56|  11.7k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_fguv_32x32xn_i422, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   57|  11.7k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_fguv_32x32xn_i444, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   58|       |
   59|  11.7k|#if ARCH_X86_64
   60|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (60:9): [True: 0, False: 11.7k]
  ------------------
   61|       |
   62|  11.7k|    c->generate_grain_y = BF(dav1d_generate_grain_y, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   63|  11.7k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_generate_grain_uv_420, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   64|  11.7k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_generate_grain_uv_422, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   65|  11.7k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_generate_grain_uv_444, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   66|       |
   67|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_SLOW_GATHER)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 11.7k]
  ------------------
   68|      0|        c->fgy_32x32xn = BF(dav1d_fgy_32x32xn, avx2);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   69|      0|        c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_fguv_32x32xn_i420, avx2);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   70|      0|        c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_fguv_32x32xn_i422, avx2);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   71|      0|        c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_fguv_32x32xn_i444, avx2);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   72|      0|    }
   73|       |
   74|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (74:9): [True: 11.7k, False: 0]
  ------------------
   75|       |
   76|      0|    if (BITDEPTH == 8 || !(flags & DAV1D_X86_CPU_FLAG_SLOW_GATHER)) {
  ------------------
  |  Branch (76:9): [True: 0, Folded]
  |  Branch (76:26): [True: 0, False: 0]
  ------------------
   77|      0|        c->fgy_32x32xn = BF(dav1d_fgy_32x32xn, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   78|      0|        c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_fguv_32x32xn_i420, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   79|      0|        c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_fguv_32x32xn_i422, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   80|      0|        c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_fguv_32x32xn_i444, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   81|      0|    }
   82|      0|#endif
   83|      0|}

ipred_tmpl.c:intra_pred_dsp_init_x86:
   71|  11.7k|static ALWAYS_INLINE void intra_pred_dsp_init_x86(Dav1dIntraPredDSPContext *const c) {
   72|  11.7k|    const unsigned flags = dav1d_get_cpu_flags();
   73|       |
   74|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (74:9): [True: 0, False: 11.7k]
  ------------------
   75|       |
   76|  11.7k|    init_angular_ipred_fn(DC_PRED,       ipred_dc,       ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   77|  11.7k|    init_angular_ipred_fn(DC_128_PRED,   ipred_dc_128,   ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   78|  11.7k|    init_angular_ipred_fn(TOP_DC_PRED,   ipred_dc_top,   ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|  11.7k|    init_angular_ipred_fn(LEFT_DC_PRED,  ipred_dc_left,  ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|  11.7k|    init_angular_ipred_fn(HOR_PRED,      ipred_h,        ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   81|  11.7k|    init_angular_ipred_fn(VERT_PRED,     ipred_v,        ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   82|  11.7k|    init_angular_ipred_fn(PAETH_PRED,    ipred_paeth,    ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  11.7k|    init_angular_ipred_fn(SMOOTH_PRED,   ipred_smooth,   ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|  11.7k|    init_angular_ipred_fn(SMOOTH_H_PRED, ipred_smooth_h, ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   85|  11.7k|    init_angular_ipred_fn(SMOOTH_V_PRED, ipred_smooth_v, ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   86|  11.7k|    init_angular_ipred_fn(Z1_PRED,       ipred_z1,       ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   87|  11.7k|    init_angular_ipred_fn(Z2_PRED,       ipred_z2,       ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|  11.7k|    init_angular_ipred_fn(Z3_PRED,       ipred_z3,       ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   89|  11.7k|    init_angular_ipred_fn(FILTER_PRED,   ipred_filter,   ssse3);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   90|       |
   91|  11.7k|    init_cfl_pred_fn(DC_PRED,      ipred_cfl,      ssse3);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   92|  11.7k|    init_cfl_pred_fn(DC_128_PRED,  ipred_cfl_128,  ssse3);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|  11.7k|    init_cfl_pred_fn(TOP_DC_PRED,  ipred_cfl_top,  ssse3);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  11.7k|    init_cfl_pred_fn(LEFT_DC_PRED, ipred_cfl_left, ssse3);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|       |
   96|  11.7k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I420 - 1, ipred_cfl_ac_420, ssse3);
  ------------------
  |  |   43|  11.7k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   97|  11.7k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I422 - 1, ipred_cfl_ac_422, ssse3);
  ------------------
  |  |   43|  11.7k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|  11.7k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I444 - 1, ipred_cfl_ac_444, ssse3);
  ------------------
  |  |   43|  11.7k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   99|       |
  100|  11.7k|    c->pal_pred = BF(dav1d_pal_pred, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  101|       |
  102|  11.7k|#if ARCH_X86_64
  103|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (103:9): [True: 0, False: 11.7k]
  ------------------
  104|       |
  105|  11.7k|    init_angular_ipred_fn(DC_PRED,       ipred_dc,       avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  106|  11.7k|    init_angular_ipred_fn(DC_128_PRED,   ipred_dc_128,   avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  107|  11.7k|    init_angular_ipred_fn(TOP_DC_PRED,   ipred_dc_top,   avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  108|  11.7k|    init_angular_ipred_fn(LEFT_DC_PRED,  ipred_dc_left,  avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|  11.7k|    init_angular_ipred_fn(HOR_PRED,      ipred_h,        avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  110|  11.7k|    init_angular_ipred_fn(VERT_PRED,     ipred_v,        avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  111|  11.7k|    init_angular_ipred_fn(PAETH_PRED,    ipred_paeth,    avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  112|  11.7k|    init_angular_ipred_fn(SMOOTH_PRED,   ipred_smooth,   avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  11.7k|    init_angular_ipred_fn(SMOOTH_H_PRED, ipred_smooth_h, avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  11.7k|    init_angular_ipred_fn(SMOOTH_V_PRED, ipred_smooth_v, avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  115|  11.7k|    init_angular_ipred_fn(Z1_PRED,       ipred_z1,       avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  116|  11.7k|    init_angular_ipred_fn(Z2_PRED,       ipred_z2,       avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  117|  11.7k|    init_angular_ipred_fn(Z3_PRED,       ipred_z3,       avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  118|  11.7k|    init_angular_ipred_fn(FILTER_PRED,   ipred_filter,   avx2);
  ------------------
  |  |   39|  11.7k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|       |
  120|  11.7k|    init_cfl_pred_fn(DC_PRED,      ipred_cfl,      avx2);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  11.7k|    init_cfl_pred_fn(DC_128_PRED,  ipred_cfl_128,  avx2);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  122|  11.7k|    init_cfl_pred_fn(TOP_DC_PRED,  ipred_cfl_top,  avx2);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  123|  11.7k|    init_cfl_pred_fn(LEFT_DC_PRED, ipred_cfl_left, avx2);
  ------------------
  |  |   41|  11.7k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  124|       |
  125|  11.7k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I420 - 1, ipred_cfl_ac_420, avx2);
  ------------------
  |  |   43|  11.7k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|  11.7k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I422 - 1, ipred_cfl_ac_422, avx2);
  ------------------
  |  |   43|  11.7k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  127|  11.7k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I444 - 1, ipred_cfl_ac_444, avx2);
  ------------------
  |  |   43|  11.7k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |
  129|  11.7k|    c->pal_pred = BF(dav1d_pal_pred, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  130|       |
  131|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (131:9): [True: 11.7k, False: 0]
  ------------------
  132|       |
  133|      0|#if BITDEPTH == 8
  134|      0|    init_angular_ipred_fn(DC_PRED,       ipred_dc,       avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  11.7k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  135|      0|    init_angular_ipred_fn(DC_128_PRED,   ipred_dc_128,   avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  136|      0|    init_angular_ipred_fn(TOP_DC_PRED,   ipred_dc_top,   avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|      0|    init_angular_ipred_fn(LEFT_DC_PRED,  ipred_dc_left,  avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  138|      0|    init_angular_ipred_fn(HOR_PRED,      ipred_h,        avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|      0|    init_angular_ipred_fn(VERT_PRED,     ipred_v,        avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  140|      0|    init_angular_ipred_fn(Z2_PRED,       ipred_z2,       avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  141|      0|#endif
  142|      0|    init_angular_ipred_fn(PAETH_PRED,    ipred_paeth,    avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  143|      0|    init_angular_ipred_fn(SMOOTH_PRED,   ipred_smooth,   avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  144|      0|    init_angular_ipred_fn(SMOOTH_H_PRED, ipred_smooth_h, avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|      0|    init_angular_ipred_fn(SMOOTH_V_PRED, ipred_smooth_v, avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  146|      0|    init_angular_ipred_fn(Z1_PRED,       ipred_z1,       avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  147|      0|    init_angular_ipred_fn(Z2_PRED,       ipred_z2,       avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|      0|    init_angular_ipred_fn(Z3_PRED,       ipred_z3,       avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|      0|    init_angular_ipred_fn(FILTER_PRED,   ipred_filter,   avx512icl);
  ------------------
  |  |   39|      0|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|      0|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  150|       |
  151|      0|    c->pal_pred = BF(dav1d_pal_pred, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  152|      0|#endif
  153|      0|}

itx_tmpl.c:itx_dsp_init_x86:
  112|  4.86k|{
  113|  4.86k|#define assign_itx_bpc_fn(pfx, w, h, type, type_enum, bpc, ext) \
  114|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  115|  4.86k|        BF_BPC(dav1d_inv_txfm_add_##type##_##w##x##h, bpc, ext)
  116|       |
  117|  4.86k|#define assign_itx1_bpc_fn(pfx, w, h, bpc, ext) \
  118|  4.86k|    assign_itx_bpc_fn(pfx, w, h, dct_dct,           DCT_DCT,           bpc, ext)
  119|       |
  120|  4.86k|#define assign_itx2_bpc_fn(pfx, w, h, bpc, ext) \
  121|  4.86k|    assign_itx1_bpc_fn(pfx, w, h, bpc, ext); \
  122|  4.86k|    assign_itx_bpc_fn(pfx, w, h, identity_identity, IDTX,              bpc, ext)
  123|       |
  124|  4.86k|#define assign_itx12_bpc_fn(pfx, w, h, bpc, ext) \
  125|  4.86k|    assign_itx2_bpc_fn(pfx, w, h, bpc, ext); \
  126|  4.86k|    assign_itx_bpc_fn(pfx, w, h, dct_adst,          ADST_DCT,          bpc, ext); \
  127|  4.86k|    assign_itx_bpc_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      bpc, ext); \
  128|  4.86k|    assign_itx_bpc_fn(pfx, w, h, dct_identity,      H_DCT,             bpc, ext); \
  129|  4.86k|    assign_itx_bpc_fn(pfx, w, h, adst_dct,          DCT_ADST,          bpc, ext); \
  130|  4.86k|    assign_itx_bpc_fn(pfx, w, h, adst_adst,         ADST_ADST,         bpc, ext); \
  131|  4.86k|    assign_itx_bpc_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     bpc, ext); \
  132|  4.86k|    assign_itx_bpc_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      bpc, ext); \
  133|  4.86k|    assign_itx_bpc_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     bpc, ext); \
  134|  4.86k|    assign_itx_bpc_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, bpc, ext); \
  135|  4.86k|    assign_itx_bpc_fn(pfx, w, h, identity_dct,      V_DCT,             bpc, ext)
  136|       |
  137|  4.86k|#define assign_itx16_bpc_fn(pfx, w, h, bpc, ext) \
  138|  4.86k|    assign_itx12_bpc_fn(pfx, w, h, bpc, ext); \
  139|  4.86k|    assign_itx_bpc_fn(pfx, w, h, adst_identity,     H_ADST,            bpc, ext); \
  140|  4.86k|    assign_itx_bpc_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        bpc, ext); \
  141|  4.86k|    assign_itx_bpc_fn(pfx, w, h, identity_adst,     V_ADST,            bpc, ext); \
  142|  4.86k|    assign_itx_bpc_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        bpc, ext)
  143|       |
  144|  4.86k|    const unsigned flags = dav1d_get_cpu_flags();
  145|       |
  146|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (146:9): [True: 0, False: 4.86k]
  ------------------
  147|       |
  148|  4.86k|    assign_itx_fn(, 4, 4, wht_wht, WHT_WHT, sse2);
  ------------------
  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  ------------------
  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  149|       |
  150|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (150:9): [True: 0, False: 4.86k]
  ------------------
  151|       |
  152|  4.86k|#if BITDEPTH == 8
  153|  4.86k|    assign_itx16_fn(,   4,  4, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  154|  4.86k|    assign_itx16_fn(R,  4,  8, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  4.86k|    assign_itx16_fn(R,  8,  4, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|  4.86k|    assign_itx16_fn(,   8,  8, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  157|  4.86k|    assign_itx16_fn(R,  4, 16, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  158|  4.86k|    assign_itx16_fn(R, 16,  4, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|  4.86k|    assign_itx16_fn(R,  8, 16, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|  4.86k|    assign_itx16_fn(R, 16,  8, ssse3);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  161|  4.86k|    assign_itx12_fn(,  16, 16, ssse3);
  ------------------
  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|  4.86k|    assign_itx2_fn (R,  8, 32, ssse3);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|  4.86k|    assign_itx2_fn (R, 32,  8, ssse3);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  164|  4.86k|    assign_itx2_fn (R, 16, 32, ssse3);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  4.86k|    assign_itx2_fn (R, 32, 16, ssse3);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  166|  4.86k|    assign_itx2_fn (,  32, 32, ssse3);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  167|  4.86k|    assign_itx1_fn (R, 16, 64, ssse3);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  168|  4.86k|    assign_itx1_fn (R, 32, 64, ssse3);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  4.86k|    assign_itx1_fn (R, 64, 16, ssse3);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|  4.86k|    assign_itx1_fn (R, 64, 32, ssse3);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  171|  4.86k|    assign_itx1_fn ( , 64, 64, ssse3);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  4.86k|    *all_simd = 1;
  173|  4.86k|#endif
  174|       |
  175|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE41)) return;
  ------------------
  |  Branch (175:9): [True: 0, False: 4.86k]
  ------------------
  176|       |
  177|       |#if BITDEPTH == 16
  178|       |    if (bpc == 10) {
  179|       |        assign_itx16_fn(,   4,  4, sse4);
  180|       |        assign_itx16_fn(R,  4,  8, sse4);
  181|       |        assign_itx16_fn(R,  4, 16, sse4);
  182|       |        assign_itx16_fn(R,  8,  4, sse4);
  183|       |        assign_itx16_fn(,   8,  8, sse4);
  184|       |        assign_itx16_fn(R,  8, 16, sse4);
  185|       |        assign_itx16_fn(R, 16,  4, sse4);
  186|       |        assign_itx16_fn(R, 16,  8, sse4);
  187|       |        assign_itx12_fn(,  16, 16, sse4);
  188|       |        assign_itx2_fn (R,  8, 32, sse4);
  189|       |        assign_itx2_fn (R, 32,  8, sse4);
  190|       |        assign_itx2_fn (R, 16, 32, sse4);
  191|       |        assign_itx2_fn (R, 32, 16, sse4);
  192|       |        assign_itx2_fn (,  32, 32, sse4);
  193|       |        assign_itx1_fn (R, 16, 64, sse4);
  194|       |        assign_itx1_fn (R, 32, 64, sse4);
  195|       |        assign_itx1_fn (R, 64, 16, sse4);
  196|       |        assign_itx1_fn (R, 64, 32, sse4);
  197|       |        assign_itx1_fn (,  64, 64, sse4);
  198|       |        *all_simd = 1;
  199|       |    }
  200|       |#endif
  201|       |
  202|  4.86k|#if ARCH_X86_64
  203|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (203:9): [True: 0, False: 4.86k]
  ------------------
  204|       |
  205|  4.86k|    assign_itx_fn(, 4, 4, wht_wht, WHT_WHT, avx2);
  ------------------
  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  ------------------
  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  206|       |
  207|  4.86k|#if BITDEPTH == 8
  208|  4.86k|    assign_itx16_fn( ,  4,  4, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  209|  4.86k|    assign_itx16_fn(R,  4,  8, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|  4.86k|    assign_itx16_fn(R,  4, 16, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|  4.86k|    assign_itx16_fn(R,  8,  4, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  212|  4.86k|    assign_itx16_fn( ,  8,  8, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  213|  4.86k|    assign_itx16_fn(R,  8, 16, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  4.86k|    assign_itx2_fn (R,  8, 32, avx2);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  215|  4.86k|    assign_itx16_fn(R, 16,  4, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|  4.86k|    assign_itx16_fn(R, 16,  8, avx2);
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  4.86k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  4.86k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|  4.86k|    assign_itx12_fn( , 16, 16, avx2);
  ------------------
  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   89|  4.86k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|  4.86k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|  4.86k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   92|  4.86k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  4.86k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|  4.86k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   96|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|  4.86k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|  4.86k|    assign_itx2_fn (R, 16, 32, avx2);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  219|  4.86k|    assign_itx1_fn (R, 16, 64, avx2);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  220|  4.86k|    assign_itx2_fn (R, 32,  8, avx2);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|  4.86k|    assign_itx2_fn (R, 32, 16, avx2);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|  4.86k|    assign_itx2_fn ( , 32, 32, avx2);
  ------------------
  |  |   84|  4.86k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|  4.86k|    assign_itx1_fn (R, 32, 64, avx2);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|  4.86k|    assign_itx1_fn (R, 64, 16, avx2);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|  4.86k|    assign_itx1_fn (R, 64, 32, avx2);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  226|  4.86k|    assign_itx1_fn ( , 64, 64, avx2);
  ------------------
  |  |   81|  4.86k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  227|       |#else
  228|       |    if (bpc == 10) {
  229|       |        assign_itx16_bpc_fn( ,  4,  4, 10, avx2);
  230|       |        assign_itx16_bpc_fn(R,  4,  8, 10, avx2);
  231|       |        assign_itx16_bpc_fn(R,  4, 16, 10, avx2);
  232|       |        assign_itx16_bpc_fn(R,  8,  4, 10, avx2);
  233|       |        assign_itx16_bpc_fn( ,  8,  8, 10, avx2);
  234|       |        assign_itx16_bpc_fn(R,  8, 16, 10, avx2);
  235|       |        assign_itx2_bpc_fn (R,  8, 32, 10, avx2);
  236|       |        assign_itx16_bpc_fn(R, 16,  4, 10, avx2);
  237|       |        assign_itx16_bpc_fn(R, 16,  8, 10, avx2);
  238|       |        assign_itx12_bpc_fn( , 16, 16, 10, avx2);
  239|       |        assign_itx2_bpc_fn (R, 16, 32, 10, avx2);
  240|       |        assign_itx1_bpc_fn (R, 16, 64, 10, avx2);
  241|       |        assign_itx2_bpc_fn (R, 32,  8, 10, avx2);
  242|       |        assign_itx2_bpc_fn (R, 32, 16, 10, avx2);
  243|       |        assign_itx2_bpc_fn ( , 32, 32, 10, avx2);
  244|       |        assign_itx1_bpc_fn (R, 32, 64, 10, avx2);
  245|       |        assign_itx1_bpc_fn (R, 64, 16, 10, avx2);
  246|       |        assign_itx1_bpc_fn (R, 64, 32, 10, avx2);
  247|       |        assign_itx1_bpc_fn ( , 64, 64, 10, avx2);
  248|       |    } else {
  249|       |        assign_itx16_bpc_fn( ,  4,  4, 12, avx2);
  250|       |        assign_itx16_bpc_fn(R,  4,  8, 12, avx2);
  251|       |        assign_itx16_bpc_fn(R,  4, 16, 12, avx2);
  252|       |        assign_itx16_bpc_fn(R,  8,  4, 12, avx2);
  253|       |        assign_itx16_bpc_fn( ,  8,  8, 12, avx2);
  254|       |        assign_itx16_bpc_fn(R,  8, 16, 12, avx2);
  255|       |        assign_itx2_bpc_fn (R,  8, 32, 12, avx2);
  256|       |        assign_itx16_bpc_fn(R, 16,  4, 12, avx2);
  257|       |        assign_itx16_bpc_fn(R, 16,  8, 12, avx2);
  258|       |        assign_itx12_bpc_fn( , 16, 16, 12, avx2);
  259|       |        assign_itx2_bpc_fn (R, 32,  8, 12, avx2);
  260|       |        assign_itx_bpc_fn(R, 16, 32, identity_identity, IDTX, 12, avx2);
  261|       |        assign_itx_bpc_fn(R, 32, 16, identity_identity, IDTX, 12, avx2);
  262|       |        assign_itx_bpc_fn( , 32, 32, identity_identity, IDTX, 12, avx2);
  263|       |    }
  264|       |#endif
  265|       |
  266|  4.86k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (266:9): [True: 4.86k, False: 0]
  ------------------
  267|       |
  268|      0|#if BITDEPTH == 8
  269|  4.86k|    assign_itx16_fn( ,  4,  4, avx512icl); // no wht
  ------------------
  |  |  101|  4.86k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  4.86k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  4.86k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  4.86k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  4.86k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  4.86k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  4.86k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  4.86k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  270|      0|    assign_itx16_fn(R,  4,  8, avx512icl);
  ------------------
  |  |  101|      0|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  271|      0|    assign_itx16_fn(R,  4, 16, avx512icl);
  ------------------
  |  |  101|      0|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  272|      0|    assign_itx16_fn(R,  8,  4, avx512icl);
  ------------------
  |  |  101|      0|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  273|      0|    assign_itx16_fn( ,  8,  8, avx512icl);
  ------------------
  |  |  101|      0|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  274|      0|    assign_itx16_fn(R,  8, 16, avx512icl);
  ------------------
  |  |  101|      0|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  275|      0|    assign_itx2_fn (R,  8, 32, avx512icl);
  ------------------
  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  276|      0|    assign_itx16_fn(R, 16,  4, avx512icl);
  ------------------
  |  |  101|      0|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  277|      0|    assign_itx16_fn(R, 16,  8, avx512icl);
  ------------------
  |  |  101|      0|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|      0|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|      0|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|      0|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|      0|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|      0|    assign_itx12_fn( , 16, 16, avx512icl);
  ------------------
  |  |   88|      0|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   89|      0|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      0|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|      0|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   92|      0|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|      0|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|      0|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|      0|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   96|      0|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|      0|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|      0|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  279|      0|    assign_itx2_fn (R, 16, 32, avx512icl);
  ------------------
  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  280|      0|    assign_itx1_fn (R, 16, 64, avx512icl);
  ------------------
  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  281|      0|    assign_itx2_fn (R, 32,  8, avx512icl);
  ------------------
  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|      0|    assign_itx2_fn (R, 32, 16, avx512icl);
  ------------------
  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|      0|    assign_itx2_fn ( , 32, 32, avx512icl);
  ------------------
  |  |   84|      0|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|      0|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  284|      0|    assign_itx1_fn (R, 32, 64, avx512icl);
  ------------------
  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|      0|    assign_itx1_fn (R, 64, 16, avx512icl);
  ------------------
  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  286|      0|    assign_itx1_fn (R, 64, 32, avx512icl);
  ------------------
  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  287|      0|    assign_itx1_fn ( , 64, 64, avx512icl);
  ------------------
  |  |   81|      0|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|      0|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|      0|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  288|       |#else
  289|       |    if (bpc == 10) {
  290|       |        assign_itx16_bpc_fn( ,  8,  8, 10, avx512icl);
  291|       |        assign_itx16_bpc_fn(R,  8, 16, 10, avx512icl);
  292|       |        assign_itx2_bpc_fn (R,  8, 32, 10, avx512icl);
  293|       |        assign_itx16_bpc_fn(R, 16,  8, 10, avx512icl);
  294|       |        assign_itx12_bpc_fn( , 16, 16, 10, avx512icl);
  295|       |        assign_itx2_bpc_fn (R, 16, 32, 10, avx512icl);
  296|       |        assign_itx2_bpc_fn (R, 32,  8, 10, avx512icl);
  297|       |        assign_itx2_bpc_fn (R, 32, 16, 10, avx512icl);
  298|       |        assign_itx2_bpc_fn ( , 32, 32, 10, avx512icl);
  299|       |        assign_itx1_bpc_fn (R, 16, 64, 10, avx512icl);
  300|       |        assign_itx1_bpc_fn (R, 32, 64, 10, avx512icl);
  301|       |        assign_itx1_bpc_fn (R, 64, 16, 10, avx512icl);
  302|       |        assign_itx1_bpc_fn (R, 64, 32, 10, avx512icl);
  303|       |        assign_itx1_bpc_fn ( , 64, 64, 10, avx512icl);
  304|       |    }
  305|       |#endif
  306|      0|#endif
  307|      0|}

loopfilter_tmpl.c:loop_filter_dsp_init_x86:
   41|  11.7k|static ALWAYS_INLINE void loop_filter_dsp_init_x86(Dav1dLoopFilterDSPContext *const c) {
   42|  11.7k|    const unsigned flags = dav1d_get_cpu_flags();
   43|       |
   44|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (44:9): [True: 0, False: 11.7k]
  ------------------
   45|       |
   46|  11.7k|    c->loop_filter_sb[0][0] = BF(dav1d_lpf_h_sb_y, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   47|  11.7k|    c->loop_filter_sb[0][1] = BF(dav1d_lpf_v_sb_y, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   48|  11.7k|    c->loop_filter_sb[1][0] = BF(dav1d_lpf_h_sb_uv, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   49|  11.7k|    c->loop_filter_sb[1][1] = BF(dav1d_lpf_v_sb_uv, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   50|       |
   51|  11.7k|#if ARCH_X86_64
   52|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (52:9): [True: 0, False: 11.7k]
  ------------------
   53|       |
   54|  11.7k|    c->loop_filter_sb[0][0] = BF(dav1d_lpf_h_sb_y, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   55|  11.7k|    c->loop_filter_sb[0][1] = BF(dav1d_lpf_v_sb_y, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   56|  11.7k|    c->loop_filter_sb[1][0] = BF(dav1d_lpf_h_sb_uv, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   57|  11.7k|    c->loop_filter_sb[1][1] = BF(dav1d_lpf_v_sb_uv, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   58|       |
   59|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (59:9): [True: 11.7k, False: 0]
  ------------------
   60|       |
   61|      0|    c->loop_filter_sb[0][1] = BF(dav1d_lpf_v_sb_y, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   62|      0|    c->loop_filter_sb[1][1] = BF(dav1d_lpf_v_sb_uv, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   63|       |
   64|      0|    if (!(flags & DAV1D_X86_CPU_FLAG_SLOW_GATHER)) {
  ------------------
  |  Branch (64:9): [True: 0, False: 0]
  ------------------
   65|      0|        c->loop_filter_sb[0][0] = BF(dav1d_lpf_h_sb_y, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   66|      0|        c->loop_filter_sb[1][0] = BF(dav1d_lpf_h_sb_uv, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   67|      0|    }
   68|      0|#endif
   69|      0|}

looprestoration_tmpl.c:loop_restoration_dsp_init_x86:
   50|  11.7k|static ALWAYS_INLINE void loop_restoration_dsp_init_x86(Dav1dLoopRestorationDSPContext *const c, const int bpc) {
   51|  11.7k|    const unsigned flags = dav1d_get_cpu_flags();
   52|       |
   53|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (53:9): [True: 0, False: 11.7k]
  ------------------
   54|  11.7k|#if BITDEPTH == 8
   55|  11.7k|    c->wiener[0] = BF(dav1d_wiener_filter7, sse2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   56|  11.7k|    c->wiener[1] = BF(dav1d_wiener_filter5, sse2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   57|  11.7k|#endif
   58|       |
   59|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (59:9): [True: 0, False: 11.7k]
  ------------------
   60|  11.7k|    c->wiener[0] = BF(dav1d_wiener_filter7, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   61|  11.7k|    c->wiener[1] = BF(dav1d_wiener_filter5, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   62|  11.7k|    if (BITDEPTH == 8 || bpc == 10) {
  ------------------
  |  Branch (62:9): [True: 4.86k, Folded]
  |  Branch (62:26): [True: 3.87k, False: 3.05k]
  ------------------
   63|  8.73k|        c->sgr[0] = BF(dav1d_sgr_filter_5x5, ssse3);
  ------------------
  |  |   52|  8.73k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   64|  8.73k|        c->sgr[1] = BF(dav1d_sgr_filter_3x3, ssse3);
  ------------------
  |  |   52|  8.73k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   65|  8.73k|        c->sgr[2] = BF(dav1d_sgr_filter_mix, ssse3);
  ------------------
  |  |   52|  8.73k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   66|  8.73k|    }
   67|       |
   68|  11.7k|#if ARCH_X86_64
   69|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (69:9): [True: 0, False: 11.7k]
  ------------------
   70|       |
   71|  11.7k|    c->wiener[0] = BF(dav1d_wiener_filter7, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   72|  11.7k|    c->wiener[1] = BF(dav1d_wiener_filter5, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   73|  11.7k|    if (BITDEPTH == 8 || bpc == 10) {
  ------------------
  |  Branch (73:9): [True: 4.86k, Folded]
  |  Branch (73:26): [True: 3.87k, False: 3.05k]
  ------------------
   74|  8.73k|        c->sgr[0] = BF(dav1d_sgr_filter_5x5, avx2);
  ------------------
  |  |   52|  8.73k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   75|  8.73k|        c->sgr[1] = BF(dav1d_sgr_filter_3x3, avx2);
  ------------------
  |  |   52|  8.73k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   76|  8.73k|        c->sgr[2] = BF(dav1d_sgr_filter_mix, avx2);
  ------------------
  |  |   52|  8.73k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   77|  8.73k|    }
   78|       |
   79|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (79:9): [True: 11.7k, False: 0]
  ------------------
   80|       |
   81|      0|    c->wiener[0] = BF(dav1d_wiener_filter7, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   82|      0|#if BITDEPTH == 8
   83|       |    /* With VNNI we don't need a 5-tap version. */
   84|      0|    c->wiener[1] = c->wiener[0];
   85|       |#else
   86|       |    c->wiener[1] = BF(dav1d_wiener_filter5, avx512icl);
   87|       |#endif
   88|      0|    if (BITDEPTH == 8 || bpc == 10) {
  ------------------
  |  Branch (88:9): [True: 0, Folded]
  |  Branch (88:26): [True: 0, False: 0]
  ------------------
   89|      0|        c->sgr[0] = BF(dav1d_sgr_filter_5x5, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   90|      0|        c->sgr[1] = BF(dav1d_sgr_filter_3x3, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   91|      0|        c->sgr[2] = BF(dav1d_sgr_filter_mix, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   92|      0|    }
   93|      0|#endif
   94|      0|}

mc_tmpl.c:mc_dsp_init_x86:
   92|  11.7k|static ALWAYS_INLINE void mc_dsp_init_x86(Dav1dMCDSPContext *const c) {
   93|  11.7k|    const unsigned flags = dav1d_get_cpu_flags();
   94|       |
   95|  11.7k|    if(!(flags & DAV1D_X86_CPU_FLAG_SSSE3))
  ------------------
  |  Branch (95:8): [True: 0, False: 11.7k]
  ------------------
   96|      0|        return;
   97|       |
   98|  11.7k|    init_8tap_fns(ssse3);
  ------------------
  |  |  143|  11.7k|    init_8tap_gen(mc,  opt); \
  |  |  ------------------
  |  |  |  |  132|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  144|  11.7k|    init_8tap_gen(mct, opt)
  |  |  ------------------
  |  |  |  |  132|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   99|       |
  100|  11.7k|    init_mc_fn(FILTER_2D_BILINEAR,             bilin,               ssse3);
  ------------------
  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  101|  11.7k|    init_mct_fn(FILTER_2D_BILINEAR,            bilin,               ssse3);
  ------------------
  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  102|       |
  103|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  104|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  105|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  106|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  107|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  108|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  109|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  110|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  111|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  112|  11.7k|    init_mc_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               ssse3);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  113|       |
  114|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  115|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  116|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  117|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  118|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  119|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  120|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  121|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  122|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  123|  11.7k|    init_mct_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               ssse3);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  124|       |
  125|  11.7k|    c->avg = BF(dav1d_avg, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  126|  11.7k|    c->w_avg = BF(dav1d_w_avg, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  127|  11.7k|    c->mask = BF(dav1d_mask, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  128|  11.7k|    c->w_mask[0] = BF(dav1d_w_mask_444, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  129|  11.7k|    c->w_mask[1] = BF(dav1d_w_mask_422, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  130|  11.7k|    c->w_mask[2] = BF(dav1d_w_mask_420, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  131|  11.7k|    c->blend = BF(dav1d_blend, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  132|  11.7k|    c->blend_v = BF(dav1d_blend_v, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  133|  11.7k|    c->blend_h = BF(dav1d_blend_h, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  134|  11.7k|    c->warp8x8  = BF(dav1d_warp_affine_8x8, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  135|  11.7k|    c->warp8x8t = BF(dav1d_warp_affine_8x8t, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  136|  11.7k|    c->emu_edge = BF(dav1d_emu_edge, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  137|  11.7k|    c->resize = BF(dav1d_resize, ssse3);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  138|       |
  139|  11.7k|    if(!(flags & DAV1D_X86_CPU_FLAG_SSE41))
  ------------------
  |  Branch (139:8): [True: 0, False: 11.7k]
  ------------------
  140|      0|        return;
  141|       |
  142|  11.7k|#if BITDEPTH == 8
  143|  11.7k|    c->warp8x8  = BF(dav1d_warp_affine_8x8, sse4);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  144|  11.7k|    c->warp8x8t = BF(dav1d_warp_affine_8x8t, sse4);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  145|  11.7k|#endif
  146|       |
  147|  11.7k|#if ARCH_X86_64
  148|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2))
  ------------------
  |  Branch (148:9): [True: 0, False: 11.7k]
  ------------------
  149|      0|        return;
  150|       |
  151|  11.7k|    init_8tap_fns(avx2);
  ------------------
  |  |  143|  11.7k|    init_8tap_gen(mc,  opt); \
  |  |  ------------------
  |  |  |  |  132|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  144|  11.7k|    init_8tap_gen(mct, opt)
  |  |  ------------------
  |  |  |  |  132|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|       |
  153|  11.7k|    init_mc_fn(FILTER_2D_BILINEAR,            bilin,               avx2);
  ------------------
  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  154|  11.7k|    init_mct_fn(FILTER_2D_BILINEAR,           bilin,               avx2);
  ------------------
  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  155|       |
  156|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  157|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  158|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  159|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  160|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  161|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  162|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  163|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  164|  11.7k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  165|  11.7k|    init_mc_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               avx2);
  ------------------
  |  |   40|  11.7k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  166|       |
  167|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  168|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  169|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  170|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  171|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  172|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  173|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  174|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  175|  11.7k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  176|  11.7k|    init_mct_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               avx2);
  ------------------
  |  |   42|  11.7k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  177|       |
  178|  11.7k|    c->avg = BF(dav1d_avg, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  179|  11.7k|    c->w_avg = BF(dav1d_w_avg, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  180|  11.7k|    c->mask = BF(dav1d_mask, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  181|  11.7k|    c->w_mask[0] = BF(dav1d_w_mask_444, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  182|  11.7k|    c->w_mask[1] = BF(dav1d_w_mask_422, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  183|  11.7k|    c->w_mask[2] = BF(dav1d_w_mask_420, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  184|  11.7k|    c->blend = BF(dav1d_blend, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  185|  11.7k|    c->blend_v = BF(dav1d_blend_v, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  186|  11.7k|    c->blend_h = BF(dav1d_blend_h, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  187|  11.7k|    c->warp8x8  = BF(dav1d_warp_affine_8x8, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  188|  11.7k|    c->warp8x8t = BF(dav1d_warp_affine_8x8t, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  189|  11.7k|    c->emu_edge = BF(dav1d_emu_edge, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  190|  11.7k|    c->resize = BF(dav1d_resize, avx2);
  ------------------
  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  191|       |
  192|  11.7k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL))
  ------------------
  |  Branch (192:9): [True: 11.7k, False: 0]
  ------------------
  193|  11.7k|        return;
  194|       |
  195|  11.7k|    init_8tap_fns(avx512icl);
  ------------------
  |  |  143|      0|    init_8tap_gen(mc,  opt); \
  |  |  ------------------
  |  |  |  |  132|      0|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|      0|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|      0|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|      0|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|      0|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|      0|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|      0|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|      0|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.7k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  144|      0|    init_8tap_gen(mct, opt)
  |  |  ------------------
  |  |  |  |  132|      0|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  11.7k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  11.7k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  11.7k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|       |
  197|      0|    init_mc_fn (FILTER_2D_BILINEAR,            bilin,               avx512icl);
  ------------------
  |  |   36|      0|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  198|      0|    init_mct_fn(FILTER_2D_BILINEAR,            bilin,               avx512icl);
  ------------------
  |  |   38|      0|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  199|       |
  200|      0|    c->avg = BF(dav1d_avg, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  201|      0|    c->w_avg = BF(dav1d_w_avg, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  202|      0|    c->mask = BF(dav1d_mask, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  203|      0|    c->w_mask[0] = BF(dav1d_w_mask_444, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  204|      0|    c->w_mask[1] = BF(dav1d_w_mask_422, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  205|      0|    c->w_mask[2] = BF(dav1d_w_mask_420, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  206|      0|    c->blend = BF(dav1d_blend, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  207|      0|    c->blend_v = BF(dav1d_blend_v, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  208|      0|    c->blend_h = BF(dav1d_blend_h, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  209|       |
  210|      0|    if (!(flags & DAV1D_X86_CPU_FLAG_SLOW_GATHER)) {
  ------------------
  |  Branch (210:9): [True: 0, False: 0]
  ------------------
  211|      0|        c->resize = BF(dav1d_resize, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  212|      0|        c->warp8x8  = BF(dav1d_warp_affine_8x8, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  213|      0|        c->warp8x8t = BF(dav1d_warp_affine_8x8t, avx512icl);
  ------------------
  |  |   52|      0|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  214|      0|    }
  215|      0|#endif
  216|      0|}

msac.c:msac_init_x86:
   59|  19.1k|static ALWAYS_INLINE void msac_init_x86(MsacContext *const s) {
   60|  19.1k|    const unsigned flags = dav1d_get_cpu_flags();
   61|       |
   62|  19.1k|    if (flags & DAV1D_X86_CPU_FLAG_SSE2) {
  ------------------
  |  Branch (62:9): [True: 19.1k, False: 0]
  ------------------
   63|  19.1k|        s->symbol_adapt16 = dav1d_msac_decode_symbol_adapt16_sse2;
   64|  19.1k|    }
   65|       |
   66|  19.1k|    if (flags & DAV1D_X86_CPU_FLAG_AVX2) {
  ------------------
  |  Branch (66:9): [True: 19.1k, False: 0]
  ------------------
   67|  19.1k|        s->symbol_adapt16 = dav1d_msac_decode_symbol_adapt16_avx2;
   68|  19.1k|    }
   69|  19.1k|}

pal.c:pal_dsp_init_x86:
   34|  12.9k|static ALWAYS_INLINE void pal_dsp_init_x86(Dav1dPalDSPContext *const c) {
   35|  12.9k|    const unsigned flags = dav1d_get_cpu_flags();
   36|       |
   37|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (37:9): [True: 0, False: 12.9k]
  ------------------
   38|       |
   39|  12.9k|    c->pal_idx_finish = dav1d_pal_idx_finish_ssse3;
   40|       |
   41|  12.9k|#if ARCH_X86_64
   42|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (42:9): [True: 0, False: 12.9k]
  ------------------
   43|       |
   44|  12.9k|    c->pal_idx_finish = dav1d_pal_idx_finish_avx2;
   45|       |
   46|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (46:9): [True: 12.9k, False: 0]
  ------------------
   47|       |
   48|      0|    c->pal_idx_finish = dav1d_pal_idx_finish_avx512icl;
   49|      0|#endif
   50|      0|}

refmvs.c:refmvs_dsp_init_x86:
   41|  12.9k|static ALWAYS_INLINE void refmvs_dsp_init_x86(Dav1dRefmvsDSPContext *const c) {
   42|  12.9k|    const unsigned flags = dav1d_get_cpu_flags();
   43|       |
   44|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (44:9): [True: 0, False: 12.9k]
  ------------------
   45|       |
   46|  12.9k|    c->splat_mv = dav1d_splat_mv_sse2;
   47|       |
   48|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (48:9): [True: 0, False: 12.9k]
  ------------------
   49|       |
   50|  12.9k|    c->save_tmvs = dav1d_save_tmvs_ssse3;
   51|       |
   52|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE41)) return;
  ------------------
  |  Branch (52:9): [True: 0, False: 12.9k]
  ------------------
   53|  12.9k|#if ARCH_X86_64
   54|  12.9k|    c->load_tmvs = dav1d_load_tmvs_sse4;
   55|       |
   56|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (56:9): [True: 0, False: 12.9k]
  ------------------
   57|       |
   58|  12.9k|    c->save_tmvs = dav1d_save_tmvs_avx2;
   59|  12.9k|    c->splat_mv = dav1d_splat_mv_avx2;
   60|       |
   61|  12.9k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (61:9): [True: 12.9k, False: 0]
  ------------------
   62|       |
   63|      0|    c->save_tmvs = dav1d_save_tmvs_avx512icl;
   64|      0|    c->splat_mv = dav1d_splat_mv_avx512icl;
   65|      0|#endif
   66|      0|}

cpu_id.cc:_ZN6libyuvL11SetCpuFlagsEi:
  127|      1|static __inline void SetCpuFlags(int cpu_flags) {
  128|      1|  LIBYUV_API extern int cpu_info_;
  129|      1|#ifdef __ATOMIC_RELAXED
  130|      1|  __atomic_store_n(&cpu_info_, cpu_flags, __ATOMIC_RELAXED);
  131|       |#else
  132|       |  cpu_info_ = cpu_flags;
  133|       |#endif
  134|      1|}
planar_functions.cc:_ZN6libyuvL11TestCpuFlagEi:
   77|    472|static __inline int TestCpuFlag(int test_flag) {
   78|    472|  LIBYUV_API extern int cpu_info_;
   79|    472|#ifdef __ATOMIC_RELAXED
   80|    472|  int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED);
   81|       |#else
   82|       |  int cpu_info = cpu_info_;
   83|       |#endif
   84|    472|  return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag;
  ------------------
  |  Branch (84:11): [True: 0, False: 472]
  ------------------
   85|    472|}
scale.cc:_ZN6libyuvL11TestCpuFlagEi:
   77|  18.9k|static __inline int TestCpuFlag(int test_flag) {
   78|  18.9k|  LIBYUV_API extern int cpu_info_;
   79|  18.9k|#ifdef __ATOMIC_RELAXED
   80|  18.9k|  int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED);
   81|       |#else
   82|       |  int cpu_info = cpu_info_;
   83|       |#endif
   84|  18.9k|  return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag;
  ------------------
  |  Branch (84:11): [True: 1, False: 18.9k]
  ------------------
   85|  18.9k|}
scale_common.cc:_ZN6libyuvL11TestCpuFlagEi:
   77|  2.35k|static __inline int TestCpuFlag(int test_flag) {
   78|  2.35k|  LIBYUV_API extern int cpu_info_;
   79|  2.35k|#ifdef __ATOMIC_RELAXED
   80|  2.35k|  int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED);
   81|       |#else
   82|       |  int cpu_info = cpu_info_;
   83|       |#endif
   84|  2.35k|  return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag;
  ------------------
  |  Branch (84:11): [True: 0, False: 2.35k]
  ------------------
   85|  2.35k|}

CpuId:
   64|      5|void CpuId(int info_eax, int info_ecx, int* cpu_info) {
   65|       |#if defined(_MSC_VER)
   66|       |// Visual C version uses intrinsic or inline x86 assembly.
   67|       |#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 160040219)
   68|       |  __cpuidex(cpu_info, info_eax, info_ecx);
   69|       |#elif defined(_M_IX86)
   70|       |  __asm {
   71|       |    mov        eax, info_eax
   72|       |    mov        ecx, info_ecx
   73|       |    mov        edi, cpu_info
   74|       |    cpuid
   75|       |    mov        [edi], eax
   76|       |    mov        [edi + 4], ebx
   77|       |    mov        [edi + 8], ecx
   78|       |    mov        [edi + 12], edx
   79|       |  }
   80|       |#else  // Visual C but not x86
   81|       |  if (info_ecx == 0) {
   82|       |    __cpuid(cpu_info, info_eax);
   83|       |  } else {
   84|       |    cpu_info[3] = cpu_info[2] = cpu_info[1] = cpu_info[0] = 0u;
   85|       |  }
   86|       |#endif
   87|       |// GCC version uses inline x86 assembly.
   88|       |#else  // defined(_MSC_VER)
   89|      5|  int info_ebx, info_edx;
   90|      5|  asm volatile(
   91|       |#if defined(__i386__) && defined(__PIC__)
   92|       |      // Preserve ebx for fpic 32 bit.
   93|       |      "mov         %%ebx, %%edi                  \n"
   94|       |      "cpuid                                     \n"
   95|       |      "xchg        %%edi, %%ebx                  \n"
   96|       |      : "=D"(info_ebx),
   97|       |#else
   98|      5|      "cpuid                                     \n"
   99|      5|      : "=b"(info_ebx),
  100|      5|#endif  //  defined( __i386__) && defined(__PIC__)
  101|      5|        "+a"(info_eax), "+c"(info_ecx), "=d"(info_edx));
  102|      5|  cpu_info[0] = info_eax;
  103|      5|  cpu_info[1] = info_ebx;
  104|      5|  cpu_info[2] = info_ecx;
  105|      5|  cpu_info[3] = info_edx;
  106|      5|#endif  // defined(_MSC_VER)
  107|      5|}
MaskCpuFlags:
  482|      1|int MaskCpuFlags(int enable_flags) {
  483|      1|  int cpu_info = GetCpuFlags() & enable_flags;
  484|      1|  SetCpuFlags(cpu_info);
  485|      1|  return cpu_info;
  486|      1|}
InitCpuFlags:
  489|      1|int InitCpuFlags(void) {
  490|      1|  return MaskCpuFlags(-1);
  491|      1|}
cpu_id.cc:_ZN6libyuvL11GetCpuFlagsEv:
  385|      1|static SAFEBUFFERS int GetCpuFlags(void) {
  386|      1|  int cpu_info = 0;
  387|      1|#if !defined(__pnacl__) && !defined(__CLR_VER) &&                   \
  388|      1|    (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \
  389|      1|     defined(_M_IX86))
  390|      1|  int cpu_info0[4] = {0, 0, 0, 0};
  391|      1|  int cpu_info1[4] = {0, 0, 0, 0};
  392|      1|  int cpu_info7[4] = {0, 0, 0, 0};
  393|      1|  int cpu_einfo7[4] = {0, 0, 0, 0};
  394|      1|  int cpu_info24[4] = {0, 0, 0, 0};
  395|      1|  int cpu_amdinfo21[4] = {0, 0, 0, 0};
  396|      1|  CpuId(0, 0, cpu_info0);
  397|      1|  CpuId(1, 0, cpu_info1);
  398|      1|  if (cpu_info0[0] >= 7) {
  ------------------
  |  Branch (398:7): [True: 1, False: 0]
  ------------------
  399|      1|    CpuId(7, 0, cpu_info7);
  400|      1|    CpuId(7, 1, cpu_einfo7);
  401|      1|    CpuId(0x80000021, 0, cpu_amdinfo21);
  402|      1|  }
  403|      1|  if (cpu_info0[0] >= 0x24) {
  ------------------
  |  Branch (403:7): [True: 0, False: 1]
  ------------------
  404|      0|    CpuId(0x24, 0, cpu_info24);
  405|      0|  }
  406|      1|  cpu_info = kCpuHasX86 | ((cpu_info1[3] & 0x04000000) ? kCpuHasSSE2 : 0) |
  ------------------
  |  Branch (406:28): [True: 1, False: 0]
  ------------------
  407|      1|             ((cpu_info1[2] & 0x00000200) ? kCpuHasSSSE3 : 0) |
  ------------------
  |  Branch (407:15): [True: 1, False: 0]
  ------------------
  408|      1|             ((cpu_info1[2] & 0x00080000) ? kCpuHasSSE41 : 0) |
  ------------------
  |  Branch (408:15): [True: 1, False: 0]
  ------------------
  409|      1|             ((cpu_info1[2] & 0x00100000) ? kCpuHasSSE42 : 0) |
  ------------------
  |  Branch (409:15): [True: 1, False: 0]
  ------------------
  410|      1|             ((cpu_info7[1] & 0x00000200) ? kCpuHasERMS : 0) |
  ------------------
  |  Branch (410:15): [True: 0, False: 1]
  ------------------
  411|      1|             ((cpu_info7[3] & 0x00000010) ? kCpuHasFSMR : 0);
  ------------------
  |  Branch (411:15): [True: 0, False: 1]
  ------------------
  412|       |
  413|       |  // AVX requires OS saves YMM registers.
  414|      1|  if (((cpu_info1[2] & 0x1c000000) == 0x1c000000) &&  // AVX and OSXSave
  ------------------
  |  Branch (414:7): [True: 1, False: 0]
  ------------------
  415|      1|      ((GetXCR0() & 6) == 6)) {  // Test OS saves YMM registers
  ------------------
  |  Branch (415:7): [True: 1, False: 0]
  ------------------
  416|      1|    cpu_info |= kCpuHasAVX | ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) |
  ------------------
  |  Branch (416:31): [True: 1, False: 0]
  ------------------
  417|      1|                ((cpu_info1[2] & 0x00001000) ? kCpuHasFMA3 : 0) |
  ------------------
  |  Branch (417:18): [True: 1, False: 0]
  ------------------
  418|      1|                ((cpu_info1[2] & 0x20000000) ? kCpuHasF16C : 0) |
  ------------------
  |  Branch (418:18): [True: 1, False: 0]
  ------------------
  419|      1|                ((cpu_einfo7[0] & 0x00000010) ? kCpuHasAVXVNNI : 0) |
  ------------------
  |  Branch (419:18): [True: 0, False: 1]
  ------------------
  420|      1|                ((cpu_einfo7[3] & 0x00000010) ? kCpuHasAVXVNNIINT8 : 0);
  ------------------
  |  Branch (420:18): [True: 0, False: 1]
  ------------------
  421|       |
  422|      1|    cpu_info |= ((cpu_amdinfo21[0] & 0x00008000) ? kCpuHasERMS : 0);
  ------------------
  |  Branch (422:18): [True: 0, False: 1]
  ------------------
  423|       |
  424|       |    // Detect AVX512bw
  425|      1|    if ((GetXCR0() & 0xe0) == 0xe0) {
  ------------------
  |  Branch (425:9): [True: 0, False: 1]
  ------------------
  426|      0|      cpu_info |= ((cpu_info7[1] & 0x40000000) ? kCpuHasAVX512BW : 0) |
  ------------------
  |  Branch (426:20): [True: 0, False: 0]
  ------------------
  427|      0|                  ((cpu_info7[1] & 0x80000000) ? kCpuHasAVX512VL : 0) |
  ------------------
  |  Branch (427:20): [True: 0, False: 0]
  ------------------
  428|      0|                  ((cpu_info7[2] & 0x00000002) ? kCpuHasAVX512VBMI : 0) |
  ------------------
  |  Branch (428:20): [True: 0, False: 0]
  ------------------
  429|      0|                  ((cpu_info7[2] & 0x00000040) ? kCpuHasAVX512VBMI2 : 0) |
  ------------------
  |  Branch (429:20): [True: 0, False: 0]
  ------------------
  430|      0|                  ((cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0) |
  ------------------
  |  Branch (430:20): [True: 0, False: 0]
  ------------------
  431|      0|                  ((cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0) |
  ------------------
  |  Branch (431:20): [True: 0, False: 0]
  ------------------
  432|      0|                  ((cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0) |
  ------------------
  |  Branch (432:20): [True: 0, False: 0]
  ------------------
  433|      0|                  ((cpu_info7[3] & 0x02000000) ? kCpuHasAMXINT8 : 0);
  ------------------
  |  Branch (433:20): [True: 0, False: 0]
  ------------------
  434|      0|      if (cpu_info0[0] >= 0x24 && (cpu_einfo7[3] & 0x00080000)) {
  ------------------
  |  Branch (434:11): [True: 0, False: 0]
  |  Branch (434:35): [True: 0, False: 0]
  ------------------
  435|      0|        cpu_info |= ((cpu_info24[1] & 0xFF) >= 2) ? kCpuHasAVX10_2 : 0;
  ------------------
  |  Branch (435:21): [True: 0, False: 0]
  ------------------
  436|      0|      }
  437|      0|    }
  438|      1|  }
  439|      1|#endif
  440|       |#if defined(__loongarch__) && defined(__linux__)
  441|       |  cpu_info = LoongArchCpuCaps();
  442|       |  cpu_info |= kCpuHasLOONGARCH;
  443|       |#endif
  444|       |#if defined(__aarch64__)
  445|       |#if defined(__linux__)
  446|       |  // getauxval is supported since Android SDK version 18, minimum at time of
  447|       |  // writing is 21, so should be safe to always use this. If getauxval is
  448|       |  // somehow disabled then getauxval returns 0, which will leave Neon enabled
  449|       |  // since Neon is mandatory on AArch64.
  450|       |  unsigned long hwcap = getauxval(AT_HWCAP);
  451|       |  unsigned long hwcap2 = getauxval(AT_HWCAP2);
  452|       |  cpu_info = AArch64CpuCaps(hwcap, hwcap2);
  453|       |#else
  454|       |  cpu_info = AArch64CpuCaps();
  455|       |#endif
  456|       |  cpu_info |= kCpuHasARM;
  457|       |#endif  // __aarch64__
  458|       |#if defined(__arm__)
  459|       |  // gcc -mfpu=neon defines __ARM_NEON__
  460|       |  // __ARM_NEON__ generates code that requires Neon.  NaCL also requires Neon.
  461|       |  // For Linux, /proc/cpuinfo can be tested but without that assume Neon.
  462|       |  // Linux arm parse text file for neon detect.
  463|       |#if defined(__linux__)
  464|       |  cpu_info = ArmCpuCaps("/proc/cpuinfo");
  465|       |#elif defined(__ARM_NEON__)
  466|       |  cpu_info = kCpuHasNEON;
  467|       |#else
  468|       |  cpu_info = 0;
  469|       |#endif
  470|       |  cpu_info |= kCpuHasARM;
  471|       |#endif  // __arm__
  472|       |#if defined(__riscv) && defined(__linux__)
  473|       |  cpu_info = RiscvCpuCaps("/proc/cpuinfo");
  474|       |  cpu_info |= kCpuHasRISCV;
  475|       |#endif  // __riscv
  476|      1|  cpu_info |= kCpuInitialized;
  477|      1|  return cpu_info;
  478|      1|}
cpu_id.cc:_ZN6libyuvL7GetXCR0Ev:
  133|      2|static int GetXCR0() {
  134|      2|  int xcr0 = 0;
  135|       |#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 160040219)
  136|       |  xcr0 = (int)_xgetbv(0);  // VS2010 SP1 required.  NOLINT
  137|       |#elif defined(__i386__) || defined(__x86_64__)
  138|       |  asm(".byte 0x0f, 0x01, 0xd0" : "=a"(xcr0) : "c"(0) : "%edx");
  139|      2|#endif  // defined(__i386__) || defined(__x86_64__)
  140|      2|  return xcr0;
  141|      2|}

CopyPlane:
   32|    118|               int height) {
   33|    118|  int y;
   34|    118|  void (*CopyRow)(const uint8_t* src, uint8_t* dst, int width) = CopyRow_C;
   35|    118|  if (width <= 0 || height == 0) {
  ------------------
  |  Branch (35:7): [True: 0, False: 118]
  |  Branch (35:21): [True: 0, False: 118]
  ------------------
   36|      0|    return;
   37|      0|  }
   38|       |  // Negative height means invert the image.
   39|    118|  if (height < 0) {
  ------------------
  |  Branch (39:7): [True: 0, False: 118]
  ------------------
   40|      0|    height = -height;
   41|      0|    dst_y = dst_y + (height - 1) * dst_stride_y;
   42|      0|    dst_stride_y = -dst_stride_y;
   43|      0|  }
   44|       |  // Coalesce rows.
   45|    118|  if (src_stride_y == width && dst_stride_y == width) {
  ------------------
  |  Branch (45:7): [True: 2, False: 116]
  |  Branch (45:32): [True: 2, False: 0]
  ------------------
   46|      2|    width *= height;
   47|      2|    height = 1;
   48|      2|    src_stride_y = dst_stride_y = 0;
   49|      2|  }
   50|       |  // Nothing to do.
   51|    118|  if (src_y == dst_y && src_stride_y == dst_stride_y) {
  ------------------
  |  Branch (51:7): [True: 0, False: 118]
  |  Branch (51:25): [True: 0, False: 0]
  ------------------
   52|      0|    return;
   53|      0|  }
   54|       |
   55|    118|#if defined(HAS_COPYROW_SSE2)
   56|    118|  if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (56:7): [True: 118, False: 0]
  ------------------
   57|    118|    CopyRow = IS_ALIGNED(width, 32) ? CopyRow_SSE2 : CopyRow_Any_SSE2;
  ------------------
  |  |  999|    118|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 76, False: 42]
  |  |  ------------------
  ------------------
   58|    118|  }
   59|    118|#endif
   60|    118|#if defined(HAS_COPYROW_AVX)
   61|    118|  if (TestCpuFlag(kCpuHasAVX)) {
  ------------------
  |  Branch (61:7): [True: 118, False: 0]
  ------------------
   62|    118|    CopyRow = IS_ALIGNED(width, 64) ? CopyRow_AVX : CopyRow_Any_AVX;
  ------------------
  |  |  999|    118|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 14, False: 104]
  |  |  ------------------
  ------------------
   63|    118|  }
   64|    118|#endif
   65|    118|#if defined(HAS_COPYROW_AVX512BW)
   66|    118|  if (TestCpuFlag(kCpuHasAVX512BW)) {
  ------------------
  |  Branch (66:7): [True: 0, False: 118]
  ------------------
   67|      0|    CopyRow = IS_ALIGNED(width, 128) ? CopyRow_AVX512BW : CopyRow_Any_AVX512BW;
  ------------------
  |  |  999|      0|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   68|      0|  }
   69|    118|#endif
   70|    118|#if defined(HAS_COPYROW_ERMS)
   71|    118|  if (TestCpuFlag(kCpuHasERMS)) {
  ------------------
  |  Branch (71:7): [True: 0, False: 118]
  ------------------
   72|      0|    CopyRow = CopyRow_ERMS;
   73|      0|  }
   74|    118|#endif
   75|       |#if defined(HAS_COPYROW_NEON)
   76|       |  if (TestCpuFlag(kCpuHasNEON)) {
   77|       |    CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON;
   78|       |  }
   79|       |#endif
   80|       |#if defined(HAS_COPYROW_SME)
   81|       |  if (TestCpuFlag(kCpuHasSME)) {
   82|       |    CopyRow = CopyRow_SME;
   83|       |  }
   84|       |#endif
   85|       |#if defined(HAS_COPYROW_RVV)
   86|       |  if (TestCpuFlag(kCpuHasRVV)) {
   87|       |    CopyRow = CopyRow_RVV;
   88|       |  }
   89|       |#endif
   90|       |
   91|       |  // Copy plane
   92|  3.63k|  for (y = 0; y < height; ++y) {
  ------------------
  |  Branch (92:15): [True: 3.51k, False: 118]
  ------------------
   93|  3.51k|    CopyRow(src_y, dst_y, width);
   94|  3.51k|    src_y += src_stride_y;
   95|  3.51k|    dst_y += dst_stride_y;
   96|  3.51k|  }
   97|    118|}
CopyPlane_16:
  105|     20|                  int height) {
  106|     20|  CopyPlane((const uint8_t*)src_y, src_stride_y * 2, (uint8_t*)dst_y,
  107|     20|            dst_stride_y * 2, width * 2, height);
  108|     20|}

CopyRow_Any_AVX:
  919|  2.74k|  void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) {     \
  920|  2.74k|    SIMD_ALIGNED(uint8_t vin[128]);                                       \
  ------------------
  |  |  938|  2.74k|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
  921|  2.74k|    SIMD_ALIGNED(uint8_t vout[128]);                                      \
  ------------------
  |  |  938|  2.74k|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
  922|  2.74k|    memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */                  \
  923|  2.74k|    int r = width & MASK;                                                 \
  924|  2.74k|    int n = width & ~MASK;                                                \
  925|  2.74k|    if (n > 0) {                                                          \
  ------------------
  |  Branch (925:9): [True: 150, False: 2.59k]
  ------------------
  926|    150|      ANY_SIMD(src_ptr, dst_ptr, n);                                      \
  927|    150|    }                                                                     \
  928|  2.74k|    ptrdiff_t np = n;                                                     \
  929|  2.74k|    memcpy(vin, src_ptr + (np >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP); \
  ------------------
  |  |   32|  2.74k|#define SS(width, shift) (((width) + (1 << (shift)) - 1) >> (shift))
  ------------------
  930|  2.74k|    ANY_SIMD(vin, vout, MASK + 1);                                        \
  931|  2.74k|    memcpy(dst_ptr + np * BPP, vout, r * BPP);                            \
  932|  2.74k|  }
InterpolateRow_Any_AVX2:
 1800|  2.94M|               int width, int source_y_fraction) {                   \
 1801|  2.94M|    SIMD_ALIGNED(TS vin[64 * 2]);                                    \
  ------------------
  |  |  938|  2.94M|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
 1802|  2.94M|    SIMD_ALIGNED(TD vout[64]);                                       \
  ------------------
  |  |  938|  2.94M|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
 1803|  2.94M|    memset(vin, 0, sizeof(vin)); /* for msan */                      \
 1804|  2.94M|    int r = width & MASK;                                            \
 1805|  2.94M|    int n = width & ~MASK;                                           \
 1806|  2.94M|    if (n > 0) {                                                     \
  ------------------
  |  Branch (1806:9): [True: 536k, False: 2.41M]
  ------------------
 1807|   536k|      ANY_SIMD(dst_ptr, src_ptr, src_stride, n, source_y_fraction);  \
 1808|   536k|    }                                                                \
 1809|  2.94M|    ptrdiff_t np = n;                                                \
 1810|  2.94M|    memcpy(vin, src_ptr + np * SBPP, r * SBPP * sizeof(TS));         \
 1811|  2.94M|    if (source_y_fraction) {                                         \
  ------------------
  |  Branch (1811:9): [True: 1.36M, False: 1.58M]
  ------------------
 1812|  1.36M|      memcpy(vin + 64, src_ptr + src_stride + np * SBPP,             \
 1813|  1.36M|             r * SBPP * sizeof(TS));                                 \
 1814|  1.36M|    }                                                                \
 1815|  2.94M|    ANY_SIMD(vout, vin, 64, MASK + 1, source_y_fraction);            \
 1816|  2.94M|    memcpy(dst_ptr + np * BPP, vout, r * BPP * sizeof(TD));          \
 1817|  2.94M|  }

InterpolateRow_16_C:
 3543|  6.70M|                         int source_y_fraction) {
 3544|  6.70M|  int y1_fraction = source_y_fraction;
 3545|  6.70M|  int y0_fraction = 256 - y1_fraction;
 3546|  6.70M|  const uint16_t* src_ptr1 = src_ptr + src_stride;
 3547|  6.70M|  int x;
 3548|  6.70M|  assert(source_y_fraction >= 0);
 3549|  6.70M|  assert(source_y_fraction < 256);
 3550|       |
 3551|  6.70M|  if (y1_fraction == 0) {
  ------------------
  |  Branch (3551:7): [True: 997k, False: 5.71M]
  ------------------
 3552|   997k|    memcpy(dst_ptr, src_ptr, width * 2);
 3553|   997k|    return;
 3554|   997k|  }
 3555|  5.71M|  if (y1_fraction == 128) {
  ------------------
  |  Branch (3555:7): [True: 27.4k, False: 5.68M]
  ------------------
 3556|  27.4k|    HalfRow_16_C(src_ptr, src_stride, dst_ptr, width);
 3557|  27.4k|    return;
 3558|  27.4k|  }
 3559|  1.30G|  for (x = 0; x < width; ++x) {
  ------------------
  |  Branch (3559:15): [True: 1.29G, False: 5.68M]
  ------------------
 3560|  1.29G|    dst_ptr[0] = STATIC_CAST(
  ------------------
  |  |   25|  1.29G|#define STATIC_CAST(type, expr) static_cast<type>(expr)
  ------------------
 3561|  1.29G|        uint16_t,
 3562|  1.29G|        (src_ptr[0] * y0_fraction + src_ptr1[0] * y1_fraction + 128) >> 8);
 3563|  1.29G|    ++src_ptr;
 3564|  1.29G|    ++src_ptr1;
 3565|  1.29G|    ++dst_ptr;
 3566|  1.29G|  }
 3567|  5.68M|}
row_common.cc:_ZN6libyuvL12HalfRow_16_CEPKtlPti:
 3487|  27.4k|                         int width) {
 3488|  27.4k|  int x;
 3489|  5.71M|  for (x = 0; x < width; ++x) {
  ------------------
  |  Branch (3489:15): [True: 5.68M, False: 27.4k]
  ------------------
 3490|  5.68M|    dst_uv[x] = (src_uv[x] + src_uv[src_uv_stride + x] + 1) >> 1;
 3491|  5.68M|  }
 3492|  27.4k|}

CopyRow_AVX:
 6314|  3.66k|void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width) {
 6315|  3.66k|  asm volatile(
 6316|  3.66k|      "1:          \n"
 6317|  3.66k|      "vmovdqu     (%0),%%ymm0                   \n"
 6318|  3.66k|      "vmovdqu     0x20(%0),%%ymm1               \n"
 6319|  3.66k|      "lea         0x40(%0),%0                   \n"
 6320|  3.66k|      "vmovdqu     %%ymm0,(%1)                   \n"
 6321|  3.66k|      "vmovdqu     %%ymm1,0x20(%1)               \n"
 6322|  3.66k|      "lea         0x40(%1),%1                   \n"
 6323|  3.66k|      "sub         $0x40,%2                      \n"
 6324|  3.66k|      "jg          1b                            \n"
 6325|  3.66k|      "vzeroupper  \n"
 6326|  3.66k|      : "+r"(src),   // %0
 6327|  3.66k|        "+r"(dst),   // %1
 6328|  3.66k|        "+r"(width)  // %2
 6329|  3.66k|      :
 6330|  3.66k|      : "memory", "cc", "xmm0", "xmm1");
 6331|  3.66k|}
InterpolateRow_AVX2:
 8554|  4.79M|                         int source_y_fraction) {
 8555|  4.79M|  asm volatile(
 8556|  4.79M|      "sub         %1,%0                         \n"
 8557|  4.79M|      "cmp         $0x0,%3                       \n"
 8558|  4.79M|      "je          100f                          \n"
 8559|  4.79M|      "cmp         $0x80,%3                      \n"
 8560|  4.79M|      "je          50f                           \n"
 8561|       |
 8562|  4.79M|      "vmovd       %3,%%xmm0                     \n"
 8563|  4.79M|      "neg         %3                            \n"
 8564|  4.79M|      "add         $0x100,%3                     \n"
 8565|  4.79M|      "vmovd       %3,%%xmm5                     \n"
 8566|  4.79M|      "vpunpcklbw  %%xmm0,%%xmm5,%%xmm5          \n"
 8567|  4.79M|      "vpunpcklwd  %%xmm5,%%xmm5,%%xmm5          \n"
 8568|  4.79M|      "vbroadcastss %%xmm5,%%ymm5                \n"
 8569|  4.79M|      "mov         $0x80808080,%%eax             \n"
 8570|  4.79M|      "vmovd       %%eax,%%xmm4                  \n"
 8571|  4.79M|      "vbroadcastss %%xmm4,%%ymm4                \n"
 8572|       |
 8573|       |      // General purpose row blend.
 8574|  4.79M|      LABELALIGN
 8575|  4.79M|      "1:          \n"
 8576|  4.79M|      "vmovdqu     (%1),%%ymm0                   \n"
 8577|  4.79M|      "vmovdqu     0x00(%1,%4,1),%%ymm2          \n"
 8578|  4.79M|      "vpunpckhbw  %%ymm2,%%ymm0,%%ymm1          \n"
 8579|  4.79M|      "vpunpcklbw  %%ymm2,%%ymm0,%%ymm0          \n"
 8580|  4.79M|      "vpsubb      %%ymm4,%%ymm1,%%ymm1          \n"
 8581|  4.79M|      "vpsubb      %%ymm4,%%ymm0,%%ymm0          \n"
 8582|  4.79M|      "vpmaddubsw  %%ymm1,%%ymm5,%%ymm1          \n"
 8583|  4.79M|      "vpmaddubsw  %%ymm0,%%ymm5,%%ymm0          \n"
 8584|  4.79M|      "vpaddw      %%ymm4,%%ymm1,%%ymm1          \n"
 8585|  4.79M|      "vpaddw      %%ymm4,%%ymm0,%%ymm0          \n"
 8586|  4.79M|      "vpsrlw      $0x8,%%ymm1,%%ymm1            \n"
 8587|  4.79M|      "vpsrlw      $0x8,%%ymm0,%%ymm0            \n"
 8588|  4.79M|      "vpackuswb   %%ymm1,%%ymm0,%%ymm0          \n"
 8589|  4.79M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 8590|  4.79M|      "lea         0x20(%1),%1                   \n"
 8591|  4.79M|      "sub         $0x20,%2                      \n"
 8592|  4.79M|      "jg          1b                            \n"
 8593|  4.79M|      "jmp         99f                           \n"
 8594|       |
 8595|       |      // Blend 50 / 50.
 8596|  4.79M|      LABELALIGN
 8597|  4.79M|      "50:         \n"
 8598|  4.79M|      "vmovdqu     (%1),%%ymm0                   \n"
 8599|  4.79M|      "vpavgb      0x00(%1,%4,1),%%ymm0,%%ymm0   \n"
 8600|  4.79M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 8601|  4.79M|      "lea         0x20(%1),%1                   \n"
 8602|  4.79M|      "sub         $0x20,%2                      \n"
 8603|  4.79M|      "jg          50b                           \n"
 8604|  4.79M|      "jmp         99f                           \n"
 8605|       |
 8606|       |      // Blend 100 / 0 - Copy row unchanged.
 8607|  4.79M|      LABELALIGN
 8608|  4.79M|      "100:        \n"
 8609|  4.79M|      "vmovdqu     (%1),%%ymm0                   \n"
 8610|  4.79M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 8611|  4.79M|      "lea         0x20(%1),%1                   \n"
 8612|  4.79M|      "sub         $0x20,%2                      \n"
 8613|  4.79M|      "jg          100b                          \n"
 8614|       |
 8615|  4.79M|      "99:         \n"
 8616|  4.79M|      "vzeroupper  \n"
 8617|  4.79M|      : "+r"(dst_ptr),               // %0
 8618|  4.79M|        "+r"(src_ptr),               // %1
 8619|  4.79M|        "+r"(width),                 // %2
 8620|  4.79M|        "+r"(source_y_fraction)      // %3
 8621|  4.79M|      : "r"((intptr_t)(src_stride))  // %4
 8622|  4.79M|      : "memory", "cc", "eax", "xmm0", "xmm1", "xmm2", "xmm4", "xmm5");
 8623|  4.79M|}

ScalePlane:
 1983|  8.50k|               enum FilterMode filtering) {
 1984|       |  // Simplify filtering when possible.
 1985|  8.50k|  filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
 1986|  8.50k|                                filtering);
 1987|       |
 1988|       |  // Negative height means invert the image.
 1989|  8.50k|  if (src_height < 0) {
  ------------------
  |  Branch (1989:7): [True: 0, False: 8.50k]
  ------------------
 1990|      0|    src_height = -src_height;
 1991|      0|    src = src + (src_height - 1) * (int64_t)src_stride;
 1992|      0|    src_stride = -src_stride;
 1993|      0|  }
 1994|       |  // Use specialized scales to improve performance for common resolutions.
 1995|       |  // For example, all the 1/2 scalings will use ScalePlaneDown2()
 1996|  8.50k|  if (dst_width == src_width && dst_height == src_height) {
  ------------------
  |  Branch (1996:7): [True: 1.27k, False: 7.22k]
  |  Branch (1996:33): [True: 98, False: 1.17k]
  ------------------
 1997|       |    // Straight copy.
 1998|     98|    CopyPlane(src, src_stride, dst, dst_stride, dst_width, dst_height);
 1999|     98|    return 0;
 2000|     98|  }
 2001|  8.40k|  if (dst_width == src_width && filtering != kFilterBox) {
  ------------------
  |  Branch (2001:7): [True: 1.17k, False: 7.22k]
  |  Branch (2001:33): [True: 1.17k, False: 0]
  ------------------
 2002|  1.17k|    int dy = 0;
 2003|  1.17k|    int y = 0;
 2004|       |    // When scaling down, use the center 2 rows to filter.
 2005|       |    // When scaling up, last row of destination uses the last 2 source rows.
 2006|  1.17k|    if (dst_height <= src_height) {
  ------------------
  |  Branch (2006:9): [True: 375, False: 804]
  ------------------
 2007|    375|      dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  265|    375|#define FixedDiv FixedDiv_X86
  ------------------
 2008|    375|      y = CENTERSTART(dy, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  |   32|    375|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (32:28): [True: 0, False: 375]
  |  |  ------------------
  ------------------
 2009|    804|    } else if (src_height > 1 && dst_height > 1) {
  ------------------
  |  Branch (2009:16): [True: 668, False: 136]
  |  Branch (2009:34): [True: 668, False: 0]
  ------------------
 2010|    668|      dy = FixedDiv1(src_height, dst_height);
  ------------------
  |  |  266|    668|#define FixedDiv1 FixedDiv1_X86
  ------------------
 2011|    668|    }
 2012|       |    // Arbitrary scale vertically, but unscaled horizontally.
 2013|  1.17k|    ScalePlaneVertical(src_height, dst_width, dst_height, src_stride,
 2014|  1.17k|                       dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering);
 2015|  1.17k|    return 0;
 2016|  1.17k|  }
 2017|  7.22k|  if (dst_width <= Abs(src_width) && dst_height <= src_height) {
  ------------------
  |  Branch (2017:7): [True: 2.78k, False: 4.43k]
  |  Branch (2017:38): [True: 1.63k, False: 1.15k]
  ------------------
 2018|       |    // Scale down.
 2019|  1.63k|    if (4 * dst_width == 3 * src_width && 4 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (2019:9): [True: 53, False: 1.58k]
  |  Branch (2019:43): [True: 0, False: 53]
  ------------------
 2020|       |      // optimized, 3/4
 2021|      0|      ScalePlaneDown34(src_width, src_height, dst_width, dst_height, src_stride,
 2022|      0|                       dst_stride, src, dst, filtering);
 2023|      0|      return 0;
 2024|      0|    }
 2025|  1.63k|    if (2 * dst_width == src_width && 2 * dst_height == src_height) {
  ------------------
  |  Branch (2025:9): [True: 139, False: 1.49k]
  |  Branch (2025:39): [True: 34, False: 105]
  ------------------
 2026|       |      // optimized, 1/2
 2027|     34|      ScalePlaneDown2(src_width, src_height, dst_width, dst_height, src_stride,
 2028|     34|                      dst_stride, src, dst, filtering);
 2029|     34|      return 0;
 2030|     34|    }
 2031|       |    // 3/8 rounded up for odd sized chroma height.
 2032|  1.60k|    if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (2032:9): [True: 40, False: 1.56k]
  |  Branch (2032:43): [True: 18, False: 22]
  ------------------
 2033|       |      // optimized, 3/8
 2034|     18|      ScalePlaneDown38(src_width, src_height, dst_width, dst_height, src_stride,
 2035|     18|                       dst_stride, src, dst, filtering);
 2036|     18|      return 0;
 2037|     18|    }
 2038|  1.58k|    if (4 * dst_width == src_width && 4 * dst_height == src_height &&
  ------------------
  |  Branch (2038:9): [True: 164, False: 1.42k]
  |  Branch (2038:39): [True: 38, False: 126]
  ------------------
 2039|     38|        (filtering == kFilterBox || filtering == kFilterNone)) {
  ------------------
  |  Branch (2039:10): [True: 38, False: 0]
  |  Branch (2039:37): [True: 0, False: 0]
  ------------------
 2040|       |      // optimized, 1/4
 2041|     38|      ScalePlaneDown4(src_width, src_height, dst_width, dst_height, src_stride,
 2042|     38|                      dst_stride, src, dst, filtering);
 2043|     38|      return 0;
 2044|     38|    }
 2045|  1.58k|  }
 2046|  7.13k|  if (filtering == kFilterBox && dst_height * 2 < src_height) {
  ------------------
  |  Branch (2046:7): [True: 1.05k, False: 6.07k]
  |  Branch (2046:34): [True: 1.05k, False: 0]
  ------------------
 2047|  1.05k|    return ScalePlaneBox(src_width, src_height, dst_width, dst_height,
 2048|  1.05k|                         src_stride, dst_stride, src, dst);
 2049|  1.05k|  }
 2050|  6.07k|  if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
  ------------------
  |  Branch (2050:7): [True: 523, False: 5.55k]
  |  Branch (2050:43): [True: 136, False: 387]
  ------------------
 2051|    136|    ScalePlaneUp2_Linear(src_width, src_height, dst_width, dst_height,
 2052|    136|                         src_stride, dst_stride, src, dst);
 2053|    136|    return 0;
 2054|    136|  }
 2055|  5.94k|  if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
  ------------------
  |  Branch (2055:7): [True: 366, False: 5.57k]
  |  Branch (2055:45): [True: 97, False: 269]
  ------------------
 2056|     97|      (filtering == kFilterBilinear || filtering == kFilterBox)) {
  ------------------
  |  Branch (2056:8): [True: 75, False: 22]
  |  Branch (2056:40): [True: 0, False: 22]
  ------------------
 2057|     75|    ScalePlaneUp2_Bilinear(src_width, src_height, dst_width, dst_height,
 2058|     75|                           src_stride, dst_stride, src, dst);
 2059|     75|    return 0;
 2060|     75|  }
 2061|  5.86k|  if (filtering && dst_height > src_height) {
  ------------------
  |  Branch (2061:7): [True: 5.24k, False: 618]
  |  Branch (2061:20): [True: 3.60k, False: 1.64k]
  ------------------
 2062|  3.60k|    return ScalePlaneBilinearUp(src_width, src_height, dst_width, dst_height,
 2063|  3.60k|                                src_stride, dst_stride, src, dst, filtering);
 2064|  3.60k|  }
 2065|  2.26k|  if (filtering) {
  ------------------
  |  Branch (2065:7): [True: 1.64k, False: 618]
  ------------------
 2066|  1.64k|    return ScalePlaneBilinearDown(src_width, src_height, dst_width, dst_height,
 2067|  1.64k|                                  src_stride, dst_stride, src, dst, filtering);
 2068|  1.64k|  }
 2069|    618|  ScalePlaneSimple(src_width, src_height, dst_width, dst_height, src_stride,
 2070|    618|                   dst_stride, src, dst);
 2071|    618|  return 0;
 2072|  2.26k|}
ScalePlane_16:
 2083|  11.8k|                  enum FilterMode filtering) {
 2084|       |  // Simplify filtering when possible.
 2085|  11.8k|  filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
 2086|  11.8k|                                filtering);
 2087|       |
 2088|       |  // Negative height means invert the image.
 2089|  11.8k|  if (src_height < 0) {
  ------------------
  |  Branch (2089:7): [True: 0, False: 11.8k]
  ------------------
 2090|      0|    src_height = -src_height;
 2091|      0|    src = src + (src_height - 1) * (int64_t)src_stride;
 2092|      0|    src_stride = -src_stride;
 2093|      0|  }
 2094|       |  // Use specialized scales to improve performance for common resolutions.
 2095|       |  // For example, all the 1/2 scalings will use ScalePlaneDown2()
 2096|  11.8k|  if (dst_width == src_width && dst_height == src_height) {
  ------------------
  |  Branch (2096:7): [True: 1.56k, False: 10.2k]
  |  Branch (2096:33): [True: 20, False: 1.54k]
  ------------------
 2097|       |    // Straight copy.
 2098|     20|    CopyPlane_16(src, src_stride, dst, dst_stride, dst_width, dst_height);
 2099|     20|    return 0;
 2100|     20|  }
 2101|  11.7k|  if (dst_width == src_width && filtering != kFilterBox) {
  ------------------
  |  Branch (2101:7): [True: 1.54k, False: 10.2k]
  |  Branch (2101:33): [True: 1.54k, False: 0]
  ------------------
 2102|  1.54k|    int dy = 0;
 2103|  1.54k|    int y = 0;
 2104|       |    // When scaling down, use the center 2 rows to filter.
 2105|       |    // When scaling up, last row of destination uses the last 2 source rows.
 2106|  1.54k|    if (dst_height <= src_height) {
  ------------------
  |  Branch (2106:9): [True: 672, False: 875]
  ------------------
 2107|    672|      dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  265|    672|#define FixedDiv FixedDiv_X86
  ------------------
 2108|    672|      y = CENTERSTART(dy, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  |   32|    672|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (32:28): [True: 0, False: 672]
  |  |  ------------------
  ------------------
 2109|       |      // When scaling up, ensure the last row of destination uses the last
 2110|       |      // source. Avoid divide by zero for dst_height but will do no scaling
 2111|       |      // later.
 2112|    875|    } else if (src_height > 1 && dst_height > 1) {
  ------------------
  |  Branch (2112:16): [True: 825, False: 50]
  |  Branch (2112:34): [True: 825, False: 0]
  ------------------
 2113|    825|      dy = FixedDiv1(src_height, dst_height);
  ------------------
  |  |  266|    825|#define FixedDiv1 FixedDiv1_X86
  ------------------
 2114|    825|    }
 2115|       |    // Arbitrary scale vertically, but unscaled horizontally.
 2116|  1.54k|    ScalePlaneVertical_16(src_height, dst_width, dst_height, src_stride,
 2117|  1.54k|                          dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering);
 2118|  1.54k|    return 0;
 2119|  1.54k|  }
 2120|  10.2k|  if (dst_width <= Abs(src_width) && dst_height <= src_height) {
  ------------------
  |  Branch (2120:7): [True: 5.28k, False: 4.95k]
  |  Branch (2120:38): [True: 4.23k, False: 1.05k]
  ------------------
 2121|       |    // Scale down.
 2122|  4.23k|    if (4 * dst_width == 3 * src_width && 4 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (2122:9): [True: 22, False: 4.21k]
  |  Branch (2122:43): [True: 0, False: 22]
  ------------------
 2123|       |      // optimized, 3/4
 2124|      0|      ScalePlaneDown34_16(src_width, src_height, dst_width, dst_height,
 2125|      0|                          src_stride, dst_stride, src, dst, filtering);
 2126|      0|      return 0;
 2127|      0|    }
 2128|  4.23k|    if (2 * dst_width == src_width && 2 * dst_height == src_height) {
  ------------------
  |  Branch (2128:9): [True: 91, False: 4.14k]
  |  Branch (2128:39): [True: 46, False: 45]
  ------------------
 2129|       |      // optimized, 1/2
 2130|     46|      ScalePlaneDown2_16(src_width, src_height, dst_width, dst_height,
 2131|     46|                         src_stride, dst_stride, src, dst, filtering);
 2132|     46|      return 0;
 2133|     46|    }
 2134|       |    // 3/8 rounded up for odd sized chroma height.
 2135|  4.18k|    if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (2135:9): [True: 63, False: 4.12k]
  |  Branch (2135:43): [True: 21, False: 42]
  ------------------
 2136|       |      // optimized, 3/8
 2137|     21|      ScalePlaneDown38_16(src_width, src_height, dst_width, dst_height,
 2138|     21|                          src_stride, dst_stride, src, dst, filtering);
 2139|     21|      return 0;
 2140|     21|    }
 2141|  4.16k|    if (4 * dst_width == src_width && 4 * dst_height == src_height &&
  ------------------
  |  Branch (2141:9): [True: 106, False: 4.05k]
  |  Branch (2141:39): [True: 36, False: 70]
  ------------------
 2142|     36|        (filtering == kFilterBox || filtering == kFilterNone)) {
  ------------------
  |  Branch (2142:10): [True: 36, False: 0]
  |  Branch (2142:37): [True: 0, False: 0]
  ------------------
 2143|       |      // optimized, 1/4
 2144|     36|      ScalePlaneDown4_16(src_width, src_height, dst_width, dst_height,
 2145|     36|                         src_stride, dst_stride, src, dst, filtering);
 2146|     36|      return 0;
 2147|     36|    }
 2148|  4.16k|  }
 2149|  10.1k|  if (filtering == kFilterBox && dst_height * 2 < src_height) {
  ------------------
  |  Branch (2149:7): [True: 2.09k, False: 8.04k]
  |  Branch (2149:34): [True: 2.09k, False: 0]
  ------------------
 2150|  2.09k|    return ScalePlaneBox_16(src_width, src_height, dst_width, dst_height,
 2151|  2.09k|                            src_stride, dst_stride, src, dst);
 2152|  2.09k|  }
 2153|  8.04k|  if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
  ------------------
  |  Branch (2153:7): [True: 177, False: 7.86k]
  |  Branch (2153:43): [True: 0, False: 177]
  ------------------
 2154|      0|    ScalePlaneUp2_16_Linear(src_width, src_height, dst_width, dst_height,
 2155|      0|                            src_stride, dst_stride, src, dst);
 2156|      0|    return 0;
 2157|      0|  }
 2158|  8.04k|  if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
  ------------------
  |  Branch (2158:7): [True: 139, False: 7.90k]
  |  Branch (2158:45): [True: 18, False: 121]
  ------------------
 2159|     18|      (filtering == kFilterBilinear || filtering == kFilterBox)) {
  ------------------
  |  Branch (2159:8): [True: 0, False: 18]
  |  Branch (2159:40): [True: 0, False: 18]
  ------------------
 2160|      0|    ScalePlaneUp2_16_Bilinear(src_width, src_height, dst_width, dst_height,
 2161|      0|                              src_stride, dst_stride, src, dst);
 2162|      0|    return 0;
 2163|      0|  }
 2164|  8.04k|  if (filtering && dst_height > src_height) {
  ------------------
  |  Branch (2164:7): [True: 7.37k, False: 669]
  |  Branch (2164:20): [True: 3.49k, False: 3.88k]
  ------------------
 2165|  3.49k|    return ScalePlaneBilinearUp_16(src_width, src_height, dst_width, dst_height,
 2166|  3.49k|                                   src_stride, dst_stride, src, dst, filtering);
 2167|  3.49k|  }
 2168|  4.55k|  if (filtering) {
  ------------------
  |  Branch (2168:7): [True: 3.88k, False: 669]
  ------------------
 2169|  3.88k|    return ScalePlaneBilinearDown_16(src_width, src_height, dst_width,
 2170|  3.88k|                                     dst_height, src_stride, dst_stride, src,
 2171|  3.88k|                                     dst, filtering);
 2172|  3.88k|  }
 2173|    669|  ScalePlaneSimple_16(src_width, src_height, dst_width, dst_height, src_stride,
 2174|    669|                      dst_stride, src, dst);
 2175|    669|  return 0;
 2176|  4.55k|}
ScalePlane_12:
 2187|  11.9k|                  enum FilterMode filtering) {
 2188|       |  // Simplify filtering when possible.
 2189|  11.9k|  filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
 2190|  11.9k|                                filtering);
 2191|       |
 2192|       |  // Negative height means invert the image.
 2193|  11.9k|  if (src_height < 0) {
  ------------------
  |  Branch (2193:7): [True: 0, False: 11.9k]
  ------------------
 2194|      0|    src_height = -src_height;
 2195|      0|    src = src + (src_height - 1) * (int64_t)src_stride;
 2196|      0|    src_stride = -src_stride;
 2197|      0|  }
 2198|       |
 2199|  11.9k|  if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
  ------------------
  |  Branch (2199:7): [True: 455, False: 11.5k]
  |  Branch (2199:43): [True: 99, False: 356]
  ------------------
 2200|     99|    ScalePlaneUp2_12_Linear(src_width, src_height, dst_width, dst_height,
 2201|     99|                            src_stride, dst_stride, src, dst);
 2202|     99|    return 0;
 2203|     99|  }
 2204|  11.8k|  if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
  ------------------
  |  Branch (2204:7): [True: 221, False: 11.6k]
  |  Branch (2204:45): [True: 91, False: 130]
  ------------------
 2205|     91|      (filtering == kFilterBilinear || filtering == kFilterBox)) {
  ------------------
  |  Branch (2205:8): [True: 71, False: 20]
  |  Branch (2205:40): [True: 0, False: 20]
  ------------------
 2206|     71|    ScalePlaneUp2_12_Bilinear(src_width, src_height, dst_width, dst_height,
 2207|     71|                              src_stride, dst_stride, src, dst);
 2208|     71|    return 0;
 2209|     71|  }
 2210|       |
 2211|  11.8k|  return ScalePlane_16(src, src_stride, src_width, src_height, dst, dst_stride,
 2212|  11.8k|                       dst_width, dst_height, filtering);
 2213|  11.8k|}
scale.cc:_ZN6libyuvL3AbsEi:
   27|  34.5k|static __inline int Abs(int v) {
   28|  34.5k|  return v >= 0 ? v : -v;
  ------------------
  |  Branch (28:10): [True: 34.5k, False: 0]
  ------------------
   29|  34.5k|}
scale.cc:_ZN6libyuvL15ScalePlaneDown2EiiiiiiPKhPhNS_10FilterModeE:
   46|     34|                            enum FilterMode filtering) {
   47|     34|  int y;
   48|     34|  void (*ScaleRowDown2)(const uint8_t* src_ptr, ptrdiff_t src_stride,
   49|     34|                        uint8_t* dst_ptr, int dst_width) =
   50|     34|      filtering == kFilterNone
  ------------------
  |  Branch (50:7): [True: 0, False: 34]
  ------------------
   51|     34|          ? ScaleRowDown2_C
   52|     34|          : (filtering == kFilterLinear ? ScaleRowDown2Linear_C
  ------------------
  |  Branch (52:14): [True: 0, False: 34]
  ------------------
   53|     34|                                        : ScaleRowDown2Box_C);
   54|     34|  int row_stride = src_stride * 2;
   55|     34|  (void)src_width;
   56|     34|  (void)src_height;
   57|     34|  if (!filtering) {
  ------------------
  |  Branch (57:7): [True: 0, False: 34]
  ------------------
   58|      0|    src_ptr += src_stride;  // Point to odd rows.
   59|      0|    src_stride = 0;
   60|      0|  }
   61|       |
   62|       |#if defined(HAS_SCALEROWDOWN2_NEON)
   63|       |  if (TestCpuFlag(kCpuHasNEON)) {
   64|       |    ScaleRowDown2 =
   65|       |        filtering == kFilterNone
   66|       |            ? ScaleRowDown2_Any_NEON
   67|       |            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_NEON
   68|       |                                          : ScaleRowDown2Box_Any_NEON);
   69|       |    if (IS_ALIGNED(dst_width, 16)) {
   70|       |      ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_NEON
   71|       |                                               : (filtering == kFilterLinear
   72|       |                                                      ? ScaleRowDown2Linear_NEON
   73|       |                                                      : ScaleRowDown2Box_NEON);
   74|       |    }
   75|       |  }
   76|       |#endif
   77|       |#if defined(HAS_SCALEROWDOWN2_SME)
   78|       |  if (TestCpuFlag(kCpuHasSME)) {
   79|       |    ScaleRowDown2 = filtering == kFilterNone     ? ScaleRowDown2_SME
   80|       |                    : filtering == kFilterLinear ? ScaleRowDown2Linear_SME
   81|       |                                                 : ScaleRowDown2Box_SME;
   82|       |  }
   83|       |#endif
   84|     34|#if defined(HAS_SCALEROWDOWN2_SSSE3)
   85|     34|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (85:7): [True: 34, False: 0]
  ------------------
   86|     34|    ScaleRowDown2 =
   87|     34|        filtering == kFilterNone
  ------------------
  |  Branch (87:9): [True: 0, False: 34]
  ------------------
   88|     34|            ? ScaleRowDown2_Any_SSSE3
   89|     34|            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_SSSE3
  ------------------
  |  Branch (89:16): [True: 0, False: 34]
  ------------------
   90|     34|                                          : ScaleRowDown2Box_Any_SSSE3);
   91|     34|    if (IS_ALIGNED(dst_width, 16)) {
  ------------------
  |  |  999|     34|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 0, False: 34]
  |  |  ------------------
  ------------------
   92|      0|      ScaleRowDown2 =
   93|      0|          filtering == kFilterNone
  ------------------
  |  Branch (93:11): [True: 0, False: 0]
  ------------------
   94|      0|              ? ScaleRowDown2_SSSE3
   95|      0|              : (filtering == kFilterLinear ? ScaleRowDown2Linear_SSSE3
  ------------------
  |  Branch (95:18): [True: 0, False: 0]
  ------------------
   96|      0|                                            : ScaleRowDown2Box_SSSE3);
   97|      0|    }
   98|     34|  }
   99|     34|#endif
  100|     34|#if defined(HAS_SCALEROWDOWN2_AVX2)
  101|     34|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (101:7): [True: 34, False: 0]
  ------------------
  102|     34|    ScaleRowDown2 =
  103|     34|        filtering == kFilterNone
  ------------------
  |  Branch (103:9): [True: 0, False: 34]
  ------------------
  104|     34|            ? ScaleRowDown2_Any_AVX2
  105|     34|            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_AVX2
  ------------------
  |  Branch (105:16): [True: 0, False: 34]
  ------------------
  106|     34|                                          : ScaleRowDown2Box_Any_AVX2);
  107|     34|    if (IS_ALIGNED(dst_width, 32)) {
  ------------------
  |  |  999|     34|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 0, False: 34]
  |  |  ------------------
  ------------------
  108|      0|      ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_AVX2
  ------------------
  |  Branch (108:23): [True: 0, False: 0]
  ------------------
  109|      0|                                               : (filtering == kFilterLinear
  ------------------
  |  Branch (109:51): [True: 0, False: 0]
  ------------------
  110|      0|                                                      ? ScaleRowDown2Linear_AVX2
  111|      0|                                                      : ScaleRowDown2Box_AVX2);
  112|      0|    }
  113|     34|  }
  114|     34|#endif
  115|       |#if defined(HAS_SCALEROWDOWN2_LSX)
  116|       |  if (TestCpuFlag(kCpuHasLSX)) {
  117|       |    ScaleRowDown2 =
  118|       |        filtering == kFilterNone
  119|       |            ? ScaleRowDown2_Any_LSX
  120|       |            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_LSX
  121|       |                                          : ScaleRowDown2Box_Any_LSX);
  122|       |    if (IS_ALIGNED(dst_width, 32)) {
  123|       |      ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_LSX
  124|       |                                               : (filtering == kFilterLinear
  125|       |                                                      ? ScaleRowDown2Linear_LSX
  126|       |                                                      : ScaleRowDown2Box_LSX);
  127|       |    }
  128|       |  }
  129|       |#endif
  130|       |#if defined(HAS_SCALEROWDOWN2_RVV)
  131|       |  if (TestCpuFlag(kCpuHasRVV)) {
  132|       |    ScaleRowDown2 = filtering == kFilterNone
  133|       |                        ? ScaleRowDown2_RVV
  134|       |                        : (filtering == kFilterLinear ? ScaleRowDown2Linear_RVV
  135|       |                                                      : ScaleRowDown2Box_RVV);
  136|       |  }
  137|       |#endif
  138|       |
  139|     34|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (139:7): [True: 0, False: 34]
  ------------------
  140|      0|    src_stride = 0;
  141|      0|  }
  142|       |  // TODO(fbarchard): Loop through source height to allow odd height.
  143|    151|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (143:15): [True: 117, False: 34]
  ------------------
  144|    117|    ScaleRowDown2(src_ptr, src_stride, dst_ptr, dst_width);
  145|    117|    src_ptr += row_stride;
  146|    117|    dst_ptr += dst_stride;
  147|    117|  }
  148|     34|}
scale.cc:_ZN6libyuvL16ScalePlaneDown38EiiiiiiPKhPhNS_10FilterModeE:
  595|     18|                             enum FilterMode filtering) {
  596|     18|  int y;
  597|     18|  void (*ScaleRowDown38_3)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  598|     18|                           uint8_t* dst_ptr, int dst_width);
  599|     18|  void (*ScaleRowDown38_2)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  600|     18|                           uint8_t* dst_ptr, int dst_width);
  601|     18|  const int filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
  ------------------
  |  Branch (601:29): [True: 0, False: 18]
  ------------------
  602|     18|  assert(dst_width % 3 == 0);
  603|     18|  (void)src_width;
  604|     18|  (void)src_height;
  605|     18|  if (!filtering) {
  ------------------
  |  Branch (605:7): [True: 0, False: 18]
  ------------------
  606|      0|    ScaleRowDown38_3 = ScaleRowDown38_C;
  607|      0|    ScaleRowDown38_2 = ScaleRowDown38_C;
  608|     18|  } else {
  609|     18|    ScaleRowDown38_3 = ScaleRowDown38_3_Box_C;
  610|     18|    ScaleRowDown38_2 = ScaleRowDown38_2_Box_C;
  611|     18|  }
  612|       |
  613|       |#if defined(HAS_SCALEROWDOWN38_NEON)
  614|       |  if (TestCpuFlag(kCpuHasNEON)) {
  615|       |    if (!filtering) {
  616|       |      ScaleRowDown38_3 = ScaleRowDown38_Any_NEON;
  617|       |      ScaleRowDown38_2 = ScaleRowDown38_Any_NEON;
  618|       |    } else {
  619|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_Any_NEON;
  620|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_Any_NEON;
  621|       |    }
  622|       |    if (dst_width % 12 == 0) {
  623|       |      if (!filtering) {
  624|       |        ScaleRowDown38_3 = ScaleRowDown38_NEON;
  625|       |        ScaleRowDown38_2 = ScaleRowDown38_NEON;
  626|       |      } else {
  627|       |        ScaleRowDown38_3 = ScaleRowDown38_3_Box_NEON;
  628|       |        ScaleRowDown38_2 = ScaleRowDown38_2_Box_NEON;
  629|       |      }
  630|       |    }
  631|       |  }
  632|       |#endif
  633|     18|#if defined(HAS_SCALEROWDOWN38_SSSE3)
  634|     18|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (634:7): [True: 18, False: 0]
  ------------------
  635|     18|    if (!filtering) {
  ------------------
  |  Branch (635:9): [True: 0, False: 18]
  ------------------
  636|      0|      ScaleRowDown38_3 = ScaleRowDown38_Any_SSSE3;
  637|      0|      ScaleRowDown38_2 = ScaleRowDown38_Any_SSSE3;
  638|     18|    } else {
  639|     18|      ScaleRowDown38_3 = ScaleRowDown38_3_Box_Any_SSSE3;
  640|     18|      ScaleRowDown38_2 = ScaleRowDown38_2_Box_Any_SSSE3;
  641|     18|    }
  642|     18|    if (dst_width % 12 == 0 && !filtering) {
  ------------------
  |  Branch (642:9): [True: 14, False: 4]
  |  Branch (642:32): [True: 0, False: 14]
  ------------------
  643|      0|      ScaleRowDown38_3 = ScaleRowDown38_SSSE3;
  644|      0|      ScaleRowDown38_2 = ScaleRowDown38_SSSE3;
  645|      0|    }
  646|     18|    if (dst_width % 6 == 0 && filtering) {
  ------------------
  |  Branch (646:9): [True: 18, False: 0]
  |  Branch (646:31): [True: 18, False: 0]
  ------------------
  647|     18|      ScaleRowDown38_3 = ScaleRowDown38_3_Box_SSSE3;
  648|     18|      ScaleRowDown38_2 = ScaleRowDown38_2_Box_SSSE3;
  649|     18|    }
  650|     18|  }
  651|     18|#endif
  652|       |#if defined(HAS_SCALEROWDOWN38_LSX)
  653|       |  if (TestCpuFlag(kCpuHasLSX)) {
  654|       |    if (!filtering) {
  655|       |      ScaleRowDown38_3 = ScaleRowDown38_Any_LSX;
  656|       |      ScaleRowDown38_2 = ScaleRowDown38_Any_LSX;
  657|       |    } else {
  658|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_Any_LSX;
  659|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_Any_LSX;
  660|       |    }
  661|       |    if (dst_width % 12 == 0) {
  662|       |      if (!filtering) {
  663|       |        ScaleRowDown38_3 = ScaleRowDown38_LSX;
  664|       |        ScaleRowDown38_2 = ScaleRowDown38_LSX;
  665|       |      } else {
  666|       |        ScaleRowDown38_3 = ScaleRowDown38_3_Box_LSX;
  667|       |        ScaleRowDown38_2 = ScaleRowDown38_2_Box_LSX;
  668|       |      }
  669|       |    }
  670|       |  }
  671|       |#endif
  672|       |#if defined(HAS_SCALEROWDOWN38_RVV)
  673|       |  if (TestCpuFlag(kCpuHasRVV)) {
  674|       |    if (!filtering) {
  675|       |      ScaleRowDown38_3 = ScaleRowDown38_RVV;
  676|       |      ScaleRowDown38_2 = ScaleRowDown38_RVV;
  677|       |    } else {
  678|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_RVV;
  679|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_RVV;
  680|       |    }
  681|       |  }
  682|       |#endif
  683|       |
  684|     50|  for (y = 0; y < dst_height - 2; y += 3) {
  ------------------
  |  Branch (684:15): [True: 32, False: 18]
  ------------------
  685|     32|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  686|     32|    src_ptr += src_stride * 3;
  687|     32|    dst_ptr += dst_stride;
  688|     32|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  689|     32|    src_ptr += src_stride * 3;
  690|     32|    dst_ptr += dst_stride;
  691|     32|    ScaleRowDown38_2(src_ptr, filter_stride, dst_ptr, dst_width);
  692|     32|    src_ptr += src_stride * 2;
  693|     32|    dst_ptr += dst_stride;
  694|     32|  }
  695|       |
  696|       |  // Remainder 1 or 2 rows with last row vertically unfiltered
  697|     18|  if ((dst_height % 3) == 2) {
  ------------------
  |  Branch (697:7): [True: 0, False: 18]
  ------------------
  698|      0|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  699|      0|    src_ptr += src_stride * 3;
  700|      0|    dst_ptr += dst_stride;
  701|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  702|     18|  } else if ((dst_height % 3) == 1) {
  ------------------
  |  Branch (702:14): [True: 0, False: 18]
  ------------------
  703|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  704|      0|  }
  705|     18|}
scale.cc:_ZN6libyuvL15ScalePlaneDown4EiiiiiiPKhPhNS_10FilterModeE:
  266|     38|                            enum FilterMode filtering) {
  267|     38|  int y;
  268|     38|  void (*ScaleRowDown4)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  269|     38|                        uint8_t* dst_ptr, int dst_width) =
  270|     38|      filtering ? ScaleRowDown4Box_C : ScaleRowDown4_C;
  ------------------
  |  Branch (270:7): [True: 38, False: 0]
  ------------------
  271|     38|  int row_stride = src_stride * 4;
  272|     38|  (void)src_width;
  273|     38|  (void)src_height;
  274|     38|  if (!filtering) {
  ------------------
  |  Branch (274:7): [True: 0, False: 38]
  ------------------
  275|      0|    src_ptr += src_stride * 2;  // Point to row 2.
  276|      0|    src_stride = 0;
  277|      0|  }
  278|       |#if defined(HAS_SCALEROWDOWN4_NEON)
  279|       |  if (TestCpuFlag(kCpuHasNEON)) {
  280|       |    ScaleRowDown4 =
  281|       |        filtering ? ScaleRowDown4Box_Any_NEON : ScaleRowDown4_Any_NEON;
  282|       |    if (IS_ALIGNED(dst_width, 16)) {
  283|       |      ScaleRowDown4 = filtering ? ScaleRowDown4Box_NEON : ScaleRowDown4_NEON;
  284|       |    }
  285|       |  }
  286|       |#endif
  287|     38|#if defined(HAS_SCALEROWDOWN4_SSSE3)
  288|     38|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (288:7): [True: 38, False: 0]
  ------------------
  289|     38|    ScaleRowDown4 =
  290|     38|        filtering ? ScaleRowDown4Box_Any_SSSE3 : ScaleRowDown4_Any_SSSE3;
  ------------------
  |  Branch (290:9): [True: 38, False: 0]
  ------------------
  291|     38|    if (IS_ALIGNED(dst_width, 8)) {
  ------------------
  |  |  999|     38|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 0, False: 38]
  |  |  ------------------
  ------------------
  292|      0|      ScaleRowDown4 = filtering ? ScaleRowDown4Box_SSSE3 : ScaleRowDown4_SSSE3;
  ------------------
  |  Branch (292:23): [True: 0, False: 0]
  ------------------
  293|      0|    }
  294|     38|  }
  295|     38|#endif
  296|     38|#if defined(HAS_SCALEROWDOWN4_AVX2)
  297|     38|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (297:7): [True: 38, False: 0]
  ------------------
  298|     38|    ScaleRowDown4 =
  299|     38|        filtering ? ScaleRowDown4Box_Any_AVX2 : ScaleRowDown4_Any_AVX2;
  ------------------
  |  Branch (299:9): [True: 38, False: 0]
  ------------------
  300|     38|    if (IS_ALIGNED(dst_width, 16)) {
  ------------------
  |  |  999|     38|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 0, False: 38]
  |  |  ------------------
  ------------------
  301|      0|      ScaleRowDown4 = filtering ? ScaleRowDown4Box_AVX2 : ScaleRowDown4_AVX2;
  ------------------
  |  Branch (301:23): [True: 0, False: 0]
  ------------------
  302|      0|    }
  303|     38|  }
  304|     38|#endif
  305|       |#if defined(HAS_SCALEROWDOWN4_LSX)
  306|       |  if (TestCpuFlag(kCpuHasLSX)) {
  307|       |    ScaleRowDown4 =
  308|       |        filtering ? ScaleRowDown4Box_Any_LSX : ScaleRowDown4_Any_LSX;
  309|       |    if (IS_ALIGNED(dst_width, 16)) {
  310|       |      ScaleRowDown4 = filtering ? ScaleRowDown4Box_LSX : ScaleRowDown4_LSX;
  311|       |    }
  312|       |  }
  313|       |#endif
  314|       |#if defined(HAS_SCALEROWDOWN4_RVV)
  315|       |  if (TestCpuFlag(kCpuHasRVV)) {
  316|       |    ScaleRowDown4 = filtering ? ScaleRowDown4Box_RVV : ScaleRowDown4_RVV;
  317|       |  }
  318|       |#endif
  319|       |
  320|     38|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (320:7): [True: 0, False: 38]
  ------------------
  321|      0|    src_stride = 0;
  322|      0|  }
  323|    464|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (323:15): [True: 426, False: 38]
  ------------------
  324|    426|    ScaleRowDown4(src_ptr, src_stride, dst_ptr, dst_width);
  325|    426|    src_ptr += row_stride;
  326|    426|    dst_ptr += dst_stride;
  327|    426|  }
  328|     38|}
scale.cc:_ZN6libyuvL13ScalePlaneBoxEiiiiiiPKhPh:
  907|  1.05k|                         uint8_t* dst_ptr) {
  908|  1.05k|  int j, k;
  909|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
  910|  1.05k|  int x = 0;
  911|  1.05k|  int y = 0;
  912|  1.05k|  int dx = 0;
  913|  1.05k|  int dy = 0;
  914|  1.05k|  const int max_y = (src_height << 16);
  915|  1.05k|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterBox, &x, &y,
  916|  1.05k|             &dx, &dy);
  917|  1.05k|  src_width = Abs(src_width);
  918|  1.05k|  {
  919|       |    // Allocate a row buffer of uint16_t.
  920|  1.05k|    align_buffer_64(row16, src_width * 2);
  ------------------
  |  | 1002|  1.05k|  void* var##_mem = malloc((size) + 63);                      /* NOLINT */ \
  |  | 1003|  1.05k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
  921|  1.05k|    if (!row16)
  ------------------
  |  Branch (921:9): [True: 0, False: 1.05k]
  ------------------
  922|      0|      return 1;
  923|  1.05k|    void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx,
  924|  1.05k|                         const uint16_t* src_ptr, uint8_t* dst_ptr) =
  925|  1.05k|        (dx & 0xffff) ? ScaleAddCols2_C
  ------------------
  |  Branch (925:9): [True: 607, False: 449]
  ------------------
  926|  1.05k|                      : ((dx != 0x10000) ? ScaleAddCols1_C : ScaleAddCols0_C);
  ------------------
  |  Branch (926:26): [True: 449, False: 0]
  ------------------
  927|  1.05k|    void (*ScaleAddRow)(const uint8_t* src_ptr, uint16_t* dst_ptr,
  928|  1.05k|                        int src_width) = ScaleAddRow_C;
  929|  1.05k|#if defined(HAS_SCALEADDROW_SSE2)
  930|  1.05k|    if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (930:9): [True: 1.05k, False: 0]
  ------------------
  931|  1.05k|      ScaleAddRow = ScaleAddRow_Any_SSE2;
  932|  1.05k|      if (IS_ALIGNED(src_width, 16)) {
  ------------------
  |  |  999|  1.05k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 280, False: 776]
  |  |  ------------------
  ------------------
  933|    280|        ScaleAddRow = ScaleAddRow_SSE2;
  934|    280|      }
  935|  1.05k|    }
  936|  1.05k|#endif
  937|  1.05k|#if defined(HAS_SCALEADDROW_AVX2)
  938|  1.05k|    if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (938:9): [True: 1.05k, False: 0]
  ------------------
  939|  1.05k|      ScaleAddRow = ScaleAddRow_Any_AVX2;
  940|  1.05k|      if (IS_ALIGNED(src_width, 32)) {
  ------------------
  |  |  999|  1.05k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 222, False: 834]
  |  |  ------------------
  ------------------
  941|    222|        ScaleAddRow = ScaleAddRow_AVX2;
  942|    222|      }
  943|  1.05k|    }
  944|  1.05k|#endif
  945|       |#if defined(HAS_SCALEADDROW_NEON)
  946|       |    if (TestCpuFlag(kCpuHasNEON)) {
  947|       |      ScaleAddRow = ScaleAddRow_Any_NEON;
  948|       |      if (IS_ALIGNED(src_width, 16)) {
  949|       |        ScaleAddRow = ScaleAddRow_NEON;
  950|       |      }
  951|       |    }
  952|       |#endif
  953|       |#if defined(HAS_SCALEADDROW_LSX)
  954|       |    if (TestCpuFlag(kCpuHasLSX)) {
  955|       |      ScaleAddRow = ScaleAddRow_Any_LSX;
  956|       |      if (IS_ALIGNED(src_width, 16)) {
  957|       |        ScaleAddRow = ScaleAddRow_LSX;
  958|       |      }
  959|       |    }
  960|       |#endif
  961|       |#if defined(HAS_SCALEADDROW_RVV)
  962|       |    if (TestCpuFlag(kCpuHasRVV)) {
  963|       |      ScaleAddRow = ScaleAddRow_RVV;
  964|       |    }
  965|       |#endif
  966|       |
  967|  85.8k|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (967:17): [True: 84.7k, False: 1.05k]
  ------------------
  968|  84.7k|      int boxheight;
  969|  84.7k|      int iy = y >> 16;
  970|  84.7k|      const uint8_t* src = src_ptr + iy * (int64_t)src_stride;
  971|  84.7k|      y += dy;
  972|  84.7k|      if (y > max_y) {
  ------------------
  |  Branch (972:11): [True: 0, False: 84.7k]
  ------------------
  973|      0|        y = max_y;
  974|      0|      }
  975|  84.7k|      boxheight = MIN1((y >> 16) - iy);
  ------------------
  |  |  778|  84.7k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 84.7k]
  |  |  ------------------
  ------------------
  976|  84.7k|      memset(row16, 0, src_width * 2);
  977|  1.25M|      for (k = 0; k < boxheight; ++k) {
  ------------------
  |  Branch (977:19): [True: 1.16M, False: 84.7k]
  ------------------
  978|  1.16M|        ScaleAddRow(src, (uint16_t*)(row16), src_width);
  979|  1.16M|        src += src_stride;
  980|  1.16M|      }
  981|  84.7k|      ScaleAddCols(dst_width, boxheight, x, dx, (uint16_t*)(row16), dst_ptr);
  982|  84.7k|      dst_ptr += dst_stride;
  983|  84.7k|    }
  984|  1.05k|    free_aligned_buffer_64(row16);
  ------------------
  |  | 1006|  1.05k|  free(var##_mem);                  \
  |  | 1007|  1.05k|  var = NULL
  ------------------
  985|  1.05k|  }
  986|      0|  return 0;
  987|  1.05k|}
scale.cc:_ZN6libyuvL15ScaleAddCols2_CEiiiiPKtPh:
  805|  63.9k|                            uint8_t* dst_ptr) {
  806|  63.9k|  int i;
  807|  63.9k|  int scaletbl[2];
  808|  63.9k|  int minboxwidth = dx >> 16;
  809|  63.9k|  int boxwidth;
  810|  63.9k|  scaletbl[0] = 65536 / (MIN1(minboxwidth) * boxheight);
  ------------------
  |  |  778|  63.9k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 63.9k]
  |  |  ------------------
  ------------------
  811|  63.9k|  scaletbl[1] = 65536 / (MIN1(minboxwidth + 1) * boxheight);
  ------------------
  |  |  778|  63.9k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 63.9k]
  |  |  ------------------
  ------------------
  812|  4.25M|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (812:15): [True: 4.19M, False: 63.9k]
  ------------------
  813|  4.19M|    int ix = x >> 16;
  814|  4.19M|    x += dx;
  815|  4.19M|    boxwidth = MIN1((x >> 16) - ix);
  ------------------
  |  |  778|  4.19M|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 4.19M]
  |  |  ------------------
  ------------------
  816|  4.19M|    int scaletbl_index = boxwidth - minboxwidth;
  817|       |    assert((scaletbl_index == 0) || (scaletbl_index == 1));
  818|  4.19M|    *dst_ptr++ = (uint8_t)(SumPixels(boxwidth, src_ptr + ix) *
  819|  4.19M|                               scaletbl[scaletbl_index] >>
  820|  4.19M|                           16);
  821|  4.19M|  }
  822|  63.9k|}
scale.cc:_ZN6libyuvL9SumPixelsEiPKt:
  780|  5.90M|static __inline uint32_t SumPixels(int iboxwidth, const uint16_t* src_ptr) {
  781|  5.90M|  uint32_t sum = 0u;
  782|  5.90M|  int x;
  783|  5.90M|  assert(iboxwidth > 0);
  784|  42.7M|  for (x = 0; x < iboxwidth; ++x) {
  ------------------
  |  Branch (784:15): [True: 36.8M, False: 5.90M]
  ------------------
  785|  36.8M|    sum += src_ptr[x];
  786|  36.8M|  }
  787|  5.90M|  return sum;
  788|  5.90M|}
scale.cc:_ZN6libyuvL15ScaleAddCols1_CEiiiiPKtPh:
  867|  20.8k|                            uint8_t* dst_ptr) {
  868|  20.8k|  int boxwidth = MIN1(dx >> 16);
  ------------------
  |  |  778|  20.8k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 20.8k]
  |  |  ------------------
  ------------------
  869|  20.8k|  int scaleval = 65536 / (boxwidth * boxheight);
  870|  20.8k|  int i;
  871|  20.8k|  x >>= 16;
  872|  1.73M|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (872:15): [True: 1.71M, False: 20.8k]
  ------------------
  873|  1.71M|    *dst_ptr++ = (uint8_t)(SumPixels(boxwidth, src_ptr + x) * scaleval >> 16);
  874|  1.71M|    x += boxwidth;
  875|  1.71M|  }
  876|  20.8k|}
scale.cc:_ZN6libyuvL20ScalePlaneUp2_LinearEiiiiiiPKhPh:
 1431|    136|                                 uint8_t* dst_ptr) {
 1432|    136|  void (*ScaleRowUp)(const uint8_t* src_ptr, uint8_t* dst_ptr, int dst_width) =
 1433|    136|      ScaleRowUp2_Linear_Any_C;
 1434|    136|  int i;
 1435|    136|  int y;
 1436|    136|  int dy;
 1437|       |
 1438|    136|  (void)src_width;
 1439|       |  // This function can only scale up by 2 times horizontally.
 1440|    136|  assert(src_width == ((dst_width + 1) / 2));
 1441|       |
 1442|    136|#ifdef HAS_SCALEROWUP2_LINEAR_SSE2
 1443|    136|  if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (1443:7): [True: 136, False: 0]
  ------------------
 1444|    136|    ScaleRowUp = ScaleRowUp2_Linear_Any_SSE2;
 1445|    136|  }
 1446|    136|#endif
 1447|       |
 1448|    136|#ifdef HAS_SCALEROWUP2_LINEAR_SSSE3
 1449|    136|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1449:7): [True: 136, False: 0]
  ------------------
 1450|    136|    ScaleRowUp = ScaleRowUp2_Linear_Any_SSSE3;
 1451|    136|  }
 1452|    136|#endif
 1453|       |
 1454|    136|#ifdef HAS_SCALEROWUP2_LINEAR_AVX2
 1455|    136|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1455:7): [True: 136, False: 0]
  ------------------
 1456|    136|    ScaleRowUp = ScaleRowUp2_Linear_Any_AVX2;
 1457|    136|  }
 1458|    136|#endif
 1459|       |
 1460|       |#ifdef HAS_SCALEROWUP2_LINEAR_NEON
 1461|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1462|       |    ScaleRowUp = ScaleRowUp2_Linear_Any_NEON;
 1463|       |  }
 1464|       |#endif
 1465|       |#ifdef HAS_SCALEROWUP2_LINEAR_RVV
 1466|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1467|       |    ScaleRowUp = ScaleRowUp2_Linear_RVV;
 1468|       |  }
 1469|       |#endif
 1470|       |
 1471|    136|  if (dst_height == 1) {
  ------------------
  |  Branch (1471:7): [True: 18, False: 118]
  ------------------
 1472|     18|    ScaleRowUp(src_ptr + ((src_height - 1) / 2) * (int64_t)src_stride, dst_ptr,
 1473|     18|               dst_width);
 1474|    118|  } else {
 1475|    118|    dy = FixedDiv(src_height - 1, dst_height - 1);
  ------------------
  |  |  265|    118|#define FixedDiv FixedDiv_X86
  ------------------
 1476|    118|    y = (1 << 15) - 1;
 1477|   199k|    for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1477:17): [True: 199k, False: 118]
  ------------------
 1478|   199k|      ScaleRowUp(src_ptr + (y >> 16) * (int64_t)src_stride, dst_ptr, dst_width);
 1479|   199k|      dst_ptr += dst_stride;
 1480|   199k|      y += dy;
 1481|   199k|    }
 1482|    118|  }
 1483|    136|}
scale.cc:_ZN6libyuvL22ScalePlaneUp2_BilinearEiiiiiiPKhPh:
 1496|     75|                                   uint8_t* dst_ptr) {
 1497|     75|  void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride,
 1498|     75|                      uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
 1499|     75|      ScaleRowUp2_Bilinear_Any_C;
 1500|     75|  int x;
 1501|       |
 1502|     75|  (void)src_width;
 1503|       |  // This function can only scale up by 2 times.
 1504|     75|  assert(src_width == ((dst_width + 1) / 2));
 1505|     75|  assert(src_height == ((dst_height + 1) / 2));
 1506|       |
 1507|     75|#ifdef HAS_SCALEROWUP2_BILINEAR_SSE2
 1508|     75|  if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (1508:7): [True: 75, False: 0]
  ------------------
 1509|     75|    Scale2RowUp = ScaleRowUp2_Bilinear_Any_SSE2;
 1510|     75|  }
 1511|     75|#endif
 1512|       |
 1513|     75|#ifdef HAS_SCALEROWUP2_BILINEAR_SSSE3
 1514|     75|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1514:7): [True: 75, False: 0]
  ------------------
 1515|     75|    Scale2RowUp = ScaleRowUp2_Bilinear_Any_SSSE3;
 1516|     75|  }
 1517|     75|#endif
 1518|       |
 1519|     75|#ifdef HAS_SCALEROWUP2_BILINEAR_AVX2
 1520|     75|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1520:7): [True: 75, False: 0]
  ------------------
 1521|     75|    Scale2RowUp = ScaleRowUp2_Bilinear_Any_AVX2;
 1522|     75|  }
 1523|     75|#endif
 1524|       |
 1525|       |#ifdef HAS_SCALEROWUP2_BILINEAR_NEON
 1526|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1527|       |    Scale2RowUp = ScaleRowUp2_Bilinear_Any_NEON;
 1528|       |  }
 1529|       |#endif
 1530|       |#ifdef HAS_SCALEROWUP2_BILINEAR_RVV
 1531|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1532|       |    Scale2RowUp = ScaleRowUp2_Bilinear_RVV;
 1533|       |  }
 1534|       |#endif
 1535|       |
 1536|     75|  Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1537|     75|  dst_ptr += dst_stride;
 1538|    886|  for (x = 0; x < src_height - 1; ++x) {
  ------------------
  |  Branch (1538:15): [True: 811, False: 75]
  ------------------
 1539|    811|    Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
 1540|    811|    src_ptr += src_stride;
 1541|       |    // TODO(fbarchard): Test performance of writing one row of destination at a
 1542|       |    // time.
 1543|    811|    dst_ptr += 2 * dst_stride;
 1544|    811|  }
 1545|     75|  if (!(dst_height & 1)) {
  ------------------
  |  Branch (1545:7): [True: 51, False: 24]
  ------------------
 1546|     51|    Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1547|     51|  }
 1548|     75|}
scale.cc:_ZN6libyuvL20ScalePlaneBilinearUpEiiiiiiPKhPhNS_10FilterModeE:
 1275|  3.60k|                                enum FilterMode filtering) {
 1276|  3.60k|  int j;
 1277|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1278|  3.60k|  int x = 0;
 1279|  3.60k|  int y = 0;
 1280|  3.60k|  int dx = 0;
 1281|  3.60k|  int dy = 0;
 1282|  3.60k|  const int max_y = (src_height - 1) << 16;
 1283|  3.60k|  void (*InterpolateRow)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1284|  3.60k|                         ptrdiff_t src_stride, int dst_width,
 1285|  3.60k|                         int source_y_fraction) = InterpolateRow_C;
 1286|  3.60k|  void (*ScaleFilterCols)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1287|  3.60k|                          int dst_width, int x, int dx) =
 1288|  3.60k|      filtering ? ScaleFilterCols_C : ScaleCols_C;
  ------------------
  |  Branch (1288:7): [True: 3.60k, False: 0]
  ------------------
 1289|  3.60k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1290|  3.60k|             &dx, &dy);
 1291|  3.60k|  src_width = Abs(src_width);
 1292|       |
 1293|  3.60k|#if defined(HAS_INTERPOLATEROW_SSSE3)
 1294|  3.60k|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1294:7): [True: 3.60k, False: 0]
  ------------------
 1295|  3.60k|    InterpolateRow = InterpolateRow_Any_SSSE3;
 1296|  3.60k|    if (IS_ALIGNED(dst_width, 16)) {
  ------------------
  |  |  999|  3.60k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 2.32k, False: 1.27k]
  |  |  ------------------
  ------------------
 1297|  2.32k|      InterpolateRow = InterpolateRow_SSSE3;
 1298|  2.32k|    }
 1299|  3.60k|  }
 1300|  3.60k|#endif
 1301|  3.60k|#if defined(HAS_INTERPOLATEROW_AVX2)
 1302|  3.60k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1302:7): [True: 3.60k, False: 0]
  ------------------
 1303|  3.60k|    InterpolateRow = InterpolateRow_Any_AVX2;
 1304|  3.60k|    if (IS_ALIGNED(dst_width, 32)) {
  ------------------
  |  |  999|  3.60k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 2.20k, False: 1.39k]
  |  |  ------------------
  ------------------
 1305|  2.20k|      InterpolateRow = InterpolateRow_AVX2;
 1306|  2.20k|    }
 1307|  3.60k|  }
 1308|  3.60k|#endif
 1309|       |#if defined(HAS_INTERPOLATEROW_NEON)
 1310|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1311|       |    InterpolateRow = InterpolateRow_Any_NEON;
 1312|       |    if (IS_ALIGNED(dst_width, 16)) {
 1313|       |      InterpolateRow = InterpolateRow_NEON;
 1314|       |    }
 1315|       |  }
 1316|       |#endif
 1317|       |#if defined(HAS_INTERPOLATEROW_SME)
 1318|       |  if (TestCpuFlag(kCpuHasSME)) {
 1319|       |    InterpolateRow = InterpolateRow_SME;
 1320|       |  }
 1321|       |#endif
 1322|       |#if defined(HAS_INTERPOLATEROW_RVV)
 1323|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1324|       |    InterpolateRow = InterpolateRow_RVV;
 1325|       |  }
 1326|       |#endif
 1327|       |
 1328|  3.60k|  if (filtering && src_width >= 32768) {
  ------------------
  |  Branch (1328:7): [True: 3.60k, False: 0]
  |  Branch (1328:20): [True: 0, False: 3.60k]
  ------------------
 1329|      0|    ScaleFilterCols = ScaleFilterCols64_C;
 1330|      0|  }
 1331|  3.60k|#if defined(HAS_SCALEFILTERCOLS_SSSE3)
 1332|  3.60k|  if (filtering && TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
  ------------------
  |  Branch (1332:7): [True: 3.60k, False: 0]
  |  Branch (1332:20): [True: 3.60k, False: 0]
  |  Branch (1332:49): [True: 3.60k, False: 0]
  ------------------
 1333|  3.60k|    ScaleFilterCols = ScaleFilterCols_SSSE3;
 1334|  3.60k|  }
 1335|  3.60k|#endif
 1336|       |#if defined(HAS_SCALEFILTERCOLS_NEON)
 1337|       |  if (filtering && TestCpuFlag(kCpuHasNEON) && src_width < 32768) {
 1338|       |    ScaleFilterCols = ScaleFilterCols_Any_NEON;
 1339|       |    if (IS_ALIGNED(dst_width, 8)) {
 1340|       |      ScaleFilterCols = ScaleFilterCols_NEON;
 1341|       |    }
 1342|       |  }
 1343|       |#endif
 1344|       |#if defined(HAS_SCALEFILTERCOLS_LSX)
 1345|       |  if (filtering && TestCpuFlag(kCpuHasLSX) && src_width < 32768) {
 1346|       |    ScaleFilterCols = ScaleFilterCols_Any_LSX;
 1347|       |    if (IS_ALIGNED(dst_width, 16)) {
 1348|       |      ScaleFilterCols = ScaleFilterCols_LSX;
 1349|       |    }
 1350|       |  }
 1351|       |#endif
 1352|  3.60k|  if (!filtering && src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1352:7): [True: 0, False: 3.60k]
  |  Branch (1352:21): [True: 0, False: 0]
  |  Branch (1352:51): [True: 0, False: 0]
  ------------------
 1353|      0|    ScaleFilterCols = ScaleColsUp2_C;
 1354|       |#if defined(HAS_SCALECOLS_SSE2)
 1355|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1356|       |      ScaleFilterCols = ScaleColsUp2_SSE2;
 1357|       |    }
 1358|       |#endif
 1359|      0|  }
 1360|       |
 1361|  3.60k|  if (y > max_y) {
  ------------------
  |  Branch (1361:7): [True: 787, False: 2.81k]
  ------------------
 1362|    787|    y = max_y;
 1363|    787|  }
 1364|  3.60k|  {
 1365|  3.60k|    int yi = y >> 16;
 1366|  3.60k|    const uint8_t* src = src_ptr + yi * (int64_t)src_stride;
 1367|       |
 1368|       |    // Allocate 2 row buffers.
 1369|  3.60k|    const int row_size = (dst_width + 31) & ~31;
 1370|  3.60k|    align_buffer_64(row, row_size * 2);
  ------------------
  |  | 1002|  3.60k|  void* var##_mem = malloc((size) + 63);                      /* NOLINT */ \
  |  | 1003|  3.60k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1371|  3.60k|    if (!row)
  ------------------
  |  Branch (1371:9): [True: 0, False: 3.60k]
  ------------------
 1372|      0|      return 1;
 1373|       |
 1374|  3.60k|    uint8_t* rowptr = row;
 1375|  3.60k|    int rowstride = row_size;
 1376|  3.60k|    int lasty = yi;
 1377|       |
 1378|  3.60k|    ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1379|  3.60k|    if (src_height > 1) {
  ------------------
  |  Branch (1379:9): [True: 2.81k, False: 787]
  ------------------
 1380|  2.81k|      src += src_stride;
 1381|  2.81k|    }
 1382|  3.60k|    ScaleFilterCols(rowptr + rowstride, src, dst_width, x, dx);
 1383|  3.60k|    if (src_height > 2) {
  ------------------
  |  Branch (1383:9): [True: 2.59k, False: 1.01k]
  ------------------
 1384|  2.59k|      src += src_stride;
 1385|  2.59k|    }
 1386|       |
 1387|  2.42M|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1387:17): [True: 2.42M, False: 3.60k]
  ------------------
 1388|  2.42M|      yi = y >> 16;
 1389|  2.42M|      if (yi != lasty) {
  ------------------
  |  Branch (1389:11): [True: 66.5k, False: 2.35M]
  ------------------
 1390|  66.5k|        if (y > max_y) {
  ------------------
  |  Branch (1390:13): [True: 0, False: 66.5k]
  ------------------
 1391|      0|          y = max_y;
 1392|      0|          yi = y >> 16;
 1393|      0|          src = src_ptr + yi * (int64_t)src_stride;
 1394|      0|        }
 1395|  66.5k|        if (yi != lasty) {
  ------------------
  |  Branch (1395:13): [True: 66.5k, False: 0]
  ------------------
 1396|  66.5k|          ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1397|  66.5k|          rowptr += rowstride;
 1398|  66.5k|          rowstride = -rowstride;
 1399|  66.5k|          lasty = yi;
 1400|  66.5k|          if ((y + 65536) < max_y) {
  ------------------
  |  Branch (1400:15): [True: 63.9k, False: 2.59k]
  ------------------
 1401|  63.9k|            src += src_stride;
 1402|  63.9k|          }
 1403|  66.5k|        }
 1404|  66.5k|      }
 1405|  2.42M|      if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1405:11): [True: 631k, False: 1.79M]
  ------------------
 1406|   631k|        InterpolateRow(dst_ptr, rowptr, 0, dst_width, 0);
 1407|  1.79M|      } else {
 1408|  1.79M|        int yf = (y >> 8) & 255;
 1409|  1.79M|        InterpolateRow(dst_ptr, rowptr, rowstride, dst_width, yf);
 1410|  1.79M|      }
 1411|  2.42M|      dst_ptr += dst_stride;
 1412|  2.42M|      y += dy;
 1413|  2.42M|    }
 1414|  3.60k|    free_aligned_buffer_64(row);
  ------------------
  |  | 1006|  3.60k|  free(var##_mem);                  \
  |  | 1007|  3.60k|  var = NULL
  ------------------
 1415|  3.60k|  }
 1416|      0|  return 0;
 1417|  3.60k|}
scale.cc:_ZN6libyuvL22ScalePlaneBilinearDownEiiiiiiPKhPhNS_10FilterModeE:
 1055|  1.64k|                                  enum FilterMode filtering) {
 1056|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1057|  1.64k|  int x = 0;
 1058|  1.64k|  int y = 0;
 1059|  1.64k|  int dx = 0;
 1060|  1.64k|  int dy = 0;
 1061|       |  // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear.
 1062|       |  // Allocate a row buffer.
 1063|  1.64k|  align_buffer_64(row, src_width);
  ------------------
  |  | 1002|  1.64k|  void* var##_mem = malloc((size) + 63);                      /* NOLINT */ \
  |  | 1003|  1.64k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1064|  1.64k|  if (!row)
  ------------------
  |  Branch (1064:7): [True: 0, False: 1.64k]
  ------------------
 1065|      0|    return 1;
 1066|       |
 1067|  1.64k|  const int max_y = (src_height - 1) << 16;
 1068|  1.64k|  int j;
 1069|  1.64k|  void (*ScaleFilterCols)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1070|  1.64k|                          int dst_width, int x, int dx) =
 1071|  1.64k|      (src_width >= 32768) ? ScaleFilterCols64_C : ScaleFilterCols_C;
  ------------------
  |  Branch (1071:7): [True: 0, False: 1.64k]
  ------------------
 1072|  1.64k|  void (*InterpolateRow)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1073|  1.64k|                         ptrdiff_t src_stride, int dst_width,
 1074|  1.64k|                         int source_y_fraction) = InterpolateRow_C;
 1075|  1.64k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1076|  1.64k|             &dx, &dy);
 1077|  1.64k|  src_width = Abs(src_width);
 1078|       |
 1079|  1.64k|#if defined(HAS_INTERPOLATEROW_SSSE3)
 1080|  1.64k|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1080:7): [True: 1.64k, False: 0]
  ------------------
 1081|  1.64k|    InterpolateRow = InterpolateRow_Any_SSSE3;
 1082|  1.64k|    if (IS_ALIGNED(src_width, 16)) {
  ------------------
  |  |  999|  1.64k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 354, False: 1.29k]
  |  |  ------------------
  ------------------
 1083|    354|      InterpolateRow = InterpolateRow_SSSE3;
 1084|    354|    }
 1085|  1.64k|  }
 1086|  1.64k|#endif
 1087|  1.64k|#if defined(HAS_INTERPOLATEROW_AVX2)
 1088|  1.64k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1088:7): [True: 1.64k, False: 0]
  ------------------
 1089|  1.64k|    InterpolateRow = InterpolateRow_Any_AVX2;
 1090|  1.64k|    if (IS_ALIGNED(src_width, 32)) {
  ------------------
  |  |  999|  1.64k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 196, False: 1.45k]
  |  |  ------------------
  ------------------
 1091|    196|      InterpolateRow = InterpolateRow_AVX2;
 1092|    196|    }
 1093|  1.64k|  }
 1094|  1.64k|#endif
 1095|       |#if defined(HAS_INTERPOLATEROW_NEON)
 1096|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1097|       |    InterpolateRow = InterpolateRow_Any_NEON;
 1098|       |    if (IS_ALIGNED(src_width, 16)) {
 1099|       |      InterpolateRow = InterpolateRow_NEON;
 1100|       |    }
 1101|       |  }
 1102|       |#endif
 1103|       |#if defined(HAS_INTERPOLATEROW_SME)
 1104|       |  if (TestCpuFlag(kCpuHasSME)) {
 1105|       |    InterpolateRow = InterpolateRow_SME;
 1106|       |  }
 1107|       |#endif
 1108|       |#if defined(HAS_INTERPOLATEROW_LSX)
 1109|       |  if (TestCpuFlag(kCpuHasLSX)) {
 1110|       |    InterpolateRow = InterpolateRow_Any_LSX;
 1111|       |    if (IS_ALIGNED(src_width, 32)) {
 1112|       |      InterpolateRow = InterpolateRow_LSX;
 1113|       |    }
 1114|       |  }
 1115|       |#endif
 1116|       |#if defined(HAS_INTERPOLATEROW_RVV)
 1117|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1118|       |    InterpolateRow = InterpolateRow_RVV;
 1119|       |  }
 1120|       |#endif
 1121|       |
 1122|  1.64k|#if defined(HAS_SCALEFILTERCOLS_SSSE3)
 1123|  1.64k|  if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
  ------------------
  |  Branch (1123:7): [True: 1.64k, False: 0]
  |  Branch (1123:36): [True: 1.64k, False: 0]
  ------------------
 1124|  1.64k|    ScaleFilterCols = ScaleFilterCols_SSSE3;
 1125|  1.64k|  }
 1126|  1.64k|#endif
 1127|       |#if defined(HAS_SCALEFILTERCOLS_NEON)
 1128|       |  if (TestCpuFlag(kCpuHasNEON) && src_width < 32768) {
 1129|       |    ScaleFilterCols = ScaleFilterCols_Any_NEON;
 1130|       |    if (IS_ALIGNED(dst_width, 8)) {
 1131|       |      ScaleFilterCols = ScaleFilterCols_NEON;
 1132|       |    }
 1133|       |  }
 1134|       |#endif
 1135|       |#if defined(HAS_SCALEFILTERCOLS_LSX)
 1136|       |  if (TestCpuFlag(kCpuHasLSX) && src_width < 32768) {
 1137|       |    ScaleFilterCols = ScaleFilterCols_Any_LSX;
 1138|       |    if (IS_ALIGNED(dst_width, 16)) {
 1139|       |      ScaleFilterCols = ScaleFilterCols_LSX;
 1140|       |    }
 1141|       |  }
 1142|       |#endif
 1143|  1.64k|  if (y > max_y) {
  ------------------
  |  Branch (1143:7): [True: 123, False: 1.52k]
  ------------------
 1144|    123|    y = max_y;
 1145|    123|  }
 1146|       |
 1147|   135k|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1147:15): [True: 134k, False: 1.64k]
  ------------------
 1148|   134k|    int yi = y >> 16;
 1149|   134k|    const uint8_t* src = src_ptr + yi * (int64_t)src_stride;
 1150|   134k|    if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1150:9): [True: 38.9k, False: 95.0k]
  ------------------
 1151|  38.9k|      ScaleFilterCols(dst_ptr, src, dst_width, x, dx);
 1152|  95.0k|    } else {
 1153|  95.0k|      int yf = (y >> 8) & 255;
 1154|  95.0k|      InterpolateRow(row, src, src_stride, src_width, yf);
 1155|  95.0k|      ScaleFilterCols(dst_ptr, row, dst_width, x, dx);
 1156|  95.0k|    }
 1157|   134k|    dst_ptr += dst_stride;
 1158|   134k|    y += dy;
 1159|   134k|    if (y > max_y) {
  ------------------
  |  Branch (1159:9): [True: 2.04k, False: 132k]
  ------------------
 1160|  2.04k|      y = max_y;
 1161|  2.04k|    }
 1162|   134k|  }
 1163|       |  free_aligned_buffer_64(row);
  ------------------
  |  | 1006|  1.64k|  free(var##_mem);                  \
  |  | 1007|  1.64k|  var = NULL
  ------------------
 1164|  1.64k|  return 0;
 1165|  1.64k|}
scale.cc:_ZN6libyuvL16ScalePlaneSimpleEiiiiiiPKhPh:
 1905|    618|                             uint8_t* dst_ptr) {
 1906|    618|  int i;
 1907|    618|  void (*ScaleCols)(uint8_t* dst_ptr, const uint8_t* src_ptr, int dst_width,
 1908|    618|                    int x, int dx) = ScaleCols_C;
 1909|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1910|    618|  int x = 0;
 1911|    618|  int y = 0;
 1912|    618|  int dx = 0;
 1913|    618|  int dy = 0;
 1914|    618|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterNone, &x, &y,
 1915|    618|             &dx, &dy);
 1916|    618|  src_width = Abs(src_width);
 1917|       |
 1918|    618|  if (src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1918:7): [True: 67, False: 551]
  |  Branch (1918:37): [True: 67, False: 0]
  ------------------
 1919|     67|    ScaleCols = ScaleColsUp2_C;
 1920|       |#if defined(HAS_SCALECOLS_SSE2)
 1921|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1922|       |      ScaleCols = ScaleColsUp2_SSE2;
 1923|       |    }
 1924|       |#endif
 1925|     67|  }
 1926|       |
 1927|   928k|  for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1927:15): [True: 928k, False: 618]
  ------------------
 1928|   928k|    ScaleCols(dst_ptr, src_ptr + (y >> 16) * (int64_t)src_stride, dst_width, x,
 1929|   928k|              dx);
 1930|   928k|    dst_ptr += dst_stride;
 1931|   928k|    y += dy;
 1932|   928k|  }
 1933|    618|}
scale.cc:_ZN6libyuvL18ScalePlaneDown2_16EiiiiiiPKtPtNS_10FilterModeE:
  158|     46|                               enum FilterMode filtering) {
  159|     46|  int y;
  160|     46|  void (*ScaleRowDown2)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  161|     46|                        uint16_t* dst_ptr, int dst_width) =
  162|     46|      filtering == kFilterNone
  ------------------
  |  Branch (162:7): [True: 0, False: 46]
  ------------------
  163|     46|          ? ScaleRowDown2_16_C
  164|     46|          : (filtering == kFilterLinear ? ScaleRowDown2Linear_16_C
  ------------------
  |  Branch (164:14): [True: 0, False: 46]
  ------------------
  165|     46|                                        : ScaleRowDown2Box_16_C);
  166|     46|  int row_stride = src_stride * 2;
  167|     46|  (void)src_width;
  168|     46|  (void)src_height;
  169|     46|  if (!filtering) {
  ------------------
  |  Branch (169:7): [True: 0, False: 46]
  ------------------
  170|      0|    src_ptr += src_stride;  // Point to odd rows.
  171|      0|    src_stride = 0;
  172|      0|  }
  173|       |
  174|       |#if defined(HAS_SCALEROWDOWN2_16_NEON)
  175|       |  if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(dst_width, 16)) {
  176|       |    ScaleRowDown2 = filtering == kFilterNone     ? ScaleRowDown2_16_NEON
  177|       |                    : filtering == kFilterLinear ? ScaleRowDown2Linear_16_NEON
  178|       |                                                 : ScaleRowDown2Box_16_NEON;
  179|       |  }
  180|       |#endif
  181|       |#if defined(HAS_SCALEROWDOWN2_16_SME)
  182|       |  if (TestCpuFlag(kCpuHasSME)) {
  183|       |    ScaleRowDown2 = filtering == kFilterNone     ? ScaleRowDown2_16_SME
  184|       |                    : filtering == kFilterLinear ? ScaleRowDown2Linear_16_SME
  185|       |                                                 : ScaleRowDown2Box_16_SME;
  186|       |  }
  187|       |#endif
  188|       |#if defined(HAS_SCALEROWDOWN2_16_SSE2)
  189|       |  if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 16)) {
  190|       |    ScaleRowDown2 =
  191|       |        filtering == kFilterNone
  192|       |            ? ScaleRowDown2_16_SSE2
  193|       |            : (filtering == kFilterLinear ? ScaleRowDown2Linear_16_SSE2
  194|       |                                          : ScaleRowDown2Box_16_SSE2);
  195|       |  }
  196|       |#endif
  197|       |
  198|     46|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (198:7): [True: 0, False: 46]
  ------------------
  199|      0|    src_stride = 0;
  200|      0|  }
  201|       |  // TODO(fbarchard): Loop through source height to allow odd height.
  202|    382|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (202:15): [True: 336, False: 46]
  ------------------
  203|    336|    ScaleRowDown2(src_ptr, src_stride, dst_ptr, dst_width);
  204|    336|    src_ptr += row_stride;
  205|    336|    dst_ptr += dst_stride;
  206|    336|  }
  207|     46|}
scale.cc:_ZN6libyuvL19ScalePlaneDown38_16EiiiiiiPKtPtNS_10FilterModeE:
  715|     21|                                enum FilterMode filtering) {
  716|     21|  int y;
  717|     21|  void (*ScaleRowDown38_3)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  718|     21|                           uint16_t* dst_ptr, int dst_width);
  719|     21|  void (*ScaleRowDown38_2)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  720|     21|                           uint16_t* dst_ptr, int dst_width);
  721|     21|  const int filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
  ------------------
  |  Branch (721:29): [True: 0, False: 21]
  ------------------
  722|     21|  (void)src_width;
  723|     21|  (void)src_height;
  724|     21|  assert(dst_width % 3 == 0);
  725|     21|  if (!filtering) {
  ------------------
  |  Branch (725:7): [True: 0, False: 21]
  ------------------
  726|      0|    ScaleRowDown38_3 = ScaleRowDown38_16_C;
  727|      0|    ScaleRowDown38_2 = ScaleRowDown38_16_C;
  728|     21|  } else {
  729|     21|    ScaleRowDown38_3 = ScaleRowDown38_3_Box_16_C;
  730|     21|    ScaleRowDown38_2 = ScaleRowDown38_2_Box_16_C;
  731|     21|  }
  732|       |#if defined(HAS_SCALEROWDOWN38_16_NEON)
  733|       |  if (TestCpuFlag(kCpuHasNEON) && (dst_width % 12 == 0)) {
  734|       |    if (!filtering) {
  735|       |      ScaleRowDown38_3 = ScaleRowDown38_16_NEON;
  736|       |      ScaleRowDown38_2 = ScaleRowDown38_16_NEON;
  737|       |    } else {
  738|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_16_NEON;
  739|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_16_NEON;
  740|       |    }
  741|       |  }
  742|       |#endif
  743|       |#if defined(HAS_SCALEROWDOWN38_16_SSSE3)
  744|       |  if (TestCpuFlag(kCpuHasSSSE3) && (dst_width % 24 == 0)) {
  745|       |    if (!filtering) {
  746|       |      ScaleRowDown38_3 = ScaleRowDown38_16_SSSE3;
  747|       |      ScaleRowDown38_2 = ScaleRowDown38_16_SSSE3;
  748|       |    } else {
  749|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_16_SSSE3;
  750|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_16_SSSE3;
  751|       |    }
  752|       |  }
  753|       |#endif
  754|       |
  755|     57|  for (y = 0; y < dst_height - 2; y += 3) {
  ------------------
  |  Branch (755:15): [True: 36, False: 21]
  ------------------
  756|     36|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  757|     36|    src_ptr += src_stride * 3;
  758|     36|    dst_ptr += dst_stride;
  759|     36|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  760|     36|    src_ptr += src_stride * 3;
  761|     36|    dst_ptr += dst_stride;
  762|     36|    ScaleRowDown38_2(src_ptr, filter_stride, dst_ptr, dst_width);
  763|     36|    src_ptr += src_stride * 2;
  764|     36|    dst_ptr += dst_stride;
  765|     36|  }
  766|       |
  767|       |  // Remainder 1 or 2 rows with last row vertically unfiltered
  768|     21|  if ((dst_height % 3) == 2) {
  ------------------
  |  Branch (768:7): [True: 0, False: 21]
  ------------------
  769|      0|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  770|      0|    src_ptr += src_stride * 3;
  771|      0|    dst_ptr += dst_stride;
  772|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  773|     21|  } else if ((dst_height % 3) == 1) {
  ------------------
  |  Branch (773:14): [True: 0, False: 21]
  ------------------
  774|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  775|      0|  }
  776|     21|}
scale.cc:_ZN6libyuvL18ScalePlaneDown4_16EiiiiiiPKtPtNS_10FilterModeE:
  338|     36|                               enum FilterMode filtering) {
  339|     36|  int y;
  340|     36|  void (*ScaleRowDown4)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  341|     36|                        uint16_t* dst_ptr, int dst_width) =
  342|     36|      filtering ? ScaleRowDown4Box_16_C : ScaleRowDown4_16_C;
  ------------------
  |  Branch (342:7): [True: 36, False: 0]
  ------------------
  343|     36|  int row_stride = src_stride * 4;
  344|     36|  (void)src_width;
  345|     36|  (void)src_height;
  346|     36|  if (!filtering) {
  ------------------
  |  Branch (346:7): [True: 0, False: 36]
  ------------------
  347|      0|    src_ptr += src_stride * 2;  // Point to row 2.
  348|      0|    src_stride = 0;
  349|      0|  }
  350|       |#if defined(HAS_SCALEROWDOWN4_16_NEON)
  351|       |  if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(dst_width, 8)) {
  352|       |    ScaleRowDown4 =
  353|       |        filtering ? ScaleRowDown4Box_16_NEON : ScaleRowDown4_16_NEON;
  354|       |  }
  355|       |#endif
  356|       |#if defined(HAS_SCALEROWDOWN4_16_SSE2)
  357|       |  if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
  358|       |    ScaleRowDown4 =
  359|       |        filtering ? ScaleRowDown4Box_16_SSE2 : ScaleRowDown4_16_SSE2;
  360|       |  }
  361|       |#endif
  362|       |
  363|     36|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (363:7): [True: 0, False: 36]
  ------------------
  364|      0|    src_stride = 0;
  365|      0|  }
  366|    459|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (366:15): [True: 423, False: 36]
  ------------------
  367|    423|    ScaleRowDown4(src_ptr, src_stride, dst_ptr, dst_width);
  368|    423|    src_ptr += row_stride;
  369|    423|    dst_ptr += dst_stride;
  370|    423|  }
  371|     36|}
scale.cc:_ZN6libyuvL16ScalePlaneBox_16EiiiiiiPKtPt:
  996|  2.09k|                            uint16_t* dst_ptr) {
  997|  2.09k|  int j, k;
  998|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
  999|  2.09k|  int x = 0;
 1000|  2.09k|  int y = 0;
 1001|  2.09k|  int dx = 0;
 1002|  2.09k|  int dy = 0;
 1003|  2.09k|  const int max_y = (src_height << 16);
 1004|  2.09k|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterBox, &x, &y,
 1005|  2.09k|             &dx, &dy);
 1006|  2.09k|  src_width = Abs(src_width);
 1007|  2.09k|  {
 1008|       |    // Allocate a row buffer of uint32_t.
 1009|  2.09k|    align_buffer_64(row32, src_width * 4);
  ------------------
  |  | 1002|  2.09k|  void* var##_mem = malloc((size) + 63);                      /* NOLINT */ \
  |  | 1003|  2.09k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1010|  2.09k|    if (!row32)
  ------------------
  |  Branch (1010:9): [True: 0, False: 2.09k]
  ------------------
 1011|      0|      return 1;
 1012|  2.09k|    void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx,
 1013|  2.09k|                         const uint32_t* src_ptr, uint16_t* dst_ptr) =
 1014|  2.09k|        (dx & 0xffff) ? ScaleAddCols2_16_C : ScaleAddCols1_16_C;
  ------------------
  |  Branch (1014:9): [True: 862, False: 1.23k]
  ------------------
 1015|  2.09k|    void (*ScaleAddRow)(const uint16_t* src_ptr, uint32_t* dst_ptr,
 1016|  2.09k|                        int src_width) = ScaleAddRow_16_C;
 1017|       |
 1018|       |#if defined(HAS_SCALEADDROW_16_SSE2)
 1019|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(src_width, 16)) {
 1020|       |      ScaleAddRow = ScaleAddRow_16_SSE2;
 1021|       |    }
 1022|       |#endif
 1023|       |
 1024|  69.3k|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1024:17): [True: 67.2k, False: 2.09k]
  ------------------
 1025|  67.2k|      int boxheight;
 1026|  67.2k|      int iy = y >> 16;
 1027|  67.2k|      const uint16_t* src = src_ptr + iy * (int64_t)src_stride;
 1028|  67.2k|      y += dy;
 1029|  67.2k|      if (y > max_y) {
  ------------------
  |  Branch (1029:11): [True: 0, False: 67.2k]
  ------------------
 1030|      0|        y = max_y;
 1031|      0|      }
 1032|  67.2k|      boxheight = MIN1((y >> 16) - iy);
  ------------------
  |  |  778|  67.2k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 67.2k]
  |  |  ------------------
  ------------------
 1033|  67.2k|      memset(row32, 0, src_width * 4);
 1034|  1.17M|      for (k = 0; k < boxheight; ++k) {
  ------------------
  |  Branch (1034:19): [True: 1.10M, False: 67.2k]
  ------------------
 1035|  1.10M|        ScaleAddRow(src, (uint32_t*)(row32), src_width);
 1036|  1.10M|        src += src_stride;
 1037|  1.10M|      }
 1038|  67.2k|      ScaleAddCols(dst_width, boxheight, x, dx, (uint32_t*)(row32), dst_ptr);
 1039|  67.2k|      dst_ptr += dst_stride;
 1040|  67.2k|    }
 1041|  2.09k|    free_aligned_buffer_64(row32);
  ------------------
  |  | 1006|  2.09k|  free(var##_mem);                  \
  |  | 1007|  2.09k|  var = NULL
  ------------------
 1042|  2.09k|  }
 1043|      0|  return 0;
 1044|  2.09k|}
scale.cc:_ZN6libyuvL18ScaleAddCols2_16_CEiiiiPKjPt:
  829|  45.3k|                               uint16_t* dst_ptr) {
  830|  45.3k|  int i;
  831|  45.3k|  int scaletbl[2];
  832|  45.3k|  int minboxwidth = dx >> 16;
  833|  45.3k|  int boxwidth;
  834|  45.3k|  scaletbl[0] = 65536 / (MIN1(minboxwidth) * boxheight);
  ------------------
  |  |  778|  45.3k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 45.3k]
  |  |  ------------------
  ------------------
  835|  45.3k|  scaletbl[1] = 65536 / (MIN1(minboxwidth + 1) * boxheight);
  ------------------
  |  |  778|  45.3k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 45.3k]
  |  |  ------------------
  ------------------
  836|  1.53M|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (836:15): [True: 1.48M, False: 45.3k]
  ------------------
  837|  1.48M|    int ix = x >> 16;
  838|  1.48M|    x += dx;
  839|  1.48M|    boxwidth = MIN1((x >> 16) - ix);
  ------------------
  |  |  778|  1.48M|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 1.48M]
  |  |  ------------------
  ------------------
  840|  1.48M|    int scaletbl_index = boxwidth - minboxwidth;
  841|       |    assert((scaletbl_index == 0) || (scaletbl_index == 1));
  842|  1.48M|    *dst_ptr++ =
  843|  1.48M|        SumPixels_16(boxwidth, src_ptr + ix) * scaletbl[scaletbl_index] >> 16;
  844|  1.48M|  }
  845|  45.3k|}
scale.cc:_ZN6libyuvL12SumPixels_16EiPKj:
  790|  2.06M|static __inline uint32_t SumPixels_16(int iboxwidth, const uint32_t* src_ptr) {
  791|  2.06M|  uint32_t sum = 0u;
  792|  2.06M|  int x;
  793|  2.06M|  assert(iboxwidth > 0);
  794|  30.7M|  for (x = 0; x < iboxwidth; ++x) {
  ------------------
  |  Branch (794:15): [True: 28.6M, False: 2.06M]
  ------------------
  795|  28.6M|    sum += src_ptr[x];
  796|  28.6M|  }
  797|  2.06M|  return sum;
  798|  2.06M|}
scale.cc:_ZN6libyuvL18ScaleAddCols1_16_CEiiiiPKjPt:
  883|  21.9k|                               uint16_t* dst_ptr) {
  884|  21.9k|  int boxwidth = MIN1(dx >> 16);
  ------------------
  |  |  778|  21.9k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (778:18): [True: 0, False: 21.9k]
  |  |  ------------------
  ------------------
  885|  21.9k|  int scaleval = 65536 / (boxwidth * boxheight);
  886|  21.9k|  int i;
  887|   598k|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (887:15): [True: 576k, False: 21.9k]
  ------------------
  888|   576k|    *dst_ptr++ = SumPixels_16(boxwidth, src_ptr + x) * scaleval >> 16;
  889|   576k|    x += boxwidth;
  890|   576k|  }
  891|  21.9k|}
scale.cc:_ZN6libyuvL23ScalePlaneBilinearUp_16EiiiiiiPKtPtNS_10FilterModeE:
 1764|  3.49k|                                   enum FilterMode filtering) {
 1765|  3.49k|  int j;
 1766|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1767|  3.49k|  int x = 0;
 1768|  3.49k|  int y = 0;
 1769|  3.49k|  int dx = 0;
 1770|  3.49k|  int dy = 0;
 1771|  3.49k|  const int max_y = (src_height - 1) << 16;
 1772|  3.49k|  void (*InterpolateRow)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1773|  3.49k|                         ptrdiff_t src_stride, int dst_width,
 1774|  3.49k|                         int source_y_fraction) = InterpolateRow_16_C;
 1775|  3.49k|  void (*ScaleFilterCols)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1776|  3.49k|                          int dst_width, int x, int dx) =
 1777|  3.49k|      filtering ? ScaleFilterCols_16_C : ScaleCols_16_C;
  ------------------
  |  Branch (1777:7): [True: 3.49k, False: 0]
  ------------------
 1778|  3.49k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1779|  3.49k|             &dx, &dy);
 1780|  3.49k|  src_width = Abs(src_width);
 1781|       |
 1782|       |#if defined(HAS_INTERPOLATEROW_16_SSE2)
 1783|       |  if (TestCpuFlag(kCpuHasSSE2)) {
 1784|       |    InterpolateRow = InterpolateRow_16_Any_SSE2;
 1785|       |    if (IS_ALIGNED(dst_width, 16)) {
 1786|       |      InterpolateRow = InterpolateRow_16_SSE2;
 1787|       |    }
 1788|       |  }
 1789|       |#endif
 1790|       |#if defined(HAS_INTERPOLATEROW_16_SSSE3)
 1791|       |  if (TestCpuFlag(kCpuHasSSSE3)) {
 1792|       |    InterpolateRow = InterpolateRow_16_Any_SSSE3;
 1793|       |    if (IS_ALIGNED(dst_width, 16)) {
 1794|       |      InterpolateRow = InterpolateRow_16_SSSE3;
 1795|       |    }
 1796|       |  }
 1797|       |#endif
 1798|       |#if defined(HAS_INTERPOLATEROW_16_AVX2)
 1799|       |  if (TestCpuFlag(kCpuHasAVX2)) {
 1800|       |    InterpolateRow = InterpolateRow_16_Any_AVX2;
 1801|       |    if (IS_ALIGNED(dst_width, 32)) {
 1802|       |      InterpolateRow = InterpolateRow_16_AVX2;
 1803|       |    }
 1804|       |  }
 1805|       |#endif
 1806|       |#if defined(HAS_INTERPOLATEROW_16_NEON)
 1807|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1808|       |    InterpolateRow = InterpolateRow_16_Any_NEON;
 1809|       |    if (IS_ALIGNED(dst_width, 16)) {
 1810|       |      InterpolateRow = InterpolateRow_16_NEON;
 1811|       |    }
 1812|       |  }
 1813|       |#endif
 1814|       |#if defined(HAS_INTERPOLATEROW_16_SME)
 1815|       |  if (TestCpuFlag(kCpuHasSME)) {
 1816|       |    InterpolateRow = InterpolateRow_16_SME;
 1817|       |  }
 1818|       |#endif
 1819|       |
 1820|  3.49k|  if (filtering && src_width >= 32768) {
  ------------------
  |  Branch (1820:7): [True: 3.49k, False: 0]
  |  Branch (1820:20): [True: 0, False: 3.49k]
  ------------------
 1821|      0|    ScaleFilterCols = ScaleFilterCols64_16_C;
 1822|      0|  }
 1823|       |#if defined(HAS_SCALEFILTERCOLS_16_SSSE3)
 1824|       |  if (filtering && TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
 1825|       |    ScaleFilterCols = ScaleFilterCols_16_SSSE3;
 1826|       |  }
 1827|       |#endif
 1828|  3.49k|  if (!filtering && src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1828:7): [True: 0, False: 3.49k]
  |  Branch (1828:21): [True: 0, False: 0]
  |  Branch (1828:51): [True: 0, False: 0]
  ------------------
 1829|      0|    ScaleFilterCols = ScaleColsUp2_16_C;
 1830|       |#if defined(HAS_SCALECOLS_16_SSE2)
 1831|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1832|       |      ScaleFilterCols = ScaleColsUp2_16_SSE2;
 1833|       |    }
 1834|       |#endif
 1835|      0|  }
 1836|  3.49k|  if (y > max_y) {
  ------------------
  |  Branch (1836:7): [True: 400, False: 3.09k]
  ------------------
 1837|    400|    y = max_y;
 1838|    400|  }
 1839|  3.49k|  {
 1840|  3.49k|    int yi = y >> 16;
 1841|  3.49k|    const uint16_t* src = src_ptr + yi * (int64_t)src_stride;
 1842|       |
 1843|       |    // Allocate 2 row buffers.
 1844|  3.49k|    const int row_size = (dst_width + 31) & ~31;
 1845|  3.49k|    align_buffer_64(row, row_size * 4);
  ------------------
  |  | 1002|  3.49k|  void* var##_mem = malloc((size) + 63);                      /* NOLINT */ \
  |  | 1003|  3.49k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1846|  3.49k|    int rowstride = row_size;
 1847|  3.49k|    int lasty = yi;
 1848|  3.49k|    uint16_t* rowptr = (uint16_t*)row;
 1849|  3.49k|    if (!row)
  ------------------
  |  Branch (1849:9): [True: 0, False: 3.49k]
  ------------------
 1850|      0|      return 1;
 1851|       |
 1852|  3.49k|    ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1853|  3.49k|    if (src_height > 1) {
  ------------------
  |  Branch (1853:9): [True: 3.09k, False: 400]
  ------------------
 1854|  3.09k|      src += src_stride;
 1855|  3.09k|    }
 1856|  3.49k|    ScaleFilterCols(rowptr + rowstride, src, dst_width, x, dx);
 1857|  3.49k|    if (src_height > 2) {
  ------------------
  |  Branch (1857:9): [True: 2.24k, False: 1.25k]
  ------------------
 1858|  2.24k|      src += src_stride;
 1859|  2.24k|    }
 1860|       |
 1861|  4.79M|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1861:17): [True: 4.79M, False: 3.49k]
  ------------------
 1862|  4.79M|      yi = y >> 16;
 1863|  4.79M|      if (yi != lasty) {
  ------------------
  |  Branch (1863:11): [True: 200k, False: 4.59M]
  ------------------
 1864|   200k|        if (y > max_y) {
  ------------------
  |  Branch (1864:13): [True: 0, False: 200k]
  ------------------
 1865|      0|          y = max_y;
 1866|      0|          yi = y >> 16;
 1867|      0|          src = src_ptr + yi * (int64_t)src_stride;
 1868|      0|        }
 1869|   200k|        if (yi != lasty) {
  ------------------
  |  Branch (1869:13): [True: 200k, False: 0]
  ------------------
 1870|   200k|          ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1871|   200k|          rowptr += rowstride;
 1872|   200k|          rowstride = -rowstride;
 1873|   200k|          lasty = yi;
 1874|   200k|          if ((y + 65536) < max_y) {
  ------------------
  |  Branch (1874:15): [True: 198k, False: 2.24k]
  ------------------
 1875|   198k|            src += src_stride;
 1876|   198k|          }
 1877|   200k|        }
 1878|   200k|      }
 1879|  4.79M|      if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1879:11): [True: 257k, False: 4.53M]
  ------------------
 1880|   257k|        InterpolateRow(dst_ptr, rowptr, 0, dst_width, 0);
 1881|  4.53M|      } else {
 1882|  4.53M|        int yf = (y >> 8) & 255;
 1883|  4.53M|        InterpolateRow(dst_ptr, rowptr, rowstride, dst_width, yf);
 1884|  4.53M|      }
 1885|  4.79M|      dst_ptr += dst_stride;
 1886|  4.79M|      y += dy;
 1887|  4.79M|    }
 1888|  3.49k|    free_aligned_buffer_64(row);
  ------------------
  |  | 1006|  3.49k|  free(var##_mem);                  \
  |  | 1007|  3.49k|  var = NULL
  ------------------
 1889|  3.49k|  }
 1890|      0|  return 0;
 1891|  3.49k|}
scale.cc:_ZN6libyuvL25ScalePlaneBilinearDown_16EiiiiiiPKtPtNS_10FilterModeE:
 1175|  3.88k|                                     enum FilterMode filtering) {
 1176|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1177|  3.88k|  int x = 0;
 1178|  3.88k|  int y = 0;
 1179|  3.88k|  int dx = 0;
 1180|  3.88k|  int dy = 0;
 1181|       |  // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear.
 1182|       |  // Allocate a row buffer.
 1183|  3.88k|  align_buffer_64(row, src_width * 2);
  ------------------
  |  | 1002|  3.88k|  void* var##_mem = malloc((size) + 63);                      /* NOLINT */ \
  |  | 1003|  3.88k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1184|  3.88k|  if (!row)
  ------------------
  |  Branch (1184:7): [True: 0, False: 3.88k]
  ------------------
 1185|      0|    return 1;
 1186|       |
 1187|  3.88k|  const int max_y = (src_height - 1) << 16;
 1188|  3.88k|  int j;
 1189|  3.88k|  void (*ScaleFilterCols)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1190|  3.88k|                          int dst_width, int x, int dx) =
 1191|  3.88k|      (src_width >= 32768) ? ScaleFilterCols64_16_C : ScaleFilterCols_16_C;
  ------------------
  |  Branch (1191:7): [True: 0, False: 3.88k]
  ------------------
 1192|  3.88k|  void (*InterpolateRow)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1193|  3.88k|                         ptrdiff_t src_stride, int dst_width,
 1194|  3.88k|                         int source_y_fraction) = InterpolateRow_16_C;
 1195|  3.88k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1196|  3.88k|             &dx, &dy);
 1197|  3.88k|  src_width = Abs(src_width);
 1198|       |
 1199|       |#if defined(HAS_INTERPOLATEROW_16_SSE2)
 1200|       |  if (TestCpuFlag(kCpuHasSSE2)) {
 1201|       |    InterpolateRow = InterpolateRow_16_Any_SSE2;
 1202|       |    if (IS_ALIGNED(src_width, 16)) {
 1203|       |      InterpolateRow = InterpolateRow_16_SSE2;
 1204|       |    }
 1205|       |  }
 1206|       |#endif
 1207|       |#if defined(HAS_INTERPOLATEROW_16_SSSE3)
 1208|       |  if (TestCpuFlag(kCpuHasSSSE3)) {
 1209|       |    InterpolateRow = InterpolateRow_16_Any_SSSE3;
 1210|       |    if (IS_ALIGNED(src_width, 16)) {
 1211|       |      InterpolateRow = InterpolateRow_16_SSSE3;
 1212|       |    }
 1213|       |  }
 1214|       |#endif
 1215|       |#if defined(HAS_INTERPOLATEROW_16_AVX2)
 1216|       |  if (TestCpuFlag(kCpuHasAVX2)) {
 1217|       |    InterpolateRow = InterpolateRow_16_Any_AVX2;
 1218|       |    if (IS_ALIGNED(src_width, 32)) {
 1219|       |      InterpolateRow = InterpolateRow_16_AVX2;
 1220|       |    }
 1221|       |  }
 1222|       |#endif
 1223|       |#if defined(HAS_INTERPOLATEROW_16_NEON)
 1224|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1225|       |    InterpolateRow = InterpolateRow_16_Any_NEON;
 1226|       |    if (IS_ALIGNED(src_width, 16)) {
 1227|       |      InterpolateRow = InterpolateRow_16_NEON;
 1228|       |    }
 1229|       |  }
 1230|       |#endif
 1231|       |#if defined(HAS_INTERPOLATEROW_16_SME)
 1232|       |  if (TestCpuFlag(kCpuHasSME)) {
 1233|       |    InterpolateRow = InterpolateRow_16_SME;
 1234|       |  }
 1235|       |#endif
 1236|       |
 1237|       |#if defined(HAS_SCALEFILTERCOLS_16_SSSE3)
 1238|       |  if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
 1239|       |    ScaleFilterCols = ScaleFilterCols_16_SSSE3;
 1240|       |  }
 1241|       |#endif
 1242|  3.88k|  if (y > max_y) {
  ------------------
  |  Branch (1242:7): [True: 27, False: 3.85k]
  ------------------
 1243|     27|    y = max_y;
 1244|     27|  }
 1245|       |
 1246|   309k|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1246:15): [True: 305k, False: 3.88k]
  ------------------
 1247|   305k|    int yi = y >> 16;
 1248|   305k|    const uint16_t* src = src_ptr + yi * (int64_t)src_stride;
 1249|   305k|    if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1249:9): [True: 131k, False: 173k]
  ------------------
 1250|   131k|      ScaleFilterCols(dst_ptr, src, dst_width, x, dx);
 1251|   173k|    } else {
 1252|   173k|      int yf = (y >> 8) & 255;
 1253|   173k|      InterpolateRow((uint16_t*)row, src, src_stride, src_width, yf);
 1254|   173k|      ScaleFilterCols(dst_ptr, (uint16_t*)row, dst_width, x, dx);
 1255|   173k|    }
 1256|   305k|    dst_ptr += dst_stride;
 1257|   305k|    y += dy;
 1258|   305k|    if (y > max_y) {
  ------------------
  |  Branch (1258:9): [True: 4.38k, False: 301k]
  ------------------
 1259|  4.38k|      y = max_y;
 1260|  4.38k|    }
 1261|   305k|  }
 1262|       |  free_aligned_buffer_64(row);
  ------------------
  |  | 1006|  3.88k|  free(var##_mem);                  \
  |  | 1007|  3.88k|  var = NULL
  ------------------
 1263|  3.88k|  return 0;
 1264|  3.88k|}
scale.cc:_ZN6libyuvL19ScalePlaneSimple_16EiiiiiiPKtPt:
 1942|    669|                                uint16_t* dst_ptr) {
 1943|    669|  int i;
 1944|    669|  void (*ScaleCols)(uint16_t* dst_ptr, const uint16_t* src_ptr, int dst_width,
 1945|    669|                    int x, int dx) = ScaleCols_16_C;
 1946|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1947|    669|  int x = 0;
 1948|    669|  int y = 0;
 1949|    669|  int dx = 0;
 1950|    669|  int dy = 0;
 1951|    669|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterNone, &x, &y,
 1952|    669|             &dx, &dy);
 1953|    669|  src_width = Abs(src_width);
 1954|       |
 1955|    669|  if (src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1955:7): [True: 59, False: 610]
  |  Branch (1955:37): [True: 59, False: 0]
  ------------------
 1956|     59|    ScaleCols = ScaleColsUp2_16_C;
 1957|       |#if defined(HAS_SCALECOLS_16_SSE2)
 1958|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1959|       |      ScaleCols = ScaleColsUp2_16_SSE2;
 1960|       |    }
 1961|       |#endif
 1962|     59|  }
 1963|       |
 1964|  1.28M|  for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1964:15): [True: 1.28M, False: 669]
  ------------------
 1965|  1.28M|    ScaleCols(dst_ptr, src_ptr + (y >> 16) * (int64_t)src_stride, dst_width, x,
 1966|  1.28M|              dx);
 1967|  1.28M|    dst_ptr += dst_stride;
 1968|  1.28M|    y += dy;
 1969|  1.28M|  }
 1970|    669|}
scale.cc:_ZN6libyuvL23ScalePlaneUp2_12_LinearEiiiiiiPKtPt:
 1562|     99|                                    uint16_t* dst_ptr) {
 1563|     99|  void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr,
 1564|     99|                     int dst_width) = ScaleRowUp2_Linear_16_Any_C;
 1565|     99|  int i;
 1566|     99|  int y;
 1567|     99|  int dy;
 1568|       |
 1569|     99|  (void)src_width;
 1570|       |  // This function can only scale up by 2 times horizontally.
 1571|     99|  assert(src_width == ((dst_width + 1) / 2));
 1572|       |
 1573|     99|#ifdef HAS_SCALEROWUP2_LINEAR_12_SSSE3
 1574|     99|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1574:7): [True: 99, False: 0]
  ------------------
 1575|     99|    ScaleRowUp = ScaleRowUp2_Linear_12_Any_SSSE3;
 1576|     99|  }
 1577|     99|#endif
 1578|       |
 1579|     99|#ifdef HAS_SCALEROWUP2_LINEAR_12_AVX2
 1580|     99|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1580:7): [True: 99, False: 0]
  ------------------
 1581|     99|    ScaleRowUp = ScaleRowUp2_Linear_12_Any_AVX2;
 1582|     99|  }
 1583|     99|#endif
 1584|       |
 1585|       |#ifdef HAS_SCALEROWUP2_LINEAR_12_NEON
 1586|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1587|       |    ScaleRowUp = ScaleRowUp2_Linear_12_Any_NEON;
 1588|       |  }
 1589|       |#endif
 1590|       |
 1591|     99|  if (dst_height == 1) {
  ------------------
  |  Branch (1591:7): [True: 10, False: 89]
  ------------------
 1592|     10|    ScaleRowUp(src_ptr + ((src_height - 1) / 2) * (int64_t)src_stride, dst_ptr,
 1593|     10|               dst_width);
 1594|     89|  } else {
 1595|     89|    dy = FixedDiv(src_height - 1, dst_height - 1);
  ------------------
  |  |  265|     89|#define FixedDiv FixedDiv_X86
  ------------------
 1596|     89|    y = (1 << 15) - 1;
 1597|   147k|    for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1597:17): [True: 147k, False: 89]
  ------------------
 1598|   147k|      ScaleRowUp(src_ptr + (y >> 16) * (int64_t)src_stride, dst_ptr, dst_width);
 1599|   147k|      dst_ptr += dst_stride;
 1600|   147k|      y += dy;
 1601|   147k|    }
 1602|     89|  }
 1603|     99|}
scale.cc:_ZN6libyuvL25ScalePlaneUp2_12_BilinearEiiiiiiPKtPt:
 1617|     71|                                      uint16_t* dst_ptr) {
 1618|     71|  void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride,
 1619|     71|                      uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
 1620|     71|      ScaleRowUp2_Bilinear_16_Any_C;
 1621|     71|  int x;
 1622|       |
 1623|     71|  (void)src_width;
 1624|       |  // This function can only scale up by 2 times.
 1625|     71|  assert(src_width == ((dst_width + 1) / 2));
 1626|     71|  assert(src_height == ((dst_height + 1) / 2));
 1627|       |
 1628|     71|#ifdef HAS_SCALEROWUP2_BILINEAR_12_SSSE3
 1629|     71|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1629:7): [True: 71, False: 0]
  ------------------
 1630|     71|    Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_SSSE3;
 1631|     71|  }
 1632|     71|#endif
 1633|       |
 1634|     71|#ifdef HAS_SCALEROWUP2_BILINEAR_12_AVX2
 1635|     71|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1635:7): [True: 71, False: 0]
  ------------------
 1636|     71|    Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_AVX2;
 1637|     71|  }
 1638|     71|#endif
 1639|       |
 1640|       |#ifdef HAS_SCALEROWUP2_BILINEAR_12_NEON
 1641|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1642|       |    Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_NEON;
 1643|       |  }
 1644|       |#endif
 1645|       |
 1646|     71|  Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1647|     71|  dst_ptr += dst_stride;
 1648|    832|  for (x = 0; x < src_height - 1; ++x) {
  ------------------
  |  Branch (1648:15): [True: 761, False: 71]
  ------------------
 1649|    761|    Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
 1650|    761|    src_ptr += src_stride;
 1651|    761|    dst_ptr += 2 * dst_stride;
 1652|    761|  }
 1653|     71|  if (!(dst_height & 1)) {
  ------------------
  |  Branch (1653:7): [True: 40, False: 31]
  ------------------
 1654|     40|    Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1655|     40|  }
 1656|     71|}

ScaleRowDown2Box_Any_AVX2:
   27|    117|               int dst_width) {                                                \
   28|    117|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|    117|    int n = dst_width - r;                                                     \
   30|    117|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 50, False: 67]
  ------------------
   31|     50|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|     50|    }                                                                          \
   33|    117|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|    117|                   dst_ptr + n * BPP, r);                                      \
   35|    117|  }
ScaleRowDown4Box_Any_AVX2:
   27|    426|               int dst_width) {                                                \
   28|    426|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|    426|    int n = dst_width - r;                                                     \
   30|    426|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 360, False: 66]
  ------------------
   31|    360|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|    360|    }                                                                          \
   33|    426|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|    426|                   dst_ptr + n * BPP, r);                                      \
   35|    426|  }
ScaleAddRow_Any_AVX2:
  505|   758k|  void NAMEANY(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width) { \
  506|   758k|    int n = src_width & ~MASK;                                             \
  507|   758k|    if (n > 0) {                                                           \
  ------------------
  |  Branch (507:9): [True: 615k, False: 143k]
  ------------------
  508|   615k|      SCALEADDROW_SIMD(src_ptr, dst_ptr, n);                               \
  509|   615k|    }                                                                      \
  510|   758k|    SCALEADDROW_C(src_ptr + n, dst_ptr + n, src_width & MASK);             \
  511|   758k|  }
ScaleRowUp2_Linear_Any_AVX2:
  571|   199k|  void NAME(const PTYPE* src_ptr, PTYPE* dst_ptr, int dst_width) { \
  572|   199k|    int work_width = (dst_width - 1) & ~1;                         \
  573|   199k|    int r = work_width & MASK;                                     \
  574|   199k|    int n = work_width & ~MASK;                                    \
  575|   199k|    dst_ptr[0] = src_ptr[0];                                       \
  576|   199k|    if (work_width > 0) {                                          \
  ------------------
  |  Branch (576:9): [True: 199k, False: 0]
  ------------------
  577|   199k|      if (n != 0) {                                                \
  ------------------
  |  Branch (577:11): [True: 6.88k, False: 192k]
  ------------------
  578|  6.88k|        SIMD(src_ptr, dst_ptr + 1, n);                             \
  579|  6.88k|      }                                                            \
  580|   199k|      C(src_ptr + (n / 2), dst_ptr + n + 1, r);                    \
  581|   199k|    }                                                              \
  582|   199k|    dst_ptr[dst_width - 1] = src_ptr[(dst_width - 1) / 2];         \
  583|   199k|  }
ScaleRowUp2_Linear_12_Any_AVX2:
  571|   147k|  void NAME(const PTYPE* src_ptr, PTYPE* dst_ptr, int dst_width) { \
  572|   147k|    int work_width = (dst_width - 1) & ~1;                         \
  573|   147k|    int r = work_width & MASK;                                     \
  574|   147k|    int n = work_width & ~MASK;                                    \
  575|   147k|    dst_ptr[0] = src_ptr[0];                                       \
  576|   147k|    if (work_width > 0) {                                          \
  ------------------
  |  Branch (576:9): [True: 147k, False: 0]
  ------------------
  577|   147k|      if (n != 0) {                                                \
  ------------------
  |  Branch (577:11): [True: 4.58k, False: 143k]
  ------------------
  578|  4.58k|        SIMD(src_ptr, dst_ptr + 1, n);                             \
  579|  4.58k|      }                                                            \
  580|   147k|      C(src_ptr + (n / 2), dst_ptr + n + 1, r);                    \
  581|   147k|    }                                                              \
  582|   147k|    dst_ptr[dst_width - 1] = src_ptr[(dst_width - 1) / 2];         \
  583|   147k|  }
ScaleRowUp2_Bilinear_Any_AVX2:
  694|    937|            ptrdiff_t dst_stride, int dst_width) {                        \
  695|    937|    int work_width = (dst_width - 1) & ~1;                                \
  696|    937|    int r = work_width & MASK;                                            \
  697|    937|    int n = work_width & ~MASK;                                           \
  698|    937|    const PTYPE* sa = src_ptr;                                            \
  699|    937|    const PTYPE* sb = src_ptr + src_stride;                               \
  700|    937|    PTYPE* da = dst_ptr;                                                  \
  701|    937|    PTYPE* db = dst_ptr + dst_stride;                                     \
  702|    937|    da[0] = (3 * sa[0] + sb[0] + 2) >> 2;                                 \
  703|    937|    db[0] = (sa[0] + 3 * sb[0] + 2) >> 2;                                 \
  704|    937|    if (work_width > 0) {                                                 \
  ------------------
  |  Branch (704:9): [True: 937, False: 0]
  ------------------
  705|    937|      if (n != 0) {                                                       \
  ------------------
  |  Branch (705:11): [True: 487, False: 450]
  ------------------
  706|    487|        SIMD(sa, sb - sa, da + 1, db - da, n);                            \
  707|    487|      }                                                                   \
  708|    937|      C(sa + (n / 2), sb - sa, da + n + 1, db - da, r);                   \
  709|    937|    }                                                                     \
  710|    937|    da[dst_width - 1] =                                                   \
  711|    937|        (3 * sa[(dst_width - 1) / 2] + sb[(dst_width - 1) / 2] + 2) >> 2; \
  712|    937|    db[dst_width - 1] =                                                   \
  713|    937|        (sa[(dst_width - 1) / 2] + 3 * sb[(dst_width - 1) / 2] + 2) >> 2; \
  714|    937|  }
ScaleRowUp2_Bilinear_12_Any_AVX2:
  694|    872|            ptrdiff_t dst_stride, int dst_width) {                        \
  695|    872|    int work_width = (dst_width - 1) & ~1;                                \
  696|    872|    int r = work_width & MASK;                                            \
  697|    872|    int n = work_width & ~MASK;                                           \
  698|    872|    const PTYPE* sa = src_ptr;                                            \
  699|    872|    const PTYPE* sb = src_ptr + src_stride;                               \
  700|    872|    PTYPE* da = dst_ptr;                                                  \
  701|    872|    PTYPE* db = dst_ptr + dst_stride;                                     \
  702|    872|    da[0] = (3 * sa[0] + sb[0] + 2) >> 2;                                 \
  703|    872|    db[0] = (sa[0] + 3 * sb[0] + 2) >> 2;                                 \
  704|    872|    if (work_width > 0) {                                                 \
  ------------------
  |  Branch (704:9): [True: 872, False: 0]
  ------------------
  705|    872|      if (n != 0) {                                                       \
  ------------------
  |  Branch (705:11): [True: 737, False: 135]
  ------------------
  706|    737|        SIMD(sa, sb - sa, da + 1, db - da, n);                            \
  707|    737|      }                                                                   \
  708|    872|      C(sa + (n / 2), sb - sa, da + n + 1, db - da, r);                   \
  709|    872|    }                                                                     \
  710|    872|    da[dst_width - 1] =                                                   \
  711|    872|        (3 * sa[(dst_width - 1) / 2] + sb[(dst_width - 1) / 2] + 2) >> 2; \
  712|    872|    db[dst_width - 1] =                                                   \
  713|    872|        (sa[(dst_width - 1) / 2] + 3 * sb[(dst_width - 1) / 2] + 2) >> 2; \
  714|    872|  }

ScaleRowDown2Box_C:
  213|    117|                        int dst_width) {
  214|    117|  const uint8_t* s = src_ptr;
  215|    117|  const uint8_t* t = src_ptr + src_stride;
  216|    117|  int x;
  217|    631|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (217:15): [True: 514, False: 117]
  ------------------
  218|    514|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  219|    514|    dst[1] = (s[2] + s[3] + t[2] + t[3] + 2) >> 2;
  220|    514|    dst += 2;
  221|    514|    s += 4;
  222|    514|    t += 4;
  223|    514|  }
  224|    117|  if (dst_width & 1) {
  ------------------
  |  Branch (224:7): [True: 22, False: 95]
  ------------------
  225|     22|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  226|     22|  }
  227|    117|}
ScaleRowDown2Box_16_C:
  256|    336|                           int dst_width) {
  257|    336|  const uint16_t* s = src_ptr;
  258|    336|  const uint16_t* t = src_ptr + src_stride;
  259|    336|  int x;
  260|  6.67k|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (260:15): [True: 6.34k, False: 336]
  ------------------
  261|  6.34k|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  262|  6.34k|    dst[1] = (s[2] + s[3] + t[2] + t[3] + 2) >> 2;
  263|  6.34k|    dst += 2;
  264|  6.34k|    s += 4;
  265|  6.34k|    t += 4;
  266|  6.34k|  }
  267|    336|  if (dst_width & 1) {
  ------------------
  |  Branch (267:7): [True: 41, False: 295]
  ------------------
  268|     41|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  269|     41|  }
  270|    336|}
ScaleRowDown4Box_C:
  364|    426|                        int dst_width) {
  365|    426|  intptr_t stride = src_stride;
  366|    426|  int x;
  367|  1.59k|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (367:15): [True: 1.17k, False: 426]
  ------------------
  368|  1.17k|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  369|  1.17k|              src_ptr[stride + 0] + src_ptr[stride + 1] + src_ptr[stride + 2] +
  370|  1.17k|              src_ptr[stride + 3] + src_ptr[stride * 2 + 0] +
  371|  1.17k|              src_ptr[stride * 2 + 1] + src_ptr[stride * 2 + 2] +
  372|  1.17k|              src_ptr[stride * 2 + 3] + src_ptr[stride * 3 + 0] +
  373|  1.17k|              src_ptr[stride * 3 + 1] + src_ptr[stride * 3 + 2] +
  374|  1.17k|              src_ptr[stride * 3 + 3] + 8) >>
  375|  1.17k|             4;
  376|  1.17k|    dst[1] = (src_ptr[4] + src_ptr[5] + src_ptr[6] + src_ptr[7] +
  377|  1.17k|              src_ptr[stride + 4] + src_ptr[stride + 5] + src_ptr[stride + 6] +
  378|  1.17k|              src_ptr[stride + 7] + src_ptr[stride * 2 + 4] +
  379|  1.17k|              src_ptr[stride * 2 + 5] + src_ptr[stride * 2 + 6] +
  380|  1.17k|              src_ptr[stride * 2 + 7] + src_ptr[stride * 3 + 4] +
  381|  1.17k|              src_ptr[stride * 3 + 5] + src_ptr[stride * 3 + 6] +
  382|  1.17k|              src_ptr[stride * 3 + 7] + 8) >>
  383|  1.17k|             4;
  384|  1.17k|    dst += 2;
  385|  1.17k|    src_ptr += 8;
  386|  1.17k|  }
  387|    426|  if (dst_width & 1) {
  ------------------
  |  Branch (387:7): [True: 18, False: 408]
  ------------------
  388|     18|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  389|     18|              src_ptr[stride + 0] + src_ptr[stride + 1] + src_ptr[stride + 2] +
  390|     18|              src_ptr[stride + 3] + src_ptr[stride * 2 + 0] +
  391|     18|              src_ptr[stride * 2 + 1] + src_ptr[stride * 2 + 2] +
  392|     18|              src_ptr[stride * 2 + 3] + src_ptr[stride * 3 + 0] +
  393|     18|              src_ptr[stride * 3 + 1] + src_ptr[stride * 3 + 2] +
  394|     18|              src_ptr[stride * 3 + 3] + 8) >>
  395|     18|             4;
  396|     18|  }
  397|    426|}
ScaleRowDown4Box_16_C:
  402|    423|                           int dst_width) {
  403|    423|  intptr_t stride = src_stride;
  404|    423|  int x;
  405|  7.34k|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (405:15): [True: 6.92k, False: 423]
  ------------------
  406|  6.92k|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  407|  6.92k|              src_ptr[stride + 0] + src_ptr[stride + 1] + src_ptr[stride + 2] +
  408|  6.92k|              src_ptr[stride + 3] + src_ptr[stride * 2 + 0] +
  409|  6.92k|              src_ptr[stride * 2 + 1] + src_ptr[stride * 2 + 2] +
  410|  6.92k|              src_ptr[stride * 2 + 3] + src_ptr[stride * 3 + 0] +
  411|  6.92k|              src_ptr[stride * 3 + 1] + src_ptr[stride * 3 + 2] +
  412|  6.92k|              src_ptr[stride * 3 + 3] + 8) >>
  413|  6.92k|             4;
  414|  6.92k|    dst[1] = (src_ptr[4] + src_ptr[5] + src_ptr[6] + src_ptr[7] +
  415|  6.92k|              src_ptr[stride + 4] + src_ptr[stride + 5] + src_ptr[stride + 6] +
  416|  6.92k|              src_ptr[stride + 7] + src_ptr[stride * 2 + 4] +
  417|  6.92k|              src_ptr[stride * 2 + 5] + src_ptr[stride * 2 + 6] +
  418|  6.92k|              src_ptr[stride * 2 + 7] + src_ptr[stride * 3 + 4] +
  419|  6.92k|              src_ptr[stride * 3 + 5] + src_ptr[stride * 3 + 6] +
  420|  6.92k|              src_ptr[stride * 3 + 7] + 8) >>
  421|  6.92k|             4;
  422|  6.92k|    dst += 2;
  423|  6.92k|    src_ptr += 8;
  424|  6.92k|  }
  425|    423|  if (dst_width & 1) {
  ------------------
  |  Branch (425:7): [True: 15, False: 408]
  ------------------
  426|     15|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  427|     15|              src_ptr[stride + 0] + src_ptr[stride + 1] + src_ptr[stride + 2] +
  428|     15|              src_ptr[stride + 3] + src_ptr[stride * 2 + 0] +
  429|     15|              src_ptr[stride * 2 + 1] + src_ptr[stride * 2 + 2] +
  430|     15|              src_ptr[stride * 2 + 3] + src_ptr[stride * 3 + 0] +
  431|     15|              src_ptr[stride * 3 + 1] + src_ptr[stride * 3 + 2] +
  432|     15|              src_ptr[stride * 3 + 3] + 8) >>
  433|     15|             4;
  434|     15|  }
  435|    423|}
ScaleRowUp2_Linear_C:
  574|   199k|                          int dst_width) {
  575|   199k|  int src_width = dst_width >> 1;
  576|   199k|  int x;
  577|   199k|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  578|   994k|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (578:15): [True: 795k, False: 199k]
  ------------------
  579|   795k|    dst_ptr[2 * x + 0] = (src_ptr[x + 0] * 3 + src_ptr[x + 1] * 1 + 2) >> 2;
  580|   795k|    dst_ptr[2 * x + 1] = (src_ptr[x + 0] * 1 + src_ptr[x + 1] * 3 + 2) >> 2;
  581|   795k|  }
  582|   199k|}
ScaleRowUp2_Bilinear_C:
  598|    937|                            int dst_width) {
  599|    937|  const uint8_t* s = src_ptr;
  600|    937|  const uint8_t* t = src_ptr + src_stride;
  601|    937|  uint8_t* d = dst_ptr;
  602|    937|  uint8_t* e = dst_ptr + dst_stride;
  603|    937|  int src_width = dst_width >> 1;
  604|    937|  int x;
  605|    937|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  606|  7.38k|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (606:15): [True: 6.44k, False: 937]
  ------------------
  607|  6.44k|    d[2 * x + 0] =
  608|  6.44k|        (s[x + 0] * 9 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 1 + 8) >> 4;
  609|  6.44k|    d[2 * x + 1] =
  610|  6.44k|        (s[x + 0] * 3 + s[x + 1] * 9 + t[x + 0] * 1 + t[x + 1] * 3 + 8) >> 4;
  611|  6.44k|    e[2 * x + 0] =
  612|  6.44k|        (s[x + 0] * 3 + s[x + 1] * 1 + t[x + 0] * 9 + t[x + 1] * 3 + 8) >> 4;
  613|  6.44k|    e[2 * x + 1] =
  614|  6.44k|        (s[x + 0] * 1 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 9 + 8) >> 4;
  615|  6.44k|  }
  616|    937|}
ScaleRowUp2_Linear_16_C:
  621|   147k|                             int dst_width) {
  622|   147k|  int src_width = dst_width >> 1;
  623|   147k|  int x;
  624|   147k|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  625|   776k|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (625:15): [True: 629k, False: 147k]
  ------------------
  626|   629k|    dst_ptr[2 * x + 0] = (src_ptr[x + 0] * 3 + src_ptr[x + 1] * 1 + 2) >> 2;
  627|   629k|    dst_ptr[2 * x + 1] = (src_ptr[x + 0] * 1 + src_ptr[x + 1] * 3 + 2) >> 2;
  628|   629k|  }
  629|   147k|}
ScaleRowUp2_Bilinear_16_C:
  636|    872|                               int dst_width) {
  637|    872|  const uint16_t* s = src_ptr;
  638|    872|  const uint16_t* t = src_ptr + src_stride;
  639|    872|  uint16_t* d = dst_ptr;
  640|    872|  uint16_t* e = dst_ptr + dst_stride;
  641|    872|  int src_width = dst_width >> 1;
  642|    872|  int x;
  643|    872|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  644|  3.26k|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (644:15): [True: 2.39k, False: 872]
  ------------------
  645|  2.39k|    d[2 * x + 0] =
  646|  2.39k|        (s[x + 0] * 9 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 1 + 8) >> 4;
  647|  2.39k|    d[2 * x + 1] =
  648|  2.39k|        (s[x + 0] * 3 + s[x + 1] * 9 + t[x + 0] * 1 + t[x + 1] * 3 + 8) >> 4;
  649|  2.39k|    e[2 * x + 0] =
  650|  2.39k|        (s[x + 0] * 3 + s[x + 1] * 1 + t[x + 0] * 9 + t[x + 1] * 3 + 8) >> 4;
  651|  2.39k|    e[2 * x + 1] =
  652|  2.39k|        (s[x + 0] * 1 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 9 + 8) >> 4;
  653|  2.39k|  }
  654|    872|}
ScaleCols_C:
  661|   708k|                 int dx) {
  662|   708k|  int j;
  663|  74.9M|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (663:15): [True: 74.2M, False: 708k]
  ------------------
  664|  74.2M|    dst_ptr[0] = src_ptr[x >> 16];
  665|  74.2M|    x += dx;
  666|  74.2M|    dst_ptr[1] = src_ptr[x >> 16];
  667|  74.2M|    x += dx;
  668|  74.2M|    dst_ptr += 2;
  669|  74.2M|  }
  670|   708k|  if (dst_width & 1) {
  ------------------
  |  Branch (670:7): [True: 577k, False: 131k]
  ------------------
  671|   577k|    dst_ptr[0] = src_ptr[x >> 16];
  672|   577k|  }
  673|   708k|}
ScaleCols_16_C:
  679|  1.00M|                    int dx) {
  680|  1.00M|  int j;
  681|   221M|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (681:15): [True: 220M, False: 1.00M]
  ------------------
  682|   220M|    dst_ptr[0] = src_ptr[x >> 16];
  683|   220M|    x += dx;
  684|   220M|    dst_ptr[1] = src_ptr[x >> 16];
  685|   220M|    x += dx;
  686|   220M|    dst_ptr += 2;
  687|   220M|  }
  688|  1.00M|  if (dst_width & 1) {
  ------------------
  |  Branch (688:7): [True: 681k, False: 324k]
  ------------------
  689|   681k|    dst_ptr[0] = src_ptr[x >> 16];
  690|   681k|  }
  691|  1.00M|}
ScaleColsUp2_C:
  698|   219k|                    int dx) {
  699|   219k|  int j;
  700|   219k|  (void)x;
  701|   219k|  (void)dx;
  702|   438k|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (702:15): [True: 219k, False: 219k]
  ------------------
  703|   219k|    dst_ptr[1] = dst_ptr[0] = src_ptr[0];
  704|   219k|    src_ptr += 1;
  705|   219k|    dst_ptr += 2;
  706|   219k|  }
  707|   219k|  if (dst_width & 1) {
  ------------------
  |  Branch (707:7): [True: 0, False: 219k]
  ------------------
  708|      0|    dst_ptr[0] = src_ptr[0];
  709|      0|  }
  710|   219k|}
ScaleColsUp2_16_C:
  716|   276k|                       int dx) {
  717|   276k|  int j;
  718|   276k|  (void)x;
  719|   276k|  (void)dx;
  720|   552k|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (720:15): [True: 276k, False: 276k]
  ------------------
  721|   276k|    dst_ptr[1] = dst_ptr[0] = src_ptr[0];
  722|   276k|    src_ptr += 1;
  723|   276k|    dst_ptr += 2;
  724|   276k|  }
  725|   276k|  if (dst_width & 1) {
  ------------------
  |  Branch (725:7): [True: 0, False: 276k]
  ------------------
  726|      0|    dst_ptr[0] = src_ptr[0];
  727|      0|  }
  728|   276k|}
ScaleFilterCols_16_C:
  806|   513k|                          int dx) {
  807|   513k|  int j;
  808|  94.8M|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (808:15): [True: 94.2M, False: 513k]
  ------------------
  809|  94.2M|    int xi = x >> 16;
  810|  94.2M|    int a = src_ptr[xi];
  811|  94.2M|    int b = src_ptr[xi + 1];
  812|  94.2M|    dst_ptr[0] = BLENDER(a, b, x & 0xffff);
  ------------------
  |  |  798|  94.2M|  (uint16_t)(            \
  |  |  799|  94.2M|      (int)(a) +         \
  |  |  800|  94.2M|      (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> 16))
  ------------------
  813|  94.2M|    x += dx;
  814|  94.2M|    xi = x >> 16;
  815|  94.2M|    a = src_ptr[xi];
  816|  94.2M|    b = src_ptr[xi + 1];
  817|  94.2M|    dst_ptr[1] = BLENDER(a, b, x & 0xffff);
  ------------------
  |  |  798|  94.2M|  (uint16_t)(            \
  |  |  799|  94.2M|      (int)(a) +         \
  |  |  800|  94.2M|      (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> 16))
  ------------------
  818|  94.2M|    x += dx;
  819|  94.2M|    dst_ptr += 2;
  820|  94.2M|  }
  821|   513k|  if (dst_width & 1) {
  ------------------
  |  Branch (821:7): [True: 106k, False: 406k]
  ------------------
  822|   106k|    int xi = x >> 16;
  823|   106k|    int a = src_ptr[xi];
  824|   106k|    int b = src_ptr[xi + 1];
  825|   106k|    dst_ptr[0] = BLENDER(a, b, x & 0xffff);
  ------------------
  |  |  798|   106k|  (uint16_t)(            \
  |  |  799|   106k|      (int)(a) +         \
  |  |  800|   106k|      (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> 16))
  ------------------
  826|   106k|  }
  827|   513k|}
ScaleRowDown38_3_Box_16_C:
  924|     72|                               int dst_width) {
  925|     72|  intptr_t stride = src_stride;
  926|     72|  int i;
  927|     72|  assert((dst_width % 3 == 0) && (dst_width > 0));
  928|    336|  for (i = 0; i < dst_width; i += 3) {
  ------------------
  |  Branch (928:15): [True: 264, False: 72]
  ------------------
  929|    264|    dst_ptr[0] =
  930|    264|        (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[stride + 0] +
  931|    264|         src_ptr[stride + 1] + src_ptr[stride + 2] + src_ptr[stride * 2 + 0] +
  932|    264|         src_ptr[stride * 2 + 1] + src_ptr[stride * 2 + 2]) *
  933|    264|            (65536u / 9u) >>
  934|    264|        16;
  935|    264|    dst_ptr[1] =
  936|    264|        (src_ptr[3] + src_ptr[4] + src_ptr[5] + src_ptr[stride + 3] +
  937|    264|         src_ptr[stride + 4] + src_ptr[stride + 5] + src_ptr[stride * 2 + 3] +
  938|    264|         src_ptr[stride * 2 + 4] + src_ptr[stride * 2 + 5]) *
  939|    264|            (65536u / 9u) >>
  940|    264|        16;
  941|    264|    dst_ptr[2] =
  942|    264|        (src_ptr[6] + src_ptr[7] + src_ptr[stride + 6] + src_ptr[stride + 7] +
  943|    264|         src_ptr[stride * 2 + 6] + src_ptr[stride * 2 + 7]) *
  944|    264|            (65536u / 6u) >>
  945|    264|        16;
  946|    264|    src_ptr += 8;
  947|    264|    dst_ptr += 3;
  948|    264|  }
  949|     72|}
ScaleRowDown38_2_Box_16_C:
  980|     36|                               int dst_width) {
  981|     36|  intptr_t stride = src_stride;
  982|     36|  int i;
  983|     36|  assert((dst_width % 3 == 0) && (dst_width > 0));
  984|    168|  for (i = 0; i < dst_width; i += 3) {
  ------------------
  |  Branch (984:15): [True: 132, False: 36]
  ------------------
  985|    132|    dst_ptr[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[stride + 0] +
  986|    132|                  src_ptr[stride + 1] + src_ptr[stride + 2]) *
  987|    132|                     (65536u / 6u) >>
  988|    132|                 16;
  989|    132|    dst_ptr[1] = (src_ptr[3] + src_ptr[4] + src_ptr[5] + src_ptr[stride + 3] +
  990|    132|                  src_ptr[stride + 4] + src_ptr[stride + 5]) *
  991|    132|                     (65536u / 6u) >>
  992|    132|                 16;
  993|    132|    dst_ptr[2] =
  994|    132|        (src_ptr[6] + src_ptr[7] + src_ptr[stride + 6] + src_ptr[stride + 7]) *
  995|    132|            (65536u / 4u) >>
  996|    132|        16;
  997|    132|    src_ptr += 8;
  998|    132|    dst_ptr += 3;
  999|    132|  }
 1000|     36|}
ScaleAddRow_C:
 1002|   758k|void ScaleAddRow_C(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width) {
 1003|   758k|  int x;
 1004|   758k|  assert(src_width > 0);
 1005|  8.67M|  for (x = 0; x < src_width - 1; x += 2) {
  ------------------
  |  Branch (1005:15): [True: 7.91M, False: 758k]
  ------------------
 1006|  7.91M|    dst_ptr[0] += src_ptr[0];
 1007|  7.91M|    dst_ptr[1] += src_ptr[1];
 1008|  7.91M|    src_ptr += 2;
 1009|  7.91M|    dst_ptr += 2;
 1010|  7.91M|  }
 1011|   758k|  if (src_width & 1) {
  ------------------
  |  Branch (1011:7): [True: 403k, False: 355k]
  ------------------
 1012|   403k|    dst_ptr[0] += src_ptr[0];
 1013|   403k|  }
 1014|   758k|}
ScaleAddRow_16_C:
 1018|  1.10M|                      int src_width) {
 1019|  1.10M|  int x;
 1020|  1.10M|  assert(src_width > 0);
 1021|   134M|  for (x = 0; x < src_width - 1; x += 2) {
  ------------------
  |  Branch (1021:15): [True: 133M, False: 1.10M]
  ------------------
 1022|   133M|    dst_ptr[0] += src_ptr[0];
 1023|   133M|    dst_ptr[1] += src_ptr[1];
 1024|   133M|    src_ptr += 2;
 1025|   133M|    dst_ptr += 2;
 1026|   133M|  }
 1027|  1.10M|  if (src_width & 1) {
  ------------------
  |  Branch (1027:7): [True: 394k, False: 712k]
  ------------------
 1028|   394k|    dst_ptr[0] += src_ptr[0];
 1029|   394k|  }
 1030|  1.10M|}
ScalePlaneVertical:
 1628|  1.17k|                        enum FilterMode filtering) {
 1629|       |  // TODO(fbarchard): Allow higher bpp.
 1630|  1.17k|  int dst_width_bytes = dst_width * bpp;
 1631|  1.17k|  void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb,
 1632|  1.17k|                         ptrdiff_t src_stride, int dst_width,
 1633|  1.17k|                         int source_y_fraction) = InterpolateRow_C;
 1634|  1.17k|  const int max_y = (src_height > 1) ? ((src_height - 1) << 16) - 1 : 0;
  ------------------
  |  Branch (1634:21): [True: 1.04k, False: 136]
  ------------------
 1635|  1.17k|  int j;
 1636|  1.17k|  assert(bpp >= 1 && bpp <= 4);
 1637|  1.17k|  assert(src_height != 0);
 1638|  1.17k|  assert(dst_width > 0);
 1639|  1.17k|  assert(dst_height > 0);
 1640|  1.17k|  src_argb += (x >> 16) * bpp;
 1641|  1.17k|#if defined(HAS_INTERPOLATEROW_SSSE3)
 1642|  1.17k|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1642:7): [True: 1.17k, False: 0]
  ------------------
 1643|  1.17k|    InterpolateRow = InterpolateRow_Any_SSSE3;
 1644|  1.17k|    if (IS_ALIGNED(dst_width_bytes, 16)) {
  ------------------
  |  |  999|  1.17k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 525, False: 654]
  |  |  ------------------
  ------------------
 1645|    525|      InterpolateRow = InterpolateRow_SSSE3;
 1646|    525|    }
 1647|  1.17k|  }
 1648|  1.17k|#endif
 1649|  1.17k|#if defined(HAS_INTERPOLATEROW_AVX2)
 1650|  1.17k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1650:7): [True: 1.17k, False: 0]
  ------------------
 1651|  1.17k|    InterpolateRow = InterpolateRow_Any_AVX2;
 1652|  1.17k|    if (IS_ALIGNED(dst_width_bytes, 32)) {
  ------------------
  |  |  999|  1.17k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1)))
  |  |  ------------------
  |  |  |  Branch (999:26): [True: 456, False: 723]
  |  |  ------------------
  ------------------
 1653|    456|      InterpolateRow = InterpolateRow_AVX2;
 1654|    456|    }
 1655|  1.17k|  }
 1656|  1.17k|#endif
 1657|       |#if defined(HAS_INTERPOLATEROW_NEON)
 1658|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1659|       |    InterpolateRow = InterpolateRow_Any_NEON;
 1660|       |    if (IS_ALIGNED(dst_width_bytes, 16)) {
 1661|       |      InterpolateRow = InterpolateRow_NEON;
 1662|       |    }
 1663|       |  }
 1664|       |#endif
 1665|       |#if defined(HAS_INTERPOLATEROW_SME)
 1666|       |  if (TestCpuFlag(kCpuHasSME)) {
 1667|       |    InterpolateRow = InterpolateRow_SME;
 1668|       |  }
 1669|       |#endif
 1670|       |#if defined(HAS_INTERPOLATEROW_LSX)
 1671|       |  if (TestCpuFlag(kCpuHasLSX)) {
 1672|       |    InterpolateRow = InterpolateRow_Any_LSX;
 1673|       |    if (IS_ALIGNED(dst_width_bytes, 32)) {
 1674|       |      InterpolateRow = InterpolateRow_LSX;
 1675|       |    }
 1676|       |  }
 1677|       |#endif
 1678|       |#if defined(HAS_INTERPOLATEROW_RVV)
 1679|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1680|       |    InterpolateRow = InterpolateRow_RVV;
 1681|       |  }
 1682|       |#endif
 1683|       |
 1684|  1.73M|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1684:15): [True: 1.73M, False: 1.17k]
  ------------------
 1685|  1.73M|    int yi;
 1686|  1.73M|    int yf;
 1687|  1.73M|    if (y > max_y) {
  ------------------
  |  Branch (1687:9): [True: 0, False: 1.73M]
  ------------------
 1688|      0|      y = max_y;
 1689|      0|    }
 1690|  1.73M|    yi = y >> 16;
 1691|  1.73M|    yf = filtering ? ((y >> 8) & 255) : 0;
  ------------------
  |  Branch (1691:10): [True: 604k, False: 1.13M]
  ------------------
 1692|  1.73M|    InterpolateRow(dst_argb, src_argb + yi * src_stride, src_stride,
 1693|  1.73M|                   dst_width_bytes, yf);
 1694|  1.73M|    dst_argb += dst_stride;
 1695|  1.73M|    y += dy;
 1696|  1.73M|  }
 1697|  1.17k|}
ScalePlaneVertical_16:
 1710|  1.54k|                           enum FilterMode filtering) {
 1711|       |  // TODO(fbarchard): Allow higher wpp.
 1712|  1.54k|  int dst_width_words = dst_width * wpp;
 1713|  1.54k|  void (*InterpolateRow)(uint16_t* dst_argb, const uint16_t* src_argb,
 1714|  1.54k|                         ptrdiff_t src_stride, int dst_width,
 1715|  1.54k|                         int source_y_fraction) = InterpolateRow_16_C;
 1716|  1.54k|  const int max_y = (src_height > 1) ? ((src_height - 1) << 16) - 1 : 0;
  ------------------
  |  Branch (1716:21): [True: 1.49k, False: 50]
  ------------------
 1717|  1.54k|  int j;
 1718|  1.54k|  assert(wpp >= 1 && wpp <= 2);
 1719|  1.54k|  assert(src_height != 0);
 1720|  1.54k|  assert(dst_width > 0);
 1721|  1.54k|  assert(dst_height > 0);
 1722|  1.54k|  src_argb += (x >> 16) * wpp;
 1723|       |#if defined(HAS_INTERPOLATEROW_16_SSE2)
 1724|       |  if (TestCpuFlag(kCpuHasSSE2)) {
 1725|       |    InterpolateRow = InterpolateRow_16_Any_SSE2;
 1726|       |    if (IS_ALIGNED(dst_width_words, 16)) {
 1727|       |      InterpolateRow = InterpolateRow_16_SSE2;
 1728|       |    }
 1729|       |  }
 1730|       |#endif
 1731|       |#if defined(HAS_INTERPOLATEROW_16_SSSE3)
 1732|       |  if (TestCpuFlag(kCpuHasSSSE3)) {
 1733|       |    InterpolateRow = InterpolateRow_16_Any_SSSE3;
 1734|       |    if (IS_ALIGNED(dst_width_words, 16)) {
 1735|       |      InterpolateRow = InterpolateRow_16_SSSE3;
 1736|       |    }
 1737|       |  }
 1738|       |#endif
 1739|       |#if defined(HAS_INTERPOLATEROW_16_AVX2)
 1740|       |  if (TestCpuFlag(kCpuHasAVX2)) {
 1741|       |    InterpolateRow = InterpolateRow_16_Any_AVX2;
 1742|       |    if (IS_ALIGNED(dst_width_words, 32)) {
 1743|       |      InterpolateRow = InterpolateRow_16_AVX2;
 1744|       |    }
 1745|       |  }
 1746|       |#endif
 1747|       |#if defined(HAS_INTERPOLATEROW_16_NEON)
 1748|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1749|       |    InterpolateRow = InterpolateRow_16_Any_NEON;
 1750|       |    if (IS_ALIGNED(dst_width_words, 8)) {
 1751|       |      InterpolateRow = InterpolateRow_16_NEON;
 1752|       |    }
 1753|       |  }
 1754|       |#endif
 1755|       |#if defined(HAS_INTERPOLATEROW_16_SME)
 1756|       |  if (TestCpuFlag(kCpuHasSME)) {
 1757|       |    InterpolateRow = InterpolateRow_16_SME;
 1758|       |  }
 1759|       |#endif
 1760|  1.74M|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1760:15): [True: 1.74M, False: 1.54k]
  ------------------
 1761|  1.74M|    int yi;
 1762|  1.74M|    int yf;
 1763|  1.74M|    if (y > max_y) {
  ------------------
  |  Branch (1763:9): [True: 0, False: 1.74M]
  ------------------
 1764|      0|      y = max_y;
 1765|      0|    }
 1766|  1.74M|    yi = y >> 16;
 1767|  1.74M|    yf = filtering ? ((y >> 8) & 255) : 0;
  ------------------
  |  Branch (1767:10): [True: 1.02M, False: 714k]
  ------------------
 1768|  1.74M|    InterpolateRow(dst_argb, src_argb + yi * src_stride, src_stride,
 1769|  1.74M|                   dst_width_words, yf);
 1770|  1.74M|    dst_argb += dst_stride;
 1771|  1.74M|    y += dy;
 1772|  1.74M|  }
 1773|  1.54k|}
ScaleFilterReduce:
 1849|  32.2k|                                  enum FilterMode filtering) {
 1850|  32.2k|  if (src_width < 0) {
  ------------------
  |  Branch (1850:7): [True: 0, False: 32.2k]
  ------------------
 1851|      0|    src_width = -src_width;
 1852|      0|  }
 1853|  32.2k|  if (src_height < 0) {
  ------------------
  |  Branch (1853:7): [True: 0, False: 32.2k]
  ------------------
 1854|      0|    src_height = -src_height;
 1855|      0|  }
 1856|  32.2k|  if (filtering == kFilterBox) {
  ------------------
  |  Branch (1856:7): [True: 22.6k, False: 9.65k]
  ------------------
 1857|       |    // If scaling either axis to 0.5 or larger, switch from Box to Bilinear.
 1858|  22.6k|    if (dst_width * 2 >= src_width || dst_height * 2 >= src_height) {
  ------------------
  |  Branch (1858:9): [True: 15.2k, False: 7.40k]
  |  Branch (1858:39): [True: 1.98k, False: 5.41k]
  ------------------
 1859|  17.2k|      filtering = kFilterBilinear;
 1860|  17.2k|    }
 1861|  22.6k|  }
 1862|  32.2k|  if (filtering == kFilterBilinear) {
  ------------------
  |  Branch (1862:7): [True: 25.1k, False: 7.18k]
  ------------------
 1863|  25.1k|    if (src_height == 1) {
  ------------------
  |  Branch (1863:9): [True: 2.18k, False: 22.9k]
  ------------------
 1864|  2.18k|      filtering = kFilterLinear;
 1865|  2.18k|    }
 1866|       |    // TODO(fbarchard): Detect any odd scale factor and reduce to Linear.
 1867|  25.1k|    if (dst_height == src_height || dst_height * 3 == src_height) {
  ------------------
  |  Branch (1867:9): [True: 1.38k, False: 23.7k]
  |  Branch (1867:37): [True: 63, False: 23.6k]
  ------------------
 1868|  1.44k|      filtering = kFilterLinear;
 1869|  1.44k|    }
 1870|       |    // TODO(fbarchard): Remove 1 pixel wide filter restriction, which is to
 1871|       |    // avoid reading 2 pixels horizontally that causes memory exception.
 1872|  25.1k|    if (src_width == 1) {
  ------------------
  |  Branch (1872:9): [True: 1.54k, False: 23.5k]
  ------------------
 1873|  1.54k|      filtering = kFilterNone;
 1874|  1.54k|    }
 1875|  25.1k|  }
 1876|  32.2k|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1876:7): [True: 3.68k, False: 28.5k]
  ------------------
 1877|  3.68k|    if (src_width == 1) {
  ------------------
  |  Branch (1877:9): [True: 0, False: 3.68k]
  ------------------
 1878|      0|      filtering = kFilterNone;
 1879|      0|    }
 1880|       |    // TODO(fbarchard): Detect any odd scale factor and reduce to None.
 1881|  3.68k|    if (dst_width == src_width || dst_width * 3 == src_width) {
  ------------------
  |  Branch (1881:9): [True: 140, False: 3.54k]
  |  Branch (1881:35): [True: 68, False: 3.48k]
  ------------------
 1882|    208|      filtering = kFilterNone;
 1883|    208|    }
 1884|  3.68k|  }
 1885|  32.2k|  return filtering;
 1886|  32.2k|}
ScaleSlope:
 1909|  17.0k|                int* dy) {
 1910|  17.0k|  assert(x != NULL);
 1911|  17.0k|  assert(y != NULL);
 1912|  17.0k|  assert(dx != NULL);
 1913|  17.0k|  assert(dy != NULL);
 1914|  17.0k|  assert(src_width != 0);
 1915|  17.0k|  assert(src_height != 0);
 1916|  17.0k|  assert(dst_width > 0);
 1917|  17.0k|  assert(dst_height > 0);
 1918|       |  // Check for 1 pixel and avoid FixedDiv overflow.
 1919|  17.0k|  if (dst_width == 1 && src_width >= 32768) {
  ------------------
  |  Branch (1919:7): [True: 638, False: 16.4k]
  |  Branch (1919:25): [True: 0, False: 638]
  ------------------
 1920|      0|    dst_width = src_width;
 1921|      0|  }
 1922|  17.0k|  if (dst_height == 1 && src_height >= 32768) {
  ------------------
  |  Branch (1922:7): [True: 928, False: 16.1k]
  |  Branch (1922:26): [True: 0, False: 928]
  ------------------
 1923|      0|    dst_height = src_height;
 1924|      0|  }
 1925|  17.0k|  if (filtering == kFilterBox) {
  ------------------
  |  Branch (1925:7): [True: 3.14k, False: 13.9k]
  ------------------
 1926|       |    // Scale step for point sampling duplicates all pixels equally.
 1927|  3.14k|    *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  265|  3.14k|#define FixedDiv FixedDiv_X86
  ------------------
 1928|  3.14k|    *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  265|  3.14k|#define FixedDiv FixedDiv_X86
  ------------------
 1929|  3.14k|    *x = 0;
 1930|  3.14k|    *y = 0;
 1931|  13.9k|  } else if (filtering == kFilterBilinear) {
  ------------------
  |  Branch (1931:14): [True: 10.3k, False: 3.57k]
  ------------------
 1932|       |    // Scale step for bilinear sampling renders last pixel once for upsample.
 1933|  10.3k|    if (dst_width <= Abs(src_width)) {
  ------------------
  |  Branch (1933:9): [True: 3.41k, False: 6.92k]
  ------------------
 1934|  3.41k|      *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  265|  3.41k|#define FixedDiv FixedDiv_X86
  ------------------
 1935|  3.41k|      *x = CENTERSTART(*dx, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  | 1898|  3.41k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1898:28): [True: 0, False: 3.41k]
  |  |  ------------------
  ------------------
 1936|  6.92k|    } else if (src_width > 1 && dst_width > 1) {
  ------------------
  |  Branch (1936:16): [True: 6.92k, False: 0]
  |  Branch (1936:33): [True: 6.92k, False: 0]
  ------------------
 1937|  6.92k|      *dx = FixedDiv1(Abs(src_width), dst_width);
  ------------------
  |  |  266|  6.92k|#define FixedDiv1 FixedDiv1_X86
  ------------------
 1938|  6.92k|      *x = 0;
 1939|  6.92k|    }
 1940|  10.3k|    if (dst_height <= src_height) {
  ------------------
  |  Branch (1940:9): [True: 4.43k, False: 5.90k]
  ------------------
 1941|  4.43k|      *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  265|  4.43k|#define FixedDiv FixedDiv_X86
  ------------------
 1942|  4.43k|      *y = CENTERSTART(*dy, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  | 1898|  4.43k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1898:28): [True: 0, False: 4.43k]
  |  |  ------------------
  ------------------
 1943|  5.90k|    } else if (src_height > 1 && dst_height > 1) {
  ------------------
  |  Branch (1943:16): [True: 5.90k, False: 0]
  |  Branch (1943:34): [True: 5.90k, False: 0]
  ------------------
 1944|  5.90k|      *dy = FixedDiv1(src_height, dst_height);
  ------------------
  |  |  266|  5.90k|#define FixedDiv1 FixedDiv1_X86
  ------------------
 1945|  5.90k|      *y = 0;
 1946|  5.90k|    }
 1947|  10.3k|  } else if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1947:14): [True: 2.28k, False: 1.28k]
  ------------------
 1948|       |    // Scale step for bilinear sampling renders last pixel once for upsample.
 1949|  2.28k|    if (dst_width <= Abs(src_width)) {
  ------------------
  |  Branch (1949:9): [True: 1.24k, False: 1.03k]
  ------------------
 1950|  1.24k|      *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  265|  1.24k|#define FixedDiv FixedDiv_X86
  ------------------
 1951|  1.24k|      *x = CENTERSTART(*dx, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  | 1898|  1.24k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1898:28): [True: 0, False: 1.24k]
  |  |  ------------------
  ------------------
 1952|  1.24k|    } else if (src_width > 1 && dst_width > 1) {
  ------------------
  |  Branch (1952:16): [True: 1.03k, False: 0]
  |  Branch (1952:33): [True: 1.03k, False: 0]
  ------------------
 1953|  1.03k|      *dx = FixedDiv1(Abs(src_width), dst_width);
  ------------------
  |  |  266|  1.03k|#define FixedDiv1 FixedDiv1_X86
  ------------------
 1954|  1.03k|      *x = 0;
 1955|  1.03k|    }
 1956|  2.28k|    *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  265|  2.28k|#define FixedDiv FixedDiv_X86
  ------------------
 1957|  2.28k|    *y = *dy >> 1;
 1958|  2.28k|  } else {
 1959|       |    // Scale step for point sampling duplicates all pixels equally.
 1960|  1.28k|    *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  265|  1.28k|#define FixedDiv FixedDiv_X86
  ------------------
 1961|  1.28k|    *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  265|  1.28k|#define FixedDiv FixedDiv_X86
  ------------------
 1962|  1.28k|    *x = CENTERSTART(*dx, 0);
  ------------------
  |  | 1898|  1.28k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1898:28): [True: 0, False: 1.28k]
  |  |  ------------------
  ------------------
 1963|  1.28k|    *y = CENTERSTART(*dy, 0);
  ------------------
  |  | 1898|  1.28k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1898:28): [True: 0, False: 1.28k]
  |  |  ------------------
  ------------------
 1964|  1.28k|  }
 1965|       |  // Negative src_width means horizontally mirror.
 1966|  17.0k|  if (src_width < 0) {
  ------------------
  |  Branch (1966:7): [True: 0, False: 17.0k]
  ------------------
 1967|      0|    *x += (dst_width - 1) * *dx;
 1968|      0|    *dx = -*dx;
 1969|       |    // src_width = -src_width;   // Caller must do this.
 1970|      0|  }
 1971|  17.0k|}
scale_common.cc:_ZN6libyuvL3AbsEi:
   45|  29.6k|static __inline int Abs(int v) {
   46|  29.6k|  return v >= 0 ? v : -v;
  ------------------
  |  Branch (46:10): [True: 29.6k, False: 0]
  ------------------
   47|  29.6k|}

ScaleRowDown2Box_AVX2:
  256|     50|                           int dst_width) {
  257|     50|  asm volatile(
  258|     50|      "vpcmpeqb    %%ymm4,%%ymm4,%%ymm4          \n"
  259|     50|      "vpabsb      %%ymm4,%%ymm4                 \n"
  260|     50|      "vpxor       %%ymm5,%%ymm5,%%ymm5          \n"
  261|       |
  262|     50|      LABELALIGN
  263|     50|      "1:          \n"
  264|     50|      "vmovdqu     (%0),%%ymm0                   \n"
  265|     50|      "vmovdqu     0x20(%0),%%ymm1               \n"
  266|     50|      "vmovdqu     0x00(%0,%3,1),%%ymm2          \n"
  267|     50|      "vmovdqu     0x20(%0,%3,1),%%ymm3          \n"
  268|     50|      "lea         0x40(%0),%0                   \n"
  269|     50|      "vpmaddubsw  %%ymm4,%%ymm0,%%ymm0          \n"
  270|     50|      "vpmaddubsw  %%ymm4,%%ymm1,%%ymm1          \n"
  271|     50|      "vpmaddubsw  %%ymm4,%%ymm2,%%ymm2          \n"
  272|     50|      "vpmaddubsw  %%ymm4,%%ymm3,%%ymm3          \n"
  273|     50|      "vpaddw      %%ymm2,%%ymm0,%%ymm0          \n"
  274|     50|      "vpaddw      %%ymm3,%%ymm1,%%ymm1          \n"
  275|     50|      "vpsrlw      $0x1,%%ymm0,%%ymm0            \n"
  276|     50|      "vpsrlw      $0x1,%%ymm1,%%ymm1            \n"
  277|     50|      "vpavgw      %%ymm5,%%ymm0,%%ymm0          \n"
  278|     50|      "vpavgw      %%ymm5,%%ymm1,%%ymm1          \n"
  279|     50|      "vpackuswb   %%ymm1,%%ymm0,%%ymm0          \n"
  280|     50|      "vpermq      $0xd8,%%ymm0,%%ymm0           \n"
  281|     50|      "vmovdqu     %%ymm0,(%1)                   \n"
  282|     50|      "lea         0x20(%1),%1                   \n"
  283|     50|      "sub         $0x20,%2                      \n"
  284|     50|      "jg          1b                            \n"
  285|     50|      "vzeroupper  \n"
  286|     50|      : "+r"(src_ptr),               // %0
  287|     50|        "+r"(dst_ptr),               // %1
  288|     50|        "+r"(dst_width)              // %2
  289|     50|      : "r"((intptr_t)(src_stride))  // %3
  290|     50|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5");
  291|     50|}
ScaleRowDown4Box_AVX2:
  416|    360|                           int dst_width) {
  417|    360|  asm volatile(
  418|    360|      "vpcmpeqb    %%ymm4,%%ymm4,%%ymm4          \n"
  419|    360|      "vpabsw      %%ymm4,%%ymm5                 \n"
  420|    360|      "vpabsb      %%ymm4,%%ymm4                 \n"  // 0x0101
  421|    360|      "vpsllw      $0x3,%%ymm5,%%ymm5            \n"  // 0x0008
  422|       |
  423|    360|      LABELALIGN
  424|    360|      "1:          \n"
  425|    360|      "vmovdqu     (%0),%%ymm0                   \n"
  426|    360|      "vmovdqu     0x20(%0),%%ymm1               \n"
  427|    360|      "vmovdqu     0x00(%0,%3,1),%%ymm2          \n"
  428|    360|      "vmovdqu     0x20(%0,%3,1),%%ymm3          \n"
  429|    360|      "vpmaddubsw  %%ymm4,%%ymm0,%%ymm0          \n"
  430|    360|      "vpmaddubsw  %%ymm4,%%ymm1,%%ymm1          \n"
  431|    360|      "vpmaddubsw  %%ymm4,%%ymm2,%%ymm2          \n"
  432|    360|      "vpmaddubsw  %%ymm4,%%ymm3,%%ymm3          \n"
  433|    360|      "vpaddw      %%ymm2,%%ymm0,%%ymm0          \n"
  434|    360|      "vpaddw      %%ymm3,%%ymm1,%%ymm1          \n"
  435|    360|      "vmovdqu     0x00(%0,%3,2),%%ymm2          \n"
  436|    360|      "vmovdqu     0x20(%0,%3,2),%%ymm3          \n"
  437|    360|      "vpmaddubsw  %%ymm4,%%ymm2,%%ymm2          \n"
  438|    360|      "vpmaddubsw  %%ymm4,%%ymm3,%%ymm3          \n"
  439|    360|      "vpaddw      %%ymm2,%%ymm0,%%ymm0          \n"
  440|    360|      "vpaddw      %%ymm3,%%ymm1,%%ymm1          \n"
  441|    360|      "vmovdqu     0x00(%0,%4,1),%%ymm2          \n"
  442|    360|      "vmovdqu     0x20(%0,%4,1),%%ymm3          \n"
  443|    360|      "lea         0x40(%0),%0                   \n"
  444|    360|      "vpmaddubsw  %%ymm4,%%ymm2,%%ymm2          \n"
  445|    360|      "vpmaddubsw  %%ymm4,%%ymm3,%%ymm3          \n"
  446|    360|      "vpaddw      %%ymm2,%%ymm0,%%ymm0          \n"
  447|    360|      "vpaddw      %%ymm3,%%ymm1,%%ymm1          \n"
  448|    360|      "vphaddw     %%ymm1,%%ymm0,%%ymm0          \n"
  449|    360|      "vpermq      $0xd8,%%ymm0,%%ymm0           \n"
  450|    360|      "vpaddw      %%ymm5,%%ymm0,%%ymm0          \n"
  451|    360|      "vpsrlw      $0x4,%%ymm0,%%ymm0            \n"
  452|    360|      "vpackuswb   %%ymm0,%%ymm0,%%ymm0          \n"
  453|    360|      "vpermq      $0xd8,%%ymm0,%%ymm0           \n"
  454|    360|      "vmovdqu     %%xmm0,(%1)                   \n"
  455|    360|      "lea         0x10(%1),%1                   \n"
  456|    360|      "sub         $0x10,%2                      \n"
  457|    360|      "jg          1b                            \n"
  458|    360|      "vzeroupper  \n"
  459|    360|      : "+r"(src_ptr),                   // %0
  460|    360|        "+r"(dst_ptr),                   // %1
  461|    360|        "+r"(dst_width)                  // %2
  462|    360|      : "r"((intptr_t)(src_stride)),     // %3
  463|    360|        "r"((intptr_t)(src_stride * 3))  // %4
  464|    360|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
  465|    360|}
ScaleRowDown38_2_Box_SSSE3:
  671|     32|                                int dst_width) {
  672|     32|  asm volatile(
  673|     32|      "movdqa      %0,%%xmm2                     \n"
  674|     32|      "movdqa      %1,%%xmm3                     \n"
  675|     32|      "movdqa      %2,%%xmm4                     \n"
  676|     32|      "movdqa      %3,%%xmm5                     \n"
  677|     32|      :
  678|     32|      : "m"(kShufAb0),  // %0
  679|     32|        "m"(kShufAb1),  // %1
  680|     32|        "m"(kShufAb2),  // %2
  681|     32|        "m"(kScaleAb2)  // %3
  682|     32|  );
  683|     32|  asm volatile(
  684|     32|      "1:          \n"
  685|     32|      "movdqu      (%0),%%xmm0                   \n"
  686|     32|      "movdqu      0x00(%0,%3,1),%%xmm1          \n"
  687|     32|      "lea         0x10(%0),%0                   \n"
  688|     32|      "pavgb       %%xmm1,%%xmm0                 \n"
  689|     32|      "movdqa      %%xmm0,%%xmm1                 \n"
  690|     32|      "pshufb      %%xmm2,%%xmm1                 \n"
  691|     32|      "movdqa      %%xmm0,%%xmm6                 \n"
  692|     32|      "pshufb      %%xmm3,%%xmm6                 \n"
  693|     32|      "paddusw     %%xmm6,%%xmm1                 \n"
  694|     32|      "pshufb      %%xmm4,%%xmm0                 \n"
  695|     32|      "paddusw     %%xmm0,%%xmm1                 \n"
  696|     32|      "pmulhuw     %%xmm5,%%xmm1                 \n"
  697|     32|      "packuswb    %%xmm1,%%xmm1                 \n"
  698|     32|      "movd        %%xmm1,(%1)                   \n"
  699|     32|      "psrlq       $0x10,%%xmm1                  \n"
  700|     32|      "movd        %%xmm1,0x2(%1)                \n"
  701|     32|      "lea         0x6(%1),%1                    \n"
  702|     32|      "sub         $0x6,%2                       \n"
  703|     32|      "jg          1b                            \n"
  704|     32|      : "+r"(src_ptr),               // %0
  705|     32|        "+r"(dst_ptr),               // %1
  706|     32|        "+r"(dst_width)              // %2
  707|     32|      : "r"((intptr_t)(src_stride))  // %3
  708|     32|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6");
  709|     32|}
ScaleRowDown38_3_Box_SSSE3:
  714|     64|                                int dst_width) {
  715|     64|  asm volatile(
  716|     64|      "movdqa      %0,%%xmm2                     \n"
  717|     64|      "movdqa      %1,%%xmm3                     \n"
  718|     64|      "movdqa      %2,%%xmm4                     \n"
  719|     64|      "pxor        %%xmm5,%%xmm5                 \n"
  720|     64|      :
  721|     64|      : "m"(kShufAc),    // %0
  722|     64|        "m"(kShufAc3),   // %1
  723|     64|        "m"(kScaleAc33)  // %2
  724|     64|  );
  725|     64|  asm volatile(
  726|     64|      "1:          \n"
  727|     64|      "movdqu      (%0),%%xmm0                   \n"
  728|     64|      "movdqu      0x00(%0,%3,1),%%xmm6          \n"
  729|     64|      "movhlps     %%xmm0,%%xmm1                 \n"
  730|     64|      "movhlps     %%xmm6,%%xmm7                 \n"
  731|     64|      "punpcklbw   %%xmm5,%%xmm0                 \n"
  732|     64|      "punpcklbw   %%xmm5,%%xmm1                 \n"
  733|     64|      "punpcklbw   %%xmm5,%%xmm6                 \n"
  734|     64|      "punpcklbw   %%xmm5,%%xmm7                 \n"
  735|     64|      "paddusw     %%xmm6,%%xmm0                 \n"
  736|     64|      "paddusw     %%xmm7,%%xmm1                 \n"
  737|     64|      "movdqu      0x00(%0,%3,2),%%xmm6          \n"
  738|     64|      "lea         0x10(%0),%0                   \n"
  739|     64|      "movhlps     %%xmm6,%%xmm7                 \n"
  740|     64|      "punpcklbw   %%xmm5,%%xmm6                 \n"
  741|     64|      "punpcklbw   %%xmm5,%%xmm7                 \n"
  742|     64|      "paddusw     %%xmm6,%%xmm0                 \n"
  743|     64|      "paddusw     %%xmm7,%%xmm1                 \n"
  744|     64|      "movdqa      %%xmm0,%%xmm6                 \n"
  745|     64|      "psrldq      $0x2,%%xmm0                   \n"
  746|     64|      "paddusw     %%xmm0,%%xmm6                 \n"
  747|     64|      "psrldq      $0x2,%%xmm0                   \n"
  748|     64|      "paddusw     %%xmm0,%%xmm6                 \n"
  749|     64|      "pshufb      %%xmm2,%%xmm6                 \n"
  750|     64|      "movdqa      %%xmm1,%%xmm7                 \n"
  751|     64|      "psrldq      $0x2,%%xmm1                   \n"
  752|     64|      "paddusw     %%xmm1,%%xmm7                 \n"
  753|     64|      "psrldq      $0x2,%%xmm1                   \n"
  754|     64|      "paddusw     %%xmm1,%%xmm7                 \n"
  755|     64|      "pshufb      %%xmm3,%%xmm7                 \n"
  756|     64|      "paddusw     %%xmm7,%%xmm6                 \n"
  757|     64|      "pmulhuw     %%xmm4,%%xmm6                 \n"
  758|     64|      "packuswb    %%xmm6,%%xmm6                 \n"
  759|     64|      "movd        %%xmm6,(%1)                   \n"
  760|     64|      "psrlq       $0x10,%%xmm6                  \n"
  761|     64|      "movd        %%xmm6,0x2(%1)                \n"
  762|     64|      "lea         0x6(%1),%1                    \n"
  763|     64|      "sub         $0x6,%2                       \n"
  764|     64|      "jg          1b                            \n"
  765|     64|      : "+r"(src_ptr),               // %0
  766|     64|        "+r"(dst_ptr),               // %1
  767|     64|        "+r"(dst_width)              // %2
  768|     64|      : "r"((intptr_t)(src_stride))  // %3
  769|     64|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
  770|     64|        "xmm7");
  771|     64|}
ScaleRowUp2_Linear_AVX2:
 1388|  6.88k|                             int dst_width) {
 1389|  6.88k|  asm volatile(
 1390|  6.88k|      "vpcmpeqw    %%ymm4,%%ymm4,%%ymm4          \n"
 1391|  6.88k|      "vpsrlw      $15,%%ymm4,%%ymm4             \n"
 1392|  6.88k|      "vpsllw      $1,%%ymm4,%%ymm4              \n"  // all 2
 1393|  6.88k|      "vbroadcastf128 %3,%%ymm3                  \n"
 1394|       |
 1395|  6.88k|      LABELALIGN
 1396|  6.88k|      "1:          \n"
 1397|  6.88k|      "vmovdqu     (%0),%%xmm0                   \n"  // 0123456789ABCDEF
 1398|  6.88k|      "vmovdqu     1(%0),%%xmm1                  \n"  // 123456789ABCDEF0
 1399|  6.88k|      "vpermq      $0b11011000,%%ymm0,%%ymm0     \n"
 1400|  6.88k|      "vpermq      $0b11011000,%%ymm1,%%ymm1     \n"
 1401|  6.88k|      "vpunpcklwd  %%ymm0,%%ymm0,%%ymm0          \n"
 1402|  6.88k|      "vpunpcklwd  %%ymm1,%%ymm1,%%ymm1          \n"
 1403|  6.88k|      "vpunpckhdq  %%ymm1,%%ymm0,%%ymm2          \n"
 1404|  6.88k|      "vpunpckldq  %%ymm1,%%ymm0,%%ymm0          \n"
 1405|  6.88k|      "vpmaddubsw  %%ymm3,%%ymm2,%%ymm1          \n"  // 3*near+far (hi)
 1406|  6.88k|      "vpmaddubsw  %%ymm3,%%ymm0,%%ymm0          \n"  // 3*near+far (lo)
 1407|  6.88k|      "vpaddw      %%ymm4,%%ymm0,%%ymm0          \n"  // 3*near+far+2 (lo)
 1408|  6.88k|      "vpaddw      %%ymm4,%%ymm1,%%ymm1          \n"  // 3*near+far+2 (hi)
 1409|  6.88k|      "vpsrlw      $2,%%ymm0,%%ymm0              \n"  // 3/4*near+1/4*far (lo)
 1410|  6.88k|      "vpsrlw      $2,%%ymm1,%%ymm1              \n"  // 3/4*near+1/4*far (hi)
 1411|  6.88k|      "vpackuswb   %%ymm1,%%ymm0,%%ymm0          \n"
 1412|  6.88k|      "vmovdqu     %%ymm0,(%1)                   \n"
 1413|       |
 1414|  6.88k|      "lea         0x10(%0),%0                   \n"
 1415|  6.88k|      "lea         0x20(%1),%1                   \n"  // 16 sample to 32 sample
 1416|  6.88k|      "sub         $0x20,%2                      \n"
 1417|  6.88k|      "jg          1b                            \n"
 1418|  6.88k|      "vzeroupper  \n"
 1419|  6.88k|      : "+r"(src_ptr),      // %0
 1420|  6.88k|        "+r"(dst_ptr),      // %1
 1421|  6.88k|        "+r"(dst_width)     // %2
 1422|  6.88k|      : "m"(kLinearMadd31)  // %3
 1423|  6.88k|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4");
 1424|  6.88k|}
ScaleRowUp2_Bilinear_AVX2:
 1432|    487|                               int dst_width) {
 1433|    487|  asm volatile(
 1434|    487|      "vpcmpeqw    %%ymm6,%%ymm6,%%ymm6          \n"
 1435|    487|      "vpsrlw      $15,%%ymm6,%%ymm6             \n"
 1436|    487|      "vpsllw      $3,%%ymm6,%%ymm6              \n"  // all 8
 1437|    487|      "vbroadcastf128 %5,%%ymm7                  \n"
 1438|       |
 1439|    487|      LABELALIGN
 1440|    487|      "1:          \n"
 1441|    487|      "vmovdqu     (%0),%%xmm0                   \n"  // 0123456789ABCDEF
 1442|    487|      "vmovdqu     1(%0),%%xmm1                  \n"  // 123456789ABCDEF0
 1443|    487|      "vpermq      $0b11011000,%%ymm0,%%ymm0     \n"
 1444|    487|      "vpermq      $0b11011000,%%ymm1,%%ymm1     \n"
 1445|    487|      "vpunpcklwd  %%ymm0,%%ymm0,%%ymm0          \n"
 1446|    487|      "vpunpcklwd  %%ymm1,%%ymm1,%%ymm1          \n"
 1447|    487|      "vpunpckhdq  %%ymm1,%%ymm0,%%ymm2          \n"
 1448|    487|      "vpunpckldq  %%ymm1,%%ymm0,%%ymm0          \n"
 1449|    487|      "vpmaddubsw  %%ymm7,%%ymm2,%%ymm1          \n"  // 3*near+far (1, hi)
 1450|    487|      "vpmaddubsw  %%ymm7,%%ymm0,%%ymm0          \n"  // 3*near+far (1, lo)
 1451|       |
 1452|    487|      "vmovdqu     (%0,%3),%%xmm2                \n"  // 0123456789ABCDEF
 1453|    487|      "vmovdqu     1(%0,%3),%%xmm3               \n"  // 123456789ABCDEF0
 1454|    487|      "vpermq      $0b11011000,%%ymm2,%%ymm2     \n"
 1455|    487|      "vpermq      $0b11011000,%%ymm3,%%ymm3     \n"
 1456|    487|      "vpunpcklwd  %%ymm2,%%ymm2,%%ymm2          \n"
 1457|    487|      "vpunpcklwd  %%ymm3,%%ymm3,%%ymm3          \n"
 1458|    487|      "vpunpckhdq  %%ymm3,%%ymm2,%%ymm4          \n"
 1459|    487|      "vpunpckldq  %%ymm3,%%ymm2,%%ymm2          \n"
 1460|    487|      "vpmaddubsw  %%ymm7,%%ymm4,%%ymm3          \n"  // 3*near+far (2, hi)
 1461|    487|      "vpmaddubsw  %%ymm7,%%ymm2,%%ymm2          \n"  // 3*near+far (2, lo)
 1462|       |
 1463|       |      // ymm0 ymm1
 1464|       |      // ymm2 ymm3
 1465|       |
 1466|    487|      "vpaddw      %%ymm0,%%ymm0,%%ymm4          \n"  // 6*near+2*far (1, lo)
 1467|    487|      "vpaddw      %%ymm6,%%ymm2,%%ymm5          \n"  // 3*near+far+8 (2, lo)
 1468|    487|      "vpaddw      %%ymm4,%%ymm0,%%ymm4          \n"  // 9*near+3*far (1, lo)
 1469|    487|      "vpaddw      %%ymm4,%%ymm5,%%ymm4          \n"  // 9 3 3 1 + 8 (1, lo)
 1470|    487|      "vpsrlw      $4,%%ymm4,%%ymm4              \n"  // ^ div by 16 (1, lo)
 1471|       |
 1472|    487|      "vpaddw      %%ymm2,%%ymm2,%%ymm5          \n"  // 6*near+2*far (2, lo)
 1473|    487|      "vpaddw      %%ymm6,%%ymm0,%%ymm0          \n"  // 3*near+far+8 (1, lo)
 1474|    487|      "vpaddw      %%ymm5,%%ymm2,%%ymm5          \n"  // 9*near+3*far (2, lo)
 1475|    487|      "vpaddw      %%ymm5,%%ymm0,%%ymm5          \n"  // 9 3 3 1 + 8 (2, lo)
 1476|    487|      "vpsrlw      $4,%%ymm5,%%ymm5              \n"  // ^ div by 16 (2, lo)
 1477|       |
 1478|    487|      "vpaddw      %%ymm1,%%ymm1,%%ymm0          \n"  // 6*near+2*far (1, hi)
 1479|    487|      "vpaddw      %%ymm6,%%ymm3,%%ymm2          \n"  // 3*near+far+8 (2, hi)
 1480|    487|      "vpaddw      %%ymm0,%%ymm1,%%ymm0          \n"  // 9*near+3*far (1, hi)
 1481|    487|      "vpaddw      %%ymm0,%%ymm2,%%ymm0          \n"  // 9 3 3 1 + 8 (1, hi)
 1482|    487|      "vpsrlw      $4,%%ymm0,%%ymm0              \n"  // ^ div by 16 (1, hi)
 1483|       |
 1484|    487|      "vpaddw      %%ymm3,%%ymm3,%%ymm2          \n"  // 6*near+2*far (2, hi)
 1485|    487|      "vpaddw      %%ymm6,%%ymm1,%%ymm1          \n"  // 3*near+far+8 (1, hi)
 1486|    487|      "vpaddw      %%ymm2,%%ymm3,%%ymm2          \n"  // 9*near+3*far (2, hi)
 1487|    487|      "vpaddw      %%ymm2,%%ymm1,%%ymm2          \n"  // 9 3 3 1 + 8 (2, hi)
 1488|    487|      "vpsrlw      $4,%%ymm2,%%ymm2              \n"  // ^ div by 16 (2, hi)
 1489|       |
 1490|    487|      "vpackuswb   %%ymm0,%%ymm4,%%ymm4          \n"
 1491|    487|      "vmovdqu     %%ymm4,(%1)                   \n"  // store above
 1492|    487|      "vpackuswb   %%ymm2,%%ymm5,%%ymm5          \n"
 1493|    487|      "vmovdqu     %%ymm5,(%1,%4)                \n"  // store below
 1494|       |
 1495|    487|      "lea         0x10(%0),%0                   \n"
 1496|    487|      "lea         0x20(%1),%1                   \n"  // 16 sample to 32 sample
 1497|    487|      "sub         $0x20,%2                      \n"
 1498|    487|      "jg          1b                            \n"
 1499|    487|      "vzeroupper  \n"
 1500|    487|      : "+r"(src_ptr),                // %0
 1501|    487|        "+r"(dst_ptr),                // %1
 1502|    487|        "+r"(dst_width)               // %2
 1503|    487|      : "r"((intptr_t)(src_stride)),  // %3
 1504|    487|        "r"((intptr_t)(dst_stride)),  // %4
 1505|    487|        "m"(kLinearMadd31)            // %5
 1506|    487|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
 1507|    487|        "xmm7");
 1508|    487|}
ScaleRowUp2_Linear_12_AVX2:
 1514|  4.58k|                                int dst_width) {
 1515|  4.58k|  asm volatile(
 1516|  4.58k|      "vbroadcastf128 %3,%%ymm5                  \n"
 1517|  4.58k|      "vpcmpeqw    %%ymm4,%%ymm4,%%ymm4          \n"
 1518|  4.58k|      "vpsrlw      $15,%%ymm4,%%ymm4             \n"
 1519|  4.58k|      "vpsllw      $1,%%ymm4,%%ymm4              \n"  // all 2
 1520|       |
 1521|  4.58k|      LABELALIGN
 1522|  4.58k|      "1:          \n"
 1523|  4.58k|      "vmovdqu     (%0),%%ymm0                   \n"  // 0123456789ABCDEF (16b)
 1524|  4.58k|      "vmovdqu     2(%0),%%ymm1                  \n"  // 123456789ABCDEF0 (16b)
 1525|       |
 1526|  4.58k|      "vpermq      $0b11011000,%%ymm0,%%ymm0     \n"  // 012389AB4567CDEF
 1527|  4.58k|      "vpermq      $0b11011000,%%ymm1,%%ymm1     \n"  // 12349ABC5678DEF0
 1528|       |
 1529|  4.58k|      "vpunpckhwd  %%ymm1,%%ymm0,%%ymm2          \n"  // 899AABBCCDDEEFF0 (near)
 1530|  4.58k|      "vpunpcklwd  %%ymm1,%%ymm0,%%ymm0          \n"  // 0112233445566778 (near)
 1531|  4.58k|      "vpshufb     %%ymm5,%%ymm2,%%ymm3          \n"  // 98A9BACBDCEDFE0F (far)
 1532|  4.58k|      "vpshufb     %%ymm5,%%ymm0,%%ymm1          \n"  // 1021324354657687 (far)
 1533|       |
 1534|  4.58k|      "vpaddw      %%ymm4,%%ymm1,%%ymm1          \n"  // far+2
 1535|  4.58k|      "vpaddw      %%ymm4,%%ymm3,%%ymm3          \n"  // far+2
 1536|  4.58k|      "vpaddw      %%ymm0,%%ymm1,%%ymm1          \n"  // near+far+2
 1537|  4.58k|      "vpaddw      %%ymm2,%%ymm3,%%ymm3          \n"  // near+far+2
 1538|  4.58k|      "vpaddw      %%ymm0,%%ymm0,%%ymm0          \n"  // 2*near
 1539|  4.58k|      "vpaddw      %%ymm2,%%ymm2,%%ymm2          \n"  // 2*near
 1540|  4.58k|      "vpaddw      %%ymm0,%%ymm1,%%ymm0          \n"  // 3*near+far+2
 1541|  4.58k|      "vpaddw      %%ymm2,%%ymm3,%%ymm2          \n"  // 3*near+far+2
 1542|       |
 1543|  4.58k|      "vpsrlw      $2,%%ymm0,%%ymm0              \n"  // 3/4*near+1/4*far
 1544|  4.58k|      "vpsrlw      $2,%%ymm2,%%ymm2              \n"  // 3/4*near+1/4*far
 1545|  4.58k|      "vmovdqu     %%ymm0,(%1)                   \n"
 1546|  4.58k|      "vmovdqu     %%ymm2,32(%1)                 \n"
 1547|       |
 1548|  4.58k|      "lea         0x20(%0),%0                   \n"
 1549|  4.58k|      "lea         0x40(%1),%1                   \n"  // 16 sample to 32 sample
 1550|  4.58k|      "sub         $0x20,%2                      \n"
 1551|  4.58k|      "jg          1b                            \n"
 1552|  4.58k|      "vzeroupper  \n"
 1553|  4.58k|      : "+r"(src_ptr),          // %0
 1554|  4.58k|        "+r"(dst_ptr),          // %1
 1555|  4.58k|        "+r"(dst_width)         // %2
 1556|  4.58k|      : "m"(kLinearShuffleFar)  // %3
 1557|  4.58k|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
 1558|  4.58k|}
ScaleRowUp2_Bilinear_12_AVX2:
 1566|    737|                                  int dst_width) {
 1567|    737|  asm volatile(
 1568|    737|      "vbroadcastf128 %5,%%ymm5                  \n"
 1569|    737|      "vpcmpeqw    %%ymm4,%%ymm4,%%ymm4          \n"
 1570|    737|      "vpsrlw      $15,%%ymm4,%%ymm4             \n"
 1571|    737|      "vpsllw      $3,%%ymm4,%%ymm4              \n"  // all 8
 1572|       |
 1573|    737|      LABELALIGN
 1574|    737|      "1:          \n"
 1575|       |
 1576|    737|      "vmovdqu     (%0),%%xmm0                   \n"  // 01234567 (16b)
 1577|    737|      "vmovdqu     2(%0),%%xmm1                  \n"  // 12345678 (16b)
 1578|    737|      "vpermq      $0b11011000,%%ymm0,%%ymm0     \n"  // 0123000045670000
 1579|    737|      "vpermq      $0b11011000,%%ymm1,%%ymm1     \n"  // 1234000056780000
 1580|    737|      "vpunpcklwd  %%ymm1,%%ymm0,%%ymm0          \n"  // 0112233445566778 (near)
 1581|    737|      "vpshufb     %%ymm5,%%ymm0,%%ymm1          \n"  // 1021324354657687 (far)
 1582|    737|      "vpaddw      %%ymm0,%%ymm1,%%ymm1          \n"  // near+far
 1583|    737|      "vpaddw      %%ymm0,%%ymm0,%%ymm0          \n"  // 2*near
 1584|    737|      "vpaddw      %%ymm0,%%ymm1,%%ymm2          \n"  // 3*near+far (1)
 1585|       |
 1586|    737|      "vmovdqu     (%0,%3,2),%%xmm0              \n"  // 01234567 (16b)
 1587|    737|      "vmovdqu     2(%0,%3,2),%%xmm1             \n"  // 12345678 (16b)
 1588|    737|      "vpermq      $0b11011000,%%ymm0,%%ymm0     \n"  // 0123000045670000
 1589|    737|      "vpermq      $0b11011000,%%ymm1,%%ymm1     \n"  // 1234000056780000
 1590|    737|      "vpunpcklwd  %%ymm1,%%ymm0,%%ymm0          \n"  // 0112233445566778 (near)
 1591|    737|      "vpshufb     %%ymm5,%%ymm0,%%ymm1          \n"  // 1021324354657687 (far)
 1592|    737|      "vpaddw      %%ymm0,%%ymm1,%%ymm1          \n"  // near+far
 1593|    737|      "vpaddw      %%ymm0,%%ymm0,%%ymm0          \n"  // 2*near
 1594|    737|      "vpaddw      %%ymm0,%%ymm1,%%ymm3          \n"  // 3*near+far (2)
 1595|       |
 1596|    737|      "vpaddw      %%ymm2,%%ymm2,%%ymm0          \n"  // 6*near+2*far (1)
 1597|    737|      "vpaddw      %%ymm4,%%ymm3,%%ymm1          \n"  // 3*near+far+8 (2)
 1598|    737|      "vpaddw      %%ymm0,%%ymm2,%%ymm0          \n"  // 9*near+3*far (1)
 1599|    737|      "vpaddw      %%ymm0,%%ymm1,%%ymm0          \n"  // 9 3 3 1 + 8 (1)
 1600|    737|      "vpsrlw      $4,%%ymm0,%%ymm0              \n"  // ^ div by 16
 1601|    737|      "vmovdqu     %%ymm0,(%1)                   \n"  // store above
 1602|       |
 1603|    737|      "vpaddw      %%ymm3,%%ymm3,%%ymm0          \n"  // 6*near+2*far (2)
 1604|    737|      "vpaddw      %%ymm4,%%ymm2,%%ymm1          \n"  // 3*near+far+8 (1)
 1605|    737|      "vpaddw      %%ymm0,%%ymm3,%%ymm0          \n"  // 9*near+3*far (2)
 1606|    737|      "vpaddw      %%ymm0,%%ymm1,%%ymm0          \n"  // 9 3 3 1 + 8 (2)
 1607|    737|      "vpsrlw      $4,%%ymm0,%%ymm0              \n"  // ^ div by 16
 1608|    737|      "vmovdqu     %%ymm0,(%1,%4,2)              \n"  // store below
 1609|       |
 1610|    737|      "lea         0x10(%0),%0                   \n"
 1611|    737|      "lea         0x20(%1),%1                   \n"  // 8 sample to 16 sample
 1612|    737|      "sub         $0x10,%2                      \n"
 1613|    737|      "jg          1b                            \n"
 1614|    737|      "vzeroupper  \n"
 1615|    737|      : "+r"(src_ptr),                // %0
 1616|    737|        "+r"(dst_ptr),                // %1
 1617|    737|        "+r"(dst_width)               // %2
 1618|    737|      : "r"((intptr_t)(src_stride)),  // %3
 1619|    737|        "r"((intptr_t)(dst_stride)),  // %4
 1620|    737|        "m"(kLinearShuffleFar)        // %5
 1621|    737|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
 1622|    737|}
ScaleAddRow_AVX2:
 1792|  1.02M|                      int src_width) {
 1793|  1.02M|      asm volatile("vpxor       %%ymm5,%%ymm5,%%ymm5          \n"
 1794|       |
 1795|  1.02M|               LABELALIGN
 1796|  1.02M|      "1:          \n"
 1797|  1.02M|      "vmovdqu     (%0),%%ymm3                   \n"
 1798|  1.02M|      "lea         0x20(%0),%0                   \n"  // src_ptr += 32
 1799|  1.02M|      "vpermq      $0xd8,%%ymm3,%%ymm3           \n"
 1800|  1.02M|      "vpunpcklbw  %%ymm5,%%ymm3,%%ymm2          \n"
 1801|  1.02M|      "vpunpckhbw  %%ymm5,%%ymm3,%%ymm3          \n"
 1802|  1.02M|      "vpaddusw    (%1),%%ymm2,%%ymm0            \n"
 1803|  1.02M|      "vpaddusw    0x20(%1),%%ymm3,%%ymm1        \n"
 1804|  1.02M|      "vmovdqu     %%ymm0,(%1)                   \n"
 1805|  1.02M|      "vmovdqu     %%ymm1,0x20(%1)               \n"
 1806|  1.02M|      "lea         0x40(%1),%1                   \n"
 1807|  1.02M|      "sub         $0x20,%2                      \n"
 1808|  1.02M|      "jg          1b                            \n"
 1809|  1.02M|      "vzeroupper  \n"
 1810|  1.02M|               : "+r"(src_ptr),   // %0
 1811|  1.02M|                 "+r"(dst_ptr),   // %1
 1812|  1.02M|                 "+r"(src_width)  // %2
 1813|  1.02M|               :
 1814|  1.02M|               : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm5");
 1815|  1.02M|}
ScaleFilterCols_SSSE3:
 1832|   207k|                           int dx) {
 1833|   207k|  intptr_t x0, x1, temp_pixel;
 1834|   207k|  asm volatile(
 1835|   207k|      "movd        %6,%%xmm2                     \n"
 1836|   207k|      "movd        %7,%%xmm3                     \n"
 1837|   207k|      "movl        $0x04040000,%k2               \n"
 1838|   207k|      "movd        %k2,%%xmm5                    \n"
 1839|   207k|      "pcmpeqb     %%xmm6,%%xmm6                 \n"
 1840|   207k|      "psrlw       $0x9,%%xmm6                   \n"  // 0x007f007f
 1841|   207k|      "pcmpeqb     %%xmm7,%%xmm7                 \n"
 1842|   207k|      "psrlw       $15,%%xmm7                    \n"  // 0x00010001
 1843|       |
 1844|   207k|      "pextrw      $0x1,%%xmm2,%k3               \n"
 1845|   207k|      "subl        $0x2,%5                       \n"
 1846|   207k|      "jl          29f                           \n"
 1847|   207k|      "movdqa      %%xmm2,%%xmm0                 \n"
 1848|   207k|      "paddd       %%xmm3,%%xmm0                 \n"
 1849|   207k|      "punpckldq   %%xmm0,%%xmm2                 \n"
 1850|   207k|      "punpckldq   %%xmm3,%%xmm3                 \n"
 1851|   207k|      "paddd       %%xmm3,%%xmm3                 \n"
 1852|   207k|      "pextrw      $0x3,%%xmm2,%k4               \n"
 1853|       |
 1854|   207k|      LABELALIGN
 1855|   207k|      "2:          \n"
 1856|   207k|      "movdqa      %%xmm2,%%xmm1                 \n"
 1857|   207k|      "paddd       %%xmm3,%%xmm2                 \n"
 1858|   207k|      "movzwl      0x00(%1,%3,1),%k2             \n"
 1859|   207k|      "movd        %k2,%%xmm0                    \n"
 1860|   207k|      "psrlw       $0x9,%%xmm1                   \n"
 1861|   207k|      "movzwl      0x00(%1,%4,1),%k2             \n"
 1862|   207k|      "movd        %k2,%%xmm4                    \n"
 1863|   207k|      "pshufb      %%xmm5,%%xmm1                 \n"
 1864|   207k|      "punpcklwd   %%xmm4,%%xmm0                 \n"
 1865|   207k|      "psubb       %8,%%xmm0                     \n"  // make pixels signed.
 1866|   207k|      "pxor        %%xmm6,%%xmm1                 \n"  // 128 - f = (f ^ 127 ) +
 1867|       |                                                      // 1
 1868|   207k|      "paddusb     %%xmm7,%%xmm1                 \n"
 1869|   207k|      "pmaddubsw   %%xmm0,%%xmm1                 \n"
 1870|   207k|      "pextrw      $0x1,%%xmm2,%k3               \n"
 1871|   207k|      "pextrw      $0x3,%%xmm2,%k4               \n"
 1872|   207k|      "paddw       %9,%%xmm1                     \n"  // make pixels unsigned.
 1873|   207k|      "psrlw       $0x7,%%xmm1                   \n"
 1874|   207k|      "packuswb    %%xmm1,%%xmm1                 \n"
 1875|   207k|      "movd        %%xmm1,%k2                    \n"
 1876|   207k|      "mov         %w2,(%0)                      \n"
 1877|   207k|      "lea         0x2(%0),%0                    \n"
 1878|   207k|      "subl        $0x2,%5                       \n"
 1879|   207k|      "jge         2b                            \n"
 1880|       |
 1881|   207k|      LABELALIGN
 1882|   207k|      "29:         \n"
 1883|   207k|      "addl        $0x1,%5                       \n"
 1884|   207k|      "jl          99f                           \n"
 1885|   207k|      "movzwl      0x00(%1,%3,1),%k2             \n"
 1886|   207k|      "movd        %k2,%%xmm0                    \n"
 1887|   207k|      "psrlw       $0x9,%%xmm2                   \n"
 1888|   207k|      "pshufb      %%xmm5,%%xmm2                 \n"
 1889|   207k|      "psubb       %8,%%xmm0                     \n"  // make pixels signed.
 1890|   207k|      "pxor        %%xmm6,%%xmm2                 \n"
 1891|   207k|      "paddusb     %%xmm7,%%xmm2                 \n"
 1892|   207k|      "pmaddubsw   %%xmm0,%%xmm2                 \n"
 1893|   207k|      "paddw       %9,%%xmm2                     \n"  // make pixels unsigned.
 1894|   207k|      "psrlw       $0x7,%%xmm2                   \n"
 1895|   207k|      "packuswb    %%xmm2,%%xmm2                 \n"
 1896|   207k|      "movd        %%xmm2,%k2                    \n"
 1897|   207k|      "mov         %b2,(%0)                      \n"
 1898|   207k|      "99:         \n"
 1899|   207k|      : "+r"(dst_ptr),      // %0
 1900|   207k|        "+r"(src_ptr),      // %1
 1901|   207k|        "=&a"(temp_pixel),  // %2
 1902|   207k|        "=&r"(x0),          // %3
 1903|   207k|        "=&r"(x1),          // %4
 1904|   207k|#if defined(__x86_64__)
 1905|   207k|        "+rm"(dst_width)  // %5
 1906|       |#else
 1907|       |        "+m"(dst_width)  // %5
 1908|       |#endif
 1909|   207k|      : "rm"(x),   // %6
 1910|   207k|        "rm"(dx),  // %7
 1911|   207k|#if defined(__x86_64__)
 1912|   207k|        "x"(kFsub80),  // %8
 1913|   207k|        "x"(kFadd40)   // %9
 1914|       |#else
 1915|       |        "m"(kFsub80),    // %8
 1916|       |        "m"(kFadd40)     // %9
 1917|       |#endif
 1918|   207k|      : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
 1919|   207k|        "xmm7");
 1920|   207k|}
FixedDiv_X86:
 2295|  21.5k|int FixedDiv_X86(int num, int div) {
 2296|  21.5k|  asm volatile(
 2297|  21.5k|      "cdq         \n"
 2298|  21.5k|      "shld        $0x10,%%eax,%%edx             \n"
 2299|  21.5k|      "shl         $0x10,%%eax                   \n"
 2300|  21.5k|      "idiv        %1                            \n"
 2301|  21.5k|      "mov         %0, %%eax                     \n"
 2302|  21.5k|      : "+a"(num)  // %0
 2303|  21.5k|      : "c"(div)   // %1
 2304|  21.5k|      : "memory", "cc", "edx");
 2305|  21.5k|  return num;
 2306|  21.5k|}
FixedDiv1_X86:
 2309|  15.3k|int FixedDiv1_X86(int num, int div) {
 2310|  15.3k|  asm volatile(
 2311|  15.3k|      "cdq         \n"
 2312|  15.3k|      "shld        $0x10,%%eax,%%edx             \n"
 2313|  15.3k|      "shl         $0x10,%%eax                   \n"
 2314|  15.3k|      "sub         $0x10001,%%eax                \n"
 2315|  15.3k|      "sbb         $0x0,%%edx                    \n"
 2316|  15.3k|      "sub         $0x1,%1                       \n"
 2317|  15.3k|      "idiv        %1                            \n"
 2318|  15.3k|      "mov         %0, %%eax                     \n"
 2319|  15.3k|      : "+a"(num)  // %0
 2320|  15.3k|      : "c"(div)   // %1
 2321|  15.3k|      : "memory", "cc", "edx");
 2322|  15.3k|  return num;
 2323|  15.3k|}

_ZNK4avif16UniquePtrDeleterclEP9avifImage:
   24|  12.8k|    void operator()(avifImage * image) const { avifImageDestroy(image); }
_ZNK4avif16UniquePtrDeleterclEP11avifDecoder:
   21|  12.8k|    void operator()(avifDecoder * decoder) const { avifDecoderDestroy(decoder); }

avifGetPixelFormatInfo:
   40|  94.1k|{
   41|  94.1k|    memset(info, 0, sizeof(avifPixelFormatInfo));
   42|       |
   43|  94.1k|    switch (format) {
   44|  50.9k|        case AVIF_PIXEL_FORMAT_YUV444:
  ------------------
  |  Branch (44:9): [True: 50.9k, False: 43.2k]
  ------------------
   45|  50.9k|            info->chromaShiftX = 0;
   46|  50.9k|            info->chromaShiftY = 0;
   47|  50.9k|            break;
   48|       |
   49|  3.53k|        case AVIF_PIXEL_FORMAT_YUV422:
  ------------------
  |  Branch (49:9): [True: 3.53k, False: 90.6k]
  ------------------
   50|  3.53k|            info->chromaShiftX = 1;
   51|  3.53k|            info->chromaShiftY = 0;
   52|  3.53k|            break;
   53|       |
   54|  24.3k|        case AVIF_PIXEL_FORMAT_YUV420:
  ------------------
  |  Branch (54:9): [True: 24.3k, False: 69.7k]
  ------------------
   55|  24.3k|            info->chromaShiftX = 1;
   56|  24.3k|            info->chromaShiftY = 1;
   57|  24.3k|            break;
   58|       |
   59|  12.5k|        case AVIF_PIXEL_FORMAT_YUV400:
  ------------------
  |  Branch (59:9): [True: 12.5k, False: 81.6k]
  ------------------
   60|  12.5k|            info->monochrome = AVIF_TRUE;
  ------------------
  |  |   88|  12.5k|#define AVIF_TRUE 1
  ------------------
   61|       |            // The nonexistent chroma is considered as subsampled in each dimension
   62|       |            // according to the AV1 specification. See sections 5.5.2 and 6.4.2.
   63|  12.5k|            info->chromaShiftX = 1;
   64|  12.5k|            info->chromaShiftY = 1;
   65|  12.5k|            break;
   66|       |
   67|  2.81k|        case AVIF_PIXEL_FORMAT_NONE:
  ------------------
  |  Branch (67:9): [True: 2.81k, False: 91.3k]
  ------------------
   68|  2.81k|        case AVIF_PIXEL_FORMAT_COUNT:
  ------------------
  |  Branch (68:9): [True: 0, False: 94.1k]
  ------------------
   69|  2.81k|        default:
  ------------------
  |  Branch (69:9): [True: 0, False: 94.1k]
  ------------------
   70|  2.81k|            break;
   71|  94.1k|    }
   72|  94.1k|}
avifImageSetDefaults:
  135|   608k|{
  136|   608k|    memset(image, 0, sizeof(avifImage));
  137|   608k|    image->yuvRange = AVIF_RANGE_FULL;
  138|   608k|    image->colorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
  139|   608k|    image->transferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
  140|   608k|    image->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
  141|   608k|}
avifImageCreate:
  144|   601k|{
  145|       |    // width and height are checked when actually used, for example by avifImageAllocatePlanes().
  146|   601k|    AVIF_CHECKERR(depth <= 16, NULL); // avifImage only supports up to 16 bits per sample. See avifImageUsesU16().
  ------------------
  |  |   45|   601k|    do {                        \
  |  |   46|   601k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 601k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   601k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 601k]
  |  |  ------------------
  ------------------
  147|       |    // Cast to silence "comparison of unsigned expression is always true" warning.
  148|   601k|    AVIF_CHECKERR((int)yuvFormat >= AVIF_PIXEL_FORMAT_NONE && yuvFormat < AVIF_PIXEL_FORMAT_COUNT, NULL);
  ------------------
  |  |   45|   601k|    do {                        \
  |  |   46|  1.20M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:15): [True: 601k, False: 0]
  |  |  |  Branch (46:15): [True: 601k, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   601k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 601k]
  |  |  ------------------
  ------------------
  149|       |
  150|   601k|    avifImage * image = (avifImage *)avifAlloc(sizeof(avifImage));
  151|   601k|    AVIF_CHECKERR(image, NULL);
  ------------------
  |  |   45|   601k|    do {                        \
  |  |   46|   601k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 601k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   601k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 601k]
  |  |  ------------------
  ------------------
  152|   601k|    avifImageSetDefaults(image);
  153|   601k|    image->width = width;
  154|   601k|    image->height = height;
  155|   601k|    image->depth = depth;
  156|   601k|    image->yuvFormat = yuvFormat;
  157|   601k|    return image;
  158|   601k|}
avifImageCreateEmpty:
  161|   600k|{
  162|   600k|    return avifImageCreate(0, 0, 0, AVIF_PIXEL_FORMAT_NONE);
  163|   600k|}
avifImageCopyNoAlloc:
  166|  11.1k|{
  167|  11.1k|    dstImage->width = srcImage->width;
  168|  11.1k|    dstImage->height = srcImage->height;
  169|  11.1k|    dstImage->depth = srcImage->depth;
  170|  11.1k|    dstImage->yuvFormat = srcImage->yuvFormat;
  171|  11.1k|    dstImage->yuvRange = srcImage->yuvRange;
  172|  11.1k|    dstImage->yuvChromaSamplePosition = srcImage->yuvChromaSamplePosition;
  173|  11.1k|    dstImage->alphaPremultiplied = srcImage->alphaPremultiplied;
  174|       |
  175|  11.1k|    dstImage->colorPrimaries = srcImage->colorPrimaries;
  176|  11.1k|    dstImage->transferCharacteristics = srcImage->transferCharacteristics;
  177|  11.1k|    dstImage->matrixCoefficients = srcImage->matrixCoefficients;
  178|  11.1k|    dstImage->clli = srcImage->clli;
  179|       |
  180|  11.1k|    dstImage->transformFlags = srcImage->transformFlags;
  181|  11.1k|    dstImage->pasp = srcImage->pasp;
  182|  11.1k|    dstImage->clap = srcImage->clap;
  183|  11.1k|    dstImage->irot = srcImage->irot;
  184|  11.1k|    dstImage->imir = srcImage->imir;
  185|  11.1k|}
avifImageCopySamples:
  188|  6.15k|{
  189|  6.15k|    assert(srcImage->depth == dstImage->depth);
  190|  6.15k|    if (planes & AVIF_PLANES_YUV) {
  ------------------
  |  Branch (190:9): [True: 5.63k, False: 517]
  ------------------
  191|  5.63k|        assert(srcImage->yuvFormat == dstImage->yuvFormat);
  192|       |        // Note that there may be a mismatch between srcImage->yuvRange and dstImage->yuvRange
  193|       |        // because libavif allows for 'colr' and AV1 OBU video range values to differ.
  194|  5.63k|    }
  195|  6.15k|    const size_t bytesPerPixel = avifImageUsesU16(srcImage) ? 2 : 1;
  ------------------
  |  Branch (195:34): [True: 3.37k, False: 2.77k]
  ------------------
  196|       |
  197|  6.15k|    const avifBool skipColor = !(planes & AVIF_PLANES_YUV);
  198|  6.15k|    const avifBool skipAlpha = !(planes & AVIF_PLANES_A);
  199|  30.7k|    for (int c = AVIF_CHAN_Y; c <= AVIF_CHAN_A; ++c) {
  ------------------
  |  Branch (199:31): [True: 24.6k, False: 6.15k]
  ------------------
  200|  24.6k|        const avifBool alpha = c == AVIF_CHAN_A;
  201|  24.6k|        if ((skipColor && !alpha) || (skipAlpha && alpha)) {
  ------------------
  |  Branch (201:14): [True: 2.06k, False: 22.5k]
  |  Branch (201:27): [True: 1.55k, False: 517]
  |  Branch (201:39): [True: 7.84k, False: 15.2k]
  |  Branch (201:52): [True: 1.96k, False: 5.88k]
  ------------------
  202|  3.51k|            continue;
  203|  3.51k|        }
  204|       |
  205|  21.1k|        const uint32_t planeWidth = avifImagePlaneWidth(srcImage, c);
  206|  21.1k|        const uint32_t planeHeight = avifImagePlaneHeight(srcImage, c);
  207|  21.1k|        const uint8_t * srcRow = avifImagePlane(srcImage, c);
  208|  21.1k|        uint8_t * dstRow = avifImagePlane(dstImage, c);
  209|  21.1k|        const uint32_t srcRowBytes = avifImagePlaneRowBytes(srcImage, c);
  210|  21.1k|        const uint32_t dstRowBytes = avifImagePlaneRowBytes(dstImage, c);
  211|  21.1k|        assert(!srcRow == !dstRow);
  212|  21.1k|        if (!srcRow) {
  ------------------
  |  Branch (212:13): [True: 5.58k, False: 15.5k]
  ------------------
  213|  5.58k|            continue;
  214|  5.58k|        }
  215|  21.1k|        assert(planeWidth == avifImagePlaneWidth(dstImage, c));
  216|  15.5k|        assert(planeHeight == avifImagePlaneHeight(dstImage, c));
  217|       |
  218|  15.5k|        const size_t planeWidthBytes = planeWidth * bytesPerPixel;
  219|  13.1M|        for (uint32_t y = 0; y < planeHeight; ++y) {
  ------------------
  |  Branch (219:30): [True: 13.1M, False: 15.5k]
  ------------------
  220|  13.1M|            memcpy(dstRow, srcRow, planeWidthBytes);
  221|  13.1M|            srcRow += srcRowBytes;
  222|  13.1M|            dstRow += dstRowBytes;
  223|  13.1M|        }
  224|  15.5k|    }
  225|  6.15k|}
avifImageCopy:
  253|  3.67k|{
  254|  3.67k|    avifImageFreePlanes(dstImage, AVIF_PLANES_ALL);
  255|  3.67k|    avifImageCopyNoAlloc(dstImage, srcImage);
  256|       |
  257|  3.67k|    AVIF_CHECKRES(avifImageSetProfileICC(dstImage, srcImage->icc.data, srcImage->icc.size));
  ------------------
  |  |   54|  3.67k|    do {                                  \
  |  |   55|  3.67k|        const avifResult result__ = (A);  \
  |  |   56|  3.67k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 3.67k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  3.67k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.67k]
  |  |  ------------------
  ------------------
  258|       |
  259|  3.67k|    AVIF_CHECKRES(avifRWDataSet(&dstImage->exif, srcImage->exif.data, srcImage->exif.size));
  ------------------
  |  |   54|  3.67k|    do {                                  \
  |  |   55|  3.67k|        const avifResult result__ = (A);  \
  |  |   56|  3.67k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 3.67k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  3.67k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.67k]
  |  |  ------------------
  ------------------
  260|  3.67k|    AVIF_CHECKRES(avifImageSetMetadataXMP(dstImage, srcImage->xmp.data, srcImage->xmp.size));
  ------------------
  |  |   54|  3.67k|    do {                                  \
  |  |   55|  3.67k|        const avifResult result__ = (A);  \
  |  |   56|  3.67k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 3.67k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  3.67k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.67k]
  |  |  ------------------
  ------------------
  261|       |
  262|  3.67k|    AVIF_CHECKRES(avifImageCopyProperties(dstImage, srcImage));
  ------------------
  |  |   54|  3.67k|    do {                                  \
  |  |   55|  3.67k|        const avifResult result__ = (A);  \
  |  |   56|  3.67k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 3.67k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  3.67k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.67k]
  |  |  ------------------
  ------------------
  263|       |
  264|  3.67k|    if ((planes & AVIF_PLANES_YUV) && srcImage->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (264:9): [True: 3.67k, False: 0]
  |  Branch (264:39): [True: 3.65k, False: 20]
  ------------------
  265|  3.65k|        if ((srcImage->yuvFormat != AVIF_PIXEL_FORMAT_YUV400) &&
  ------------------
  |  Branch (265:13): [True: 2.73k, False: 919]
  ------------------
  266|  2.73k|            (!srcImage->yuvPlanes[AVIF_CHAN_U] || !srcImage->yuvPlanes[AVIF_CHAN_V])) {
  ------------------
  |  Branch (266:14): [True: 0, False: 2.73k]
  |  Branch (266:51): [True: 0, False: 2.73k]
  ------------------
  267|      0|            return AVIF_RESULT_INVALID_ARGUMENT;
  268|      0|        }
  269|  3.65k|        const avifResult allocationResult = avifImageAllocatePlanes(dstImage, AVIF_PLANES_YUV);
  270|  3.65k|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (270:13): [True: 0, False: 3.65k]
  ------------------
  271|      0|            return allocationResult;
  272|      0|        }
  273|  3.65k|    }
  274|  3.67k|    if ((planes & AVIF_PLANES_A) && srcImage->alphaPlane) {
  ------------------
  |  Branch (274:9): [True: 3.67k, False: 0]
  |  Branch (274:37): [True: 311, False: 3.36k]
  ------------------
  275|    311|        const avifResult allocationResult = avifImageAllocatePlanes(dstImage, AVIF_PLANES_A);
  276|    311|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (276:13): [True: 0, False: 311]
  ------------------
  277|      0|            return allocationResult;
  278|      0|        }
  279|    311|    }
  280|  3.67k|    avifImageCopySamples(dstImage, srcImage, planes);
  281|       |
  282|  3.67k|    if (srcImage->gainMap) {
  ------------------
  |  Branch (282:9): [True: 57, False: 3.62k]
  ------------------
  283|     57|        if (!dstImage->gainMap) {
  ------------------
  |  Branch (283:13): [True: 57, False: 0]
  ------------------
  284|     57|            dstImage->gainMap = avifGainMapCreate();
  285|     57|            AVIF_CHECKERR(dstImage->gainMap, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|     57|    do {                        \
  |  |   46|     57|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 57]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     57|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 57]
  |  |  ------------------
  ------------------
  286|     57|        }
  287|    228|        for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (287:25): [True: 171, False: 57]
  ------------------
  288|    171|            dstImage->gainMap->gainMapMin[c] = srcImage->gainMap->gainMapMin[c];
  289|    171|            dstImage->gainMap->gainMapMax[c] = srcImage->gainMap->gainMapMax[c];
  290|    171|            dstImage->gainMap->gainMapGamma[c] = srcImage->gainMap->gainMapGamma[c];
  291|    171|            dstImage->gainMap->baseOffset[c] = srcImage->gainMap->baseOffset[c];
  292|    171|            dstImage->gainMap->alternateOffset[c] = srcImage->gainMap->alternateOffset[c];
  293|    171|        }
  294|     57|        dstImage->gainMap->baseHdrHeadroom = srcImage->gainMap->baseHdrHeadroom;
  295|     57|        dstImage->gainMap->alternateHdrHeadroom = srcImage->gainMap->alternateHdrHeadroom;
  296|     57|        dstImage->gainMap->useBaseColorSpace = srcImage->gainMap->useBaseColorSpace;
  297|     57|        AVIF_CHECKRES(avifRWDataSet(&dstImage->gainMap->altICC, srcImage->gainMap->altICC.data, srcImage->gainMap->altICC.size));
  ------------------
  |  |   54|     57|    do {                                  \
  |  |   55|     57|        const avifResult result__ = (A);  \
  |  |   56|     57|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 57]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     57|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 57]
  |  |  ------------------
  ------------------
  298|     57|        dstImage->gainMap->altColorPrimaries = srcImage->gainMap->altColorPrimaries;
  299|     57|        dstImage->gainMap->altTransferCharacteristics = srcImage->gainMap->altTransferCharacteristics;
  300|     57|        dstImage->gainMap->altMatrixCoefficients = srcImage->gainMap->altMatrixCoefficients;
  301|     57|        dstImage->gainMap->altDepth = srcImage->gainMap->altDepth;
  302|     57|        dstImage->gainMap->altPlaneCount = srcImage->gainMap->altPlaneCount;
  303|     57|        dstImage->gainMap->altCLLI = srcImage->gainMap->altCLLI;
  304|       |
  305|     57|        if (srcImage->gainMap->image) {
  ------------------
  |  Branch (305:13): [True: 45, False: 12]
  ------------------
  306|     45|            if (!dstImage->gainMap->image) {
  ------------------
  |  Branch (306:17): [True: 45, False: 0]
  ------------------
  307|     45|                dstImage->gainMap->image = avifImageCreateEmpty();
  308|     45|            }
  309|     45|            AVIF_CHECKRES(avifImageCopy(dstImage->gainMap->image, srcImage->gainMap->image, planes));
  ------------------
  |  |   54|     45|    do {                                  \
  |  |   55|     45|        const avifResult result__ = (A);  \
  |  |   56|     45|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 45]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     45|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 45]
  |  |  ------------------
  ------------------
  310|     45|        } else if (dstImage->gainMap->image) {
  ------------------
  |  Branch (310:20): [True: 0, False: 12]
  ------------------
  311|      0|            avifImageDestroy(dstImage->gainMap->image);
  312|      0|            dstImage->gainMap->image = NULL;
  313|      0|        }
  314|  3.62k|    } else if (dstImage->gainMap) {
  ------------------
  |  Branch (314:16): [True: 0, False: 3.62k]
  ------------------
  315|      0|        avifGainMapDestroy(dstImage->gainMap);
  316|      0|        dstImage->gainMap = NULL;
  317|      0|    }
  318|       |
  319|  3.67k|    return AVIF_RESULT_OK;
  320|  3.67k|}
avifImageSetViewRect:
  323|  7.43k|{
  324|  7.43k|    avifPixelFormatInfo formatInfo;
  325|  7.43k|    avifGetPixelFormatInfo(srcImage->yuvFormat, &formatInfo);
  326|  7.43k|    if ((rect->width > srcImage->width) || (rect->height > srcImage->height) || (rect->x > (srcImage->width - rect->width)) ||
  ------------------
  |  Branch (326:9): [True: 0, False: 7.43k]
  |  Branch (326:44): [True: 0, False: 7.43k]
  |  Branch (326:81): [True: 0, False: 7.43k]
  ------------------
  327|  7.43k|        (rect->y > (srcImage->height - rect->height))) {
  ------------------
  |  Branch (327:9): [True: 0, False: 7.43k]
  ------------------
  328|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  329|      0|    }
  330|  7.43k|    if (!formatInfo.monochrome && ((rect->x & formatInfo.chromaShiftX) || (rect->y & formatInfo.chromaShiftY))) {
  ------------------
  |  Branch (330:9): [True: 6.88k, False: 547]
  |  Branch (330:36): [True: 0, False: 6.88k]
  |  Branch (330:75): [True: 0, False: 6.88k]
  ------------------
  331|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  332|      0|    }
  333|  7.43k|    avifImageFreePlanes(dstImage, AVIF_PLANES_ALL); // dstImage->imageOwnsYUVPlanes and dstImage->imageOwnsAlphaPlane set to AVIF_FALSE.
  334|  7.43k|    avifImageCopyNoAlloc(dstImage, srcImage);
  335|  7.43k|    dstImage->width = rect->width;
  336|  7.43k|    dstImage->height = rect->height;
  337|  7.43k|    const uint32_t pixelBytes = (srcImage->depth > 8) ? 2 : 1;
  ------------------
  |  Branch (337:33): [True: 3.17k, False: 4.25k]
  ------------------
  338|  7.43k|    if (srcImage->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (338:9): [True: 6.39k, False: 1.03k]
  ------------------
  339|  25.5k|        for (int yuvPlane = AVIF_CHAN_Y; yuvPlane <= AVIF_CHAN_V; ++yuvPlane) {
  ------------------
  |  Branch (339:42): [True: 19.1k, False: 6.39k]
  ------------------
  340|  19.1k|            if (srcImage->yuvRowBytes[yuvPlane]) {
  ------------------
  |  Branch (340:17): [True: 18.0k, False: 1.09k]
  ------------------
  341|  18.0k|                const size_t planeX = (yuvPlane == AVIF_CHAN_Y) ? rect->x : (rect->x >> formatInfo.chromaShiftX);
  ------------------
  |  Branch (341:39): [True: 6.39k, False: 11.7k]
  ------------------
  342|  18.0k|                const size_t planeY = (yuvPlane == AVIF_CHAN_Y) ? rect->y : (rect->y >> formatInfo.chromaShiftY);
  ------------------
  |  Branch (342:39): [True: 6.39k, False: 11.7k]
  ------------------
  343|  18.0k|                dstImage->yuvPlanes[yuvPlane] =
  344|  18.0k|                    srcImage->yuvPlanes[yuvPlane] + planeY * srcImage->yuvRowBytes[yuvPlane] + planeX * pixelBytes;
  345|  18.0k|                dstImage->yuvRowBytes[yuvPlane] = srcImage->yuvRowBytes[yuvPlane];
  346|  18.0k|            }
  347|  19.1k|        }
  348|  6.39k|    }
  349|  7.43k|    if (srcImage->alphaPlane) {
  ------------------
  |  Branch (349:9): [True: 1.55k, False: 5.88k]
  ------------------
  350|  1.55k|        dstImage->alphaPlane = srcImage->alphaPlane + (size_t)rect->y * srcImage->alphaRowBytes + (size_t)rect->x * pixelBytes;
  351|  1.55k|        dstImage->alphaRowBytes = srcImage->alphaRowBytes;
  352|  1.55k|    }
  353|  7.43k|    return AVIF_RESULT_OK;
  354|  7.43k|}
avifImageDestroy:
  357|   601k|{
  358|   601k|    if (image->gainMap) {
  ------------------
  |  Branch (358:9): [True: 271, False: 600k]
  ------------------
  359|    271|        avifGainMapDestroy(image->gainMap);
  360|    271|    }
  361|   601k|    avifImageFreePlanes(image, AVIF_PLANES_ALL);
  362|   601k|    avifRWDataFree(&image->icc);
  363|   601k|    avifRWDataFree(&image->exif);
  364|   601k|    avifRWDataFree(&image->xmp);
  365|   613k|    for (size_t i = 0; i < image->numProperties; ++i) {
  ------------------
  |  Branch (365:24): [True: 12.2k, False: 601k]
  ------------------
  366|  12.2k|        avifRWDataFree(&image->properties[i].boxPayload);
  367|  12.2k|    }
  368|   601k|    avifFree(image->properties);
  369|       |    image->properties = NULL;
  370|   601k|    image->numProperties = 0;
  371|   601k|    avifFree(image);
  372|   601k|}
avifImageSetProfileICC:
  375|  3.67k|{
  376|  3.67k|    return avifRWDataSet(&image->icc, icc, iccSize);
  377|  3.67k|}
avifImageSetMetadataXMP:
  380|  3.69k|{
  381|  3.69k|    return avifRWDataSet(&image->xmp, xmp, xmpSize);
  382|  3.69k|}
avifImagePushProperty:
  385|  9.10k|{
  386|  9.10k|    AVIF_CHECKERR(image->numProperties < SIZE_MAX / sizeof(avifImageItemProperty), AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   45|  9.10k|    do {                        \
  |  |   46|  9.10k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 9.10k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  9.10k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 9.10k]
  |  |  ------------------
  ------------------
  387|       |    // Shallow copy the current properties.
  388|  9.10k|    const size_t numProperties = image->numProperties + 1;
  389|  9.10k|    avifImageItemProperty * const properties = (avifImageItemProperty *)avifAlloc(numProperties * sizeof(properties[0]));
  390|  9.10k|    AVIF_CHECKERR(properties != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  9.10k|    do {                        \
  |  |   46|  9.10k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 9.10k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  9.10k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 9.10k]
  |  |  ------------------
  ------------------
  391|  9.10k|    if (image->numProperties != 0) {
  ------------------
  |  Branch (391:9): [True: 2.65k, False: 6.45k]
  ------------------
  392|  2.65k|        memcpy(properties, image->properties, image->numProperties * sizeof(properties[0]));
  393|  2.65k|    }
  394|       |    // Free the old array and replace it by the new one.
  395|  9.10k|    avifFree(image->properties);
  396|  9.10k|    image->properties = properties;
  397|  9.10k|    image->numProperties = numProperties;
  398|       |    // Set the new property.
  399|  9.10k|    avifImageItemProperty * const property = &image->properties[image->numProperties - 1];
  400|  9.10k|    memset(property, 0, sizeof(*property));
  401|  9.10k|    memcpy(property->boxtype, boxtype, sizeof(property->boxtype));
  402|  9.10k|    memcpy(property->usertype, usertype, sizeof(property->usertype));
  403|  9.10k|    AVIF_CHECKRES(avifRWDataSet(&property->boxPayload, boxPayload, boxPayloadSize));
  ------------------
  |  |   54|  9.10k|    do {                                  \
  |  |   55|  9.10k|        const avifResult result__ = (A);  \
  |  |   56|  9.10k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 9.10k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  9.10k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 9.10k]
  |  |  ------------------
  ------------------
  404|  9.10k|    return AVIF_RESULT_OK;
  405|  9.10k|}
avifImageAllocatePlanes:
  428|  13.3k|{
  429|  13.3k|    if (image->width == 0 || image->height == 0 || image->depth == 0 || image->depth > 16) {
  ------------------
  |  Branch (429:9): [True: 0, False: 13.3k]
  |  Branch (429:30): [True: 0, False: 13.3k]
  |  Branch (429:52): [True: 0, False: 13.3k]
  |  Branch (429:73): [True: 0, False: 13.3k]
  ------------------
  430|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  431|      0|    }
  432|  13.3k|    const uint32_t channelSize = avifImageUsesU16(image) ? 2 : 1;
  ------------------
  |  Branch (432:34): [True: 7.93k, False: 5.43k]
  ------------------
  433|  13.3k|    if (image->width > UINT32_MAX / channelSize) {
  ------------------
  |  Branch (433:9): [True: 0, False: 13.3k]
  ------------------
  434|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  435|      0|    }
  436|  13.3k|    const uint32_t fullRowBytes = channelSize * image->width;
  437|  13.3k|    if (image->height > PTRDIFF_MAX / fullRowBytes) {
  ------------------
  |  Branch (437:9): [True: 0, False: 13.3k]
  ------------------
  438|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  439|      0|    }
  440|  13.3k|    const size_t fullSize = (size_t)fullRowBytes * image->height;
  441|       |
  442|  13.3k|    if ((planes & AVIF_PLANES_YUV) && (image->yuvFormat != AVIF_PIXEL_FORMAT_NONE)) {
  ------------------
  |  Branch (442:9): [True: 11.7k, False: 1.66k]
  |  Branch (442:39): [True: 11.7k, False: 0]
  ------------------
  443|  11.7k|        avifPixelFormatInfo info;
  444|  11.7k|        avifGetPixelFormatInfo(image->yuvFormat, &info);
  445|       |
  446|  11.7k|        image->imageOwnsYUVPlanes = AVIF_TRUE;
  ------------------
  |  |   88|  11.7k|#define AVIF_TRUE 1
  ------------------
  447|  11.7k|        if (!image->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (447:13): [True: 11.7k, False: 0]
  ------------------
  448|  11.7k|            image->yuvPlanes[AVIF_CHAN_Y] = (uint8_t *)avifAlloc(fullSize);
  449|  11.7k|            if (!image->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (449:17): [True: 0, False: 11.7k]
  ------------------
  450|      0|                return AVIF_RESULT_OUT_OF_MEMORY;
  451|      0|            }
  452|  11.7k|            image->yuvRowBytes[AVIF_CHAN_Y] = fullRowBytes;
  453|  11.7k|        }
  454|       |
  455|  11.7k|        if (!info.monochrome) {
  ------------------
  |  Branch (455:13): [True: 9.12k, False: 2.58k]
  ------------------
  456|       |            // Intermediary computation as 64 bits in case width or height is exactly UINT32_MAX.
  457|  9.12k|            const uint32_t shiftedW = (uint32_t)(((uint64_t)image->width + info.chromaShiftX) >> info.chromaShiftX);
  458|  9.12k|            const uint32_t shiftedH = (uint32_t)(((uint64_t)image->height + info.chromaShiftY) >> info.chromaShiftY);
  459|       |
  460|       |            // These are less than or equal to fullRowBytes/fullSize. No need to check overflows.
  461|  9.12k|            const uint32_t uvRowBytes = channelSize * shiftedW;
  462|  9.12k|            const size_t uvSize = (size_t)uvRowBytes * shiftedH;
  463|       |
  464|  27.3k|            for (int uvPlane = AVIF_CHAN_U; uvPlane <= AVIF_CHAN_V; ++uvPlane) {
  ------------------
  |  Branch (464:45): [True: 18.2k, False: 9.12k]
  ------------------
  465|  18.2k|                if (!image->yuvPlanes[uvPlane]) {
  ------------------
  |  Branch (465:21): [True: 18.2k, False: 0]
  ------------------
  466|  18.2k|                    image->yuvPlanes[uvPlane] = (uint8_t *)avifAlloc(uvSize);
  467|  18.2k|                    if (!image->yuvPlanes[uvPlane]) {
  ------------------
  |  Branch (467:25): [True: 0, False: 18.2k]
  ------------------
  468|      0|                        return AVIF_RESULT_OUT_OF_MEMORY;
  469|      0|                    }
  470|  18.2k|                    image->yuvRowBytes[uvPlane] = uvRowBytes;
  471|  18.2k|                }
  472|  18.2k|            }
  473|  9.12k|        }
  474|  11.7k|    }
  475|  13.3k|    if (planes & AVIF_PLANES_A) {
  ------------------
  |  Branch (475:9): [True: 1.66k, False: 11.7k]
  ------------------
  476|  1.66k|        image->imageOwnsAlphaPlane = AVIF_TRUE;
  ------------------
  |  |   88|  1.66k|#define AVIF_TRUE 1
  ------------------
  477|  1.66k|        if (!image->alphaPlane) {
  ------------------
  |  Branch (477:13): [True: 1.66k, False: 0]
  ------------------
  478|  1.66k|            image->alphaPlane = (uint8_t *)avifAlloc(fullSize);
  479|  1.66k|            if (!image->alphaPlane) {
  ------------------
  |  Branch (479:17): [True: 0, False: 1.66k]
  ------------------
  480|      0|                return AVIF_RESULT_OUT_OF_MEMORY;
  481|      0|            }
  482|  1.66k|            image->alphaRowBytes = fullRowBytes;
  483|  1.66k|        }
  484|  1.66k|    }
  485|  13.3k|    return AVIF_RESULT_OK;
  486|  13.3k|}
avifImageFreePlanes:
  489|   651k|{
  490|   651k|    if ((planes & AVIF_PLANES_YUV) && (image->yuvFormat != AVIF_PIXEL_FORMAT_NONE)) {
  ------------------
  |  Branch (490:9): [True: 647k, False: 3.55k]
  |  Branch (490:39): [True: 43.5k, False: 604k]
  ------------------
  491|  43.5k|        if (image->imageOwnsYUVPlanes) {
  ------------------
  |  Branch (491:13): [True: 11.7k, False: 31.8k]
  ------------------
  492|  11.7k|            avifFree(image->yuvPlanes[AVIF_CHAN_Y]);
  493|  11.7k|            avifFree(image->yuvPlanes[AVIF_CHAN_U]);
  494|  11.7k|            avifFree(image->yuvPlanes[AVIF_CHAN_V]);
  495|  11.7k|        }
  496|  43.5k|        image->yuvPlanes[AVIF_CHAN_Y] = NULL;
  497|  43.5k|        image->yuvRowBytes[AVIF_CHAN_Y] = 0;
  498|  43.5k|        image->yuvPlanes[AVIF_CHAN_U] = NULL;
  499|  43.5k|        image->yuvRowBytes[AVIF_CHAN_U] = 0;
  500|  43.5k|        image->yuvPlanes[AVIF_CHAN_V] = NULL;
  501|  43.5k|        image->yuvRowBytes[AVIF_CHAN_V] = 0;
  502|  43.5k|        image->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  43.5k|#define AVIF_FALSE 0
  ------------------
  503|  43.5k|    }
  504|   651k|    if (planes & AVIF_PLANES_A) {
  ------------------
  |  Branch (504:9): [True: 636k, False: 15.0k]
  ------------------
  505|   636k|        if (image->imageOwnsAlphaPlane) {
  ------------------
  |  Branch (505:13): [True: 1.27k, False: 634k]
  ------------------
  506|  1.27k|            avifFree(image->alphaPlane);
  507|  1.27k|        }
  508|   636k|        image->alphaPlane = NULL;
  509|   636k|        image->alphaRowBytes = 0;
  510|   636k|        image->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|   636k|#define AVIF_FALSE 0
  ------------------
  511|   636k|    }
  512|   651k|}
avifImageStealPlanes:
  515|  6.81k|{
  516|  6.81k|    avifImageFreePlanes(dstImage, planes);
  517|       |
  518|  6.81k|    if (planes & AVIF_PLANES_YUV) {
  ------------------
  |  Branch (518:9): [True: 6.29k, False: 513]
  ------------------
  519|  6.29k|        dstImage->yuvPlanes[AVIF_CHAN_Y] = srcImage->yuvPlanes[AVIF_CHAN_Y];
  520|  6.29k|        dstImage->yuvRowBytes[AVIF_CHAN_Y] = srcImage->yuvRowBytes[AVIF_CHAN_Y];
  521|  6.29k|        dstImage->yuvPlanes[AVIF_CHAN_U] = srcImage->yuvPlanes[AVIF_CHAN_U];
  522|  6.29k|        dstImage->yuvRowBytes[AVIF_CHAN_U] = srcImage->yuvRowBytes[AVIF_CHAN_U];
  523|  6.29k|        dstImage->yuvPlanes[AVIF_CHAN_V] = srcImage->yuvPlanes[AVIF_CHAN_V];
  524|  6.29k|        dstImage->yuvRowBytes[AVIF_CHAN_V] = srcImage->yuvRowBytes[AVIF_CHAN_V];
  525|       |
  526|  6.29k|        srcImage->yuvPlanes[AVIF_CHAN_Y] = NULL;
  527|  6.29k|        srcImage->yuvRowBytes[AVIF_CHAN_Y] = 0;
  528|  6.29k|        srcImage->yuvPlanes[AVIF_CHAN_U] = NULL;
  529|  6.29k|        srcImage->yuvRowBytes[AVIF_CHAN_U] = 0;
  530|  6.29k|        srcImage->yuvPlanes[AVIF_CHAN_V] = NULL;
  531|  6.29k|        srcImage->yuvRowBytes[AVIF_CHAN_V] = 0;
  532|       |
  533|  6.29k|        dstImage->yuvFormat = srcImage->yuvFormat;
  534|  6.29k|        dstImage->imageOwnsYUVPlanes = srcImage->imageOwnsYUVPlanes;
  535|  6.29k|        srcImage->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  6.29k|#define AVIF_FALSE 0
  ------------------
  536|  6.29k|    }
  537|  6.81k|    if (planes & AVIF_PLANES_A) {
  ------------------
  |  Branch (537:9): [True: 591, False: 6.21k]
  ------------------
  538|    591|        dstImage->alphaPlane = srcImage->alphaPlane;
  539|    591|        dstImage->alphaRowBytes = srcImage->alphaRowBytes;
  540|       |
  541|    591|        srcImage->alphaPlane = NULL;
  542|    591|        srcImage->alphaRowBytes = 0;
  543|       |
  544|    591|        dstImage->imageOwnsAlphaPlane = srcImage->imageOwnsAlphaPlane;
  545|    591|        srcImage->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|    591|#define AVIF_FALSE 0
  ------------------
  546|    591|    }
  547|  6.81k|}
avifImageUsesU16:
  550|   519M|{
  551|   519M|    return (image->depth > 8);
  552|   519M|}
avifImagePlane:
  583|   519M|{
  584|   519M|    if ((channel == AVIF_CHAN_Y) || (channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (584:9): [True: 173M, False: 346M]
  |  Branch (584:37): [True: 173M, False: 173M]
  |  Branch (584:65): [True: 173M, False: 8.85k]
  ------------------
  585|   519M|        return image->yuvPlanes[channel];
  586|   519M|    }
  587|  8.85k|    if (channel == AVIF_CHAN_A) {
  ------------------
  |  Branch (587:9): [True: 8.85k, False: 0]
  ------------------
  588|  8.85k|        return image->alphaPlane;
  589|  8.85k|    }
  590|      0|    return NULL;
  591|  8.85k|}
avifImagePlaneRowBytes:
  594|   519M|{
  595|   519M|    if ((channel == AVIF_CHAN_Y) || (channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (595:9): [True: 173M, False: 346M]
  |  Branch (595:37): [True: 173M, False: 173M]
  |  Branch (595:65): [True: 173M, False: 8.85k]
  ------------------
  596|   519M|        return image->yuvRowBytes[channel];
  597|   519M|    }
  598|  8.85k|    if (channel == AVIF_CHAN_A) {
  ------------------
  |  Branch (598:9): [True: 8.85k, False: 0]
  ------------------
  599|  8.85k|        return image->alphaRowBytes;
  600|  8.85k|    }
  601|      0|    return 0;
  602|  8.85k|}
avifImagePlaneWidth:
  605|  60.6k|{
  606|  60.6k|    if (channel == AVIF_CHAN_Y) {
  ------------------
  |  Branch (606:9): [True: 16.9k, False: 43.6k]
  ------------------
  607|  16.9k|        return image->width;
  608|  16.9k|    }
  609|  43.6k|    if ((channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (609:9): [True: 23.8k, False: 19.7k]
  |  Branch (609:37): [True: 15.3k, False: 4.42k]
  ------------------
  610|  39.2k|        avifPixelFormatInfo formatInfo;
  611|  39.2k|        avifGetPixelFormatInfo(image->yuvFormat, &formatInfo);
  612|  39.2k|        if (formatInfo.monochrome) {
  ------------------
  |  Branch (612:13): [True: 4.99k, False: 34.2k]
  ------------------
  613|  4.99k|            return 0;
  614|  4.99k|        }
  615|  34.2k|        return (image->width + formatInfo.chromaShiftX) >> formatInfo.chromaShiftX;
  616|  39.2k|    }
  617|  4.42k|    if ((channel == AVIF_CHAN_A) && image->alphaPlane) {
  ------------------
  |  Branch (617:9): [True: 4.42k, False: 0]
  |  Branch (617:37): [True: 1.06k, False: 3.36k]
  ------------------
  618|  1.06k|        return image->width;
  619|  1.06k|    }
  620|  3.36k|    return 0;
  621|  4.42k|}
avifImagePlaneHeight:
  624|  50.1k|{
  625|  50.1k|    if (channel == AVIF_CHAN_Y) {
  ------------------
  |  Branch (625:9): [True: 13.5k, False: 36.6k]
  ------------------
  626|  13.5k|        return image->height;
  627|  13.5k|    }
  628|  36.6k|    if ((channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (628:9): [True: 20.4k, False: 16.1k]
  |  Branch (628:37): [True: 11.9k, False: 4.19k]
  ------------------
  629|  32.4k|        avifPixelFormatInfo formatInfo;
  630|  32.4k|        avifGetPixelFormatInfo(image->yuvFormat, &formatInfo);
  631|  32.4k|        if (formatInfo.monochrome) {
  ------------------
  |  Branch (631:13): [True: 3.79k, False: 28.6k]
  ------------------
  632|  3.79k|            return 0;
  633|  3.79k|        }
  634|  28.6k|        return (image->height + formatInfo.chromaShiftY) >> formatInfo.chromaShiftY;
  635|  32.4k|    }
  636|  4.19k|    if ((channel == AVIF_CHAN_A) && image->alphaPlane) {
  ------------------
  |  Branch (636:9): [True: 4.19k, False: 0]
  |  Branch (636:37): [True: 828, False: 3.36k]
  ------------------
  637|    828|        return image->height;
  638|    828|    }
  639|  3.36k|    return 0;
  640|  4.19k|}
avifDimensionsTooLarge:
  643|   476k|{
  644|   476k|    if (width > (imageSizeLimit / height)) {
  ------------------
  |  Branch (644:9): [True: 67, False: 476k]
  ------------------
  645|     67|        return AVIF_TRUE;
  ------------------
  |  |   88|     67|#define AVIF_TRUE 1
  ------------------
  646|     67|    }
  647|   476k|    if ((imageDimensionLimit != 0) && ((width > imageDimensionLimit) || (height > imageDimensionLimit))) {
  ------------------
  |  Branch (647:9): [True: 476k, False: 0]
  |  Branch (647:40): [True: 30, False: 475k]
  |  Branch (647:73): [True: 24, False: 475k]
  ------------------
  648|     54|        return AVIF_TRUE;
  ------------------
  |  |   88|     54|#define AVIF_TRUE 1
  ------------------
  649|     54|    }
  650|   475k|    return AVIF_FALSE;
  ------------------
  |  |   89|   475k|#define AVIF_FALSE 0
  ------------------
  651|   476k|}
avifCodecDestroy:
  656|  13.3k|{
  657|  13.3k|    if (codec && codec->destroyInternal) {
  ------------------
  |  Branch (657:9): [True: 13.3k, False: 0]
  |  Branch (657:18): [True: 13.3k, False: 0]
  ------------------
  658|  13.3k|        codec->destroyInternal(codec);
  659|  13.3k|    }
  660|  13.3k|    avifFree(codec);
  661|  13.3k|}
avifIsAlpha:
 1017|   547k|{
 1018|   547k|    if (itemCategory == AVIF_ITEM_ALPHA) {
  ------------------
  |  Branch (1018:9): [True: 68.9k, False: 478k]
  ------------------
 1019|  68.9k|        return AVIF_TRUE;
  ------------------
  |  |   88|  68.9k|#define AVIF_TRUE 1
  ------------------
 1020|  68.9k|    }
 1021|   478k|    if (itemCategory >= AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA &&
  ------------------
  |  Branch (1021:9): [True: 0, False: 478k]
  ------------------
 1022|      0|        itemCategory < AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS) {
  ------------------
  |  |  424|      0|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  ------------------
  |  Branch (1022:9): [True: 0, False: 0]
  ------------------
 1023|      0|        return AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
 1024|      0|    }
 1025|   478k|    return AVIF_FALSE;
  ------------------
  |  |   89|   478k|#define AVIF_FALSE 0
  ------------------
 1026|   478k|}
avifAreGridDimensionsValid:
 1031|    320|{
 1032|       |    // ISO/IEC 23000-22:2019, Section 7.3.11.4.2:
 1033|       |    //   - the tile_width shall be greater than or equal to 64, and should be a multiple of 64
 1034|       |    //   - the tile_height shall be greater than or equal to 64, and should be a multiple of 64
 1035|       |    // The "should" part is ignored here.
 1036|    320|    if ((tileW < 64) || (tileH < 64)) {
  ------------------
  |  Branch (1036:9): [True: 1, False: 319]
  |  Branch (1036:25): [True: 1, False: 318]
  ------------------
 1037|      2|        avifDiagnosticsPrintf(diag,
 1038|      2|                              "Grid image tile width (%u) or height (%u) cannot be smaller than 64. "
 1039|      2|                              "See MIAF (ISO/IEC 23000-22:2019), Section 7.3.11.4.2",
 1040|      2|                              tileW,
 1041|      2|                              tileH);
 1042|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
 1043|      2|    }
 1044|       |
 1045|       |    // ISO/IEC 23000-22:2019, Section 7.3.11.4.2:
 1046|       |    //   - when the images are in the 4:2:2 chroma sampling format the horizontal tile offsets and widths,
 1047|       |    //     and the output width, shall be even numbers;
 1048|       |    //   - when the images are in the 4:2:0 chroma sampling format both the horizontal and vertical tile
 1049|       |    //     offsets and widths, and the output width and height, shall be even numbers.
 1050|       |    // If the rules above were not respected, the following problematic situation may happen:
 1051|       |    //   Some 4:2:0 image is 650 pixels wide and has 10 cell columns, each being 65 pixels wide.
 1052|       |    //   The chroma plane of the whole image is 325 pixels wide. The chroma plane of each cell is 33 pixels wide.
 1053|       |    //   33*10 - 325 gives 5 extra pixels with no specified destination in the reconstructed image.
 1054|       |
 1055|       |    // Tile offsets are not enforced since they depend on tile size (ISO/IEC 23008-12:2017, Section 6.6.2.3.1):
 1056|       |    //   The reconstructed image is formed by tiling the input images into a grid [...] without gap or overlap
 1057|    318|    if ((((yuvFormat == AVIF_PIXEL_FORMAT_YUV420) || (yuvFormat == AVIF_PIXEL_FORMAT_YUV422)) &&
  ------------------
  |  Branch (1057:11): [True: 45, False: 273]
  |  Branch (1057:54): [True: 10, False: 263]
  ------------------
 1058|     55|         (((imageW % 2) != 0) || ((tileW % 2) != 0))) ||
  ------------------
  |  Branch (1058:11): [True: 1, False: 54]
  |  Branch (1058:34): [True: 1, False: 53]
  ------------------
 1059|    316|        ((yuvFormat == AVIF_PIXEL_FORMAT_YUV420) && (((imageH % 2) != 0) || ((tileH % 2) != 0)))) {
  ------------------
  |  Branch (1059:10): [True: 43, False: 273]
  |  Branch (1059:54): [True: 1, False: 42]
  |  Branch (1059:77): [True: 1, False: 41]
  ------------------
 1060|      4|        avifDiagnosticsPrintf(diag,
 1061|      4|                              "Grid image width (%u) or height (%u) or tile width (%u) or height (%u) "
 1062|      4|                              "shall be even if chroma is subsampled in that dimension. "
 1063|      4|                              "See MIAF (ISO/IEC 23000-22:2019), Section 7.3.11.4.2",
 1064|      4|                              imageW,
 1065|      4|                              imageH,
 1066|      4|                              tileW,
 1067|      4|                              tileH);
 1068|      4|        return AVIF_FALSE;
  ------------------
  |  |   89|      4|#define AVIF_FALSE 0
  ------------------
 1069|      4|    }
 1070|    314|    return AVIF_TRUE;
  ------------------
  |  |   88|    314|#define AVIF_TRUE 1
  ------------------
 1071|    318|}
avifCodecTypeFromChoice:
 1241|  13.3k|{
 1242|  13.3k|    struct AvailableCodec * availableCodec = findAvailableCodec(choice, requiredFlags);
 1243|  13.3k|    if (availableCodec) {
  ------------------
  |  Branch (1243:9): [True: 13.3k, False: 0]
  ------------------
 1244|  13.3k|        return availableCodec->type;
 1245|  13.3k|    }
 1246|      0|    return AVIF_CODEC_TYPE_UNKNOWN;
 1247|  13.3k|}
avifCodecCreate:
 1260|  13.3k|{
 1261|  13.3k|    *codec = NULL;
 1262|  13.3k|    struct AvailableCodec * availableCodec = findAvailableCodec(choice, requiredFlags);
 1263|  13.3k|    AVIF_CHECKERR(availableCodec != NULL, AVIF_RESULT_NO_CODEC_AVAILABLE);
  ------------------
  |  |   45|  13.3k|    do {                        \
  |  |   46|  13.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 13.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
 1264|  13.3k|    *codec = availableCodec->create();
 1265|  13.3k|    AVIF_CHECKERR(*codec != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  13.3k|    do {                        \
  |  |   46|  13.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 13.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
 1266|  13.3k|    return AVIF_RESULT_OK;
 1267|  13.3k|}
avifGainMapCreate:
 1307|    271|{
 1308|    271|    avifGainMap * gainMap = (avifGainMap *)avifAlloc(sizeof(avifGainMap));
 1309|    271|    if (!gainMap) {
  ------------------
  |  Branch (1309:9): [True: 0, False: 271]
  ------------------
 1310|      0|        return NULL;
 1311|      0|    }
 1312|    271|    avifGainMapSetDefaults(gainMap);
 1313|       |    // Note that some functions like avifDecoderFindGainMapItem() allocate avifGainMap directly on
 1314|       |    // the stack instead of calling avifGainMapCreate() to simplify error handling. This works under
 1315|       |    // the assumption that no complex initialization (such as dynamic allocation of fields) takes
 1316|       |    // place here. If this function becomes more complex than one alloc + setDefaults, such code
 1317|       |    // might need to be changed.
 1318|    271|    return gainMap;
 1319|    271|}
avifGainMapSetDefaults:
 1322|  1.50k|{
 1323|  1.50k|    memset(gainMap, 0, sizeof(avifGainMap));
 1324|  1.50k|    gainMap->altColorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
 1325|  1.50k|    gainMap->altTransferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
 1326|  1.50k|    gainMap->altMatrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
 1327|  1.50k|    gainMap->altYUVRange = AVIF_RANGE_FULL;
 1328|  1.50k|    gainMap->useBaseColorSpace = AVIF_TRUE;
  ------------------
  |  |   88|  1.50k|#define AVIF_TRUE 1
  ------------------
 1329|       |    // Set all denominators to valid values (1).
 1330|  6.02k|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (1330:21): [True: 4.52k, False: 1.50k]
  ------------------
 1331|  4.52k|        gainMap->gainMapMin[i].d = 1;
 1332|  4.52k|        gainMap->gainMapMax[i].d = 1;
 1333|  4.52k|        gainMap->gainMapGamma[i].n = 1;
 1334|  4.52k|        gainMap->gainMapGamma[i].d = 1;
 1335|  4.52k|        gainMap->baseOffset[i].d = 1;
 1336|  4.52k|        gainMap->alternateOffset[i].d = 1;
 1337|  4.52k|    }
 1338|  1.50k|    gainMap->baseHdrHeadroom.d = 1;
 1339|  1.50k|    gainMap->alternateHdrHeadroom.d = 1;
 1340|  1.50k|}
avifGainMapDestroy:
 1343|    271|{
 1344|    271|    if (gainMap->image) {
  ------------------
  |  Branch (1344:9): [True: 199, False: 72]
  ------------------
 1345|    199|        avifImageDestroy(gainMap->image);
 1346|    199|    }
 1347|    271|    avifRWDataFree(&gainMap->altICC);
 1348|    271|    avifFree(gainMap);
 1349|    271|}
avif.c:avifImageCopyProperties:
  228|  3.67k|{
  229|  3.67k|    for (size_t i = 0; i < dstImage->numProperties; ++i) {
  ------------------
  |  Branch (229:24): [True: 0, False: 3.67k]
  ------------------
  230|      0|        avifRWDataFree(&dstImage->properties[i].boxPayload);
  231|      0|    }
  232|  3.67k|    avifFree(dstImage->properties);
  233|  3.67k|    dstImage->properties = NULL;
  234|  3.67k|    dstImage->numProperties = 0;
  235|       |
  236|  3.67k|    if (srcImage->numProperties != 0) {
  ------------------
  |  Branch (236:9): [True: 2.14k, False: 1.52k]
  ------------------
  237|  2.14k|        dstImage->properties = (avifImageItemProperty *)avifAlloc(srcImage->numProperties * sizeof(srcImage->properties[0]));
  238|  2.14k|        AVIF_CHECKERR(dstImage->properties != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  2.14k|    do {                        \
  |  |   46|  2.14k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 2.14k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  2.14k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2.14k]
  |  |  ------------------
  ------------------
  239|  2.14k|        memset(dstImage->properties, 0, srcImage->numProperties * sizeof(srcImage->properties[0]));
  240|  2.14k|        dstImage->numProperties = srcImage->numProperties;
  241|  5.28k|        for (size_t i = 0; i < srcImage->numProperties; ++i) {
  ------------------
  |  Branch (241:28): [True: 3.13k, False: 2.14k]
  ------------------
  242|  3.13k|            memcpy(dstImage->properties[i].boxtype, srcImage->properties[i].boxtype, sizeof(srcImage->properties[i].boxtype));
  243|  3.13k|            memcpy(dstImage->properties[i].usertype, srcImage->properties[i].usertype, sizeof(srcImage->properties[i].usertype));
  244|  3.13k|            AVIF_CHECKRES(avifRWDataSet(&dstImage->properties[i].boxPayload,
  ------------------
  |  |   54|  3.13k|    do {                                  \
  |  |   55|  3.13k|        const avifResult result__ = (A);  \
  |  |   56|  3.13k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 3.13k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  3.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.13k]
  |  |  ------------------
  ------------------
  245|  3.13k|                                        srcImage->properties[i].boxPayload.data,
  246|  3.13k|                                        srcImage->properties[i].boxPayload.size));
  247|  3.13k|        }
  248|  2.14k|    }
  249|  3.67k|    return AVIF_RESULT_OK;
  250|  3.67k|}
avif.c:findAvailableCodec:
 1214|  26.6k|{
 1215|  26.6k|    for (int i = 0; i < availableCodecsCount; ++i) {
  ------------------
  |  Branch (1215:21): [True: 26.6k, False: 0]
  ------------------
 1216|  26.6k|        if ((choice != AVIF_CODEC_CHOICE_AUTO) && (availableCodecs[i].choice != choice)) {
  ------------------
  |  Branch (1216:13): [True: 0, False: 26.6k]
  |  Branch (1216:51): [True: 0, False: 0]
  ------------------
 1217|      0|            continue;
 1218|      0|        }
 1219|  26.6k|        if (requiredFlags && ((availableCodecs[i].flags & requiredFlags) != requiredFlags)) {
  ------------------
  |  Branch (1219:13): [True: 26.6k, False: 0]
  |  Branch (1219:30): [True: 0, False: 26.6k]
  ------------------
 1220|      0|            continue;
 1221|      0|        }
 1222|  26.6k|        if ((choice == AVIF_CODEC_CHOICE_AUTO) && (availableCodecs[i].choice == AVIF_CODEC_CHOICE_AVM)) {
  ------------------
  |  Branch (1222:13): [True: 26.6k, False: 0]
  |  Branch (1222:51): [True: 0, False: 26.6k]
  ------------------
 1223|       |            // AV2 is experimental and cannot be the default, it must be explicitly selected.
 1224|      0|            continue;
 1225|      0|        }
 1226|  26.6k|        return &availableCodecs[i];
 1227|  26.6k|    }
 1228|      0|    return NULL;
 1229|  26.6k|}

avifCodecCreateDav1d:
  234|  13.3k|{
  235|  13.3k|    avifCodec * codec = (avifCodec *)avifAlloc(sizeof(avifCodec));
  236|  13.3k|    if (codec == NULL) {
  ------------------
  |  Branch (236:9): [True: 0, False: 13.3k]
  ------------------
  237|      0|        return NULL;
  238|      0|    }
  239|  13.3k|    memset(codec, 0, sizeof(struct avifCodec));
  240|  13.3k|    codec->getNextImage = dav1dCodecGetNextImage;
  241|  13.3k|    codec->destroyInternal = dav1dCodecDestroyInternal;
  242|       |
  243|  13.3k|    codec->internal = (struct avifCodecInternal *)avifAlloc(sizeof(struct avifCodecInternal));
  244|  13.3k|    if (codec->internal == NULL) {
  ------------------
  |  Branch (244:9): [True: 0, False: 13.3k]
  ------------------
  245|      0|        avifFree(codec);
  246|      0|        return NULL;
  247|      0|    }
  248|  13.3k|    memset(codec->internal, 0, sizeof(struct avifCodecInternal));
  249|  13.3k|    return codec;
  250|  13.3k|}
codec_dav1d.c:dav1dCodecGetNextImage:
   63|  15.0k|{
   64|  15.0k|    if (codec->internal->dav1dContext == NULL) {
  ------------------
  |  Branch (64:9): [True: 12.9k, False: 2.04k]
  ------------------
   65|  12.9k|        Dav1dSettings dav1dSettings;
   66|  12.9k|        dav1d_default_settings(&dav1dSettings);
   67|       |        // Give all available threads to decode a single frame as fast as possible
   68|  12.9k|#if DAV1D_API_VERSION_MAJOR >= 6
   69|  12.9k|        dav1dSettings.max_frame_delay = 1;
   70|  12.9k|        dav1dSettings.n_threads = AVIF_CLAMP(codec->maxThreads, 1, DAV1D_MAX_THREADS);
  ------------------
  |  |   18|  12.9k|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  ------------------
  |  |  |  Branch (18:35): [True: 0, False: 12.9k]
  |  |  |  Branch (18:60): [True: 0, False: 12.9k]
  |  |  ------------------
  ------------------
   71|       |#else
   72|       |        dav1dSettings.n_frame_threads = 1;
   73|       |        dav1dSettings.n_tile_threads = AVIF_CLAMP(codec->maxThreads, 1, DAV1D_MAX_TILE_THREADS);
   74|       |#endif // DAV1D_API_VERSION_MAJOR >= 6
   75|       |        // Set a maximum frame size limit to avoid OOM'ing fuzzers. In 32-bit builds, if
   76|       |        // frame_size_limit > 8192 * 8192, dav1d reduces frame_size_limit to 8192 * 8192 and logs
   77|       |        // a message, so we set frame_size_limit to at most 8192 * 8192 to avoid the dav1d_log
   78|       |        // message.
   79|  12.9k|        dav1dSettings.frame_size_limit = (sizeof(size_t) < 8) ? AVIF_MIN(codec->imageSizeLimit, 8192 * 8192) : codec->imageSizeLimit;
  ------------------
  |  |   19|      0|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (79:42): [Folded, False: 12.9k]
  ------------------
   80|  12.9k|        dav1dSettings.logger.cookie = codec;
   81|  12.9k|        dav1dSettings.logger.callback = avifDav1dLogCallback;
   82|  12.9k|        dav1dSettings.operating_point = codec->operatingPoint;
   83|  12.9k|        dav1dSettings.all_layers = codec->allLayers;
   84|       |
   85|  12.9k|        if (dav1d_open(&codec->internal->dav1dContext, &dav1dSettings) != 0) {
  ------------------
  |  Branch (85:13): [True: 0, False: 12.9k]
  ------------------
   86|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
   87|      0|        }
   88|  12.9k|    }
   89|       |
   90|  15.0k|    avifBool gotPicture = AVIF_FALSE;
  ------------------
  |  |   89|  15.0k|#define AVIF_FALSE 0
  ------------------
   91|  15.0k|    Dav1dPicture nextFrame;
   92|  15.0k|    memset(&nextFrame, 0, sizeof(Dav1dPicture));
   93|       |
   94|  15.0k|    Dav1dData dav1dData;
   95|  15.0k|    if (dav1d_data_wrap(&dav1dData, sample->data.data, sample->data.size, avifDav1dFreeCallback, NULL) != 0) {
  ------------------
  |  Branch (95:9): [True: 0, False: 15.0k]
  ------------------
   96|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
   97|      0|    }
   98|       |
   99|  15.0k|    int res;
  100|  15.0k|    for (;;) {
  101|  15.0k|        if (dav1dData.data) {
  ------------------
  |  Branch (101:13): [True: 15.0k, False: 0]
  ------------------
  102|  15.0k|            res = dav1d_send_data(codec->internal->dav1dContext, &dav1dData);
  103|  15.0k|            if ((res < 0) && (res != DAV1D_ERR(EAGAIN))) {
  ------------------
  |  Branch (103:17): [True: 4.49k, False: 10.5k]
  |  Branch (103:30): [True: 4.49k, False: 0]
  ------------------
  104|  4.49k|                dav1d_data_unref(&dav1dData);
  105|  4.49k|                return AVIF_FALSE;
  ------------------
  |  |   89|  4.49k|#define AVIF_FALSE 0
  ------------------
  106|  4.49k|            }
  107|  15.0k|        }
  108|       |
  109|  10.5k|        res = dav1d_get_picture(codec->internal->dav1dContext, &nextFrame);
  110|  10.5k|        if (res == DAV1D_ERR(EAGAIN)) {
  ------------------
  |  Branch (110:13): [True: 224, False: 10.3k]
  ------------------
  111|    224|            if (dav1dData.data) {
  ------------------
  |  Branch (111:17): [True: 0, False: 224]
  ------------------
  112|       |                // send more data
  113|      0|                continue;
  114|      0|            }
  115|    224|            return AVIF_FALSE;
  ------------------
  |  |   89|    224|#define AVIF_FALSE 0
  ------------------
  116|  10.3k|        } else if (res < 0) {
  ------------------
  |  Branch (116:20): [True: 0, False: 10.3k]
  ------------------
  117|       |            // No more frames
  118|      0|            if (dav1dData.data) {
  ------------------
  |  Branch (118:17): [True: 0, False: 0]
  ------------------
  119|      0|                dav1d_data_unref(&dav1dData);
  120|      0|            }
  121|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  122|  10.3k|        } else {
  123|       |            // Got a picture!
  124|  10.3k|            if ((sample->spatialID != AVIF_SPATIAL_ID_UNSET) && (sample->spatialID != nextFrame.frame_hdr->spatial_id)) {
  ------------------
  |  |  461|  10.3k|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  |  Branch (124:17): [True: 0, False: 10.3k]
  |  Branch (124:65): [True: 0, False: 0]
  ------------------
  125|       |                // Layer selection: skip this unwanted layer
  126|      0|                dav1d_picture_unref(&nextFrame);
  127|  10.3k|            } else {
  128|  10.3k|                gotPicture = AVIF_TRUE;
  ------------------
  |  |   88|  10.3k|#define AVIF_TRUE 1
  ------------------
  129|  10.3k|                break;
  130|  10.3k|            }
  131|  10.3k|        }
  132|  10.5k|    }
  133|  10.3k|    if (dav1dData.data) {
  ------------------
  |  Branch (133:9): [True: 0, False: 10.3k]
  ------------------
  134|      0|        dav1d_data_unref(&dav1dData);
  135|      0|    }
  136|       |
  137|       |    // Drain all buffered frames in the decoder.
  138|       |    //
  139|       |    // The sample should have only one frame of the desired layer. If there are more frames after
  140|       |    // that frame, we need to discard them so that they won't be mistakenly output when the decoder
  141|       |    // is used to decode another sample.
  142|  10.3k|    Dav1dPicture bufferedFrame;
  143|  10.3k|    memset(&bufferedFrame, 0, sizeof(Dav1dPicture));
  144|  11.4k|    do {
  145|  11.4k|        res = dav1d_get_picture(codec->internal->dav1dContext, &bufferedFrame);
  146|  11.4k|        if (res < 0) {
  ------------------
  |  Branch (146:13): [True: 10.3k, False: 1.16k]
  ------------------
  147|  10.3k|            if (res != DAV1D_ERR(EAGAIN)) {
  ------------------
  |  Branch (147:17): [True: 913, False: 9.39k]
  ------------------
  148|    913|                if (gotPicture) {
  ------------------
  |  Branch (148:21): [True: 913, False: 0]
  ------------------
  149|    913|                    dav1d_picture_unref(&nextFrame);
  150|    913|                }
  151|    913|                return AVIF_FALSE;
  ------------------
  |  |   89|    913|#define AVIF_FALSE 0
  ------------------
  152|    913|            }
  153|  10.3k|        } else {
  154|  1.16k|            dav1d_picture_unref(&bufferedFrame);
  155|  1.16k|        }
  156|  11.4k|    } while (res == 0);
  ------------------
  |  Branch (156:14): [True: 1.16k, False: 9.39k]
  ------------------
  157|       |
  158|  9.39k|    if (gotPicture) {
  ------------------
  |  Branch (158:9): [True: 9.39k, False: 0]
  ------------------
  159|  9.39k|        dav1d_picture_unref(&codec->internal->dav1dPicture);
  160|  9.39k|        codec->internal->dav1dPicture = nextFrame;
  161|  9.39k|        codec->internal->colorRange = codec->internal->dav1dPicture.seq_hdr->color_range ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED;
  ------------------
  |  Branch (161:39): [True: 4.54k, False: 4.84k]
  ------------------
  162|  9.39k|        codec->internal->hasPicture = AVIF_TRUE;
  ------------------
  |  |   88|  9.39k|#define AVIF_TRUE 1
  ------------------
  163|  9.39k|    } else {
  164|      0|        if (alpha && codec->internal->hasPicture) {
  ------------------
  |  Branch (164:13): [True: 0, False: 0]
  |  Branch (164:22): [True: 0, False: 0]
  ------------------
  165|       |            // Special case: reuse last alpha frame
  166|      0|        } else {
  167|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  168|      0|        }
  169|      0|    }
  170|       |
  171|  9.39k|    Dav1dPicture * dav1dImage = &codec->internal->dav1dPicture;
  172|  9.39k|    avifBool isColor = !alpha;
  173|  9.39k|    if (isColor) {
  ------------------
  |  Branch (173:9): [True: 8.31k, False: 1.07k]
  ------------------
  174|       |        // Color (YUV) planes - set image to correct size / format, fill color
  175|       |
  176|  8.31k|        avifPixelFormat yuvFormat = AVIF_PIXEL_FORMAT_NONE;
  177|  8.31k|        switch (dav1dImage->p.layout) {
  ------------------
  |  Branch (177:17): [True: 8.31k, False: 0]
  ------------------
  178|  1.70k|            case DAV1D_PIXEL_LAYOUT_I400:
  ------------------
  |  Branch (178:13): [True: 1.70k, False: 6.61k]
  ------------------
  179|  1.70k|                yuvFormat = AVIF_PIXEL_FORMAT_YUV400;
  180|  1.70k|                break;
  181|  2.22k|            case DAV1D_PIXEL_LAYOUT_I420:
  ------------------
  |  Branch (181:13): [True: 2.22k, False: 6.09k]
  ------------------
  182|  2.22k|                yuvFormat = AVIF_PIXEL_FORMAT_YUV420;
  183|  2.22k|                break;
  184|    323|            case DAV1D_PIXEL_LAYOUT_I422:
  ------------------
  |  Branch (184:13): [True: 323, False: 7.99k]
  ------------------
  185|    323|                yuvFormat = AVIF_PIXEL_FORMAT_YUV422;
  186|    323|                break;
  187|  4.07k|            case DAV1D_PIXEL_LAYOUT_I444:
  ------------------
  |  Branch (187:13): [True: 4.07k, False: 4.24k]
  ------------------
  188|  4.07k|                yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  189|  4.07k|                break;
  190|  8.31k|        }
  191|       |
  192|  8.31k|        image->width = dav1dImage->p.w;
  193|  8.31k|        image->height = dav1dImage->p.h;
  194|  8.31k|        image->depth = dav1dImage->p.bpc;
  195|       |
  196|  8.31k|        image->yuvFormat = yuvFormat;
  197|  8.31k|        image->yuvRange = codec->internal->colorRange;
  198|  8.31k|        image->yuvChromaSamplePosition = (avifChromaSamplePosition)dav1dImage->seq_hdr->chr;
  199|       |
  200|  8.31k|        image->colorPrimaries = (avifColorPrimaries)dav1dImage->seq_hdr->pri;
  201|  8.31k|        image->transferCharacteristics = (avifTransferCharacteristics)dav1dImage->seq_hdr->trc;
  202|  8.31k|        image->matrixCoefficients = (avifMatrixCoefficients)dav1dImage->seq_hdr->mtrx;
  203|       |
  204|       |        // Steal the pointers from the decoder's image directly
  205|  8.31k|        avifImageFreePlanes(image, AVIF_PLANES_YUV);
  206|  8.31k|        int yuvPlaneCount = (yuvFormat == AVIF_PIXEL_FORMAT_YUV400) ? 1 : 3;
  ------------------
  |  Branch (206:29): [True: 1.70k, False: 6.61k]
  ------------------
  207|  29.8k|        for (int yuvPlane = 0; yuvPlane < yuvPlaneCount; ++yuvPlane) {
  ------------------
  |  Branch (207:32): [True: 21.5k, False: 8.31k]
  ------------------
  208|  21.5k|            image->yuvPlanes[yuvPlane] = dav1dImage->data[yuvPlane];
  209|  21.5k|            image->yuvRowBytes[yuvPlane] = (uint32_t)dav1dImage->stride[(yuvPlane == AVIF_CHAN_Y) ? 0 : 1];
  ------------------
  |  Branch (209:73): [True: 8.31k, False: 13.2k]
  ------------------
  210|  21.5k|        }
  211|  8.31k|        image->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  8.31k|#define AVIF_FALSE 0
  ------------------
  212|  8.31k|    } else {
  213|       |        // Alpha plane - set image to correct size, fill alpha
  214|       |
  215|  1.07k|        image->width = dav1dImage->p.w;
  216|  1.07k|        image->height = dav1dImage->p.h;
  217|  1.07k|        image->depth = dav1dImage->p.bpc;
  218|       |
  219|  1.07k|        avifImageFreePlanes(image, AVIF_PLANES_A);
  220|  1.07k|        image->alphaPlane = dav1dImage->data[0];
  221|  1.07k|        image->alphaRowBytes = (uint32_t)dav1dImage->stride[0];
  222|  1.07k|        *isLimitedRangeAlpha = (codec->internal->colorRange == AVIF_RANGE_LIMITED);
  223|  1.07k|        image->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|  1.07k|#define AVIF_FALSE 0
  ------------------
  224|  1.07k|    }
  225|  9.39k|    return AVIF_TRUE;
  ------------------
  |  |   88|  9.39k|#define AVIF_TRUE 1
  ------------------
  226|  9.39k|}
codec_dav1d.c:avifDav1dLogCallback:
   42|  6.47k|{
   43|  6.47k|    avifCodec * codec = (avifCodec *)cookie;
   44|  6.47k|    vsnprintf(codec->diag->error, AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE, format, ap);
  ------------------
  |  |   91|  6.47k|#define AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE 256
  ------------------
   45|  6.47k|}
codec_dav1d.c:avifDav1dFreeCallback:
   35|  15.0k|{
   36|       |    // This data is owned by the decoder; nothing to free here
   37|  15.0k|    (void)buf;
   38|  15.0k|    (void)cookie;
   39|  15.0k|}
codec_dav1d.c:dav1dCodecDestroyInternal:
   48|  13.3k|{
   49|  13.3k|    if (codec->internal->hasPicture) {
  ------------------
  |  Branch (49:9): [True: 7.46k, False: 5.83k]
  ------------------
   50|  7.46k|        dav1d_picture_unref(&codec->internal->dav1dPicture);
   51|  7.46k|    }
   52|  13.3k|    if (codec->internal->dav1dContext) {
  ------------------
  |  Branch (52:9): [True: 12.9k, False: 318]
  ------------------
   53|  12.9k|        dav1d_close(&codec->internal->dav1dContext);
   54|  12.9k|    }
   55|  13.3k|    avifFree(codec->internal);
   56|  13.3k|}

avifDiagnosticsClearError:
   11|  4.51M|{
   12|  4.51M|    *diag->error = '\0';
   13|  4.51M|}
avifDiagnosticsPrintf:
   19|  9.68k|{
   20|  9.68k|    if (!diag) {
  ------------------
  |  Branch (20:9): [True: 0, False: 9.68k]
  ------------------
   21|       |        // It is possible this is NULL (e.g. calls to avifPeekCompatibleFileType())
   22|      0|        return;
   23|      0|    }
   24|  9.68k|    if (*diag->error) {
  ------------------
  |  Branch (24:9): [True: 2.01k, False: 7.66k]
  ------------------
   25|       |        // There is already a detailed error set.
   26|  2.01k|        return;
   27|  2.01k|    }
   28|       |
   29|  7.66k|    va_list args;
   30|  7.66k|    va_start(args, format);
   31|  7.66k|    vsnprintf(diag->error, AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE, format, args);
  ------------------
  |  |   91|  7.66k|#define AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE 256
  ------------------
   32|  7.66k|    diag->error[AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE - 1] = '\0';
  ------------------
  |  |   91|  7.66k|#define AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE 256
  ------------------
   33|       |    va_end(args);
   34|  7.66k|}

avifGetExifTiffHeaderOffset:
   10|     99|{
   11|     99|    const uint8_t tiffHeaderBE[4] = { 'M', 'M', 0, 42 };
   12|     99|    const uint8_t tiffHeaderLE[4] = { 'I', 'I', 42, 0 };
   13|     99|    exifSize = AVIF_MIN(exifSize, UINT32_MAX);
  ------------------
  |  |   19|     99|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 99, False: 0]
  |  |  ------------------
  ------------------
   14|  4.55k|    for (*offset = 0; *offset + 4 < exifSize; ++*offset) {
  ------------------
  |  Branch (14:23): [True: 4.54k, False: 3]
  ------------------
   15|  4.54k|        if (!memcmp(&exif[*offset], tiffHeaderBE, 4) || !memcmp(&exif[*offset], tiffHeaderLE, 4)) {
  ------------------
  |  Branch (15:13): [True: 0, False: 4.54k]
  |  Branch (15:57): [True: 96, False: 4.45k]
  ------------------
   16|     96|            return AVIF_RESULT_OK;
   17|     96|        }
   18|  4.54k|    }
   19|       |    // Couldn't find the TIFF header
   20|      3|    return AVIF_RESULT_INVALID_EXIF_PAYLOAD;
   21|     99|}

avifGainMapValidateMetadata:
  416|    310|{
  417|  1.16k|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (417:21): [True: 888, False: 277]
  ------------------
  418|    888|        if (gainMap->gainMapMin[i].d == 0 || gainMap->gainMapMax[i].d == 0 || gainMap->gainMapGamma[i].d == 0 ||
  ------------------
  |  Branch (418:13): [True: 3, False: 885]
  |  Branch (418:46): [True: 5, False: 880]
  |  Branch (418:79): [True: 4, False: 876]
  ------------------
  419|    876|            gainMap->baseOffset[i].d == 0 || gainMap->alternateOffset[i].d == 0) {
  ------------------
  |  Branch (419:13): [True: 3, False: 873]
  |  Branch (419:46): [True: 4, False: 869]
  ------------------
  420|     19|            avifDiagnosticsPrintf(diag, "Per-channel denominator is 0 in gain map metadata");
  421|     19|            return AVIF_RESULT_INVALID_ARGUMENT;
  422|     19|        }
  423|    869|        if ((int64_t)gainMap->gainMapMax[i].n * gainMap->gainMapMin[i].d <
  ------------------
  |  Branch (423:13): [True: 11, False: 858]
  ------------------
  424|    869|            (int64_t)gainMap->gainMapMin[i].n * gainMap->gainMapMax[i].d) {
  425|     11|            avifDiagnosticsPrintf(diag, "Per-channel max is less than per-channel min in gain map metadata");
  426|     11|            return AVIF_RESULT_INVALID_ARGUMENT;
  427|     11|        }
  428|    858|        if (gainMap->gainMapGamma[i].n == 0) {
  ------------------
  |  Branch (428:13): [True: 3, False: 855]
  ------------------
  429|      3|            avifDiagnosticsPrintf(diag, "Per-channel gamma is 0 in gain map metadata");
  430|      3|            return AVIF_RESULT_INVALID_ARGUMENT;
  431|      3|        }
  432|    858|    }
  433|    277|    if (gainMap->baseHdrHeadroom.d == 0 || gainMap->alternateHdrHeadroom.d == 0) {
  ------------------
  |  Branch (433:9): [True: 1, False: 276]
  |  Branch (433:44): [True: 3, False: 273]
  ------------------
  434|      4|        avifDiagnosticsPrintf(diag, "Headroom denominator is 0 in gain map metadata");
  435|      4|        return AVIF_RESULT_INVALID_ARGUMENT;
  436|      4|    }
  437|    273|    if (gainMap->useBaseColorSpace != 0 && gainMap->useBaseColorSpace != 1) {
  ------------------
  |  Branch (437:9): [True: 58, False: 215]
  |  Branch (437:44): [True: 0, False: 58]
  ------------------
  438|      0|        avifDiagnosticsPrintf(diag, "useBaseColorSpace is %d in gain map metadata", gainMap->useBaseColorSpace);
  439|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  440|      0|    }
  441|    273|    return AVIF_RESULT_OK;
  442|    273|}

avifIODestroy:
   85|  31.5k|{
   86|  31.5k|    if (io && io->destroy) {
  ------------------
  |  Branch (86:9): [True: 15.7k, False: 15.7k]
  |  Branch (86:15): [True: 0, False: 15.7k]
  ------------------
   87|      0|        io->destroy(io);
   88|      0|    }
   89|  31.5k|}

avifAlloc:
   10|  20.9M|{
   11|       |    assert(size != 0); // Implementation-defined. See https://en.cppreference.com/w/cpp/memory/c/malloc
   12|  20.9M|    return malloc(size);
   13|  20.9M|}
avifFree:
   16|  26.8M|{
   17|  26.8M|    free(p);
   18|  26.8M|}

avifSequenceHeaderParse:
  713|   383k|{
  714|   383k|    switch (codecType) {
  715|   383k|        case AVIF_CODEC_TYPE_AV1:
  ------------------
  |  Branch (715:9): [True: 383k, False: 0]
  ------------------
  716|   383k|            return av1SequenceHeaderParse(header, sample);
  717|       |#if defined(AVIF_CODEC_AVM)
  718|       |        case AVIF_CODEC_TYPE_AV2:
  719|       |            return av2SequenceHeaderParse(header, sample);
  720|       |#endif
  721|      0|        default:
  ------------------
  |  Branch (721:9): [True: 0, False: 383k]
  ------------------
  722|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  723|   383k|    }
  724|   383k|}
obu.c:av1SequenceHeaderParse:
  597|   383k|{
  598|   383k|    avifROData obus = *sample;
  599|       |
  600|       |    // Find the sequence header OBU
  601|   475k|    while (obus.size > 0) {
  ------------------
  |  Branch (601:12): [True: 474k, False: 535]
  ------------------
  602|   474k|        avifBits bits;
  603|   474k|        avifBitsInit(&bits, obus.data, obus.size);
  604|       |
  605|       |        // obu_header()
  606|   474k|        const uint32_t obu_forbidden_bit = avifBitsRead(&bits, 1);
  607|   474k|        if (obu_forbidden_bit != 0) {
  ------------------
  |  Branch (607:13): [True: 359k, False: 115k]
  ------------------
  608|   359k|            return AVIF_FALSE;
  ------------------
  |  |   89|   359k|#define AVIF_FALSE 0
  ------------------
  609|   359k|        }
  610|   115k|        const uint32_t obu_type = avifBitsRead(&bits, 4);
  611|   115k|        const uint32_t obu_extension_flag = avifBitsRead(&bits, 1);
  612|   115k|        const uint32_t obu_has_size_field = avifBitsRead(&bits, 1);
  613|   115k|        avifBitsRead(&bits, 1); // obu_reserved_1bit
  614|       |
  615|   115k|        if (obu_extension_flag) {   // obu_extension_header()
  ------------------
  |  Branch (615:13): [True: 62.8k, False: 52.5k]
  ------------------
  616|  62.8k|            avifBitsRead(&bits, 8); // temporal_id, spatial_id, extension_header_reserved_3bits
  617|  62.8k|        }
  618|       |
  619|   115k|        uint32_t obu_size = 0;
  620|   115k|        if (obu_has_size_field)
  ------------------
  |  Branch (620:13): [True: 114k, False: 507]
  ------------------
  621|   114k|            obu_size = avifBitsReadUleb128(&bits);
  622|    507|        else
  623|    507|            obu_size = (int)obus.size - 1 - obu_extension_flag;
  624|       |
  625|   115k|        if (bits.error) {
  ------------------
  |  Branch (625:13): [True: 2.78k, False: 112k]
  ------------------
  626|  2.78k|            return AVIF_FALSE;
  ------------------
  |  |   89|  2.78k|#define AVIF_FALSE 0
  ------------------
  627|  2.78k|        }
  628|       |
  629|   112k|        const uint32_t init_bit_pos = avifBitsReadPos(&bits);
  630|   112k|        const uint32_t init_byte_pos = init_bit_pos >> 3;
  631|   112k|        if (obu_size > obus.size - init_byte_pos)
  ------------------
  |  Branch (631:13): [True: 6.61k, False: 105k]
  ------------------
  632|  6.61k|            return AVIF_FALSE;
  ------------------
  |  |   89|  6.61k|#define AVIF_FALSE 0
  ------------------
  633|       |
  634|   105k|        if (obu_type == 1) { // Sequence Header
  ------------------
  |  Branch (634:13): [True: 14.6k, False: 91.3k]
  ------------------
  635|  14.6k|            avifBits seqHdrBits;
  636|  14.6k|            avifBitsInit(&seqHdrBits, obus.data + init_byte_pos, obu_size);
  637|  14.6k|            return parseAV1SequenceHeader(&seqHdrBits, header);
  638|  14.6k|        }
  639|       |
  640|       |        // Skip this OBU
  641|  91.3k|        obus.data += (size_t)obu_size + init_byte_pos;
  642|  91.3k|        obus.size -= (size_t)obu_size + init_byte_pos;
  643|  91.3k|    }
  644|    535|    return AVIF_FALSE;
  ------------------
  |  |   89|    535|#define AVIF_FALSE 0
  ------------------
  645|   383k|}
obu.c:avifBitsInit:
   63|   489k|{
   64|   489k|    bits->ptr = bits->start = data;
   65|   489k|    bits->end = &bits->start[size];
   66|   489k|    bits->bitsLeft = 0;
   67|   489k|    bits->state = 0;
   68|   489k|    bits->error = 0;
   69|   489k|    bits->eof = (size == 0);
   70|   489k|}
obu.c:avifBitsRead:
   89|  1.63M|{
   90|  1.63M|    if (n > bits->bitsLeft)
  ------------------
  |  Branch (90:9): [True: 883k, False: 752k]
  ------------------
   91|   883k|        avifBitsRefill(bits, n);
   92|       |
   93|  1.63M|    const uint64_t state = bits->state;
   94|  1.63M|    bits->bitsLeft -= n;
   95|  1.63M|    bits->state <<= n;
   96|       |
   97|  1.63M|    return (uint32_t)(state >> (64 - n));
   98|  1.63M|}
obu.c:avifBitsRefill:
   73|   883k|{
   74|   883k|    uint64_t state = 0;
   75|   948k|    do {
   76|   948k|        state <<= 8;
   77|   948k|        bits->bitsLeft += 8;
   78|   948k|        if (!bits->eof)
  ------------------
  |  Branch (78:13): [True: 893k, False: 54.8k]
  ------------------
   79|   893k|            state |= *bits->ptr++;
   80|   948k|        if (bits->ptr >= bits->end) {
  ------------------
  |  Branch (80:13): [True: 65.7k, False: 882k]
  ------------------
   81|  65.7k|            bits->error = bits->eof;
   82|  65.7k|            bits->eof = 1;
   83|  65.7k|        }
   84|   948k|    } while (n > bits->bitsLeft);
  ------------------
  |  Branch (84:14): [True: 64.6k, False: 883k]
  ------------------
   85|   883k|    bits->state |= state << (64 - bits->bitsLeft);
   86|   883k|}
obu.c:avifBitsReadUleb128:
  101|   114k|{
  102|   114k|    uint64_t val = 0;
  103|   114k|    uint32_t more;
  104|   114k|    uint32_t i = 0;
  105|       |
  106|   119k|    do {
  107|   119k|        const uint32_t v = avifBitsRead(bits, 8);
  108|   119k|        more = v & 0x80;
  109|   119k|        val |= ((uint64_t)(v & 0x7F)) << i;
  110|   119k|        i += 7;
  111|   119k|    } while (more && i < 56);
  ------------------
  |  Branch (111:14): [True: 4.68k, False: 114k]
  |  Branch (111:22): [True: 4.60k, False: 85]
  ------------------
  112|       |
  113|   114k|    if (val > UINT32_MAX || more) {
  ------------------
  |  Branch (113:9): [True: 361, False: 114k]
  |  Branch (113:29): [True: 18, False: 114k]
  ------------------
  114|    379|        bits->error = 1;
  115|    379|        return 0;
  116|    379|    }
  117|       |
  118|   114k|    return (uint32_t)val;
  119|   114k|}
obu.c:avifBitsReadPos:
   58|   112k|{
   59|   112k|    return (uint32_t)(bits->ptr - bits->start) * 8 - bits->bitsLeft;
   60|   112k|}
obu.c:parseAV1SequenceHeader:
  446|  14.6k|{
  447|  14.6k|    AVIF_CHECK(parseAV1SequenceHeaderProfile(bits, header));
  ------------------
  |  |   36|  14.6k|    do {                        \
  |  |   37|  14.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 207, False: 14.3k]
  |  |  ------------------
  |  |   38|    207|            avifBreakOnError(); \
  |  |   39|    207|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    207|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    207|        }                       \
  |  |   41|  14.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 14.3k]
  |  |  ------------------
  ------------------
  448|  14.3k|    AVIF_CHECK(parseSequenceHeaderLevelIdxAndTier(bits, header));
  ------------------
  |  |   36|  14.3k|    do {                        \
  |  |   37|  14.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2.33k, False: 12.0k]
  |  |  ------------------
  |  |   38|  2.33k|            avifBreakOnError(); \
  |  |   39|  2.33k|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|  2.33k|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|  2.33k|        }                       \
  |  |   41|  14.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.0k]
  |  |  ------------------
  ------------------
  449|       |
  450|  12.0k|    AVIF_CHECK(parseSequenceHeaderFrameMaxDimensions(bits, header));
  ------------------
  |  |   36|  12.0k|    do {                        \
  |  |   37|  12.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 483, False: 11.5k]
  |  |  ------------------
  |  |   38|    483|            avifBreakOnError(); \
  |  |   39|    483|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    483|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    483|        }                       \
  |  |   41|  12.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 11.5k]
  |  |  ------------------
  ------------------
  451|  11.5k|    avifBitsRead(bits, 1); // use_128x128_superblock
  452|  11.5k|    AVIF_CHECK(parseSequenceHeaderEnabledFeatures(bits, header));
  ------------------
  |  |   36|  11.5k|    do {                        \
  |  |   37|  11.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 619, False: 10.9k]
  |  |  ------------------
  |  |   38|    619|            avifBreakOnError(); \
  |  |   39|    619|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    619|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    619|        }                       \
  |  |   41|  11.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
  453|       |
  454|  10.9k|    avifBitsRead(bits, 3); // enable_superres, enable_cdef, enable_restoration
  455|       |
  456|  10.9k|    AVIF_CHECK(parseAV1SequenceHeaderColorConfig(bits, header));
  ------------------
  |  |   36|  10.9k|    do {                        \
  |  |   37|  10.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1.79k, False: 9.17k]
  |  |  ------------------
  |  |   38|  1.79k|            avifBreakOnError(); \
  |  |   39|  1.79k|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|  1.79k|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|  1.79k|        }                       \
  |  |   41|  10.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 9.17k]
  |  |  ------------------
  ------------------
  457|  9.17k|    if (!header->av1C.monochrome) {
  ------------------
  |  Branch (457:9): [True: 6.81k, False: 2.35k]
  ------------------
  458|  6.81k|        avifBitsRead(bits, 1); // separate_uv_delta_q
  459|  6.81k|    }
  460|       |
  461|  9.17k|    avifBitsRead(bits, 1); // film_grain_params_present
  462|  9.17k|    return !bits->error;
  463|  10.9k|}
obu.c:parseAV1SequenceHeaderProfile:
  153|  14.6k|{
  154|  14.6k|    uint32_t seq_profile = avifBitsRead(bits, 3);
  155|  14.6k|    if (seq_profile > 2) {
  ------------------
  |  Branch (155:9): [True: 138, False: 14.4k]
  ------------------
  156|    138|        return AVIF_FALSE;
  ------------------
  |  |   89|    138|#define AVIF_FALSE 0
  ------------------
  157|    138|    }
  158|  14.4k|    header->av1C.seqProfile = (uint8_t)seq_profile;
  159|  14.4k|    return !bits->error;
  160|  14.6k|}
obu.c:parseSequenceHeaderLevelIdxAndTier:
  175|  14.3k|{
  176|  14.3k|    uint32_t still_picture = avifBitsRead(bits, 1);
  177|  14.3k|    header->reduced_still_picture_header = (uint8_t)avifBitsRead(bits, 1);
  178|  14.3k|    if (header->reduced_still_picture_header && !still_picture) {
  ------------------
  |  Branch (178:9): [True: 6.89k, False: 7.50k]
  |  Branch (178:49): [True: 119, False: 6.78k]
  ------------------
  179|    119|        return AVIF_FALSE;
  ------------------
  |  |   89|    119|#define AVIF_FALSE 0
  ------------------
  180|    119|    }
  181|       |
  182|  14.2k|    if (header->reduced_still_picture_header) {
  ------------------
  |  Branch (182:9): [True: 6.78k, False: 7.50k]
  ------------------
  183|  6.78k|        header->av1C.seqLevelIdx0 = (uint8_t)avifBitsRead(bits, 5);
  184|  6.78k|        header->av1C.seqTier0 = 0;
  185|  7.50k|    } else {
  186|  7.50k|        uint32_t timing_info_present_flag = avifBitsRead(bits, 1);
  187|  7.50k|        uint32_t decoder_model_info_present_flag = 0;
  188|  7.50k|        uint32_t buffer_delay_length = 0;
  189|  7.50k|        if (timing_info_present_flag) { // timing_info()
  ------------------
  |  Branch (189:13): [True: 2.73k, False: 4.76k]
  ------------------
  190|  2.73k|            avifBitsRead(bits, 32);     // num_units_in_display_tick
  191|  2.73k|            avifBitsRead(bits, 32);     // time_scale
  192|  2.73k|            uint32_t equal_picture_interval = avifBitsRead(bits, 1);
  193|  2.73k|            if (equal_picture_interval) {
  ------------------
  |  Branch (193:17): [True: 1.18k, False: 1.55k]
  ------------------
  194|  1.18k|                uint32_t num_ticks_per_picture_minus_1 = avifBitsReadVLC(bits);
  195|  1.18k|                if (num_ticks_per_picture_minus_1 == 0xFFFFFFFFU)
  ------------------
  |  Branch (195:21): [True: 82, False: 1.09k]
  ------------------
  196|     82|                    return AVIF_FALSE;
  ------------------
  |  |   89|     82|#define AVIF_FALSE 0
  ------------------
  197|  1.18k|            }
  198|       |
  199|  2.64k|            decoder_model_info_present_flag = avifBitsRead(bits, 1);
  200|  2.64k|            if (decoder_model_info_present_flag) { // decoder_model_info()
  ------------------
  |  Branch (200:17): [True: 1.43k, False: 1.21k]
  ------------------
  201|  1.43k|                buffer_delay_length = avifBitsRead(bits, 5) + 1;
  202|  1.43k|                avifBitsRead(bits, 32); // num_units_in_decoding_tick
  203|  1.43k|                avifBitsRead(bits, 10); // buffer_removal_time_length_minus_1, frame_presentation_time_length_minus_1
  204|  1.43k|            }
  205|  2.64k|        }
  206|       |
  207|  7.41k|        uint32_t initial_display_delay_present_flag = avifBitsRead(bits, 1);
  208|  7.41k|        uint32_t operating_points_cnt = avifBitsRead(bits, 5) + 1;
  209|  64.4k|        for (uint32_t i = 0; i < operating_points_cnt; i++) {
  ------------------
  |  Branch (209:30): [True: 57.0k, False: 7.41k]
  ------------------
  210|  57.0k|            avifBitsRead(bits, 12); // operating_point_idc
  211|  57.0k|            uint32_t seq_level_idx = avifBitsRead(bits, 5);
  212|  57.0k|            if (i == 0) {
  ------------------
  |  Branch (212:17): [True: 7.41k, False: 49.6k]
  ------------------
  213|  7.41k|                header->av1C.seqLevelIdx0 = (uint8_t)seq_level_idx;
  214|  7.41k|                header->av1C.seqTier0 = 0;
  215|  7.41k|            }
  216|  57.0k|            if (seq_level_idx > 7) {
  ------------------
  |  Branch (216:17): [True: 26.8k, False: 30.1k]
  ------------------
  217|  26.8k|                uint32_t seq_tier = avifBitsRead(bits, 1);
  218|  26.8k|                if (i == 0) {
  ------------------
  |  Branch (218:21): [True: 2.22k, False: 24.6k]
  ------------------
  219|  2.22k|                    header->av1C.seqTier0 = (uint8_t)seq_tier;
  220|  2.22k|                }
  221|  26.8k|            }
  222|  57.0k|            if (decoder_model_info_present_flag) {
  ------------------
  |  Branch (222:17): [True: 22.0k, False: 35.0k]
  ------------------
  223|  22.0k|                uint32_t decoder_model_present_for_this_op = avifBitsRead(bits, 1);
  224|  22.0k|                if (decoder_model_present_for_this_op) {     // operating_parameters_info()
  ------------------
  |  Branch (224:21): [True: 5.46k, False: 16.5k]
  ------------------
  225|  5.46k|                    avifBitsRead(bits, buffer_delay_length); // decoder_buffer_delay
  226|  5.46k|                    avifBitsRead(bits, buffer_delay_length); // encoder_buffer_delay
  227|  5.46k|                    avifBitsRead(bits, 1);                   // low_delay_mode_flag
  228|  5.46k|                }
  229|  22.0k|            }
  230|  57.0k|            if (initial_display_delay_present_flag) {
  ------------------
  |  Branch (230:17): [True: 35.3k, False: 21.6k]
  ------------------
  231|  35.3k|                uint32_t initial_display_delay_present_for_this_op = avifBitsRead(bits, 1);
  232|  35.3k|                if (initial_display_delay_present_for_this_op) {
  ------------------
  |  Branch (232:21): [True: 12.2k, False: 23.1k]
  ------------------
  233|  12.2k|                    avifBitsRead(bits, 4); // initial_display_delay_minus_1
  234|  12.2k|                }
  235|  35.3k|            }
  236|  57.0k|        }
  237|  7.41k|    }
  238|  14.1k|    return !bits->error;
  239|  14.2k|}
obu.c:avifBitsReadVLC:
  122|  1.18k|{
  123|  1.18k|    int numBits = 0;
  124|  8.06k|    while (!avifBitsRead(bits, 1))
  ------------------
  |  Branch (124:12): [True: 6.96k, False: 1.09k]
  ------------------
  125|  6.96k|        if (++numBits == 32)
  ------------------
  |  Branch (125:13): [True: 82, False: 6.88k]
  ------------------
  126|     82|            return 0xFFFFFFFFU;
  127|  1.09k|    return numBits ? ((1U << numBits) - 1) + avifBitsRead(bits, numBits) : 0;
  ------------------
  |  Branch (127:12): [True: 860, False: 238]
  ------------------
  128|  1.18k|}
obu.c:parseSequenceHeaderFrameMaxDimensions:
  242|  12.0k|{
  243|  12.0k|    uint32_t frame_width_bits = avifBitsRead(bits, 4) + 1;
  244|  12.0k|    uint32_t frame_height_bits = avifBitsRead(bits, 4) + 1;
  245|  12.0k|    header->maxWidth = avifBitsRead(bits, frame_width_bits) + 1;   // max_frame_width
  246|  12.0k|    header->maxHeight = avifBitsRead(bits, frame_height_bits) + 1; // max_frame_height
  247|  12.0k|    uint32_t frame_id_numbers_present_flag = 0;
  248|  12.0k|    if (!header->reduced_still_picture_header) {
  ------------------
  |  Branch (248:9): [True: 5.35k, False: 6.71k]
  ------------------
  249|  5.35k|        frame_id_numbers_present_flag = avifBitsRead(bits, 1);
  250|  5.35k|    }
  251|  12.0k|    if (frame_id_numbers_present_flag) {
  ------------------
  |  Branch (251:9): [True: 1.36k, False: 10.7k]
  ------------------
  252|  1.36k|        avifBitsRead(bits, 7); // delta_frame_id_length_minus_2, additional_frame_id_length_minus_1
  253|  1.36k|    }
  254|  12.0k|    return !bits->error;
  255|  12.0k|}
obu.c:parseSequenceHeaderEnabledFeatures:
  258|  11.5k|{
  259|  11.5k|    avifBitsRead(bits, 2); // enable_filter_intra, enable_intra_edge_filter
  260|       |
  261|  11.5k|    if (!header->reduced_still_picture_header) {
  ------------------
  |  Branch (261:9): [True: 5.01k, False: 6.56k]
  ------------------
  262|  5.01k|        avifBitsRead(bits, 4); // enable_interintra_compound, enable_masked_compound, enable_warped_motion, enable_dual_filter
  263|  5.01k|        uint32_t enable_order_hint = avifBitsRead(bits, 1);
  264|  5.01k|        if (enable_order_hint) {
  ------------------
  |  Branch (264:13): [True: 2.39k, False: 2.62k]
  ------------------
  265|  2.39k|            avifBitsRead(bits, 2); // enable_jnt_comp, enable_ref_frame_mvs
  266|  2.39k|        }
  267|       |
  268|  5.01k|        uint32_t seq_force_screen_content_tools = 0;
  269|  5.01k|        uint32_t seq_choose_screen_content_tools = avifBitsRead(bits, 1);
  270|  5.01k|        if (seq_choose_screen_content_tools) {
  ------------------
  |  Branch (270:13): [True: 2.30k, False: 2.71k]
  ------------------
  271|  2.30k|            seq_force_screen_content_tools = 2;
  272|  2.71k|        } else {
  273|  2.71k|            seq_force_screen_content_tools = avifBitsRead(bits, 1);
  274|  2.71k|        }
  275|  5.01k|        if (seq_force_screen_content_tools > 0) {
  ------------------
  |  Branch (275:13): [True: 3.87k, False: 1.13k]
  ------------------
  276|  3.87k|            uint32_t seq_choose_integer_mv = avifBitsRead(bits, 1);
  277|  3.87k|            if (!seq_choose_integer_mv) {
  ------------------
  |  Branch (277:17): [True: 832, False: 3.04k]
  ------------------
  278|    832|                avifBitsRead(bits, 1); // seq_force_integer_mv
  279|    832|            }
  280|  3.87k|        }
  281|  5.01k|        if (enable_order_hint) {
  ------------------
  |  Branch (281:13): [True: 2.39k, False: 2.62k]
  ------------------
  282|  2.39k|            avifBitsRead(bits, 3); // order_hint_bits_minus_1
  283|  2.39k|        }
  284|  5.01k|    }
  285|       |
  286|  11.5k|    return !bits->error;
  287|  11.5k|}
obu.c:parseAV1SequenceHeaderColorConfig:
  291|  10.9k|{
  292|  10.9k|    header->bitDepth = 8;
  293|  10.9k|    header->chromaSamplePosition = AVIF_CHROMA_SAMPLE_POSITION_UNKNOWN;
  294|  10.9k|    header->av1C.chromaSamplePosition = (uint8_t)header->chromaSamplePosition;
  295|  10.9k|    uint32_t high_bitdepth = avifBitsRead(bits, 1);
  296|  10.9k|    header->av1C.highBitdepth = (uint8_t)high_bitdepth;
  297|  10.9k|    if ((header->av1C.seqProfile == 2) && high_bitdepth) {
  ------------------
  |  Branch (297:9): [True: 4.44k, False: 6.51k]
  |  Branch (297:43): [True: 3.49k, False: 951]
  ------------------
  298|  3.49k|        uint32_t twelve_bit = avifBitsRead(bits, 1);
  299|  3.49k|        header->bitDepth = twelve_bit ? 12 : 10;
  ------------------
  |  Branch (299:28): [True: 3.19k, False: 298]
  ------------------
  300|  3.49k|        header->av1C.twelveBit = (uint8_t)twelve_bit;
  301|  7.47k|    } else /* if (seq_profile <= 2) */ {
  302|  7.47k|        header->bitDepth = high_bitdepth ? 10 : 8;
  ------------------
  |  Branch (302:28): [True: 2.94k, False: 4.52k]
  ------------------
  303|  7.47k|        header->av1C.twelveBit = 0;
  304|  7.47k|    }
  305|  10.9k|    uint32_t mono_chrome = 0;
  306|  10.9k|    if (header->av1C.seqProfile != 1) {
  ------------------
  |  Branch (306:9): [True: 7.42k, False: 3.54k]
  ------------------
  307|  7.42k|        mono_chrome = avifBitsRead(bits, 1);
  308|  7.42k|    }
  309|  10.9k|    header->av1C.monochrome = (uint8_t)mono_chrome;
  310|  10.9k|    uint32_t color_description_present_flag = avifBitsRead(bits, 1);
  311|  10.9k|    if (color_description_present_flag) {
  ------------------
  |  Branch (311:9): [True: 3.82k, False: 7.14k]
  ------------------
  312|  3.82k|        header->colorPrimaries = (avifColorPrimaries)avifBitsRead(bits, 8);                   // color_primaries
  313|  3.82k|        header->transferCharacteristics = (avifTransferCharacteristics)avifBitsRead(bits, 8); // transfer_characteristics
  314|  3.82k|        header->matrixCoefficients = (avifMatrixCoefficients)avifBitsRead(bits, 8);           // matrix_coefficients
  315|  7.14k|    } else {
  316|  7.14k|        header->colorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
  317|  7.14k|        header->transferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
  318|  7.14k|        header->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
  319|  7.14k|    }
  320|  10.9k|    if (mono_chrome) {
  ------------------
  |  Branch (320:9): [True: 2.58k, False: 8.37k]
  ------------------
  321|  2.58k|        header->range = avifBitsRead(bits, 1) ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED; // color_range
  ------------------
  |  Branch (321:25): [True: 1.09k, False: 1.49k]
  ------------------
  322|  2.58k|        header->av1C.chromaSubsamplingX = 1;
  323|  2.58k|        header->av1C.chromaSubsamplingY = 1;
  324|  2.58k|        header->yuvFormat = AVIF_PIXEL_FORMAT_YUV400;
  325|  8.37k|    } else if (header->colorPrimaries == AVIF_COLOR_PRIMARIES_BT709 &&
  ------------------
  |  Branch (325:16): [True: 545, False: 7.83k]
  ------------------
  326|    545|               header->transferCharacteristics == AVIF_TRANSFER_CHARACTERISTICS_SRGB &&
  ------------------
  |  Branch (326:16): [True: 318, False: 227]
  ------------------
  327|    318|               header->matrixCoefficients == AVIF_MATRIX_COEFFICIENTS_IDENTITY) {
  ------------------
  |  Branch (327:16): [True: 102, False: 216]
  ------------------
  328|    102|        header->range = AVIF_RANGE_FULL;
  329|    102|        header->av1C.chromaSubsamplingX = 0;
  330|    102|        header->av1C.chromaSubsamplingY = 0;
  331|    102|        header->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  332|  8.27k|    } else {
  333|  8.27k|        uint32_t subsampling_x = 0;
  334|  8.27k|        uint32_t subsampling_y = 0;
  335|  8.27k|        header->range = avifBitsRead(bits, 1) ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED; // color_range
  ------------------
  |  Branch (335:25): [True: 2.65k, False: 5.62k]
  ------------------
  336|  8.27k|        switch (header->av1C.seqProfile) {
  337|  1.75k|            case 0:
  ------------------
  |  Branch (337:13): [True: 1.75k, False: 6.52k]
  ------------------
  338|  1.75k|                subsampling_x = 1;
  339|  1.75k|                subsampling_y = 1;
  340|  1.75k|                header->yuvFormat = AVIF_PIXEL_FORMAT_YUV420;
  341|  1.75k|                break;
  342|  3.46k|            case 1:
  ------------------
  |  Branch (342:13): [True: 3.46k, False: 4.80k]
  ------------------
  343|  3.46k|                subsampling_x = 0;
  344|  3.46k|                subsampling_y = 0;
  345|  3.46k|                header->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  346|  3.46k|                break;
  347|  3.05k|            case 2:
  ------------------
  |  Branch (347:13): [True: 3.05k, False: 5.22k]
  ------------------
  348|  3.05k|                if (header->bitDepth == 12) {
  ------------------
  |  Branch (348:21): [True: 2.38k, False: 669]
  ------------------
  349|  2.38k|                    subsampling_x = avifBitsRead(bits, 1);
  350|  2.38k|                    if (subsampling_x) {
  ------------------
  |  Branch (350:25): [True: 1.60k, False: 773]
  ------------------
  351|  1.60k|                        subsampling_y = avifBitsRead(bits, 1);
  352|  1.60k|                    }
  353|  2.38k|                } else {
  354|    669|                    subsampling_x = 1;
  355|    669|                    subsampling_y = 0;
  356|    669|                }
  357|  3.05k|                if (subsampling_x) {
  ------------------
  |  Branch (357:21): [True: 2.27k, False: 773]
  ------------------
  358|  2.27k|                    header->yuvFormat = subsampling_y ? AVIF_PIXEL_FORMAT_YUV420 : AVIF_PIXEL_FORMAT_YUV422;
  ------------------
  |  Branch (358:41): [True: 1.44k, False: 832]
  ------------------
  359|  2.27k|                } else {
  360|    773|                    header->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  361|    773|                }
  362|  3.05k|                break;
  363|      0|            default:
  ------------------
  |  Branch (363:13): [True: 0, False: 8.27k]
  ------------------
  364|      0|                return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  365|  8.27k|        }
  366|       |
  367|  8.27k|        if (subsampling_x && subsampling_y) {
  ------------------
  |  Branch (367:13): [True: 4.03k, False: 4.24k]
  |  Branch (367:30): [True: 3.20k, False: 832]
  ------------------
  368|  3.20k|            header->chromaSamplePosition = (avifChromaSamplePosition)avifBitsRead(bits, 2); // chroma_sample_position
  369|  3.20k|            header->av1C.chromaSamplePosition = (uint8_t)header->chromaSamplePosition;
  370|  3.20k|        }
  371|  8.27k|        header->av1C.chromaSubsamplingX = (uint8_t)subsampling_x;
  372|  8.27k|        header->av1C.chromaSubsamplingY = (uint8_t)subsampling_y;
  373|  8.27k|    }
  374|       |
  375|  10.9k|    return !bits->error;
  376|  10.9k|}

avifRWDataRealloc:
    9|  2.24M|{
   10|  2.24M|    if (raw->size != newSize) {
  ------------------
  |  Branch (10:9): [True: 1.48M, False: 766k]
  ------------------
   11|  1.48M|        uint8_t * newData = (uint8_t *)avifAlloc(newSize);
   12|  1.48M|        AVIF_CHECKERR(newData, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  1.48M|    do {                        \
  |  |   46|  1.48M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.48M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
   13|  1.48M|        if (raw->size && newSize) {
  ------------------
  |  Branch (13:13): [True: 1.00k, False: 1.48M]
  |  Branch (13:26): [True: 1.00k, False: 0]
  ------------------
   14|  1.00k|            memcpy(newData, raw->data, AVIF_MIN(raw->size, newSize));
  ------------------
  |  |   19|  1.00k|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 1.00k, False: 1]
  |  |  ------------------
  ------------------
   15|  1.00k|        }
   16|  1.48M|        avifFree(raw->data);
   17|  1.48M|        raw->data = newData;
   18|  1.48M|        raw->size = newSize;
   19|  1.48M|    }
   20|  2.24M|    return AVIF_RESULT_OK;
   21|  2.24M|}
avifRWDataSet:
   24|  1.41M|{
   25|  1.41M|    if (len) {
  ------------------
  |  Branch (25:9): [True: 1.30M, False: 106k]
  ------------------
   26|  1.30M|        AVIF_CHECKRES(avifRWDataRealloc(raw, len));
  ------------------
  |  |   54|  1.30M|    do {                                  \
  |  |   55|  1.30M|        const avifResult result__ = (A);  \
  |  |   56|  1.30M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.30M]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.30M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.30M]
  |  |  ------------------
  ------------------
   27|  1.30M|        memcpy(raw->data, data, len);
   28|  1.30M|    } else {
   29|   106k|        avifRWDataFree(raw);
   30|   106k|    }
   31|  1.41M|    return AVIF_RESULT_OK;
   32|  1.41M|}
avifRWDataFree:
   35|  5.22M|{
   36|  5.22M|    avifFree(raw->data);
   37|       |    raw->data = NULL;
   38|  5.22M|    raw->size = 0;
   39|  5.22M|}

avifCodecDecodeInputCreate:
  482|   297k|{
  483|   297k|    avifCodecDecodeInput * decodeInput = (avifCodecDecodeInput *)avifAlloc(sizeof(avifCodecDecodeInput));
  484|   297k|    if (decodeInput == NULL) {
  ------------------
  |  Branch (484:9): [True: 0, False: 297k]
  ------------------
  485|      0|        return NULL;
  486|      0|    }
  487|   297k|    memset(decodeInput, 0, sizeof(avifCodecDecodeInput));
  488|   297k|    if (!avifArrayCreate(&decodeInput->samples, sizeof(avifDecodeSample), 1)) {
  ------------------
  |  Branch (488:9): [True: 0, False: 297k]
  ------------------
  489|      0|        avifFree(decodeInput);
  490|      0|        return NULL;
  491|      0|    }
  492|   297k|    return decodeInput;
  493|   297k|}
avifCodecDecodeInputDestroy:
  496|   297k|{
  497|   610k|    for (uint32_t sampleIndex = 0; sampleIndex < decodeInput->samples.count; ++sampleIndex) {
  ------------------
  |  Branch (497:36): [True: 313k, False: 297k]
  ------------------
  498|   313k|        avifDecodeSample * sample = &decodeInput->samples.sample[sampleIndex];
  499|   313k|        if (sample->ownsData) {
  ------------------
  |  Branch (499:13): [True: 2.61k, False: 310k]
  ------------------
  500|  2.61k|            avifRWDataFree((avifRWData *)&sample->data);
  501|  2.61k|        }
  502|   313k|    }
  503|   297k|    avifArrayDestroy(&decodeInput->samples);
  504|   297k|    avifFree(decodeInput);
  505|   297k|}
avifPeekCompatibleFileType:
 5039|    196|{
 5040|    196|    BEGIN_STREAM(s, input->data, input->size, NULL, NULL);
  ------------------
  |  |  738|    196|    avifROStream VARNAME;                               \
  |  |  739|    196|    avifROData VARNAME##_roData;                        \
  |  |  740|    196|    VARNAME##_roData.data = PTR;                        \
  |  |  741|    196|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|    196|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 5041|       |
 5042|    196|    avifBoxHeader header;
 5043|    196|    if (!avifROStreamReadBoxHeaderPartial(&s, &header, /*topLevel=*/AVIF_TRUE) || memcmp(header.type, "ftyp", 4)) {
  ------------------
  |  |   88|    196|#define AVIF_TRUE 1
  ------------------
  |  Branch (5043:9): [True: 0, False: 196]
  |  Branch (5043:83): [True: 68, False: 128]
  ------------------
 5044|     68|        return AVIF_FALSE;
  ------------------
  |  |   89|     68|#define AVIF_FALSE 0
  ------------------
 5045|     68|    }
 5046|    128|    if (header.isSizeZeroBox) {
  ------------------
  |  Branch (5046:9): [True: 0, False: 128]
  ------------------
 5047|       |        // The ftyp box goes on till the end of the file. Either there is no brand requiring anything in the file but a
 5048|       |        // FileTypebox (so not AVIF), or it is invalid.
 5049|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5050|      0|    }
 5051|    128|    AVIF_CHECK(avifROStreamHasBytesLeft(&s, header.size));
  ------------------
  |  |   36|    128|    do {                        \
  |  |   37|    128|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 128]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    128|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 128]
  |  |  ------------------
  ------------------
 5052|       |
 5053|    128|    avifFileType ftyp;
 5054|    128|    memset(&ftyp, 0, sizeof(avifFileType));
 5055|    128|    avifBool parsed = avifParseFileTypeBox(&ftyp, avifROStreamCurrent(&s), header.size, NULL);
 5056|    128|    if (!parsed) {
  ------------------
  |  Branch (5056:9): [True: 0, False: 128]
  ------------------
 5057|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5058|      0|    }
 5059|    128|    return avifFileTypeIsCompatible(&ftyp);
 5060|    128|}
avifDecoderCreate:
 5075|  12.8k|{
 5076|  12.8k|    avifDecoder * decoder = (avifDecoder *)avifAlloc(sizeof(avifDecoder));
 5077|  12.8k|    if (decoder == NULL) {
  ------------------
  |  Branch (5077:9): [True: 0, False: 12.8k]
  ------------------
 5078|      0|        return NULL;
 5079|      0|    }
 5080|  12.8k|    memset(decoder, 0, sizeof(avifDecoder));
 5081|  12.8k|    decoder->maxThreads = 1;
 5082|  12.8k|    decoder->imageSizeLimit = AVIF_DEFAULT_IMAGE_SIZE_LIMIT;
  ------------------
  |  |   95|  12.8k|#define AVIF_DEFAULT_IMAGE_SIZE_LIMIT (16384 * 16384)
  ------------------
 5083|  12.8k|    decoder->imageDimensionLimit = AVIF_DEFAULT_IMAGE_DIMENSION_LIMIT;
  ------------------
  |  |   98|  12.8k|#define AVIF_DEFAULT_IMAGE_DIMENSION_LIMIT 32768
  ------------------
 5084|  12.8k|    decoder->imageCountLimit = AVIF_DEFAULT_IMAGE_COUNT_LIMIT;
  ------------------
  |  |  101|  12.8k|#define AVIF_DEFAULT_IMAGE_COUNT_LIMIT (12 * 3600 * 60)
  ------------------
 5085|  12.8k|    decoder->strictFlags = AVIF_STRICT_ENABLED;
 5086|  12.8k|    decoder->imageContentToDecode = AVIF_IMAGE_CONTENT_DECODE_DEFAULT;
 5087|  12.8k|    return decoder;
 5088|  12.8k|}
avifDecoderDestroy:
 5105|  12.8k|{
 5106|  12.8k|    avifDecoderCleanup(decoder);
 5107|  12.8k|    avifIODestroy(decoder->io);
 5108|  12.8k|    avifFree(decoder);
 5109|  12.8k|}
avifDecoderSetIO:
 5118|  18.6k|{
 5119|  18.6k|    avifIODestroy(decoder->io);
 5120|  18.6k|    decoder->io = io;
 5121|  18.6k|}
avifDecoderParse:
 5289|  1.69M|{
 5290|  1.69M|    avifDiagnosticsClearError(&decoder->diag);
 5291|       |
 5292|       |    // An imageSizeLimit greater than AVIF_DEFAULT_IMAGE_SIZE_LIMIT and the special value of 0 to
 5293|       |    // disable the limit are not yet implemented.
 5294|  1.69M|    if ((decoder->imageSizeLimit > AVIF_DEFAULT_IMAGE_SIZE_LIMIT) || (decoder->imageSizeLimit == 0)) {
  ------------------
  |  |   95|  1.69M|#define AVIF_DEFAULT_IMAGE_SIZE_LIMIT (16384 * 16384)
  ------------------
  |  Branch (5294:9): [True: 0, False: 1.69M]
  |  Branch (5294:70): [True: 0, False: 1.69M]
  ------------------
 5295|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5296|      0|    }
 5297|       |    // Color only or alpha only is not currently supported.
 5298|  1.69M|    if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) != 0 &&
  ------------------
  |  Branch (5298:9): [True: 1.34M, False: 350k]
  ------------------
 5299|  1.34M|        (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) != AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) {
  ------------------
  |  Branch (5299:9): [True: 4, False: 1.34M]
  ------------------
 5300|      4|        avifDiagnosticsPrintf(&decoder->diag, "imageContentToDecode set to only color or only alpha is not supported");
 5301|      4|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5302|      4|    }
 5303|  1.69M|    if (!decoder->io || !decoder->io->read) {
  ------------------
  |  Branch (5303:9): [True: 0, False: 1.69M]
  |  Branch (5303:25): [True: 0, False: 1.69M]
  ------------------
 5304|      0|        return AVIF_RESULT_IO_NOT_SET;
 5305|      0|    }
 5306|       |
 5307|       |    // Cleanup anything lingering in the decoder
 5308|  1.69M|    avifDecoderCleanup(decoder);
 5309|       |
 5310|       |    // -----------------------------------------------------------------------
 5311|       |    // Parse BMFF boxes
 5312|       |
 5313|  1.69M|    decoder->data = avifDecoderDataCreate();
 5314|  1.69M|    AVIF_CHECKERR(decoder->data != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  1.69M|    do {                        \
  |  |   46|  1.69M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.69M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.69M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.69M]
  |  |  ------------------
  ------------------
 5315|  1.69M|    decoder->data->diag = &decoder->diag;
 5316|       |
 5317|  1.69M|    AVIF_CHECKRES(avifParse(decoder));
  ------------------
  |  |   54|  1.69M|    do {                                  \
  |  |   55|  1.69M|        const avifResult result__ = (A);  \
  |  |   56|  1.69M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1.40M, False: 290k]
  |  |  ------------------
  |  |   57|  1.40M|            avifBreakOnError();           \
  |  |   58|  1.40M|            return result__;              \
  |  |   59|  1.40M|        }                                 \
  |  |   60|  1.69M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 290k]
  |  |  ------------------
  ------------------
 5318|       |
 5319|       |    // Walk the decoded items (if any) and harvest ispe
 5320|   290k|    avifDecoderData * data = decoder->data;
 5321|  1.13M|    for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5321:34): [True: 846k, False: 290k]
  ------------------
 5322|   846k|        avifDecoderItem * item = data->meta->items.item[itemIndex];
 5323|   846k|        if (avifDecoderItemShouldBeSkipped(item)) {
  ------------------
  |  Branch (5323:13): [True: 407k, False: 439k]
  ------------------
 5324|   407k|            continue;
 5325|   407k|        }
 5326|       |
 5327|   439k|        const avifProperty * ispeProp = avifPropertyArrayFind(&item->properties, "ispe");
 5328|   439k|        if (ispeProp) {
  ------------------
  |  Branch (5328:13): [True: 439k, False: 108]
  ------------------
 5329|   439k|            item->width = ispeProp->u.ispe.width;
 5330|   439k|            item->height = ispeProp->u.ispe.height;
 5331|       |
 5332|   439k|            if ((item->width == 0) || (item->height == 0)) {
  ------------------
  |  Branch (5332:17): [True: 1, False: 439k]
  |  Branch (5332:39): [True: 1, False: 439k]
  ------------------
 5333|      2|                avifDiagnosticsPrintf(data->diag, "Item ID [%u] has an invalid size [%ux%u]", item->id, item->width, item->height);
 5334|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5335|      2|            }
 5336|   439k|            if (avifDimensionsTooLarge(item->width, item->height, decoder->imageSizeLimit, decoder->imageDimensionLimit)) {
  ------------------
  |  Branch (5336:17): [True: 88, False: 439k]
  ------------------
 5337|     88|                avifDiagnosticsPrintf(data->diag, "Item ID [%u] dimensions are too large [%ux%u]", item->id, item->width, item->height);
 5338|     88|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5339|     88|            }
 5340|   439k|        } else {
 5341|    108|            const avifProperty * auxCProp = avifPropertyArrayFind(&item->properties, "auxC");
 5342|    108|            if (auxCProp && isAlphaURN(auxCProp->u.auxC.auxType)) {
  ------------------
  |  Branch (5342:17): [True: 100, False: 8]
  |  Branch (5342:29): [True: 1, False: 99]
  ------------------
 5343|      1|                if (decoder->strictFlags & AVIF_STRICT_ALPHA_ISPE_REQUIRED) {
  ------------------
  |  Branch (5343:21): [True: 1, False: 0]
  ------------------
 5344|      1|                    avifDiagnosticsPrintf(data->diag,
 5345|      1|                                          "[Strict] Alpha auxiliary image item ID [%u] is missing a mandatory ispe property",
 5346|      1|                                          item->id);
 5347|      1|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 5348|      1|                }
 5349|    107|            } else {
 5350|    107|                avifDiagnosticsPrintf(data->diag, "Item ID [%u] is missing a mandatory ispe property", item->id);
 5351|    107|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5352|    107|            }
 5353|    108|        }
 5354|   439k|    }
 5355|   290k|    return avifDecoderReset(decoder);
 5356|   290k|}
avifDecoderReset:
 6078|   290k|{
 6079|   290k|    avifDiagnosticsClearError(&decoder->diag);
 6080|       |
 6081|   290k|    avifDecoderData * data = decoder->data;
 6082|   290k|    if (!data) {
  ------------------
  |  Branch (6082:9): [True: 0, False: 290k]
  ------------------
 6083|       |        // Nothing to reset.
 6084|      0|        return AVIF_RESULT_OK;
 6085|      0|    }
 6086|       |
 6087|  2.61M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6087:21): [True: 2.32M, False: 290k]
  ------------------
 6088|  2.32M|        memset(&data->tileInfos[c].grid, 0, sizeof(data->tileInfos[c].grid));
 6089|  2.32M|    }
 6090|   290k|    avifDecoderDataClearTiles(data);
 6091|       |
 6092|       |    // Prepare / cleanup decoded image state
 6093|   290k|    if (decoder->image) {
  ------------------
  |  Branch (6093:9): [True: 0, False: 290k]
  ------------------
 6094|      0|        avifImageDestroy(decoder->image);
 6095|      0|    }
 6096|   290k|    decoder->image = avifImageCreateEmpty();
 6097|   290k|    AVIF_CHECKERR(decoder->image, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   290k|    do {                        \
  |  |   46|   290k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 290k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   290k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 290k]
  |  |  ------------------
  ------------------
 6098|   290k|    decoder->progressiveState = AVIF_PROGRESSIVE_STATE_UNAVAILABLE;
 6099|   290k|    data->cicpSet = AVIF_FALSE;
  ------------------
  |  |   89|   290k|#define AVIF_FALSE 0
  ------------------
 6100|       |
 6101|   290k|    memset(&decoder->ioStats, 0, sizeof(decoder->ioStats));
 6102|       |
 6103|       |    // Color only or alpha only is not currently supported.
 6104|   290k|    if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) != 0 &&
  ------------------
  |  Branch (6104:9): [True: 261k, False: 28.8k]
  ------------------
 6105|   261k|        (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) != AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) {
  ------------------
  |  Branch (6105:9): [True: 0, False: 261k]
  ------------------
 6106|      0|        avifDiagnosticsPrintf(&decoder->diag, "imageContentToDecode set to only color or only alpha is not supported");
 6107|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 6108|      0|    }
 6109|       |
 6110|       |    // -----------------------------------------------------------------------
 6111|       |    // Build decode input
 6112|       |
 6113|   290k|    data->sourceSampleTable = NULL; // Reset
 6114|   290k|    if (decoder->requestedSource == AVIF_DECODER_SOURCE_AUTO) {
  ------------------
  |  Branch (6114:9): [True: 290k, False: 0]
  ------------------
 6115|       |        // Honor the major brand (avif or avis) if present, otherwise prefer avis (tracks) if possible.
 6116|   290k|        if (!memcmp(data->majorBrand, "avis", 4)) {
  ------------------
  |  Branch (6116:13): [True: 9.32k, False: 281k]
  ------------------
 6117|  9.32k|            data->source = AVIF_DECODER_SOURCE_TRACKS;
 6118|   281k|        } else if (!memcmp(data->majorBrand, "avif", 4)) {
  ------------------
  |  Branch (6118:20): [True: 222k, False: 58.2k]
  ------------------
 6119|   222k|            data->source = AVIF_DECODER_SOURCE_PRIMARY_ITEM;
 6120|   222k|        } else if (data->tracks.count > 0) {
  ------------------
  |  Branch (6120:20): [True: 23.2k, False: 35.0k]
  ------------------
 6121|  23.2k|            data->source = AVIF_DECODER_SOURCE_TRACKS;
 6122|  35.0k|        } else {
 6123|  35.0k|            data->source = AVIF_DECODER_SOURCE_PRIMARY_ITEM;
 6124|  35.0k|        }
 6125|   290k|    } else {
 6126|      0|        data->source = decoder->requestedSource;
 6127|      0|    }
 6128|       |
 6129|   290k|    avifCodecType colorCodecType = AVIF_CODEC_TYPE_UNKNOWN;
 6130|   290k|    const avifPropertyArray * colorProperties = NULL;
 6131|   290k|    const avifPropertyArray * alphaProperties = NULL;
 6132|   290k|    const avifPropertyArray * gainMapProperties = NULL;
 6133|   290k|    if (data->source == AVIF_DECODER_SOURCE_TRACKS) {
  ------------------
  |  Branch (6133:9): [True: 32.5k, False: 257k]
  ------------------
 6134|  32.5k|        avifTrack * colorTrack = NULL;
 6135|  32.5k|        avifTrack * alphaTrack = NULL;
 6136|       |
 6137|       |        // Find primary track - this probably needs some better detection
 6138|  32.5k|        uint32_t colorTrackIndex = 0;
 6139|  33.3k|        for (; colorTrackIndex < data->tracks.count; ++colorTrackIndex) {
  ------------------
  |  Branch (6139:16): [True: 33.3k, False: 62]
  ------------------
 6140|  33.3k|            avifTrack * track = &data->tracks.track[colorTrackIndex];
 6141|  33.3k|            if (!track->sampleTable) {
  ------------------
  |  Branch (6141:17): [True: 587, False: 32.7k]
  ------------------
 6142|    587|                continue;
 6143|    587|            }
 6144|  32.7k|            if (!track->id) { // trak box might be missing a tkhd box inside, skip it
  ------------------
  |  Branch (6144:17): [True: 46, False: 32.7k]
  ------------------
 6145|     46|                continue;
 6146|     46|            }
 6147|  32.7k|            if (!track->sampleTable->chunks.count) {
  ------------------
  |  Branch (6147:17): [True: 120, False: 32.5k]
  ------------------
 6148|    120|                continue;
 6149|    120|            }
 6150|  32.5k|            colorCodecType = avifSampleTableGetCodecType(track->sampleTable);
 6151|  32.5k|            if (colorCodecType == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (6151:17): [True: 104, False: 32.4k]
  ------------------
 6152|    104|                continue;
 6153|    104|            }
 6154|  32.4k|            if (track->auxForID != 0) {
  ------------------
  |  Branch (6154:17): [True: 2, False: 32.4k]
  ------------------
 6155|      2|                continue;
 6156|      2|            }
 6157|       |            // HEIF (ISO/IEC 23008-12:2022), Section 7.1:
 6158|       |            //   In order to distinguish image sequences from video, the handler type in the
 6159|       |            //   HandlerBox of the track is 'pict' to indicate an image sequence track.
 6160|       |            // But we do not check the handler type because it may break some existing files.
 6161|       |
 6162|       |            // Found one!
 6163|  32.4k|            break;
 6164|  32.4k|        }
 6165|  32.5k|        if (colorTrackIndex == data->tracks.count) {
  ------------------
  |  Branch (6165:13): [True: 62, False: 32.4k]
  ------------------
 6166|     62|            avifDiagnosticsPrintf(&decoder->diag, "Failed to find AV1 color track");
 6167|     62|            return AVIF_RESULT_NO_CONTENT;
 6168|     62|        }
 6169|  32.4k|        colorTrack = &data->tracks.track[colorTrackIndex];
 6170|       |
 6171|  32.4k|        colorProperties = avifSampleTableGetProperties(colorTrack->sampleTable, colorCodecType);
 6172|  32.4k|        if (!colorProperties) {
  ------------------
  |  Branch (6172:13): [True: 0, False: 32.4k]
  ------------------
 6173|      0|            avifDiagnosticsPrintf(&decoder->diag, "Failed to find AV1 color track's color properties");
 6174|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 6175|      0|        }
 6176|       |
 6177|       |        // Find Exif and/or XMP metadata, if any
 6178|  32.4k|        if (colorTrack->meta) {
  ------------------
  |  Branch (6178:13): [True: 32.4k, False: 0]
  ------------------
 6179|       |            // See the comment above avifDecoderFindMetadata() for the explanation of using 0 here
 6180|  32.4k|            avifResult findResult = avifDecoderFindMetadata(decoder, colorTrack->meta, decoder->image, 0);
 6181|  32.4k|            if (findResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6181:17): [True: 10, False: 32.4k]
  ------------------
 6182|     10|                return findResult;
 6183|     10|            }
 6184|  32.4k|        }
 6185|       |
 6186|  32.4k|        uint32_t alphaTrackIndex = 0;
 6187|  32.4k|        avifCodecType alphaCodecType = AVIF_CODEC_TYPE_UNKNOWN;
 6188|  75.2k|        for (; alphaTrackIndex < data->tracks.count; ++alphaTrackIndex) {
  ------------------
  |  Branch (6188:16): [True: 42.8k, False: 32.4k]
  ------------------
 6189|  42.8k|            avifTrack * track = &data->tracks.track[alphaTrackIndex];
 6190|  42.8k|            if (!track->sampleTable) {
  ------------------
  |  Branch (6190:17): [True: 3.48k, False: 39.3k]
  ------------------
 6191|  3.48k|                continue;
 6192|  3.48k|            }
 6193|  39.3k|            if (!track->id) {
  ------------------
  |  Branch (6193:17): [True: 589, False: 38.7k]
  ------------------
 6194|    589|                continue;
 6195|    589|            }
 6196|  38.7k|            if (!track->sampleTable->chunks.count) {
  ------------------
  |  Branch (6196:17): [True: 2.33k, False: 36.4k]
  ------------------
 6197|  2.33k|                continue;
 6198|  2.33k|            }
 6199|  36.4k|            alphaCodecType = avifSampleTableGetCodecType(track->sampleTable);
 6200|  36.4k|            if (alphaCodecType == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (6200:17): [True: 3.18k, False: 33.2k]
  ------------------
 6201|  3.18k|                continue;
 6202|  3.18k|            }
 6203|  33.2k|            const avifPropertyArray * properties = avifSampleTableGetProperties(track->sampleTable, alphaCodecType);
 6204|  33.2k|            const avifProperty * auxiProp = properties ? avifPropertyArrayFind(properties, "auxi") : NULL;
  ------------------
  |  Branch (6204:45): [True: 33.2k, False: 0]
  ------------------
 6205|       |            // If auxi is present, check that it contains the alpha URN.
 6206|       |            // If auxi is not present, assume that the track is alpha. This is for backward compatibility with
 6207|       |            // old versions of libavif that did not write this property, see
 6208|       |            // https://github.com/AOMediaCodec/libavif/commit/98faa17
 6209|  33.2k|            if (auxiProp && !isAlphaURN(auxiProp->u.auxC.auxType)) {
  ------------------
  |  Branch (6209:17): [True: 1.47k, False: 31.7k]
  |  Branch (6209:29): [True: 1.19k, False: 286]
  ------------------
 6210|  1.19k|                continue;
 6211|  1.19k|            }
 6212|       |            // Do not check the track's handlerType. It should be "auxv" according to
 6213|       |            // HEIF (ISO/IEC 23008-12:2022), Section 7.5.3.1, but old versions of libavif used to write
 6214|       |            // "pict" instead. See https://github.com/AOMediaCodec/libavif/commit/65d0af9
 6215|       |
 6216|  32.0k|            if (track->auxForID == colorTrack->id) {
  ------------------
  |  Branch (6216:17): [True: 29, False: 32.0k]
  ------------------
 6217|       |                // Found it!
 6218|     29|                alphaProperties = properties;
 6219|     29|                break;
 6220|     29|            }
 6221|  32.0k|        }
 6222|  32.4k|        if (alphaTrackIndex != data->tracks.count) {
  ------------------
  |  Branch (6222:13): [True: 29, False: 32.4k]
  ------------------
 6223|     29|            alphaTrack = &data->tracks.track[alphaTrackIndex];
 6224|     29|        }
 6225|       |
 6226|  32.4k|        const uint8_t operatingPoint = 0; // No way to set operating point via tracks
 6227|  32.4k|        avifTile * colorTile = avifDecoderDataCreateTile(data, colorCodecType, colorTrack->width, colorTrack->height, operatingPoint);
 6228|  32.4k|        AVIF_CHECKERR(colorTile != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  32.4k|    do {                        \
  |  |   46|  32.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 32.4k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 32.4k]
  |  |  ------------------
  ------------------
 6229|  32.4k|        AVIF_CHECKRES(avifCodecDecodeInputFillFromSampleTable(colorTile->input,
  ------------------
  |  |   54|  32.4k|    do {                                  \
  |  |   55|  32.4k|        const avifResult result__ = (A);  \
  |  |   56|  32.4k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 295, False: 32.1k]
  |  |  ------------------
  |  |   57|    295|            avifBreakOnError();           \
  |  |   58|    295|            return result__;              \
  |  |   59|    295|        }                                 \
  |  |   60|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 32.1k]
  |  |  ------------------
  ------------------
 6230|  32.4k|                                                              colorTrack->sampleTable,
 6231|  32.4k|                                                              decoder->imageCountLimit,
 6232|  32.4k|                                                              decoder->io->sizeHint,
 6233|  32.4k|                                                              data->diag));
 6234|  32.1k|        data->tileInfos[AVIF_ITEM_COLOR].tileCount = 1;
 6235|       |
 6236|  32.1k|        if (alphaTrack) {
  ------------------
  |  Branch (6236:13): [True: 20, False: 32.1k]
  ------------------
 6237|     20|            avifTile * alphaTile = avifDecoderDataCreateTile(data, alphaCodecType, alphaTrack->width, alphaTrack->height, operatingPoint);
 6238|     20|            AVIF_CHECKERR(alphaTile != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|     20|    do {                        \
  |  |   46|     20|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 20]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     20|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 20]
  |  |  ------------------
  ------------------
 6239|     20|            AVIF_CHECKRES(avifCodecDecodeInputFillFromSampleTable(alphaTile->input,
  ------------------
  |  |   54|     20|    do {                                  \
  |  |   55|     20|        const avifResult result__ = (A);  \
  |  |   56|     20|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 19]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|     20|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 19]
  |  |  ------------------
  ------------------
 6240|     20|                                                                  alphaTrack->sampleTable,
 6241|     20|                                                                  decoder->imageCountLimit,
 6242|     20|                                                                  decoder->io->sizeHint,
 6243|     20|                                                                  data->diag));
 6244|     19|            alphaTile->input->itemCategory = AVIF_ITEM_ALPHA;
 6245|     19|            data->tileInfos[AVIF_ITEM_ALPHA].tileCount = 1;
 6246|     19|        }
 6247|       |
 6248|       |        // Stash off sample table for future timing information
 6249|  32.1k|        data->sourceSampleTable = colorTrack->sampleTable;
 6250|       |
 6251|       |        // Image sequence timing
 6252|  32.1k|        decoder->imageIndex = -1;
 6253|  32.1k|        decoder->imageCount = (int)colorTile->input->samples.count;
 6254|  32.1k|        decoder->timescale = colorTrack->mediaTimescale;
 6255|  32.1k|        decoder->durationInTimescales = colorTrack->mediaDuration;
 6256|  32.1k|        if (colorTrack->mediaTimescale) {
  ------------------
  |  Branch (6256:13): [True: 9.05k, False: 23.1k]
  ------------------
 6257|  9.05k|            decoder->duration = (double)decoder->durationInTimescales / (double)colorTrack->mediaTimescale;
 6258|  23.1k|        } else {
 6259|  23.1k|            decoder->duration = 0;
 6260|  23.1k|        }
 6261|       |        // If the alphaTrack->repetitionCount and colorTrack->repetitionCount are different, we will simply use the
 6262|       |        // colorTrack's repetitionCount.
 6263|  32.1k|        decoder->repetitionCount = colorTrack->repetitionCount;
 6264|       |
 6265|  32.1k|        memset(&decoder->imageTiming, 0, sizeof(decoder->imageTiming)); // to be set in avifDecoderNextImage()
 6266|       |
 6267|  32.1k|        decoder->image->width = colorTrack->width;
 6268|  32.1k|        decoder->image->height = colorTrack->height;
 6269|  32.1k|        decoder->alphaPresent = (alphaTrack != NULL);
 6270|  32.1k|        decoder->image->alphaPremultiplied = decoder->alphaPresent && (colorTrack->premByID == alphaTrack->id);
  ------------------
  |  Branch (6270:46): [True: 19, False: 32.1k]
  |  Branch (6270:71): [True: 0, False: 19]
  ------------------
 6271|   257k|    } else {
 6272|       |        // Create from items
 6273|       |
 6274|   257k|        if (data->meta->primaryItemID == 0) {
  ------------------
  |  Branch (6274:13): [True: 39, False: 257k]
  ------------------
 6275|       |            // A primary item is required
 6276|     39|            avifDiagnosticsPrintf(&decoder->diag, "Primary item not specified");
 6277|     39|            return AVIF_RESULT_MISSING_IMAGE_ITEM;
 6278|     39|        }
 6279|       |
 6280|       |        // Main item of each group category (top-level item such as grid or single tile), if any.
 6281|   257k|        avifDecoderItem * mainItems[AVIF_ITEM_CATEGORY_COUNT];
 6282|   257k|        avifCodecType codecType[AVIF_ITEM_CATEGORY_COUNT];
 6283|  2.32M|        for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6283:25): [True: 2.06M, False: 257k]
  ------------------
 6284|  2.06M|            mainItems[c] = NULL;
 6285|  2.06M|            codecType[c] = AVIF_CODEC_TYPE_UNKNOWN;
 6286|  2.06M|        }
 6287|       |
 6288|       |        // Mandatory primary color item
 6289|   257k|        mainItems[AVIF_ITEM_COLOR] = avifMetaFindColorItem(data->meta);
 6290|   257k|        if (!mainItems[AVIF_ITEM_COLOR]) {
  ------------------
  |  Branch (6290:13): [True: 90, False: 257k]
  ------------------
 6291|     90|            avifDiagnosticsPrintf(&decoder->diag, "Primary item not found");
 6292|     90|            return AVIF_RESULT_MISSING_IMAGE_ITEM;
 6293|     90|        }
 6294|   257k|        AVIF_CHECKRES(avifDecoderItemReadAndParse(decoder,
  ------------------
  |  |   54|   257k|    do {                                  \
  |  |   55|   257k|        const avifResult result__ = (A);  \
  |  |   56|   257k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 199, False: 257k]
  |  |  ------------------
  |  |   57|    199|            avifBreakOnError();           \
  |  |   58|    199|            return result__;              \
  |  |   59|    199|        }                                 \
  |  |   60|   257k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 257k]
  |  |  ------------------
  ------------------
 6295|   257k|                                                  mainItems[AVIF_ITEM_COLOR],
 6296|   257k|                                                  /*isItemInInput=*/AVIF_TRUE,
 6297|   257k|                                                  &data->tileInfos[AVIF_ITEM_COLOR].grid,
 6298|   257k|                                                  &codecType[AVIF_ITEM_COLOR]));
 6299|   257k|        colorProperties = &mainItems[AVIF_ITEM_COLOR]->properties;
 6300|   257k|        colorCodecType = codecType[AVIF_ITEM_COLOR];
 6301|       |
 6302|       |        // Optional alpha auxiliary item
 6303|   257k|        avifBool isAlphaItemInInput;
 6304|   257k|        AVIF_CHECKRES(avifMetaFindAlphaItem(data->meta,
  ------------------
  |  |   54|   257k|    do {                                  \
  |  |   55|   257k|        const avifResult result__ = (A);  \
  |  |   56|   257k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 257k]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|   257k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 257k]
  |  |  ------------------
  ------------------
 6305|   257k|                                            mainItems[AVIF_ITEM_COLOR],
 6306|   257k|                                            &data->tileInfos[AVIF_ITEM_COLOR],
 6307|   257k|                                            &mainItems[AVIF_ITEM_ALPHA],
 6308|   257k|                                            &data->tileInfos[AVIF_ITEM_ALPHA],
 6309|   257k|                                            &isAlphaItemInInput));
 6310|   257k|        if (mainItems[AVIF_ITEM_ALPHA]) {
  ------------------
  |  Branch (6310:13): [True: 37.8k, False: 219k]
  ------------------
 6311|  37.8k|            AVIF_CHECKRES(avifDecoderItemReadAndParse(decoder,
  ------------------
  |  |   54|  37.8k|    do {                                  \
  |  |   55|  37.8k|        const avifResult result__ = (A);  \
  |  |   56|  37.8k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 13, False: 37.8k]
  |  |  ------------------
  |  |   57|     13|            avifBreakOnError();           \
  |  |   58|     13|            return result__;              \
  |  |   59|     13|        }                                 \
  |  |   60|  37.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 37.8k]
  |  |  ------------------
  ------------------
 6312|  37.8k|                                                      mainItems[AVIF_ITEM_ALPHA],
 6313|  37.8k|                                                      isAlphaItemInInput,
 6314|  37.8k|                                                      &data->tileInfos[AVIF_ITEM_ALPHA].grid,
 6315|  37.8k|                                                      &codecType[AVIF_ITEM_ALPHA]));
 6316|  37.8k|        }
 6317|       |
 6318|       |        // Section 10.2.6 of 23008-12:2024/AMD 1:2024(E):
 6319|       |        //   'tmap' brand
 6320|       |        //   This brand enables file players to identify and decode HEIF files containing tone-map derived image
 6321|       |        //   items. When present, this brand shall be among the brands included in the compatible_brands
 6322|       |        //   array of the FileTypeBox.
 6323|       |        //
 6324|       |        // If the file contains a 'tmap' item but doesn't have the 'tmap' brand, it is technically invalid.
 6325|       |        // However, we don't report any error because in order to do detect this case consistently, we would
 6326|       |        // need to remove the early exit in avifParse() to check if a 'tmap' item might be present
 6327|       |        // further down the file. Instead, we simply ignore tmap items in files that lack the 'tmap' brand.
 6328|   257k|        if (avifBrandArrayHasBrand(&data->compatibleBrands, "tmap")) {
  ------------------
  |  Branch (6328:13): [True: 47.7k, False: 209k]
  ------------------
 6329|  47.7k|            avifDecoderItem * gainMapItem;
 6330|  47.7k|            avifCodecType gainMapCodecType;
 6331|  47.7k|            AVIF_CHECKRES(avifDecoderFindGainMapItem(decoder, mainItems[AVIF_ITEM_COLOR], &gainMapItem, &gainMapCodecType));
  ------------------
  |  |   54|  47.7k|    do {                                  \
  |  |   55|  47.7k|        const avifResult result__ = (A);  \
  |  |   56|  47.7k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 39.1k, False: 8.55k]
  |  |  ------------------
  |  |   57|  39.1k|            avifBreakOnError();           \
  |  |   58|  39.1k|            return result__;              \
  |  |   59|  39.1k|        }                                 \
  |  |   60|  47.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 8.55k]
  |  |  ------------------
  ------------------
 6332|  8.55k|            if (gainMapItem != NULL && decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_GAIN_MAP) {
  ------------------
  |  Branch (6332:17): [True: 214, False: 8.33k]
  |  Branch (6332:40): [True: 154, False: 60]
  ------------------
 6333|    154|                mainItems[AVIF_ITEM_GAIN_MAP] = gainMapItem;
 6334|    154|                codecType[AVIF_ITEM_GAIN_MAP] = gainMapCodecType;
 6335|    154|            }
 6336|  8.55k|        }
 6337|       |
 6338|       |        // AVIF_ITEM_SAMPLE_TRANSFORM (not used through mainItems because not a coded item (well grids are not coded items either but it's different)).
 6339|   218k|        avifDecoderItem * const sampleTransformItem = avifDecoderDataFindSampleTransformImageItem(data);
 6340|   218k|        if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) &&
  ------------------
  |  Branch (6340:13): [True: 218k, False: 301]
  ------------------
 6341|   218k|            (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_SAMPLE_TRANSFORMS) && sampleTransformItem != NULL) {
  ------------------
  |  Branch (6341:13): [True: 107k, False: 110k]
  |  Branch (6341:87): [True: 183, False: 107k]
  ------------------
 6342|    183|            AVIF_ASSERT_OR_RETURN(data->sampleTransformNumInputImageItems == 0);
  ------------------
  |  |   64|    183|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    183|    do {                        \
  |  |  |  |   46|    183|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 183]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    183|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 183]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6343|       |
 6344|    865|            for (uint32_t i = 0; i < data->meta->items.count; ++i) {
  ------------------
  |  Branch (6344:34): [True: 682, False: 183]
  ------------------
 6345|    682|                avifDecoderItem * inputImageItem = data->meta->items.item[i];
 6346|    682|                if (inputImageItem->dimgForID == sampleTransformItem->id) {
  ------------------
  |  Branch (6346:21): [True: 250, False: 432]
  ------------------
 6347|    250|                    ++data->sampleTransformNumInputImageItems;
 6348|    250|                }
 6349|    682|            }
 6350|       |            // Check max number of input items allowed by the format.
 6351|    183|            if (data->sampleTransformNumInputImageItems > 32) {
  ------------------
  |  Branch (6351:17): [True: 0, False: 183]
  ------------------
 6352|      0|                avifDiagnosticsPrintf(data->diag,
 6353|      0|                                      "Box[sato] too many input items, format allows up to 32, got %d",
 6354|      0|                                      data->sampleTransformNumInputImageItems);
 6355|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 6356|      0|            }
 6357|       |            // Check max number of input items supported by this implementation.
 6358|    183|            AVIF_CHECKERR(data->sampleTransformNumInputImageItems <= AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS,
  ------------------
  |  |   45|    183|    do {                        \
  |  |   46|    183|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 183]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    183|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 183]
  |  |  ------------------
  ------------------
 6359|    183|                          AVIF_RESULT_NOT_IMPLEMENTED);
 6360|       |
 6361|    183|            uint32_t numExtraInputImageItems = 0;
 6362|    857|            for (uint32_t i = 0; i < data->meta->items.count; ++i) {
  ------------------
  |  Branch (6362:34): [True: 679, False: 178]
  ------------------
 6363|    679|                avifDecoderItem * inputImageItem = data->meta->items.item[i];
 6364|    679|                if (inputImageItem->dimgForID != sampleTransformItem->id) {
  ------------------
  |  Branch (6364:21): [True: 430, False: 249]
  ------------------
 6365|    430|                    continue;
 6366|    430|                }
 6367|    249|                if (avifDecoderItemShouldBeSkipped(inputImageItem)) {
  ------------------
  |  Branch (6367:21): [True: 5, False: 244]
  ------------------
 6368|      5|                    avifDiagnosticsPrintf(data->diag, "Box[sato] input item %u is not a supported image type", inputImageItem->id);
 6369|      5|                    return AVIF_RESULT_DECODE_SAMPLE_TRANSFORM_FAILED;
 6370|      5|                }
 6371|       |
 6372|    244|                AVIF_ASSERT_OR_RETURN(inputImageItem->dimgIdx < AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS);
  ------------------
  |  |   64|    244|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    244|    do {                        \
  |  |  |  |   46|    244|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 244]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    244|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 244]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6373|    244|                avifItemCategory * category = &data->sampleTransformInputImageItems[inputImageItem->dimgIdx];
 6374|    244|                avifBool foundItem = AVIF_FALSE;
  ------------------
  |  |   89|    244|#define AVIF_FALSE 0
  ------------------
 6375|  1.20k|                for (int c = AVIF_ITEM_COLOR; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6375:47): [True: 1.08k, False: 120]
  ------------------
 6376|  1.08k|                    if (mainItems[c] && inputImageItem->id == mainItems[c]->id) {
  ------------------
  |  Branch (6376:25): [True: 244, False: 840]
  |  Branch (6376:41): [True: 124, False: 120]
  ------------------
 6377|    124|                        *category = c;
 6378|    124|                        AVIF_CHECKERR(*category == AVIF_ITEM_COLOR, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    124|    do {                        \
  |  |   46|    124|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 124]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    124|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 124]
  |  |  ------------------
  ------------------
 6379|    124|                        foundItem = AVIF_TRUE;
  ------------------
  |  |   88|    124|#define AVIF_TRUE 1
  ------------------
 6380|    124|                        break;
 6381|    124|                    }
 6382|  1.08k|                }
 6383|    244|                if (!foundItem) {
  ------------------
  |  Branch (6383:21): [True: 120, False: 124]
  ------------------
 6384|    120|                    AVIF_CHECKERR(numExtraInputImageItems < AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS,
  ------------------
  |  |   45|    120|    do {                        \
  |  |   46|    120|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 120]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    120|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 120]
  |  |  ------------------
  ------------------
 6385|    120|                                  AVIF_RESULT_NOT_IMPLEMENTED);
 6386|    120|                    *category = (avifItemCategory)(AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR + numExtraInputImageItems);
 6387|    120|                    const avifItemCategory alphaCategory =
 6388|    120|                        (avifItemCategory)(AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + numExtraInputImageItems);
 6389|    120|                    mainItems[*category] = inputImageItem;
 6390|    120|                    ++numExtraInputImageItems;
 6391|       |
 6392|    120|                    AVIF_CHECKRES(avifDecoderItemReadAndParse(decoder,
  ------------------
  |  |   54|    120|    do {                                  \
  |  |   55|    120|        const avifResult result__ = (A);  \
  |  |   56|    120|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 120]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    120|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 120]
  |  |  ------------------
  ------------------
 6393|    120|                                                              inputImageItem,
 6394|    120|                                                              /*isItemInInput=*/AVIF_TRUE,
 6395|    120|                                                              &data->tileInfos[*category].grid,
 6396|    120|                                                              &codecType[*category]));
 6397|       |
 6398|       |                    // Optional alpha auxiliary item
 6399|    120|                    avifBool isAlphaInputImageItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|    120|#define AVIF_FALSE 0
  ------------------
 6400|    120|                    AVIF_CHECKRES(avifMetaFindAlphaItem(data->meta,
  ------------------
  |  |   54|    120|    do {                                  \
  |  |   55|    120|        const avifResult result__ = (A);  \
  |  |   56|    120|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 120]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    120|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 120]
  |  |  ------------------
  ------------------
 6401|    120|                                                        mainItems[*category],
 6402|    120|                                                        &data->tileInfos[*category],
 6403|    120|                                                        &mainItems[alphaCategory],
 6404|    120|                                                        &data->tileInfos[alphaCategory],
 6405|    120|                                                        &isAlphaInputImageItemInInput));
 6406|       |
 6407|    120|                    AVIF_CHECKERR(!mainItems[alphaCategory] == !mainItems[AVIF_ITEM_ALPHA], AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    120|    do {                        \
  |  |   46|    120|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 120]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    120|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 120]
  |  |  ------------------
  ------------------
 6408|    120|                    if (mainItems[alphaCategory] != NULL) {
  ------------------
  |  Branch (6408:25): [True: 0, False: 120]
  ------------------
 6409|      0|                        AVIF_CHECKERR(isAlphaInputImageItemInInput == isAlphaItemInInput, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|      0|    do {                        \
  |  |   46|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6410|      0|                        AVIF_CHECKERR((mainItems[*category]->premByID == mainItems[alphaCategory]->id) ==
  ------------------
  |  |   45|      0|    do {                        \
  |  |   46|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6411|      0|                                          (mainItems[AVIF_ITEM_COLOR]->premByID == mainItems[AVIF_ITEM_ALPHA]->id),
 6412|      0|                                      AVIF_RESULT_NOT_IMPLEMENTED);
 6413|      0|                        AVIF_CHECKRES(avifDecoderItemReadAndParse(decoder,
  ------------------
  |  |   54|      0|    do {                                  \
  |  |   55|      0|        const avifResult result__ = (A);  \
  |  |   56|      0|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6414|      0|                                                                  mainItems[alphaCategory],
 6415|      0|                                                                  isAlphaInputImageItemInInput,
 6416|      0|                                                                  &data->tileInfos[alphaCategory].grid,
 6417|      0|                                                                  &codecType[alphaCategory]));
 6418|      0|                    }
 6419|    120|                }
 6420|    244|            }
 6421|       |
 6422|    178|            AVIF_ASSERT_OR_RETURN(data->meta->sampleTransformExpression.tokens == NULL);
  ------------------
  |  |   64|    178|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    178|    do {                        \
  |  |  |  |   46|    178|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 178]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    178|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 178]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6423|    178|            avifROData satoData;
 6424|    178|            AVIF_CHECKRES(avifDecoderItemRead(sampleTransformItem, decoder->io, &satoData, 0, 0, data->diag));
  ------------------
  |  |   54|    178|    do {                                  \
  |  |   55|    178|        const avifResult result__ = (A);  \
  |  |   56|    178|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 12, False: 166]
  |  |  ------------------
  |  |   57|     12|            avifBreakOnError();           \
  |  |   58|     12|            return result__;              \
  |  |   59|     12|        }                                 \
  |  |   60|    178|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 166]
  |  |  ------------------
  ------------------
 6425|    166|            AVIF_CHECKRES(avifParseSampleTransformImageBox(satoData.data,
  ------------------
  |  |   54|    166|    do {                                  \
  |  |   55|    166|        const avifResult result__ = (A);  \
  |  |   56|    166|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 55, False: 111]
  |  |  ------------------
  |  |   57|     55|            avifBreakOnError();           \
  |  |   58|     55|            return result__;              \
  |  |   59|     55|        }                                 \
  |  |   60|    166|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 111]
  |  |  ------------------
  ------------------
 6426|    166|                                                           satoData.size,
 6427|    166|                                                           data->sampleTransformNumInputImageItems,
 6428|    166|                                                           &data->meta->sampleTransformExpression,
 6429|    166|                                                           data->diag));
 6430|    111|            AVIF_CHECKRES(avifDecoderSampleTransformItemValidateProperties(sampleTransformItem, data->diag));
  ------------------
  |  |   54|    111|    do {                                  \
  |  |   55|    111|        const avifResult result__ = (A);  \
  |  |   56|    111|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 9, False: 102]
  |  |  ------------------
  |  |   57|      9|            avifBreakOnError();           \
  |  |   58|      9|            return result__;              \
  |  |   59|      9|        }                                 \
  |  |   60|    111|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 102]
  |  |  ------------------
  ------------------
 6431|    102|            const avifProperty * pixiProp = avifPropertyArrayFind(&sampleTransformItem->properties, "pixi");
 6432|    102|            AVIF_ASSERT_OR_RETURN(pixiProp != NULL);
  ------------------
  |  |   64|    102|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    102|    do {                        \
  |  |  |  |   46|    102|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 102]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    102|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 102]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6433|    102|            data->meta->sampleTransformDepth = pixiProp->u.pixi.planeDepths[0];
 6434|    102|        }
 6435|       |
 6436|       |        // Find Exif and/or XMP metadata, if any
 6437|   218k|        AVIF_CHECKRES(avifDecoderFindMetadata(decoder, data->meta, decoder->image, mainItems[AVIF_ITEM_COLOR]->id));
  ------------------
  |  |   54|   218k|    do {                                  \
  |  |   55|   218k|        const avifResult result__ = (A);  \
  |  |   56|   218k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 8, False: 218k]
  |  |  ------------------
  |  |   57|      8|            avifBreakOnError();           \
  |  |   58|      8|            return result__;              \
  |  |   59|      8|        }                                 \
  |  |   60|   218k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 218k]
  |  |  ------------------
  ------------------
 6438|       |
 6439|       |        // Set all counts and timing to safe-but-uninteresting values
 6440|   218k|        decoder->imageIndex = -1;
 6441|   218k|        decoder->imageCount = 1;
 6442|   218k|        decoder->imageTiming.timescale = 1;
 6443|   218k|        decoder->imageTiming.pts = 0;
 6444|   218k|        decoder->imageTiming.ptsInTimescales = 0;
 6445|   218k|        decoder->imageTiming.duration = 1;
 6446|   218k|        decoder->imageTiming.durationInTimescales = 1;
 6447|   218k|        decoder->timescale = 1;
 6448|   218k|        decoder->duration = 1;
 6449|   218k|        decoder->durationInTimescales = 1;
 6450|       |
 6451|  1.96M|        for (int c = AVIF_ITEM_COLOR; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6451:39): [True: 1.74M, False: 217k]
  ------------------
 6452|  1.74M|            if (!mainItems[c]) {
  ------------------
  |  Branch (6452:17): [True: 1.49M, False: 251k]
  ------------------
 6453|  1.49M|                continue;
 6454|  1.49M|            }
 6455|   251k|            AVIF_ASSERT_OR_RETURN(c != AVIF_ITEM_SAMPLE_TRANSFORM); // See sampleTransformItem.
  ------------------
  |  |   64|   251k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   251k|    do {                        \
  |  |  |  |   46|   251k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 251k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   251k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 251k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6456|       |
 6457|   251k|            if (avifIsAlpha((avifItemCategory)c) && !mainItems[c]->width && !mainItems[c]->height) {
  ------------------
  |  Branch (6457:17): [True: 32.4k, False: 218k]
  |  Branch (6457:53): [True: 0, False: 32.4k]
  |  Branch (6457:77): [True: 0, False: 0]
  ------------------
 6458|       |                // NON-STANDARD: Alpha subimage does not have an ispe property; adopt width/height from color item
 6459|      0|                AVIF_ASSERT_OR_RETURN(!(decoder->strictFlags & AVIF_STRICT_ALPHA_ISPE_REQUIRED));
  ------------------
  |  |   64|      0|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|      0|    do {                        \
  |  |  |  |   46|      0|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6460|      0|                mainItems[c]->width = mainItems[AVIF_ITEM_COLOR]->width;
 6461|      0|                mainItems[c]->height = mainItems[AVIF_ITEM_COLOR]->height;
 6462|      0|            }
 6463|       |
 6464|   251k|            AVIF_CHECKRES(avifDecoderAdoptGridTileCodecTypeIfNeeded(decoder, mainItems[c], &data->tileInfos[c]));
  ------------------
  |  |   54|   251k|    do {                                  \
  |  |   55|   251k|        const avifResult result__ = (A);  \
  |  |   56|   251k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 99, False: 250k]
  |  |  ------------------
  |  |   57|     99|            avifBreakOnError();           \
  |  |   58|     99|            return result__;              \
  |  |   59|     99|        }                                 \
  |  |   60|   251k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 250k]
  |  |  ------------------
  ------------------
 6465|       |
 6466|   250k|            if (c == AVIF_ITEM_COLOR || c == AVIF_ITEM_ALPHA) {
  ------------------
  |  Branch (6466:17): [True: 218k, False: 32.7k]
  |  Branch (6466:41): [True: 32.4k, False: 255]
  ------------------
 6467|   250k|                if (!(decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA)) {
  ------------------
  |  Branch (6467:21): [True: 259, False: 250k]
  ------------------
 6468|    259|                    continue;
 6469|    259|                }
 6470|   250k|            } else if (c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR || c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_1_COLOR ||
  ------------------
  |  Branch (6470:24): [True: 102, False: 153]
  |  Branch (6470:73): [True: 0, False: 153]
  ------------------
 6471|    153|                       c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA || c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_1_ALPHA) {
  ------------------
  |  Branch (6471:24): [True: 0, False: 153]
  |  Branch (6471:73): [True: 0, False: 153]
  ------------------
 6472|    102|                AVIF_ASSERT_OR_RETURN((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) &&
  ------------------
  |  |   64|    102|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    102|    do {                        \
  |  |  |  |   46|    204|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 102, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 102, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    102|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 102]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6473|    102|                                      (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_SAMPLE_TRANSFORMS));
 6474|    153|            } else {
 6475|    153|                AVIF_ASSERT_OR_RETURN(c == AVIF_ITEM_GAIN_MAP);
  ------------------
  |  |   64|    153|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    153|    do {                        \
  |  |  |  |   46|    153|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 153]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    153|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 153]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6476|    153|                if (!(decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_GAIN_MAP)) {
  ------------------
  |  Branch (6476:21): [True: 0, False: 153]
  ------------------
 6477|      0|                    continue;
 6478|      0|                }
 6479|    153|            }
 6480|       |
 6481|   250k|            AVIF_CHECKRES(avifDecoderGenerateImageTiles(decoder, &data->tileInfos[c], mainItems[c], (avifItemCategory)c));
  ------------------
  |  |   54|   250k|    do {                                  \
  |  |   55|   250k|        const avifResult result__ = (A);  \
  |  |   56|   250k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 381, False: 250k]
  |  |  ------------------
  |  |   57|    381|            avifBreakOnError();           \
  |  |   58|    381|            return result__;              \
  |  |   59|    381|        }                                 \
  |  |   60|   250k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 250k]
  |  |  ------------------
  ------------------
 6482|       |
 6483|   250k|            avifStrictFlags strictFlags = decoder->strictFlags;
 6484|   250k|            if (avifIsAlpha((avifItemCategory)c) && !isAlphaItemInInput) {
  ------------------
  |  Branch (6484:17): [True: 32.4k, False: 217k]
  |  Branch (6484:53): [True: 914, False: 31.5k]
  ------------------
 6485|       |                // In this case, the made up grid item will not have an associated pixi property. So validate everything else
 6486|       |                // but the pixi property.
 6487|    914|                strictFlags &= ~(avifStrictFlags)AVIF_STRICT_PIXI_REQUIRED;
 6488|    914|            }
 6489|   250k|            AVIF_CHECKRES(
  ------------------
  |  |   54|   250k|    do {                                  \
  |  |   55|   250k|        const avifResult result__ = (A);  \
  |  |   56|   250k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 40, False: 250k]
  |  |  ------------------
  |  |   57|     40|            avifBreakOnError();           \
  |  |   58|     40|            return result__;              \
  |  |   59|     40|        }                                 \
  |  |   60|   250k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 250k]
  |  |  ------------------
  ------------------
 6490|   250k|                avifDecoderItemValidateProperties(mainItems[c], avifGetConfigurationPropertyName(codecType[c]), &decoder->diag, strictFlags));
 6491|   250k|        }
 6492|       |
 6493|   217k|        if (mainItems[AVIF_ITEM_COLOR]->progressive) {
  ------------------
  |  Branch (6493:13): [True: 494, False: 217k]
  ------------------
 6494|    494|            decoder->progressiveState = AVIF_PROGRESSIVE_STATE_AVAILABLE;
 6495|       |            // data->tileInfos[AVIF_ITEM_COLOR].firstTileIndex is not yet defined but will be set to 0 a few lines below.
 6496|    494|            const avifTile * colorTile = &data->tiles.tile[0];
 6497|    494|            if (colorTile->input->samples.count > 1) {
  ------------------
  |  Branch (6497:17): [True: 0, False: 494]
  ------------------
 6498|      0|                decoder->progressiveState = AVIF_PROGRESSIVE_STATE_ACTIVE;
 6499|      0|                decoder->imageCount = (int)colorTile->input->samples.count;
 6500|      0|            }
 6501|    494|        }
 6502|       |
 6503|   217k|        decoder->image->width = mainItems[AVIF_ITEM_COLOR]->width;
 6504|   217k|        decoder->image->height = mainItems[AVIF_ITEM_COLOR]->height;
 6505|   217k|        decoder->alphaPresent = (mainItems[AVIF_ITEM_ALPHA] != NULL);
 6506|   217k|        decoder->image->alphaPremultiplied = decoder->alphaPresent &&
  ------------------
  |  Branch (6506:46): [True: 32.4k, False: 185k]
  ------------------
 6507|  32.4k|                                             (mainItems[AVIF_ITEM_COLOR]->premByID == mainItems[AVIF_ITEM_ALPHA]->id);
  ------------------
  |  Branch (6507:46): [True: 0, False: 32.4k]
  ------------------
 6508|       |
 6509|   217k|        if (mainItems[AVIF_ITEM_ALPHA]) {
  ------------------
  |  Branch (6509:13): [True: 32.4k, False: 185k]
  ------------------
 6510|  32.4k|            alphaProperties = &mainItems[AVIF_ITEM_ALPHA]->properties;
 6511|  32.4k|        }
 6512|   217k|        if (mainItems[AVIF_ITEM_GAIN_MAP]) {
  ------------------
  |  Branch (6512:13): [True: 128, False: 217k]
  ------------------
 6513|    128|            AVIF_ASSERT_OR_RETURN(decoder->image->gainMap && decoder->image->gainMap->image);
  ------------------
  |  |   64|    128|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    128|    do {                        \
  |  |  |  |   46|    256|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 128, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 128, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    128|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 128]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6514|    128|            decoder->image->gainMap->image->width = mainItems[AVIF_ITEM_GAIN_MAP]->width;
 6515|    128|            decoder->image->gainMap->image->height = mainItems[AVIF_ITEM_GAIN_MAP]->height;
 6516|       |            // Must be called after avifDecoderAdoptGridTileCodecType() which among other things copies the
 6517|       |            // codec config property from the first tile of a grid to the grid item (when grids are used).
 6518|    128|            AVIF_CHECKRES(avifReadCodecConfigProperty(decoder->image->gainMap->image,
  ------------------
  |  |   54|    128|    do {                                  \
  |  |   55|    128|        const avifResult result__ = (A);  \
  |  |   56|    128|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 128]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    128|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 128]
  |  |  ------------------
  ------------------
 6519|    128|                                                      &mainItems[AVIF_ITEM_GAIN_MAP]->properties,
 6520|    128|                                                      codecType[AVIF_ITEM_GAIN_MAP]));
 6521|    128|            gainMapProperties = &mainItems[AVIF_ITEM_GAIN_MAP]->properties;
 6522|    128|        }
 6523|   217k|    }
 6524|       |
 6525|   249k|    uint32_t firstTileIndex = 0;
 6526|  2.24M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6526:21): [True: 1.99M, False: 249k]
  ------------------
 6527|  1.99M|        data->tileInfos[c].firstTileIndex = firstTileIndex;
 6528|  1.99M|        firstTileIndex += data->tileInfos[c].tileCount;
 6529|  1.99M|    }
 6530|       |
 6531|       |    // Sanity check tiles
 6532|   546k|    for (uint32_t tileIndex = 0; tileIndex < data->tiles.count; ++tileIndex) {
  ------------------
  |  Branch (6532:34): [True: 296k, False: 249k]
  ------------------
 6533|   296k|        avifTile * tile = &data->tiles.tile[tileIndex];
 6534|   609k|        for (uint32_t sampleIndex = 0; sampleIndex < tile->input->samples.count; ++sampleIndex) {
  ------------------
  |  Branch (6534:40): [True: 312k, False: 296k]
  ------------------
 6535|   312k|            avifDecodeSample * sample = &tile->input->samples.sample[sampleIndex];
 6536|   312k|            if (!sample->size) {
  ------------------
  |  Branch (6536:17): [True: 14, False: 312k]
  ------------------
 6537|       |                // Every sample must have some data
 6538|     14|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 6539|     14|            }
 6540|       |
 6541|   312k|            if (tile->input->itemCategory == AVIF_ITEM_COLOR) {
  ------------------
  |  Branch (6541:17): [True: 277k, False: 34.9k]
  ------------------
 6542|   277k|                decoder->ioStats.colorOBUSize += sample->size;
 6543|   277k|            } else if (tile->input->itemCategory == AVIF_ITEM_ALPHA) {
  ------------------
  |  Branch (6543:24): [True: 34.5k, False: 401]
  ------------------
 6544|  34.5k|                decoder->ioStats.alphaOBUSize += sample->size;
 6545|  34.5k|            }
 6546|   312k|        }
 6547|   296k|    }
 6548|       |
 6549|   249k|    AVIF_CHECKRES(avifReadColorProperties(decoder->io,
  ------------------
  |  |   54|   249k|    do {                                  \
  |  |   55|   249k|        const avifResult result__ = (A);  \
  |  |   56|   249k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 2, False: 249k]
  |  |  ------------------
  |  |   57|      2|            avifBreakOnError();           \
  |  |   58|      2|            return result__;              \
  |  |   59|      2|        }                                 \
  |  |   60|   249k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 249k]
  |  |  ------------------
  ------------------
 6550|   249k|                                          colorProperties,
 6551|   249k|                                          &decoder->image->icc,
 6552|   249k|                                          &decoder->image->colorPrimaries,
 6553|   249k|                                          &decoder->image->transferCharacteristics,
 6554|   249k|                                          &decoder->image->matrixCoefficients,
 6555|   249k|                                          &decoder->image->yuvRange,
 6556|   249k|                                          &data->cicpSet));
 6557|       |
 6558|   249k|    const avifProperty * clliProp = avifPropertyArrayFind(colorProperties, "clli");
 6559|   249k|    if (clliProp) {
  ------------------
  |  Branch (6559:9): [True: 35, False: 249k]
  ------------------
 6560|     35|        decoder->image->clli = clliProp->u.clli;
 6561|     35|    }
 6562|       |
 6563|       |    // Transformations
 6564|   249k|    const avifProperty * paspProp = avifPropertyArrayFind(colorProperties, "pasp");
 6565|   249k|    if (paspProp) {
  ------------------
  |  Branch (6565:9): [True: 0, False: 249k]
  ------------------
 6566|      0|        decoder->image->transformFlags |= AVIF_TRANSFORM_PASP;
 6567|      0|        decoder->image->pasp = paspProp->u.pasp;
 6568|      0|    }
 6569|   249k|    const avifProperty * clapProp = avifPropertyArrayFind(colorProperties, "clap");
 6570|   249k|    if (clapProp) {
  ------------------
  |  Branch (6570:9): [True: 0, False: 249k]
  ------------------
 6571|      0|        decoder->image->transformFlags |= AVIF_TRANSFORM_CLAP;
 6572|      0|        decoder->image->clap = clapProp->u.clap;
 6573|      0|    }
 6574|   249k|    const avifProperty * irotProp = avifPropertyArrayFind(colorProperties, "irot");
 6575|   249k|    if (irotProp) {
  ------------------
  |  Branch (6575:9): [True: 8.07k, False: 241k]
  ------------------
 6576|  8.07k|        decoder->image->transformFlags |= AVIF_TRANSFORM_IROT;
 6577|  8.07k|        decoder->image->irot = irotProp->u.irot;
 6578|  8.07k|    }
 6579|   249k|    const avifProperty * imirProp = avifPropertyArrayFind(colorProperties, "imir");
 6580|   249k|    if (imirProp) {
  ------------------
  |  Branch (6580:9): [True: 0, False: 249k]
  ------------------
 6581|      0|        decoder->image->transformFlags |= AVIF_TRANSFORM_IMIR;
 6582|      0|        decoder->image->imir = imirProp->u.imir;
 6583|      0|    }
 6584|   249k|    if (alphaProperties) {
  ------------------
  |  Branch (6584:9): [True: 32.4k, False: 217k]
  ------------------
 6585|  32.4k|        AVIF_CHECKRES(avifDecoderCheckAlphaProperties(decoder, alphaProperties));
  ------------------
  |  |   54|  32.4k|    do {                                  \
  |  |   55|  32.4k|        const avifResult result__ = (A);  \
  |  |   56|  32.4k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 32.4k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|  32.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 32.4k]
  |  |  ------------------
  ------------------
 6586|  32.4k|    }
 6587|   249k|    if (gainMapProperties) {
  ------------------
  |  Branch (6587:9): [True: 127, False: 249k]
  ------------------
 6588|    127|        AVIF_CHECKRES(avifDecoderCheckGainMapProperties(decoder, gainMapProperties));
  ------------------
  |  |   54|    127|    do {                                  \
  |  |   55|    127|        const avifResult result__ = (A);  \
  |  |   56|    127|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 127]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    127|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 127]
  |  |  ------------------
  ------------------
 6589|    127|    }
 6590|       |
 6591|   249k|    if (!data->cicpSet && (data->tiles.count > 0)) {
  ------------------
  |  Branch (6591:9): [True: 247k, False: 2.19k]
  |  Branch (6591:27): [True: 247k, False: 83]
  ------------------
 6592|   247k|        avifTile * firstTile = &data->tiles.tile[0];
 6593|   247k|        if (firstTile->input->samples.count > 0) {
  ------------------
  |  Branch (6593:13): [True: 247k, False: 0]
  ------------------
 6594|   247k|            avifDecodeSample * sample = &firstTile->input->samples.sample[0];
 6595|       |
 6596|       |            // Harvest CICP from the AV1's sequence header, which should be very close to the front
 6597|       |            // of the first sample. Read in successively larger chunks until we successfully parse the sequence.
 6598|   247k|            static const size_t searchSampleChunkIncrement = 64;
 6599|   247k|            static const size_t searchSampleSizeMax = 4096;
 6600|   247k|            size_t searchSampleSize = 0;
 6601|   621k|            do {
 6602|   621k|                searchSampleSize += searchSampleChunkIncrement;
 6603|   621k|                if (searchSampleSize > sample->size) {
  ------------------
  |  Branch (6603:21): [True: 33.5k, False: 587k]
  ------------------
 6604|  33.5k|                    searchSampleSize = sample->size;
 6605|  33.5k|                }
 6606|       |
 6607|   621k|                avifResult prepareResult = avifDecoderPrepareSample(decoder, sample, searchSampleSize);
 6608|   621k|                if (prepareResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6608:21): [True: 237k, False: 383k]
  ------------------
 6609|   237k|                    return prepareResult;
 6610|   237k|                }
 6611|       |
 6612|   383k|                avifSequenceHeader sequenceHeader;
 6613|   383k|                if (avifSequenceHeaderParse(&sequenceHeader, &sample->data, firstTile->codecType)) {
  ------------------
  |  Branch (6613:21): [True: 8.76k, False: 375k]
  ------------------
 6614|  8.76k|                    data->cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|  8.76k|#define AVIF_TRUE 1
  ------------------
 6615|  8.76k|                    decoder->image->colorPrimaries = sequenceHeader.colorPrimaries;
 6616|  8.76k|                    decoder->image->transferCharacteristics = sequenceHeader.transferCharacteristics;
 6617|  8.76k|                    decoder->image->matrixCoefficients = sequenceHeader.matrixCoefficients;
 6618|  8.76k|                    decoder->image->yuvRange = sequenceHeader.range;
 6619|  8.76k|                    break;
 6620|  8.76k|                }
 6621|   383k|            } while (searchSampleSize != sample->size && searchSampleSize < searchSampleSizeMax);
  ------------------
  |  Branch (6621:22): [True: 373k, False: 1.24k]
  |  Branch (6621:58): [True: 373k, False: 3]
  ------------------
 6622|   247k|        }
 6623|   247k|    }
 6624|       |
 6625|  12.2k|    AVIF_CHECKRES(avifReadCodecConfigProperty(decoder->image, colorProperties, colorCodecType));
  ------------------
  |  |   54|  12.2k|    do {                                  \
  |  |   55|  12.2k|        const avifResult result__ = (A);  \
  |  |   56|  12.2k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 9, False: 12.2k]
  |  |  ------------------
  |  |   57|      9|            avifBreakOnError();           \
  |  |   58|      9|            return result__;              \
  |  |   59|      9|        }                                 \
  |  |   60|  12.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 12.2k]
  |  |  ------------------
  ------------------
 6626|  12.2k|    if (decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (6626:9): [True: 100, False: 12.1k]
  ------------------
 6627|    100|        AVIF_ASSERT_OR_RETURN(decoder->data->meta->sampleTransformDepth != 0);
  ------------------
  |  |   64|    100|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    100|    do {                        \
  |  |  |  |   46|    100|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 100]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    100|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 100]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6628|    100|        decoder->image->depth = decoder->data->meta->sampleTransformDepth;
 6629|    100|    }
 6630|       |
 6631|       |    // Expose as raw bytes all other properties that libavif does not care about.
 6632|  63.0k|    for (size_t i = 0; i < colorProperties->count; ++i) {
  ------------------
  |  Branch (6632:24): [True: 50.7k, False: 12.2k]
  ------------------
 6633|  50.7k|        const avifProperty * property = &colorProperties->prop[i];
 6634|  50.7k|        if (property->isOpaque) {
  ------------------
  |  Branch (6634:13): [True: 9.07k, False: 41.6k]
  ------------------
 6635|  9.07k|            AVIF_CHECKRES(avifImagePushProperty(decoder->image,
  ------------------
  |  |   54|  9.07k|    do {                                  \
  |  |   55|  9.07k|        const avifResult result__ = (A);  \
  |  |   56|  9.07k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 9.07k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  9.07k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 9.07k]
  |  |  ------------------
  ------------------
 6636|  9.07k|                                                property->type,
 6637|  9.07k|                                                property->u.opaque.usertype,
 6638|  9.07k|                                                property->u.opaque.boxPayload.data,
 6639|  9.07k|                                                property->u.opaque.boxPayload.size));
 6640|  9.07k|        }
 6641|  50.7k|    }
 6642|       |
 6643|  12.2k|    if (gainMapProperties) {
  ------------------
  |  Branch (6643:9): [True: 127, False: 12.1k]
  ------------------
 6644|    630|        for (size_t i = 0; i < gainMapProperties->count; ++i) {
  ------------------
  |  Branch (6644:28): [True: 503, False: 127]
  ------------------
 6645|    503|            const avifProperty * property = &gainMapProperties->prop[i];
 6646|    503|            if (property->isOpaque) {
  ------------------
  |  Branch (6646:17): [True: 22, False: 481]
  ------------------
 6647|     22|                AVIF_CHECKRES(avifImagePushProperty(decoder->image->gainMap->image,
  ------------------
  |  |   54|     22|    do {                                  \
  |  |   55|     22|        const avifResult result__ = (A);  \
  |  |   56|     22|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 22]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     22|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 22]
  |  |  ------------------
  ------------------
 6648|     22|                                                    property->type,
 6649|     22|                                                    property->u.opaque.usertype,
 6650|     22|                                                    property->u.opaque.boxPayload.data,
 6651|     22|                                                    property->u.opaque.boxPayload.size));
 6652|     22|            }
 6653|    503|        }
 6654|    127|    }
 6655|  12.2k|    return AVIF_RESULT_OK;
 6656|  12.2k|}
avifDecoderNextImage:
 6973|   551k|{
 6974|   551k|    avifDiagnosticsClearError(&decoder->diag);
 6975|       |
 6976|   551k|    if (!decoder->data || decoder->data->tiles.count == 0) {
  ------------------
  |  Branch (6976:9): [True: 0, False: 551k]
  |  Branch (6976:27): [True: 170, False: 551k]
  ------------------
 6977|       |        // Nothing has been parsed yet
 6978|    170|        return AVIF_RESULT_NO_CONTENT;
 6979|    170|    }
 6980|       |
 6981|   551k|    if (!decoder->io || !decoder->io->read) {
  ------------------
  |  Branch (6981:9): [True: 0, False: 551k]
  |  Branch (6981:25): [True: 0, False: 551k]
  ------------------
 6982|      0|        return AVIF_RESULT_IO_NOT_SET;
 6983|      0|    }
 6984|       |
 6985|   551k|    if (avifDecoderDataFrameFullyDecoded(decoder->data)) {
  ------------------
  |  Branch (6985:9): [True: 0, False: 551k]
  ------------------
 6986|       |        // A frame was decoded during the last avifDecoderNextImage() call.
 6987|      0|        for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6987:25): [True: 0, False: 0]
  ------------------
 6988|      0|            decoder->data->tileInfos[c].decodedTileCount = 0;
 6989|      0|        }
 6990|      0|    }
 6991|       |
 6992|   551k|    AVIF_ASSERT_OR_RETURN(decoder->data->tiles.count == (decoder->data->tileInfos[AVIF_ITEM_CATEGORY_COUNT - 1].firstTileIndex +
  ------------------
  |  |   64|   551k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   551k|    do {                        \
  |  |  |  |   46|   551k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 551k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   551k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 551k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6993|   551k|                                                         decoder->data->tileInfos[AVIF_ITEM_CATEGORY_COUNT - 1].tileCount));
 6994|       |
 6995|   551k|    const uint32_t nextImageIndex = (uint32_t)(decoder->imageIndex + 1);
 6996|       |
 6997|       |    // Ensure that we have created the codecs before proceeding with the decoding.
 6998|   551k|    if (!decoder->data->tiles.tile[0].codec) {
  ------------------
  |  Branch (6998:9): [True: 12.1k, False: 539k]
  ------------------
 6999|  12.1k|        AVIF_CHECKRES(avifDecoderCreateCodecs(decoder));
  ------------------
  |  |   54|  12.1k|    do {                                  \
  |  |   55|  12.1k|        const avifResult result__ = (A);  \
  |  |   56|  12.1k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 12.1k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  12.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 12.1k]
  |  |  ------------------
  ------------------
 7000|  12.1k|    }
 7001|       |
 7002|       |    // Acquire all sample data for the current image first, allowing for any read call to bail out
 7003|       |    // with AVIF_RESULT_WAITING_ON_IO harmlessly / idempotently, unless decoder->allowIncremental.
 7004|   551k|    avifResult prepareTileResult[AVIF_ITEM_CATEGORY_COUNT];
 7005|  4.96M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7005:21): [True: 4.41M, False: 551k]
  ------------------
 7006|  4.41M|        prepareTileResult[c] = avifDecoderPrepareTiles(decoder, nextImageIndex, &decoder->data->tileInfos[c]);
 7007|  4.41M|        if (!decoder->allowIncremental || (prepareTileResult[c] != AVIF_RESULT_WAITING_ON_IO)) {
  ------------------
  |  Branch (7007:13): [True: 74.9k, False: 4.33M]
  |  Branch (7007:43): [True: 3.76M, False: 574k]
  ------------------
 7008|  3.83M|            AVIF_CHECKRES(prepareTileResult[c]);
  ------------------
  |  |   54|  3.83M|    do {                                  \
  |  |   55|  3.83M|        const avifResult result__ = (A);  \
  |  |   56|  3.83M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 102, False: 3.83M]
  |  |  ------------------
  |  |   57|    102|            avifBreakOnError();           \
  |  |   58|    102|            return result__;              \
  |  |   59|    102|        }                                 \
  |  |   60|  3.83M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.83M]
  |  |  ------------------
  ------------------
 7009|  3.83M|        }
 7010|  4.41M|    }
 7011|       |
 7012|       |    // Decode all available color tiles now, then all available alpha tiles, then all available bit
 7013|       |    // depth extension tiles. The order of appearance of the tiles in the bitstream is left to the
 7014|       |    // encoder's choice, and decoding as many as possible of each category in parallel is beneficial
 7015|       |    // for incremental decoding, as pixel rows need all channels to be decoded before being
 7016|       |    // accessible to the user.
 7017|  4.91M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7017:21): [True: 4.37M, False: 545k]
  ------------------
 7018|  4.37M|        AVIF_CHECKRES(avifDecoderDecodeTiles(decoder, nextImageIndex, &decoder->data->tileInfos[c]));
  ------------------
  |  |   54|  4.37M|    do {                                  \
  |  |   55|  4.37M|        const avifResult result__ = (A);  \
  |  |   56|  4.37M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 5.73k, False: 4.36M]
  |  |  ------------------
  |  |   57|  5.73k|            avifBreakOnError();           \
  |  |   58|  5.73k|            return result__;              \
  |  |   59|  5.73k|        }                                 \
  |  |   60|  4.37M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 4.36M]
  |  |  ------------------
  ------------------
 7019|  4.37M|    }
 7020|       |
 7021|   545k|    if (!avifDecoderDataFrameFullyDecoded(decoder->data)) {
  ------------------
  |  Branch (7021:9): [True: 539k, False: 6.28k]
  ------------------
 7022|   539k|        AVIF_ASSERT_OR_RETURN(decoder->allowIncremental);
  ------------------
  |  |   64|   539k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   539k|    do {                        \
  |  |  |  |   46|   539k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 539k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   539k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 539k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7023|       |        // The image is not completely decoded. There should be no error unrelated to missing bytes,
 7024|       |        // and at least some missing bytes.
 7025|   539k|        avifResult firstNonOkResult = AVIF_RESULT_OK;
 7026|  4.85M|        for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7026:25): [True: 4.31M, False: 539k]
  ------------------
 7027|  4.31M|            AVIF_ASSERT_OR_RETURN(prepareTileResult[c] == AVIF_RESULT_OK || prepareTileResult[c] == AVIF_RESULT_WAITING_ON_IO);
  ------------------
  |  |   64|  4.31M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  4.31M|    do {                        \
  |  |  |  |   46|  4.89M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 3.74M, False: 574k]
  |  |  |  |  |  Branch (46:15): [True: 574k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  4.31M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 4.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7028|  4.31M|            if (firstNonOkResult == AVIF_RESULT_OK) {
  ------------------
  |  Branch (7028:17): [True: 540k, False: 3.77M]
  ------------------
 7029|   540k|                firstNonOkResult = prepareTileResult[c];
 7030|   540k|            }
 7031|  4.31M|        }
 7032|   539k|        AVIF_ASSERT_OR_RETURN(firstNonOkResult != AVIF_RESULT_OK);
  ------------------
  |  |   64|   539k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   539k|    do {                        \
  |  |  |  |   46|   539k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 539k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   539k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 539k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7033|       |        // Return the "not enough bytes" status now instead of moving on to the next frame.
 7034|   539k|        return AVIF_RESULT_WAITING_ON_IO;
 7035|   539k|    }
 7036|  56.5k|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7036:21): [True: 50.2k, False: 6.28k]
  ------------------
 7037|  50.2k|        AVIF_ASSERT_OR_RETURN(prepareTileResult[c] == AVIF_RESULT_OK);
  ------------------
  |  |   64|  50.2k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  50.2k|    do {                        \
  |  |  |  |   46|  50.2k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 50.2k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  50.2k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 50.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7038|  50.2k|    }
 7039|       |
 7040|       |    // If decoder->data->tileInfos[AVIF_ITEM_COLOR].tileCount == 0, it means
 7041|       |    // decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA was equal to 0.
 7042|       |    // Only apply Sample Transforms if there is a color item to apply it onto.
 7043|  6.28k|    if (decoder->data->tileInfos[AVIF_ITEM_COLOR].tileCount != 0 && decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (7043:9): [True: 6.24k, False: 32]
  |  Branch (7043:69): [True: 82, False: 6.16k]
  ------------------
 7044|     82|        AVIF_CHECKRES(avifDecoderApplySampleTransform(decoder, decoder->image));
  ------------------
  |  |   54|     82|    do {                                  \
  |  |   55|     82|        const avifResult result__ = (A);  \
  |  |   56|     82|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 81]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|     82|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 81]
  |  |  ------------------
  ------------------
 7045|     82|    }
 7046|       |
 7047|       |    // Only advance decoder->imageIndex once the image is completely decoded, so that
 7048|       |    // avifDecoderNthImage(decoder, decoder->imageIndex + 1) is equivalent to avifDecoderNextImage(decoder)
 7049|       |    // if the previous call to avifDecoderNextImage() returned AVIF_RESULT_WAITING_ON_IO.
 7050|  6.28k|    decoder->imageIndex = (int)nextImageIndex;
 7051|       |    // The decoded tile counts will be reset to 0 the next time avifDecoderNextImage() is called,
 7052|       |    // for avifDecoderDecodedRowCount() to work until then.
 7053|  6.28k|    if (decoder->data->sourceSampleTable) {
  ------------------
  |  Branch (7053:9): [True: 981, False: 5.29k]
  ------------------
 7054|       |        // Decoding from a track! Provide timing information.
 7055|       |
 7056|    981|        avifResult timingResult = avifDecoderNthImageTiming(decoder, decoder->imageIndex, &decoder->imageTiming);
 7057|    981|        if (timingResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7057:13): [True: 0, False: 981]
  ------------------
 7058|      0|            return timingResult;
 7059|      0|        }
 7060|    981|    }
 7061|  6.28k|    return AVIF_RESULT_OK;
 7062|  6.28k|}
avifDecoderNthImageTiming:
 7065|    981|{
 7066|    981|    if (!decoder->data) {
  ------------------
  |  Branch (7066:9): [True: 0, False: 981]
  ------------------
 7067|       |        // Nothing has been parsed yet
 7068|      0|        return AVIF_RESULT_NO_CONTENT;
 7069|      0|    }
 7070|       |
 7071|    981|    if ((frameIndex > INT_MAX) || ((int)frameIndex >= decoder->imageCount)) {
  ------------------
  |  Branch (7071:9): [True: 0, False: 981]
  |  Branch (7071:35): [True: 0, False: 981]
  ------------------
 7072|       |        // Impossible index
 7073|      0|        return AVIF_RESULT_NO_IMAGES_REMAINING;
 7074|      0|    }
 7075|       |
 7076|    981|    if (!decoder->data->sourceSampleTable) {
  ------------------
  |  Branch (7076:9): [True: 0, False: 981]
  ------------------
 7077|       |        // There isn't any real timing associated with this decode, so
 7078|       |        // just hand back the defaults chosen in avifDecoderReset().
 7079|      0|        *outTiming = decoder->imageTiming;
 7080|      0|        return AVIF_RESULT_OK;
 7081|      0|    }
 7082|       |
 7083|    981|    outTiming->timescale = decoder->timescale;
 7084|    981|    outTiming->ptsInTimescales = 0;
 7085|    981|    for (uint32_t imageIndex = 0; imageIndex < frameIndex; ++imageIndex) {
  ------------------
  |  Branch (7085:35): [True: 0, False: 981]
  ------------------
 7086|      0|        outTiming->ptsInTimescales += avifSampleTableGetImageDelta(decoder->data->sourceSampleTable, imageIndex);
 7087|      0|    }
 7088|    981|    outTiming->durationInTimescales = avifSampleTableGetImageDelta(decoder->data->sourceSampleTable, frameIndex);
 7089|       |
 7090|    981|    if (outTiming->timescale > 0) {
  ------------------
  |  Branch (7090:9): [True: 204, False: 777]
  ------------------
 7091|    204|        outTiming->pts = (double)outTiming->ptsInTimescales / (double)outTiming->timescale;
 7092|    204|        outTiming->duration = (double)outTiming->durationInTimescales / (double)outTiming->timescale;
 7093|    777|    } else {
 7094|    777|        outTiming->pts = 0.0;
 7095|    777|        outTiming->duration = 0.0;
 7096|    777|    }
 7097|    981|    return AVIF_RESULT_OK;
 7098|    981|}
avifDecoderNthImage:
 7101|   274k|{
 7102|   274k|    avifDiagnosticsClearError(&decoder->diag);
 7103|       |
 7104|   274k|    if (!decoder->data) {
  ------------------
  |  Branch (7104:9): [True: 0, False: 274k]
  ------------------
 7105|       |        // Nothing has been parsed yet
 7106|      0|        return AVIF_RESULT_NO_CONTENT;
 7107|      0|    }
 7108|       |
 7109|   274k|    if ((frameIndex > INT_MAX) || ((int)frameIndex >= decoder->imageCount)) {
  ------------------
  |  Branch (7109:9): [True: 0, False: 274k]
  |  Branch (7109:35): [True: 0, False: 274k]
  ------------------
 7110|       |        // Impossible index
 7111|      0|        return AVIF_RESULT_NO_IMAGES_REMAINING;
 7112|      0|    }
 7113|       |
 7114|   274k|    int requestedIndex = (int)frameIndex;
 7115|   274k|    if (requestedIndex == (decoder->imageIndex + 1)) {
  ------------------
  |  Branch (7115:9): [True: 274k, False: 0]
  ------------------
 7116|       |        // It's just the next image (already partially decoded or not at all), nothing special here
 7117|   274k|        return avifDecoderNextImage(decoder);
 7118|   274k|    }
 7119|       |
 7120|      0|    if (requestedIndex == decoder->imageIndex) {
  ------------------
  |  Branch (7120:9): [True: 0, False: 0]
  ------------------
 7121|      0|        if (avifDecoderDataFrameFullyDecoded(decoder->data)) {
  ------------------
  |  Branch (7121:13): [True: 0, False: 0]
  ------------------
 7122|       |            // The current fully decoded image (decoder->imageIndex) is requested, nothing to do
 7123|      0|            return AVIF_RESULT_OK;
 7124|      0|        }
 7125|       |        // The next image (decoder->imageIndex + 1) is partially decoded but
 7126|       |        // the previous image (decoder->imageIndex) is requested.
 7127|       |        // Fall through to resetting the decoder data and start decoding from
 7128|       |        // the nearest key frame.
 7129|      0|    }
 7130|       |
 7131|      0|    int nearestKeyFrame = (int)avifDecoderNearestKeyframe(decoder, frameIndex);
 7132|      0|    if ((nearestKeyFrame > (decoder->imageIndex + 1)) || (requestedIndex <= decoder->imageIndex)) {
  ------------------
  |  Branch (7132:9): [True: 0, False: 0]
  |  Branch (7132:58): [True: 0, False: 0]
  ------------------
 7133|       |        // If we get here, we need to start decoding from the nearest key frame.
 7134|       |        // So discard the unused decoder state and its previous frames. This
 7135|       |        // will force the setup of new AV1 decoder (avifCodec) instances in
 7136|       |        // avifDecoderNextImage().
 7137|      0|        decoder->imageIndex = nearestKeyFrame - 1; // prepare to read nearest keyframe
 7138|      0|        avifDecoderDataResetCodec(decoder->data);
 7139|      0|    }
 7140|      0|    for (;;) {
 7141|      0|        avifResult result = avifDecoderNextImage(decoder);
 7142|      0|        if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7142:13): [True: 0, False: 0]
  ------------------
 7143|      0|            return result;
 7144|      0|        }
 7145|       |
 7146|      0|        if (requestedIndex == decoder->imageIndex) {
  ------------------
  |  Branch (7146:13): [True: 0, False: 0]
  ------------------
 7147|      0|            break;
 7148|      0|        }
 7149|      0|    }
 7150|      0|    return AVIF_RESULT_OK;
 7151|      0|}
avifDecoderDecodedRowCount:
 7214|   542k|{
 7215|   542k|    if (decoder->data->tileInfos[AVIF_ITEM_COLOR].tileCount == 0) {
  ------------------
  |  Branch (7215:9): [True: 12, False: 542k]
  ------------------
 7216|       |        // decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA
 7217|       |        // was likely 0 when avifDecoderNextImage() was called.
 7218|       |        // avifDecoderDecodedRowCount() only describes decoder->image->yuvPlanes[0].
 7219|       |        // There is no available luma plane, so return 0 decoded rows.
 7220|     12|        return 0;
 7221|     12|    }
 7222|       |
 7223|   542k|    uint32_t minRowCount = decoder->image->height;
 7224|  4.88M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7224:21): [True: 4.33M, False: 542k]
  ------------------
 7225|  4.33M|        if (c == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (7225:13): [True: 542k, False: 3.79M]
  ------------------
 7226|   542k|            const avifImage * const gainMap = decoder->image->gainMap ? decoder->image->gainMap->image : NULL;
  ------------------
  |  Branch (7226:47): [True: 20, False: 542k]
  ------------------
 7227|   542k|            if (gainMap != NULL && gainMap->height != 0 && decoder->data->tileInfos[AVIF_ITEM_GAIN_MAP].tileCount != 0) {
  ------------------
  |  Branch (7227:17): [True: 9, False: 542k]
  |  Branch (7227:36): [True: 9, False: 0]
  |  Branch (7227:60): [True: 9, False: 0]
  ------------------
 7228|      9|                uint32_t gainMapRowCount = avifGetDecodedRowCount(decoder, &decoder->data->tileInfos[AVIF_ITEM_GAIN_MAP], gainMap);
 7229|      9|                if (gainMap->height != decoder->image->height) {
  ------------------
  |  Branch (7229:21): [True: 8, False: 1]
  ------------------
 7230|      8|                    const uint32_t scaledGainMapRowCount =
 7231|      8|                        (uint32_t)floorf((float)gainMapRowCount / gainMap->height * decoder->image->height);
 7232|       |                    // Make sure it matches the formula described in the comment of avifDecoderDecodedRowCount() in avif.h.
 7233|      8|                    AVIF_CHECKERR((uint32_t)lround((double)scaledGainMapRowCount / decoder->image->height *
  ------------------
  |  |   45|      8|    do {                        \
  |  |   46|      8|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 8]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 8]
  |  |  ------------------
  ------------------
 7234|      8|                                                   decoder->image->gainMap->image->height) <= gainMapRowCount,
 7235|      8|                                  0);
 7236|      8|                    gainMapRowCount = scaledGainMapRowCount;
 7237|      8|                }
 7238|      9|                minRowCount = AVIF_MIN(minRowCount, gainMapRowCount);
  ------------------
  |  |   19|      9|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 7239|      9|            }
 7240|   542k|            continue;
 7241|   542k|        }
 7242|  3.79M|        const uint32_t rowCount = avifGetDecodedRowCount(decoder, &decoder->data->tileInfos[c], decoder->image);
 7243|  3.79M|        minRowCount = AVIF_MIN(minRowCount, rowCount);
  ------------------
  |  |   19|  3.79M|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 3.20M, False: 593k]
  |  |  ------------------
  ------------------
 7244|  3.79M|    }
 7245|   542k|    return minRowCount;
 7246|   542k|}
avifDecoderRead:
 7249|  12.8k|{
 7250|  12.8k|    avifResult result = avifDecoderParse(decoder);
 7251|  12.8k|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7251:9): [True: 3.21k, False: 9.62k]
  ------------------
 7252|  3.21k|        return result;
 7253|  3.21k|    }
 7254|  9.62k|    result = avifDecoderNextImage(decoder);
 7255|  9.62k|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7255:9): [True: 5.99k, False: 3.63k]
  ------------------
 7256|  5.99k|        return result;
 7257|  5.99k|    }
 7258|       |    // If decoder->image->imageOwnsYUVPlanes is true and decoder->image is not used after this call,
 7259|       |    // the ownership of the planes in decoder->image could be transferred here instead of copied.
 7260|       |    // However most codec_*.c implementations allocate the output buffer themselves and return a
 7261|       |    // view, unless some postprocessing is applied (container-level grid reconstruction for
 7262|       |    // example), so the first condition rarely holds.
 7263|       |    // The second condition does not hold either: it is not required by the documentation in avif.h.
 7264|  3.63k|    return avifImageCopy(image, decoder->image, AVIF_PLANES_ALL);
 7265|  9.62k|}
read.c:avifParseFileTypeBox:
 4780|  1.59M|{
 4781|  1.59M|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ftyp]");
  ------------------
  |  |  738|  1.59M|    avifROStream VARNAME;                               \
  |  |  739|  1.59M|    avifROData VARNAME##_roData;                        \
  |  |  740|  1.59M|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  1.59M|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  1.59M|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4782|       |
 4783|  1.59M|    AVIF_CHECK(avifROStreamRead(&s, ftyp->majorBrand, 4));
  ------------------
  |  |   36|  1.59M|    do {                        \
  |  |   37|  1.59M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 9, False: 1.59M]
  |  |  ------------------
  |  |   38|      9|            avifBreakOnError(); \
  |  |   39|      9|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      9|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      9|        }                       \
  |  |   41|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
 4784|  1.59M|    AVIF_CHECK(avifROStreamRead(&s, ftyp->minorVersion, 4));
  ------------------
  |  |   36|  1.59M|    do {                        \
  |  |   37|  1.59M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 1.59M]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
 4785|       |
 4786|  1.59M|    size_t compatibleBrandsBytes = avifROStreamRemainingBytes(&s);
 4787|  1.59M|    if ((compatibleBrandsBytes % 4) != 0) {
  ------------------
  |  Branch (4787:9): [True: 13, False: 1.59M]
  ------------------
 4788|     13|        avifDiagnosticsPrintf(diag, "Box[ftyp] contains a compatible brands section that isn't divisible by 4 [%zu]", compatibleBrandsBytes);
 4789|     13|        return AVIF_FALSE;
  ------------------
  |  |   89|     13|#define AVIF_FALSE 0
  ------------------
 4790|     13|    }
 4791|  1.59M|    ftyp->compatibleBrands = avifROStreamCurrent(&s);
 4792|  1.59M|    AVIF_CHECK(avifROStreamSkip(&s, compatibleBrandsBytes));
  ------------------
  |  |   36|  1.59M|    do {                        \
  |  |   37|  1.59M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 1.59M]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
 4793|  1.59M|    ftyp->compatibleBrandsCount = (int)compatibleBrandsBytes / 4;
 4794|       |
 4795|  1.59M|    return AVIF_TRUE;
  ------------------
  |  |   88|  1.59M|#define AVIF_TRUE 1
  ------------------
 4796|  1.59M|}
read.c:avifFileTypeIsCompatible:
 5030|  1.59M|{
 5031|  1.59M|    return avifFileTypeHasBrand(ftyp, "avif") || avifFileTypeHasBrand(ftyp, "avis")
  ------------------
  |  Branch (5031:12): [True: 1.31M, False: 280k]
  |  Branch (5031:50): [True: 280k, False: 11]
  ------------------
 5032|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5033|       |           || avifFileTypeHasBrand(ftyp, "mif3")
 5034|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 5035|  1.59M|        ;
 5036|  1.59M|}
read.c:avifFileTypeHasBrand:
 5015|  6.65M|{
 5016|  6.65M|    if (!memcmp(ftyp->majorBrand, brand, 4)) {
  ------------------
  |  Branch (5016:9): [True: 2.09M, False: 4.56M]
  ------------------
 5017|  2.09M|        return AVIF_TRUE;
  ------------------
  |  |   88|  2.09M|#define AVIF_TRUE 1
  ------------------
 5018|  2.09M|    }
 5019|       |
 5020|  20.8M|    for (int compatibleBrandIndex = 0; compatibleBrandIndex < ftyp->compatibleBrandsCount; ++compatibleBrandIndex) {
  ------------------
  |  Branch (5020:40): [True: 17.7M, False: 3.06M]
  ------------------
 5021|  17.7M|        const uint8_t * compatibleBrand = &ftyp->compatibleBrands[4 * compatibleBrandIndex];
 5022|  17.7M|        if (!memcmp(compatibleBrand, brand, 4)) {
  ------------------
  |  Branch (5022:13): [True: 1.49M, False: 16.2M]
  ------------------
 5023|  1.49M|            return AVIF_TRUE;
  ------------------
  |  |   88|  1.49M|#define AVIF_TRUE 1
  ------------------
 5024|  1.49M|        }
 5025|  17.7M|    }
 5026|  3.06M|    return AVIF_FALSE;
  ------------------
  |  |   89|  3.06M|#define AVIF_FALSE 0
  ------------------
 5027|  4.56M|}
read.c:avifDecoderCleanup:
 5091|  1.70M|{
 5092|  1.70M|    if (decoder->data) {
  ------------------
  |  Branch (5092:9): [True: 1.69M, False: 12.8k]
  ------------------
 5093|  1.69M|        avifDecoderDataDestroy(decoder->data);
 5094|  1.69M|        decoder->data = NULL;
 5095|  1.69M|    }
 5096|       |
 5097|  1.70M|    if (decoder->image) {
  ------------------
  |  Branch (5097:9): [True: 290k, False: 1.41M]
  ------------------
 5098|   290k|        avifImageDestroy(decoder->image);
 5099|       |        decoder->image = NULL;
 5100|   290k|    }
 5101|  1.70M|    avifDiagnosticsClearError(&decoder->diag);
 5102|  1.70M|}
read.c:avifDecoderDataDestroy:
 1120|  1.69M|{
 1121|  1.69M|    if (data->meta) {
  ------------------
  |  Branch (1121:9): [True: 1.69M, False: 0]
  ------------------
 1122|  1.69M|        avifMetaDestroy(data->meta);
 1123|  1.69M|    }
 1124|  1.73M|    for (uint32_t i = 0; i < data->tracks.count; ++i) {
  ------------------
  |  Branch (1124:26): [True: 43.3k, False: 1.69M]
  ------------------
 1125|  43.3k|        avifTrack * track = &data->tracks.track[i];
 1126|  43.3k|        if (track->sampleTable) {
  ------------------
  |  Branch (1126:13): [True: 39.5k, False: 3.78k]
  ------------------
 1127|  39.5k|            avifSampleTableDestroy(track->sampleTable);
 1128|  39.5k|        }
 1129|  43.3k|        if (track->meta) {
  ------------------
  |  Branch (1129:13): [True: 43.3k, False: 0]
  ------------------
 1130|  43.3k|            avifMetaDestroy(track->meta);
 1131|  43.3k|        }
 1132|  43.3k|    }
 1133|  1.69M|    avifArrayDestroy(&data->tracks);
 1134|  1.69M|    avifDecoderDataClearTiles(data);
 1135|  1.69M|    avifArrayDestroy(&data->tiles);
 1136|  1.69M|    avifArrayDestroy(&data->compatibleBrands);
 1137|  1.69M|    avifFree(data);
 1138|  1.69M|}
read.c:avifMetaDestroy:
  868|  1.73M|{
  869|  3.10M|    for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (869:26): [True: 1.37M, False: 1.73M]
  ------------------
  870|  1.37M|        avifDecoderItem * item = meta->items.item[i];
  871|  1.37M|        avifPropertyArrayDestroy(&item->properties);
  872|  1.37M|        avifArrayDestroy(&item->extents);
  873|  1.37M|        if (item->ownsMergedExtents) {
  ------------------
  |  Branch (873:13): [True: 177k, False: 1.19M]
  ------------------
  874|   177k|            avifRWDataFree(&item->mergedExtents);
  875|   177k|        }
  876|  1.37M|        avifFree(item);
  877|  1.37M|    }
  878|  1.73M|    avifArrayDestroy(&meta->items);
  879|  1.73M|    avifPropertyArrayDestroy(&meta->properties);
  880|  1.73M|    avifRWDataFree(&meta->idat);
  881|  1.73M|    avifArrayDestroy(&meta->sampleTransformExpression);
  882|  1.78M|    for (uint32_t i = 0; i < meta->entityToGroups.count; ++i) {
  ------------------
  |  Branch (882:26): [True: 52.9k, False: 1.73M]
  ------------------
  883|  52.9k|        avifArrayDestroy(&meta->entityToGroups.groups[i].entityIDs);
  884|  52.9k|    }
  885|  1.73M|    avifArrayDestroy(&meta->entityToGroups);
  886|  1.73M|    avifFree(meta);
  887|  1.73M|}
read.c:avifPropertyArrayDestroy:
  332|  3.14M|{
  333|  10.1M|    for (size_t i = 0; i < array->count; ++i) {
  ------------------
  |  Branch (333:24): [True: 6.98M, False: 3.14M]
  ------------------
  334|  6.98M|        if (array->prop[i].isOpaque) {
  ------------------
  |  Branch (334:13): [True: 1.38M, False: 5.59M]
  ------------------
  335|  1.38M|            avifRWDataFree(&array->prop[i].u.opaque.boxPayload);
  336|  1.38M|        }
  337|  6.98M|    }
  338|  3.14M|    avifArrayDestroy(array);
  339|  3.14M|}
read.c:avifSampleTableDestroy:
  342|  39.5k|{
  343|  39.5k|    avifArrayDestroy(&sampleTable->chunks);
  344|  75.1k|    for (uint32_t i = 0; i < sampleTable->sampleDescriptions.count; ++i) {
  ------------------
  |  Branch (344:26): [True: 35.5k, False: 39.5k]
  ------------------
  345|  35.5k|        avifSampleDescription * description = &sampleTable->sampleDescriptions.description[i];
  346|  35.5k|        avifPropertyArrayDestroy(&description->properties);
  347|  35.5k|    }
  348|  39.5k|    avifArrayDestroy(&sampleTable->sampleDescriptions);
  349|  39.5k|    avifArrayDestroy(&sampleTable->sampleToChunks);
  350|  39.5k|    avifArrayDestroy(&sampleTable->sampleSizes);
  351|  39.5k|    avifArrayDestroy(&sampleTable->timeToSamples);
  352|  39.5k|    avifArrayDestroy(&sampleTable->syncSamples);
  353|  39.5k|    avifFree(sampleTable);
  354|  39.5k|}
read.c:avifMetaFindOrCreateItem:
  907|  4.37M|{
  908|  4.37M|    *item = NULL;
  909|  4.37M|    AVIF_ASSERT_OR_RETURN(itemID != 0);
  ------------------
  |  |   64|  4.37M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  4.37M|    do {                        \
  |  |  |  |   46|  4.37M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 4.37M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  4.37M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 4.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  910|       |
  911|  9.60M|    for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (911:26): [True: 8.23M, False: 1.37M]
  ------------------
  912|  8.23M|        if (meta->items.item[i]->id == itemID) {
  ------------------
  |  Branch (912:13): [True: 3.00M, False: 5.22M]
  ------------------
  913|  3.00M|            *item = meta->items.item[i];
  914|  3.00M|            return AVIF_RESULT_OK;
  915|  3.00M|        }
  916|  8.23M|    }
  917|       |
  918|  1.37M|    avifDecoderItem ** itemPtr = (avifDecoderItem **)avifArrayPush(&meta->items);
  919|  1.37M|    AVIF_CHECKERR(itemPtr != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  1.37M|    do {                        \
  |  |   46|  1.37M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.37M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.37M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.37M]
  |  |  ------------------
  ------------------
  920|  1.37M|    *item = (avifDecoderItem *)avifAlloc(sizeof(avifDecoderItem));
  921|  1.37M|    if (*item == NULL) {
  ------------------
  |  Branch (921:9): [True: 0, False: 1.37M]
  ------------------
  922|      0|        avifArrayPop(&meta->items);
  923|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
  924|      0|    }
  925|  1.37M|    memset(*item, 0, sizeof(avifDecoderItem));
  926|       |
  927|  1.37M|    *itemPtr = *item;
  928|  1.37M|    if (!avifArrayCreate(&(*item)->properties, sizeof(avifProperty), 16)) {
  ------------------
  |  Branch (928:9): [True: 0, False: 1.37M]
  ------------------
  929|      0|        avifFree(*item);
  930|      0|        *item = NULL;
  931|      0|        avifArrayPop(&meta->items);
  932|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
  933|      0|    }
  934|  1.37M|    if (!avifArrayCreate(&(*item)->extents, sizeof(avifExtent), 1)) {
  ------------------
  |  Branch (934:9): [True: 0, False: 1.37M]
  ------------------
  935|      0|        avifPropertyArrayDestroy(&(*item)->properties);
  936|      0|        avifFree(*item);
  937|      0|        *item = NULL;
  938|      0|        avifArrayPop(&meta->items);
  939|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
  940|      0|    }
  941|  1.37M|    (*item)->id = itemID;
  942|  1.37M|    (*item)->meta = meta;
  943|  1.37M|    return AVIF_RESULT_OK;
  944|  1.37M|}
read.c:avifDecoderDataCreate:
  996|  1.69M|{
  997|  1.69M|    avifDecoderData * data = (avifDecoderData *)avifAlloc(sizeof(avifDecoderData));
  998|  1.69M|    if (data == NULL) {
  ------------------
  |  Branch (998:9): [True: 0, False: 1.69M]
  ------------------
  999|      0|        return NULL;
 1000|      0|    }
 1001|  1.69M|    memset(data, 0, sizeof(avifDecoderData));
 1002|  1.69M|    data->meta = avifMetaCreate();
 1003|  1.69M|    if (data->meta == NULL || !avifArrayCreate(&data->tracks, sizeof(avifTrack), 2) ||
  ------------------
  |  Branch (1003:9): [True: 0, False: 1.69M]
  |  Branch (1003:31): [True: 0, False: 1.69M]
  ------------------
 1004|  1.69M|        !avifArrayCreate(&data->tiles, sizeof(avifTile), 8)) {
  ------------------
  |  Branch (1004:9): [True: 0, False: 1.69M]
  ------------------
 1005|      0|        avifDecoderDataDestroy(data);
 1006|      0|        return NULL;
 1007|      0|    }
 1008|  1.69M|    return data;
 1009|  1.69M|}
read.c:avifMetaCreate:
  853|  1.73M|{
  854|  1.73M|    avifMeta * meta = (avifMeta *)avifAlloc(sizeof(avifMeta));
  855|  1.73M|    if (meta == NULL) {
  ------------------
  |  Branch (855:9): [True: 0, False: 1.73M]
  ------------------
  856|      0|        return NULL;
  857|      0|    }
  858|  1.73M|    memset(meta, 0, sizeof(avifMeta));
  859|  1.73M|    if (!avifArrayCreate(&meta->items, sizeof(avifDecoderItem *), 8) || !avifArrayCreate(&meta->properties, sizeof(avifProperty), 16) ||
  ------------------
  |  Branch (859:9): [True: 0, False: 1.73M]
  |  Branch (859:73): [True: 0, False: 1.73M]
  ------------------
  860|  1.73M|        !avifArrayCreate(&meta->entityToGroups, sizeof(avifEntityToGroup), 1)) {
  ------------------
  |  Branch (860:9): [True: 0, False: 1.73M]
  ------------------
  861|      0|        avifMetaDestroy(meta);
  862|      0|        return NULL;
  863|      0|    }
  864|  1.73M|    return meta;
  865|  1.73M|}
read.c:avifParse:
 4802|  1.69M|{
 4803|       |    // Note: this top-level function is the only avifParse*() function that returns avifResult instead of avifBool.
 4804|       |    // Be sure to use AVIF_CHECKERR() in this function with an explicit error result instead of simply using AVIF_CHECK().
 4805|       |
 4806|  1.69M|    avifResult readResult;
 4807|  1.69M|    uint64_t parseOffset = 0;
 4808|  1.69M|    avifDecoderData * data = decoder->data;
 4809|  1.69M|    avifBool ftypSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4810|  1.69M|    avifBool metaSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4811|  1.69M|    avifBool metaIsSizeZero = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4812|  1.69M|    avifBool moovSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4813|  1.69M|    avifBool needsMeta = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4814|  1.69M|    avifBool needsMoov = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4815|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4816|       |    avifBool miniSeen = AVIF_FALSE;
 4817|       |    avifBool needsMini = AVIF_FALSE;
 4818|       |#endif
 4819|  1.69M|    avifBool needsTmap = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4820|  1.69M|    avifBool tmapSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.69M|#define AVIF_FALSE 0
  ------------------
 4821|  1.69M|    avifFileType ftyp = { 0 };
 4822|       |
 4823|  3.77M|    for (;;) {
 4824|       |        // Read just enough to get the next box header (a max of 32 bytes)
 4825|  3.77M|        avifROData headerContents;
 4826|  3.77M|        if ((decoder->io->sizeHint > 0) && (parseOffset > decoder->io->sizeHint)) {
  ------------------
  |  Branch (4826:13): [True: 1.64M, False: 2.13M]
  |  Branch (4826:44): [True: 204, False: 1.63M]
  ------------------
 4827|    204|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 4828|    204|        }
 4829|  3.77M|        readResult = decoder->io->read(decoder->io, 0, parseOffset, 32, &headerContents);
 4830|  3.77M|        if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (4830:13): [True: 223k, False: 3.55M]
  ------------------
 4831|   223k|            return readResult;
 4832|   223k|        }
 4833|  3.55M|        if (!headerContents.size) {
  ------------------
  |  Branch (4833:13): [True: 82, False: 3.55M]
  ------------------
 4834|       |            // If we got AVIF_RESULT_OK from the reader but received 0 bytes,
 4835|       |            // we've reached the end of the file with no errors. Hooray!
 4836|     82|            break;
 4837|     82|        }
 4838|       |
 4839|       |        // Parse the header, and find out how many bytes it actually was
 4840|  3.55M|        BEGIN_STREAM(headerStream, headerContents.data, headerContents.size, &decoder->diag, "File-level box header");
  ------------------
  |  |  738|  3.55M|    avifROStream VARNAME;                               \
  |  |  739|  3.55M|    avifROData VARNAME##_roData;                        \
  |  |  740|  3.55M|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  3.55M|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  3.55M|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4841|  3.55M|        avifBoxHeader header;
 4842|  3.55M|        AVIF_CHECKERR(avifROStreamReadBoxHeaderPartial(&headerStream, &header, /*topLevel=*/AVIF_TRUE), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.55M|    do {                        \
  |  |   46|  3.55M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 39, False: 3.55M]
  |  |  ------------------
  |  |   47|     39|            avifBreakOnError(); \
  |  |   48|     39|            return ERR;         \
  |  |   49|     39|        }                       \
  |  |   50|  3.55M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.55M]
  |  |  ------------------
  ------------------
 4843|  3.55M|        parseOffset += avifROStreamOffset(&headerStream);
 4844|  3.55M|        AVIF_ASSERT_OR_RETURN(decoder->io->sizeHint == 0 || parseOffset <= decoder->io->sizeHint);
  ------------------
  |  |   64|  3.55M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  3.55M|    do {                        \
  |  |  |  |   46|  5.09M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 2.00M, False: 1.54M]
  |  |  |  |  |  Branch (46:15): [True: 1.54M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  3.55M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 3.55M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4845|       |
 4846|       |        // Try to get the remainder of the box, if necessary
 4847|  3.55M|        uint64_t boxOffset = 0;
 4848|  3.55M|        avifROData boxContents = AVIF_DATA_EMPTY;
  ------------------
  |  |  254|  3.55M|#define AVIF_DATA_EMPTY { NULL, 0 }
  ------------------
 4849|       |
 4850|  3.55M|        avifBool isFtyp = AVIF_FALSE, isMeta = AVIF_FALSE, isMoov = AVIF_FALSE;
  ------------------
  |  |   89|  3.55M|#define AVIF_FALSE 0
  ------------------
                      avifBool isFtyp = AVIF_FALSE, isMeta = AVIF_FALSE, isMoov = AVIF_FALSE;
  ------------------
  |  |   89|  3.55M|#define AVIF_FALSE 0
  ------------------
                      avifBool isFtyp = AVIF_FALSE, isMeta = AVIF_FALSE, isMoov = AVIF_FALSE;
  ------------------
  |  |   89|  3.55M|#define AVIF_FALSE 0
  ------------------
 4851|  3.55M|        avifBool isNonSkippableVariableLengthBox = AVIF_FALSE;
  ------------------
  |  |   89|  3.55M|#define AVIF_FALSE 0
  ------------------
 4852|  3.55M|        if (!memcmp(header.type, "ftyp", 4)) {
  ------------------
  |  Branch (4852:13): [True: 1.59M, False: 1.95M]
  ------------------
 4853|  1.59M|            isFtyp = AVIF_TRUE;
  ------------------
  |  |   88|  1.59M|#define AVIF_TRUE 1
  ------------------
 4854|  1.59M|            isNonSkippableVariableLengthBox = AVIF_TRUE;
  ------------------
  |  |   88|  1.59M|#define AVIF_TRUE 1
  ------------------
 4855|  1.95M|        } else if (!memcmp(header.type, "meta", 4)) {
  ------------------
  |  Branch (4855:20): [True: 1.37M, False: 584k]
  ------------------
 4856|  1.37M|            isMeta = AVIF_TRUE;
  ------------------
  |  |   88|  1.37M|#define AVIF_TRUE 1
  ------------------
 4857|  1.37M|            isNonSkippableVariableLengthBox = AVIF_TRUE;
  ------------------
  |  |   88|  1.37M|#define AVIF_TRUE 1
  ------------------
 4858|  1.37M|            metaIsSizeZero = header.isSizeZeroBox;
 4859|  1.37M|        } else if (!memcmp(header.type, "moov", 4)) {
  ------------------
  |  Branch (4859:20): [True: 438k, False: 145k]
  ------------------
 4860|   438k|            isMoov = AVIF_TRUE;
  ------------------
  |  |   88|   438k|#define AVIF_TRUE 1
  ------------------
 4861|   438k|            isNonSkippableVariableLengthBox = AVIF_TRUE;
  ------------------
  |  |   88|   438k|#define AVIF_TRUE 1
  ------------------
 4862|   438k|        }
 4863|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4864|       |        avifBool isMini = AVIF_FALSE;
 4865|       |        if (!isNonSkippableVariableLengthBox && !memcmp(header.type, "mini", 4)) {
 4866|       |            isMini = AVIF_TRUE;
 4867|       |            isNonSkippableVariableLengthBox = AVIF_TRUE;
 4868|       |        }
 4869|       |#endif
 4870|       |
 4871|  3.55M|        if (!isFtyp && (isNonSkippableVariableLengthBox || !memcmp(header.type, "free", 4) || !memcmp(header.type, "skip", 4) ||
  ------------------
  |  Branch (4871:13): [True: 1.95M, False: 1.59M]
  |  Branch (4871:25): [True: 1.80M, False: 145k]
  |  Branch (4871:60): [True: 2, False: 145k]
  |  Branch (4871:95): [True: 0, False: 145k]
  ------------------
 4872|  1.80M|                        !memcmp(header.type, "mdat", 4))) {
  ------------------
  |  Branch (4872:25): [True: 2, False: 145k]
  ------------------
 4873|       |            // Section 6.3.4 of ISO/IEC 14496-12:
 4874|       |            //   The FileTypeBox shall occur before any variable-length box (e.g. movie, free space, media data).
 4875|  1.80M|            AVIF_CHECKERR(ftypSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.80M|    do {                        \
  |  |   46|  1.80M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 5, False: 1.80M]
  |  |  ------------------
  |  |   47|      5|            avifBreakOnError(); \
  |  |   48|      5|            return ERR;         \
  |  |   49|      5|        }                       \
  |  |   50|  1.80M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.80M]
  |  |  ------------------
  ------------------
 4876|  1.80M|        }
 4877|       |
 4878|  3.55M|        if (isNonSkippableVariableLengthBox) {
  ------------------
  |  Branch (4878:13): [True: 3.40M, False: 145k]
  ------------------
 4879|  3.40M|            boxOffset = parseOffset;
 4880|  3.40M|            size_t sizeToRead;
 4881|  3.40M|            if (header.isSizeZeroBox) {
  ------------------
  |  Branch (4881:17): [True: 16.0k, False: 3.39M]
  ------------------
 4882|       |                // The box body goes till the end of the file.
 4883|  16.0k|                if (decoder->io->sizeHint != 0 && decoder->io->sizeHint - parseOffset < SIZE_MAX) {
  ------------------
  |  Branch (4883:21): [True: 7.78k, False: 8.25k]
  |  Branch (4883:51): [True: 7.78k, False: 0]
  ------------------
 4884|  7.78k|                    sizeToRead = (size_t)(decoder->io->sizeHint - parseOffset);
 4885|  8.25k|                } else {
 4886|  8.25k|                    sizeToRead = SIZE_MAX; // This will get truncated. See the documentation of avifIOReadFunc.
 4887|  8.25k|                }
 4888|  3.39M|            } else {
 4889|  3.39M|                sizeToRead = header.size;
 4890|  3.39M|            }
 4891|  3.40M|            readResult = decoder->io->read(decoder->io, 0, parseOffset, sizeToRead, &boxContents);
 4892|  3.40M|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (4892:17): [True: 1.17M, False: 2.23M]
  ------------------
 4893|  1.17M|                return readResult;
 4894|  1.17M|            }
 4895|  2.23M|            if (header.isSizeZeroBox) {
  ------------------
  |  Branch (4895:17): [True: 1.09k, False: 2.23M]
  ------------------
 4896|  1.09k|                header.size = boxContents.size;
 4897|  2.23M|            } else if (boxContents.size != header.size) {
  ------------------
  |  Branch (4897:24): [True: 101, False: 2.23M]
  ------------------
 4898|       |                // A truncated box, bail out
 4899|    101|                return AVIF_RESULT_TRUNCATED_DATA;
 4900|    101|            }
 4901|  2.23M|        } else if (header.isSizeZeroBox) {
  ------------------
  |  Branch (4901:20): [True: 2, False: 145k]
  ------------------
 4902|       |            // An unknown top level box with size 0 was found. If we reach here it means we haven't completed parsing successfully
 4903|       |            // since there are no further boxes left.
 4904|      2|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 4905|   145k|        } else if (header.size > (UINT64_MAX - parseOffset)) {
  ------------------
  |  Branch (4905:20): [True: 1, False: 145k]
  ------------------
 4906|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 4907|      1|        }
 4908|  2.37M|        parseOffset += header.size;
 4909|       |
 4910|  2.37M|        if (isFtyp) {
  ------------------
  |  Branch (4910:13): [True: 1.59M, False: 784k]
  ------------------
 4911|  1.59M|            AVIF_CHECKERR(!ftypSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.59M|    do {                        \
  |  |   46|  1.59M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.59M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
 4912|  1.59M|            AVIF_CHECKERR(avifParseFileTypeBox(&ftyp, boxContents.data, boxContents.size, data->diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.59M|    do {                        \
  |  |   46|  1.59M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 26, False: 1.59M]
  |  |  ------------------
  |  |   47|     26|            avifBreakOnError(); \
  |  |   48|     26|            return ERR;         \
  |  |   49|     26|        }                       \
  |  |   50|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
 4913|  1.59M|            AVIF_CHECKERR(avifFileTypeIsCompatible(&ftyp), AVIF_RESULT_INVALID_FTYP);
  ------------------
  |  |   45|  1.59M|    do {                        \
  |  |   46|  1.59M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 11, False: 1.59M]
  |  |  ------------------
  |  |   47|     11|            avifBreakOnError(); \
  |  |   48|     11|            return ERR;         \
  |  |   49|     11|        }                       \
  |  |   50|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
 4914|  1.59M|            ftypSeen = AVIF_TRUE;
  ------------------
  |  |   88|  1.59M|#define AVIF_TRUE 1
  ------------------
 4915|  1.59M|            memcpy(data->majorBrand, ftyp.majorBrand, 4); // Remember the major brand for future AVIF_DECODER_SOURCE_AUTO decisions
 4916|  1.59M|            if (ftyp.compatibleBrandsCount > 0) {
  ------------------
  |  Branch (4916:17): [True: 1.59M, False: 2]
  ------------------
 4917|  1.59M|                AVIF_CHECKERR(avifArrayCreate(&data->compatibleBrands, sizeof(avifBrand), ftyp.compatibleBrandsCount),
  ------------------
  |  |   45|  1.59M|    do {                        \
  |  |   46|  1.59M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.59M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
 4918|  1.59M|                              AVIF_RESULT_OUT_OF_MEMORY);
 4919|  1.59M|                memcpy(data->compatibleBrands.brand, ftyp.compatibleBrands, sizeof(avifBrand) * ftyp.compatibleBrandsCount);
 4920|  1.59M|                data->compatibleBrands.count = ftyp.compatibleBrandsCount;
 4921|  1.59M|            }
 4922|  1.59M|            needsMeta = avifFileTypeHasBrand(&ftyp, "avif");
 4923|  1.59M|            needsMoov = avifFileTypeHasBrand(&ftyp, "avis");
 4924|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4925|       |            needsMini = avifFileTypeHasBrand(&ftyp, "mif3");
 4926|       |            if (needsMini) {
 4927|       |                AVIF_CHECKERR(!needsMeta, AVIF_RESULT_INVALID_FTYP);
 4928|       |                // Section O.2.1.2 of ISO/IEC 23008-12:2014, CDAM 2:
 4929|       |                //   When the 'mif3' brand is present as the major_brand of the FileTypeBox,
 4930|       |                //   the minor_version of the FileTypeBox shall be 0 or a brand that is either
 4931|       |                //   structurally compatible with the 'mif3' brand, such as a codec brand
 4932|       |                //   complying with the 'mif3' structural brand, or a brand to which the file
 4933|       |                //   conforms after the equivalent MetaBox has been transformed from
 4934|       |                //   MinimizedImageBox as specified in Clause O.4.
 4935|       |                AVIF_CHECKERR(!memcmp(ftyp.minorVersion, "\0\0\0\0", 4) || !memcmp(ftyp.minorVersion, "avif", 4),
 4936|       |                              AVIF_RESULT_BMFF_PARSE_FAILED);
 4937|       |            }
 4938|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 4939|  1.59M|            needsTmap = avifFileTypeHasBrand(&ftyp, "tmap");
 4940|  1.59M|            if (needsTmap) {
  ------------------
  |  Branch (4940:17): [True: 108k, False: 1.48M]
  ------------------
 4941|   108k|                needsMeta = AVIF_TRUE;
  ------------------
  |  |   88|   108k|#define AVIF_TRUE 1
  ------------------
 4942|   108k|            }
 4943|  1.59M|        } else if (isMeta) {
  ------------------
  |  Branch (4943:20): [True: 605k, False: 178k]
  ------------------
 4944|   605k|            AVIF_CHECKERR(!metaSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   605k|    do {                        \
  |  |   46|   605k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 605k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   605k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 605k]
  |  |  ------------------
  ------------------
 4945|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4946|       |            AVIF_CHECKERR(!miniSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 4947|       |#endif
 4948|   605k|            AVIF_CHECKRES(avifParseMetaBox(data->meta, boxOffset, boxContents.data, boxContents.size, data->diag));
  ------------------
  |  |   54|   605k|    do {                                  \
  |  |   55|   605k|        const avifResult result__ = (A);  \
  |  |   56|   605k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 917, False: 604k]
  |  |  ------------------
  |  |   57|    917|            avifBreakOnError();           \
  |  |   58|    917|            return result__;              \
  |  |   59|    917|        }                                 \
  |  |   60|   605k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 604k]
  |  |  ------------------
  ------------------
 4949|   604k|            metaSeen = AVIF_TRUE;
  ------------------
  |  |   88|   604k|#define AVIF_TRUE 1
  ------------------
 4950|       |
 4951|  1.73M|            for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (4951:42): [True: 1.17M, False: 556k]
  ------------------
 4952|  1.17M|                if (!memcmp(data->meta->items.item[itemIndex]->type, "tmap", 4)) {
  ------------------
  |  Branch (4952:21): [True: 47.7k, False: 1.13M]
  ------------------
 4953|  47.7k|                    tmapSeen = AVIF_TRUE;
  ------------------
  |  |   88|  47.7k|#define AVIF_TRUE 1
  ------------------
 4954|  47.7k|                    break;
 4955|  47.7k|                }
 4956|  1.17M|            }
 4957|       |
 4958|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4959|       |        } else if (isMini) {
 4960|       |            AVIF_CHECKERR(!metaSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 4961|       |            AVIF_CHECKERR(!miniSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 4962|       |            const avifBool isAvifAccordingToMinorVersion = !memcmp(ftyp.minorVersion, "avif", 4);
 4963|       |            AVIF_CHECKRES(
 4964|       |                avifParseMinimizedImageBox(data, boxOffset, boxContents.data, boxContents.size, isAvifAccordingToMinorVersion, data->diag));
 4965|       |            miniSeen = AVIF_TRUE;
 4966|       |#endif
 4967|   604k|        } else if (isMoov) {
  ------------------
  |  Branch (4967:20): [True: 32.8k, False: 145k]
  ------------------
 4968|  32.8k|            AVIF_CHECKERR(!moovSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  32.8k|    do {                        \
  |  |   46|  32.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 32.8k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  32.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 32.8k]
  |  |  ------------------
  ------------------
 4969|  32.8k|            AVIF_CHECKRES(
  ------------------
  |  |   54|  32.8k|    do {                                  \
  |  |   55|  32.8k|        const avifResult result__ = (A);  \
  |  |   56|  32.8k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 316, False: 32.5k]
  |  |  ------------------
  |  |   57|    316|            avifBreakOnError();           \
  |  |   58|    316|            return result__;              \
  |  |   59|    316|        }                                 \
  |  |   60|  32.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 32.5k]
  |  |  ------------------
  ------------------
 4970|  32.8k|                avifParseMovieBox(data, boxOffset, boxContents.data, boxContents.size, decoder->imageSizeLimit, decoder->imageDimensionLimit));
 4971|  32.5k|            moovSeen = AVIF_TRUE;
  ------------------
  |  |   88|  32.5k|#define AVIF_TRUE 1
  ------------------
 4972|  32.5k|            decoder->imageSequenceTrackPresent = AVIF_TRUE;
  ------------------
  |  |   88|  32.5k|#define AVIF_TRUE 1
  ------------------
 4973|  32.5k|        }
 4974|       |
 4975|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4976|       |        if (ftypSeen && !needsMini) {
 4977|       |            // When MinimizedImageBox is present in a file, the 'mif3' brand or a derived brand that implies the 'mif3'
 4978|       |            // brand shall be the major brand or present among the compatible brands in the FileTypeBox.
 4979|       |            AVIF_CHECKERR(!miniSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 4980|       |        }
 4981|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 4982|       |
 4983|       |        // See if there is enough information to consider Parse() a success and early-out:
 4984|       |        // * If the brand 'avif' is present, require a meta box
 4985|       |        // * If the brand 'avis' is present, require a moov box
 4986|       |        // * If AVIF_ENABLE_EXPERIMENTAL_MINI is defined and the brand 'mif3' is present, require a mini box
 4987|  2.37M|        avifBool sawEverythingNeeded = ftypSeen && (!needsMeta || metaSeen) && (!needsMoov || moovSeen) && (!needsTmap || tmapSeen);
  ------------------
  |  Branch (4987:40): [True: 2.37M, False: 278]
  |  Branch (4987:53): [True: 553k, False: 1.82M]
  |  Branch (4987:67): [True: 508k, False: 1.31M]
  |  Branch (4987:81): [True: 258k, False: 804k]
  |  Branch (4987:95): [True: 32.5k, False: 771k]
  |  Branch (4987:109): [True: 242k, False: 47.7k]
  |  Branch (4987:123): [True: 47.7k, False: 18]
  ------------------
 4988|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4989|       |        sawEverythingNeeded = sawEverythingNeeded && (!needsMini || miniSeen);
 4990|       |#endif
 4991|  2.37M|        if (sawEverythingNeeded) {
  ------------------
  |  Branch (4991:13): [True: 290k, False: 2.08M]
  ------------------
 4992|   290k|            return AVIF_RESULT_OK;
 4993|   290k|        }
 4994|  2.37M|    }
 4995|     82|    if (!ftypSeen) {
  ------------------
  |  Branch (4995:9): [True: 19, False: 63]
  ------------------
 4996|     19|        return AVIF_RESULT_INVALID_FTYP;
 4997|     19|    }
 4998|     63|    if ((needsMeta && !metaSeen) || (needsMoov && !moovSeen)) {
  ------------------
  |  Branch (4998:10): [True: 49, False: 14]
  |  Branch (4998:23): [True: 47, False: 2]
  |  Branch (4998:38): [True: 15, False: 1]
  |  Branch (4998:51): [True: 15, False: 0]
  ------------------
 4999|     62|        return AVIF_RESULT_TRUNCATED_DATA;
 5000|     62|    }
 5001|      1|    if (needsTmap && !tmapSeen) {
  ------------------
  |  Branch (5001:9): [True: 1, False: 0]
  |  Branch (5001:22): [True: 1, False: 0]
  ------------------
 5002|      1|        return metaIsSizeZero ? AVIF_RESULT_TRUNCATED_DATA : AVIF_RESULT_BMFF_PARSE_FAILED;
  ------------------
  |  Branch (5002:16): [True: 0, False: 1]
  ------------------
 5003|      1|    }
 5004|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5005|       |    if (needsMini && !miniSeen) {
 5006|       |        return AVIF_RESULT_TRUNCATED_DATA;
 5007|       |    }
 5008|       |#endif
 5009|      0|    return AVIF_RESULT_OK;
 5010|      1|}
read.c:avifParseMetaBox:
 3452|   605k|{
 3453|   605k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[meta]");
  ------------------
  |  |  738|   605k|    avifROStream VARNAME;                               \
  |  |  739|   605k|    avifROData VARNAME##_roData;                        \
  |  |  740|   605k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   605k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   605k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3454|       |
 3455|   605k|    uint32_t flags;
 3456|   605k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, 0, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   605k|    do {                        \
  |  |   46|   605k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 14, False: 605k]
  |  |  ------------------
  |  |   47|     14|            avifBreakOnError(); \
  |  |   48|     14|            return ERR;         \
  |  |   49|     14|        }                       \
  |  |   50|   605k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 605k]
  |  |  ------------------
  ------------------
 3457|       |
 3458|   605k|    ++meta->idatID; // for tracking idat
 3459|       |
 3460|   605k|    avifBool firstBox = AVIF_TRUE;
  ------------------
  |  |   88|   605k|#define AVIF_TRUE 1
  ------------------
 3461|   605k|    uint32_t uniqueBoxFlags = 0;
 3462|  3.89M|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3462:12): [True: 3.28M, False: 604k]
  ------------------
 3463|  3.28M|        avifBoxHeader header;
 3464|  3.28M|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.28M|    do {                        \
  |  |   46|  3.28M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 118, False: 3.28M]
  |  |  ------------------
  |  |   47|    118|            avifBreakOnError(); \
  |  |   48|    118|            return ERR;         \
  |  |   49|    118|        }                       \
  |  |   50|  3.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.28M]
  |  |  ------------------
  ------------------
 3465|       |
 3466|  3.28M|        if (firstBox) {
  ------------------
  |  Branch (3466:13): [True: 605k, False: 2.68M]
  ------------------
 3467|   605k|            if (!memcmp(header.type, "hdlr", 4)) {
  ------------------
  |  Branch (3467:17): [True: 605k, False: 3]
  ------------------
 3468|   605k|                uint8_t handlerType[4];
 3469|   605k|                AVIF_CHECKERR(avifParseHandlerBox(avifROStreamCurrent(&s), header.size, handlerType, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   605k|    do {                        \
  |  |   46|   605k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 57, False: 605k]
  |  |  ------------------
  |  |   47|     57|            avifBreakOnError(); \
  |  |   48|     57|            return ERR;         \
  |  |   49|     57|        }                       \
  |  |   50|   605k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 605k]
  |  |  ------------------
  ------------------
 3470|       |                // HEIF (ISO/IEC 23008-12:2022), Section 6.2:
 3471|       |                //   The handler type for the MetaBox shall be 'pict'.
 3472|   605k|                if (memcmp(handlerType, "pict", 4) != 0) {
  ------------------
  |  Branch (3472:21): [True: 8, False: 605k]
  ------------------
 3473|      8|                    avifDiagnosticsPrintf(diag, "Box[hdlr] handler_type is not 'pict'");
 3474|      8|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 3475|      8|                }
 3476|   605k|                firstBox = AVIF_FALSE;
  ------------------
  |  |   89|   605k|#define AVIF_FALSE 0
  ------------------
 3477|   605k|            } else {
 3478|       |                // hdlr must be the first box!
 3479|      3|                avifDiagnosticsPrintf(diag, "Box[meta] does not have a Box[hdlr] as its first child box");
 3480|      3|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3481|      3|            }
 3482|  2.68M|        } else if (!memcmp(header.type, "hdlr", 4)) {
  ------------------
  |  Branch (3482:20): [True: 1, False: 2.68M]
  ------------------
 3483|      1|            avifDiagnosticsPrintf(diag, "Box[meta] contains a duplicate unique box of type 'hdlr'");
 3484|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3485|  2.68M|        } else if (!memcmp(header.type, "iloc", 4)) {
  ------------------
  |  Branch (3485:20): [True: 530k, False: 2.15M]
  ------------------
 3486|   530k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_ILOC, "meta", "iloc", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   530k|    do {                        \
  |  |   46|   530k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 530k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   530k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 530k]
  |  |  ------------------
  ------------------
 3487|   530k|            AVIF_CHECKRES(avifParseItemLocationBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   530k|    do {                                  \
  |  |   55|   530k|        const avifResult result__ = (A);  \
  |  |   56|   530k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 310, False: 529k]
  |  |  ------------------
  |  |   57|    310|            avifBreakOnError();           \
  |  |   58|    310|            return result__;              \
  |  |   59|    310|        }                                 \
  |  |   60|   530k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 529k]
  |  |  ------------------
  ------------------
 3488|  2.15M|        } else if (!memcmp(header.type, "pitm", 4)) {
  ------------------
  |  Branch (3488:20): [True: 589k, False: 1.56M]
  ------------------
 3489|   589k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_PITM, "meta", "pitm", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   589k|    do {                        \
  |  |   46|   589k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 589k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   589k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 589k]
  |  |  ------------------
  ------------------
 3490|   589k|            AVIF_CHECKERR(avifParsePrimaryItemBox(meta, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   589k|    do {                        \
  |  |   46|   589k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 589k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   589k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 589k]
  |  |  ------------------
  ------------------
 3491|  1.56M|        } else if (!memcmp(header.type, "idat", 4)) {
  ------------------
  |  Branch (3491:20): [True: 731, False: 1.56M]
  ------------------
 3492|    731|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IDAT, "meta", "idat", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    731|    do {                        \
  |  |   46|    731|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 731]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 731]
  |  |  ------------------
  ------------------
 3493|    731|            AVIF_CHECKERR(avifParseItemDataBox(meta, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    731|    do {                        \
  |  |   46|    731|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 730]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    731|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 730]
  |  |  ------------------
  ------------------
 3494|  1.56M|        } else if (!memcmp(header.type, "iprp", 4)) {
  ------------------
  |  Branch (3494:20): [True: 536k, False: 1.02M]
  ------------------
 3495|   536k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IPRP, "meta", "iprp", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   536k|    do {                        \
  |  |   46|   536k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 536k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3496|   536k|            AVIF_CHECKRES(avifParseItemPropertiesBox(meta, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   536k|    do {                                  \
  |  |   55|   536k|        const avifResult result__ = (A);  \
  |  |   56|   536k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 178, False: 536k]
  |  |  ------------------
  |  |   57|    178|            avifBreakOnError();           \
  |  |   58|    178|            return result__;              \
  |  |   59|    178|        }                                 \
  |  |   60|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3497|  1.02M|        } else if (!memcmp(header.type, "iinf", 4)) {
  ------------------
  |  Branch (3497:20): [True: 563k, False: 462k]
  ------------------
 3498|   563k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IINF, "meta", "iinf", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   563k|    do {                        \
  |  |   46|   563k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 563k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   563k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 563k]
  |  |  ------------------
  ------------------
 3499|   563k|            AVIF_CHECKRES(avifParseItemInfoBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   563k|    do {                                  \
  |  |   55|   563k|        const avifResult result__ = (A);  \
  |  |   56|   563k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 85, False: 563k]
  |  |  ------------------
  |  |   57|     85|            avifBreakOnError();           \
  |  |   58|     85|            return result__;              \
  |  |   59|     85|        }                                 \
  |  |   60|   563k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 563k]
  |  |  ------------------
  ------------------
 3500|   563k|        } else if (!memcmp(header.type, "iref", 4)) {
  ------------------
  |  Branch (3500:20): [True: 156k, False: 306k]
  ------------------
 3501|   156k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IREF, "meta", "iref", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   156k|    do {                        \
  |  |   46|   156k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 156k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   156k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 156k]
  |  |  ------------------
  ------------------
 3502|   156k|            AVIF_CHECKRES(avifParseItemReferenceBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   156k|    do {                                  \
  |  |   55|   156k|        const avifResult result__ = (A);  \
  |  |   56|   156k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 112, False: 155k]
  |  |  ------------------
  |  |   57|    112|            avifBreakOnError();           \
  |  |   58|    112|            return result__;              \
  |  |   59|    112|        }                                 \
  |  |   60|   156k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 155k]
  |  |  ------------------
  ------------------
 3503|   306k|        } else if (!memcmp(header.type, "grpl", 4)) {
  ------------------
  |  Branch (3503:20): [True: 53.2k, False: 253k]
  ------------------
 3504|  53.2k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_GRPL, "meta", "grpl", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  53.2k|    do {                        \
  |  |   46|  53.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 53.2k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  53.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 53.2k]
  |  |  ------------------
  ------------------
 3505|  53.2k|            AVIF_CHECKRES(avifParseGroupsListBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  53.2k|    do {                                  \
  |  |   55|  53.2k|        const avifResult result__ = (A);  \
  |  |   56|  53.2k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 21, False: 53.2k]
  |  |  ------------------
  |  |   57|     21|            avifBreakOnError();           \
  |  |   58|     21|            return result__;              \
  |  |   59|     21|        }                                 \
  |  |   60|  53.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 53.2k]
  |  |  ------------------
  ------------------
 3506|  53.2k|        }
 3507|       |
 3508|  3.28M|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.28M|    do {                        \
  |  |   46|  3.28M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.28M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.28M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.28M]
  |  |  ------------------
  ------------------
 3509|  3.28M|    }
 3510|   604k|    if (firstBox) {
  ------------------
  |  Branch (3510:9): [True: 1, False: 604k]
  ------------------
 3511|       |        // The meta box must not be empty (it must contain at least a hdlr box)
 3512|      1|        avifDiagnosticsPrintf(diag, "Box[meta] has no child boxes");
 3513|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3514|      1|    }
 3515|   604k|    return AVIF_RESULT_OK;
 3516|   604k|}
read.c:avifParseHandlerBox:
 1956|   631k|{
 1957|   631k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[hdlr]");
  ------------------
  |  |  738|   631k|    avifROStream VARNAME;                               \
  |  |  739|   631k|    avifROData VARNAME##_roData;                        \
  |  |  740|   631k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   631k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   631k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 1958|       |
 1959|   631k|    AVIF_CHECK(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL));
  ------------------
  |  |   36|   631k|    do {                        \
  |  |   37|   631k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 631k]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|   631k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 631k]
  |  |  ------------------
  ------------------
 1960|       |
 1961|   631k|    uint32_t predefined;
 1962|   631k|    AVIF_CHECK(avifROStreamReadU32(&s, &predefined)); // unsigned int(32) pre_defined = 0;
  ------------------
  |  |   36|   631k|    do {                        \
  |  |   37|   631k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 631k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   631k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 631k]
  |  |  ------------------
  ------------------
 1963|   631k|    if (predefined != 0) {
  ------------------
  |  Branch (1963:9): [True: 45, False: 631k]
  ------------------
 1964|     45|        avifDiagnosticsPrintf(diag, "Box[hdlr] contains a pre_defined value that is nonzero");
 1965|     45|        return AVIF_FALSE;
  ------------------
  |  |   89|     45|#define AVIF_FALSE 0
  ------------------
 1966|     45|    }
 1967|       |
 1968|   631k|    AVIF_CHECK(avifROStreamRead(&s, handlerType, 4)); // unsigned int(32) handler_type;
  ------------------
  |  |   36|   631k|    do {                        \
  |  |   37|   631k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 631k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   631k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 631k]
  |  |  ------------------
  ------------------
 1969|       |
 1970|  2.52M|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (1970:21): [True: 1.89M, False: 631k]
  ------------------
 1971|  1.89M|        uint32_t reserved;
 1972|  1.89M|        AVIF_CHECK(avifROStreamReadU32(&s, &reserved)); // const unsigned int(32)[3] reserved = 0;
  ------------------
  |  |   36|  1.89M|    do {                        \
  |  |   37|  1.89M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 1.89M]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|  1.89M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.89M]
  |  |  ------------------
  ------------------
 1973|  1.89M|    }
 1974|       |
 1975|       |    // Verify that a valid string is here, but don't bother to store it
 1976|   631k|    AVIF_CHECK(avifROStreamReadString(&s, NULL, 0)); // string name;
  ------------------
  |  |   36|   631k|    do {                        \
  |  |   37|   631k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 6, False: 631k]
  |  |  ------------------
  |  |   38|      6|            avifBreakOnError(); \
  |  |   39|      6|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      6|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      6|        }                       \
  |  |   41|   631k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 631k]
  |  |  ------------------
  ------------------
 1977|   631k|    return AVIF_TRUE;
  ------------------
  |  |   88|   631k|#define AVIF_TRUE 1
  ------------------
 1978|   631k|}
read.c:uniqueBoxSeen:
  763|  2.42M|{
  764|  2.42M|    const uint32_t flag = 1 << whichFlag;
  765|  2.42M|    if (*uniqueBoxFlags & flag) {
  ------------------
  |  Branch (765:9): [True: 3, False: 2.42M]
  ------------------
  766|       |        // This box has already been seen. Error!
  767|      3|        avifDiagnosticsPrintf(diagnostics, "Box[%s] contains a duplicate unique box of type '%s'", parentBoxType, boxType);
  768|      3|        return AVIF_FALSE;
  ------------------
  |  |   89|      3|#define AVIF_FALSE 0
  ------------------
  769|      3|    }
  770|       |
  771|       |    // Mark this box as seen.
  772|  2.42M|    *uniqueBoxFlags |= flag;
  773|  2.42M|    return AVIF_TRUE;
  ------------------
  |  |   88|  2.42M|#define AVIF_TRUE 1
  ------------------
  774|  2.42M|}
read.c:avifParseItemLocationBox:
 1981|   530k|{
 1982|   530k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iloc]");
  ------------------
  |  |  738|   530k|    avifROStream VARNAME;                               \
  |  |  739|   530k|    avifROData VARNAME##_roData;                        \
  |  |  740|   530k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   530k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   530k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 1983|       |
 1984|       |    // Section 8.11.3.2 of ISO/IEC 14496-12.
 1985|   530k|    uint8_t version;
 1986|   530k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   530k|    do {                        \
  |  |   46|   530k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 530k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   530k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 530k]
  |  |  ------------------
  ------------------
 1987|   530k|    if (version > 2) {
  ------------------
  |  Branch (1987:9): [True: 4, False: 530k]
  ------------------
 1988|      4|        avifDiagnosticsPrintf(diag, "Box[iloc] has an unsupported version [%u]", version);
 1989|      4|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 1990|      4|    }
 1991|       |
 1992|   530k|    uint8_t offsetSize, lengthSize, baseOffsetSize, indexSize = 0;
 1993|   530k|    uint32_t reserved;
 1994|   530k|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &offsetSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) offset_size;
  ------------------
  |  |   45|   530k|    do {                        \
  |  |   46|   530k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 530k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   530k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 530k]
  |  |  ------------------
  ------------------
 1995|   530k|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &lengthSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) length_size;
  ------------------
  |  |   45|   530k|    do {                        \
  |  |   46|   530k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 530k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   530k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 530k]
  |  |  ------------------
  ------------------
 1996|   530k|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &baseOffsetSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) base_offset_size;
  ------------------
  |  |   45|   530k|    do {                        \
  |  |   46|   530k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 530k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   530k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 530k]
  |  |  ------------------
  ------------------
 1997|   530k|    if (version == 1 || version == 2) {
  ------------------
  |  Branch (1997:9): [True: 166k, False: 363k]
  |  Branch (1997:25): [True: 125, False: 363k]
  ------------------
 1998|   167k|        AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &indexSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) index_size;
  ------------------
  |  |   45|   167k|    do {                        \
  |  |   46|   167k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 167k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   167k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 167k]
  |  |  ------------------
  ------------------
 1999|   363k|    } else {
 2000|   363k|        AVIF_CHECKERR(avifROStreamReadBitsU32(&s, &reserved, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) reserved;
  ------------------
  |  |   45|   363k|    do {                        \
  |  |   46|   363k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 363k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   363k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 363k]
  |  |  ------------------
  ------------------
 2001|   363k|    }
 2002|       |
 2003|       |    // Section 8.11.3.3 of ISO/IEC 14496-12.
 2004|   530k|    if ((offsetSize != 0 && offsetSize != 4 && offsetSize != 8) || (lengthSize != 0 && lengthSize != 4 && lengthSize != 8) ||
  ------------------
  |  Branch (2004:10): [True: 524k, False: 5.62k]
  |  Branch (2004:29): [True: 1.60k, False: 523k]
  |  Branch (2004:48): [True: 2, False: 1.60k]
  |  Branch (2004:69): [True: 524k, False: 5.67k]
  |  Branch (2004:88): [True: 5.63k, False: 518k]
  |  Branch (2004:107): [True: 5, False: 5.62k]
  ------------------
 2005|   530k|        (baseOffsetSize != 0 && baseOffsetSize != 4 && baseOffsetSize != 8) || (indexSize != 0 && indexSize != 4 && indexSize != 8)) {
  ------------------
  |  Branch (2005:10): [True: 78.9k, False: 451k]
  |  Branch (2005:33): [True: 32.3k, False: 46.5k]
  |  Branch (2005:56): [True: 4, False: 32.3k]
  |  Branch (2005:81): [True: 6.98k, False: 523k]
  |  Branch (2005:99): [True: 3.85k, False: 3.13k]
  |  Branch (2005:117): [True: 5, False: 3.84k]
  ------------------
 2006|     16|        avifDiagnosticsPrintf(diag, "Box[iloc] has an invalid size");
 2007|     16|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2008|     16|    }
 2009|       |
 2010|   530k|    uint16_t tmp16;
 2011|   530k|    uint32_t itemCount;
 2012|   530k|    if (version < 2) {
  ------------------
  |  Branch (2012:9): [True: 530k, False: 121]
  ------------------
 2013|   530k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_count;
  ------------------
  |  |   45|   530k|    do {                        \
  |  |   46|   530k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 530k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   530k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 530k]
  |  |  ------------------
  ------------------
 2014|   530k|        itemCount = tmp16;
 2015|   530k|    } else {
 2016|    121|        AVIF_CHECKERR(avifROStreamReadU32(&s, &itemCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) item_count;
  ------------------
  |  |   45|    121|    do {                        \
  |  |   46|    121|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 120]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    121|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 120]
  |  |  ------------------
  ------------------
 2017|    121|    }
 2018|  1.45M|    for (uint32_t i = 0; i < itemCount; ++i) {
  ------------------
  |  Branch (2018:26): [True: 923k, False: 529k]
  ------------------
 2019|   923k|        uint32_t itemID;
 2020|   923k|        if (version < 2) {
  ------------------
  |  Branch (2020:13): [True: 923k, False: 185]
  ------------------
 2021|   923k|            AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_ID;
  ------------------
  |  |   45|   923k|    do {                        \
  |  |   46|   923k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 11, False: 923k]
  |  |  ------------------
  |  |   47|     11|            avifBreakOnError(); \
  |  |   48|     11|            return ERR;         \
  |  |   49|     11|        }                       \
  |  |   50|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 2022|   923k|            itemID = tmp16;
 2023|   923k|        } else {
 2024|    185|            AVIF_CHECKERR(avifROStreamReadU32(&s, &itemID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) item_ID;
  ------------------
  |  |   45|    185|    do {                        \
  |  |   46|    185|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 13, False: 172]
  |  |  ------------------
  |  |   47|     13|            avifBreakOnError(); \
  |  |   48|     13|            return ERR;         \
  |  |   49|     13|        }                       \
  |  |   50|    185|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 172]
  |  |  ------------------
  ------------------
 2025|    185|        }
 2026|   923k|        AVIF_CHECKRES(avifCheckItemID("iloc", itemID, diag));
  ------------------
  |  |   54|   923k|    do {                                  \
  |  |   55|   923k|        const avifResult result__ = (A);  \
  |  |   56|   923k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 7, False: 923k]
  |  |  ------------------
  |  |   57|      7|            avifBreakOnError();           \
  |  |   58|      7|            return result__;              \
  |  |   59|      7|        }                                 \
  |  |   60|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 2027|       |
 2028|   923k|        avifDecoderItem * item;
 2029|   923k|        AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, itemID, &item));
  ------------------
  |  |   54|   923k|    do {                                  \
  |  |   55|   923k|        const avifResult result__ = (A);  \
  |  |   56|   923k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 923k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 2030|   923k|        if (item->extents.count > 0) {
  ------------------
  |  Branch (2030:13): [True: 4, False: 923k]
  ------------------
 2031|       |            // This item has already been given extents via this iloc box. This is invalid.
 2032|      4|            avifDiagnosticsPrintf(diag, "Item ID [%u] contains duplicate sets of extents", itemID);
 2033|      4|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2034|      4|        }
 2035|       |
 2036|   923k|        if (version == 1 || version == 2) {
  ------------------
  |  Branch (2036:13): [True: 166k, False: 757k]
  |  Branch (2036:29): [True: 172, False: 757k]
  ------------------
 2037|   166k|            AVIF_CHECKERR(avifROStreamReadBitsU32(&s, &reserved, /*bitCount=*/12), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(12) reserved = 0;
  ------------------
  |  |   45|   166k|    do {                        \
  |  |   46|   166k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 34, False: 166k]
  |  |  ------------------
  |  |   47|     34|            avifBreakOnError(); \
  |  |   48|     34|            return ERR;         \
  |  |   49|     34|        }                       \
  |  |   50|   166k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 166k]
  |  |  ------------------
  ------------------
 2038|   166k|            if (reserved) {
  ------------------
  |  Branch (2038:17): [True: 72, False: 166k]
  ------------------
 2039|     72|                avifDiagnosticsPrintf(diag, "Box[iloc] has a non null reserved field [%u]", reserved);
 2040|     72|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2041|     72|            }
 2042|   166k|            uint8_t constructionMethod;
 2043|   166k|            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &constructionMethod, /*bitCount=*/4),
  ------------------
  |  |   45|   166k|    do {                        \
  |  |   46|   166k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 166k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   166k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 166k]
  |  |  ------------------
  ------------------
 2044|   166k|                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) construction_method;
 2045|   166k|            if (constructionMethod != 0 /* file offset */ && constructionMethod != 1 /* idat offset */) {
  ------------------
  |  Branch (2045:17): [True: 4.68k, False: 161k]
  |  Branch (2045:62): [True: 4, False: 4.68k]
  ------------------
 2046|       |                // construction method 2 (item offset) unsupported
 2047|      4|                avifDiagnosticsPrintf(diag, "Box[iloc] has an unsupported construction method [%u]", constructionMethod);
 2048|      4|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2049|      4|            }
 2050|   166k|            if (constructionMethod == 1) {
  ------------------
  |  Branch (2050:17): [True: 4.68k, False: 161k]
  ------------------
 2051|  4.68k|                item->idatStored = AVIF_TRUE;
  ------------------
  |  |   88|  4.68k|#define AVIF_TRUE 1
  ------------------
 2052|  4.68k|            }
 2053|   166k|        }
 2054|       |
 2055|   923k|        uint16_t dataReferenceIndex;
 2056|   923k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &dataReferenceIndex), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) data_reference_index;
  ------------------
  |  |   45|   923k|    do {                        \
  |  |   46|   923k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 15, False: 923k]
  |  |  ------------------
  |  |   47|     15|            avifBreakOnError(); \
  |  |   48|     15|            return ERR;         \
  |  |   49|     15|        }                       \
  |  |   50|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 2057|   923k|        uint64_t baseOffset;
 2058|   923k|        AVIF_CHECKERR(avifROStreamReadUX8(&s, &baseOffset, baseOffsetSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(base_offset_size*8) base_offset;
  ------------------
  |  |   45|   923k|    do {                        \
  |  |   46|   923k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 4, False: 923k]
  |  |  ------------------
  |  |   47|      4|            avifBreakOnError(); \
  |  |   48|      4|            return ERR;         \
  |  |   49|      4|        }                       \
  |  |   50|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 2059|   923k|        uint16_t extentCount;
 2060|   923k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &extentCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) extent_count;
  ------------------
  |  |   45|   923k|    do {                        \
  |  |   46|   923k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 923k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 2061|  10.9M|        for (int extentIter = 0; extentIter < extentCount; ++extentIter) {
  ------------------
  |  Branch (2061:34): [True: 10.0M, False: 923k]
  ------------------
 2062|  10.0M|            if ((version == 1 || version == 2) && indexSize > 0) {
  ------------------
  |  Branch (2062:18): [True: 322k, False: 9.75M]
  |  Branch (2062:34): [True: 1.26M, False: 8.48M]
  |  Branch (2062:51): [True: 114, False: 1.58M]
  ------------------
 2063|       |                // Section 8.11.3.1 of ISO/IEC 14496-12:
 2064|       |                //   The item_reference_index is only used for the method item_offset; it indicates the 1-based index
 2065|       |                //   of the item reference with referenceType 'iloc' linked from this item. If index_size is 0, then
 2066|       |                //   the value 1 is implied; the value 0 is reserved.
 2067|    114|                uint64_t itemReferenceIndex; // Ignored unless construction_method=2 which is unsupported, but still read it.
 2068|    114|                AVIF_CHECKERR(avifROStreamReadUX8(&s, &itemReferenceIndex, indexSize),
  ------------------
  |  |   45|    114|    do {                        \
  |  |   46|    114|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 24, False: 90]
  |  |  ------------------
  |  |   47|     24|            avifBreakOnError(); \
  |  |   48|     24|            return ERR;         \
  |  |   49|     24|        }                       \
  |  |   50|    114|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 90]
  |  |  ------------------
  ------------------
 2069|    114|                              AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(index_size*8) item_reference_index;
 2070|    114|            }
 2071|       |
 2072|  10.0M|            uint64_t extentOffset;
 2073|  10.0M|            AVIF_CHECKERR(avifROStreamReadUX8(&s, &extentOffset, offsetSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(offset_size*8) extent_offset;
  ------------------
  |  |   45|  10.0M|    do {                        \
  |  |   46|  10.0M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 38, False: 10.0M]
  |  |  ------------------
  |  |   47|     38|            avifBreakOnError(); \
  |  |   48|     38|            return ERR;         \
  |  |   49|     38|        }                       \
  |  |   50|  10.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.0M]
  |  |  ------------------
  ------------------
 2074|  10.0M|            uint64_t extentLength;
 2075|  10.0M|            AVIF_CHECKERR(avifROStreamReadUX8(&s, &extentLength, lengthSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(length_size*8) extent_length;
  ------------------
  |  |   45|  10.0M|    do {                        \
  |  |   46|  10.0M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 42, False: 10.0M]
  |  |  ------------------
  |  |   47|     42|            avifBreakOnError(); \
  |  |   48|     42|            return ERR;         \
  |  |   49|     42|        }                       \
  |  |   50|  10.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.0M]
  |  |  ------------------
  ------------------
 2076|       |
 2077|  10.0M|            avifExtent * extent = (avifExtent *)avifArrayPush(&item->extents);
 2078|  10.0M|            AVIF_CHECKERR(extent != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  10.0M|    do {                        \
  |  |   46|  10.0M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 10.0M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  10.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.0M]
  |  |  ------------------
  ------------------
 2079|  10.0M|            if (extentOffset > UINT64_MAX - baseOffset) {
  ------------------
  |  Branch (2079:17): [True: 2, False: 10.0M]
  ------------------
 2080|      2|                avifDiagnosticsPrintf(diag,
 2081|      2|                                      "Item ID [%u] contains an extent offset which overflows: [base: %" PRIu64 " offset:%" PRIu64 "]",
 2082|      2|                                      itemID,
 2083|      2|                                      baseOffset,
 2084|      2|                                      extentOffset);
 2085|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2086|      2|            }
 2087|  10.0M|            uint64_t offset = baseOffset + extentOffset;
 2088|  10.0M|            extent->offset = offset;
 2089|       |#if UINT64_MAX > SIZE_MAX
 2090|       |            if (extentLength > SIZE_MAX) {
 2091|       |                avifDiagnosticsPrintf(diag, "Item ID [%u] contains an extent length which overflows: [%" PRIu64 "]", itemID, extentLength);
 2092|       |                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2093|       |            }
 2094|       |#endif
 2095|  10.0M|            extent->size = (size_t)extentLength;
 2096|  10.0M|            if (extent->size > SIZE_MAX - item->size) {
  ------------------
  |  Branch (2096:17): [True: 10, False: 10.0M]
  ------------------
 2097|     10|                avifDiagnosticsPrintf(diag,
 2098|     10|                                      "Item ID [%u] contains an extent length which overflows the item size: [%zu, %zu]",
 2099|     10|                                      itemID,
 2100|     10|                                      extent->size,
 2101|     10|                                      item->size);
 2102|     10|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2103|     10|            }
 2104|  10.0M|            item->size += extent->size;
 2105|  10.0M|        }
 2106|   923k|    }
 2107|   529k|    return AVIF_RESULT_OK;
 2108|   530k|}
read.c:avifCheckItemID:
  890|  3.39M|{
  891|       |    // Section 8.11.1.1 of ISO/IEC 14496-12 about MetaBox definition:
  892|       |    //   The item_ID value of 0 should not be used
  893|       |    // Section 8.11.6 of ISO/IEC 14496-12 about ItemInfoEntry syntax and semantics:
  894|       |    //   item_ID contains either 0 for the primary resource (e.g. the XML contained in an XMLBox)
  895|       |    //   or the ID of the item for which the following information is defined.
  896|       |    // Assuming 'infe' is the only way to properly define an item in AVIF, a compliant item cannot have an ID of zero.
  897|       |    // One way to bypass that rule would be to have 'infe' with item_ID being 0, referring to "the primary resource",
  898|       |    // and 'pitm' defining "the primary resource" as the item with an item_ID of 0. libavif considers that as invalid.
  899|  3.39M|    if (itemID == 0) {
  ------------------
  |  Branch (899:9): [True: 30, False: 3.39M]
  ------------------
  900|     30|        avifDiagnosticsPrintf(diag, "Box[%.4s] has an invalid item ID [%u]", boxFourcc, itemID);
  901|     30|        return AVIF_RESULT_BMFF_PARSE_FAILED;
  902|     30|    }
  903|  3.39M|    return AVIF_RESULT_OK;
  904|  3.39M|}
read.c:avifParsePrimaryItemBox:
 3152|   589k|{
 3153|   589k|    if (meta->primaryItemID > 0) {
  ------------------
  |  Branch (3153:9): [True: 0, False: 589k]
  ------------------
 3154|       |        // Illegal to have multiple pitm boxes, bail out
 3155|      0|        avifDiagnosticsPrintf(diag, "Multiple boxes of unique Box[pitm] found");
 3156|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 3157|      0|    }
 3158|       |
 3159|   589k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[pitm]");
  ------------------
  |  |  738|   589k|    avifROStream VARNAME;                               \
  |  |  739|   589k|    avifROData VARNAME##_roData;                        \
  |  |  740|   589k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   589k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   589k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3160|       |
 3161|   589k|    uint8_t version;
 3162|   589k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, NULL));
  ------------------
  |  |   36|   589k|    do {                        \
  |  |   37|   589k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 589k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   589k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 589k]
  |  |  ------------------
  ------------------
 3163|       |
 3164|   589k|    if (version == 0) {
  ------------------
  |  Branch (3164:9): [True: 589k, False: 16]
  ------------------
 3165|   589k|        uint16_t tmp16;
 3166|   589k|        AVIF_CHECK(avifROStreamReadU16(&s, &tmp16)); // unsigned int(16) item_ID;
  ------------------
  |  |   36|   589k|    do {                        \
  |  |   37|   589k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 589k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   589k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 589k]
  |  |  ------------------
  ------------------
 3167|   589k|        meta->primaryItemID = tmp16;
 3168|   589k|    } else {
 3169|     16|        AVIF_CHECK(avifROStreamReadU32(&s, &meta->primaryItemID)); // unsigned int(32) item_ID;
  ------------------
  |  |   36|     16|    do {                        \
  |  |   37|     16|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 12]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|     16|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12]
  |  |  ------------------
  ------------------
 3170|     16|    }
 3171|   589k|    return AVIF_TRUE;
  ------------------
  |  |   88|   589k|#define AVIF_TRUE 1
  ------------------
 3172|   589k|}
read.c:avifParseItemDataBox:
 3175|    731|{
 3176|       |    // Check to see if we've already seen an idat box for this meta box. If so, bail out
 3177|    731|    if (meta->idat.size > 0) {
  ------------------
  |  Branch (3177:9): [True: 0, False: 731]
  ------------------
 3178|      0|        avifDiagnosticsPrintf(diag, "Meta box contains multiple idat boxes");
 3179|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 3180|      0|    }
 3181|    731|    if (rawLen == 0) {
  ------------------
  |  Branch (3181:9): [True: 1, False: 730]
  ------------------
 3182|      1|        avifDiagnosticsPrintf(diag, "idat box has a length of 0");
 3183|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3184|      1|    }
 3185|       |
 3186|    730|    if (avifRWDataSet(&meta->idat, raw, rawLen) != AVIF_RESULT_OK) {
  ------------------
  |  Branch (3186:9): [True: 0, False: 730]
  ------------------
 3187|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 3188|      0|    }
 3189|    730|    return AVIF_TRUE;
  ------------------
  |  |   88|    730|#define AVIF_TRUE 1
  ------------------
 3190|    730|}
read.c:avifParseItemPropertiesBox:
 3193|   536k|{
 3194|   536k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iprp]");
  ------------------
  |  |  738|   536k|    avifROStream VARNAME;                               \
  |  |  739|   536k|    avifROData VARNAME##_roData;                        \
  |  |  740|   536k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   536k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   536k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3195|       |
 3196|   536k|    avifBoxHeader ipcoHeader;
 3197|   536k|    AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &ipcoHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   536k|    do {                        \
  |  |   46|   536k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 536k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3198|   536k|    if (memcmp(ipcoHeader.type, "ipco", 4)) {
  ------------------
  |  Branch (3198:9): [True: 1, False: 536k]
  ------------------
 3199|      1|        avifDiagnosticsPrintf(diag, "Failed to find Box[ipco] as the first box in Box[iprp]");
 3200|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3201|      1|    }
 3202|       |
 3203|       |    // Read all item properties inside of ItemPropertyContainerBox
 3204|   536k|    AVIF_CHECKRES(avifParseItemPropertyContainerBox(&meta->properties,
  ------------------
  |  |   54|   536k|    do {                                  \
  |  |   55|   536k|        const avifResult result__ = (A);  \
  |  |   56|   536k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 69, False: 536k]
  |  |  ------------------
  |  |   57|     69|            avifBreakOnError();           \
  |  |   58|     69|            return result__;              \
  |  |   59|     69|        }                                 \
  |  |   60|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3205|   536k|                                                    rawOffset + avifROStreamOffset(&s),
 3206|   536k|                                                    avifROStreamCurrent(&s),
 3207|   536k|                                                    ipcoHeader.size,
 3208|   536k|                                                    /*isTrack=*/AVIF_FALSE,
 3209|   536k|                                                    diag));
 3210|   536k|    AVIF_CHECKERR(avifROStreamSkip(&s, ipcoHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   536k|    do {                        \
  |  |   46|   536k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 536k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3211|       |
 3212|   536k|    uint32_t versionAndFlagsSeen[MAX_IPMA_VERSION_AND_FLAGS_SEEN];
 3213|   536k|    uint32_t versionAndFlagsSeenCount = 0;
 3214|       |
 3215|       |    // Now read all ItemPropertyAssociation until the end of the box, and make associations
 3216|  1.07M|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3216:12): [True: 536k, False: 536k]
  ------------------
 3217|   536k|        avifBoxHeader ipmaHeader;
 3218|   536k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &ipmaHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   536k|    do {                        \
  |  |   46|   536k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 536k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3219|       |
 3220|   536k|        if (!memcmp(ipmaHeader.type, "ipma", 4)) {
  ------------------
  |  Branch (3220:13): [True: 536k, False: 2]
  ------------------
 3221|   536k|            uint32_t versionAndFlags;
 3222|   536k|            AVIF_CHECKRES(avifParseItemPropertyAssociation(meta, avifROStreamCurrent(&s), ipmaHeader.size, diag, &versionAndFlags));
  ------------------
  |  |   54|   536k|    do {                                  \
  |  |   55|   536k|        const avifResult result__ = (A);  \
  |  |   56|   536k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 102, False: 536k]
  |  |  ------------------
  |  |   57|    102|            avifBreakOnError();           \
  |  |   58|    102|            return result__;              \
  |  |   59|    102|        }                                 \
  |  |   60|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3223|   536k|            for (uint32_t i = 0; i < versionAndFlagsSeenCount; ++i) {
  ------------------
  |  Branch (3223:34): [True: 0, False: 536k]
  ------------------
 3224|      0|                if (versionAndFlagsSeen[i] == versionAndFlags) {
  ------------------
  |  Branch (3224:21): [True: 0, False: 0]
  ------------------
 3225|       |                    // BMFF (ISO/IEC 14496-12:2022) 8.11.14.1 - There shall be at most one
 3226|       |                    // ItemPropertyAssociationBox with a given pair of values of version and
 3227|       |                    // flags.
 3228|      0|                    avifDiagnosticsPrintf(diag, "Multiple Box[ipma] with a given pair of values of version and flags. See BMFF (ISO/IEC 14496-12:2022) 8.11.14.1");
 3229|      0|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 3230|      0|                }
 3231|      0|            }
 3232|   536k|            if (versionAndFlagsSeenCount == MAX_IPMA_VERSION_AND_FLAGS_SEEN) {
  ------------------
  |  |   39|   536k|#define MAX_IPMA_VERSION_AND_FLAGS_SEEN 4
  ------------------
  |  Branch (3232:17): [True: 0, False: 536k]
  ------------------
 3233|      0|                avifDiagnosticsPrintf(diag, "Exceeded possible count of unique ipma version and flags tuples");
 3234|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3235|      0|            }
 3236|   536k|            versionAndFlagsSeen[versionAndFlagsSeenCount] = versionAndFlags;
 3237|   536k|            ++versionAndFlagsSeenCount;
 3238|   536k|        } else {
 3239|       |            // These must all be type ipma
 3240|      2|            avifDiagnosticsPrintf(diag, "Box[iprp] contains a box that isn't type 'ipma'");
 3241|      2|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3242|      2|        }
 3243|       |
 3244|   536k|        AVIF_CHECKERR(avifROStreamSkip(&s, ipmaHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   536k|    do {                        \
  |  |   46|   536k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 536k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 3245|   536k|    }
 3246|   536k|    return AVIF_RESULT_OK;
 3247|   536k|}
read.c:avifParseItemPropertyContainerBox:
 2922|   570k|{
 2923|   570k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ipco]");
  ------------------
  |  |  738|   570k|    avifROStream VARNAME;                               \
  |  |  739|   570k|    avifROData VARNAME##_roData;                        \
  |  |  740|   570k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   570k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   570k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2924|       |
 2925|  3.76M|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (2925:12): [True: 3.19M, False: 570k]
  ------------------
 2926|  3.19M|        avifBoxHeader header;
 2927|  3.19M|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.19M|    do {                        \
  |  |   46|  3.19M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 16, False: 3.19M]
  |  |  ------------------
  |  |   47|     16|            avifBreakOnError(); \
  |  |   48|     16|            return ERR;         \
  |  |   49|     16|        }                       \
  |  |   50|  3.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.19M]
  |  |  ------------------
  ------------------
 2928|       |
 2929|  3.19M|        avifProperty * prop = (avifProperty *)avifArrayPush(properties);
 2930|  3.19M|        AVIF_CHECKERR(prop != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  3.19M|    do {                        \
  |  |   46|  3.19M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.19M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.19M]
  |  |  ------------------
  ------------------
 2931|  3.19M|        memcpy(prop->type, header.type, 4);
 2932|  3.19M|        prop->isOpaque = AVIF_FALSE;
  ------------------
  |  |   89|  3.19M|#define AVIF_FALSE 0
  ------------------
 2933|  3.19M|        if (!memcmp(header.type, "ispe", 4)) {
  ------------------
  |  Branch (2933:13): [True: 600k, False: 2.59M]
  ------------------
 2934|   600k|            AVIF_CHECKERR(avifParseImageSpatialExtentsProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|   600k|    do {                        \
  |  |   46|   600k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 600k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   600k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 600k]
  |  |  ------------------
  ------------------
 2935|   600k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2936|  2.59M|        } else if ((!memcmp(header.type, "auxC", 4) && !isTrack) || (!memcmp(header.type, "auxi", 4) && isTrack)) {
  ------------------
  |  Branch (2936:21): [True: 123k, False: 2.47M]
  |  Branch (2936:56): [True: 123k, False: 1]
  |  Branch (2936:70): [True: 2.12k, False: 2.47M]
  |  Branch (2936:105): [True: 1.70k, False: 417]
  ------------------
 2937|   125k|            AVIF_CHECKERR(avifParseAuxiliaryTypeProperty(prop, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   125k|    do {                        \
  |  |   46|   125k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 125k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
 2938|  2.47M|        } else if (!memcmp(header.type, "colr", 4)) {
  ------------------
  |  Branch (2938:20): [True: 463k, False: 2.01M]
  ------------------
 2939|   463k|            AVIF_CHECKERR(avifParseColourInformationBox(prop, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|   463k|    do {                        \
  |  |   46|   463k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 463k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   463k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 463k]
  |  |  ------------------
  ------------------
 2940|   463k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2941|  2.01M|        } else if (!memcmp(header.type, "av1C", 4)) {
  ------------------
  |  Branch (2941:20): [True: 685k, False: 1.32M]
  ------------------
 2942|   685k|            AVIF_CHECKERR(avifParseCodecConfigurationBoxProperty(prop, avifROStreamCurrent(&s), header.size, "av1C", diag),
  ------------------
  |  |   45|   685k|    do {                        \
  |  |   46|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 685k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2943|   685k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2944|       |#if defined(AVIF_CODEC_AVM)
 2945|       |        } else if (!memcmp(header.type, "av2C", 4)) {
 2946|       |            AVIF_CHECKERR(avifParseCodecConfigurationBoxProperty(prop, avifROStreamCurrent(&s), header.size, "av2C", diag),
 2947|       |                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2948|       |#endif
 2949|  1.32M|        } else if (!memcmp(header.type, "pasp", 4)) {
  ------------------
  |  Branch (2949:20): [True: 1, False: 1.32M]
  ------------------
 2950|      1|            AVIF_CHECKERR(avifParsePixelAspectRatioBoxProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|      1|    do {                        \
  |  |   46|      1|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 2951|      1|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2952|  1.32M|        } else if (!memcmp(header.type, "clap", 4)) {
  ------------------
  |  Branch (2952:20): [True: 13, False: 1.32M]
  ------------------
 2953|     13|            AVIF_CHECKERR(avifParseCleanApertureBoxProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|     13|    do {                        \
  |  |   46|     13|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 8, False: 5]
  |  |  ------------------
  |  |   47|      8|            avifBreakOnError(); \
  |  |   48|      8|            return ERR;         \
  |  |   49|      8|        }                       \
  |  |   50|     13|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
 2954|     13|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2955|  1.32M|        } else if (!memcmp(header.type, "irot", 4)) {
  ------------------
  |  Branch (2955:20): [True: 8.49k, False: 1.31M]
  ------------------
 2956|  8.49k|            AVIF_CHECKERR(avifParseImageRotationProperty(prop, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  8.49k|    do {                        \
  |  |   46|  8.49k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 8.48k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  8.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
 2957|  1.31M|        } else if (!memcmp(header.type, "imir", 4)) {
  ------------------
  |  Branch (2957:20): [True: 5, False: 1.31M]
  ------------------
 2958|      5|            AVIF_CHECKERR(avifParseImageMirrorProperty(prop, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|      5|    do {                        \
  |  |   46|      5|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 2]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2959|  1.31M|        } else if (!memcmp(header.type, "pixi", 4)) {
  ------------------
  |  Branch (2959:20): [True: 657k, False: 658k]
  ------------------
 2960|   657k|            AVIF_CHECKRES(avifParsePixelInformationProperty(prop, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   657k|    do {                                  \
  |  |   55|   657k|        const avifResult result__ = (A);  \
  |  |   56|   657k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 14, False: 657k]
  |  |  ------------------
  |  |   57|     14|            avifBreakOnError();           \
  |  |   58|     14|            return result__;              \
  |  |   59|     14|        }                                 \
  |  |   60|   657k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 657k]
  |  |  ------------------
  ------------------
 2961|   658k|        } else if (!memcmp(header.type, "a1op", 4)) {
  ------------------
  |  Branch (2961:20): [True: 3, False: 658k]
  ------------------
 2962|      3|            AVIF_CHECKERR(avifParseOperatingPointSelectorProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|      3|    do {                        \
  |  |   46|      3|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 2]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2963|      3|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2964|   658k|        } else if (!memcmp(header.type, "lsel", 4)) {
  ------------------
  |  Branch (2964:20): [True: 0, False: 658k]
  ------------------
 2965|      0|            AVIF_CHECKERR(avifParseLayerSelectorProperty(prop, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|      0|    do {                        \
  |  |   46|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2966|   658k|        } else if (!memcmp(header.type, "a1lx", 4)) {
  ------------------
  |  Branch (2966:20): [True: 1.11k, False: 657k]
  ------------------
 2967|  1.11k|            AVIF_CHECKERR(avifParseAV1LayeredImageIndexingProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|  1.11k|    do {                        \
  |  |   46|  1.11k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 8, False: 1.10k]
  |  |  ------------------
  |  |   47|      8|            avifBreakOnError(); \
  |  |   48|      8|            return ERR;         \
  |  |   49|      8|        }                       \
  |  |   50|  1.11k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.10k]
  |  |  ------------------
  ------------------
 2968|  1.11k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 2969|   657k|        } else if (!memcmp(header.type, "clli", 4)) {
  ------------------
  |  Branch (2969:20): [True: 59, False: 656k]
  ------------------
 2970|     59|            AVIF_CHECKRES(avifParseContentLightLevelInformationBox(prop, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|     59|    do {                                  \
  |  |   55|     59|        const avifResult result__ = (A);  \
  |  |   56|     59|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 56]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|     59|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 56]
  |  |  ------------------
  ------------------
 2971|   656k|        } else {
 2972|   656k|            prop->isOpaque = AVIF_TRUE;
  ------------------
  |  |   88|   656k|#define AVIF_TRUE 1
  ------------------
 2973|   656k|            memset(&prop->u.opaque, 0, sizeof(prop->u.opaque));
 2974|   656k|            memcpy(prop->u.opaque.usertype, header.usertype, sizeof(prop->u.opaque.usertype));
 2975|   656k|            AVIF_CHECKRES(avifRWDataSet(&prop->u.opaque.boxPayload, avifROStreamCurrent(&s), header.size));
  ------------------
  |  |   54|   656k|    do {                                  \
  |  |   55|   656k|        const avifResult result__ = (A);  \
  |  |   56|   656k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 656k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   656k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 656k]
  |  |  ------------------
  ------------------
 2976|   656k|        }
 2977|       |
 2978|  3.19M|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.19M|    do {                        \
  |  |   46|  3.19M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.19M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.19M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.19M]
  |  |  ------------------
  ------------------
 2979|  3.19M|    }
 2980|   570k|    return AVIF_RESULT_OK;
 2981|   570k|}
read.c:avifParseImageSpatialExtentsProperty:
 2475|   600k|{
 2476|   600k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ispe]");
  ------------------
  |  |  738|   600k|    avifROStream VARNAME;                               \
  |  |  739|   600k|    avifROData VARNAME##_roData;                        \
  |  |  740|   600k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   600k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   600k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2477|   600k|    AVIF_CHECK(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL));
  ------------------
  |  |   36|   600k|    do {                        \
  |  |   37|   600k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 600k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   600k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 600k]
  |  |  ------------------
  ------------------
 2478|       |
 2479|   600k|    avifImageSpatialExtents * ispe = &prop->u.ispe;
 2480|   600k|    AVIF_CHECK(avifROStreamReadU32(&s, &ispe->width));
  ------------------
  |  |   36|   600k|    do {                        \
  |  |   37|   600k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 600k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   600k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 600k]
  |  |  ------------------
  ------------------
 2481|   600k|    AVIF_CHECK(avifROStreamReadU32(&s, &ispe->height));
  ------------------
  |  |   36|   600k|    do {                        \
  |  |   37|   600k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 600k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   600k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 600k]
  |  |  ------------------
  ------------------
 2482|   600k|    return AVIF_TRUE;
  ------------------
  |  |   88|   600k|#define AVIF_TRUE 1
  ------------------
 2483|   600k|}
read.c:avifParseAuxiliaryTypeProperty:
 2486|   125k|{
 2487|   125k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[auxC]");
  ------------------
  |  |  738|   125k|    avifROStream VARNAME;                               \
  |  |  739|   125k|    avifROData VARNAME##_roData;                        \
  |  |  740|   125k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   125k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   125k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2488|   125k|    AVIF_CHECK(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL));
  ------------------
  |  |   36|   125k|    do {                        \
  |  |   37|   125k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 125k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
 2489|       |
 2490|   125k|    AVIF_CHECK(avifROStreamReadString(&s, prop->u.auxC.auxType, AUXTYPE_SIZE));
  ------------------
  |  |   36|   125k|    do {                        \
  |  |   37|   125k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 125k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   125k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 125k]
  |  |  ------------------
  ------------------
 2491|   125k|    return AVIF_TRUE;
  ------------------
  |  |   88|   125k|#define AVIF_TRUE 1
  ------------------
 2492|   125k|}
read.c:avifParseColourInformationBox:
 2495|   463k|{
 2496|   463k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[colr]");
  ------------------
  |  |  738|   463k|    avifROStream VARNAME;                               \
  |  |  739|   463k|    avifROData VARNAME##_roData;                        \
  |  |  740|   463k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   463k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   463k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2497|       |
 2498|   463k|    avifColourInformationBox * colr = &prop->u.colr;
 2499|   463k|    colr->hasICC = AVIF_FALSE;
  ------------------
  |  |   89|   463k|#define AVIF_FALSE 0
  ------------------
 2500|   463k|    colr->hasNCLX = AVIF_FALSE;
  ------------------
  |  |   89|   463k|#define AVIF_FALSE 0
  ------------------
 2501|       |
 2502|   463k|    uint8_t colorType[4]; // unsigned int(32) colour_type;
 2503|   463k|    AVIF_CHECK(avifROStreamRead(&s, colorType, 4));
  ------------------
  |  |   36|   463k|    do {                        \
  |  |   37|   463k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 463k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   463k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 463k]
  |  |  ------------------
  ------------------
 2504|   463k|    if (!memcmp(colorType, "rICC", 4) || !memcmp(colorType, "prof", 4)) {
  ------------------
  |  Branch (2504:9): [True: 0, False: 463k]
  |  Branch (2504:42): [True: 65, False: 463k]
  ------------------
 2505|       |        // Remember the offset of the ICC payload relative to the beginning of the stream. A direct pointer cannot be stored
 2506|       |        // because decoder->io->persistent could have been AVIF_FALSE when obtaining raw through decoder->io->read().
 2507|       |        // The bytes could be copied now instead of remembering the offset, but it is as invasive as passing rawOffset everywhere.
 2508|     65|        colr->iccOffset = rawOffset + avifROStreamOffset(&s);
 2509|     65|        colr->iccSize = avifROStreamRemainingBytes(&s);
 2510|     65|        if (colr->iccSize == 0) {
  ------------------
  |  Branch (2510:13): [True: 0, False: 65]
  ------------------
 2511|      0|            avifDiagnosticsPrintf(diag, "Box[colr] contains empty ICC_profile");
 2512|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 2513|      0|        }
 2514|     65|        colr->hasICC = AVIF_TRUE;
  ------------------
  |  |   88|     65|#define AVIF_TRUE 1
  ------------------
 2515|   463k|    } else if (!memcmp(colorType, "nclx", 4)) {
  ------------------
  |  Branch (2515:16): [True: 225k, False: 237k]
  ------------------
 2516|   225k|        AVIF_CHECK(avifROStreamReadU16(&s, &colr->colorPrimaries));          // unsigned int(16) colour_primaries;
  ------------------
  |  |   36|   225k|    do {                        \
  |  |   37|   225k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 225k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   225k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 225k]
  |  |  ------------------
  ------------------
 2517|   225k|        AVIF_CHECK(avifROStreamReadU16(&s, &colr->transferCharacteristics)); // unsigned int(16) transfer_characteristics;
  ------------------
  |  |   36|   225k|    do {                        \
  |  |   37|   225k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 225k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   225k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 225k]
  |  |  ------------------
  ------------------
 2518|   225k|        AVIF_CHECK(avifROStreamReadU16(&s, &colr->matrixCoefficients));      // unsigned int(16) matrix_coefficients;
  ------------------
  |  |   36|   225k|    do {                        \
  |  |   37|   225k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 225k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   225k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 225k]
  |  |  ------------------
  ------------------
 2519|   225k|        uint8_t full_range_flag;
 2520|   225k|        AVIF_CHECK(avifROStreamReadBitsU8(&s, &full_range_flag, /*bitCount=*/1)); // unsigned int(1) full_range_flag;
  ------------------
  |  |   36|   225k|    do {                        \
  |  |   37|   225k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 225k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   225k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 225k]
  |  |  ------------------
  ------------------
 2521|   225k|        colr->range = full_range_flag ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED;
  ------------------
  |  Branch (2521:23): [True: 201k, False: 24.2k]
  ------------------
 2522|   225k|        uint8_t reserved;
 2523|   225k|        AVIF_CHECK(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/7)); // unsigned int(7) reserved = 0;
  ------------------
  |  |   36|   225k|    do {                        \
  |  |   37|   225k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 225k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   225k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 225k]
  |  |  ------------------
  ------------------
 2524|   225k|        if (reserved) {
  ------------------
  |  Branch (2524:13): [True: 1, False: 225k]
  ------------------
 2525|      1|            avifDiagnosticsPrintf(diag, "Box[colr] contains nonzero reserved bits [%u]", reserved);
 2526|      1|            return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2527|      1|        }
 2528|   225k|        colr->hasNCLX = AVIF_TRUE;
  ------------------
  |  |   88|   225k|#define AVIF_TRUE 1
  ------------------
 2529|   225k|    }
 2530|   463k|    return AVIF_TRUE;
  ------------------
  |  |   88|   463k|#define AVIF_TRUE 1
  ------------------
 2531|   463k|}
read.c:avifParseCodecConfigurationBoxProperty:
 2706|   685k|{
 2707|   685k|    char diagContext[10];
 2708|   685k|    snprintf(diagContext, sizeof(diagContext), "Box[%.4s]", configPropName); // "Box[av1C]" or "Box[av2C]"
 2709|   685k|    BEGIN_STREAM(s, raw, rawLen, diag, diagContext);
  ------------------
  |  |  738|   685k|    avifROStream VARNAME;                               \
  |  |  739|   685k|    avifROData VARNAME##_roData;                        \
  |  |  740|   685k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   685k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   685k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2710|   685k|    return avifParseCodecConfiguration(&s, &prop->u.av1C, configPropName, diag);
 2711|   685k|}
read.c:avifParseCodecConfiguration:
 2652|   685k|{
 2653|   685k|    const size_t av1COffset = avifROStreamOffset(s);
 2654|       |
 2655|   685k|    uint32_t marker, version;
 2656|   685k|    AVIF_CHECK(avifROStreamReadBitsU32(s, &marker, /*bitCount=*/1)); // unsigned int (1) marker = 1;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 685k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2657|   685k|    if (!marker) {
  ------------------
  |  Branch (2657:9): [True: 1, False: 685k]
  ------------------
 2658|      1|        avifDiagnosticsPrintf(diag, "%.4s contains illegal marker: [%u]", configPropName, marker);
 2659|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2660|      1|    }
 2661|   685k|    AVIF_CHECK(avifROStreamReadBitsU32(s, &version, /*bitCount=*/7)); // unsigned int (7) version = 1;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2662|   685k|    if (version != 1) {
  ------------------
  |  Branch (2662:9): [True: 1, False: 685k]
  ------------------
 2663|      1|        avifDiagnosticsPrintf(diag, "%.4s contains illegal version: [%u]", configPropName, version);
 2664|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2665|      1|    }
 2666|       |
 2667|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->seqProfile, /*bitCount=*/3));         // unsigned int (3) seq_profile;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 685k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2668|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->seqLevelIdx0, /*bitCount=*/5));       // unsigned int (5) seq_level_idx_0;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2669|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->seqTier0, /*bitCount=*/1));           // unsigned int (1) seq_tier_0;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 685k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2670|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->highBitdepth, /*bitCount=*/1));       // unsigned int (1) high_bitdepth;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2671|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->twelveBit, /*bitCount=*/1));          // unsigned int (1) twelve_bit;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2672|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->monochrome, /*bitCount=*/1));         // unsigned int (1) monochrome;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2673|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->chromaSubsamplingX, /*bitCount=*/1)); // unsigned int (1) chroma_subsampling_x;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2674|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->chromaSubsamplingY, /*bitCount=*/1)); // unsigned int (1) chroma_subsampling_y;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2675|   685k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->chromaSamplePosition, /*bitCount=*/2)); // unsigned int (2) chroma_sample_position;
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2676|       |
 2677|       |    // unsigned int (3) reserved = 0;
 2678|       |    // unsigned int (1) initial_presentation_delay_present;
 2679|       |    // if (initial_presentation_delay_present) {
 2680|       |    //   unsigned int (4) initial_presentation_delay_minus_one;
 2681|       |    // } else {
 2682|       |    //   unsigned int (4) reserved = 0;
 2683|       |    // }
 2684|   685k|    AVIF_CHECK(avifROStreamSkip(s, /*byteCount=*/1));
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 685k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2685|       |
 2686|       |    // According to section 2.2.1 of AV1 Image File Format specification v1.1.0:
 2687|       |    //   - Sequence Header OBUs should not be present in the AV1CodecConfigurationBox.
 2688|       |    //   - If a Sequence Header OBU is present in the AV1CodecConfigurationBox,
 2689|       |    //     it shall match the Sequence Header OBU in the AV1 Image Item Data.
 2690|       |    //   - Metadata OBUs, if present, shall match the values given in other item properties,
 2691|       |    //     such as the PixelInformationProperty or ColourInformationBox.
 2692|       |    // See https://aomediacodec.github.io/av1-avif/v1.1.0.html#av1-configuration-item-property.
 2693|       |    // For simplicity, the constraints above are not enforced.
 2694|       |    // The following is skipped by avifParseItemPropertyContainerBox().
 2695|       |    // unsigned int (8) configOBUs[];
 2696|       |
 2697|   685k|    AVIF_CHECK(avifROStreamOffset(s) - av1COffset == 4); // Make sure avifParseCodecConfiguration() reads exactly 4 bytes.
  ------------------
  |  |   36|   685k|    do {                        \
  |  |   37|   685k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 685k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   685k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 685k]
  |  |  ------------------
  ------------------
 2698|   685k|    return AVIF_TRUE;
  ------------------
  |  |   88|   685k|#define AVIF_TRUE 1
  ------------------
 2699|   685k|}
read.c:avifParsePixelAspectRatioBoxProperty:
 2714|      1|{
 2715|      1|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[pasp]");
  ------------------
  |  |  738|      1|    avifROStream VARNAME;                               \
  |  |  739|      1|    avifROData VARNAME##_roData;                        \
  |  |  740|      1|    VARNAME##_roData.data = PTR;                        \
  |  |  741|      1|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|      1|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2716|       |
 2717|      1|    avifPixelAspectRatioBox * pasp = &prop->u.pasp;
 2718|      1|    AVIF_CHECK(avifROStreamReadU32(&s, &pasp->hSpacing)); // unsigned int(32) hSpacing;
  ------------------
  |  |   36|      1|    do {                        \
  |  |   37|      1|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 2719|      1|    AVIF_CHECK(avifROStreamReadU32(&s, &pasp->vSpacing)); // unsigned int(32) vSpacing;
  ------------------
  |  |   36|      1|    do {                        \
  |  |   37|      1|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 1]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 2720|      1|    return AVIF_TRUE;
  ------------------
  |  |   88|      1|#define AVIF_TRUE 1
  ------------------
 2721|      1|}
read.c:avifParseCleanApertureBoxProperty:
 2724|     13|{
 2725|     13|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[clap]");
  ------------------
  |  |  738|     13|    avifROStream VARNAME;                               \
  |  |  739|     13|    avifROData VARNAME##_roData;                        \
  |  |  740|     13|    VARNAME##_roData.data = PTR;                        \
  |  |  741|     13|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|     13|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2726|       |
 2727|     13|    avifCleanApertureBox * clap = &prop->u.clap;
 2728|     13|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->widthN));    // unsigned int(32) cleanApertureWidthN;
  ------------------
  |  |   36|     13|    do {                        \
  |  |   37|     13|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 12]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|     13|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12]
  |  |  ------------------
  ------------------
 2729|     12|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->widthD));    // unsigned int(32) cleanApertureWidthD;
  ------------------
  |  |   36|     12|    do {                        \
  |  |   37|     12|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 11]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|     12|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 11]
  |  |  ------------------
  ------------------
 2730|     11|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->heightN));   // unsigned int(32) cleanApertureHeightN;
  ------------------
  |  |   36|     11|    do {                        \
  |  |   37|     11|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 10]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|     11|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 10]
  |  |  ------------------
  ------------------
 2731|     10|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->heightD));   // unsigned int(32) cleanApertureHeightD;
  ------------------
  |  |   36|     10|    do {                        \
  |  |   37|     10|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 9]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 9]
  |  |  ------------------
  ------------------
 2732|      9|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->horizOffN)); // unsigned int(32) horizOffN;
  ------------------
  |  |   36|      9|    do {                        \
  |  |   37|      9|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 8]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 8]
  |  |  ------------------
  ------------------
 2733|      8|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->horizOffD)); // unsigned int(32) horizOffD;
  ------------------
  |  |   36|      8|    do {                        \
  |  |   37|      8|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 7]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 7]
  |  |  ------------------
  ------------------
 2734|      7|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->vertOffN));  // unsigned int(32) vertOffN;
  ------------------
  |  |   36|      7|    do {                        \
  |  |   37|      7|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 6]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|      7|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 6]
  |  |  ------------------
  ------------------
 2735|      6|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->vertOffD));  // unsigned int(32) vertOffD;
  ------------------
  |  |   36|      6|    do {                        \
  |  |   37|      6|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 5]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|      6|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
 2736|      5|    return AVIF_TRUE;
  ------------------
  |  |   88|      5|#define AVIF_TRUE 1
  ------------------
 2737|      6|}
read.c:avifParseImageRotationProperty:
 2740|  8.49k|{
 2741|  8.49k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[irot]");
  ------------------
  |  |  738|  8.49k|    avifROStream VARNAME;                               \
  |  |  739|  8.49k|    avifROData VARNAME##_roData;                        \
  |  |  740|  8.49k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  8.49k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  8.49k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2742|       |
 2743|  8.49k|    avifImageRotation * irot = &prop->u.irot;
 2744|  8.49k|    uint8_t reserved;
 2745|  8.49k|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/6)); // unsigned int (6) reserved = 0;
  ------------------
  |  |   36|  8.49k|    do {                        \
  |  |   37|  8.49k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 8.48k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  8.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
 2746|  8.48k|    if (reserved) {
  ------------------
  |  Branch (2746:9): [True: 1, False: 8.48k]
  ------------------
 2747|      1|        avifDiagnosticsPrintf(diag, "Box[irot] contains nonzero reserved bits [%u]", reserved);
 2748|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2749|      1|    }
 2750|  8.48k|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &irot->angle, /*bitCount=*/2)); // unsigned int (2) angle;
  ------------------
  |  |   36|  8.48k|    do {                        \
  |  |   37|  8.48k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 8.48k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  8.48k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 8.48k]
  |  |  ------------------
  ------------------
 2751|  8.48k|    return AVIF_TRUE;
  ------------------
  |  |   88|  8.48k|#define AVIF_TRUE 1
  ------------------
 2752|  8.48k|}
read.c:avifParseImageMirrorProperty:
 2755|      5|{
 2756|      5|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[imir]");
  ------------------
  |  |  738|      5|    avifROStream VARNAME;                               \
  |  |  739|      5|    avifROData VARNAME##_roData;                        \
  |  |  740|      5|    VARNAME##_roData.data = PTR;                        \
  |  |  741|      5|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|      5|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2757|       |
 2758|      5|    avifImageMirror * imir = &prop->u.imir;
 2759|      5|    uint8_t reserved;
 2760|      5|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/7)); // unsigned int(7) reserved = 0;
  ------------------
  |  |   36|      5|    do {                        \
  |  |   37|      5|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 4]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 4]
  |  |  ------------------
  ------------------
 2761|      4|    if (reserved) {
  ------------------
  |  Branch (2761:9): [True: 2, False: 2]
  ------------------
 2762|      2|        avifDiagnosticsPrintf(diag, "Box[imir] contains nonzero reserved bits [%u]", reserved);
 2763|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
 2764|      2|    }
 2765|      2|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &imir->axis, /*bitCount=*/1)); // unsigned int(1) axis;
  ------------------
  |  |   36|      2|    do {                        \
  |  |   37|      2|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 2]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2766|      2|    return AVIF_TRUE;
  ------------------
  |  |   88|      2|#define AVIF_TRUE 1
  ------------------
 2767|      2|}
read.c:avifParsePixelInformationProperty:
 2770|   657k|{
 2771|   657k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[pixi]");
  ------------------
  |  |  738|   657k|    avifROStream VARNAME;                               \
  |  |  739|   657k|    avifROData VARNAME##_roData;                        \
  |  |  740|   657k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   657k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   657k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2772|   657k|    uint32_t flags = 0; // px_flags
 2773|   657k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   657k|    do {                        \
  |  |   46|   657k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 657k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   657k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 657k]
  |  |  ------------------
  ------------------
 2774|       |
 2775|   657k|    avifPixelInformationProperty * pixi = &prop->u.pixi;
 2776|   657k|    AVIF_CHECKERR(avifROStreamRead(&s, &pixi->planeCount, 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int (8) num_channels;
  ------------------
  |  |   45|   657k|    do {                        \
  |  |   46|   657k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 657k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   657k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 657k]
  |  |  ------------------
  ------------------
 2777|   657k|    if (pixi->planeCount < 1 || pixi->planeCount > MAX_PIXI_PLANE_DEPTHS) {
  ------------------
  |  |  122|   657k|#define MAX_PIXI_PLANE_DEPTHS 4
  ------------------
  |  Branch (2777:9): [True: 1, False: 657k]
  |  Branch (2777:33): [True: 3, False: 657k]
  ------------------
 2778|      4|        avifDiagnosticsPrintf(diag, "Box[pixi] contains unsupported plane count [%u]", pixi->planeCount);
 2779|      4|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2780|      4|    }
 2781|  2.32M|    for (uint8_t i = 0; i < pixi->planeCount; ++i) {
  ------------------
  |  Branch (2781:25): [True: 1.67M, False: 657k]
  ------------------
 2782|  1.67M|        AVIF_CHECKERR(avifROStreamRead(&s, &pixi->planeDepths[i], 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int (8) bits_per_channel;
  ------------------
  |  |   45|  1.67M|    do {                        \
  |  |   46|  1.67M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 1.67M]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  1.67M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.67M]
  |  |  ------------------
  ------------------
 2783|  1.67M|        if (pixi->planeDepths[i] == 0) {
  ------------------
  |  Branch (2783:13): [True: 2, False: 1.67M]
  ------------------
 2784|      2|            avifDiagnosticsPrintf(diag, "Box[pixi] plane depth shall not be 0 for channel %u", i);
 2785|      2|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2786|      2|        }
 2787|  1.67M|        if (pixi->planeDepths[i] > 16) {
  ------------------
  |  Branch (2787:13): [True: 3, False: 1.67M]
  ------------------
 2788|      3|            avifDiagnosticsPrintf(diag, "Box[pixi] plane depth %d is not supported", (int)pixi->planeDepths[i]);
 2789|      3|            return AVIF_RESULT_NOT_IMPLEMENTED;
 2790|      3|        }
 2791|  1.67M|        if (pixi->planeDepths[i] != pixi->planeDepths[0]) {
  ------------------
  |  Branch (2791:13): [True: 2, False: 1.67M]
  ------------------
 2792|      2|            avifDiagnosticsPrintf(diag,
 2793|      2|                                  "Box[pixi] contains unsupported mismatched plane depths [%u != %u]",
 2794|      2|                                  pixi->planeDepths[i],
 2795|      2|                                  pixi->planeDepths[0]);
 2796|      2|            return AVIF_RESULT_NOT_IMPLEMENTED;
 2797|      2|        }
 2798|  1.67M|    }
 2799|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI)
 2800|       |    if (flags & 1) {
 2801|       |        for (uint8_t i = 0; i < pixi->planeCount; ++i) {
 2802|       |            uint8_t channelIdc, reserved, componentFormat, channelLabelFlag;
 2803|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &channelIdc, /*bitCount=*/3), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(3) channel_idc;
 2804|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(1) reserved = 0;
 2805|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &componentFormat, /*bitCount=*/2), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(2) component_format;
 2806|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &pixi->subsamplingFlag[i], /*bitCount=*/1),
 2807|       |                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(1) subsampling_flag;
 2808|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &channelLabelFlag, /*bitCount=*/1),
 2809|       |                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(1) channel_label_flag;
 2810|       |            if (pixi->subsamplingFlag[i]) {
 2811|       |                AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &pixi->subsamplingType[i], /*bitCount=*/4),
 2812|       |                              AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) subsampling_type;
 2813|       |                AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &pixi->subsamplingLocation[i], /*bitCount=*/4),
 2814|       |                              AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) subsampling_location;
 2815|       |            }
 2816|       |
 2817|       |            // ISO/IEC 23008-12:2024/CDAM 2:2025 section 6.5.6.3:
 2818|       |            //   This field indicates the contents of the channel. A value of 0 indicates colour/grayscale. A value of
 2819|       |            //   1 indicates alpha. A value of 2 indicates depth. Values 3-7 are reserved for future use. At most one
 2820|       |            //   channel shall have a channel_idc of 1.
 2821|       |            if (channelIdc != 0) {
 2822|       |                avifDiagnosticsPrintf(diag, "Box[pixi] contains unsupported channel_idc %u for channel %u", channelIdc, i);
 2823|       |                return AVIF_RESULT_NOT_IMPLEMENTED;
 2824|       |            }
 2825|       |            if (reserved != 0) {
 2826|       |                avifDiagnosticsPrintf(diag, "Box[pixi] contains non-zero reserved field %u for channel %u", reserved, i);
 2827|       |                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2828|       |            }
 2829|       |            // ISO/IEC 23008-12:2024/CDAM 2:2025 section 6.5.6.3:
 2830|       |            //   component_format: This field indicates the data type of the channel as defined by the component_format
 2831|       |            //   values in ISO/IEC 23001-17 where component_bit_depth is considered to be equal to bits_per_channel.
 2832|       |            // ISO/IEC 23001-17 section 5.2.1.2:
 2833|       |            //   component_format: When equal to 0, component value is an unsigned integer coded on component_bit_depth bits.
 2834|       |            if (componentFormat != 0) {
 2835|       |                avifDiagnosticsPrintf(diag, "Box[pixi] contains unsupported component_format %u for channel %u", componentFormat, i);
 2836|       |                return AVIF_RESULT_NOT_IMPLEMENTED;
 2837|       |            }
 2838|       |            if (pixi->subsamplingFlag[i]) {
 2839|       |                if (pixi->subsamplingType[i] >= AVIF_PIXI_SUBSAMPLING_RESERVED) {
 2840|       |                    avifDiagnosticsPrintf(diag,
 2841|       |                                          "Box[pixi] contains reserved subsampling_type %u for channel %u",
 2842|       |                                          pixi->subsamplingType[i],
 2843|       |                                          i);
 2844|       |                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 2845|       |                }
 2846|       |                if (pixi->subsamplingLocation[i] > 4) {
 2847|       |                    avifDiagnosticsPrintf(diag,
 2848|       |                                          "Box[pixi] contains reserved subsampling_location %u for channel %u",
 2849|       |                                          pixi->subsamplingLocation[i],
 2850|       |                                          i);
 2851|       |                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 2852|       |                }
 2853|       |            }
 2854|       |            if (channelLabelFlag) {
 2855|       |                AVIF_CHECKERR(avifROStreamReadString(&s, NULL, 0), AVIF_RESULT_BMFF_PARSE_FAILED); // utf8string channel_label; (skipped)
 2856|       |            }
 2857|       |        }
 2858|       |    }
 2859|       |#endif // AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI
 2860|   657k|    return AVIF_RESULT_OK;
 2861|   657k|}
read.c:avifParseOperatingPointSelectorProperty:
 2864|      3|{
 2865|      3|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[a1op]");
  ------------------
  |  |  738|      3|    avifROStream VARNAME;                               \
  |  |  739|      3|    avifROData VARNAME##_roData;                        \
  |  |  740|      3|    VARNAME##_roData.data = PTR;                        \
  |  |  741|      3|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|      3|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2866|       |
 2867|      3|    avifOperatingPointSelectorProperty * a1op = &prop->u.a1op;
 2868|      3|    AVIF_CHECK(avifROStreamRead(&s, &a1op->opIndex, 1));
  ------------------
  |  |   36|      3|    do {                        \
  |  |   37|      3|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 3]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 2869|      3|    if (a1op->opIndex > 31) { // 31 is AV1's max operating point value
  ------------------
  |  Branch (2869:9): [True: 1, False: 2]
  ------------------
 2870|      1|        avifDiagnosticsPrintf(diag, "Box[a1op] contains an unsupported operating point [%u]", a1op->opIndex);
 2871|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2872|      1|    }
 2873|      2|    return AVIF_TRUE;
  ------------------
  |  |   88|      2|#define AVIF_TRUE 1
  ------------------
 2874|      3|}
read.c:avifParseAV1LayeredImageIndexingProperty:
 2890|  1.11k|{
 2891|  1.11k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[a1lx]");
  ------------------
  |  |  738|  1.11k|    avifROStream VARNAME;                               \
  |  |  739|  1.11k|    avifROData VARNAME##_roData;                        \
  |  |  740|  1.11k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  1.11k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  1.11k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2892|       |
 2893|  1.11k|    avifAV1LayeredImageIndexingProperty * a1lx = &prop->u.a1lx;
 2894|       |
 2895|  1.11k|    uint8_t largeSize = 0;
 2896|  1.11k|    AVIF_CHECK(avifROStreamRead(&s, &largeSize, 1));
  ------------------
  |  |   36|  1.11k|    do {                        \
  |  |   37|  1.11k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 1.11k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  1.11k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.11k]
  |  |  ------------------
  ------------------
 2897|  1.11k|    if (largeSize & 0xFE) {
  ------------------
  |  Branch (2897:9): [True: 1, False: 1.11k]
  ------------------
 2898|      1|        avifDiagnosticsPrintf(diag, "Box[a1lx] has bits set in the reserved section [%u]", largeSize);
 2899|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2900|      1|    }
 2901|       |
 2902|  4.44k|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (2902:21): [True: 3.33k, False: 1.10k]
  ------------------
 2903|  3.33k|        if (largeSize) {
  ------------------
  |  Branch (2903:13): [True: 9, False: 3.33k]
  ------------------
 2904|      9|            AVIF_CHECK(avifROStreamReadU32(&s, &a1lx->layerSize[i]));
  ------------------
  |  |   36|      9|    do {                        \
  |  |   37|      9|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 6]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 6]
  |  |  ------------------
  ------------------
 2905|  3.33k|        } else {
 2906|  3.33k|            uint16_t layerSize16;
 2907|  3.33k|            AVIF_CHECK(avifROStreamReadU16(&s, &layerSize16));
  ------------------
  |  |   36|  3.33k|    do {                        \
  |  |   37|  3.33k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 3.32k]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|  3.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 3.32k]
  |  |  ------------------
  ------------------
 2908|  3.32k|            a1lx->layerSize[i] = (uint32_t)layerSize16;
 2909|  3.32k|        }
 2910|  3.33k|    }
 2911|       |
 2912|       |    // Layer sizes will be validated later (when the item's size is known)
 2913|  1.10k|    return AVIF_TRUE;
  ------------------
  |  |   88|  1.10k|#define AVIF_TRUE 1
  ------------------
 2914|  1.11k|}
read.c:avifParseContentLightLevelInformationBox:
 2540|     59|{
 2541|     59|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[clli]");
  ------------------
  |  |  738|     59|    avifROStream VARNAME;                               \
  |  |  739|     59|    avifROData VARNAME##_roData;                        \
  |  |  740|     59|    VARNAME##_roData.data = PTR;                        \
  |  |  741|     59|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|     59|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2542|     59|    AVIF_CHECKRES(avifParseContentLightLevelInformation(&s, &prop->u.clli));
  ------------------
  |  |   54|     59|    do {                                  \
  |  |   55|     59|        const avifResult result__ = (A);  \
  |  |   56|     59|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 56]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|     59|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 56]
  |  |  ------------------
  ------------------
 2543|     56|    return AVIF_RESULT_OK;
 2544|     59|}
read.c:avifParseContentLightLevelInformation:
 2534|     59|{
 2535|     59|    AVIF_CHECKERR(avifROStreamReadBitsU16(s, &clli->maxCLL, 16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) max_content_light_level
  ------------------
  |  |   45|     59|    do {                        \
  |  |   46|     59|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 58]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|     59|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 58]
  |  |  ------------------
  ------------------
 2536|     58|    AVIF_CHECKERR(avifROStreamReadBitsU16(s, &clli->maxPALL, 16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) max_pic_average_light_level
  ------------------
  |  |   45|     58|    do {                        \
  |  |   46|     58|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 56]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|     58|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 56]
  |  |  ------------------
  ------------------
 2537|     56|    return AVIF_RESULT_OK;
 2538|     58|}
read.c:avifParseItemPropertyAssociation:
 2984|   536k|{
 2985|       |    // NOTE: If this function ever adds support for versions other than [0,1] or flags other than
 2986|       |    //       [0,1], please increase the value of MAX_IPMA_VERSION_AND_FLAGS_SEEN accordingly.
 2987|       |
 2988|   536k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ipma]");
  ------------------
  |  |  738|   536k|    avifROStream VARNAME;                               \
  |  |  739|   536k|    avifROData VARNAME##_roData;                        \
  |  |  740|   536k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   536k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   536k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2989|       |
 2990|   536k|    uint8_t version;
 2991|   536k|    uint32_t flags;
 2992|   536k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   536k|    do {                        \
  |  |   46|   536k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 536k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 2993|   536k|    avifBool propertyIndexIsU15 = ((flags & 0x1) != 0);
 2994|   536k|    *outVersionAndFlags = ((uint32_t)version << 24) | flags;
 2995|       |
 2996|   536k|    uint32_t entryCount;
 2997|   536k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   536k|    do {                        \
  |  |   46|   536k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 536k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   536k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 536k]
  |  |  ------------------
  ------------------
 2998|   536k|    unsigned int prevItemID = 0;
 2999|  1.45M|    for (uint32_t entryIndex = 0; entryIndex < entryCount; ++entryIndex) {
  ------------------
  |  Branch (2999:35): [True: 923k, False: 536k]
  ------------------
 3000|       |        // ISO/IEC 14496-12, Seventh edition, 2022-01, Section 8.11.14.1:
 3001|       |        //   Each ItemPropertyAssociationBox shall be ordered by increasing item_ID, and there shall
 3002|       |        //   be at most one occurrence of a given item_ID, in the set of ItemPropertyAssociationBox
 3003|       |        //   boxes.
 3004|   923k|        unsigned int itemID;
 3005|   923k|        if (version < 1) {
  ------------------
  |  Branch (3005:13): [True: 894k, False: 29.1k]
  ------------------
 3006|   894k|            uint16_t tmp;
 3007|   894k|            AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   894k|    do {                        \
  |  |   46|   894k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 5, False: 894k]
  |  |  ------------------
  |  |   47|      5|            avifBreakOnError(); \
  |  |   48|      5|            return ERR;         \
  |  |   49|      5|        }                       \
  |  |   50|   894k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 894k]
  |  |  ------------------
  ------------------
 3008|   894k|            itemID = tmp;
 3009|   894k|        } else {
 3010|  29.1k|            AVIF_CHECKERR(avifROStreamReadU32(&s, &itemID), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  29.1k|    do {                        \
  |  |   46|  29.1k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 13, False: 29.1k]
  |  |  ------------------
  |  |   47|     13|            avifBreakOnError(); \
  |  |   48|     13|            return ERR;         \
  |  |   49|     13|        }                       \
  |  |   50|  29.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 29.1k]
  |  |  ------------------
  ------------------
 3011|  29.1k|        }
 3012|   923k|        AVIF_CHECKRES(avifCheckItemID("ipma", itemID, diag));
  ------------------
  |  |   54|   923k|    do {                                  \
  |  |   55|   923k|        const avifResult result__ = (A);  \
  |  |   56|   923k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 923k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 3013|   923k|        if (itemID <= prevItemID) {
  ------------------
  |  Branch (3013:13): [True: 3, False: 923k]
  ------------------
 3014|      3|            avifDiagnosticsPrintf(diag, "Box[ipma] item IDs are not ordered by increasing ID");
 3015|      3|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3016|      3|        }
 3017|   923k|        prevItemID = itemID;
 3018|       |
 3019|   923k|        avifDecoderItem * item;
 3020|   923k|        AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, itemID, &item));
  ------------------
  |  |   54|   923k|    do {                                  \
  |  |   55|   923k|        const avifResult result__ = (A);  \
  |  |   56|   923k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 923k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 3021|   923k|        if (item->ipmaSeen) {
  ------------------
  |  Branch (3021:13): [True: 0, False: 923k]
  ------------------
 3022|      0|            avifDiagnosticsPrintf(diag, "Duplicate Box[ipma] for item ID [%u]", itemID);
 3023|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3024|      0|        }
 3025|   923k|        item->ipmaSeen = AVIF_TRUE;
  ------------------
  |  |   88|   923k|#define AVIF_TRUE 1
  ------------------
 3026|       |
 3027|   923k|        uint8_t associationCount;
 3028|   923k|        AVIF_CHECKERR(avifROStreamRead(&s, &associationCount, 1), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   923k|    do {                        \
  |  |   46|   923k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 923k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   923k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 923k]
  |  |  ------------------
  ------------------
 3029|  4.71M|        for (uint8_t associationIndex = 0; associationIndex < associationCount; ++associationIndex) {
  ------------------
  |  Branch (3029:44): [True: 3.79M, False: 923k]
  ------------------
 3030|  3.79M|            uint8_t essential;
 3031|  3.79M|            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &essential, /*bitCount=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // bit(1) essential;
  ------------------
  |  |   45|  3.79M|    do {                        \
  |  |   46|  3.79M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 12, False: 3.79M]
  |  |  ------------------
  |  |   47|     12|            avifBreakOnError(); \
  |  |   48|     12|            return ERR;         \
  |  |   49|     12|        }                       \
  |  |   50|  3.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.79M]
  |  |  ------------------
  ------------------
 3032|  3.79M|            uint32_t propertyIndex;
 3033|  3.79M|            AVIF_CHECKERR(avifROStreamReadBitsU32(&s, &propertyIndex, /*bitCount=*/propertyIndexIsU15 ? 15 : 7),
  ------------------
  |  |   45|  3.79M|    do {                        \
  |  |   46|  7.58M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 3.79M]
  |  |  |  Branch (46:15): [True: 41, False: 3.79M]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  3.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.79M]
  |  |  ------------------
  ------------------
 3034|  3.79M|                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(7/15) property_index;
 3035|       |
 3036|       |            // ISO/IEC 14496-12 Section 8.11.14.3:
 3037|       |            //   0 indicating that no property is associated (the essential indicator shall also be 0)
 3038|  3.79M|            if (propertyIndex == 0) {
  ------------------
  |  Branch (3038:17): [True: 21.3k, False: 3.77M]
  ------------------
 3039|  21.3k|                if (essential) {
  ------------------
  |  Branch (3039:21): [True: 2, False: 21.3k]
  ------------------
 3040|      2|                    avifDiagnosticsPrintf(diag, "Box[ipma] for item ID [%u] contains an illegal essential property index 0", itemID);
 3041|      2|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 3042|      2|                }
 3043|  21.3k|                continue;
 3044|  21.3k|            }
 3045|  3.77M|            --propertyIndex; // 1-indexed
 3046|       |
 3047|  3.77M|            if (propertyIndex >= meta->properties.count) {
  ------------------
  |  Branch (3047:17): [True: 54, False: 3.77M]
  ------------------
 3048|     54|                avifDiagnosticsPrintf(diag,
 3049|     54|                                      "Box[ipma] for item ID [%u] contains an illegal property index [%u] (out of [%u] properties)",
 3050|     54|                                      itemID,
 3051|     54|                                      propertyIndex,
 3052|     54|                                      meta->properties.count);
 3053|     54|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3054|     54|            }
 3055|       |
 3056|       |            // Copy property to item
 3057|  3.77M|            const avifProperty * srcProp = &meta->properties.prop[propertyIndex];
 3058|       |
 3059|       |            // Some properties are supported and parsed by libavif.
 3060|       |            // Other properties are forwarded to the user as opaque blobs.
 3061|  3.77M|            const avifBool supportedType = !srcProp->isOpaque;
 3062|  3.77M|            if (supportedType) {
  ------------------
  |  Branch (3062:17): [True: 3.04M, False: 726k]
  ------------------
 3063|  3.04M|                if (essential) {
  ------------------
  |  Branch (3063:21): [True: 752k, False: 2.29M]
  ------------------
 3064|       |                    // Verify that it is legal for this property to be flagged as essential. Any
 3065|       |                    // types in this list are *required* in the spec to not be flagged as essential
 3066|       |                    // when associated with an item.
 3067|   752k|                    static const char * const nonessentialTypes[] = {
 3068|       |
 3069|       |                        // AVIF: Section 2.3.2.3.2: "If associated, it shall not be marked as essential."
 3070|   752k|                        "a1lx"
 3071|       |
 3072|   752k|                    };
 3073|   752k|                    size_t nonessentialTypesCount = sizeof(nonessentialTypes) / sizeof(nonessentialTypes[0]);
 3074|  1.50M|                    for (size_t i = 0; i < nonessentialTypesCount; ++i) {
  ------------------
  |  Branch (3074:40): [True: 752k, False: 752k]
  ------------------
 3075|   752k|                        if (!memcmp(srcProp->type, nonessentialTypes[i], 4)) {
  ------------------
  |  Branch (3075:29): [True: 1, False: 752k]
  ------------------
 3076|      1|                            avifDiagnosticsPrintf(diag,
 3077|      1|                                                  "Item ID [%u] has a %s property association which must not be marked essential, but is",
 3078|      1|                                                  itemID,
 3079|      1|                                                  nonessentialTypes[i]);
 3080|      1|                            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3081|      1|                        }
 3082|   752k|                    }
 3083|  2.29M|                } else {
 3084|       |                    // Verify that it is legal for this property to not be flagged as essential. Any
 3085|       |                    // types in this list are *required* in the spec to be flagged as essential when
 3086|       |                    // associated with an item.
 3087|  2.29M|                    static const char * const essentialTypes[] = {
 3088|       |
 3089|       |                        // AVIF: Section 2.3.2.1.1: "If associated, it shall be marked as essential."
 3090|  2.29M|                        "a1op",
 3091|       |
 3092|       |                        // HEIF: Section 6.5.11.1: "essential shall be equal to 1 for an 'lsel' item property."
 3093|  2.29M|                        "lsel",
 3094|       |
 3095|       |                        // MIAF 2019/Amd. 2:2021: Section 7.3.9:
 3096|       |                        //   All transformative properties associated with coded and derived images shall be
 3097|       |                        //   marked as essential
 3098|       |                        // It makes no sense to allow for non-essential crop/orientation associated with an item
 3099|       |                        // that is not a coded or derived image, so for simplicity 'item' is not checked here.
 3100|  2.29M|                        "clap",
 3101|  2.29M|                        "irot",
 3102|  2.29M|                        "imir"
 3103|       |
 3104|  2.29M|                    };
 3105|  2.29M|                    size_t essentialTypesCount = sizeof(essentialTypes) / sizeof(essentialTypes[0]);
 3106|  13.7M|                    for (size_t i = 0; i < essentialTypesCount; ++i) {
  ------------------
  |  Branch (3106:40): [True: 11.4M, False: 2.29M]
  ------------------
 3107|  11.4M|                        if (!memcmp(srcProp->type, essentialTypes[i], 4)) {
  ------------------
  |  Branch (3107:29): [True: 4, False: 11.4M]
  ------------------
 3108|      4|                            avifDiagnosticsPrintf(diag,
 3109|      4|                                                  "Item ID [%u] has a %s property association which must be marked essential, but is not",
 3110|      4|                                                  itemID,
 3111|      4|                                                  essentialTypes[i]);
 3112|      4|                            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3113|      4|                        }
 3114|  11.4M|                    }
 3115|  2.29M|                }
 3116|       |
 3117|       |                // Supported and valid; associate it with this item.
 3118|  3.04M|                avifProperty * dstProp = (avifProperty *)avifArrayPush(&item->properties);
 3119|  3.04M|                AVIF_CHECKERR(dstProp != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  3.04M|    do {                        \
  |  |   46|  3.04M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.04M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.04M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.04M]
  |  |  ------------------
  ------------------
 3120|  3.04M|                *dstProp = *srcProp;
 3121|  3.04M|            } else {
 3122|   726k|                if (essential) {
  ------------------
  |  Branch (3122:21): [True: 95.9k, False: 630k]
  ------------------
 3123|       |                    // ISO/IEC 23008-12 Section 10.2.1:
 3124|       |                    //   Under any brand, the primary item (or an alternative if alternative support is required)
 3125|       |                    //   shall be processable by a reader implementing only the required features of that brand.
 3126|       |                    //   Specifically, given that each brand has a set of properties that a reader is required to
 3127|       |                    //   support: the item shall not have properties that are marked as essential and are outside
 3128|       |                    //   this set.
 3129|       |                    // It is assumed that this rule also applies to items the primary item depends on (such as
 3130|       |                    // the cells of a grid).
 3131|       |
 3132|       |                    // Discovered an essential item property that libavif doesn't support!
 3133|       |                    // Make a note to ignore this item later.
 3134|  95.9k|                    item->hasUnsupportedEssentialProperty = AVIF_TRUE;
  ------------------
  |  |   88|  95.9k|#define AVIF_TRUE 1
  ------------------
 3135|  95.9k|                }
 3136|       |
 3137|       |                // Will be forwarded to the user through avifImage::properties.
 3138|   726k|                avifProperty * dstProp = (avifProperty *)avifArrayPush(&item->properties);
 3139|   726k|                AVIF_CHECKERR(dstProp != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   726k|    do {                        \
  |  |   46|   726k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 726k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   726k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 726k]
  |  |  ------------------
  ------------------
 3140|   726k|                dstProp->isOpaque = AVIF_TRUE;
  ------------------
  |  |   88|   726k|#define AVIF_TRUE 1
  ------------------
 3141|   726k|                memcpy(dstProp->type, srcProp->type, sizeof(dstProp->type));
 3142|   726k|                memcpy(dstProp->u.opaque.usertype, srcProp->u.opaque.usertype, sizeof(dstProp->u.opaque.usertype));
 3143|   726k|                AVIF_CHECKRES(
  ------------------
  |  |   54|   726k|    do {                                  \
  |  |   55|   726k|        const avifResult result__ = (A);  \
  |  |   56|   726k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 726k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   726k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 726k]
  |  |  ------------------
  ------------------
 3144|   726k|                    avifRWDataSet(&dstProp->u.opaque.boxPayload, srcProp->u.opaque.boxPayload.data, srcProp->u.opaque.boxPayload.size));
 3145|   726k|            }
 3146|  3.77M|        }
 3147|   923k|    }
 3148|   536k|    return AVIF_RESULT_OK;
 3149|   536k|}
read.c:avifParseItemInfoBox:
 3301|   563k|{
 3302|   563k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iinf]");
  ------------------
  |  |  738|   563k|    avifROStream VARNAME;                               \
  |  |  739|   563k|    avifROData VARNAME##_roData;                        \
  |  |  740|   563k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   563k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   563k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3303|       |
 3304|   563k|    uint8_t version;
 3305|   563k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   563k|    do {                        \
  |  |   46|   563k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 563k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   563k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 563k]
  |  |  ------------------
  ------------------
 3306|   563k|    uint32_t entryCount;
 3307|   563k|    if (version == 0) {
  ------------------
  |  Branch (3307:9): [True: 561k, False: 1.56k]
  ------------------
 3308|   561k|        uint16_t tmp;
 3309|   561k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) entry_count;
  ------------------
  |  |   45|   561k|    do {                        \
  |  |   46|   561k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 561k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   561k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 561k]
  |  |  ------------------
  ------------------
 3310|   561k|        entryCount = tmp;
 3311|   561k|    } else if (version == 1) {
  ------------------
  |  Branch (3311:16): [True: 1.56k, False: 2]
  ------------------
 3312|  1.56k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  1.56k|    do {                        \
  |  |   46|  1.56k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 1.56k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  1.56k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.56k]
  |  |  ------------------
  ------------------
 3313|  1.56k|    } else {
 3314|      2|        avifDiagnosticsPrintf(diag, "Box[iinf] has an unsupported version %u", version);
 3315|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3316|      2|    }
 3317|       |
 3318|  1.50M|    for (uint32_t entryIndex = 0; entryIndex < entryCount; ++entryIndex) {
  ------------------
  |  Branch (3318:35): [True: 944k, False: 563k]
  ------------------
 3319|   944k|        avifBoxHeader infeHeader;
 3320|   944k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &infeHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   944k|    do {                        \
  |  |   46|   944k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 48, False: 944k]
  |  |  ------------------
  |  |   47|     48|            avifBreakOnError(); \
  |  |   48|     48|            return ERR;         \
  |  |   49|     48|        }                       \
  |  |   50|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3321|       |
 3322|   944k|        if (!memcmp(infeHeader.type, "infe", 4)) {
  ------------------
  |  Branch (3322:13): [True: 944k, False: 3]
  ------------------
 3323|   944k|            AVIF_CHECKRES(avifParseItemInfoEntry(meta, avifROStreamCurrent(&s), infeHeader.size, diag));
  ------------------
  |  |   54|   944k|    do {                                  \
  |  |   55|   944k|        const avifResult result__ = (A);  \
  |  |   56|   944k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 29, False: 944k]
  |  |  ------------------
  |  |   57|     29|            avifBreakOnError();           \
  |  |   58|     29|            return result__;              \
  |  |   59|     29|        }                                 \
  |  |   60|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3324|   944k|        } else {
 3325|       |            // These must all be type infe
 3326|      3|            avifDiagnosticsPrintf(diag, "Box[iinf] contains a box that isn't type 'infe'");
 3327|      3|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3328|      3|        }
 3329|       |
 3330|   944k|        AVIF_CHECKERR(avifROStreamSkip(&s, infeHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   944k|    do {                        \
  |  |   46|   944k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 944k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3331|   944k|    }
 3332|       |
 3333|   563k|    return AVIF_RESULT_OK;
 3334|   563k|}
read.c:avifParseItemInfoEntry:
 3250|   944k|{
 3251|       |    // Section 8.11.6.2 of ISO/IEC 14496-12.
 3252|   944k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[infe]");
  ------------------
  |  |  738|   944k|    avifROStream VARNAME;                               \
  |  |  739|   944k|    avifROData VARNAME##_roData;                        \
  |  |  740|   944k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   944k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   944k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3253|       |
 3254|   944k|    uint8_t version;
 3255|   944k|    uint32_t flags;
 3256|   944k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   944k|    do {                        \
  |  |   46|   944k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 944k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3257|       |    // Version 2+ is required for item_type
 3258|   944k|    if (version != 2 && version != 3) {
  ------------------
  |  Branch (3258:9): [True: 4.82k, False: 939k]
  |  Branch (3258:25): [True: 5, False: 4.82k]
  ------------------
 3259|      5|        avifDiagnosticsPrintf(s.diag, "%s: Expecting box version 2 or 3, got version %u", s.diagContext, version);
 3260|      5|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3261|      5|    }
 3262|       |    // Ignore flags&1. A value of 1 corresponds to a hidden image item (not intended to be displayed).
 3263|       |    // There could be files wrongly setting that flag to 1 for items output as "to be displayed"
 3264|       |    // by libavif so far, so keep that lenient behavior for simplicity and backward compatibility.
 3265|       |
 3266|   944k|    uint32_t itemID;
 3267|   944k|    if (version == 2) {
  ------------------
  |  Branch (3267:9): [True: 939k, False: 4.82k]
  ------------------
 3268|   939k|        uint16_t tmp;
 3269|   939k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_ID;
  ------------------
  |  |   45|   939k|    do {                        \
  |  |   46|   939k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 939k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   939k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 939k]
  |  |  ------------------
  ------------------
 3270|   939k|        itemID = tmp;
 3271|   939k|    } else {
 3272|  4.82k|        AVIF_ASSERT_OR_RETURN(version == 3);
  ------------------
  |  |   64|  4.82k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  4.82k|    do {                        \
  |  |  |  |   46|  4.82k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 4.82k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  4.82k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 4.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3273|  4.82k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &itemID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) item_ID;
  ------------------
  |  |   45|  4.82k|    do {                        \
  |  |   46|  4.82k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 4.82k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  4.82k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 4.82k]
  |  |  ------------------
  ------------------
 3274|  4.82k|    }
 3275|   944k|    AVIF_CHECKRES(avifCheckItemID("infe", itemID, diag));
  ------------------
  |  |   54|   944k|    do {                                  \
  |  |   55|   944k|        const avifResult result__ = (A);  \
  |  |   56|   944k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 944k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3276|   944k|    uint16_t itemProtectionIndex;
 3277|   944k|    AVIF_CHECKERR(avifROStreamReadU16(&s, &itemProtectionIndex), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_protection_index;
  ------------------
  |  |   45|   944k|    do {                        \
  |  |   46|   944k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 944k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3278|   944k|    uint8_t itemType[4];
 3279|   944k|    AVIF_CHECKERR(avifROStreamRead(&s, itemType, 4), AVIF_RESULT_BMFF_PARSE_FAILED);   // unsigned int(32) item_type;
  ------------------
  |  |   45|   944k|    do {                        \
  |  |   46|   944k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 944k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3280|   944k|    AVIF_CHECKERR(avifROStreamReadString(&s, NULL, 0), AVIF_RESULT_BMFF_PARSE_FAILED); // utf8string item_name; (skipped)
  ------------------
  |  |   45|   944k|    do {                        \
  |  |   46|   944k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 12, False: 944k]
  |  |  ------------------
  |  |   47|     12|            avifBreakOnError(); \
  |  |   48|     12|            return ERR;         \
  |  |   49|     12|        }                       \
  |  |   50|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3281|   944k|    avifContentType contentType;
 3282|   944k|    if (!memcmp(itemType, "mime", 4)) {
  ------------------
  |  Branch (3282:9): [True: 239, False: 944k]
  ------------------
 3283|    239|        AVIF_CHECKERR(avifROStreamReadString(&s, contentType.contentType, CONTENTTYPE_SIZE), AVIF_RESULT_BMFF_PARSE_FAILED); // utf8string content_type;
  ------------------
  |  |   45|    239|    do {                        \
  |  |   46|    239|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 238]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    239|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 238]
  |  |  ------------------
  ------------------
 3284|       |        // utf8string content_encoding; //optional
 3285|   944k|    } else {
 3286|       |        // if (item_type == 'uri ') {
 3287|       |        //  utf8string item_uri_type;
 3288|       |        // }
 3289|   944k|        memset(&contentType, 0, sizeof(contentType));
 3290|   944k|    }
 3291|       |
 3292|   944k|    avifDecoderItem * item;
 3293|   944k|    AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, itemID, &item));
  ------------------
  |  |   54|   944k|    do {                                  \
  |  |   55|   944k|        const avifResult result__ = (A);  \
  |  |   56|   944k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 944k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 3294|       |
 3295|   944k|    memcpy(item->type, itemType, sizeof(itemType));
 3296|   944k|    item->contentType = contentType;
 3297|   944k|    return AVIF_RESULT_OK;
 3298|   944k|}
read.c:avifParseItemReferenceBox:
 3337|   156k|{
 3338|   156k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iref]");
  ------------------
  |  |  738|   156k|    avifROStream VARNAME;                               \
  |  |  739|   156k|    avifROData VARNAME##_roData;                        \
  |  |  740|   156k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|   156k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|   156k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3339|       |
 3340|   156k|    uint8_t version;
 3341|   156k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   156k|    do {                        \
  |  |   46|   156k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 156k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   156k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 156k]
  |  |  ------------------
  ------------------
 3342|   156k|    if (version > 1) {
  ------------------
  |  Branch (3342:9): [True: 12.5k, False: 143k]
  ------------------
 3343|       |        // iref versions > 1 are not supported. Skip it.
 3344|  12.5k|        return AVIF_RESULT_OK;
 3345|  12.5k|    }
 3346|       |
 3347|   376k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3347:12): [True: 232k, False: 143k]
  ------------------
 3348|   232k|        avifBoxHeader irefHeader;
 3349|   232k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &irefHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   232k|    do {                        \
  |  |   46|   232k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 7, False: 232k]
  |  |  ------------------
  |  |   47|      7|            avifBreakOnError(); \
  |  |   48|      7|            return ERR;         \
  |  |   49|      7|        }                       \
  |  |   50|   232k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 232k]
  |  |  ------------------
  ------------------
 3350|       |
 3351|   232k|        uint32_t fromID = 0;
 3352|   232k|        if (version == 0) {
  ------------------
  |  Branch (3352:13): [True: 232k, False: 74]
  ------------------
 3353|   232k|            uint16_t tmp;
 3354|   232k|            AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) from_item_ID;
  ------------------
  |  |   45|   232k|    do {                        \
  |  |   46|   232k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 232k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   232k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 232k]
  |  |  ------------------
  ------------------
 3355|   232k|            fromID = tmp;
 3356|   232k|        } else {
 3357|       |            // version == 1
 3358|     74|            AVIF_CHECKERR(avifROStreamReadU32(&s, &fromID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) from_item_ID;
  ------------------
  |  |   45|     74|    do {                        \
  |  |   46|     74|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 73]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|     74|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 73]
  |  |  ------------------
  ------------------
 3359|     74|        }
 3360|       |        // ISO 14496-12 section 8.11.12.1: "index values start at 1"
 3361|   232k|        AVIF_CHECKRES(avifCheckItemID("iref", fromID, diag));
  ------------------
  |  |   54|   232k|    do {                                  \
  |  |   55|   232k|        const avifResult result__ = (A);  \
  |  |   56|   232k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 232k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|   232k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 232k]
  |  |  ------------------
  ------------------
 3362|       |
 3363|   232k|        avifDecoderItem * item;
 3364|   232k|        AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, fromID, &item));
  ------------------
  |  |   54|   232k|    do {                                  \
  |  |   55|   232k|        const avifResult result__ = (A);  \
  |  |   56|   232k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 232k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   232k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 232k]
  |  |  ------------------
  ------------------
 3365|   232k|        if (!memcmp(irefHeader.type, "dimg", 4)) {
  ------------------
  |  Branch (3365:13): [True: 81.4k, False: 151k]
  ------------------
 3366|  81.4k|            if (item->hasDimgFrom) {
  ------------------
  |  Branch (3366:17): [True: 1, False: 81.4k]
  ------------------
 3367|       |                // ISO/IEC 23008-12 (HEIF) 6.6.1: The number of SingleItemTypeReferenceBoxes with the box type 'dimg'
 3368|       |                // and with the same value of from_item_ID shall not be greater than 1.
 3369|      1|                avifDiagnosticsPrintf(diag, "Box[iinf] contains duplicate boxes of type 'dimg' with the same from_item_ID value %u", fromID);
 3370|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3371|      1|            }
 3372|  81.4k|            item->hasDimgFrom = AVIF_TRUE;
  ------------------
  |  |   88|  81.4k|#define AVIF_TRUE 1
  ------------------
 3373|  81.4k|        }
 3374|       |
 3375|   232k|        uint16_t referenceCount = 0;
 3376|   232k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &referenceCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) reference_count;
  ------------------
  |  |   45|   232k|    do {                        \
  |  |   46|   232k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 13, False: 232k]
  |  |  ------------------
  |  |   47|     13|            avifBreakOnError(); \
  |  |   48|     13|            return ERR;         \
  |  |   49|     13|        }                       \
  |  |   50|   232k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 232k]
  |  |  ------------------
  ------------------
 3377|       |
 3378|   605k|        for (uint16_t refIndex = 0; refIndex < referenceCount; ++refIndex) {
  ------------------
  |  Branch (3378:37): [True: 372k, False: 232k]
  ------------------
 3379|   372k|            uint32_t toID = 0;
 3380|   372k|            if (version == 0) {
  ------------------
  |  Branch (3380:17): [True: 372k, False: 323]
  ------------------
 3381|   372k|                uint16_t tmp;
 3382|   372k|                AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) to_item_ID;
  ------------------
  |  |   45|   372k|    do {                        \
  |  |   46|   372k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 9, False: 372k]
  |  |  ------------------
  |  |   47|      9|            avifBreakOnError(); \
  |  |   48|      9|            return ERR;         \
  |  |   49|      9|        }                       \
  |  |   50|   372k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 372k]
  |  |  ------------------
  ------------------
 3383|   372k|                toID = tmp;
 3384|   372k|            } else {
 3385|       |                // version == 1
 3386|    323|                AVIF_CHECKERR(avifROStreamReadU32(&s, &toID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) to_item_ID;
  ------------------
  |  |   45|    323|    do {                        \
  |  |   46|    323|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 55, False: 268]
  |  |  ------------------
  |  |   47|     55|            avifBreakOnError(); \
  |  |   48|     55|            return ERR;         \
  |  |   49|     55|        }                       \
  |  |   50|    323|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 268]
  |  |  ------------------
  ------------------
 3387|    323|            }
 3388|   372k|            AVIF_CHECKRES(avifCheckItemID("iref", toID, diag));
  ------------------
  |  |   54|   372k|    do {                                  \
  |  |   55|   372k|        const avifResult result__ = (A);  \
  |  |   56|   372k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 20, False: 372k]
  |  |  ------------------
  |  |   57|     20|            avifBreakOnError();           \
  |  |   58|     20|            return result__;              \
  |  |   59|     20|        }                                 \
  |  |   60|   372k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 372k]
  |  |  ------------------
  ------------------
 3389|       |
 3390|       |            // Read this reference as "{fromID} is a {irefType} for {toID}"
 3391|   372k|            if (!memcmp(irefHeader.type, "thmb", 4)) {
  ------------------
  |  Branch (3391:17): [True: 0, False: 372k]
  ------------------
 3392|      0|                item->thumbnailForID = toID;
 3393|   372k|            } else if (!memcmp(irefHeader.type, "auxl", 4)) {
  ------------------
  |  Branch (3393:24): [True: 118k, False: 253k]
  ------------------
 3394|   118k|                item->auxForID = toID;
 3395|   253k|            } else if (!memcmp(irefHeader.type, "cdsc", 4)) {
  ------------------
  |  Branch (3395:24): [True: 339, False: 253k]
  ------------------
 3396|    339|                item->descForID = toID;
 3397|   253k|            } else if (!memcmp(irefHeader.type, "dimg", 4)) {
  ------------------
  |  Branch (3397:24): [True: 212k, False: 41.0k]
  ------------------
 3398|       |                // derived images refer in the opposite direction
 3399|   212k|                avifDecoderItem * dimg;
 3400|   212k|                AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, toID, &dimg));
  ------------------
  |  |   54|   212k|    do {                                  \
  |  |   55|   212k|        const avifResult result__ = (A);  \
  |  |   56|   212k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 212k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   212k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 212k]
  |  |  ------------------
  ------------------
 3401|       |
 3402|       |                // Section 8.11.12.1 of ISO/IEC 14496-12:
 3403|       |                //   The items linked to are then represented by an array of to_item_IDs;
 3404|       |                //   within a given array, a given value shall occur at most once.
 3405|   212k|                AVIF_CHECKERR(dimg->dimgForID != fromID, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|   212k|    do {                        \
  |  |   46|   212k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 212k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   212k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 212k]
  |  |  ------------------
  ------------------
 3406|       |                // A given value may occur within multiple arrays but this is not supported by libavif.
 3407|   212k|                AVIF_CHECKERR(dimg->dimgForID == 0, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|   212k|    do {                        \
  |  |   46|   212k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 212k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   212k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 212k]
  |  |  ------------------
  ------------------
 3408|   212k|                dimg->dimgForID = fromID;
 3409|   212k|                dimg->dimgIdx = refIndex;
 3410|   212k|            } else if (!memcmp(irefHeader.type, "prem", 4)) {
  ------------------
  |  Branch (3410:24): [True: 0, False: 41.0k]
  ------------------
 3411|      0|                item->premByID = toID;
 3412|      0|            }
 3413|   372k|        }
 3414|   232k|    }
 3415|       |
 3416|   143k|    return AVIF_RESULT_OK;
 3417|   143k|}
read.c:avifParseGroupsListBox:
 3420|  53.2k|{
 3421|  53.2k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[grpl]");
  ------------------
  |  |  738|  53.2k|    avifROStream VARNAME;                               \
  |  |  739|  53.2k|    avifROData VARNAME##_roData;                        \
  |  |  740|  53.2k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  53.2k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  53.2k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3422|       |
 3423|   106k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3423:12): [True: 52.9k, False: 53.2k]
  ------------------
 3424|  52.9k|        avifBoxHeader groupHeader;
 3425|  52.9k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &groupHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  52.9k|    do {                        \
  |  |   46|  52.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 52.9k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  52.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 52.9k]
  |  |  ------------------
  ------------------
 3426|       |        // We don't check the flag or version as they depend on the grouping type (and for simplicity).
 3427|       |        // ISO/IEC 14496-12:2024 Section 8.15.3.2
 3428|       |        //   version shall be 0 unless defined otherwise for the grouping_type. Any values of flags such that
 3429|       |        //   (flags & 0x000FFF) is not equal to 0 are reserved. The values of flags shall be such that (flags
 3430|       |        //   & 0xFFF000) is equal to 0 unless defined otherwise for the grouping_type.
 3431|  52.9k|        AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, NULL, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  52.9k|    do {                        \
  |  |   46|  52.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 52.9k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  52.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 52.9k]
  |  |  ------------------
  ------------------
 3432|       |
 3433|  52.9k|        avifEntityToGroup * group = avifArrayPush(&meta->entityToGroups);
 3434|  52.9k|        AVIF_CHECKERR(group != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  52.9k|    do {                        \
  |  |   46|  52.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 52.9k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  52.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 52.9k]
  |  |  ------------------
  ------------------
 3435|  52.9k|        AVIF_CHECKERR(avifArrayCreate(&group->entityIDs, sizeof(uint32_t), 2), AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  52.9k|    do {                        \
  |  |   46|  52.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 52.9k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  52.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 52.9k]
  |  |  ------------------
  ------------------
 3436|       |
 3437|  52.9k|        memcpy(group->groupingType, groupHeader.type, 4);
 3438|  52.9k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &group->groupID), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  52.9k|    do {                        \
  |  |   46|  52.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 52.9k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  52.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 52.9k]
  |  |  ------------------
  ------------------
 3439|  52.9k|        uint32_t numEntitiesInGroup;
 3440|  52.9k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &numEntitiesInGroup), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  52.9k|    do {                        \
  |  |   46|  52.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 52.9k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  52.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 52.9k]
  |  |  ------------------
  ------------------
 3441|   158k|        for (uint32_t i = 0; i < numEntitiesInGroup; ++i) {
  ------------------
  |  Branch (3441:30): [True: 105k, False: 52.9k]
  ------------------
 3442|   105k|            uint32_t * entityId = avifArrayPush(&group->entityIDs);
 3443|   105k|            AVIF_CHECKERR(entityId != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   105k|    do {                        \
  |  |   46|   105k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 105k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   105k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 105k]
  |  |  ------------------
  ------------------
 3444|   105k|            AVIF_CHECKERR(avifROStreamReadU32(&s, entityId), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   105k|    do {                        \
  |  |   46|   105k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 20, False: 105k]
  |  |  ------------------
  |  |   47|     20|            avifBreakOnError(); \
  |  |   48|     20|            return ERR;         \
  |  |   49|     20|        }                       \
  |  |   50|   105k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 105k]
  |  |  ------------------
  ------------------
 3445|   105k|        }
 3446|  52.9k|    }
 3447|       |
 3448|  53.2k|    return AVIF_RESULT_OK;
 3449|  53.2k|}
read.c:avifParseMovieBox:
 4025|  32.8k|{
 4026|  32.8k|    BEGIN_STREAM(s, raw, rawLen, data->diag, "Box[moov]");
  ------------------
  |  |  738|  32.8k|    avifROStream VARNAME;                               \
  |  |  739|  32.8k|    avifROData VARNAME##_roData;                        \
  |  |  740|  32.8k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  32.8k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  32.8k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4027|       |
 4028|  32.8k|    avifBool hasTrak = AVIF_FALSE;
  ------------------
  |  |   89|  32.8k|#define AVIF_FALSE 0
  ------------------
 4029|   125k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (4029:12): [True: 93.3k, False: 32.5k]
  ------------------
 4030|  93.3k|        avifBoxHeader header;
 4031|  93.3k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  93.3k|    do {                        \
  |  |   46|  93.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 32, False: 93.3k]
  |  |  ------------------
  |  |   47|     32|            avifBreakOnError(); \
  |  |   48|     32|            return ERR;         \
  |  |   49|     32|        }                       \
  |  |   50|  93.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 93.3k]
  |  |  ------------------
  ------------------
 4032|       |
 4033|  93.3k|        if (!memcmp(header.type, "trak", 4)) {
  ------------------
  |  Branch (4033:13): [True: 43.3k, False: 49.9k]
  ------------------
 4034|  43.3k|            AVIF_CHECKRES(avifParseTrackBox(data, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size));
  ------------------
  |  |   54|  43.3k|    do {                                  \
  |  |   55|  43.3k|        const avifResult result__ = (A);  \
  |  |   56|  43.3k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 276, False: 43.0k]
  |  |  ------------------
  |  |   57|    276|            avifBreakOnError();           \
  |  |   58|    276|            return result__;              \
  |  |   59|    276|        }                                 \
  |  |   60|  43.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 43.0k]
  |  |  ------------------
  ------------------
 4035|  43.0k|            hasTrak = AVIF_TRUE;
  ------------------
  |  |   88|  43.0k|#define AVIF_TRUE 1
  ------------------
 4036|       |
 4037|  43.0k|            const avifTrack * track = &data->tracks.track[data->tracks.count - 1];
 4038|  43.0k|            if (!memcmp(track->handlerType, "pict", 4) || !memcmp(track->handlerType, "vide", 4) ||
  ------------------
  |  Branch (4038:17): [True: 15.4k, False: 27.6k]
  |  Branch (4038:59): [True: 0, False: 27.6k]
  ------------------
 4039|  27.6k|                !memcmp(track->handlerType, "auxv", 4)) {
  ------------------
  |  Branch (4039:17): [True: 2.22k, False: 25.4k]
  ------------------
 4040|  17.6k|                if ((track->width == 0) || (track->height == 0)) {
  ------------------
  |  Branch (4040:21): [True: 3, False: 17.6k]
  |  Branch (4040:44): [True: 1, False: 17.6k]
  ------------------
 4041|      4|                    avifDiagnosticsPrintf(data->diag, "Track ID [%u] has an invalid size [%ux%u]", track->id, track->width, track->height);
 4042|      4|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 4043|      4|                }
 4044|  17.6k|                if (avifDimensionsTooLarge(track->width, track->height, imageSizeLimit, imageDimensionLimit)) {
  ------------------
  |  Branch (4044:21): [True: 2, False: 17.6k]
  ------------------
 4045|      2|                    avifDiagnosticsPrintf(data->diag,
 4046|      2|                                          "Track ID [%u] dimensions are too large [%ux%u]",
 4047|      2|                                          track->id,
 4048|      2|                                          track->width,
 4049|      2|                                          track->height);
 4050|      2|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 4051|      2|                }
 4052|  17.6k|            }
 4053|  43.0k|        }
 4054|       |
 4055|  93.0k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  93.0k|    do {                        \
  |  |   46|  93.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 93.0k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  93.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 93.0k]
  |  |  ------------------
  ------------------
 4056|  93.0k|    }
 4057|  32.5k|    if (!hasTrak) {
  ------------------
  |  Branch (4057:9): [True: 2, False: 32.5k]
  ------------------
 4058|      2|        avifDiagnosticsPrintf(data->diag, "moov box does not contain any tracks");
 4059|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 4060|      2|    }
 4061|  32.5k|    return AVIF_RESULT_OK;
 4062|  32.5k|}
read.c:avifParseTrackBox:
 3940|  43.3k|{
 3941|  43.3k|    BEGIN_STREAM(s, raw, rawLen, data->diag, "Box[trak]");
  ------------------
  |  |  738|  43.3k|    avifROStream VARNAME;                               \
  |  |  739|  43.3k|    avifROData VARNAME##_roData;                        \
  |  |  740|  43.3k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  43.3k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  43.3k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3942|       |
 3943|  43.3k|    avifTrack * track = avifDecoderDataCreateTrack(data);
 3944|  43.3k|    AVIF_CHECKERR(track != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  43.3k|    do {                        \
  |  |   46|  43.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 43.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  43.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 43.3k]
  |  |  ------------------
  ------------------
 3945|       |
 3946|  43.3k|    avifBool edtsBoxSeen = AVIF_FALSE;
  ------------------
  |  |   89|  43.3k|#define AVIF_FALSE 0
  ------------------
 3947|  43.3k|    avifBool tkhdSeen = AVIF_FALSE;
  ------------------
  |  |   89|  43.3k|#define AVIF_FALSE 0
  ------------------
 3948|   169k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3948:12): [True: 126k, False: 43.0k]
  ------------------
 3949|   126k|        avifBoxHeader header;
 3950|   126k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   126k|    do {                        \
  |  |   46|   126k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 34, False: 126k]
  |  |  ------------------
  |  |   47|     34|            avifBreakOnError(); \
  |  |   48|     34|            return ERR;         \
  |  |   49|     34|        }                       \
  |  |   50|   126k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 126k]
  |  |  ------------------
  ------------------
 3951|       |
 3952|   126k|        if (!memcmp(header.type, "tkhd", 4)) {
  ------------------
  |  Branch (3952:13): [True: 43.3k, False: 83.1k]
  ------------------
 3953|  43.3k|            if (tkhdSeen) {
  ------------------
  |  Branch (3953:17): [True: 0, False: 43.3k]
  ------------------
 3954|      0|                avifDiagnosticsPrintf(data->diag, "Box[trak] contains a duplicate unique box of type 'tkhd'");
 3955|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3956|      0|            }
 3957|  43.3k|            AVIF_CHECKERR(avifParseTrackHeaderBox(track, avifROStreamCurrent(&s), header.size, data->diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  43.3k|    do {                        \
  |  |   46|  43.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 18, False: 43.2k]
  |  |  ------------------
  |  |   47|     18|            avifBreakOnError(); \
  |  |   48|     18|            return ERR;         \
  |  |   49|     18|        }                       \
  |  |   50|  43.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 43.2k]
  |  |  ------------------
  ------------------
 3958|  43.2k|            tkhdSeen = AVIF_TRUE;
  ------------------
  |  |   88|  43.2k|#define AVIF_TRUE 1
  ------------------
 3959|  83.1k|        } else if (!memcmp(header.type, "meta", 4)) {
  ------------------
  |  Branch (3959:20): [True: 75, False: 83.0k]
  ------------------
 3960|     75|            AVIF_CHECKRES(
  ------------------
  |  |   54|     75|    do {                                  \
  |  |   55|     75|        const avifResult result__ = (A);  \
  |  |   56|     75|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 74]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|     75|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 74]
  |  |  ------------------
  ------------------
 3961|     75|                avifParseMetaBox(track->meta, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, data->diag));
 3962|  83.0k|        } else if (!memcmp(header.type, "mdia", 4)) {
  ------------------
  |  Branch (3962:20): [True: 42.0k, False: 41.0k]
  ------------------
 3963|  42.0k|            AVIF_CHECKRES(avifParseMediaBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, data->diag));
  ------------------
  |  |   54|  42.0k|    do {                                  \
  |  |   55|  42.0k|        const avifResult result__ = (A);  \
  |  |   56|  42.0k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 165, False: 41.8k]
  |  |  ------------------
  |  |   57|    165|            avifBreakOnError();           \
  |  |   58|    165|            return result__;              \
  |  |   59|    165|        }                                 \
  |  |   60|  42.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 41.8k]
  |  |  ------------------
  ------------------
 3964|  42.0k|        } else if (!memcmp(header.type, "tref", 4)) {
  ------------------
  |  Branch (3964:20): [True: 2.78k, False: 38.2k]
  ------------------
 3965|  2.78k|            AVIF_CHECKERR(avifTrackReferenceBox(track, avifROStreamCurrent(&s), header.size, data->diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  2.78k|    do {                        \
  |  |   46|  2.78k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 9, False: 2.77k]
  |  |  ------------------
  |  |   47|      9|            avifBreakOnError(); \
  |  |   48|      9|            return ERR;         \
  |  |   49|      9|        }                       \
  |  |   50|  2.78k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2.77k]
  |  |  ------------------
  ------------------
 3966|  38.2k|        } else if (!memcmp(header.type, "edts", 4)) {
  ------------------
  |  Branch (3966:20): [True: 18.3k, False: 19.9k]
  ------------------
 3967|  18.3k|            if (edtsBoxSeen) {
  ------------------
  |  Branch (3967:17): [True: 1, False: 18.3k]
  ------------------
 3968|      1|                avifDiagnosticsPrintf(data->diag, "Box[trak] contains a duplicate unique box of type 'edts'");
 3969|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3970|      1|            }
 3971|  18.3k|            AVIF_CHECKERR(avifParseEditBox(track, avifROStreamCurrent(&s), header.size, data->diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  18.3k|    do {                        \
  |  |   46|  18.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 45, False: 18.2k]
  |  |  ------------------
  |  |   47|     45|            avifBreakOnError(); \
  |  |   48|     45|            return ERR;         \
  |  |   49|     45|        }                       \
  |  |   50|  18.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 18.2k]
  |  |  ------------------
  ------------------
 3972|  18.2k|            edtsBoxSeen = AVIF_TRUE;
  ------------------
  |  |   88|  18.2k|#define AVIF_TRUE 1
  ------------------
 3973|  18.2k|        }
 3974|       |
 3975|   126k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   126k|    do {                        \
  |  |   46|   126k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 126k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   126k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 126k]
  |  |  ------------------
  ------------------
 3976|   126k|    }
 3977|  43.0k|    if (!tkhdSeen) {
  ------------------
  |  Branch (3977:9): [True: 2, False: 43.0k]
  ------------------
 3978|      2|        avifDiagnosticsPrintf(data->diag, "Box[trak] does not contain a mandatory [tkhd] box");
 3979|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3980|      2|    }
 3981|  43.0k|    if (!edtsBoxSeen) {
  ------------------
  |  Branch (3981:9): [True: 24.8k, False: 18.1k]
  ------------------
 3982|  24.8k|        track->repetitionCount = AVIF_REPETITION_COUNT_UNKNOWN;
  ------------------
  |  |  122|  24.8k|#define AVIF_REPETITION_COUNT_UNKNOWN -2
  ------------------
 3983|  24.8k|    } else if (track->isRepeating) {
  ------------------
  |  Branch (3983:16): [True: 7.29k, False: 10.8k]
  ------------------
 3984|  7.29k|        if (track->trackDuration == AVIF_INDEFINITE_DURATION64) {
  ------------------
  |  |  828|  7.29k|#define AVIF_INDEFINITE_DURATION64 UINT64_MAX
  ------------------
  |  Branch (3984:13): [True: 2.13k, False: 5.15k]
  ------------------
 3985|       |            // If isRepeating is true and the track duration is unknown/indefinite, then set the repetition count to infinite
 3986|       |            // (Section 9.6.1 of ISO/IEC 23008-12 Part 12).
 3987|  2.13k|            track->repetitionCount = AVIF_REPETITION_COUNT_INFINITE;
  ------------------
  |  |  119|  2.13k|#define AVIF_REPETITION_COUNT_INFINITE -1
  ------------------
 3988|  5.15k|        } else {
 3989|       |            // Section 9.6.1. of ISO/IEC 23008-12 Part 12: 1, the entire edit list is repeated a sufficient number of times to
 3990|       |            // equal the track duration.
 3991|       |            //
 3992|       |            // Since libavif uses repetitionCount (which is 0-based), we subtract the value by 1 to derive the number of
 3993|       |            // repetitions.
 3994|  5.15k|            AVIF_ASSERT_OR_RETURN(track->segmentDuration != 0);
  ------------------
  |  |   64|  5.15k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  5.15k|    do {                        \
  |  |  |  |   46|  5.15k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 5.15k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  5.15k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 5.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3995|       |            // We specifically check for trackDuration == 0 here and not when it is actually read in order to accept files which
 3996|       |            // inadvertently has a trackDuration of 0 without any edit lists.
 3997|  5.15k|            if (track->trackDuration == 0) {
  ------------------
  |  Branch (3997:17): [True: 1, False: 5.15k]
  ------------------
 3998|      1|                avifDiagnosticsPrintf(data->diag, "Invalid track duration 0.");
 3999|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 4000|      1|            }
 4001|  5.15k|            const uint64_t repetitionCount =
 4002|  5.15k|                (track->trackDuration / track->segmentDuration) + (track->trackDuration % track->segmentDuration != 0) - 1;
 4003|  5.15k|            if (repetitionCount > INT_MAX) {
  ------------------
  |  Branch (4003:17): [True: 1.60k, False: 3.55k]
  ------------------
 4004|       |                // repetitionCount does not fit in an integer and hence it is
 4005|       |                // likely to be a very large value. So, we just set it to
 4006|       |                // infinite.
 4007|  1.60k|                track->repetitionCount = AVIF_REPETITION_COUNT_INFINITE;
  ------------------
  |  |  119|  1.60k|#define AVIF_REPETITION_COUNT_INFINITE -1
  ------------------
 4008|  3.55k|            } else {
 4009|  3.55k|                track->repetitionCount = (int)repetitionCount;
 4010|  3.55k|            }
 4011|  5.15k|        }
 4012|  10.8k|    } else {
 4013|  10.8k|        track->repetitionCount = 0;
 4014|  10.8k|    }
 4015|       |
 4016|  43.0k|    return AVIF_RESULT_OK;
 4017|  43.0k|}
read.c:avifDecoderDataCreateTrack:
 1071|  43.3k|{
 1072|  43.3k|    avifTrack * track = (avifTrack *)avifArrayPush(&data->tracks);
 1073|  43.3k|    if (track == NULL) {
  ------------------
  |  Branch (1073:9): [True: 0, False: 43.3k]
  ------------------
 1074|      0|        return NULL;
 1075|      0|    }
 1076|  43.3k|    track->meta = avifMetaCreate();
 1077|  43.3k|    if (track->meta == NULL) {
  ------------------
  |  Branch (1077:9): [True: 0, False: 43.3k]
  ------------------
 1078|      0|        avifArrayPop(&data->tracks);
 1079|      0|        return NULL;
 1080|      0|    }
 1081|  43.3k|    return track;
 1082|  43.3k|}
read.c:avifParseTrackHeaderBox:
 3519|  43.3k|{
 3520|  43.3k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[tkhd]");
  ------------------
  |  |  738|  43.3k|    avifROStream VARNAME;                               \
  |  |  739|  43.3k|    avifROData VARNAME##_roData;                        \
  |  |  740|  43.3k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  43.3k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  43.3k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3521|       |
 3522|  43.3k|    uint8_t version;
 3523|  43.3k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, NULL));
  ------------------
  |  |   36|  43.3k|    do {                        \
  |  |   37|  43.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 43.3k]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|  43.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 43.3k]
  |  |  ------------------
  ------------------
 3524|       |
 3525|  43.3k|    uint32_t ignored32, trackID;
 3526|  43.3k|    uint64_t ignored64;
 3527|  43.3k|    if (version == 1) {
  ------------------
  |  Branch (3527:9): [True: 27.9k, False: 15.3k]
  ------------------
 3528|  27.9k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));            // unsigned int(64) creation_time;
  ------------------
  |  |   36|  27.9k|    do {                        \
  |  |   37|  27.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.9k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.9k]
  |  |  ------------------
  ------------------
 3529|  27.9k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));            // unsigned int(64) modification_time;
  ------------------
  |  |   36|  27.9k|    do {                        \
  |  |   37|  27.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.9k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.9k]
  |  |  ------------------
  ------------------
 3530|  27.9k|        AVIF_CHECK(avifROStreamReadU32(&s, &trackID));              // unsigned int(32) track_ID;
  ------------------
  |  |   36|  27.9k|    do {                        \
  |  |   37|  27.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.9k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.9k]
  |  |  ------------------
  ------------------
 3531|  27.9k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));            // const unsigned int(32) reserved = 0;
  ------------------
  |  |   36|  27.9k|    do {                        \
  |  |   37|  27.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.9k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.9k]
  |  |  ------------------
  ------------------
 3532|  27.9k|        AVIF_CHECK(avifROStreamReadU64(&s, &track->trackDuration)); // unsigned int(64) duration;
  ------------------
  |  |   36|  27.9k|    do {                        \
  |  |   37|  27.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.9k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.9k]
  |  |  ------------------
  ------------------
 3533|  27.9k|    } else if (version == 0) {
  ------------------
  |  Branch (3533:16): [True: 15.3k, False: 1]
  ------------------
 3534|  15.3k|        uint32_t trackDuration;
 3535|  15.3k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));     // unsigned int(32) creation_time;
  ------------------
  |  |   36|  15.3k|    do {                        \
  |  |   37|  15.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 15.3k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  15.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 3536|  15.3k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));     // unsigned int(32) modification_time;
  ------------------
  |  |   36|  15.3k|    do {                        \
  |  |   37|  15.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 15.3k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  15.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 3537|  15.3k|        AVIF_CHECK(avifROStreamReadU32(&s, &trackID));       // unsigned int(32) track_ID;
  ------------------
  |  |   36|  15.3k|    do {                        \
  |  |   37|  15.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 15.3k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  15.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 3538|  15.3k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));     // const unsigned int(32) reserved = 0;
  ------------------
  |  |   36|  15.3k|    do {                        \
  |  |   37|  15.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 15.3k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  15.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 3539|  15.3k|        AVIF_CHECK(avifROStreamReadU32(&s, &trackDuration)); // unsigned int(32) duration;
  ------------------
  |  |   36|  15.3k|    do {                        \
  |  |   37|  15.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 15.3k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  15.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 3540|  15.3k|        track->trackDuration = (trackDuration == AVIF_INDEFINITE_DURATION32) ? AVIF_INDEFINITE_DURATION64 : trackDuration;
  ------------------
  |  |  829|  15.3k|#define AVIF_INDEFINITE_DURATION32 UINT32_MAX
  ------------------
                      track->trackDuration = (trackDuration == AVIF_INDEFINITE_DURATION32) ? AVIF_INDEFINITE_DURATION64 : trackDuration;
  ------------------
  |  |  828|  15.3k|#define AVIF_INDEFINITE_DURATION64 UINT64_MAX
  ------------------
  |  Branch (3540:32): [True: 1, False: 15.3k]
  ------------------
 3541|  15.3k|    } else {
 3542|       |        // Unsupported version
 3543|      1|        avifDiagnosticsPrintf(diag, "Box[tkhd] has an unsupported version [%u]", version);
 3544|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3545|      1|    }
 3546|  43.2k|    track->id = trackID;
 3547|       |
 3548|       |    // Skipping the following 52 bytes here:
 3549|       |    // ------------------------------------
 3550|       |    // const unsigned int(32)[2] reserved = 0;
 3551|       |    // template int(16) layer = 0;
 3552|       |    // template int(16) alternate_group = 0;
 3553|       |    // template int(16) volume = {if track_is_audio 0x0100 else 0};
 3554|       |    // const unsigned int(16) reserved = 0;
 3555|       |    // template int(32)[9] matrix= { 0x00010000,0,0,0,0x00010000,0,0,0,0x40000000 }; // unity matrix
 3556|  43.2k|    AVIF_CHECK(avifROStreamSkip(&s, 52));
  ------------------
  |  |   36|  43.2k|    do {                        \
  |  |   37|  43.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 43.2k]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|  43.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 43.2k]
  |  |  ------------------
  ------------------
 3557|       |
 3558|  43.2k|    uint32_t width, height;
 3559|  43.2k|    AVIF_CHECK(avifROStreamReadU32(&s, &width));  // unsigned int(32) width;
  ------------------
  |  |   36|  43.2k|    do {                        \
  |  |   37|  43.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 43.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  43.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 43.2k]
  |  |  ------------------
  ------------------
 3560|  43.2k|    AVIF_CHECK(avifROStreamReadU32(&s, &height)); // unsigned int(32) height;
  ------------------
  |  |   36|  43.2k|    do {                        \
  |  |   37|  43.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 43.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  43.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 43.2k]
  |  |  ------------------
  ------------------
 3561|  43.2k|    track->width = width >> 16;
 3562|  43.2k|    track->height = height >> 16;
 3563|       |
 3564|       |    // TODO: support scaling based on width/height track header info?
 3565|       |
 3566|  43.2k|    return AVIF_TRUE;
  ------------------
  |  |   88|  43.2k|#define AVIF_TRUE 1
  ------------------
 3567|  43.2k|}
read.c:avifParseMediaBox:
 3827|  42.0k|{
 3828|  42.0k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[mdia]");
  ------------------
  |  |  738|  42.0k|    avifROStream VARNAME;                               \
  |  |  739|  42.0k|    avifROData VARNAME##_roData;                        \
  |  |  740|  42.0k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  42.0k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  42.0k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3829|       |
 3830|   168k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3830:12): [True: 126k, False: 41.8k]
  ------------------
 3831|   126k|        avifBoxHeader header;
 3832|   126k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   126k|    do {                        \
  |  |   46|   126k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 7, False: 126k]
  |  |  ------------------
  |  |   47|      7|            avifBreakOnError(); \
  |  |   48|      7|            return ERR;         \
  |  |   49|      7|        }                       \
  |  |   50|   126k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 126k]
  |  |  ------------------
  ------------------
 3833|       |
 3834|   126k|        if (!memcmp(header.type, "mdhd", 4)) {
  ------------------
  |  Branch (3834:13): [True: 17.8k, False: 108k]
  ------------------
 3835|  17.8k|            AVIF_CHECKERR(avifParseMediaHeaderBox(track, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  17.8k|    do {                        \
  |  |   46|  17.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 10, False: 17.8k]
  |  |  ------------------
  |  |   47|     10|            avifBreakOnError(); \
  |  |   48|     10|            return ERR;         \
  |  |   49|     10|        }                       \
  |  |   50|  17.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 17.8k]
  |  |  ------------------
  ------------------
 3836|   108k|        } else if (!memcmp(header.type, "minf", 4)) {
  ------------------
  |  Branch (3836:20): [True: 40.5k, False: 68.0k]
  ------------------
 3837|  40.5k|            AVIF_CHECKRES(
  ------------------
  |  |   54|  40.5k|    do {                                  \
  |  |   55|  40.5k|        const avifResult result__ = (A);  \
  |  |   56|  40.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 146, False: 40.4k]
  |  |  ------------------
  |  |   57|    146|            avifBreakOnError();           \
  |  |   58|    146|            return result__;              \
  |  |   59|    146|        }                                 \
  |  |   60|  40.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 40.4k]
  |  |  ------------------
  ------------------
 3838|  40.5k|                avifParseMediaInformationBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
 3839|  68.0k|        } else if (!memcmp(header.type, "hdlr", 4)) {
  ------------------
  |  Branch (3839:20): [True: 25.9k, False: 42.0k]
  ------------------
 3840|  25.9k|            AVIF_CHECKERR(avifParseHandlerBox(avifROStreamCurrent(&s), header.size, track->handlerType, diag),
  ------------------
  |  |   45|  25.9k|    do {                        \
  |  |   46|  25.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 25.9k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  25.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 25.9k]
  |  |  ------------------
  ------------------
 3841|  25.9k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3842|  25.9k|        }
 3843|       |
 3844|   126k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   126k|    do {                        \
  |  |   46|   126k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 126k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   126k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 126k]
  |  |  ------------------
  ------------------
 3845|   126k|    }
 3846|  41.8k|    return AVIF_RESULT_OK;
 3847|  42.0k|}
read.c:avifParseMediaHeaderBox:
 3570|  17.8k|{
 3571|  17.8k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[mdhd]");
  ------------------
  |  |  738|  17.8k|    avifROStream VARNAME;                               \
  |  |  739|  17.8k|    avifROData VARNAME##_roData;                        \
  |  |  740|  17.8k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  17.8k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  17.8k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3572|       |
 3573|  17.8k|    uint8_t version;
 3574|  17.8k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, NULL));
  ------------------
  |  |   36|  17.8k|    do {                        \
  |  |   37|  17.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 17.8k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  17.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 17.8k]
  |  |  ------------------
  ------------------
 3575|       |
 3576|  17.8k|    uint32_t ignored32, mediaTimescale, mediaDuration32;
 3577|  17.8k|    uint64_t ignored64, mediaDuration64;
 3578|  17.8k|    if (version == 1) {
  ------------------
  |  Branch (3578:9): [True: 5.20k, False: 12.6k]
  ------------------
 3579|  5.20k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));       // unsigned int(64) creation_time;
  ------------------
  |  |   36|  5.20k|    do {                        \
  |  |   37|  5.20k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 5.20k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  5.20k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 5.20k]
  |  |  ------------------
  ------------------
 3580|  5.20k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));       // unsigned int(64) modification_time;
  ------------------
  |  |   36|  5.20k|    do {                        \
  |  |   37|  5.20k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 5.20k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  5.20k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 5.20k]
  |  |  ------------------
  ------------------
 3581|  5.20k|        AVIF_CHECK(avifROStreamReadU32(&s, &mediaTimescale));  // unsigned int(32) timescale;
  ------------------
  |  |   36|  5.20k|    do {                        \
  |  |   37|  5.20k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 5.20k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  5.20k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 5.20k]
  |  |  ------------------
  ------------------
 3582|  5.20k|        AVIF_CHECK(avifROStreamReadU64(&s, &mediaDuration64)); // unsigned int(64) duration;
  ------------------
  |  |   36|  5.20k|    do {                        \
  |  |   37|  5.20k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 5.19k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  5.20k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 5.19k]
  |  |  ------------------
  ------------------
 3583|  5.19k|        track->mediaDuration = mediaDuration64;
 3584|  12.6k|    } else if (version == 0) {
  ------------------
  |  Branch (3584:16): [True: 12.6k, False: 1]
  ------------------
 3585|  12.6k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));       // unsigned int(32) creation_time;
  ------------------
  |  |   36|  12.6k|    do {                        \
  |  |   37|  12.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 12.6k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  12.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.6k]
  |  |  ------------------
  ------------------
 3586|  12.6k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));       // unsigned int(32) modification_time;
  ------------------
  |  |   36|  12.6k|    do {                        \
  |  |   37|  12.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 12.6k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  12.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.6k]
  |  |  ------------------
  ------------------
 3587|  12.6k|        AVIF_CHECK(avifROStreamReadU32(&s, &mediaTimescale));  // unsigned int(32) timescale;
  ------------------
  |  |   36|  12.6k|    do {                        \
  |  |   37|  12.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 12.6k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  12.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.6k]
  |  |  ------------------
  ------------------
 3588|  12.6k|        AVIF_CHECK(avifROStreamReadU32(&s, &mediaDuration32)); // unsigned int(32) duration;
  ------------------
  |  |   36|  12.6k|    do {                        \
  |  |   37|  12.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 12.6k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  12.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.6k]
  |  |  ------------------
  ------------------
 3589|  12.6k|        track->mediaDuration = (uint64_t)mediaDuration32;
 3590|  12.6k|    } else {
 3591|       |        // Unsupported version
 3592|      1|        avifDiagnosticsPrintf(diag, "Box[mdhd] has an unsupported version [%u]", version);
 3593|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3594|      1|    }
 3595|       |
 3596|  17.8k|    track->mediaTimescale = mediaTimescale;
 3597|  17.8k|    return AVIF_TRUE;
  ------------------
  |  |   88|  17.8k|#define AVIF_TRUE 1
  ------------------
 3598|  17.8k|}
read.c:avifParseMediaInformationBox:
 3810|  40.5k|{
 3811|  40.5k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[minf]");
  ------------------
  |  |  738|  40.5k|    avifROStream VARNAME;                               \
  |  |  739|  40.5k|    avifROData VARNAME##_roData;                        \
  |  |  740|  40.5k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  40.5k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  40.5k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3812|       |
 3813|   162k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3813:12): [True: 121k, False: 40.4k]
  ------------------
 3814|   121k|        avifBoxHeader header;
 3815|   121k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   121k|    do {                        \
  |  |   46|   121k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 5, False: 121k]
  |  |  ------------------
  |  |   47|      5|            avifBreakOnError(); \
  |  |   48|      5|            return ERR;         \
  |  |   49|      5|        }                       \
  |  |   50|   121k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 121k]
  |  |  ------------------
  ------------------
 3816|       |
 3817|   121k|        if (!memcmp(header.type, "stbl", 4)) {
  ------------------
  |  Branch (3817:13): [True: 39.5k, False: 82.2k]
  ------------------
 3818|  39.5k|            AVIF_CHECKRES(avifParseSampleTableBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  39.5k|    do {                                  \
  |  |   55|  39.5k|        const avifResult result__ = (A);  \
  |  |   56|  39.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 141, False: 39.3k]
  |  |  ------------------
  |  |   57|    141|            avifBreakOnError();           \
  |  |   58|    141|            return result__;              \
  |  |   59|    141|        }                                 \
  |  |   60|  39.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 39.3k]
  |  |  ------------------
  ------------------
 3819|  39.5k|        }
 3820|       |
 3821|   121k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   121k|    do {                        \
  |  |   46|   121k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 121k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   121k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 121k]
  |  |  ------------------
  ------------------
 3822|   121k|    }
 3823|  40.4k|    return AVIF_RESULT_OK;
 3824|  40.5k|}
read.c:avifParseSampleTableBox:
 3769|  39.5k|{
 3770|  39.5k|    if (track->sampleTable) {
  ------------------
  |  Branch (3770:9): [True: 0, False: 39.5k]
  ------------------
 3771|       |        // A TrackBox may only have one SampleTable
 3772|      0|        avifDiagnosticsPrintf(diag, "Duplicate Box[stbl] for a single track detected");
 3773|      0|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3774|      0|    }
 3775|  39.5k|    track->sampleTable = avifSampleTableCreate();
 3776|  39.5k|    AVIF_CHECKERR(track->sampleTable != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  39.5k|    do {                        \
  |  |   46|  39.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 39.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  39.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 39.5k]
  |  |  ------------------
  ------------------
 3777|       |
 3778|  39.5k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stbl]");
  ------------------
  |  |  738|  39.5k|    avifROStream VARNAME;                               \
  |  |  739|  39.5k|    avifROData VARNAME##_roData;                        \
  |  |  740|  39.5k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  39.5k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  39.5k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3779|       |
 3780|   271k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3780:12): [True: 231k, False: 39.3k]
  ------------------
 3781|   231k|        avifBoxHeader header;
 3782|   231k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   231k|    do {                        \
  |  |   46|   231k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 20, False: 231k]
  |  |  ------------------
  |  |   47|     20|            avifBreakOnError(); \
  |  |   48|     20|            return ERR;         \
  |  |   49|     20|        }                       \
  |  |   50|   231k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 231k]
  |  |  ------------------
  ------------------
 3783|       |
 3784|   231k|        if (!memcmp(header.type, "stco", 4)) {
  ------------------
  |  Branch (3784:13): [True: 37.5k, False: 194k]
  ------------------
 3785|  37.5k|            AVIF_CHECKRES(avifParseChunkOffsetBox(track->sampleTable, AVIF_FALSE, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  37.5k|    do {                                  \
  |  |   55|  37.5k|        const avifResult result__ = (A);  \
  |  |   56|  37.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 20, False: 37.5k]
  |  |  ------------------
  |  |   57|     20|            avifBreakOnError();           \
  |  |   58|     20|            return result__;              \
  |  |   59|     20|        }                                 \
  |  |   60|  37.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 37.5k]
  |  |  ------------------
  ------------------
 3786|   194k|        } else if (!memcmp(header.type, "co64", 4)) {
  ------------------
  |  Branch (3786:20): [True: 0, False: 194k]
  ------------------
 3787|      0|            AVIF_CHECKRES(avifParseChunkOffsetBox(track->sampleTable, AVIF_TRUE, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|      0|    do {                                  \
  |  |   55|      0|        const avifResult result__ = (A);  \
  |  |   56|      0|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3788|   194k|        } else if (!memcmp(header.type, "stsc", 4)) {
  ------------------
  |  Branch (3788:20): [True: 38.9k, False: 155k]
  ------------------
 3789|  38.9k|            AVIF_CHECKRES(avifParseSampleToChunkBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  38.9k|    do {                                  \
  |  |   55|  38.9k|        const avifResult result__ = (A);  \
  |  |   56|  38.9k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 47, False: 38.8k]
  |  |  ------------------
  |  |   57|     47|            avifBreakOnError();           \
  |  |   58|     47|            return result__;              \
  |  |   59|     47|        }                                 \
  |  |   60|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 38.8k]
  |  |  ------------------
  ------------------
 3790|   155k|        } else if (!memcmp(header.type, "stsz", 4)) {
  ------------------
  |  Branch (3790:20): [True: 39.4k, False: 115k]
  ------------------
 3791|  39.4k|            AVIF_CHECKRES(avifParseSampleSizeBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  39.4k|    do {                                  \
  |  |   55|  39.4k|        const avifResult result__ = (A);  \
  |  |   56|  39.4k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 9, False: 39.4k]
  |  |  ------------------
  |  |   57|      9|            avifBreakOnError();           \
  |  |   58|      9|            return result__;              \
  |  |   59|      9|        }                                 \
  |  |   60|  39.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 39.4k]
  |  |  ------------------
  ------------------
 3792|   115k|        } else if (!memcmp(header.type, "stss", 4)) {
  ------------------
  |  Branch (3792:20): [True: 26.5k, False: 89.2k]
  ------------------
 3793|  26.5k|            AVIF_CHECKRES(avifParseSyncSampleBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  26.5k|    do {                                  \
  |  |   55|  26.5k|        const avifResult result__ = (A);  \
  |  |   56|  26.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 16, False: 26.5k]
  |  |  ------------------
  |  |   57|     16|            avifBreakOnError();           \
  |  |   58|     16|            return result__;              \
  |  |   59|     16|        }                                 \
  |  |   60|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
 3794|  89.2k|        } else if (!memcmp(header.type, "stts", 4)) {
  ------------------
  |  Branch (3794:20): [True: 26.7k, False: 62.4k]
  ------------------
 3795|  26.7k|            AVIF_CHECKRES(avifParseTimeToSampleBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  26.7k|    do {                                  \
  |  |   55|  26.7k|        const avifResult result__ = (A);  \
  |  |   56|  26.7k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 15, False: 26.7k]
  |  |  ------------------
  |  |   57|     15|            avifBreakOnError();           \
  |  |   58|     15|            return result__;              \
  |  |   59|     15|        }                                 \
  |  |   60|  26.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 26.7k]
  |  |  ------------------
  ------------------
 3796|  62.4k|        } else if (!memcmp(header.type, "stsd", 4)) {
  ------------------
  |  Branch (3796:20): [True: 36.4k, False: 26.0k]
  ------------------
 3797|  36.4k|            AVIF_CHECKRES(avifParseSampleDescriptionBox(track->sampleTable,
  ------------------
  |  |   54|  36.4k|    do {                                  \
  |  |   55|  36.4k|        const avifResult result__ = (A);  \
  |  |   56|  36.4k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 14, False: 36.4k]
  |  |  ------------------
  |  |   57|     14|            avifBreakOnError();           \
  |  |   58|     14|            return result__;              \
  |  |   59|     14|        }                                 \
  |  |   60|  36.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 36.4k]
  |  |  ------------------
  ------------------
 3798|  36.4k|                                                        rawOffset + avifROStreamOffset(&s),
 3799|  36.4k|                                                        avifROStreamCurrent(&s),
 3800|  36.4k|                                                        header.size,
 3801|  36.4k|                                                        diag));
 3802|  36.4k|        }
 3803|       |
 3804|   231k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   231k|    do {                        \
  |  |   46|   231k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 231k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   231k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 231k]
  |  |  ------------------
  ------------------
 3805|   231k|    }
 3806|  39.3k|    return AVIF_RESULT_OK;
 3807|  39.5k|}
read.c:avifSampleTableCreate:
  313|  39.5k|{
  314|  39.5k|    avifSampleTable * sampleTable = (avifSampleTable *)avifAlloc(sizeof(avifSampleTable));
  315|  39.5k|    if (sampleTable == NULL) {
  ------------------
  |  Branch (315:9): [True: 0, False: 39.5k]
  ------------------
  316|      0|        return NULL;
  317|      0|    }
  318|  39.5k|    memset(sampleTable, 0, sizeof(avifSampleTable));
  319|  39.5k|    if (!avifArrayCreate(&sampleTable->chunks, sizeof(avifSampleTableChunk), 16) ||
  ------------------
  |  Branch (319:9): [True: 0, False: 39.5k]
  ------------------
  320|  39.5k|        !avifArrayCreate(&sampleTable->sampleDescriptions, sizeof(avifSampleDescription), 2) ||
  ------------------
  |  Branch (320:9): [True: 0, False: 39.5k]
  ------------------
  321|  39.5k|        !avifArrayCreate(&sampleTable->sampleToChunks, sizeof(avifSampleTableSampleToChunk), 16) ||
  ------------------
  |  Branch (321:9): [True: 0, False: 39.5k]
  ------------------
  322|  39.5k|        !avifArrayCreate(&sampleTable->sampleSizes, sizeof(avifSampleTableSampleSize), 16) ||
  ------------------
  |  Branch (322:9): [True: 0, False: 39.5k]
  ------------------
  323|  39.5k|        !avifArrayCreate(&sampleTable->timeToSamples, sizeof(avifSampleTableTimeToSample), 16) ||
  ------------------
  |  Branch (323:9): [True: 0, False: 39.5k]
  ------------------
  324|  39.5k|        !avifArrayCreate(&sampleTable->syncSamples, sizeof(avifSyncSample), 16)) {
  ------------------
  |  Branch (324:9): [True: 0, False: 39.5k]
  ------------------
  325|      0|        avifSampleTableDestroy(sampleTable);
  326|      0|        return NULL;
  327|      0|    }
  328|  39.5k|    return sampleTable;
  329|  39.5k|}
read.c:avifParseChunkOffsetBox:
 3601|  37.5k|{
 3602|  37.5k|    BEGIN_STREAM(s, raw, rawLen, diag, largeOffsets ? "Box[co64]" : "Box[stco]");
  ------------------
  |  |  738|  37.5k|    avifROStream VARNAME;                               \
  |  |  739|  37.5k|    avifROData VARNAME##_roData;                        \
  |  |  740|  37.5k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  37.5k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  75.1k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  |  |  ------------------
  |  |  |  Branch (742:58): [True: 0, False: 37.5k]
  |  |  ------------------
  ------------------
 3603|       |
 3604|  37.5k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  37.5k|    do {                        \
  |  |   46|  37.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 4, False: 37.5k]
  |  |  ------------------
  |  |   47|      4|            avifBreakOnError(); \
  |  |   48|      4|            return ERR;         \
  |  |   49|      4|        }                       \
  |  |   50|  37.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 37.5k]
  |  |  ------------------
  ------------------
 3605|       |
 3606|  37.5k|    uint32_t entryCount;
 3607|  37.5k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  37.5k|    do {                        \
  |  |   46|  37.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 37.5k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  37.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 37.5k]
  |  |  ------------------
  ------------------
 3608|  74.5k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3608:26): [True: 37.0k, False: 37.5k]
  ------------------
 3609|  37.0k|        uint64_t offset;
 3610|  37.0k|        if (largeOffsets) {
  ------------------
  |  Branch (3610:13): [True: 0, False: 37.0k]
  ------------------
 3611|      0|            AVIF_CHECKERR(avifROStreamReadU64(&s, &offset), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(64) chunk_offset;
  ------------------
  |  |   45|      0|    do {                        \
  |  |   46|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3612|  37.0k|        } else {
 3613|  37.0k|            uint32_t offset32;
 3614|  37.0k|            AVIF_CHECKERR(avifROStreamReadU32(&s, &offset32), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) chunk_offset;
  ------------------
  |  |   45|  37.0k|    do {                        \
  |  |   46|  37.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 15, False: 37.0k]
  |  |  ------------------
  |  |   47|     15|            avifBreakOnError(); \
  |  |   48|     15|            return ERR;         \
  |  |   49|     15|        }                       \
  |  |   50|  37.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 37.0k]
  |  |  ------------------
  ------------------
 3615|  37.0k|            offset = (uint64_t)offset32;
 3616|  37.0k|        }
 3617|       |
 3618|  37.0k|        avifSampleTableChunk * chunk = (avifSampleTableChunk *)avifArrayPush(&sampleTable->chunks);
 3619|  37.0k|        AVIF_CHECKERR(chunk != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  37.0k|    do {                        \
  |  |   46|  37.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 37.0k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  37.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 37.0k]
  |  |  ------------------
  ------------------
 3620|  37.0k|        chunk->offset = offset;
 3621|  37.0k|    }
 3622|  37.5k|    return AVIF_RESULT_OK;
 3623|  37.5k|}
read.c:avifParseSampleToChunkBox:
 3626|  38.9k|{
 3627|  38.9k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stsc]");
  ------------------
  |  |  738|  38.9k|    avifROStream VARNAME;                               \
  |  |  739|  38.9k|    avifROData VARNAME##_roData;                        \
  |  |  740|  38.9k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  38.9k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  38.9k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3628|       |
 3629|  38.9k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  38.9k|    do {                        \
  |  |   46|  38.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 38.9k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
 3630|       |
 3631|  38.9k|    uint32_t entryCount;
 3632|  38.9k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  38.9k|    do {                        \
  |  |   46|  38.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 38.9k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  38.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 38.9k]
  |  |  ------------------
  ------------------
 3633|  38.9k|    uint32_t prevFirstChunk = 0;
 3634|  77.4k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3634:26): [True: 38.5k, False: 38.8k]
  ------------------
 3635|  38.5k|        avifSampleTableSampleToChunk * sampleToChunk = (avifSampleTableSampleToChunk *)avifArrayPush(&sampleTable->sampleToChunks);
 3636|  38.5k|        AVIF_CHECKERR(sampleToChunk != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  38.5k|    do {                        \
  |  |   46|  38.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 38.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  38.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 38.5k]
  |  |  ------------------
  ------------------
 3637|  38.5k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleToChunk->firstChunk), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) first_chunk;
  ------------------
  |  |   45|  38.5k|    do {                        \
  |  |   46|  38.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 15, False: 38.5k]
  |  |  ------------------
  |  |   47|     15|            avifBreakOnError(); \
  |  |   48|     15|            return ERR;         \
  |  |   49|     15|        }                       \
  |  |   50|  38.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 38.5k]
  |  |  ------------------
  ------------------
 3638|  38.5k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleToChunk->samplesPerChunk), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) samples_per_chunk;
  ------------------
  |  |   45|  38.5k|    do {                        \
  |  |   46|  38.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 38.5k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  38.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 38.5k]
  |  |  ------------------
  ------------------
 3639|  38.5k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleToChunk->sampleDescriptionIndex),
  ------------------
  |  |   45|  38.5k|    do {                        \
  |  |   46|  38.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 38.5k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  38.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 38.5k]
  |  |  ------------------
  ------------------
 3640|  38.5k|                      AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_description_index;
 3641|       |        // The first_chunk fields should start with 1 and be strictly increasing.
 3642|  38.5k|        if (i == 0) {
  ------------------
  |  Branch (3642:13): [True: 38.5k, False: 24]
  ------------------
 3643|  38.5k|            if (sampleToChunk->firstChunk != 1) {
  ------------------
  |  Branch (3643:17): [True: 21, False: 38.5k]
  ------------------
 3644|     21|                avifDiagnosticsPrintf(diag, "Box[stsc] does not begin with chunk 1 [%u]", sampleToChunk->firstChunk);
 3645|     21|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3646|     21|            }
 3647|  38.5k|        } else {
 3648|     24|            if (sampleToChunk->firstChunk <= prevFirstChunk) {
  ------------------
  |  Branch (3648:17): [True: 5, False: 19]
  ------------------
 3649|      5|                avifDiagnosticsPrintf(diag, "Box[stsc] chunks are not strictly increasing");
 3650|      5|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3651|      5|            }
 3652|     24|        }
 3653|  38.5k|        prevFirstChunk = sampleToChunk->firstChunk;
 3654|  38.5k|    }
 3655|  38.8k|    return AVIF_RESULT_OK;
 3656|  38.9k|}
read.c:avifParseSampleSizeBox:
 3659|  39.4k|{
 3660|  39.4k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stsz]");
  ------------------
  |  |  738|  39.4k|    avifROStream VARNAME;                               \
  |  |  739|  39.4k|    avifROData VARNAME##_roData;                        \
  |  |  740|  39.4k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  39.4k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  39.4k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3661|       |
 3662|  39.4k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  39.4k|    do {                        \
  |  |   46|  39.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 39.4k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  39.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 39.4k]
  |  |  ------------------
  ------------------
 3663|       |
 3664|  39.4k|    uint32_t allSamplesSize, sampleCount;
 3665|  39.4k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &allSamplesSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_size;
  ------------------
  |  |   45|  39.4k|    do {                        \
  |  |   46|  39.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 39.4k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  39.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 39.4k]
  |  |  ------------------
  ------------------
 3666|  39.4k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleCount), AVIF_RESULT_BMFF_PARSE_FAILED);    // unsigned int(32) sample_count;
  ------------------
  |  |   45|  39.4k|    do {                        \
  |  |   46|  39.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 39.4k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  39.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 39.4k]
  |  |  ------------------
  ------------------
 3667|       |
 3668|  39.4k|    if (allSamplesSize > 0) {
  ------------------
  |  Branch (3668:9): [True: 31.3k, False: 8.04k]
  ------------------
 3669|  31.3k|        sampleTable->allSamplesSize = allSamplesSize;
 3670|  31.3k|    } else {
 3671|  53.3k|        for (uint32_t i = 0; i < sampleCount; ++i) {
  ------------------
  |  Branch (3671:30): [True: 45.3k, False: 8.03k]
  ------------------
 3672|  45.3k|            avifSampleTableSampleSize * sampleSize = (avifSampleTableSampleSize *)avifArrayPush(&sampleTable->sampleSizes);
 3673|  45.3k|            AVIF_CHECKERR(sampleSize != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  45.3k|    do {                        \
  |  |   46|  45.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 45.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  45.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 45.3k]
  |  |  ------------------
  ------------------
 3674|  45.3k|            AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleSize->size), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_size;
  ------------------
  |  |   45|  45.3k|    do {                        \
  |  |   46|  45.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 45.3k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|  45.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 45.3k]
  |  |  ------------------
  ------------------
 3675|  45.3k|        }
 3676|  8.04k|    }
 3677|  39.4k|    return AVIF_RESULT_OK;
 3678|  39.4k|}
read.c:avifParseSyncSampleBox:
 3681|  26.5k|{
 3682|  26.5k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stss]");
  ------------------
  |  |  738|  26.5k|    avifROStream VARNAME;                               \
  |  |  739|  26.5k|    avifROData VARNAME##_roData;                        \
  |  |  740|  26.5k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  26.5k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  26.5k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3683|       |
 3684|  26.5k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  26.5k|    do {                        \
  |  |   46|  26.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 26.5k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
 3685|       |
 3686|  26.5k|    uint32_t entryCount;
 3687|  26.5k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  26.5k|    do {                        \
  |  |   46|  26.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 26.5k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  26.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 26.5k]
  |  |  ------------------
  ------------------
 3688|       |
 3689|  60.2k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3689:26): [True: 33.7k, False: 26.5k]
  ------------------
 3690|  33.7k|        uint32_t sampleNumber = 0;
 3691|  33.7k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleNumber), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_number;
  ------------------
  |  |   45|  33.7k|    do {                        \
  |  |   46|  33.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 14, False: 33.7k]
  |  |  ------------------
  |  |   47|     14|            avifBreakOnError(); \
  |  |   48|     14|            return ERR;         \
  |  |   49|     14|        }                       \
  |  |   50|  33.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 33.7k]
  |  |  ------------------
  ------------------
 3692|  33.7k|        avifSyncSample * syncSample = (avifSyncSample *)avifArrayPush(&sampleTable->syncSamples);
 3693|  33.7k|        AVIF_CHECKERR(syncSample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  33.7k|    do {                        \
  |  |   46|  33.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 33.7k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  33.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 33.7k]
  |  |  ------------------
  ------------------
 3694|  33.7k|        syncSample->sampleNumber = sampleNumber;
 3695|  33.7k|    }
 3696|  26.5k|    return AVIF_RESULT_OK;
 3697|  26.5k|}
read.c:avifParseTimeToSampleBox:
 3700|  26.7k|{
 3701|  26.7k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stts]");
  ------------------
  |  |  738|  26.7k|    avifROStream VARNAME;                               \
  |  |  739|  26.7k|    avifROData VARNAME##_roData;                        \
  |  |  740|  26.7k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  26.7k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  26.7k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3702|       |
 3703|  26.7k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  26.7k|    do {                        \
  |  |   46|  26.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 26.7k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  26.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 26.7k]
  |  |  ------------------
  ------------------
 3704|       |
 3705|  26.7k|    uint32_t entryCount;
 3706|  26.7k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  26.7k|    do {                        \
  |  |   46|  26.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 26.7k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  26.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 26.7k]
  |  |  ------------------
  ------------------
 3707|       |
 3708|  52.4k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3708:26): [True: 25.7k, False: 26.7k]
  ------------------
 3709|  25.7k|        avifSampleTableTimeToSample * timeToSample = (avifSampleTableTimeToSample *)avifArrayPush(&sampleTable->timeToSamples);
 3710|  25.7k|        AVIF_CHECKERR(timeToSample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  25.7k|    do {                        \
  |  |   46|  25.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 25.7k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 25.7k]
  |  |  ------------------
  ------------------
 3711|  25.7k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &timeToSample->sampleCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_count;
  ------------------
  |  |   45|  25.7k|    do {                        \
  |  |   46|  25.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 12, False: 25.7k]
  |  |  ------------------
  |  |   47|     12|            avifBreakOnError(); \
  |  |   48|     12|            return ERR;         \
  |  |   49|     12|        }                       \
  |  |   50|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 25.7k]
  |  |  ------------------
  ------------------
 3712|  25.7k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &timeToSample->sampleDelta), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_delta;
  ------------------
  |  |   45|  25.7k|    do {                        \
  |  |   46|  25.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 25.7k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  25.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 25.7k]
  |  |  ------------------
  ------------------
 3713|  25.7k|    }
 3714|  26.7k|    return AVIF_RESULT_OK;
 3715|  26.7k|}
read.c:avifParseSampleDescriptionBox:
 3722|  36.4k|{
 3723|  36.4k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stsd]");
  ------------------
  |  |  738|  36.4k|    avifROStream VARNAME;                               \
  |  |  739|  36.4k|    avifROData VARNAME##_roData;                        \
  |  |  740|  36.4k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  36.4k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  36.4k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3724|       |
 3725|  36.4k|    uint8_t version;
 3726|  36.4k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  36.4k|    do {                        \
  |  |   46|  36.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 36.4k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  36.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 36.4k]
  |  |  ------------------
  ------------------
 3727|       |
 3728|       |    // Section 8.5.2.3 of ISO/IEC 14496-12:
 3729|       |    //   version is set to zero. A version number of 1 shall be treated as a version of 0.
 3730|  36.4k|    if (version != 0 && version != 1) {
  ------------------
  |  Branch (3730:9): [True: 1.21k, False: 35.2k]
  |  Branch (3730:25): [True: 1, False: 1.21k]
  ------------------
 3731|      1|        avifDiagnosticsPrintf(diag, "Box[stsd]: Expecting box version 0 or 1, got version %u", version);
 3732|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3733|      1|    }
 3734|       |
 3735|  36.4k|    uint32_t entryCount;
 3736|  36.4k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  36.4k|    do {                        \
  |  |   46|  36.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 36.4k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  36.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 36.4k]
  |  |  ------------------
  ------------------
 3737|       |
 3738|  72.0k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3738:26): [True: 35.6k, False: 36.4k]
  ------------------
 3739|  35.6k|        avifBoxHeader sampleEntryHeader;
 3740|  35.6k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &sampleEntryHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  35.6k|    do {                        \
  |  |   46|  35.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 7, False: 35.5k]
  |  |  ------------------
  |  |   47|      7|            avifBreakOnError(); \
  |  |   48|      7|            return ERR;         \
  |  |   49|      7|        }                       \
  |  |   50|  35.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 35.5k]
  |  |  ------------------
  ------------------
 3741|       |
 3742|  35.5k|        avifSampleDescription * description = (avifSampleDescription *)avifArrayPush(&sampleTable->sampleDescriptions);
 3743|  35.5k|        AVIF_CHECKERR(description != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  35.5k|    do {                        \
  |  |   46|  35.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 35.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  35.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 35.5k]
  |  |  ------------------
  ------------------
 3744|  35.5k|        if (!avifArrayCreate(&description->properties, sizeof(avifProperty), 16)) {
  ------------------
  |  Branch (3744:13): [True: 0, False: 35.5k]
  ------------------
 3745|      0|            avifArrayPop(&sampleTable->sampleDescriptions);
 3746|      0|            return AVIF_RESULT_OUT_OF_MEMORY;
 3747|      0|        }
 3748|  35.5k|        memcpy(description->format, sampleEntryHeader.type, sizeof(description->format));
 3749|  35.5k|        const size_t sampleEntryBytes = sampleEntryHeader.size;
 3750|  35.5k|        if (avifGetCodecType(description->format) != AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (3750:13): [True: 33.6k, False: 1.95k]
  ------------------
 3751|  33.6k|            if (sampleEntryBytes < VISUALSAMPLEENTRY_SIZE) {
  ------------------
  |  Branch (3751:17): [True: 1, False: 33.6k]
  ------------------
 3752|      1|                avifDiagnosticsPrintf(diag, "Not enough bytes to parse VisualSampleEntry");
 3753|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3754|      1|            }
 3755|  33.6k|            AVIF_CHECKRES(avifParseItemPropertyContainerBox(&description->properties,
  ------------------
  |  |   54|  33.6k|    do {                                  \
  |  |   55|  33.6k|        const avifResult result__ = (A);  \
  |  |   56|  33.6k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 33.6k]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|  33.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 33.6k]
  |  |  ------------------
  ------------------
 3756|  33.6k|                                                            rawOffset + avifROStreamOffset(&s) + VISUALSAMPLEENTRY_SIZE,
 3757|  33.6k|                                                            avifROStreamCurrent(&s) + VISUALSAMPLEENTRY_SIZE,
 3758|  33.6k|                                                            sampleEntryBytes - VISUALSAMPLEENTRY_SIZE,
 3759|  33.6k|                                                            /*isTrack=*/AVIF_TRUE,
 3760|  33.6k|                                                            diag));
 3761|  33.6k|        }
 3762|       |
 3763|  35.5k|        AVIF_CHECKERR(avifROStreamSkip(&s, sampleEntryBytes), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  35.5k|    do {                        \
  |  |   46|  35.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 35.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  35.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 35.5k]
  |  |  ------------------
  ------------------
 3764|  35.5k|    }
 3765|  36.4k|    return AVIF_RESULT_OK;
 3766|  36.4k|}
read.c:avifGetCodecType:
   45|  2.19M|{
   46|  2.19M|    if (!memcmp(fourcc, "av01", 4)) {
  ------------------
  |  Branch (46:9): [True: 1.80M, False: 382k]
  ------------------
   47|  1.80M|        return AVIF_CODEC_TYPE_AV1;
   48|  1.80M|    }
   49|       |#if defined(AVIF_CODEC_AVM)
   50|       |    if (!memcmp(fourcc, "av02", 4)) {
   51|       |        return AVIF_CODEC_TYPE_AV2;
   52|       |    }
   53|       |#endif
   54|   382k|    return AVIF_CODEC_TYPE_UNKNOWN;
   55|  2.19M|}
read.c:avifTrackReferenceBox:
 3850|  2.78k|{
 3851|  2.78k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[tref]");
  ------------------
  |  |  738|  2.78k|    avifROStream VARNAME;                               \
  |  |  739|  2.78k|    avifROData VARNAME##_roData;                        \
  |  |  740|  2.78k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  2.78k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  2.78k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3852|       |
 3853|  5.09k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3853:12): [True: 2.32k, False: 2.77k]
  ------------------
 3854|  2.32k|        avifBoxHeader header;
 3855|  2.32k|        AVIF_CHECK(avifROStreamReadBoxHeader(&s, &header));
  ------------------
  |  |   36|  2.32k|    do {                        \
  |  |   37|  2.32k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 5, False: 2.31k]
  |  |  ------------------
  |  |   38|      5|            avifBreakOnError(); \
  |  |   39|      5|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      5|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      5|        }                       \
  |  |   41|  2.32k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 2.31k]
  |  |  ------------------
  ------------------
 3856|       |
 3857|  2.31k|        if (!memcmp(header.type, "auxl", 4)) {
  ------------------
  |  Branch (3857:13): [True: 1.45k, False: 865]
  ------------------
 3858|  1.45k|            uint32_t toID;
 3859|  1.45k|            AVIF_CHECK(avifROStreamReadU32(&s, &toID));                       // unsigned int(32) track_IDs[];
  ------------------
  |  |   36|  1.45k|    do {                        \
  |  |   37|  1.45k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 1.45k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  1.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.45k]
  |  |  ------------------
  ------------------
 3860|  1.45k|            AVIF_CHECK(avifROStreamSkip(&s, header.size - sizeof(uint32_t))); // just take the first one
  ------------------
  |  |   36|  1.45k|    do {                        \
  |  |   37|  1.45k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 1.44k]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|  1.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.44k]
  |  |  ------------------
  ------------------
 3861|  1.44k|            track->auxForID = toID;
 3862|  1.44k|        } else if (!memcmp(header.type, "prem", 4)) {
  ------------------
  |  Branch (3862:20): [True: 0, False: 865]
  ------------------
 3863|      0|            uint32_t byID;
 3864|      0|            AVIF_CHECK(avifROStreamReadU32(&s, &byID));                       // unsigned int(32) track_IDs[];
  ------------------
  |  |   36|      0|    do {                        \
  |  |   37|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3865|      0|            AVIF_CHECK(avifROStreamSkip(&s, header.size - sizeof(uint32_t))); // just take the first one
  ------------------
  |  |   36|      0|    do {                        \
  |  |   37|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3866|      0|            track->premByID = byID;
 3867|    865|        } else {
 3868|    865|            AVIF_CHECK(avifROStreamSkip(&s, header.size));
  ------------------
  |  |   36|    865|    do {                        \
  |  |   37|    865|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 865]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    865|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 865]
  |  |  ------------------
  ------------------
 3869|    865|        }
 3870|  2.31k|    }
 3871|  2.77k|    return AVIF_TRUE;
  ------------------
  |  |   88|  2.77k|#define AVIF_TRUE 1
  ------------------
 3872|  2.78k|}
read.c:avifParseEditBox:
 3914|  18.3k|{
 3915|  18.3k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[edts]");
  ------------------
  |  |  738|  18.3k|    avifROStream VARNAME;                               \
  |  |  739|  18.3k|    avifROData VARNAME##_roData;                        \
  |  |  740|  18.3k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  18.3k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  18.3k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3916|       |
 3917|  18.3k|    avifBool elstBoxSeen = AVIF_FALSE;
  ------------------
  |  |   89|  18.3k|#define AVIF_FALSE 0
  ------------------
 3918|  36.5k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3918:12): [True: 18.3k, False: 18.2k]
  ------------------
 3919|  18.3k|        avifBoxHeader header;
 3920|  18.3k|        AVIF_CHECK(avifROStreamReadBoxHeader(&s, &header));
  ------------------
  |  |   36|  18.3k|    do {                        \
  |  |   37|  18.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 18.3k]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|  18.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 18.3k]
  |  |  ------------------
  ------------------
 3921|       |
 3922|  18.3k|        if (!memcmp(header.type, "elst", 4)) {
  ------------------
  |  Branch (3922:13): [True: 18.3k, False: 10]
  ------------------
 3923|  18.3k|            if (elstBoxSeen) {
  ------------------
  |  Branch (3923:17): [True: 0, False: 18.3k]
  ------------------
 3924|      0|                avifDiagnosticsPrintf(diag, "More than one [elst] Box was found.");
 3925|      0|                return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 3926|      0|            }
 3927|  18.3k|            AVIF_CHECK(avifParseEditListBox(track, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   36|  18.3k|    do {                        \
  |  |   37|  18.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 39, False: 18.2k]
  |  |  ------------------
  |  |   38|     39|            avifBreakOnError(); \
  |  |   39|     39|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     39|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     39|        }                       \
  |  |   41|  18.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 18.2k]
  |  |  ------------------
  ------------------
 3928|  18.2k|            elstBoxSeen = AVIF_TRUE;
  ------------------
  |  |   88|  18.2k|#define AVIF_TRUE 1
  ------------------
 3929|  18.2k|        }
 3930|  18.2k|        AVIF_CHECK(avifROStreamSkip(&s, header.size));
  ------------------
  |  |   36|  18.2k|    do {                        \
  |  |   37|  18.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 18.2k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  18.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 18.2k]
  |  |  ------------------
  ------------------
 3931|  18.2k|    }
 3932|  18.2k|    if (!elstBoxSeen) {
  ------------------
  |  Branch (3932:9): [True: 2, False: 18.2k]
  ------------------
 3933|      2|        avifDiagnosticsPrintf(diag, "Box[edts] contains no [elst] Box.");
 3934|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
 3935|      2|    }
 3936|  18.2k|    return AVIF_TRUE;
  ------------------
  |  |   88|  18.2k|#define AVIF_TRUE 1
  ------------------
 3937|  18.2k|}
read.c:avifParseEditListBox:
 3875|  18.3k|{
 3876|  18.3k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[elst]");
  ------------------
  |  |  738|  18.3k|    avifROStream VARNAME;                               \
  |  |  739|  18.3k|    avifROData VARNAME##_roData;                        \
  |  |  740|  18.3k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  18.3k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  18.3k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3877|       |
 3878|  18.3k|    uint8_t version;
 3879|  18.3k|    uint32_t flags;
 3880|  18.3k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, &flags));
  ------------------
  |  |   36|  18.3k|    do {                        \
  |  |   37|  18.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 18.3k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  18.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 18.3k]
  |  |  ------------------
  ------------------
 3881|       |
 3882|  18.3k|    if ((flags & 1) == 0) {
  ------------------
  |  Branch (3882:9): [True: 10.9k, False: 7.36k]
  ------------------
 3883|  10.9k|        track->isRepeating = AVIF_FALSE;
  ------------------
  |  |   89|  10.9k|#define AVIF_FALSE 0
  ------------------
 3884|  10.9k|        return AVIF_TRUE;
  ------------------
  |  |   88|  10.9k|#define AVIF_TRUE 1
  ------------------
 3885|  10.9k|    }
 3886|       |
 3887|  7.36k|    track->isRepeating = AVIF_TRUE;
  ------------------
  |  |   88|  7.36k|#define AVIF_TRUE 1
  ------------------
 3888|  7.36k|    uint32_t entryCount;
 3889|  7.36k|    AVIF_CHECK(avifROStreamReadU32(&s, &entryCount)); // unsigned int(32) entry_count;
  ------------------
  |  |   36|  7.36k|    do {                        \
  |  |   37|  7.36k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 7.36k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  7.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 7.36k]
  |  |  ------------------
  ------------------
 3890|  7.36k|    if (entryCount != 1) {
  ------------------
  |  Branch (3890:9): [True: 33, False: 7.33k]
  ------------------
 3891|     33|        avifDiagnosticsPrintf(diag, "Box[elst] contains an entry_count != 1 [%u]", entryCount);
 3892|     33|        return AVIF_FALSE;
  ------------------
  |  |   89|     33|#define AVIF_FALSE 0
  ------------------
 3893|     33|    }
 3894|       |
 3895|  7.33k|    if (version == 1) {
  ------------------
  |  Branch (3895:9): [True: 6.98k, False: 343]
  ------------------
 3896|  6.98k|        AVIF_CHECK(avifROStreamReadU64(&s, &track->segmentDuration)); // unsigned int(64) segment_duration;
  ------------------
  |  |   36|  6.98k|    do {                        \
  |  |   37|  6.98k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 6.98k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  6.98k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 6.98k]
  |  |  ------------------
  ------------------
 3897|  6.98k|    } else if (version == 0) {
  ------------------
  |  Branch (3897:16): [True: 342, False: 1]
  ------------------
 3898|    342|        uint32_t segmentDuration;
 3899|    342|        AVIF_CHECK(avifROStreamReadU32(&s, &segmentDuration)); // unsigned int(32) segment_duration;
  ------------------
  |  |   36|    342|    do {                        \
  |  |   37|    342|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 341]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    342|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 341]
  |  |  ------------------
  ------------------
 3900|    341|        track->segmentDuration = segmentDuration;
 3901|    341|    } else {
 3902|       |        // Unsupported version
 3903|      1|        avifDiagnosticsPrintf(diag, "Box[elst] has an unsupported version [%u]", version);
 3904|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3905|      1|    }
 3906|  7.32k|    if (track->segmentDuration == 0) {
  ------------------
  |  Branch (3906:9): [True: 1, False: 7.32k]
  ------------------
 3907|      1|        avifDiagnosticsPrintf(diag, "Box[elst] Invalid value for segment_duration (0).");
 3908|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3909|      1|    }
 3910|  7.32k|    return AVIF_TRUE;
  ------------------
  |  |   88|  7.32k|#define AVIF_TRUE 1
  ------------------
 3911|  7.32k|}
read.c:avifDecoderItemShouldBeSkipped:
 5283|  1.81M|{
 5284|  1.81M|    return !item->size || item->hasUnsupportedEssentialProperty ||
  ------------------
  |  Branch (5284:12): [True: 331k, False: 1.48M]
  |  Branch (5284:27): [True: 73.8k, False: 1.40M]
  ------------------
 5285|  1.40M|           (avifGetCodecType(item->type) == AVIF_CODEC_TYPE_UNKNOWN && memcmp(item->type, "grid", 4)) || item->thumbnailForID != 0;
  ------------------
  |  Branch (5285:13): [True: 366k, False: 1.04M]
  |  Branch (5285:72): [True: 291k, False: 75.7k]
  |  Branch (5285:106): [True: 0, False: 1.11M]
  ------------------
 5286|  1.81M|}
read.c:avifPropertyArrayFind:
  200|  3.48M|{
  201|  16.8M|    for (uint32_t propertyIndex = 0; propertyIndex < properties->count; ++propertyIndex) {
  ------------------
  |  Branch (201:38): [True: 14.4M, False: 2.43M]
  ------------------
  202|  14.4M|        const avifProperty * prop = &properties->prop[propertyIndex];
  203|  14.4M|        if (!memcmp(prop->type, type, 4)) {
  ------------------
  |  Branch (203:13): [True: 1.05M, False: 13.3M]
  ------------------
  204|  1.05M|            return prop;
  205|  1.05M|        }
  206|  14.4M|    }
  207|  2.43M|    return NULL;
  208|  3.48M|}
read.c:isAlphaURN:
 1948|  52.5k|{
 1949|  52.5k|    return !strcmp(urn, AVIF_URN_ALPHA0) || !strcmp(urn, AVIF_URN_ALPHA1);
  ------------------
  |  |   78|  52.5k|#define AVIF_URN_ALPHA0 "urn:mpeg:mpegB:cicp:systems:auxiliary:alpha"
  ------------------
                  return !strcmp(urn, AVIF_URN_ALPHA0) || !strcmp(urn, AVIF_URN_ALPHA1);
  ------------------
  |  |   79|  12.5k|#define AVIF_URN_ALPHA1 "urn:mpeg:hevc:2015:auxid:1"
  ------------------
  |  Branch (1949:12): [True: 39.9k, False: 12.5k]
  |  Branch (1949:45): [True: 0, False: 12.5k]
  ------------------
 1950|  52.5k|}
read.c:avifDecoderDataClearTiles:
 1085|  1.98M|{
 1086|  2.27M|    for (unsigned int i = 0; i < data->tiles.count; ++i) {
  ------------------
  |  Branch (1086:30): [True: 297k, False: 1.98M]
  ------------------
 1087|   297k|        avifTile * tile = &data->tiles.tile[i];
 1088|   297k|        if (tile->input) {
  ------------------
  |  Branch (1088:13): [True: 297k, False: 0]
  ------------------
 1089|   297k|            avifCodecDecodeInputDestroy(tile->input);
 1090|   297k|            tile->input = NULL;
 1091|   297k|        }
 1092|   297k|        if (tile->codec) {
  ------------------
  |  Branch (1092:13): [True: 16.4k, False: 281k]
  ------------------
 1093|       |            // Check if tile->codec was created separately and destroy it in that case.
 1094|  16.4k|            if (tile->codec != data->codec && tile->codec != data->codecAlpha) {
  ------------------
  |  Branch (1094:17): [True: 2.03k, False: 14.4k]
  |  Branch (1094:47): [True: 2.01k, False: 19]
  ------------------
 1095|  2.01k|                avifCodecDestroy(tile->codec);
 1096|  2.01k|            }
 1097|  16.4k|            tile->codec = NULL;
 1098|  16.4k|        }
 1099|   297k|        if (tile->image) {
  ------------------
  |  Branch (1099:13): [True: 297k, False: 0]
  ------------------
 1100|   297k|            avifImageDestroy(tile->image);
 1101|   297k|            tile->image = NULL;
 1102|   297k|        }
 1103|   297k|    }
 1104|  1.98M|    data->tiles.count = 0;
 1105|  17.8M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (1105:21): [True: 15.8M, False: 1.98M]
  ------------------
 1106|  15.8M|        data->tileInfos[c].tileCount = 0;
 1107|  15.8M|        data->tileInfos[c].decodedTileCount = 0;
 1108|  15.8M|    }
 1109|  1.98M|    if (data->codec) {
  ------------------
  |  Branch (1109:9): [True: 11.2k, False: 1.97M]
  ------------------
 1110|  11.2k|        avifCodecDestroy(data->codec);
 1111|  11.2k|        data->codec = NULL;
 1112|  11.2k|    }
 1113|  1.98M|    if (data->codecAlpha) {
  ------------------
  |  Branch (1113:9): [True: 19, False: 1.98M]
  ------------------
 1114|     19|        avifCodecDestroy(data->codecAlpha);
 1115|       |        data->codecAlpha = NULL;
 1116|     19|    }
 1117|  1.98M|}
read.c:avifSampleTableGetCodecType:
  372|  68.9k|{
  373|  70.6k|    for (uint32_t i = 0; i < sampleTable->sampleDescriptions.count; ++i) {
  ------------------
  |  Branch (373:26): [True: 67.3k, False: 3.28k]
  ------------------
  374|  67.3k|        const avifCodecType codecType = avifGetCodecType(sampleTable->sampleDescriptions.description[i].format);
  375|  67.3k|        if (codecType != AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (375:13): [True: 65.7k, False: 1.61k]
  ------------------
  376|  65.7k|            return codecType;
  377|  65.7k|        }
  378|  67.3k|    }
  379|  3.28k|    return AVIF_CODEC_TYPE_UNKNOWN;
  380|  68.9k|}
read.c:avifSampleTableGetProperties:
  448|  65.7k|{
  449|  65.7k|    for (uint32_t i = 0; i < sampleTable->sampleDescriptions.count; ++i) {
  ------------------
  |  Branch (449:26): [True: 65.7k, False: 0]
  ------------------
  450|  65.7k|        const avifSampleDescription * description = &sampleTable->sampleDescriptions.description[i];
  451|  65.7k|        if (avifGetCodecType(description->format) == codecType) {
  ------------------
  |  Branch (451:13): [True: 65.7k, False: 0]
  ------------------
  452|  65.7k|            return &description->properties;
  453|  65.7k|        }
  454|  65.7k|    }
  455|      0|    return NULL;
  456|  65.7k|}
read.c:avifDecoderFindMetadata:
 1884|   250k|{
 1885|   250k|    if (decoder->ignoreExif && decoder->ignoreXMP) {
  ------------------
  |  Branch (1885:9): [True: 0, False: 250k]
  |  Branch (1885:32): [True: 0, False: 0]
  ------------------
 1886|       |        // Nothing to do!
 1887|      0|        return AVIF_RESULT_OK;
 1888|      0|    }
 1889|       |
 1890|   790k|    for (uint32_t itemIndex = 0; itemIndex < meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (1890:34): [True: 539k, False: 250k]
  ------------------
 1891|   539k|        avifDecoderItem * item = meta->items.item[itemIndex];
 1892|   539k|        if (!item->size) {
  ------------------
  |  Branch (1892:13): [True: 147k, False: 391k]
  ------------------
 1893|   147k|            continue;
 1894|   147k|        }
 1895|   391k|        if (item->hasUnsupportedEssentialProperty) {
  ------------------
  |  Branch (1895:13): [True: 17.4k, False: 374k]
  ------------------
 1896|       |            // An essential property isn't supported by libavif; ignore the item.
 1897|  17.4k|            continue;
 1898|  17.4k|        }
 1899|       |
 1900|   374k|        if ((colorId > 0) && (item->descForID != colorId)) {
  ------------------
  |  Branch (1900:13): [True: 374k, False: 135]
  |  Branch (1900:30): [True: 374k, False: 107]
  ------------------
 1901|       |            // Not a content description (metadata) for the colorOBU, skip it
 1902|   374k|            continue;
 1903|   374k|        }
 1904|       |
 1905|    242|        if (!decoder->ignoreExif && !memcmp(item->type, "Exif", 4)) {
  ------------------
  |  Branch (1905:13): [True: 242, False: 0]
  |  Branch (1905:37): [True: 101, False: 141]
  ------------------
 1906|    101|            avifROData exifContents;
 1907|    101|            avifResult readResult = avifDecoderItemRead(item, decoder->io, &exifContents, 0, 0, &decoder->diag);
 1908|    101|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (1908:17): [True: 1, False: 100]
  ------------------
 1909|      1|                return readResult;
 1910|      1|            }
 1911|       |
 1912|       |            // Advance past Annex A.2.1's header
 1913|    100|            BEGIN_STREAM(exifBoxStream, exifContents.data, exifContents.size, &decoder->diag, "Exif header");
  ------------------
  |  |  738|    100|    avifROStream VARNAME;                               \
  |  |  739|    100|    avifROData VARNAME##_roData;                        \
  |  |  740|    100|    VARNAME##_roData.data = PTR;                        \
  |  |  741|    100|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|    100|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 1914|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 1915|       |            // The MinimizedImageBox does not signal the exifTiffHeaderOffset.
 1916|       |            if (!meta->fromMiniBox)
 1917|       |#endif
 1918|    100|            {
 1919|    100|                uint32_t exifTiffHeaderOffset;
 1920|    100|                AVIF_CHECKERR(avifROStreamReadU32(&exifBoxStream, &exifTiffHeaderOffset),
  ------------------
  |  |   45|    100|    do {                        \
  |  |   46|    100|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 99]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    100|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 99]
  |  |  ------------------
  ------------------
 1921|    100|                              AVIF_RESULT_INVALID_EXIF_PAYLOAD); // unsigned int(32) exif_tiff_header_offset;
 1922|     99|                size_t expectedExifTiffHeaderOffset;
 1923|     99|                AVIF_CHECKRES(avifGetExifTiffHeaderOffset(avifROStreamCurrent(&exifBoxStream),
  ------------------
  |  |   54|     99|    do {                                  \
  |  |   55|     99|        const avifResult result__ = (A);  \
  |  |   56|     99|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 96]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|     99|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 96]
  |  |  ------------------
  ------------------
 1924|     99|                                                          avifROStreamRemainingBytes(&exifBoxStream),
 1925|     99|                                                          &expectedExifTiffHeaderOffset));
 1926|     96|                AVIF_CHECKERR(exifTiffHeaderOffset == expectedExifTiffHeaderOffset, AVIF_RESULT_INVALID_EXIF_PAYLOAD);
  ------------------
  |  |   45|     96|    do {                        \
  |  |   46|     96|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 7, False: 89]
  |  |  ------------------
  |  |   47|      7|            avifBreakOnError(); \
  |  |   48|      7|            return ERR;         \
  |  |   49|      7|        }                       \
  |  |   50|     96|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 89]
  |  |  ------------------
  ------------------
 1927|     96|            }
 1928|       |
 1929|     89|            AVIF_CHECKRES(avifRWDataSet(&image->exif, avifROStreamCurrent(&exifBoxStream), avifROStreamRemainingBytes(&exifBoxStream)));
  ------------------
  |  |   54|     89|    do {                                  \
  |  |   55|     89|        const avifResult result__ = (A);  \
  |  |   56|     89|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 89]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     89|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 89]
  |  |  ------------------
  ------------------
 1930|    141|        } else if (!decoder->ignoreXMP && !memcmp(item->type, "mime", 4) &&
  ------------------
  |  Branch (1930:20): [True: 141, False: 0]
  |  Branch (1930:43): [True: 126, False: 15]
  ------------------
 1931|    126|                   !strcmp(item->contentType.contentType, AVIF_CONTENT_TYPE_XMP)) {
  ------------------
  |  |   81|    126|#define AVIF_CONTENT_TYPE_XMP "application/rdf+xml"
  ------------------
  |  Branch (1931:20): [True: 28, False: 98]
  ------------------
 1932|     28|            avifROData xmpContents;
 1933|     28|            avifResult readResult = avifDecoderItemRead(item, decoder->io, &xmpContents, 0, 0, &decoder->diag);
 1934|     28|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (1934:17): [True: 6, False: 22]
  ------------------
 1935|      6|                return readResult;
 1936|      6|            }
 1937|       |
 1938|     22|            AVIF_CHECKRES(avifImageSetMetadataXMP(image, xmpContents.data, xmpContents.size));
  ------------------
  |  |   54|     22|    do {                                  \
  |  |   55|     22|        const avifResult result__ = (A);  \
  |  |   56|     22|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 22]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     22|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 22]
  |  |  ------------------
  ------------------
 1939|     22|        }
 1940|    242|    }
 1941|   250k|    return AVIF_RESULT_OK;
 1942|   250k|}
read.c:avifDecoderDataCreateTile:
 1040|   297k|{
 1041|   297k|    avifTile * tile = (avifTile *)avifArrayPush(&data->tiles);
 1042|   297k|    if (tile == NULL) {
  ------------------
  |  Branch (1042:9): [True: 0, False: 297k]
  ------------------
 1043|      0|        return NULL;
 1044|      0|    }
 1045|   297k|    tile->codecType = codecType;
 1046|   297k|    tile->image = avifImageCreateEmpty();
 1047|   297k|    if (!tile->image) {
  ------------------
  |  Branch (1047:9): [True: 0, False: 297k]
  ------------------
 1048|      0|        goto error;
 1049|      0|    }
 1050|   297k|    tile->input = avifCodecDecodeInputCreate();
 1051|   297k|    if (!tile->input) {
  ------------------
  |  Branch (1051:9): [True: 0, False: 297k]
  ------------------
 1052|      0|        goto error;
 1053|      0|    }
 1054|   297k|    tile->width = width;
 1055|   297k|    tile->height = height;
 1056|   297k|    tile->operatingPoint = operatingPoint;
 1057|   297k|    return tile;
 1058|       |
 1059|      0|error:
 1060|      0|    if (tile->input) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 0]
  ------------------
 1061|      0|        avifCodecDecodeInputDestroy(tile->input);
 1062|      0|    }
 1063|      0|    if (tile->image) {
  ------------------
  |  Branch (1063:9): [True: 0, False: 0]
  ------------------
 1064|      0|        avifImageDestroy(tile->image);
 1065|      0|    }
 1066|      0|    avifArrayPop(&data->tiles);
 1067|       |    return NULL;
 1068|   297k|}
read.c:avifCodecDecodeInputFillFromSampleTable:
  526|  32.4k|{
  527|  32.4k|    if (imageCountLimit) {
  ------------------
  |  Branch (527:9): [True: 32.4k, False: 0]
  ------------------
  528|       |        // Verify that the we're not about to exceed the frame count limit.
  529|       |
  530|  32.4k|        uint32_t imageCountLeft = imageCountLimit;
  531|  64.9k|        for (uint32_t chunkIndex = 0; chunkIndex < sampleTable->chunks.count; ++chunkIndex) {
  ------------------
  |  Branch (531:39): [True: 32.4k, False: 32.4k]
  ------------------
  532|       |            // First, figure out how many samples are in this chunk
  533|  32.4k|            uint32_t sampleCount = avifGetSampleCountOfChunk(&sampleTable->sampleToChunks, chunkIndex);
  534|  32.4k|            if (sampleCount == 0) {
  ------------------
  |  Branch (534:17): [True: 16, False: 32.4k]
  ------------------
  535|       |                // chunks with 0 samples are invalid
  536|     16|                avifDiagnosticsPrintf(diag, "Sample table contains a chunk with 0 samples");
  537|     16|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  538|     16|            }
  539|       |
  540|  32.4k|            if (sampleCount > imageCountLeft) {
  ------------------
  |  Branch (540:17): [True: 35, False: 32.4k]
  ------------------
  541|       |                // This file exceeds the imageCountLimit, bail out
  542|     35|                avifDiagnosticsPrintf(diag, "Exceeded avifDecoder's imageCountLimit");
  543|     35|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  544|     35|            }
  545|  32.4k|            imageCountLeft -= sampleCount;
  546|  32.4k|        }
  547|  32.4k|    }
  548|       |
  549|  32.4k|    uint32_t sampleSizeIndex = 0;
  550|  64.6k|    for (uint32_t chunkIndex = 0; chunkIndex < sampleTable->chunks.count; ++chunkIndex) {
  ------------------
  |  Branch (550:35): [True: 32.4k, False: 32.1k]
  ------------------
  551|  32.4k|        avifSampleTableChunk * chunk = &sampleTable->chunks.chunk[chunkIndex];
  552|       |
  553|       |        // First, figure out how many samples are in this chunk
  554|  32.4k|        uint32_t sampleCount = avifGetSampleCountOfChunk(&sampleTable->sampleToChunks, chunkIndex);
  555|  32.4k|        if (sampleCount == 0) {
  ------------------
  |  Branch (555:13): [True: 0, False: 32.4k]
  ------------------
  556|       |            // chunks with 0 samples are invalid
  557|      0|            avifDiagnosticsPrintf(diag, "Sample table contains a chunk with 0 samples");
  558|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
  559|      0|        }
  560|       |
  561|  32.4k|        uint64_t sampleOffset = chunk->offset;
  562|  80.8k|        for (uint32_t sampleIndex = 0; sampleIndex < sampleCount; ++sampleIndex) {
  ------------------
  |  Branch (562:40): [True: 48.6k, False: 32.1k]
  ------------------
  563|  48.6k|            uint32_t sampleSize = sampleTable->allSamplesSize;
  564|  48.6k|            if (sampleSize == 0) {
  ------------------
  |  Branch (564:17): [True: 9.68k, False: 39.0k]
  ------------------
  565|  9.68k|                if (sampleSizeIndex >= sampleTable->sampleSizes.count) {
  ------------------
  |  Branch (565:21): [True: 15, False: 9.66k]
  ------------------
  566|       |                    // We've run out of samples to sum
  567|     15|                    avifDiagnosticsPrintf(diag, "Truncated sample table");
  568|     15|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
  569|     15|                }
  570|  9.66k|                avifSampleTableSampleSize * sampleSizePtr = &sampleTable->sampleSizes.sampleSize[sampleSizeIndex];
  571|  9.66k|                sampleSize = sampleSizePtr->size;
  572|  9.66k|            }
  573|       |
  574|  48.6k|            avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  575|  48.6k|            AVIF_CHECKERR(sample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  48.6k|    do {                        \
  |  |   46|  48.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 48.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  48.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 48.6k]
  |  |  ------------------
  ------------------
  576|  48.6k|            sample->offset = sampleOffset;
  577|  48.6k|            sample->size = sampleSize;
  578|  48.6k|            sample->spatialID = AVIF_SPATIAL_ID_UNSET; // Not filtering by spatial_id
  ------------------
  |  |  461|  48.6k|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  579|  48.6k|            sample->sync = AVIF_FALSE;                 // to potentially be set to true following the outer loop
  ------------------
  |  |   89|  48.6k|#define AVIF_FALSE 0
  ------------------
  580|       |
  581|  48.6k|            if (sampleSize > UINT64_MAX - sampleOffset) {
  ------------------
  |  Branch (581:17): [True: 0, False: 48.6k]
  ------------------
  582|      0|                avifDiagnosticsPrintf(diag,
  583|      0|                                      "Sample table contains an offset/size pair which overflows: [%" PRIu64 " / %u]",
  584|      0|                                      sampleOffset,
  585|      0|                                      sampleSize);
  586|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  587|      0|            }
  588|  48.6k|            if (sizeHint && ((sampleOffset + sampleSize) > sizeHint)) {
  ------------------
  |  Branch (588:17): [True: 14.7k, False: 33.8k]
  |  Branch (588:29): [True: 230, False: 14.5k]
  ------------------
  589|    230|                avifDiagnosticsPrintf(diag, "Exceeded avifIO's sizeHint, possibly truncated data");
  590|    230|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  591|    230|            }
  592|       |
  593|  48.4k|            sampleOffset += sampleSize;
  594|  48.4k|            ++sampleSizeIndex;
  595|  48.4k|        }
  596|  32.4k|    }
  597|       |
  598|       |    // Mark appropriate samples as sync
  599|  61.1k|    for (uint32_t syncSampleIndex = 0; syncSampleIndex < sampleTable->syncSamples.count; ++syncSampleIndex) {
  ------------------
  |  Branch (599:40): [True: 28.9k, False: 32.1k]
  ------------------
  600|  28.9k|        uint32_t frameIndex = sampleTable->syncSamples.syncSample[syncSampleIndex].sampleNumber - 1; // sampleNumber is 1-based
  601|  28.9k|        if (frameIndex < decodeInput->samples.count) {
  ------------------
  |  Branch (601:13): [True: 4.37k, False: 24.6k]
  ------------------
  602|  4.37k|            decodeInput->samples.sample[frameIndex].sync = AVIF_TRUE;
  ------------------
  |  |   88|  4.37k|#define AVIF_TRUE 1
  ------------------
  603|  4.37k|        }
  604|  28.9k|    }
  605|       |
  606|       |    // Assume frame 0 is sync, just in case the stss box is absent in the BMFF. (Unnecessary?)
  607|  32.1k|    if (decodeInput->samples.count > 0) {
  ------------------
  |  Branch (607:9): [True: 32.1k, False: 0]
  ------------------
  608|  32.1k|        decodeInput->samples.sample[0].sync = AVIF_TRUE;
  ------------------
  |  |   88|  32.1k|#define AVIF_TRUE 1
  ------------------
  609|  32.1k|    }
  610|  32.1k|    return AVIF_RESULT_OK;
  611|  32.4k|}
read.c:avifGetSampleCountOfChunk:
  509|  64.9k|{
  510|  64.9k|    uint32_t sampleCount = 0;
  511|  64.9k|    for (int sampleToChunkIndex = sampleToChunks->count - 1; sampleToChunkIndex >= 0; --sampleToChunkIndex) {
  ------------------
  |  Branch (511:62): [True: 64.9k, False: 15]
  ------------------
  512|  64.9k|        const avifSampleTableSampleToChunk * sampleToChunk = &sampleToChunks->sampleToChunk[sampleToChunkIndex];
  513|  64.9k|        if (sampleToChunk->firstChunk <= (chunkIndex + 1)) {
  ------------------
  |  Branch (513:13): [True: 64.9k, False: 0]
  ------------------
  514|  64.9k|            sampleCount = sampleToChunk->samplesPerChunk;
  515|  64.9k|            break;
  516|  64.9k|        }
  517|  64.9k|    }
  518|  64.9k|    return sampleCount;
  519|  64.9k|}
read.c:avifMetaFindColorItem:
 5472|   257k|{
 5473|   272k|    for (uint32_t itemIndex = 0; itemIndex < meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5473:34): [True: 272k, False: 90]
  ------------------
 5474|   272k|        avifDecoderItem * item = meta->items.item[itemIndex];
 5475|   272k|        if (avifDecoderItemShouldBeSkipped(item)) {
  ------------------
  |  Branch (5475:13): [True: 9.44k, False: 263k]
  ------------------
 5476|  9.44k|            continue;
 5477|  9.44k|        }
 5478|   263k|        if (item->id == meta->primaryItemID) {
  ------------------
  |  Branch (5478:13): [True: 257k, False: 5.34k]
  ------------------
 5479|   257k|            return item;
 5480|   257k|        }
 5481|   263k|    }
 5482|     90|    return NULL;
 5483|   257k|}
read.c:avifDecoderItemReadAndParse:
 2441|   295k|{
 2442|   295k|    if (!memcmp(item->type, "grid", 4)) {
  ------------------
  |  Branch (2442:9): [True: 11.7k, False: 284k]
  ------------------
 2443|  11.7k|        if (isItemInInput) {
  ------------------
  |  Branch (2443:13): [True: 10.8k, False: 928]
  ------------------
 2444|  10.8k|            avifROData readData;
 2445|  10.8k|            AVIF_CHECKRES(avifDecoderItemRead(item, decoder->io, &readData, 0, 0, decoder->data->diag));
  ------------------
  |  |   54|  10.8k|    do {                                  \
  |  |   55|  10.8k|        const avifResult result__ = (A);  \
  |  |   56|  10.8k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 180, False: 10.6k]
  |  |  ------------------
  |  |   57|    180|            avifBreakOnError();           \
  |  |   58|    180|            return result__;              \
  |  |   59|    180|        }                                 \
  |  |   60|  10.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2446|  10.6k|            AVIF_CHECKRES(avifParseImageGridBox(grid,
  ------------------
  |  |   54|  10.6k|    do {                                  \
  |  |   55|  10.6k|        const avifResult result__ = (A);  \
  |  |   56|  10.6k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 32, False: 10.6k]
  |  |  ------------------
  |  |   57|     32|            avifBreakOnError();           \
  |  |   58|     32|            return result__;              \
  |  |   59|     32|        }                                 \
  |  |   60|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2447|  10.6k|                                                readData.data,
 2448|  10.6k|                                                readData.size,
 2449|  10.6k|                                                decoder->imageSizeLimit,
 2450|  10.6k|                                                decoder->imageDimensionLimit,
 2451|  10.6k|                                                decoder->data->diag));
 2452|       |            // Validate that there are exactly the same number of dimg items to form the grid.
 2453|  10.6k|            uint32_t dimgItemCount = 0;
 2454|  83.5k|            for (uint32_t i = 0; i < item->meta->items.count; ++i) {
  ------------------
  |  Branch (2454:34): [True: 72.9k, False: 10.6k]
  ------------------
 2455|  72.9k|                if (item->meta->items.item[i]->dimgForID == item->id) {
  ------------------
  |  Branch (2455:21): [True: 24.4k, False: 48.5k]
  ------------------
 2456|  24.4k|                    ++dimgItemCount;
 2457|  24.4k|                }
 2458|  72.9k|            }
 2459|  10.6k|            AVIF_CHECKERR(dimgItemCount == grid->rows * grid->columns, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  10.6k|    do {                        \
  |  |   46|  10.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 10.6k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2460|  10.6k|        } else {
 2461|       |            // item was generated for convenience and is not part of the bitstream.
 2462|       |            // grid information should already be set.
 2463|    928|            AVIF_ASSERT_OR_RETURN(grid->rows > 0 && grid->columns > 0);
  ------------------
  |  |   64|    928|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    928|    do {                        \
  |  |  |  |   46|  1.85k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 928, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 928, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    928|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 928]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2464|    928|        }
 2465|  11.5k|        *codecType = avifDecoderItemGetGridCodecType(item);
 2466|  11.5k|        AVIF_CHECKERR(*codecType != AVIF_CODEC_TYPE_UNKNOWN, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  11.5k|    do {                        \
  |  |   46|  11.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 14, False: 11.5k]
  |  |  ------------------
  |  |   47|     14|            avifBreakOnError(); \
  |  |   48|     14|            return ERR;         \
  |  |   49|     14|        }                       \
  |  |   50|  11.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 11.5k]
  |  |  ------------------
  ------------------
 2467|   284k|    } else {
 2468|   284k|        *codecType = avifGetCodecType(item->type);
 2469|   284k|        AVIF_ASSERT_OR_RETURN(*codecType != AVIF_CODEC_TYPE_UNKNOWN);
  ------------------
  |  |   64|   284k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   284k|    do {                        \
  |  |  |  |   46|   284k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 284k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   284k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 284k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2470|   284k|    }
 2471|   295k|    return AVIF_RESULT_OK;
 2472|   295k|}
read.c:avifParseImageGridBox:
 2116|  10.6k|{
 2117|  10.6k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[grid]");
  ------------------
  |  |  738|  10.6k|    avifROStream VARNAME;                               \
  |  |  739|  10.6k|    avifROData VARNAME##_roData;                        \
  |  |  740|  10.6k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  10.6k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  10.6k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2118|       |
 2119|  10.6k|    uint8_t version, flags;
 2120|  10.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &version, 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) version = 0;
  ------------------
  |  |   45|  10.6k|    do {                        \
  |  |   46|  10.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 10.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2121|  10.6k|    if (version != 0) {
  ------------------
  |  Branch (2121:9): [True: 7, False: 10.6k]
  ------------------
 2122|      7|        avifDiagnosticsPrintf(diag, "Box[grid] has unsupported version [%u]", version);
 2123|      7|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2124|      7|    }
 2125|  10.6k|    uint8_t rowsMinusOne, columnsMinusOne;
 2126|  10.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &flags, 1), AVIF_RESULT_BMFF_PARSE_FAILED);           // unsigned int(8) flags;
  ------------------
  |  |   45|  10.6k|    do {                        \
  |  |   46|  10.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 10.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2127|  10.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &rowsMinusOne, 1), AVIF_RESULT_BMFF_PARSE_FAILED);    // unsigned int(8) rows_minus_one;
  ------------------
  |  |   45|  10.6k|    do {                        \
  |  |   46|  10.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 10.6k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2128|  10.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &columnsMinusOne, 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) columns_minus_one;
  ------------------
  |  |   45|  10.6k|    do {                        \
  |  |   46|  10.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 10.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2129|  10.6k|    grid->rows = (uint32_t)rowsMinusOne + 1;
 2130|  10.6k|    grid->columns = (uint32_t)columnsMinusOne + 1;
 2131|       |
 2132|  10.6k|    uint32_t fieldLength = ((flags & 1) + 1) * 16;
 2133|  10.6k|    if (fieldLength == 16) {
  ------------------
  |  Branch (2133:9): [True: 10.6k, False: 9]
  ------------------
 2134|  10.6k|        uint16_t outputWidth16, outputHeight16;
 2135|  10.6k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &outputWidth16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_width;
  ------------------
  |  |   45|  10.6k|    do {                        \
  |  |   46|  10.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 10.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2136|  10.6k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &outputHeight16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_height;
  ------------------
  |  |   45|  10.6k|    do {                        \
  |  |   46|  10.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 10.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  10.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 2137|  10.6k|        grid->outputWidth = outputWidth16;
 2138|  10.6k|        grid->outputHeight = outputHeight16;
 2139|  10.6k|    } else {
 2140|      9|        if (fieldLength != 32) {
  ------------------
  |  Branch (2140:13): [True: 0, False: 9]
  ------------------
 2141|       |            // This should be impossible
 2142|      0|            avifDiagnosticsPrintf(diag, "Grid box contains illegal field length: [%u]", fieldLength);
 2143|      0|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 2144|      0|        }
 2145|      9|        AVIF_CHECKERR(avifROStreamReadU32(&s, &grid->outputWidth), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_width;
  ------------------
  |  |   45|      9|    do {                        \
  |  |   46|      9|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 8]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 8]
  |  |  ------------------
  ------------------
 2146|      8|        AVIF_CHECKERR(avifROStreamReadU32(&s, &grid->outputHeight), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_height;
  ------------------
  |  |   45|      8|    do {                        \
  |  |   46|      8|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 7]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 7]
  |  |  ------------------
  ------------------
 2147|      8|    }
 2148|  10.6k|    if ((grid->outputWidth == 0) || (grid->outputHeight == 0)) {
  ------------------
  |  Branch (2148:9): [True: 1, False: 10.6k]
  |  Branch (2148:37): [True: 1, False: 10.6k]
  ------------------
 2149|      2|        avifDiagnosticsPrintf(diag, "Grid box contains illegal dimensions: [%u x %u]", grid->outputWidth, grid->outputHeight);
 2150|      2|        return AVIF_RESULT_INVALID_IMAGE_GRID;
 2151|      2|    }
 2152|  10.6k|    if (avifDimensionsTooLarge(grid->outputWidth, grid->outputHeight, imageSizeLimit, imageDimensionLimit)) {
  ------------------
  |  Branch (2152:9): [True: 14, False: 10.6k]
  ------------------
 2153|     14|        avifDiagnosticsPrintf(diag, "Grid box dimensions are too large: [%u x %u]", grid->outputWidth, grid->outputHeight);
 2154|     14|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2155|     14|    }
 2156|  10.6k|    if (avifROStreamRemainingBytes(&s) != 0) {
  ------------------
  |  Branch (2156:9): [True: 1, False: 10.6k]
  ------------------
 2157|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2158|      1|    }
 2159|  10.6k|    return AVIF_RESULT_OK;
 2160|  10.6k|}
read.c:avifDecoderItemGetGridCodecType:
 1567|  11.5k|{
 1568|  27.3k|    for (uint32_t i = 0; i < gridItem->meta->items.count; ++i) {
  ------------------
  |  Branch (1568:26): [True: 27.2k, False: 14]
  ------------------
 1569|  27.2k|        avifDecoderItem * item = gridItem->meta->items.item[i];
 1570|  27.2k|        const avifCodecType tileCodecType = avifGetCodecType(item->type);
 1571|  27.2k|        if ((item->dimgForID == gridItem->id) && (tileCodecType != AVIF_CODEC_TYPE_UNKNOWN)) {
  ------------------
  |  Branch (1571:13): [True: 11.6k, False: 15.6k]
  |  Branch (1571:50): [True: 11.5k, False: 107]
  ------------------
 1572|  11.5k|            return tileCodecType;
 1573|  11.5k|        }
 1574|  27.2k|    }
 1575|     14|    return AVIF_CODEC_TYPE_UNKNOWN;
 1576|  11.5k|}
read.c:avifMetaFindAlphaItem:
 5507|   257k|{
 5508|   915k|    for (uint32_t itemIndex = 0; itemIndex < meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5508:34): [True: 694k, False: 220k]
  ------------------
 5509|   694k|        avifDecoderItem * item = meta->items.item[itemIndex];
 5510|   694k|        if (avifDecoderItemShouldBeSkipped(item)) {
  ------------------
  |  Branch (5510:13): [True: 279k, False: 414k]
  ------------------
 5511|   279k|            continue;
 5512|   279k|        }
 5513|   414k|        if (avifDecoderItemIsAlphaAux(item, colorItem->id)) {
  ------------------
  |  Branch (5513:13): [True: 36.9k, False: 377k]
  ------------------
 5514|  36.9k|            *alphaItem = item;
 5515|  36.9k|            *isAlphaItemInInput = AVIF_TRUE;
  ------------------
  |  |   88|  36.9k|#define AVIF_TRUE 1
  ------------------
 5516|  36.9k|            return AVIF_RESULT_OK;
 5517|  36.9k|        }
 5518|   414k|    }
 5519|   220k|    if (memcmp(colorItem->type, "grid", 4)) {
  ------------------
  |  Branch (5519:9): [True: 210k, False: 10.3k]
  ------------------
 5520|   210k|        *alphaItem = NULL;
 5521|   210k|        *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|   210k|#define AVIF_FALSE 0
  ------------------
 5522|   210k|        return AVIF_RESULT_OK;
 5523|   210k|    }
 5524|       |    // If color item is a grid, check if there is an alpha channel which is represented as an auxl item to each color tile item.
 5525|  10.3k|    const uint32_t tileCount = colorInfo->grid.rows * colorInfo->grid.columns;
 5526|  10.3k|    if (tileCount == 0) {
  ------------------
  |  Branch (5526:9): [True: 0, False: 10.3k]
  ------------------
 5527|      0|        *alphaItem = NULL;
 5528|      0|        *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5529|      0|        return AVIF_RESULT_OK;
 5530|      0|    }
 5531|       |    // Keep the same 'dimg' order as it defines where each tile is located in the reconstructed image.
 5532|  10.3k|    uint32_t * dimgIdxToAlphaItemIdx = (uint32_t *)avifAlloc(tileCount * sizeof(uint32_t));
 5533|  10.3k|    AVIF_CHECKERR(dimgIdxToAlphaItemIdx != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  10.3k|    do {                        \
  |  |   46|  10.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 10.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  10.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.3k]
  |  |  ------------------
  ------------------
 5534|  10.3k|    const uint32_t itemIndexNotSet = UINT32_MAX;
 5535|  32.0k|    for (uint32_t dimgIdx = 0; dimgIdx < tileCount; ++dimgIdx) {
  ------------------
  |  Branch (5535:32): [True: 21.6k, False: 10.3k]
  ------------------
 5536|  21.6k|        dimgIdxToAlphaItemIdx[dimgIdx] = itemIndexNotSet;
 5537|  21.6k|    }
 5538|  10.3k|    uint32_t alphaItemCount = 0;
 5539|  25.6k|    for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (5539:26): [True: 24.7k, False: 928]
  ------------------
 5540|  24.7k|        const avifDecoderItem * const item = meta->items.item[i];
 5541|  24.7k|        if (item->dimgForID == colorItem->id) {
  ------------------
  |  Branch (5541:13): [True: 12.1k, False: 12.5k]
  ------------------
 5542|  12.1k|            avifBool seenAlphaForCurrentItem = AVIF_FALSE;
  ------------------
  |  |   89|  12.1k|#define AVIF_FALSE 0
  ------------------
 5543|  88.3k|            for (uint32_t j = 0; j < meta->items.count; ++j) {
  ------------------
  |  Branch (5543:34): [True: 76.2k, False: 12.1k]
  ------------------
 5544|  76.2k|                avifDecoderItem * auxlItem = meta->items.item[j];
 5545|  76.2k|                if (avifDecoderItemIsAlphaAux(auxlItem, item->id)) {
  ------------------
  |  Branch (5545:21): [True: 2.76k, False: 73.4k]
  ------------------
 5546|  2.76k|                    if (seenAlphaForCurrentItem || auxlItem->dimgForID != 0 || item->dimgIdx >= tileCount ||
  ------------------
  |  Branch (5546:25): [True: 2, False: 2.76k]
  |  Branch (5546:52): [True: 1, False: 2.76k]
  |  Branch (5546:80): [True: 0, False: 2.76k]
  ------------------
 5547|  2.76k|                        dimgIdxToAlphaItemIdx[item->dimgIdx] != itemIndexNotSet) {
  ------------------
  |  Branch (5547:25): [True: 0, False: 2.76k]
  ------------------
 5548|       |                        // One of the following invalid cases:
 5549|       |                        // * Multiple items are claiming to be the alpha auxiliary of the current item.
 5550|       |                        // * Alpha auxiliary is dimg for another item.
 5551|       |                        // * There are too many items in the dimg array (also checked later in avifFillDimgIdxToItemIdxArray()).
 5552|       |                        // * There is a repetition in the dimg array (also checked later in avifFillDimgIdxToItemIdxArray()).
 5553|      3|                        avifFree(dimgIdxToAlphaItemIdx);
 5554|      3|                        return AVIF_RESULT_INVALID_IMAGE_GRID;
 5555|      3|                    }
 5556|  2.76k|                    dimgIdxToAlphaItemIdx[item->dimgIdx] = j;
 5557|  2.76k|                    ++alphaItemCount;
 5558|  2.76k|                    seenAlphaForCurrentItem = AVIF_TRUE;
  ------------------
  |  |   88|  2.76k|#define AVIF_TRUE 1
  ------------------
 5559|  2.76k|                }
 5560|  76.2k|            }
 5561|  12.1k|            if (!seenAlphaForCurrentItem) {
  ------------------
  |  Branch (5561:17): [True: 9.41k, False: 2.76k]
  ------------------
 5562|       |                // No alpha auxiliary item was found for the current item. Treat this as an image without alpha.
 5563|  9.41k|                avifFree(dimgIdxToAlphaItemIdx);
 5564|  9.41k|                *alphaItem = NULL;
 5565|  9.41k|                *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|  9.41k|#define AVIF_FALSE 0
  ------------------
 5566|  9.41k|                return AVIF_RESULT_OK;
 5567|  9.41k|            }
 5568|  12.1k|        }
 5569|  24.7k|    }
 5570|    928|    if (alphaItemCount != tileCount) {
  ------------------
  |  Branch (5570:9): [True: 0, False: 928]
  ------------------
 5571|      0|        avifFree(dimgIdxToAlphaItemIdx);
 5572|      0|        return AVIF_RESULT_INVALID_IMAGE_GRID;
 5573|      0|    }
 5574|       |    // Find an unused ID.
 5575|    928|    avifResult result;
 5576|    928|    if (meta->items.count >= UINT32_MAX - 1) {
  ------------------
  |  Branch (5576:9): [True: 0, False: 928]
  ------------------
 5577|       |        // In the improbable case where all IDs are used.
 5578|      0|        result = AVIF_RESULT_DECODE_ALPHA_FAILED;
 5579|    928|    } else {
 5580|    928|        uint32_t newItemID = 0;
 5581|    928|        avifBool isUsed;
 5582|  3.73k|        do {
 5583|  3.73k|            ++newItemID;
 5584|  3.73k|            isUsed = AVIF_FALSE;
  ------------------
  |  |   89|  3.73k|#define AVIF_FALSE 0
  ------------------
 5585|  11.5k|            for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (5585:34): [True: 10.5k, False: 928]
  ------------------
 5586|  10.5k|                if (meta->items.item[i]->id == newItemID) {
  ------------------
  |  Branch (5586:21): [True: 2.80k, False: 7.78k]
  ------------------
 5587|  2.80k|                    isUsed = AVIF_TRUE;
  ------------------
  |  |   88|  2.80k|#define AVIF_TRUE 1
  ------------------
 5588|  2.80k|                    break;
 5589|  2.80k|                }
 5590|  10.5k|            }
 5591|  3.73k|        } while (isUsed && newItemID != 0);
  ------------------
  |  Branch (5591:18): [True: 2.80k, False: 928]
  |  Branch (5591:28): [True: 2.80k, False: 0]
  ------------------
 5592|    928|        result = avifMetaFindOrCreateItem(meta, newItemID, alphaItem); // Create new empty item.
 5593|    928|    }
 5594|    928|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5594:9): [True: 0, False: 928]
  ------------------
 5595|      0|        avifFree(dimgIdxToAlphaItemIdx);
 5596|      0|        return result;
 5597|      0|    }
 5598|    928|    memcpy((*alphaItem)->type, "grid", 4); // Make it a grid and register alpha items as its tiles.
 5599|    928|    (*alphaItem)->width = colorItem->width;
 5600|    928|    (*alphaItem)->height = colorItem->height;
 5601|  2.78k|    for (uint32_t dimgIdx = 0; dimgIdx < tileCount; ++dimgIdx) {
  ------------------
  |  Branch (5601:32): [True: 1.85k, False: 928]
  ------------------
 5602|  1.85k|        if (dimgIdxToAlphaItemIdx[dimgIdx] >= meta->items.count) {
  ------------------
  |  Branch (5602:13): [True: 0, False: 1.85k]
  ------------------
 5603|      0|            avifFree(dimgIdxToAlphaItemIdx);
 5604|      0|            AVIF_ASSERT_NOT_REACHED_OR_RETURN;
  ------------------
  |  |   66|      0|    do {                                   \
  |  |   67|      0|        avifBreakOnError();                \
  |  |   68|      0|        return AVIF_RESULT_INTERNAL_ERROR; \
  |  |   69|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (69:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5605|      0|        }
 5606|  1.85k|        avifDecoderItem * alphaTileItem = meta->items.item[dimgIdxToAlphaItemIdx[dimgIdx]];
 5607|  1.85k|        alphaTileItem->dimgForID = (*alphaItem)->id;
 5608|  1.85k|        alphaTileItem->dimgIdx = dimgIdx;
 5609|  1.85k|    }
 5610|    928|    avifFree(dimgIdxToAlphaItemIdx);
 5611|    928|    *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|    928|#define AVIF_FALSE 0
  ------------------
 5612|    928|    alphaInfo->grid = colorInfo->grid;
 5613|    928|    return AVIF_RESULT_OK;
 5614|    928|}
read.c:avifDecoderItemIsAlphaAux:
 5488|   490k|{
 5489|   490k|    if (item->auxForID != colorItemId)
  ------------------
  |  Branch (5489:9): [True: 426k, False: 63.7k]
  ------------------
 5490|   426k|        return AVIF_FALSE;
  ------------------
  |  |   89|   426k|#define AVIF_FALSE 0
  ------------------
 5491|  63.7k|    const avifProperty * auxCProp = avifPropertyArrayFind(&item->properties, "auxC");
 5492|  63.7k|    return auxCProp && isAlphaURN(auxCProp->u.auxC.auxType);
  ------------------
  |  Branch (5492:12): [True: 51.0k, False: 12.7k]
  |  Branch (5492:24): [True: 39.7k, False: 11.2k]
  ------------------
 5493|   490k|}
read.c:avifBrandArrayHasBrand:
 5063|   257k|{
 5064|  1.24M|    for (uint32_t brandIndex = 0; brandIndex < brands->count; ++brandIndex) {
  ------------------
  |  Branch (5064:35): [True: 1.03M, False: 209k]
  ------------------
 5065|  1.03M|        if (!memcmp(brands->brand[brandIndex], brand, 4)) {
  ------------------
  |  Branch (5065:13): [True: 47.7k, False: 986k]
  ------------------
 5066|  47.7k|            return AVIF_TRUE;
  ------------------
  |  |   88|  47.7k|#define AVIF_TRUE 1
  ------------------
 5067|  47.7k|        }
 5068|  1.03M|    }
 5069|   209k|    return AVIF_FALSE;
  ------------------
  |  |   89|   209k|#define AVIF_FALSE 0
  ------------------
 5070|   257k|}
read.c:avifDecoderFindGainMapItem:
 5775|  47.7k|{
 5776|  47.7k|    *gainMapItem = NULL;
 5777|  47.7k|    *gainMapCodecType = AVIF_CODEC_TYPE_UNKNOWN;
 5778|       |
 5779|  47.7k|    avifDecoderData * data = decoder->data;
 5780|       |
 5781|       |    // Find tmap and gain map item ids.
 5782|  47.7k|    uint32_t gainMapItemID;
 5783|  47.7k|    avifDecoderItem * toneMappedImageItemTmp;
 5784|  47.7k|    AVIF_CHECKRES(avifDecoderDataFindToneMappedImageItem(data, colorItem, &toneMappedImageItemTmp, &gainMapItemID));
  ------------------
  |  |   54|  47.7k|    do {                                  \
  |  |   55|  47.7k|        const avifResult result__ = (A);  \
  |  |   56|  47.7k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 5, False: 47.7k]
  |  |  ------------------
  |  |   57|      5|            avifBreakOnError();           \
  |  |   58|      5|            return result__;              \
  |  |   59|      5|        }                                 \
  |  |   60|  47.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 47.7k]
  |  |  ------------------
  ------------------
 5785|  47.7k|    if (!toneMappedImageItemTmp || !gainMapItemID) {
  ------------------
  |  Branch (5785:9): [True: 3.08k, False: 44.6k]
  |  Branch (5785:36): [True: 0, False: 44.6k]
  ------------------
 5786|  3.08k|        return AVIF_RESULT_OK;
 5787|  3.08k|    }
 5788|       |
 5789|  44.6k|    if (!avifIsPreferredAlternativeTo(data, toneMappedImageItemTmp->id, colorItem->id)) {
  ------------------
  |  Branch (5789:9): [True: 4.33k, False: 40.2k]
  ------------------
 5790|  4.33k|        return AVIF_RESULT_OK;
 5791|  4.33k|    }
 5792|       |
 5793|       |    // Parse tmap item data (containing the gain map metadata).
 5794|  40.2k|    avifROData tmapData;
 5795|  40.2k|    AVIF_CHECKRES(avifDecoderItemRead(toneMappedImageItemTmp, decoder->io, &tmapData, 0, 0, data->diag));
  ------------------
  |  |   54|  40.2k|    do {                                  \
  |  |   55|  40.2k|        const avifResult result__ = (A);  \
  |  |   56|  40.2k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 39.0k, False: 1.23k]
  |  |  ------------------
  |  |   57|  39.0k|            avifBreakOnError();           \
  |  |   58|  39.0k|            return result__;              \
  |  |   59|  39.0k|        }                                 \
  |  |   60|  40.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.23k]
  |  |  ------------------
  ------------------
 5796|       |    // Allocate avifGainMap on the stack instead of using avifGainMapCreate() to simplify error handling.
 5797|  1.23k|    avifGainMap gainMapTmp;
 5798|  1.23k|    avifGainMapSetDefaults(&gainMapTmp);
 5799|  1.23k|    avifResult result = avifParseToneMappedImageBox(&gainMapTmp, tmapData.data, tmapData.size, data->diag);
 5800|  1.23k|    if (result == AVIF_RESULT_NOT_IMPLEMENTED) {
  ------------------
  |  Branch (5800:9): [True: 907, False: 329]
  ------------------
 5801|       |        // Unsupported gain map version. Simply ignore the gain map.
 5802|    907|        return AVIF_RESULT_OK;
 5803|    907|    }
 5804|    329|    AVIF_CHECKRES(result);
  ------------------
  |  |   54|    329|    do {                                  \
  |  |   55|    329|        const avifResult result__ = (A);  \
  |  |   56|    329|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 56, False: 273]
  |  |  ------------------
  |  |   57|     56|            avifBreakOnError();           \
  |  |   58|     56|            return result__;              \
  |  |   59|     56|        }                                 \
  |  |   60|    329|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 273]
  |  |  ------------------
  ------------------
 5805|       |
 5806|    273|    avifDecoderItem * gainMapItemTmp;
 5807|    273|    AVIF_CHECKRES(avifMetaFindOrCreateItem(data->meta, gainMapItemID, &gainMapItemTmp));
  ------------------
  |  |   54|    273|    do {                                  \
  |  |   55|    273|        const avifResult result__ = (A);  \
  |  |   56|    273|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 273]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    273|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 273]
  |  |  ------------------
  ------------------
 5808|    273|    if (avifDecoderItemShouldBeSkipped(gainMapItemTmp)) {
  ------------------
  |  Branch (5808:9): [True: 31, False: 242]
  ------------------
 5809|     31|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5810|     31|    }
 5811|       |
 5812|    242|    avifCodecType gainMapCodecTypeTmp;
 5813|    242|    result = avifDecoderItemReadAndParse(decoder,
 5814|    242|                                         gainMapItemTmp,
 5815|    242|                                         /*isItemInInput=*/AVIF_TRUE,
  ------------------
  |  |   88|    242|#define AVIF_TRUE 1
  ------------------
 5816|    242|                                         &data->tileInfos[AVIF_ITEM_GAIN_MAP].grid,
 5817|    242|                                         &gainMapCodecTypeTmp);
 5818|    242|    if (result == AVIF_RESULT_NOT_IMPLEMENTED) {
  ------------------
  |  Branch (5818:9): [True: 14, False: 228]
  ------------------
 5819|     14|        return AVIF_RESULT_OK;
 5820|     14|    }
 5821|    228|    AVIF_CHECKRES(result);
  ------------------
  |  |   54|    228|    do {                                  \
  |  |   55|    228|        const avifResult result__ = (A);  \
  |  |   56|    228|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 225]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|    228|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 225]
  |  |  ------------------
  ------------------
 5822|       |
 5823|       |    // This may allocate gainMapTmp.altICC which must be freed in case of error.
 5824|    225|    result = avifReadColorProperties(decoder->io,
 5825|    225|                                     &toneMappedImageItemTmp->properties,
 5826|    225|                                     &gainMapTmp.altICC,
 5827|    225|                                     &gainMapTmp.altColorPrimaries,
 5828|    225|                                     &gainMapTmp.altTransferCharacteristics,
 5829|    225|                                     &gainMapTmp.altMatrixCoefficients,
 5830|    225|                                     &gainMapTmp.altYUVRange,
 5831|    225|                                     /*cicpSet=*/NULL);
 5832|    225|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5832:9): [True: 2, False: 223]
  ------------------
 5833|      2|        avifRWDataFree(&gainMapTmp.altICC);
 5834|      2|        return result;
 5835|      2|    }
 5836|       |
 5837|    223|    const avifProperty * clliProp = avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "clli");
 5838|    223|    if (clliProp) {
  ------------------
  |  Branch (5838:9): [True: 0, False: 223]
  ------------------
 5839|      0|        gainMapTmp.altCLLI = clliProp->u.clli;
 5840|      0|    }
 5841|       |
 5842|    223|    const avifProperty * pixiProp = avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "pixi");
 5843|    223|    if (pixiProp) {
  ------------------
  |  Branch (5843:9): [True: 178, False: 45]
  ------------------
 5844|    178|        gainMapTmp.altPlaneCount = pixiProp->u.pixi.planeCount;
 5845|    178|        gainMapTmp.altDepth = pixiProp->u.pixi.planeDepths[0];
 5846|    178|    }
 5847|       |
 5848|    223|    const avifProperty * ispeProp = avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "ispe");
 5849|    223|    if (!ispeProp) {
  ------------------
  |  Branch (5849:9): [True: 5, False: 218]
  ------------------
 5850|       |        // HEIF (ISO/IEC 23008-12:2022), Section 6.5.3.1:
 5851|       |        // Every image item shall be associated with one property of this type, prior to the association
 5852|       |        // of all transformative properties.
 5853|      5|        avifDiagnosticsPrintf(data->diag, "Box[tmap] missing mandatory ispe property");
 5854|      5|        avifRWDataFree(&gainMapTmp.altICC);
 5855|      5|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 5856|      5|    }
 5857|    218|    if (ispeProp->u.ispe.width != colorItem->width || ispeProp->u.ispe.height != colorItem->height) {
  ------------------
  |  Branch (5857:9): [True: 1, False: 217]
  |  Branch (5857:55): [True: 1, False: 216]
  ------------------
 5858|      2|        avifDiagnosticsPrintf(data->diag, "Box[tmap] ispe property width/height does not match base image");
 5859|      2|        avifRWDataFree(&gainMapTmp.altICC);
 5860|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 5861|      2|    }
 5862|       |
 5863|    216|    if (avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "pasp") ||
  ------------------
  |  Branch (5863:9): [True: 0, False: 216]
  ------------------
 5864|    216|        avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "clap") ||
  ------------------
  |  Branch (5864:9): [True: 0, False: 216]
  ------------------
 5865|    216|        avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "irot") ||
  ------------------
  |  Branch (5865:9): [True: 0, False: 216]
  ------------------
 5866|    216|        avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "imir")) {
  ------------------
  |  Branch (5866:9): [True: 0, False: 216]
  ------------------
 5867|       |        // libavif requires the bitstream contain the same pasp, clap, irot, imir
 5868|       |        // properties for both the base and gain map image items used as input to
 5869|       |        // the tone-mapped derived image item. libavif also requires the tone-mapped
 5870|       |        // derived image item itself not be associated with these properties. This is
 5871|       |        // enforced at encoding. Other patterns are rejected at decoding.
 5872|      0|        avifDiagnosticsPrintf(data->diag,
 5873|      0|                              "Box[tmap] 'pasp', 'clap', 'irot' and 'imir' properties must be associated with base and gain map items instead of 'tmap'");
 5874|      0|        avifRWDataFree(&gainMapTmp.altICC);
 5875|      0|        return AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE;
 5876|      0|    }
 5877|       |
 5878|    216|    avifColorPrimaries colorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
 5879|    216|    avifTransferCharacteristics transferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
 5880|    216|    avifMatrixCoefficients matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
 5881|    216|    avifRange yuvRange = AVIF_RANGE_FULL;
 5882|    216|    avifBool cicpSet = AVIF_FALSE;
  ------------------
  |  |   89|    216|#define AVIF_FALSE 0
  ------------------
 5883|       |    // Look for a colr nclx box. Other colr box types (e.g. ICC) are not supported.
 5884|    216|    result =
 5885|    216|        avifReadColorNclxProperty(&gainMapItemTmp->properties, &colorPrimaries, &transferCharacteristics, &matrixCoefficients, &yuvRange, &cicpSet);
 5886|    216|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5886:9): [True: 2, False: 214]
  ------------------
 5887|      2|        avifRWDataFree(&gainMapTmp.altICC);
 5888|      2|        return result;
 5889|      2|    }
 5890|       |
 5891|       |    // -- Everything is valid, do memory allocations and fill in output data. --
 5892|       |
 5893|    214|    decoder->image->gainMap = avifGainMapCreate();
 5894|    214|    if (!decoder->image->gainMap) {
  ------------------
  |  Branch (5894:9): [True: 0, False: 214]
  ------------------
 5895|      0|        avifRWDataFree(&gainMapTmp.altICC);
 5896|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 5897|      0|    }
 5898|       |
 5899|    214|    if (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_GAIN_MAP) {
  ------------------
  |  Branch (5899:9): [True: 154, False: 60]
  ------------------
 5900|    154|        avifImage * image = avifImageCreateEmpty();
 5901|    154|        if (!image) {
  ------------------
  |  Branch (5901:13): [True: 0, False: 154]
  ------------------
 5902|      0|            avifRWDataFree(&gainMapTmp.altICC);
 5903|      0|            return AVIF_RESULT_OUT_OF_MEMORY;
 5904|      0|        }
 5905|    154|        if (cicpSet) {
  ------------------
  |  Branch (5905:13): [True: 94, False: 60]
  ------------------
 5906|     94|            image->colorPrimaries = colorPrimaries;
 5907|     94|            image->transferCharacteristics = transferCharacteristics;
 5908|     94|            image->matrixCoefficients = matrixCoefficients;
 5909|     94|            image->yuvRange = yuvRange;
 5910|     94|        }
 5911|    154|        gainMapTmp.image = image;
 5912|    154|    }
 5913|       |
 5914|       |    // Only set the output pointers after everything has been validated.
 5915|    214|    *decoder->image->gainMap = gainMapTmp;
 5916|    214|    *gainMapItem = gainMapItemTmp;
 5917|    214|    *gainMapCodecType = gainMapCodecTypeTmp;
 5918|    214|    return AVIF_RESULT_OK;
 5919|    214|}
read.c:avifDecoderDataFindToneMappedImageItem:
 5698|  47.7k|{
 5699|   176k|    for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5699:34): [True: 173k, False: 3.08k]
  ------------------
 5700|   173k|        avifDecoderItem * item = data->meta->items.item[itemIndex];
 5701|   173k|        if (!item->size || item->hasUnsupportedEssentialProperty || item->thumbnailForID != 0) {
  ------------------
  |  Branch (5701:13): [True: 14.9k, False: 158k]
  |  Branch (5701:28): [True: 21.1k, False: 137k]
  |  Branch (5701:69): [True: 0, False: 137k]
  ------------------
 5702|  36.1k|            continue;
 5703|  36.1k|        }
 5704|   137k|        if (!memcmp(item->type, "tmap", 4)) {
  ------------------
  |  Branch (5704:13): [True: 47.3k, False: 90.1k]
  ------------------
 5705|       |            // The tmap box should be associated (via 'iref'->'dimg') to two items:
 5706|       |            // the first one is the base image, the second one is the gain map.
 5707|  47.3k|            uint32_t dimgItemIDs[2] = { 0, 0 };
 5708|  47.3k|            uint32_t numDimgItemIDs = 0;
 5709|   380k|            for (uint32_t otherItemIndex = 0; otherItemIndex < data->meta->items.count; ++otherItemIndex) {
  ------------------
  |  Branch (5709:47): [True: 332k, False: 47.3k]
  ------------------
 5710|   332k|                avifDecoderItem * otherItem = data->meta->items.item[otherItemIndex];
 5711|   332k|                if (otherItem->dimgForID != item->id) {
  ------------------
  |  Branch (5711:21): [True: 238k, False: 94.7k]
  ------------------
 5712|   238k|                    continue;
 5713|   238k|                }
 5714|  94.7k|                if (otherItem->dimgIdx < 2) {
  ------------------
  |  Branch (5714:21): [True: 94.7k, False: 12]
  ------------------
 5715|  94.7k|                    AVIF_ASSERT_OR_RETURN(dimgItemIDs[otherItem->dimgIdx] == 0);
  ------------------
  |  |   64|  94.7k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  94.7k|    do {                        \
  |  |  |  |   46|  94.7k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 94.7k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  94.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 94.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5716|  94.7k|                    dimgItemIDs[otherItem->dimgIdx] = otherItem->id;
 5717|  94.7k|                }
 5718|  94.7k|                numDimgItemIDs++;
 5719|  94.7k|            }
 5720|       |            // Even with numDimgItemIDs == 2, one of the ids could be 0 if there are duplicate entries in the 'dimg' box.
 5721|  47.3k|            if (numDimgItemIDs != 2 || dimgItemIDs[0] == 0 || dimgItemIDs[1] == 0) {
  ------------------
  |  Branch (5721:17): [True: 5, False: 47.3k]
  |  Branch (5721:40): [True: 0, False: 47.3k]
  |  Branch (5721:63): [True: 0, False: 47.3k]
  ------------------
 5722|      5|                avifDiagnosticsPrintf(data->diag, "box[dimg] for 'tmap' item %d must have exactly 2 entries with distinct ids", item->id);
 5723|      5|                return AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE;
 5724|      5|            }
 5725|  47.3k|            if (dimgItemIDs[0] != colorItem->id) {
  ------------------
  |  Branch (5725:17): [True: 2.74k, False: 44.6k]
  ------------------
 5726|  2.74k|                continue;
 5727|  2.74k|            }
 5728|       |
 5729|  44.6k|            *toneMappedImageItem = item;
 5730|  44.6k|            *gainMapItemID = dimgItemIDs[1];
 5731|  44.6k|            return AVIF_RESULT_OK;
 5732|  47.3k|        }
 5733|   137k|    }
 5734|  3.08k|    *toneMappedImageItem = NULL;
 5735|  3.08k|    *gainMapItemID = 0;
 5736|  3.08k|    return AVIF_RESULT_OK;
 5737|  47.7k|}
read.c:avifIsPreferredAlternativeTo:
 5743|  51.5k|{
 5744|  57.1k|    for (uint32_t i = 0; i < data->meta->entityToGroups.count; ++i) {
  ------------------
  |  Branch (5744:26): [True: 48.6k, False: 8.49k]
  ------------------
 5745|  48.6k|        avifEntityToGroup * group = &data->meta->entityToGroups.groups[i];
 5746|  48.6k|        if (memcmp(group->groupingType, "altr", 4) != 0) {
  ------------------
  |  Branch (5746:13): [True: 2.75k, False: 45.9k]
  ------------------
 5747|  2.75k|            continue;
 5748|  2.75k|        }
 5749|  45.9k|        avifBool id1Found = AVIF_FALSE;
  ------------------
  |  |   89|  45.9k|#define AVIF_FALSE 0
  ------------------
 5750|  94.8k|        for (uint32_t j = 0; j < group->entityIDs.count; ++j) {
  ------------------
  |  Branch (5750:30): [True: 91.8k, False: 2.92k]
  ------------------
 5751|  91.8k|            if (group->entityIDs.ids[j] == id1) {
  ------------------
  |  Branch (5751:17): [True: 41.0k, False: 50.7k]
  ------------------
 5752|  41.0k|                id1Found = AVIF_TRUE;
  ------------------
  |  |   88|  41.0k|#define AVIF_TRUE 1
  ------------------
 5753|  50.7k|            } else if (group->entityIDs.ids[j] == id2) {
  ------------------
  |  Branch (5753:24): [True: 43.0k, False: 7.77k]
  ------------------
 5754|       |                // Assume id2 is only present in one altr group, as per ISO/IEC 14496-12:2022
 5755|       |                // Section 8.15.3.1:
 5756|       |                // Any entity_id value shall be mapped to only one grouping of type 'altr'.
 5757|  43.0k|                return id1Found;
 5758|  43.0k|            }
 5759|  91.8k|        }
 5760|  45.9k|    }
 5761|  8.49k|    return AVIF_FALSE;
  ------------------
  |  |   89|  8.49k|#define AVIF_FALSE 0
  ------------------
 5762|  51.5k|}
read.c:avifParseToneMappedImageBox:
 2206|  1.23k|{
 2207|  1.23k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[tmap]");
  ------------------
  |  |  738|  1.23k|    avifROStream VARNAME;                               \
  |  |  739|  1.23k|    avifROData VARNAME##_roData;                        \
  |  |  740|  1.23k|    VARNAME##_roData.data = PTR;                        \
  |  |  741|  1.23k|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|  1.23k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2208|       |
 2209|  1.23k|    uint8_t version;
 2210|  1.23k|    AVIF_CHECKERR(avifROStreamRead(&s, &version, 1), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE); // unsigned int(8) version = 0;
  ------------------
  |  |   45|  1.23k|    do {                        \
  |  |   46|  1.23k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.23k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.23k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.23k]
  |  |  ------------------
  ------------------
 2211|  1.23k|    if (version != 0) {
  ------------------
  |  Branch (2211:9): [True: 600, False: 636]
  ------------------
 2212|    600|        avifDiagnosticsPrintf(diag, "Box[tmap] has unsupported version [%u]", version);
 2213|    600|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2214|    600|    }
 2215|       |
 2216|    636|    uint16_t minimumVersion;
 2217|    636|    AVIF_CHECKERR(avifROStreamReadU16(&s, &minimumVersion), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE); // unsigned int(16) minimum_version;
  ------------------
  |  |   45|    636|    do {                        \
  |  |   46|    636|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 635]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    636|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 635]
  |  |  ------------------
  ------------------
 2218|    635|    const uint16_t supportedMetadataVersion = 0;
 2219|    635|    if (minimumVersion > supportedMetadataVersion) {
  ------------------
  |  Branch (2219:9): [True: 307, False: 328]
  ------------------
 2220|    307|        avifDiagnosticsPrintf(diag, "Box[tmap] has unsupported minimum version [%u]", minimumVersion);
 2221|    307|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2222|    307|    }
 2223|    328|    uint16_t writerVersion;
 2224|    328|    AVIF_CHECKERR(avifROStreamReadU16(&s, &writerVersion), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE); // unsigned int(16) writer_version;
  ------------------
  |  |   45|    328|    do {                        \
  |  |   46|    328|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 327]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    328|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 327]
  |  |  ------------------
  ------------------
 2225|    327|    AVIF_CHECKERR(writerVersion >= minimumVersion, AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE);
  ------------------
  |  |   45|    327|    do {                        \
  |  |   46|    327|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 327]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    327|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 327]
  |  |  ------------------
  ------------------
 2226|       |
 2227|    327|    AVIF_CHECKERR(avifParseGainMapMetadata(gainMap, &s), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE);
  ------------------
  |  |   45|    327|    do {                        \
  |  |   46|    327|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 16, False: 311]
  |  |  ------------------
  |  |   47|     16|            avifBreakOnError(); \
  |  |   48|     16|            return ERR;         \
  |  |   49|     16|        }                       \
  |  |   50|    327|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 311]
  |  |  ------------------
  ------------------
 2228|       |
 2229|    311|    if (writerVersion <= supportedMetadataVersion) {
  ------------------
  |  Branch (2229:9): [True: 45, False: 266]
  ------------------
 2230|     45|        AVIF_CHECKERR(avifROStreamRemainingBytes(&s) == 0, AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE);
  ------------------
  |  |   45|     45|    do {                        \
  |  |   46|     45|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 44]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|     45|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 44]
  |  |  ------------------
  ------------------
 2231|     45|    }
 2232|       |
 2233|    310|    if (avifGainMapValidateMetadata(gainMap, diag) != AVIF_RESULT_OK) {
  ------------------
  |  Branch (2233:9): [True: 37, False: 273]
  ------------------
 2234|     37|        return AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE;
 2235|     37|    }
 2236|       |
 2237|    273|    return AVIF_RESULT_OK;
 2238|    310|}
read.c:avifParseGainMapMetadata:
 2163|    327|{
 2164|    327|    uint32_t isMultichannel;
 2165|    327|    AVIF_CHECK(avifROStreamReadBitsU32(s, &isMultichannel, 1)); // unsigned int(1) is_multichannel;
  ------------------
  |  |   36|    327|    do {                        \
  |  |   37|    327|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 326]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    327|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 326]
  |  |  ------------------
  ------------------
 2166|    326|    const uint8_t channelCount = isMultichannel ? 3 : 1;
  ------------------
  |  Branch (2166:34): [True: 82, False: 244]
  ------------------
 2167|       |
 2168|    326|    uint32_t useBaseColorSpace;
 2169|    326|    AVIF_CHECK(avifROStreamReadBitsU32(s, &useBaseColorSpace, 1)); // unsigned int(1) use_base_colour_space;
  ------------------
  |  |   36|    326|    do {                        \
  |  |   37|    326|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 326]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    326|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 326]
  |  |  ------------------
  ------------------
 2170|    326|    gainMap->useBaseColorSpace = useBaseColorSpace ? AVIF_TRUE : AVIF_FALSE;
  ------------------
  |  |   88|     76|#define AVIF_TRUE 1
  ------------------
                  gainMap->useBaseColorSpace = useBaseColorSpace ? AVIF_TRUE : AVIF_FALSE;
  ------------------
  |  |   89|    576|#define AVIF_FALSE 0
  ------------------
  |  Branch (2170:34): [True: 76, False: 250]
  ------------------
 2171|       |
 2172|    326|    uint32_t reserved;
 2173|    326|    AVIF_CHECK(avifROStreamReadBitsU32(s, &reserved, 6)); // unsigned int(6) reserved;
  ------------------
  |  |   36|    326|    do {                        \
  |  |   37|    326|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 326]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    326|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 326]
  |  |  ------------------
  ------------------
 2174|       |
 2175|    326|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->baseHdrHeadroom.n));      // unsigned int(32) base_hdr_headroom_numerator;
  ------------------
  |  |   36|    326|    do {                        \
  |  |   37|    326|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 325]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    326|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 325]
  |  |  ------------------
  ------------------
 2176|    325|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->baseHdrHeadroom.d));      // unsigned int(32) base_hdr_headroom_denominator;
  ------------------
  |  |   36|    325|    do {                        \
  |  |   37|    325|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 324]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    325|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 324]
  |  |  ------------------
  ------------------
 2177|    324|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->alternateHdrHeadroom.n)); // unsigned int(32) alternate_hdr_headroom_numerator;
  ------------------
  |  |   36|    324|    do {                        \
  |  |   37|    324|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 323]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    324|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 323]
  |  |  ------------------
  ------------------
 2178|    323|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->alternateHdrHeadroom.d)); // unsigned int(32) alternate_hdr_headroom_denominator;
  ------------------
  |  |   36|    323|    do {                        \
  |  |   37|    323|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 322]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    323|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 322]
  |  |  ------------------
  ------------------
 2179|       |
 2180|    791|    for (int c = 0; c < channelCount; ++c) {
  ------------------
  |  Branch (2180:21): [True: 480, False: 311]
  ------------------
 2181|    480|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->gainMapMin[c].n)); // int(32) gain_map_min_numerator;
  ------------------
  |  |   36|    480|    do {                        \
  |  |   37|    480|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 478]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|    480|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 478]
  |  |  ------------------
  ------------------
 2182|    478|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapMin[c].d));             // unsigned int(32) gain_map_min_denominator;
  ------------------
  |  |   36|    478|    do {                        \
  |  |   37|    478|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 477]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    478|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 477]
  |  |  ------------------
  ------------------
 2183|    477|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->gainMapMax[c].n)); // int(32) gain_map_max_numerator;
  ------------------
  |  |   36|    477|    do {                        \
  |  |   37|    477|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 476]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    477|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 476]
  |  |  ------------------
  ------------------
 2184|    476|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapMax[c].d));             // unsigned int(32) gain_map_max_denominator;
  ------------------
  |  |   36|    476|    do {                        \
  |  |   37|    476|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 475]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    476|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 475]
  |  |  ------------------
  ------------------
 2185|    475|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapGamma[c].n));           // unsigned int(32) gamma_numerator;
  ------------------
  |  |   36|    475|    do {                        \
  |  |   37|    475|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 474]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    475|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 474]
  |  |  ------------------
  ------------------
 2186|    474|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapGamma[c].d));           // unsigned int(32) gamma_denominator;
  ------------------
  |  |   36|    474|    do {                        \
  |  |   37|    474|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 473]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    474|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 473]
  |  |  ------------------
  ------------------
 2187|    473|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->baseOffset[c].n)); // int(32) base_offset_numerator;
  ------------------
  |  |   36|    473|    do {                        \
  |  |   37|    473|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 472]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    473|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 472]
  |  |  ------------------
  ------------------
 2188|    472|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->baseOffset[c].d));             // unsigned int(32) base_offset_denominator;
  ------------------
  |  |   36|    472|    do {                        \
  |  |   37|    472|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 471]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    472|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 471]
  |  |  ------------------
  ------------------
 2189|    471|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->alternateOffset[c].n)); // int(32) alternate_offset_numerator;
  ------------------
  |  |   36|    471|    do {                        \
  |  |   37|    471|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 470]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    471|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 470]
  |  |  ------------------
  ------------------
 2190|    470|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->alternateOffset[c].d)); // unsigned int(32) alternate_offset_denominator;
  ------------------
  |  |   36|    470|    do {                        \
  |  |   37|    470|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 469]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    470|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 469]
  |  |  ------------------
  ------------------
 2191|    470|    }
 2192|       |
 2193|       |    // Fill the remaining values by copying those from the first channel.
 2194|    785|    for (int c = channelCount; c < 3; ++c) {
  ------------------
  |  Branch (2194:32): [True: 474, False: 311]
  ------------------
 2195|    474|        gainMap->gainMapMin[c] = gainMap->gainMapMin[0];
 2196|    474|        gainMap->gainMapMax[c] = gainMap->gainMapMax[0];
 2197|    474|        gainMap->gainMapGamma[c] = gainMap->gainMapGamma[0];
 2198|    474|        gainMap->baseOffset[c] = gainMap->baseOffset[0];
 2199|    474|        gainMap->alternateOffset[c] = gainMap->alternateOffset[0];
 2200|    474|    }
 2201|    311|    return AVIF_TRUE;
  ------------------
  |  |   88|    311|#define AVIF_TRUE 1
  ------------------
 2202|    322|}
read.c:avifReadColorNclxProperty:
 5632|   250k|{
 5633|   250k|    assert(cicpSet == NULL || *cicpSet == AVIF_FALSE);
 5634|   250k|    avifBool colrNCLXSeen = AVIF_FALSE;
  ------------------
  |  |   89|   250k|#define AVIF_FALSE 0
  ------------------
 5635|  1.40M|    for (uint32_t propertyIndex = 0; propertyIndex < properties->count; ++propertyIndex) {
  ------------------
  |  Branch (5635:38): [True: 1.15M, False: 250k]
  ------------------
 5636|  1.15M|        avifProperty * prop = &properties->prop[propertyIndex];
 5637|  1.15M|        if (!memcmp(prop->type, "colr", 4) && prop->u.colr.hasNCLX) {
  ------------------
  |  Branch (5637:13): [True: 88.9k, False: 1.06M]
  |  Branch (5637:47): [True: 2.45k, False: 86.5k]
  ------------------
 5638|  2.45k|            if (colrNCLXSeen) {
  ------------------
  |  Branch (5638:17): [True: 5, False: 2.45k]
  ------------------
 5639|      5|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5640|      5|            }
 5641|  2.45k|            colrNCLXSeen = AVIF_TRUE;
  ------------------
  |  |   88|  2.45k|#define AVIF_TRUE 1
  ------------------
 5642|  2.45k|            if (cicpSet != NULL) {
  ------------------
  |  Branch (5642:17): [True: 2.30k, False: 144]
  ------------------
 5643|  2.30k|                *cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|  2.30k|#define AVIF_TRUE 1
  ------------------
 5644|  2.30k|            }
 5645|  2.45k|            *colorPrimaries = prop->u.colr.colorPrimaries;
 5646|  2.45k|            *transferCharacteristics = prop->u.colr.transferCharacteristics;
 5647|  2.45k|            *matrixCoefficients = prop->u.colr.matrixCoefficients;
 5648|  2.45k|            *yuvRange = prop->u.colr.range;
 5649|  2.45k|        }
 5650|  1.15M|    }
 5651|   250k|    return AVIF_RESULT_OK;
 5652|   250k|}
read.c:avifDecoderDataFindSampleTransformImageItem:
 6006|   218k|{
 6007|   757k|    for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (6007:34): [True: 539k, False: 218k]
  ------------------
 6008|   539k|        avifDecoderItem * item = data->meta->items.item[itemIndex];
 6009|   539k|        if (!memcmp(item->type, "sato", 4) && item->id != data->meta->primaryItemID && item->size != 0 &&
  ------------------
  |  Branch (6009:13): [True: 10.1k, False: 529k]
  |  Branch (6009:47): [True: 10.1k, False: 0]
  |  Branch (6009:88): [True: 8.51k, False: 1.63k]
  ------------------
 6010|  8.51k|            !item->hasUnsupportedEssentialProperty && item->thumbnailForID == 0 &&
  ------------------
  |  Branch (6010:13): [True: 6.88k, False: 1.63k]
  |  Branch (6010:55): [True: 6.88k, False: 0]
  ------------------
 6011|  6.88k|            avifIsPreferredAlternativeTo(data, item->id, data->meta->primaryItemID)) {
  ------------------
  |  Branch (6011:13): [True: 264, False: 6.61k]
  ------------------
 6012|    264|            return item;
 6013|    264|        }
 6014|   539k|    }
 6015|   218k|    return NULL;
 6016|   218k|}
read.c:avifDecoderItemRead:
 1424|  1.18M|{
 1425|  1.18M|    if (item->mergedExtents.data && !item->partialMergedExtents) {
  ------------------
  |  Branch (1425:9): [True: 894k, False: 295k]
  |  Branch (1425:37): [True: 260, False: 894k]
  ------------------
 1426|       |        // Multiple extents have already been concatenated for this item, just return it
 1427|    260|        if (offset >= item->mergedExtents.size) {
  ------------------
  |  Branch (1427:13): [True: 0, False: 260]
  ------------------
 1428|      0|            avifDiagnosticsPrintf(diag, "Item ID %u read has overflowing offset", item->id);
 1429|      0|            return AVIF_RESULT_TRUNCATED_DATA;
 1430|      0|        }
 1431|    260|        outData->data = item->mergedExtents.data + offset;
 1432|    260|        outData->size = item->mergedExtents.size - offset;
 1433|    260|        return AVIF_RESULT_OK;
 1434|    260|    }
 1435|       |
 1436|  1.18M|    if (item->extents.count == 0) {
  ------------------
  |  Branch (1436:9): [True: 0, False: 1.18M]
  ------------------
 1437|      0|        avifDiagnosticsPrintf(diag, "Item ID %u has zero extents", item->id);
 1438|      0|        return AVIF_RESULT_TRUNCATED_DATA;
 1439|      0|    }
 1440|       |
 1441|       |    // Find this item's source of all extents' data, based on the construction method
 1442|  1.18M|    const avifRWData * idatBuffer = NULL;
 1443|  1.18M|    if (item->idatStored) {
  ------------------
  |  Branch (1443:9): [True: 1.06k, False: 1.18M]
  ------------------
 1444|       |        // construction_method: idat(1)
 1445|       |
 1446|  1.06k|        if (item->meta->idat.size > 0) {
  ------------------
  |  Branch (1446:13): [True: 1.05k, False: 4]
  ------------------
 1447|  1.05k|            idatBuffer = &item->meta->idat;
 1448|  1.05k|        } else {
 1449|       |            // no associated idat box was found in the meta box, bail out
 1450|      4|            avifDiagnosticsPrintf(diag, "Item ID %u is stored in an idat, but no associated idat box was found", item->id);
 1451|      4|            return AVIF_RESULT_NO_CONTENT;
 1452|      4|        }
 1453|  1.06k|    }
 1454|       |
 1455|       |    // Merge extents into a single contiguous buffer
 1456|  1.18M|    if ((io->sizeHint > 0) && (item->size > io->sizeHint)) {
  ------------------
  |  Branch (1456:9): [True: 390k, False: 798k]
  |  Branch (1456:31): [True: 45, False: 390k]
  ------------------
 1457|       |        // Sanity check: somehow the sum of extents exceeds the entire file or idat size!
 1458|     45|        avifDiagnosticsPrintf(diag, "Item ID %u reported size failed size hint sanity check. Truncated data?", item->id);
 1459|     45|        return AVIF_RESULT_TRUNCATED_DATA;
 1460|     45|    }
 1461|       |
 1462|  1.18M|    if (offset >= item->size) {
  ------------------
  |  Branch (1462:9): [True: 0, False: 1.18M]
  ------------------
 1463|      0|        avifDiagnosticsPrintf(diag, "Item ID %u read has overflowing offset", item->id);
 1464|      0|        return AVIF_RESULT_TRUNCATED_DATA;
 1465|      0|    }
 1466|  1.18M|    const size_t maxOutputSize = item->size - offset;
 1467|  1.18M|    const size_t readOutputSize = (partialByteCount && (partialByteCount < maxOutputSize)) ? partialByteCount : maxOutputSize;
  ------------------
  |  Branch (1467:36): [True: 1.13M, False: 51.4k]
  |  Branch (1467:56): [True: 555k, False: 582k]
  ------------------
 1468|  1.18M|    const size_t totalBytesToRead = offset + readOutputSize;
 1469|       |
 1470|       |    // If there is a single extent for this item and the source of the read buffer is going to be
 1471|       |    // persistent for the lifetime of the avifDecoder (whether it comes from its own internal
 1472|       |    // idatBuffer or from a known-persistent IO), we can avoid buffer duplication and just use the
 1473|       |    // preexisting buffer.
 1474|  1.18M|    avifBool singlePersistentBuffer = ((item->extents.count == 1) && (idatBuffer || io->persistent));
  ------------------
  |  Branch (1474:40): [True: 530k, False: 658k]
  |  Branch (1474:71): [True: 122, False: 530k]
  |  Branch (1474:85): [True: 244k, False: 285k]
  ------------------
 1475|  1.18M|    if (!singlePersistentBuffer) {
  ------------------
  |  Branch (1475:9): [True: 944k, False: 244k]
  ------------------
 1476|       |        // Always allocate the item's full size here, as progressive image decodes will do partial
 1477|       |        // reads into this buffer and begin feeding the buffer to the underlying AV1 decoder, but
 1478|       |        // will then write more into this buffer without flushing the AV1 decoder (which is still
 1479|       |        // holding the address of the previous allocation of this buffer). This strategy avoids
 1480|       |        // use-after-free issues in the AV1 decoder and unnecessary reallocs as a typical
 1481|       |        // progressive decode use case will eventually decode the final layer anyway.
 1482|   944k|        AVIF_CHECKRES(avifRWDataRealloc(&item->mergedExtents, item->size));
  ------------------
  |  |   54|   944k|    do {                                  \
  |  |   55|   944k|        const avifResult result__ = (A);  \
  |  |   56|   944k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 944k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   944k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 944k]
  |  |  ------------------
  ------------------
 1483|   944k|        item->ownsMergedExtents = AVIF_TRUE;
  ------------------
  |  |   88|   944k|#define AVIF_TRUE 1
  ------------------
 1484|   944k|    }
 1485|       |
 1486|       |    // Set this until we manage to fill the entire mergedExtents buffer
 1487|  1.18M|    item->partialMergedExtents = AVIF_TRUE;
  ------------------
  |  |   88|  1.18M|#define AVIF_TRUE 1
  ------------------
 1488|       |
 1489|  1.18M|    size_t writeOffset = 0; // Write offset for item->mergedExtents.data
 1490|  1.18M|    size_t remainingBytes = totalBytesToRead;
 1491|  1.31M|    for (uint32_t extentIter = 0; extentIter < item->extents.count; ++extentIter) {
  ------------------
  |  Branch (1491:35): [True: 1.31M, False: 0]
  ------------------
 1492|  1.31M|        avifExtent * extent = &item->extents.extent[extentIter];
 1493|       |
 1494|  1.31M|        size_t bytesToRead = extent->size;
 1495|  1.31M|        if (bytesToRead > remainingBytes) {
  ------------------
  |  Branch (1495:13): [True: 554k, False: 761k]
  ------------------
 1496|   554k|            bytesToRead = remainingBytes;
 1497|   554k|        }
 1498|       |
 1499|  1.31M|        avifROData offsetBuffer;
 1500|  1.31M|        if (idatBuffer) {
  ------------------
  |  Branch (1500:13): [True: 1.98k, False: 1.31M]
  ------------------
 1501|  1.98k|            if (extent->offset > idatBuffer->size) {
  ------------------
  |  Branch (1501:17): [True: 22, False: 1.96k]
  ------------------
 1502|     22|                avifDiagnosticsPrintf(diag, "Item ID %u has impossible extent offset in idat buffer", item->id);
 1503|     22|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1504|     22|            }
 1505|       |            // Since extent->offset (a uint64_t) is not bigger than idatBuffer->size (a size_t),
 1506|       |            // it is safe to cast extent->offset to size_t.
 1507|  1.96k|            const size_t extentOffset = (size_t)extent->offset;
 1508|  1.96k|            if (extent->size > idatBuffer->size - extentOffset) {
  ------------------
  |  Branch (1508:17): [True: 3, False: 1.96k]
  ------------------
 1509|      3|                avifDiagnosticsPrintf(diag, "Item ID %u has impossible extent size in idat buffer", item->id);
 1510|      3|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1511|      3|            }
 1512|  1.96k|            offsetBuffer.data = idatBuffer->data + extentOffset;
 1513|  1.96k|            offsetBuffer.size = idatBuffer->size - extentOffset;
 1514|  1.31M|        } else {
 1515|       |            // construction_method: file(0)
 1516|       |
 1517|  1.31M|            if ((io->sizeHint > 0) && (extent->offset > io->sizeHint)) {
  ------------------
  |  Branch (1517:17): [True: 422k, False: 891k]
  |  Branch (1517:39): [True: 83, False: 422k]
  ------------------
 1518|     83|                avifDiagnosticsPrintf(diag, "Item ID %u extent offset failed size hint sanity check. Truncated data?", item->id);
 1519|     83|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1520|     83|            }
 1521|  1.31M|            avifResult readResult = io->read(io, 0, extent->offset, bytesToRead, &offsetBuffer);
 1522|  1.31M|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (1522:17): [True: 790k, False: 523k]
  ------------------
 1523|   790k|                return readResult;
 1524|   790k|            }
 1525|   523k|            if (bytesToRead != offsetBuffer.size) {
  ------------------
  |  Branch (1525:17): [True: 251, False: 523k]
  ------------------
 1526|    251|                avifDiagnosticsPrintf(diag,
 1527|    251|                                      "Item ID %u tried to read %zu bytes, but only received %zu bytes",
 1528|    251|                                      item->id,
 1529|    251|                                      bytesToRead,
 1530|    251|                                      offsetBuffer.size);
 1531|    251|                return AVIF_RESULT_TRUNCATED_DATA;
 1532|    251|            }
 1533|   523k|        }
 1534|       |
 1535|   525k|        if (singlePersistentBuffer) {
  ------------------
  |  Branch (1535:13): [True: 84.1k, False: 441k]
  ------------------
 1536|  84.1k|            item->mergedExtents.data = (uint8_t *)offsetBuffer.data; // const_cast
 1537|  84.1k|            AVIF_ASSERT_OR_RETURN(bytesToRead <= offsetBuffer.size);
  ------------------
  |  |   64|  84.1k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  84.1k|    do {                        \
  |  |  |  |   46|  84.1k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 84.1k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  84.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 84.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1538|  84.1k|            item->mergedExtents.size = bytesToRead;
 1539|   441k|        } else {
 1540|   441k|            AVIF_ASSERT_OR_RETURN(item->ownsMergedExtents);
  ------------------
  |  |   64|   441k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   441k|    do {                        \
  |  |  |  |   46|   441k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 441k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   441k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 441k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1541|   441k|            AVIF_ASSERT_OR_RETURN(writeOffset < item->mergedExtents.size);
  ------------------
  |  |   64|   441k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   441k|    do {                        \
  |  |  |  |   46|   441k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 441k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   441k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 441k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1542|   441k|            AVIF_ASSERT_OR_RETURN(bytesToRead <= item->mergedExtents.size - writeOffset);
  ------------------
  |  |   64|   441k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   441k|    do {                        \
  |  |  |  |   46|   441k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 441k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   441k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 441k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1543|   441k|            memcpy(item->mergedExtents.data + writeOffset, offsetBuffer.data, bytesToRead);
 1544|   441k|            writeOffset += bytesToRead;
 1545|   441k|        }
 1546|       |
 1547|   525k|        remainingBytes -= bytesToRead;
 1548|   525k|        if (remainingBytes == 0) {
  ------------------
  |  Branch (1548:13): [True: 398k, False: 127k]
  ------------------
 1549|       |            // This happens when partialByteCount is set
 1550|   398k|            break;
 1551|   398k|        }
 1552|   525k|    }
 1553|   398k|    if (remainingBytes != 0) {
  ------------------
  |  Branch (1553:9): [True: 0, False: 398k]
  ------------------
 1554|       |        // This should be impossible?
 1555|      0|        avifDiagnosticsPrintf(diag, "Item ID %u has %zu unexpected trailing bytes", item->id, remainingBytes);
 1556|      0|        return AVIF_RESULT_TRUNCATED_DATA;
 1557|      0|    }
 1558|       |
 1559|   398k|    outData->data = item->mergedExtents.data + offset;
 1560|   398k|    outData->size = readOutputSize;
 1561|   398k|    item->partialMergedExtents = (item->size != totalBytesToRead);
 1562|   398k|    return AVIF_RESULT_OK;
 1563|   398k|}
read.c:avifParseSampleTransformImageBox:
 2282|    166|{
 2283|    166|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[sato]");
  ------------------
  |  |  738|    166|    avifROStream VARNAME;                               \
  |  |  739|    166|    avifROData VARNAME##_roData;                        \
  |  |  740|    166|    VARNAME##_roData.data = PTR;                        \
  |  |  741|    166|    VARNAME##_roData.size = SIZE;                       \
  |  |  742|    166|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2284|       |
 2285|    166|    uint8_t version, reserved, bitDepth;
 2286|    166|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &version, /*bitCount=*/2), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(2) version = 0;
  ------------------
  |  |   45|    166|    do {                        \
  |  |   46|    166|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 166]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    166|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 166]
  |  |  ------------------
  ------------------
 2287|    166|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) reserved;
  ------------------
  |  |   45|    166|    do {                        \
  |  |   46|    166|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 166]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    166|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 166]
  |  |  ------------------
  ------------------
 2288|    166|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &bitDepth, /*bitCount=*/2), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(2) bit_depth;
  ------------------
  |  |   45|    166|    do {                        \
  |  |   46|    166|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 166]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    166|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 166]
  |  |  ------------------
  ------------------
 2289|    166|    AVIF_CHECKERR(version == 0, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    166|    do {                        \
  |  |   46|    166|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 164]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|    166|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 164]
  |  |  ------------------
  ------------------
 2290|    164|    AVIF_CHECKERR(bitDepth == AVIF_SAMPLE_TRANSFORM_BIT_DEPTH_32, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    164|    do {                        \
  |  |   46|    164|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 163]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    164|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 163]
  |  |  ------------------
  ------------------
 2291|       |
 2292|    163|    const avifResult result = avifParseSampleTransformTokens(&s, expression);
 2293|    163|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (2293:9): [True: 40, False: 123]
  ------------------
 2294|     40|        avifArrayDestroy(expression);
 2295|     40|        return result;
 2296|     40|    }
 2297|    123|    if (!avifSampleTransformExpressionIsValid(expression, numInputImageItems)) {
  ------------------
  |  Branch (2297:9): [True: 12, False: 111]
  ------------------
 2298|     12|        avifArrayDestroy(expression);
 2299|     12|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2300|     12|    }
 2301|    111|    return AVIF_RESULT_OK;
 2302|    123|}
read.c:avifParseSampleTransformTokens:
 2242|    163|{
 2243|    163|    uint8_t tokenCount;
 2244|    163|    AVIF_CHECKERR(avifROStreamRead(s, &tokenCount, /*size=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) token_count;
  ------------------
  |  |   45|    163|    do {                        \
  |  |   46|    163|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 162]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    163|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 162]
  |  |  ------------------
  ------------------
 2245|    162|    AVIF_CHECKERR(tokenCount != 0, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    162|    do {                        \
  |  |   46|    162|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 161]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    162|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 161]
  |  |  ------------------
  ------------------
 2246|    161|    AVIF_CHECKERR(avifArrayCreate(expression, sizeof(expression->tokens[0]), tokenCount), AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|    161|    do {                        \
  |  |   46|    161|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 161]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    161|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 161]
  |  |  ------------------
  ------------------
 2247|       |
 2248|  3.49k|    for (uint32_t t = 0; t < tokenCount; ++t) {
  ------------------
  |  Branch (2248:26): [True: 3.35k, False: 144]
  ------------------
 2249|  3.35k|        avifSampleTransformToken * token = (avifSampleTransformToken *)avifArrayPush(expression);
 2250|  3.35k|        AVIF_CHECKERR(token != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  3.35k|    do {                        \
  |  |   46|  3.35k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.35k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.35k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.35k]
  |  |  ------------------
  ------------------
 2251|       |
 2252|  3.35k|        uint8_t tokenValue;
 2253|  3.35k|        AVIF_CHECKERR(avifROStreamRead(s, &tokenValue, /*size=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) token;
  ------------------
  |  |   45|  3.35k|    do {                        \
  |  |   46|  3.35k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 16, False: 3.33k]
  |  |  ------------------
  |  |   47|     16|            avifBreakOnError(); \
  |  |   48|     16|            return ERR;         \
  |  |   49|     16|        }                       \
  |  |   50|  3.35k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.33k]
  |  |  ------------------
  ------------------
 2254|  3.33k|        if (tokenValue == AVIF_SAMPLE_TRANSFORM_CONSTANT) {
  ------------------
  |  Branch (2254:13): [True: 269, False: 3.06k]
  ------------------
 2255|    269|            token->type = AVIF_SAMPLE_TRANSFORM_CONSTANT;
 2256|       |            // Two's complement representation is assumed here.
 2257|    269|            uint32_t constant;
 2258|    269|            AVIF_CHECKERR(avifROStreamReadU32(s, &constant), AVIF_RESULT_BMFF_PARSE_FAILED); // signed int(1<<(bit_depth+3)) constant;
  ------------------
  |  |   45|    269|    do {                        \
  |  |   46|    269|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 268]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    269|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 268]
  |  |  ------------------
  ------------------
 2259|    268|            token->constant = (int32_t)constant;
 2260|  3.06k|        } else if (tokenValue <= AVIF_SAMPLE_TRANSFORM_LAST_INPUT_IMAGE_ITEM_INDEX) {
  ------------------
  |  Branch (2260:20): [True: 610, False: 2.45k]
  ------------------
 2261|    610|            AVIF_ASSERT_OR_RETURN(tokenValue >= AVIF_SAMPLE_TRANSFORM_FIRST_INPUT_IMAGE_ITEM_INDEX);
  ------------------
  |  |   64|    610|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    610|    do {                        \
  |  |  |  |   46|    610|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 610]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    610|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 610]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2262|    610|            token->type = AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX;
 2263|    610|            token->inputImageItemIndex = tokenValue;
 2264|  2.45k|        } else if (tokenValue >= AVIF_SAMPLE_TRANSFORM_FIRST_UNARY_OPERATOR && tokenValue <= AVIF_SAMPLE_TRANSFORM_LAST_UNARY_OPERATOR) {
  ------------------
  |  Branch (2264:20): [True: 1.97k, False: 486]
  |  Branch (2264:80): [True: 91, False: 1.88k]
  ------------------
 2265|     91|            token->type = (avifSampleTransformTokenType)tokenValue; // unary operator
 2266|  2.36k|        } else if (tokenValue >= AVIF_SAMPLE_TRANSFORM_FIRST_BINARY_OPERATOR && tokenValue <= AVIF_SAMPLE_TRANSFORM_LAST_BINARY_OPERATOR) {
  ------------------
  |  Branch (2266:20): [True: 1.34k, False: 1.02k]
  |  Branch (2266:81): [True: 593, False: 748]
  ------------------
 2267|    593|            token->type = (avifSampleTransformTokenType)tokenValue; // binary operator
 2268|  1.77k|        } else {
 2269|  1.77k|            token->type = AVIF_SAMPLE_TRANSFORM_RESERVED;
 2270|  1.77k|        }
 2271|  3.33k|    }
 2272|    144|    AVIF_CHECKERR(avifROStreamRemainingBytes(s) == 0, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    144|    do {                        \
  |  |   46|    144|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 21, False: 123]
  |  |  ------------------
  |  |   47|     21|            avifBreakOnError(); \
  |  |   48|     21|            return ERR;         \
  |  |   49|     21|        }                       \
  |  |   50|    144|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 123]
  |  |  ------------------
  ------------------
 2273|    123|    return AVIF_RESULT_OK;
 2274|    144|}
read.c:avifDecoderSampleTransformItemValidateProperties:
 2323|    111|{
 2324|    111|    AVIF_ASSERT_OR_RETURN(memcmp(satoItem->type, "sato", 4) == 0);
  ------------------
  |  |   64|    111|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    111|    do {                        \
  |  |  |  |   46|    111|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 111]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    111|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 111]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2325|    111|    const avifProperty * pixiProp = avifPropertyArrayFind(&satoItem->properties, "pixi");
 2326|    111|    if (!pixiProp) {
  ------------------
  |  Branch (2326:9): [True: 1, False: 110]
  ------------------
 2327|      1|        avifDiagnosticsPrintf(diag, "Item ID %u of type 'sato' is missing mandatory pixi property", satoItem->id);
 2328|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2329|      1|    }
 2330|    330|    for (uint8_t i = 1; i < pixiProp->u.pixi.planeCount; ++i) {
  ------------------
  |  Branch (2330:25): [True: 220, False: 110]
  ------------------
 2331|       |        // This is enforced in avifParsePixelInformationProperty().
 2332|    220|        AVIF_ASSERT_OR_RETURN(pixiProp->u.pixi.planeDepths[i] == pixiProp->u.pixi.planeDepths[0]);
  ------------------
  |  |   64|    220|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    220|    do {                        \
  |  |  |  |   46|    220|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 220]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    220|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 220]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2333|    220|    }
 2334|    110|    AVIF_ASSERT_OR_RETURN(pixiProp->u.pixi.planeCount >= 1);
  ------------------
  |  |   64|    110|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    110|    do {                        \
  |  |  |  |   46|    110|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 110]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    110|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 110]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2335|    110|    const uint8_t depth = pixiProp->u.pixi.planeDepths[0];
 2336|    110|    if (depth != 8 && depth != 10 && depth != 12 && depth != 16) {
  ------------------
  |  Branch (2336:9): [True: 109, False: 1]
  |  Branch (2336:23): [True: 109, False: 0]
  |  Branch (2336:38): [True: 105, False: 4]
  |  Branch (2336:53): [True: 0, False: 105]
  ------------------
 2337|      0|        avifDiagnosticsPrintf(diag,
 2338|      0|                              "Item ID %u of type 'sato' with depth %u (specified by pixi property) is not supported",
 2339|      0|                              satoItem->id,
 2340|      0|                              depth);
 2341|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2342|      0|    }
 2343|       |
 2344|    110|    const avifProperty * ispeProp = avifPropertyArrayFind(&satoItem->properties, "ispe");
 2345|    110|    if (!ispeProp) {
  ------------------
  |  Branch (2345:9): [True: 1, False: 109]
  ------------------
 2346|      1|        avifDiagnosticsPrintf(diag, "Item ID %u of type 'sato' is missing mandatory ispe property", satoItem->id);
 2347|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2348|      1|    }
 2349|       |
 2350|       |    // Check that all input image items of the 'sato' derived image item share the same properties.
 2351|    109|    for (uint32_t i = 0; i < satoItem->meta->items.count; ++i) {
  ------------------
  |  Branch (2351:26): [True: 109, False: 0]
  ------------------
 2352|    109|        avifDecoderItem * inputImageItem = satoItem->meta->items.item[i];
 2353|    109|        if (inputImageItem->dimgForID != satoItem->id) {
  ------------------
  |  Branch (2353:13): [True: 0, False: 109]
  ------------------
 2354|      0|            continue;
 2355|      0|        }
 2356|       |
 2357|       |        // Require all input image items of the 'sato' derived image item to be associated with a ImageSpatialExtentsProperty.
 2358|    109|        const avifProperty * inputImageItemIspeProp = avifPropertyArrayFind(&inputImageItem->properties, "ispe");
 2359|    109|        if (inputImageItemIspeProp == NULL) {
  ------------------
  |  Branch (2359:13): [True: 0, False: 109]
  ------------------
 2360|      0|            avifDiagnosticsPrintf(diag, "Item ID %u is missing mandatory ispe property", inputImageItem->id);
 2361|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2362|      0|        }
 2363|       |
 2364|       |        // The codec configuration property must be present, at least on the first cell for a 'grid' item.
 2365|    109|        const avifProperty * inputImageItemCodecConfig = avifDecoderItemCodecConfigOrFirstCellCodecConfig(inputImageItem);
 2366|    109|        if (inputImageItemCodecConfig == NULL) {
  ------------------
  |  Branch (2366:13): [True: 1, False: 108]
  ------------------
 2367|      1|            avifDiagnosticsPrintf(diag,
 2368|      1|                                  "Item ID %u of type '%.4s' is missing mandatory codec configuration property",
 2369|      1|                                  inputImageItem->id,
 2370|      1|                                  (const char *)inputImageItem->type);
 2371|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2372|      1|        }
 2373|       |
 2374|    318|        for (uint32_t j = i + 1; j < satoItem->meta->items.count; ++j) {
  ------------------
  |  Branch (2374:34): [True: 216, False: 102]
  ------------------
 2375|    216|            avifDecoderItem * otherInputImageItem = satoItem->meta->items.item[j];
 2376|    216|            if (otherInputImageItem->dimgForID != satoItem->id) {
  ------------------
  |  Branch (2376:17): [True: 108, False: 108]
  ------------------
 2377|    108|                continue;
 2378|    108|            }
 2379|       |
 2380|       |            // Require all input image items of the 'sato' derived image item to be associated with a ImageSpatialExtentsProperty.
 2381|    108|            const avifProperty * otherInputImageItemIspeProp = avifPropertyArrayFind(&otherInputImageItem->properties, "ispe");
 2382|    108|            if (otherInputImageItemIspeProp == NULL) {
  ------------------
  |  Branch (2382:17): [True: 0, False: 108]
  ------------------
 2383|      0|                avifDiagnosticsPrintf(diag,
 2384|      0|                                      "Item ID %u of type '%.4s' is missing mandatory ispe property",
 2385|      0|                                      otherInputImageItem->id,
 2386|      0|                                      (const char *)otherInputImageItem->type);
 2387|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2388|      0|            }
 2389|       |
 2390|    108|            if (inputImageItemIspeProp->u.ispe.width != otherInputImageItemIspeProp->u.ispe.width ||
  ------------------
  |  Branch (2390:17): [True: 0, False: 108]
  ------------------
 2391|    108|                inputImageItemIspeProp->u.ispe.height != otherInputImageItemIspeProp->u.ispe.height) {
  ------------------
  |  Branch (2391:17): [True: 0, False: 108]
  ------------------
 2392|      0|                avifDiagnosticsPrintf(diag,
 2393|      0|                                      "The fields of the ispe property of item ID %u of type '%.4s' differs from item ID %u",
 2394|      0|                                      inputImageItem->id,
 2395|      0|                                      (const char *)inputImageItem->type,
 2396|      0|                                      otherInputImageItem->id);
 2397|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2398|      0|            }
 2399|       |
 2400|       |            // The codec configuration property must be present, at least on the first cell for a 'grid' item.
 2401|    108|            const avifProperty * otherInputImageItemCodecConfig = avifDecoderItemCodecConfigOrFirstCellCodecConfig(otherInputImageItem);
 2402|    108|            if (otherInputImageItemCodecConfig == NULL) {
  ------------------
  |  Branch (2402:17): [True: 2, False: 106]
  ------------------
 2403|      2|                avifDiagnosticsPrintf(diag,
 2404|      2|                                      "Item ID %u of type '%.4s' is missing mandatory codec configuration property",
 2405|      2|                                      otherInputImageItem->id,
 2406|      2|                                      (const char *)otherInputImageItem->type);
 2407|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2408|      2|            }
 2409|       |
 2410|    106|            if (inputImageItemCodecConfig->u.av1C.monochrome != otherInputImageItemCodecConfig->u.av1C.monochrome ||
  ------------------
  |  Branch (2410:17): [True: 1, False: 105]
  ------------------
 2411|    105|                inputImageItemCodecConfig->u.av1C.chromaSubsamplingX != otherInputImageItemCodecConfig->u.av1C.chromaSubsamplingX ||
  ------------------
  |  Branch (2411:17): [True: 1, False: 104]
  ------------------
 2412|    104|                inputImageItemCodecConfig->u.av1C.chromaSubsamplingY != otherInputImageItemCodecConfig->u.av1C.chromaSubsamplingY ||
  ------------------
  |  Branch (2412:17): [True: 1, False: 103]
  ------------------
 2413|    103|                inputImageItemCodecConfig->u.av1C.chromaSamplePosition != otherInputImageItemCodecConfig->u.av1C.chromaSamplePosition) {
  ------------------
  |  Branch (2413:17): [True: 1, False: 102]
  ------------------
 2414|      4|                avifDiagnosticsPrintf(diag,
 2415|      4|                                      "The plane count or subsampling in the codec configuration property of item ID %u of type '%.4s' differs from item ID %u",
 2416|      4|                                      inputImageItem->id,
 2417|      4|                                      (const char *)inputImageItem->type,
 2418|      4|                                      otherInputImageItem->id);
 2419|      4|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2420|      4|            }
 2421|       |
 2422|       |            // If the input image item of the 'sato' derived image item is itself a grid,
 2423|       |            // its own input image items will be checked in avifDecoderItemValidateProperties().
 2424|    106|        }
 2425|    102|        break;
 2426|    108|    }
 2427|       |
 2428|    102|    AVIF_CHECKERR(avifPropertyArrayFind(&satoItem->properties, "clap") == NULL, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    102|    do {                        \
  |  |   46|    102|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 102]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    102|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 102]
  |  |  ------------------
  ------------------
 2429|    102|    return AVIF_RESULT_OK;
 2430|    102|}
read.c:avifDecoderItemCodecConfigOrFirstCellCodecConfig:
 2305|    217|{
 2306|    217|    if (!memcmp(item->type, "grid", 4)) {
  ------------------
  |  Branch (2306:9): [True: 0, False: 217]
  ------------------
 2307|       |        // In case of a grid, return the codec configuration property of the first cell.
 2308|       |        // avifDecoderAdoptGridTileCodecType() copies that property from the first cell to the grid item anyway.
 2309|      0|        for (uint32_t i = 0; i < item->meta->items.count; ++i) {
  ------------------
  |  Branch (2309:30): [True: 0, False: 0]
  ------------------
 2310|      0|            avifDecoderItem * inputImageItem = item->meta->items.item[i];
 2311|      0|            if (inputImageItem->dimgForID == item->id) {
  ------------------
  |  Branch (2311:17): [True: 0, False: 0]
  ------------------
 2312|      0|                return avifPropertyArrayFind(&inputImageItem->properties,
 2313|      0|                                             avifGetConfigurationPropertyName(avifGetCodecType(inputImageItem->type)));
 2314|      0|            }
 2315|      0|        }
 2316|       |        // The number of tiles was verified in avifDecoderItemReadAndParse().
 2317|      0|        assert(AVIF_FALSE);
 2318|      0|    }
 2319|    217|    return avifPropertyArrayFind(&item->properties, avifGetConfigurationPropertyName(avifGetCodecType(item->type)));
 2320|    217|}
read.c:avifDecoderAdoptGridTileCodecTypeIfNeeded:
 1679|   251k|{
 1680|   251k|    if ((info->grid.rows > 0) && (info->grid.columns > 0)) {
  ------------------
  |  Branch (1680:9): [True: 11.5k, False: 239k]
  |  Branch (1680:34): [True: 11.5k, False: 0]
  ------------------
 1681|       |        // The number of tiles was verified in avifDecoderItemReadAndParse().
 1682|  11.5k|        const uint32_t numTiles = info->grid.rows * info->grid.columns;
 1683|  11.5k|        uint32_t * dimgIdxToItemIdx = (uint32_t *)avifAlloc(numTiles * sizeof(uint32_t));
 1684|  11.5k|        AVIF_CHECKERR(dimgIdxToItemIdx != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  11.5k|    do {                        \
  |  |   46|  11.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 11.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  11.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 11.5k]
  |  |  ------------------
  ------------------
 1685|  11.5k|        avifResult result = avifFillDimgIdxToItemIdxArray(dimgIdxToItemIdx, numTiles, item);
 1686|  11.5k|        if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (1686:13): [True: 11.5k, False: 0]
  ------------------
 1687|  11.5k|            result = avifDecoderAdoptGridTileCodecType(decoder, item, dimgIdxToItemIdx, numTiles);
 1688|  11.5k|        }
 1689|  11.5k|        avifFree(dimgIdxToItemIdx);
 1690|  11.5k|        AVIF_CHECKRES(result);
  ------------------
  |  |   54|  11.5k|    do {                                  \
  |  |   55|  11.5k|        const avifResult result__ = (A);  \
  |  |   56|  11.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 99, False: 11.4k]
  |  |  ------------------
  |  |   57|     99|            avifBreakOnError();           \
  |  |   58|     99|            return result__;              \
  |  |   59|     99|        }                                 \
  |  |   60|  11.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
 1691|  11.5k|    }
 1692|   250k|    return AVIF_RESULT_OK;
 1693|   251k|}
read.c:avifFillDimgIdxToItemIdxArray:
 1581|  22.8k|{
 1582|  22.8k|    const uint32_t itemIndexNotSet = UINT32_MAX;
 1583|  74.6k|    for (uint32_t dimgIdx = 0; dimgIdx < numExpectedTiles; ++dimgIdx) {
  ------------------
  |  Branch (1583:32): [True: 51.7k, False: 22.8k]
  ------------------
 1584|  51.7k|        dimgIdxToItemIdx[dimgIdx] = itemIndexNotSet;
 1585|  51.7k|    }
 1586|  22.8k|    uint32_t numTiles = 0;
 1587|   179k|    for (uint32_t i = 0; i < gridItem->meta->items.count; ++i) {
  ------------------
  |  Branch (1587:26): [True: 156k, False: 22.8k]
  ------------------
 1588|   156k|        if (gridItem->meta->items.item[i]->dimgForID == gridItem->id) {
  ------------------
  |  Branch (1588:13): [True: 51.7k, False: 104k]
  ------------------
 1589|  51.7k|            const uint32_t tileItemDimgIdx = gridItem->meta->items.item[i]->dimgIdx;
 1590|  51.7k|            AVIF_CHECKERR(tileItemDimgIdx < numExpectedTiles, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  51.7k|    do {                        \
  |  |   46|  51.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 51.7k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  51.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 51.7k]
  |  |  ------------------
  ------------------
 1591|  51.7k|            AVIF_CHECKERR(dimgIdxToItemIdx[tileItemDimgIdx] == itemIndexNotSet, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  51.7k|    do {                        \
  |  |   46|  51.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 51.7k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  51.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 51.7k]
  |  |  ------------------
  ------------------
 1592|  51.7k|            dimgIdxToItemIdx[tileItemDimgIdx] = i;
 1593|  51.7k|            ++numTiles;
 1594|  51.7k|        }
 1595|   156k|    }
 1596|       |    // The number of tiles has been verified in avifDecoderItemReadAndParse().
 1597|  22.8k|    AVIF_ASSERT_OR_RETURN(numTiles == numExpectedTiles);
  ------------------
  |  |   64|  22.8k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  22.8k|    do {                        \
  |  |  |  |   46|  22.8k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 22.8k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  22.8k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 22.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1598|  22.8k|    return AVIF_RESULT_OK;
 1599|  22.8k|}
read.c:avifDecoderAdoptGridTileCodecType:
 1607|  11.5k|{
 1608|  11.5k|    avifDecoderItem * firstTileItem = NULL;
 1609|  37.3k|    for (uint32_t dimgIdx = 0; dimgIdx < numTiles; ++dimgIdx) {
  ------------------
  |  Branch (1609:32): [True: 25.9k, False: 11.4k]
  ------------------
 1610|  25.9k|        const uint32_t itemIdx = dimgIdxToItemIdx[dimgIdx];
 1611|  25.9k|        AVIF_ASSERT_OR_RETURN(itemIdx < gridItem->meta->items.count);
  ------------------
  |  |   64|  25.9k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  25.9k|    do {                        \
  |  |  |  |   46|  25.9k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 25.9k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  25.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 25.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1612|  25.9k|        avifDecoderItem * item = gridItem->meta->items.item[itemIdx];
 1613|       |
 1614|       |        // According to HEIF (ISO 14496-12), Section 6.6.2.3.1, the SingleItemTypeReferenceBox of type 'dimg'
 1615|       |        // identifies the input images of the derived image item of type 'grid'. Since the reference_count
 1616|       |        // shall be equal to rows*columns, unknown tile item types cannot be skipped but must be considered
 1617|       |        // as errors.
 1618|  25.9k|        const avifCodecType tileCodecType = avifGetCodecType(item->type);
 1619|  25.9k|        if (tileCodecType == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (1619:13): [True: 61, False: 25.8k]
  ------------------
 1620|     61|            char type[4];
 1621|    305|            for (int j = 0; j < 4; j++) {
  ------------------
  |  Branch (1621:29): [True: 244, False: 61]
  ------------------
 1622|    244|                if (isprint((unsigned char)item->type[j])) {
  ------------------
  |  Branch (1622:21): [True: 77, False: 167]
  ------------------
 1623|     77|                    type[j] = item->type[j];
 1624|    167|                } else {
 1625|    167|                    type[j] = '.';
 1626|    167|                }
 1627|    244|            }
 1628|     61|            avifDiagnosticsPrintf(&decoder->diag,
 1629|     61|                                  "Tile item ID %u has an unknown item type '%.4s' (%02x%02x%02x%02x)",
 1630|     61|                                  item->id,
 1631|     61|                                  type,
 1632|     61|                                  item->type[0],
 1633|     61|                                  item->type[1],
 1634|     61|                                  item->type[2],
 1635|     61|                                  item->type[3]);
 1636|     61|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1637|     61|        }
 1638|       |
 1639|  25.8k|        if (item->hasUnsupportedEssentialProperty) {
  ------------------
  |  Branch (1639:13): [True: 34, False: 25.8k]
  ------------------
 1640|       |            // An essential property isn't supported by libavif; can't
 1641|       |            // decode a grid image if any tile in the grid isn't supported.
 1642|     34|            avifDiagnosticsPrintf(&decoder->diag, "Grid image contains tile with an unsupported property marked as essential");
 1643|     34|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1644|     34|        }
 1645|       |
 1646|  25.8k|        if (firstTileItem == NULL) {
  ------------------
  |  Branch (1646:13): [True: 11.4k, False: 14.4k]
  ------------------
 1647|  11.4k|            firstTileItem = item;
 1648|       |            // Adopt the configuration property of the first image item tile, so that it can be queried from
 1649|       |            // the top-level color/alpha item during avifDecoderReset().
 1650|  11.4k|            const avifCodecType codecType = avifGetCodecType(item->type);
 1651|  11.4k|            const char * configPropName = avifGetConfigurationPropertyName(codecType);
 1652|  11.4k|            const avifProperty * srcProp = avifPropertyArrayFind(&item->properties, configPropName);
 1653|  11.4k|            if (!srcProp) {
  ------------------
  |  Branch (1653:17): [True: 4, False: 11.4k]
  ------------------
 1654|      4|                avifDiagnosticsPrintf(&decoder->diag, "Grid image's first tile is missing an %s property", configPropName);
 1655|      4|                return AVIF_RESULT_INVALID_IMAGE_GRID;
 1656|      4|            }
 1657|  11.4k|            avifProperty * dstProp = (avifProperty *)avifArrayPush(&gridItem->properties);
 1658|  11.4k|            AVIF_CHECKERR(dstProp != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  11.4k|    do {                        \
  |  |   46|  11.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 11.4k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  11.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
 1659|  11.4k|            *dstProp = *srcProp;
 1660|       |
 1661|  14.4k|        } else if (memcmp(item->type, firstTileItem->type, 4)) {
  ------------------
  |  Branch (1661:20): [True: 0, False: 14.4k]
  ------------------
 1662|       |            // MIAF (ISO 23000-22:2019), Section 7.3.11.4.1:
 1663|       |            //   All input images of a grid image item shall use the same coding format [...]
 1664|       |            // The coding format is defined by the item type.
 1665|      0|            avifDiagnosticsPrintf(&decoder->diag,
 1666|      0|                                  "Tile item ID %u of type '%.4s' differs from other tile type '%.4s'",
 1667|      0|                                  item->id,
 1668|      0|                                  (const char *)item->type,
 1669|      0|                                  (const char *)firstTileItem->type);
 1670|      0|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1671|      0|        }
 1672|  25.8k|    }
 1673|  11.4k|    return AVIF_RESULT_OK;
 1674|  11.5k|}
read.c:avifDecoderGenerateImageTiles:
 6019|   250k|{
 6020|   250k|    const uint32_t previousTileCount = decoder->data->tiles.count;
 6021|   250k|    if ((info->grid.rows > 0) && (info->grid.columns > 0)) {
  ------------------
  |  Branch (6021:9): [True: 11.3k, False: 239k]
  |  Branch (6021:34): [True: 11.3k, False: 0]
  ------------------
 6022|       |        // The number of tiles was verified in avifDecoderItemReadAndParse().
 6023|  11.3k|        const uint32_t numTiles = info->grid.rows * info->grid.columns;
 6024|  11.3k|        uint32_t * dimgIdxToItemIdx = (uint32_t *)avifAlloc(numTiles * sizeof(uint32_t));
 6025|  11.3k|        AVIF_CHECKERR(dimgIdxToItemIdx != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  11.3k|    do {                        \
  |  |   46|  11.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  11.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
 6026|  11.3k|        avifResult result = avifFillDimgIdxToItemIdxArray(dimgIdxToItemIdx, numTiles, item);
 6027|  11.3k|        if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (6027:13): [True: 11.3k, False: 0]
  ------------------
 6028|  11.3k|            result = avifDecoderGenerateImageGridTiles(decoder, item, itemCategory, dimgIdxToItemIdx, numTiles);
 6029|  11.3k|        }
 6030|  11.3k|        avifFree(dimgIdxToItemIdx);
 6031|  11.3k|        AVIF_CHECKRES(result);
  ------------------
  |  |   54|  11.3k|    do {                                  \
  |  |   55|  11.3k|        const avifResult result__ = (A);  \
  |  |   56|  11.3k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 11, False: 11.3k]
  |  |  ------------------
  |  |   57|     11|            avifBreakOnError();           \
  |  |   58|     11|            return result__;              \
  |  |   59|     11|        }                                 \
  |  |   60|  11.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 11.3k]
  |  |  ------------------
  ------------------
 6032|   239k|    } else {
 6033|   239k|        AVIF_CHECKERR(item->size != 0, AVIF_RESULT_MISSING_IMAGE_ITEM);
  ------------------
  |  |   45|   239k|    do {                        \
  |  |   46|   239k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 239k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   239k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 239k]
  |  |  ------------------
  ------------------
 6034|       |
 6035|   239k|        const avifCodecType codecType = avifGetCodecType(item->type);
 6036|   239k|        AVIF_ASSERT_OR_RETURN(codecType != AVIF_CODEC_TYPE_UNKNOWN);
  ------------------
  |  |   64|   239k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   239k|    do {                        \
  |  |  |  |   46|   239k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 239k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   239k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 239k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6037|   239k|        avifTile * tile =
 6038|   239k|            avifDecoderDataCreateTile(decoder->data, codecType, item->width, item->height, avifDecoderItemOperatingPoint(item));
 6039|   239k|        AVIF_CHECKERR(tile, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   239k|    do {                        \
  |  |   46|   239k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 239k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   239k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 239k]
  |  |  ------------------
  ------------------
 6040|   239k|        AVIF_CHECKRES(avifCodecDecodeInputFillFromDecoderItem(tile->input,
  ------------------
  |  |   54|   239k|    do {                                  \
  |  |   55|   239k|        const avifResult result__ = (A);  \
  |  |   56|   239k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 370, False: 238k]
  |  |  ------------------
  |  |   57|    370|            avifBreakOnError();           \
  |  |   58|    370|            return result__;              \
  |  |   59|    370|        }                                 \
  |  |   60|   239k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 238k]
  |  |  ------------------
  ------------------
 6041|   239k|                                                              item,
 6042|   239k|                                                              decoder->allowProgressive,
 6043|   239k|                                                              decoder->imageCountLimit,
 6044|   239k|                                                              decoder->io->sizeHint,
 6045|   239k|                                                              &decoder->diag));
 6046|   238k|        tile->input->itemCategory = itemCategory;
 6047|   238k|    }
 6048|   250k|    info->tileCount = decoder->data->tiles.count - previousTileCount;
 6049|   250k|    return AVIF_RESULT_OK;
 6050|   250k|}
read.c:avifDecoderGenerateImageGridTiles:
 1701|  11.3k|{
 1702|  11.3k|    avifBool progressive = AVIF_TRUE;
  ------------------
  |  |   88|  11.3k|#define AVIF_TRUE 1
  ------------------
 1703|  37.0k|    for (uint32_t dimgIdx = 0; dimgIdx < numTiles; ++dimgIdx) {
  ------------------
  |  Branch (1703:32): [True: 25.6k, False: 11.3k]
  ------------------
 1704|  25.6k|        const uint32_t itemIdx = dimgIdxToItemIdx[dimgIdx];
 1705|  25.6k|        AVIF_ASSERT_OR_RETURN(itemIdx < gridItem->meta->items.count);
  ------------------
  |  |   64|  25.6k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  25.6k|    do {                        \
  |  |  |  |   46|  25.6k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 25.6k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  25.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 25.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1706|  25.6k|        avifDecoderItem * item = gridItem->meta->items.item[itemIdx];
 1707|       |
 1708|  25.6k|        const avifCodecType tileCodecType = avifGetCodecType(item->type);
 1709|  25.6k|        AVIF_CHECKERR(tileCodecType != AVIF_CODEC_TYPE_UNKNOWN, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  25.6k|    do {                        \
  |  |   46|  25.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 25.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  25.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 25.6k]
  |  |  ------------------
  ------------------
 1710|  25.6k|        const avifTile * tile =
 1711|  25.6k|            avifDecoderDataCreateTile(decoder->data, tileCodecType, item->width, item->height, avifDecoderItemOperatingPoint(item));
 1712|  25.6k|        AVIF_CHECKERR(tile != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  25.6k|    do {                        \
  |  |   46|  25.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 25.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  25.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 25.6k]
  |  |  ------------------
  ------------------
 1713|  25.6k|        AVIF_CHECKRES(avifCodecDecodeInputFillFromDecoderItem(tile->input,
  ------------------
  |  |   54|  25.6k|    do {                                  \
  |  |   55|  25.6k|        const avifResult result__ = (A);  \
  |  |   56|  25.6k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 11, False: 25.6k]
  |  |  ------------------
  |  |   57|     11|            avifBreakOnError();           \
  |  |   58|     11|            return result__;              \
  |  |   59|     11|        }                                 \
  |  |   60|  25.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 25.6k]
  |  |  ------------------
  ------------------
 1714|  25.6k|                                                              item,
 1715|  25.6k|                                                              decoder->allowProgressive,
 1716|  25.6k|                                                              decoder->imageCountLimit,
 1717|  25.6k|                                                              decoder->io->sizeHint,
 1718|  25.6k|                                                              &decoder->diag));
 1719|  25.6k|        tile->input->itemCategory = itemCategory;
 1720|       |
 1721|  25.6k|        if (!item->progressive) {
  ------------------
  |  Branch (1721:13): [True: 25.6k, False: 0]
  ------------------
 1722|  25.6k|            progressive = AVIF_FALSE;
  ------------------
  |  |   89|  25.6k|#define AVIF_FALSE 0
  ------------------
 1723|  25.6k|        }
 1724|  25.6k|    }
 1725|  11.3k|    if (itemCategory == AVIF_ITEM_COLOR && progressive) {
  ------------------
  |  Branch (1725:9): [True: 10.2k, False: 1.07k]
  |  Branch (1725:44): [True: 0, False: 10.2k]
  ------------------
 1726|       |        // If all the items that make up the grid are progressive, then propagate that status to the top-level grid item.
 1727|      0|        gridItem->progressive = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
 1728|      0|    }
 1729|  11.3k|    return AVIF_RESULT_OK;
 1730|  11.3k|}
read.c:avifDecoderItemOperatingPoint:
 1232|   264k|{
 1233|   264k|    const avifProperty * a1opProp = avifPropertyArrayFind(&item->properties, "a1op");
 1234|   264k|    if (a1opProp) {
  ------------------
  |  Branch (1234:9): [True: 0, False: 264k]
  ------------------
 1235|      0|        return a1opProp->u.a1op.opIndex;
 1236|      0|    }
 1237|   264k|    return 0; // default
 1238|   264k|}
read.c:avifCodecDecodeInputFillFromDecoderItem:
  619|   264k|{
  620|   264k|    if (sizeHint && (item->size > sizeHint)) {
  ------------------
  |  Branch (620:9): [True: 111k, False: 153k]
  |  Branch (620:21): [True: 378, False: 111k]
  ------------------
  621|    378|        avifDiagnosticsPrintf(diag, "Exceeded avifIO's sizeHint, possibly truncated data");
  622|    378|        return AVIF_RESULT_BMFF_PARSE_FAILED;
  623|    378|    }
  624|       |
  625|   264k|    uint8_t layerCount = 0;
  626|   264k|    size_t layerSizes[4] = { 0 };
  627|   264k|    const avifProperty * a1lxProp = avifPropertyArrayFind(&item->properties, "a1lx");
  628|   264k|    if (a1lxProp) {
  ------------------
  |  Branch (628:9): [True: 670, False: 263k]
  ------------------
  629|       |        // Calculate layer count and all layer sizes from the a1lx box, and then validate
  630|       |
  631|    670|        size_t remainingSize = item->size;
  632|  1.34k|        for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (632:25): [True: 1.33k, False: 3]
  ------------------
  633|  1.33k|            ++layerCount;
  634|       |
  635|  1.33k|            const size_t layerSize = (size_t)a1lxProp->u.a1lx.layerSize[i];
  636|  1.33k|            if (layerSize) {
  ------------------
  |  Branch (636:17): [True: 675, False: 664]
  ------------------
  637|    675|                if (layerSize >= remainingSize) { // >= instead of > because there must be room for the last layer
  ------------------
  |  Branch (637:21): [True: 3, False: 672]
  ------------------
  638|      3|                    avifDiagnosticsPrintf(diag, "a1lx layer index [%d] does not fit in item size", i);
  639|      3|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
  640|      3|                }
  641|    672|                layerSizes[i] = layerSize;
  642|    672|                remainingSize -= layerSize;
  643|    672|            } else {
  644|    664|                layerSizes[i] = remainingSize;
  645|    664|                remainingSize = 0;
  646|    664|                break;
  647|    664|            }
  648|  1.33k|        }
  649|    667|        if (remainingSize > 0) {
  ------------------
  |  Branch (649:13): [True: 3, False: 664]
  ------------------
  650|      3|            AVIF_ASSERT_OR_RETURN(layerCount == 3);
  ------------------
  |  |   64|      3|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|      3|    do {                        \
  |  |  |  |   46|      3|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|      3|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  651|      3|            ++layerCount;
  652|      3|            layerSizes[3] = remainingSize;
  653|      3|        }
  654|    667|    }
  655|       |
  656|   264k|    const avifProperty * lselProp = avifPropertyArrayFind(&item->properties, "lsel");
  657|       |    // Progressive images offer layers via the a1lxProp, but don't specify a layer selection with lsel.
  658|       |    //
  659|       |    // For backward compatibility with earlier drafts of AVIF spec v1.1.0, treat an absent lsel as
  660|       |    // equivalent to layer_id == 0xFFFF during the transitional period. Remove !lselProp when the test
  661|       |    // images have been updated to the v1.1.0 spec.
  662|   264k|    item->progressive = (a1lxProp && (!lselProp || (lselProp->u.lsel.layerID == 0xFFFF)));
  ------------------
  |  Branch (662:26): [True: 667, False: 263k]
  |  Branch (662:39): [True: 667, False: 0]
  |  Branch (662:52): [True: 0, False: 0]
  ------------------
  663|   264k|    if (lselProp && (lselProp->u.lsel.layerID != 0xFFFF)) {
  ------------------
  |  Branch (663:9): [True: 0, False: 264k]
  |  Branch (663:21): [True: 0, False: 0]
  ------------------
  664|       |        // Layer selection. This requires that the underlying AV1 codec decodes all layers,
  665|       |        // and then only returns the requested layer as a single frame. To the user of libavif,
  666|       |        // this appears to be a single frame.
  667|       |
  668|      0|        decodeInput->allLayers = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
  669|       |
  670|      0|        size_t sampleSize = 0;
  671|      0|        if (layerCount > 0) {
  ------------------
  |  Branch (671:13): [True: 0, False: 0]
  ------------------
  672|       |            // Optimization: If we're selecting a layer that doesn't require the entire image's payload (hinted via the a1lx box)
  673|       |
  674|      0|            if (lselProp->u.lsel.layerID >= layerCount) {
  ------------------
  |  Branch (674:17): [True: 0, False: 0]
  ------------------
  675|      0|                avifDiagnosticsPrintf(diag,
  676|      0|                                      "lsel property requests layer index [%u] which isn't present in a1lx property ([%u] layers)",
  677|      0|                                      lselProp->u.lsel.layerID,
  678|      0|                                      layerCount);
  679|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  680|      0|            }
  681|       |
  682|      0|            for (uint8_t i = 0; i <= lselProp->u.lsel.layerID; ++i) {
  ------------------
  |  Branch (682:33): [True: 0, False: 0]
  ------------------
  683|      0|                sampleSize += layerSizes[i];
  684|      0|            }
  685|      0|        } else {
  686|       |            // This layer's payload subsection is unknown, just use the whole payload
  687|      0|            sampleSize = item->size;
  688|      0|        }
  689|       |
  690|      0|        avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  691|      0|        AVIF_CHECKERR(sample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|      0|    do {                        \
  |  |   46|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  692|      0|        sample->itemID = item->id;
  693|      0|        sample->offset = 0;
  694|      0|        sample->size = sampleSize;
  695|      0|        AVIF_ASSERT_OR_RETURN(lselProp->u.lsel.layerID < AVIF_MAX_AV1_LAYER_COUNT);
  ------------------
  |  |   64|      0|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|      0|    do {                        \
  |  |  |  |   46|      0|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      0|        sample->spatialID = (uint8_t)lselProp->u.lsel.layerID;
  697|      0|        sample->sync = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
  698|   264k|    } else if (allowProgressive && item->progressive) {
  ------------------
  |  Branch (698:16): [True: 0, False: 264k]
  |  Branch (698:36): [True: 0, False: 0]
  ------------------
  699|       |        // Progressive image. Decode all layers and expose them all to the user.
  700|       |
  701|      0|        if (imageCountLimit && (layerCount > imageCountLimit)) {
  ------------------
  |  Branch (701:13): [True: 0, False: 0]
  |  Branch (701:32): [True: 0, False: 0]
  ------------------
  702|      0|            avifDiagnosticsPrintf(diag, "Exceeded avifDecoder's imageCountLimit (progressive)");
  703|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
  704|      0|        }
  705|       |
  706|      0|        decodeInput->allLayers = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
  707|       |
  708|      0|        size_t offset = 0;
  709|      0|        for (int i = 0; i < layerCount; ++i) {
  ------------------
  |  Branch (709:25): [True: 0, False: 0]
  ------------------
  710|      0|            avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  711|      0|            AVIF_CHECKERR(sample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|      0|    do {                        \
  |  |   46|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  712|      0|            sample->itemID = item->id;
  713|      0|            sample->offset = offset;
  714|      0|            sample->size = layerSizes[i];
  715|      0|            sample->spatialID = AVIF_SPATIAL_ID_UNSET;
  ------------------
  |  |  461|      0|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  716|      0|            sample->sync = (i == 0); // Assume all layers depend on the first layer
  717|       |
  718|      0|            offset += layerSizes[i];
  719|      0|        }
  720|   264k|    } else {
  721|       |        // Typical case: Use the entire item's payload for a single frame output
  722|       |
  723|   264k|        avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  724|   264k|        AVIF_CHECKERR(sample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   264k|    do {                        \
  |  |   46|   264k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 264k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   264k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 264k]
  |  |  ------------------
  ------------------
  725|   264k|        sample->itemID = item->id;
  726|   264k|        sample->offset = 0;
  727|   264k|        sample->size = item->size;
  728|   264k|        sample->spatialID = AVIF_SPATIAL_ID_UNSET;
  ------------------
  |  |  461|   264k|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  729|   264k|        sample->sync = AVIF_TRUE;
  ------------------
  |  |   88|   264k|#define AVIF_TRUE 1
  ------------------
  730|   264k|    }
  731|   264k|    return AVIF_RESULT_OK;
  732|   264k|}
read.c:avifDecoderItemValidateProperties:
 1244|   250k|{
 1245|   250k|    const avifProperty * const configProp = avifPropertyArrayFind(&item->properties, configPropName);
 1246|   250k|    if (!configProp) {
  ------------------
  |  Branch (1246:9): [True: 5, False: 250k]
  ------------------
 1247|       |        // An item configuration property box is mandatory in all valid AVIF configurations. Bail out.
 1248|      5|        avifDiagnosticsPrintf(diag, "Item ID %u of type '%.4s' is missing mandatory %s property", item->id, (const char *)item->type, configPropName);
 1249|      5|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 1250|      5|    }
 1251|       |
 1252|   250k|    if (!memcmp(item->type, "grid", 4)) {
  ------------------
  |  Branch (1252:9): [True: 11.3k, False: 238k]
  ------------------
 1253|  88.6k|        for (uint32_t i = 0; i < item->meta->items.count; ++i) {
  ------------------
  |  Branch (1253:30): [True: 77.3k, False: 11.3k]
  ------------------
 1254|  77.3k|            avifDecoderItem * tile = item->meta->items.item[i];
 1255|  77.3k|            if (tile->dimgForID != item->id) {
  ------------------
  |  Branch (1255:17): [True: 51.6k, False: 25.6k]
  ------------------
 1256|  51.6k|                continue;
 1257|  51.6k|            }
 1258|       |            // Tile item types were checked in avifDecoderGenerateImageTiles(), no need to do it here.
 1259|       |
 1260|       |            // MIAF (ISO 23000-22:2019), Section 7.3.11.4.1:
 1261|       |            //   All input images of a grid image item shall use the same [...] chroma sampling format,
 1262|       |            //   and the same decoder configuration (see 7.3.6.2).
 1263|       |
 1264|       |            // The chroma sampling format is part of the decoder configuration.
 1265|  25.6k|            const avifProperty * tileConfigProp = avifPropertyArrayFind(&tile->properties, configPropName);
 1266|  25.6k|            if (!tileConfigProp) {
  ------------------
  |  Branch (1266:17): [True: 3, False: 25.6k]
  ------------------
 1267|      3|                avifDiagnosticsPrintf(diag,
 1268|      3|                                      "Tile item ID %u of type '%.4s' is missing mandatory %s property",
 1269|      3|                                      tile->id,
 1270|      3|                                      (const char *)tile->type,
 1271|      3|                                      configPropName);
 1272|      3|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1273|      3|            }
 1274|       |            // configProp was copied from a tile item to the grid item. Comparing tileConfigProp with it
 1275|       |            // is equivalent to comparing tileConfigProp with the configPropName from the first tile.
 1276|  25.6k|            if ((tileConfigProp->u.av1C.seqProfile != configProp->u.av1C.seqProfile) ||
  ------------------
  |  Branch (1276:17): [True: 2, False: 25.6k]
  ------------------
 1277|  25.6k|                (tileConfigProp->u.av1C.seqLevelIdx0 != configProp->u.av1C.seqLevelIdx0) ||
  ------------------
  |  Branch (1277:17): [True: 1, False: 25.6k]
  ------------------
 1278|  25.6k|                (tileConfigProp->u.av1C.seqTier0 != configProp->u.av1C.seqTier0) ||
  ------------------
  |  Branch (1278:17): [True: 1, False: 25.6k]
  ------------------
 1279|  25.6k|                (tileConfigProp->u.av1C.highBitdepth != configProp->u.av1C.highBitdepth) ||
  ------------------
  |  Branch (1279:17): [True: 1, False: 25.6k]
  ------------------
 1280|  25.6k|                (tileConfigProp->u.av1C.twelveBit != configProp->u.av1C.twelveBit) ||
  ------------------
  |  Branch (1280:17): [True: 1, False: 25.6k]
  ------------------
 1281|  25.6k|                (tileConfigProp->u.av1C.monochrome != configProp->u.av1C.monochrome) ||
  ------------------
  |  Branch (1281:17): [True: 1, False: 25.6k]
  ------------------
 1282|  25.6k|                (tileConfigProp->u.av1C.chromaSubsamplingX != configProp->u.av1C.chromaSubsamplingX) ||
  ------------------
  |  Branch (1282:17): [True: 0, False: 25.6k]
  ------------------
 1283|  25.6k|                (tileConfigProp->u.av1C.chromaSubsamplingY != configProp->u.av1C.chromaSubsamplingY) ||
  ------------------
  |  Branch (1283:17): [True: 0, False: 25.6k]
  ------------------
 1284|  25.6k|                (tileConfigProp->u.av1C.chromaSamplePosition != configProp->u.av1C.chromaSamplePosition)) {
  ------------------
  |  Branch (1284:17): [True: 0, False: 25.6k]
  ------------------
 1285|      7|                avifDiagnosticsPrintf(diag,
 1286|      7|                                      "The fields of the %s property of tile item ID %u of type '%.4s' differs from other tiles",
 1287|      7|                                      configPropName,
 1288|      7|                                      tile->id,
 1289|      7|                                      (const char *)tile->type);
 1290|      7|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1291|      7|            }
 1292|  25.6k|        }
 1293|  11.3k|    }
 1294|       |
 1295|   250k|    const avifProperty * pixiProp = avifPropertyArrayFind(&item->properties, "pixi");
 1296|   250k|    if (!pixiProp && (strictFlags & AVIF_STRICT_PIXI_REQUIRED)) {
  ------------------
  |  Branch (1296:9): [True: 932, False: 249k]
  |  Branch (1296:22): [True: 18, False: 914]
  ------------------
 1297|       |        // A pixi box is mandatory in all valid AVIF configurations. Bail out.
 1298|     18|        avifDiagnosticsPrintf(diag,
 1299|     18|                              "[Strict] Item ID %u of type '%.4s' is missing mandatory pixi property",
 1300|     18|                              item->id,
 1301|     18|                              (const char *)item->type);
 1302|     18|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 1303|     18|    }
 1304|       |
 1305|   250k|    if (pixiProp) {
  ------------------
  |  Branch (1305:9): [True: 249k, False: 914]
  ------------------
 1306|   249k|        const uint32_t configDepth = avifCodecConfigurationBoxGetDepth(&configProp->u.av1C);
 1307|   943k|        for (uint8_t i = 0; i < pixiProp->u.pixi.planeCount; ++i) {
  ------------------
  |  Branch (1307:29): [True: 693k, False: 249k]
  ------------------
 1308|   693k|            if (pixiProp->u.pixi.planeDepths[i] != configDepth) {
  ------------------
  |  Branch (1308:17): [True: 7, False: 693k]
  ------------------
 1309|       |                // pixi depth must match configuration property depth
 1310|      7|                avifDiagnosticsPrintf(diag,
 1311|      7|                                      "Item ID %u depth specified by pixi property [%u] does not match %s property depth [%u]",
 1312|      7|                                      item->id,
 1313|      7|                                      pixiProp->u.pixi.planeDepths[i],
 1314|      7|                                      configPropName,
 1315|      7|                                      configDepth);
 1316|      7|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1317|      7|            }
 1318|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI)
 1319|       |            if (pixiProp->u.pixi.subsamplingFlag[i]) {
 1320|       |                if (pixiProp->u.pixi.subsamplingType[i] != avifCodecConfigurationBoxGetSubsamplingType(&configProp->u.av1C, i)) {
 1321|       |                    avifDiagnosticsPrintf(diag,
 1322|       |                                          "Item ID %u subsampling type specified by pixi property [%u] for channel %u does not match %s property [%u,%u]",
 1323|       |                                          item->id,
 1324|       |                                          pixiProp->u.pixi.subsamplingType[i],
 1325|       |                                          i,
 1326|       |                                          configPropName,
 1327|       |                                          configProp->u.av1C.chromaSubsamplingX,
 1328|       |                                          configProp->u.av1C.chromaSubsamplingY);
 1329|       |                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 1330|       |                }
 1331|       |                if (configProp->u.av1C.chromaSamplePosition != AVIF_CHROMA_SAMPLE_POSITION_UNKNOWN) {
 1332|       |                    const avifChromaSamplePosition expectedChromaSamplePosition =
 1333|       |                        i == AVIF_CHAN_Y ? AVIF_CHROMA_SAMPLE_POSITION_COLOCATED : configProp->u.av1C.chromaSamplePosition;
 1334|       |                    if (avifSubsamplingLocationToChromaSamplePosition(pixiProp->u.pixi.subsamplingType[i],
 1335|       |                                                                      pixiProp->u.pixi.subsamplingLocation[i]) !=
 1336|       |                        expectedChromaSamplePosition) {
 1337|       |                        avifDiagnosticsPrintf(diag,
 1338|       |                                              "Item ID %u subsampling type and location specified by pixi property [%u,%u] for channel %u does not match %s property chroma sample position [%u]",
 1339|       |                                              item->id,
 1340|       |                                              pixiProp->u.pixi.subsamplingType[i],
 1341|       |                                              pixiProp->u.pixi.subsamplingLocation[i],
 1342|       |                                              i,
 1343|       |                                              configPropName,
 1344|       |                                              configProp->u.av1C.chromaSamplePosition);
 1345|       |                        return AVIF_RESULT_BMFF_PARSE_FAILED;
 1346|       |                    }
 1347|       |                }
 1348|       |            }
 1349|       |#endif // AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI
 1350|   693k|        }
 1351|   249k|    }
 1352|       |
 1353|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 1354|       |    if (item->miniBoxPixelFormat != AVIF_PIXEL_FORMAT_NONE) {
 1355|       |        // This is a MinimizedImageBox ('mini').
 1356|       |
 1357|       |        avifPixelFormat av1CPixelFormat;
 1358|       |        if (configProp->u.av1C.monochrome) {
 1359|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV400;
 1360|       |        } else if (configProp->u.av1C.chromaSubsamplingY == 1) {
 1361|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV420;
 1362|       |        } else if (configProp->u.av1C.chromaSubsamplingX == 1) {
 1363|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV422;
 1364|       |        } else {
 1365|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV444;
 1366|       |        }
 1367|       |        if (item->miniBoxPixelFormat != av1CPixelFormat) {
 1368|       |            avifDiagnosticsPrintf(diag,
 1369|       |                                  "Item ID %u format [%s] specified by MinimizedImageBox does not match %s property format [%s]",
 1370|       |                                  item->id,
 1371|       |                                  avifPixelFormatToString(item->miniBoxPixelFormat),
 1372|       |                                  configPropName,
 1373|       |                                  avifPixelFormatToString(av1CPixelFormat));
 1374|       |            return AVIF_RESULT_BMFF_PARSE_FAILED;
 1375|       |        }
 1376|       |
 1377|       |        if (configProp->u.av1C.chromaSamplePosition == /*CSP_UNKNOWN=*/0) {
 1378|       |            // Section 6.4.2. Color config semantics of AV1 specification says:
 1379|       |            //   CSP_UNKNOWN - the source video transfer function must be signaled outside the AV1 bitstream
 1380|       |            // See https://aomediacodec.github.io/av1-spec/#color-config-semantics
 1381|       |
 1382|       |            // So item->miniBoxChromaSamplePosition can differ and will override the AV1 value.
 1383|       |        } else if ((uint8_t)item->miniBoxChromaSamplePosition != configProp->u.av1C.chromaSamplePosition) {
 1384|       |            avifDiagnosticsPrintf(diag,
 1385|       |                                  "Item ID %u chroma sample position [%u] specified by MinimizedImageBox does not match %s property chroma sample position [%u]",
 1386|       |                                  item->id,
 1387|       |                                  (uint32_t)item->miniBoxChromaSamplePosition,
 1388|       |                                  configPropName,
 1389|       |                                  configProp->u.av1C.chromaSamplePosition);
 1390|       |            return AVIF_RESULT_BMFF_PARSE_FAILED;
 1391|       |        }
 1392|       |    }
 1393|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 1394|       |
 1395|   250k|    if (strictFlags & AVIF_STRICT_CLAP_VALID) {
  ------------------
  |  Branch (1395:9): [True: 250k, False: 0]
  ------------------
 1396|   250k|        const avifProperty * clapProp = avifPropertyArrayFind(&item->properties, "clap");
 1397|   250k|        if (clapProp) {
  ------------------
  |  Branch (1397:13): [True: 0, False: 250k]
  ------------------
 1398|      0|            const avifProperty * ispeProp = avifPropertyArrayFind(&item->properties, "ispe");
 1399|      0|            if (!ispeProp) {
  ------------------
  |  Branch (1399:17): [True: 0, False: 0]
  ------------------
 1400|      0|                avifDiagnosticsPrintf(diag,
 1401|      0|                                      "[Strict] Item ID %u is missing an ispe property, so its clap property cannot be validated",
 1402|      0|                                      item->id);
 1403|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1404|      0|            }
 1405|       |
 1406|      0|            avifCropRect cropRect;
 1407|      0|            const uint32_t imageW = ispeProp->u.ispe.width;
 1408|      0|            const uint32_t imageH = ispeProp->u.ispe.height;
 1409|      0|            const avifBool validClap = avifCropRectFromCleanApertureBox(&cropRect, &clapProp->u.clap, imageW, imageH, diag);
 1410|      0|            if (!validClap) {
  ------------------
  |  Branch (1410:17): [True: 0, False: 0]
  ------------------
 1411|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1412|      0|            }
 1413|      0|        }
 1414|   250k|    }
 1415|   250k|    return AVIF_RESULT_OK;
 1416|   250k|}
read.c:avifCodecConfigurationBoxGetDepth:
  383|   261k|{
  384|   261k|    if (av1C->twelveBit) {
  ------------------
  |  Branch (384:9): [True: 10.3k, False: 251k]
  ------------------
  385|  10.3k|        return 12;
  386|   251k|    } else if (av1C->highBitdepth) {
  ------------------
  |  Branch (386:16): [True: 19.7k, False: 231k]
  ------------------
  387|  19.7k|        return 10;
  388|  19.7k|    }
  389|   231k|    return 8;
  390|   261k|}
read.c:avifGetConfigurationPropertyName:
   58|   274k|{
   59|   274k|    static const char kUnknown[] = "****";
   60|   274k|    switch (codecType) {
   61|   274k|        case AVIF_CODEC_TYPE_AV1:
  ------------------
  |  Branch (61:9): [True: 274k, False: 0]
  ------------------
   62|   274k|            return "av1C";
   63|       |#if defined(AVIF_CODEC_AVM)
   64|       |        case AVIF_CODEC_TYPE_AV2:
   65|       |            return "av2C";
   66|       |#endif
   67|      0|        default:
  ------------------
  |  Branch (67:9): [True: 0, False: 274k]
  ------------------
   68|       |            assert(AVIF_FALSE);
   69|      0|            return kUnknown; // Easier to deal with than NULL.
   70|   274k|    }
   71|   274k|}
read.c:avifReadCodecConfigProperty:
 6054|  12.4k|{
 6055|  12.4k|    const avifProperty * configProp = avifPropertyArrayFind(properties, avifGetConfigurationPropertyName(codecType));
 6056|  12.4k|    if (configProp) {
  ------------------
  |  Branch (6056:9): [True: 12.4k, False: 9]
  ------------------
 6057|  12.4k|        image->depth = avifCodecConfigurationBoxGetDepth(&configProp->u.av1C);
 6058|  12.4k|        if (configProp->u.av1C.monochrome) {
  ------------------
  |  Branch (6058:13): [True: 183, False: 12.2k]
  ------------------
 6059|    183|            image->yuvFormat = AVIF_PIXEL_FORMAT_YUV400;
 6060|  12.2k|        } else {
 6061|  12.2k|            if (configProp->u.av1C.chromaSubsamplingX && configProp->u.av1C.chromaSubsamplingY) {
  ------------------
  |  Branch (6061:17): [True: 5.84k, False: 6.38k]
  |  Branch (6061:58): [True: 2.35k, False: 3.48k]
  ------------------
 6062|  2.35k|                image->yuvFormat = AVIF_PIXEL_FORMAT_YUV420;
 6063|  9.87k|            } else if (configProp->u.av1C.chromaSubsamplingX) {
  ------------------
  |  Branch (6063:24): [True: 3.48k, False: 6.38k]
  ------------------
 6064|  3.48k|                image->yuvFormat = AVIF_PIXEL_FORMAT_YUV422;
 6065|  6.38k|            } else {
 6066|  6.38k|                image->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
 6067|  6.38k|            }
 6068|  12.2k|        }
 6069|  12.4k|        image->yuvChromaSamplePosition = (avifChromaSamplePosition)configProp->u.av1C.chromaSamplePosition;
 6070|  12.4k|    } else {
 6071|       |        // A configuration property box is mandatory in all valid AVIF configurations. Bail out.
 6072|      9|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 6073|      9|    }
 6074|  12.4k|    return AVIF_RESULT_OK;
 6075|  12.4k|}
read.c:avifReadColorProperties:
 5669|   250k|{
 5670|       |    // Find and adopt all colr boxes "at most one for a given value of colour type" (HEIF 6.5.5.1, from Amendment 3)
 5671|       |    // Accept one of each type, and bail out if more than one of a given type is provided.
 5672|   250k|    avifBool colrICCSeen = AVIF_FALSE;
  ------------------
  |  |   89|   250k|#define AVIF_FALSE 0
  ------------------
 5673|  1.40M|    for (uint32_t propertyIndex = 0; propertyIndex < properties->count; ++propertyIndex) {
  ------------------
  |  Branch (5673:38): [True: 1.15M, False: 250k]
  ------------------
 5674|  1.15M|        avifProperty * prop = &properties->prop[propertyIndex];
 5675|  1.15M|        if (!memcmp(prop->type, "colr", 4) && prop->u.colr.hasICC) {
  ------------------
  |  Branch (5675:13): [True: 88.8k, False: 1.06M]
  |  Branch (5675:47): [True: 66, False: 88.7k]
  ------------------
 5676|     66|            if (colrICCSeen) {
  ------------------
  |  Branch (5676:17): [True: 1, False: 65]
  ------------------
 5677|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5678|      1|            }
 5679|     65|            avifROData iccRead;
 5680|     65|            AVIF_CHECKRES(io->read(io, 0, prop->u.colr.iccOffset, prop->u.colr.iccSize, &iccRead));
  ------------------
  |  |   54|     65|    do {                                  \
  |  |   55|     65|        const avifResult result__ = (A);  \
  |  |   56|     65|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 65]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     65|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 65]
  |  |  ------------------
  ------------------
 5681|     65|            colrICCSeen = AVIF_TRUE;
  ------------------
  |  |   88|     65|#define AVIF_TRUE 1
  ------------------
 5682|     65|            AVIF_CHECKRES(avifRWDataSet(icc, iccRead.data, iccRead.size));
  ------------------
  |  |   54|     65|    do {                                  \
  |  |   55|     65|        const avifResult result__ = (A);  \
  |  |   56|     65|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 65]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     65|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 65]
  |  |  ------------------
  ------------------
 5683|     65|        }
 5684|  1.15M|    }
 5685|   250k|    return avifReadColorNclxProperty(properties, colorPrimaries, transferCharacteristics, matrixCoefficients, yuvRange, cicpSet);
 5686|   250k|}
read.c:avifDecoderCheckAlphaProperties:
 5922|  32.4k|{
 5923|  32.4k|    const avifImage * image = decoder->image;
 5924|       |    // The 'clap', 'irot' and 'imir' transformative properties should be applied to the alpha
 5925|       |    // auxiliary image item before considering it a plane of the color image item.
 5926|       |    // Alternatively, inequality with the transformative properties attached to the color image item
 5927|       |    // should be treated as AVIF_RESULT_NOT_IMPLEMENTED.
 5928|       |    // The latter is easier and is the behavior of libavif.
 5929|       |
 5930|  32.4k|    const avifProperty * clapProp = avifPropertyArrayFind(alphaProperties, "clap");
 5931|  32.4k|    const avifProperty * irotProp = avifPropertyArrayFind(alphaProperties, "irot");
 5932|  32.4k|    const avifProperty * imirProp = avifPropertyArrayFind(alphaProperties, "imir");
 5933|  32.4k|    if (clapProp == NULL && irotProp == NULL && imirProp == NULL) {
  ------------------
  |  Branch (5933:9): [True: 32.4k, False: 0]
  |  Branch (5933:29): [True: 32.4k, False: 2]
  |  Branch (5933:49): [True: 32.4k, False: 0]
  ------------------
 5934|       |        // However, libavif up to version 1.3.0 generated images lacking transformative property
 5935|       |        // associations with alpha auxiliary image items, so be lenient on their absence for
 5936|       |        // backward compatibility with previously generated images.
 5937|  32.4k|        return AVIF_RESULT_OK;
 5938|  32.4k|    }
 5939|       |
 5940|       |    // HEIF (ISO/IEC 23008-12), Section 6.9.1:
 5941|       |    //   When the width or the height of the alpha plane differs from the width or the height of the
 5942|       |    //   master image, respectively, the alpha plane is resized to have the same width and height as
 5943|       |    //   those of the master image.
 5944|       |    // There is no need to enforce specific 'ispe' values describing the alpha item because
 5945|       |    // the alpha item must be resized to the dimensions of the associated color item.
 5946|       |
 5947|      2|    if (!clapProp != !(image->transformFlags & AVIF_TRANSFORM_CLAP) ||
  ------------------
  |  Branch (5947:9): [True: 0, False: 2]
  ------------------
 5948|      2|        (clapProp && (clapProp->u.clap.widthN != image->clap.widthN || clapProp->u.clap.widthD != image->clap.widthD ||
  ------------------
  |  Branch (5948:10): [True: 0, False: 2]
  |  Branch (5948:23): [True: 0, False: 0]
  |  Branch (5948:72): [True: 0, False: 0]
  ------------------
 5949|      0|                      clapProp->u.clap.heightN != image->clap.heightN || clapProp->u.clap.heightD != image->clap.heightD ||
  ------------------
  |  Branch (5949:23): [True: 0, False: 0]
  |  Branch (5949:74): [True: 0, False: 0]
  ------------------
 5950|      0|                      clapProp->u.clap.horizOffN != image->clap.horizOffN || clapProp->u.clap.horizOffD != image->clap.horizOffD ||
  ------------------
  |  Branch (5950:23): [True: 0, False: 0]
  |  Branch (5950:78): [True: 0, False: 0]
  ------------------
 5951|      0|                      clapProp->u.clap.vertOffN != image->clap.vertOffN || clapProp->u.clap.vertOffD != image->clap.vertOffD))) {
  ------------------
  |  Branch (5951:23): [True: 0, False: 0]
  |  Branch (5951:76): [True: 0, False: 0]
  ------------------
 5952|      0|        avifDiagnosticsPrintf(&decoder->diag, "Clean aperture property mismatch between alpha auxiliary image item and color item");
 5953|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5954|      0|    }
 5955|      2|    if (!irotProp != !(image->transformFlags & AVIF_TRANSFORM_IROT) || (irotProp && irotProp->u.irot.angle != image->irot.angle)) {
  ------------------
  |  Branch (5955:9): [True: 1, False: 1]
  |  Branch (5955:73): [True: 1, False: 0]
  |  Branch (5955:85): [True: 0, False: 1]
  ------------------
 5956|      1|        avifDiagnosticsPrintf(&decoder->diag, "Rotation property mismatch between alpha auxiliary image item and color item");
 5957|      1|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5958|      1|    }
 5959|      1|    if (!imirProp != !(image->transformFlags & AVIF_TRANSFORM_IMIR) || (imirProp && imirProp->u.imir.axis != image->imir.axis)) {
  ------------------
  |  Branch (5959:9): [True: 0, False: 1]
  |  Branch (5959:73): [True: 0, False: 1]
  |  Branch (5959:85): [True: 0, False: 0]
  ------------------
 5960|      0|        avifDiagnosticsPrintf(&decoder->diag, "Mirroring property mismatch between alpha auxiliary image item and color item");
 5961|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5962|      0|    }
 5963|      1|    return AVIF_RESULT_OK;
 5964|      1|}
read.c:avifDecoderCheckGainMapProperties:
 5967|    127|{
 5968|    127|    const avifImage * image = decoder->image;
 5969|       |    // libavif requires the bitstream contain the same 'pasp', 'clap', 'irot', 'imir'
 5970|       |    // properties for both the base and gain map image items used as input to
 5971|       |    // the tone-mapped derived image item. libavif also requires the tone-mapped
 5972|       |    // derived image item itself not be associated with these properties. This is
 5973|       |    // enforced at encoding. Other patterns are rejected at decoding.
 5974|    127|    const avifProperty * paspProp = avifPropertyArrayFind(gainMapProperties, "pasp");
 5975|    127|    if (!paspProp != !(image->transformFlags & AVIF_TRANSFORM_PASP) ||
  ------------------
  |  Branch (5975:9): [True: 0, False: 127]
  ------------------
 5976|    127|        (paspProp && (paspProp->u.pasp.hSpacing != image->pasp.hSpacing || paspProp->u.pasp.vSpacing != image->pasp.vSpacing))) {
  ------------------
  |  Branch (5976:10): [True: 0, False: 127]
  |  Branch (5976:23): [True: 0, False: 0]
  |  Branch (5976:76): [True: 0, False: 0]
  ------------------
 5977|      0|        avifDiagnosticsPrintf(&decoder->diag,
 5978|      0|                              "Pixel aspect ratio property mismatch between input items of tone-mapping derived image item");
 5979|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 5980|      0|    }
 5981|    127|    const avifProperty * clapProp = avifPropertyArrayFind(gainMapProperties, "clap");
 5982|    127|    if (!clapProp != !(image->transformFlags & AVIF_TRANSFORM_CLAP) ||
  ------------------
  |  Branch (5982:9): [True: 0, False: 127]
  ------------------
 5983|    127|        (clapProp && (clapProp->u.clap.widthN != image->clap.widthN || clapProp->u.clap.widthD != image->clap.widthD ||
  ------------------
  |  Branch (5983:10): [True: 0, False: 127]
  |  Branch (5983:23): [True: 0, False: 0]
  |  Branch (5983:72): [True: 0, False: 0]
  ------------------
 5984|      0|                      clapProp->u.clap.heightN != image->clap.heightN || clapProp->u.clap.heightD != image->clap.heightD ||
  ------------------
  |  Branch (5984:23): [True: 0, False: 0]
  |  Branch (5984:74): [True: 0, False: 0]
  ------------------
 5985|      0|                      clapProp->u.clap.horizOffN != image->clap.horizOffN || clapProp->u.clap.horizOffD != image->clap.horizOffD ||
  ------------------
  |  Branch (5985:23): [True: 0, False: 0]
  |  Branch (5985:78): [True: 0, False: 0]
  ------------------
 5986|      0|                      clapProp->u.clap.vertOffN != image->clap.vertOffN || clapProp->u.clap.vertOffD != image->clap.vertOffD))) {
  ------------------
  |  Branch (5986:23): [True: 0, False: 0]
  |  Branch (5986:76): [True: 0, False: 0]
  ------------------
 5987|      0|        avifDiagnosticsPrintf(&decoder->diag, "Clean aperture property mismatch between input items of tone-mapping derived image item");
 5988|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 5989|      0|    }
 5990|    127|    const avifProperty * irotProp = avifPropertyArrayFind(gainMapProperties, "irot");
 5991|    127|    if (!irotProp != !(image->transformFlags & AVIF_TRANSFORM_IROT) || (irotProp && irotProp->u.irot.angle != image->irot.angle)) {
  ------------------
  |  Branch (5991:9): [True: 0, False: 127]
  |  Branch (5991:73): [True: 0, False: 127]
  |  Branch (5991:85): [True: 0, False: 0]
  ------------------
 5992|      0|        avifDiagnosticsPrintf(&decoder->diag, "Rotation property mismatch between input items of tone-mapping derived image item");
 5993|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 5994|      0|    }
 5995|    127|    const avifProperty * imirProp = avifPropertyArrayFind(gainMapProperties, "imir");
 5996|    127|    if (!imirProp != !(image->transformFlags & AVIF_TRANSFORM_IMIR) || (imirProp && imirProp->u.imir.axis != image->imir.axis)) {
  ------------------
  |  Branch (5996:9): [True: 0, False: 127]
  |  Branch (5996:73): [True: 0, False: 127]
  |  Branch (5996:85): [True: 0, False: 0]
  ------------------
 5997|      0|        avifDiagnosticsPrintf(&decoder->diag, "Mirroring property mismatch between input items of tone-mapping derived image item");
 5998|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 5999|      0|    }
 6000|    127|    return AVIF_RESULT_OK;
 6001|    127|}
read.c:avifDecoderPrepareSample:
 5219|  1.21M|{
 5220|  1.21M|    if (!sample->data.size || sample->partialData) {
  ------------------
  |  Branch (5220:9): [True: 347k, False: 864k]
  |  Branch (5220:31): [True: 859k, False: 4.20k]
  ------------------
 5221|       |        // This sample hasn't been read from IO or had its extents fully merged yet.
 5222|       |
 5223|  1.20M|        size_t bytesToRead = sample->size;
 5224|  1.20M|        if (partialByteCount && (bytesToRead > partialByteCount)) {
  ------------------
  |  Branch (5224:13): [True: 621k, False: 586k]
  |  Branch (5224:33): [True: 587k, False: 33.8k]
  ------------------
 5225|   587k|            bytesToRead = partialByteCount;
 5226|   587k|        }
 5227|       |
 5228|  1.20M|        if (sample->itemID) {
  ------------------
  |  Branch (5228:13): [True: 1.13M, False: 69.7k]
  ------------------
 5229|       |            // The data comes from an item. Let avifDecoderItemRead() do the heavy lifting.
 5230|       |
 5231|  1.13M|            avifDecoderItem * item;
 5232|  1.13M|            AVIF_CHECKRES(avifMetaFindOrCreateItem(decoder->data->meta, sample->itemID, &item));
  ------------------
  |  |   54|  1.13M|    do {                                  \
  |  |   55|  1.13M|        const avifResult result__ = (A);  \
  |  |   56|  1.13M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.13M]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.13M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.13M]
  |  |  ------------------
  ------------------
 5233|  1.13M|            avifROData itemContents;
 5234|       |#if UINT64_MAX > SIZE_MAX
 5235|       |            if (sample->offset > SIZE_MAX) {
 5236|       |                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5237|       |            }
 5238|       |#endif
 5239|  1.13M|            size_t offset = (size_t)sample->offset;
 5240|  1.13M|            avifResult readResult = avifDecoderItemRead(item, decoder->io, &itemContents, offset, bytesToRead, &decoder->diag);
 5241|  1.13M|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5241:17): [True: 751k, False: 386k]
  ------------------
 5242|   751k|                return readResult;
 5243|   751k|            }
 5244|       |
 5245|       |            // avifDecoderItemRead is guaranteed to already be persisted by either the underlying IO
 5246|       |            // or by mergedExtents; just reuse the buffer here.
 5247|   386k|            sample->data = itemContents;
 5248|   386k|            sample->ownsData = AVIF_FALSE;
  ------------------
  |  |   89|   386k|#define AVIF_FALSE 0
  ------------------
 5249|   386k|            sample->partialData = item->partialMergedExtents;
 5250|   386k|        } else {
 5251|       |            // The data likely comes from a sample table. Pull the sample and make a copy if necessary.
 5252|       |
 5253|  69.7k|            avifROData sampleContents;
 5254|  69.7k|            if ((decoder->io->sizeHint > 0) && (sample->offset > decoder->io->sizeHint)) {
  ------------------
  |  Branch (5254:17): [True: 31.6k, False: 38.0k]
  |  Branch (5254:48): [True: 0, False: 31.6k]
  ------------------
 5255|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5256|      0|            }
 5257|  69.7k|            avifResult readResult = decoder->io->read(decoder->io, 0, sample->offset, bytesToRead, &sampleContents);
 5258|  69.7k|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5258:17): [True: 60.0k, False: 9.67k]
  ------------------
 5259|  60.0k|                return readResult;
 5260|  60.0k|            }
 5261|  9.67k|            if (sampleContents.size != bytesToRead) {
  ------------------
  |  Branch (5261:17): [True: 0, False: 9.67k]
  ------------------
 5262|      0|                return AVIF_RESULT_TRUNCATED_DATA;
 5263|      0|            }
 5264|       |
 5265|  9.67k|            sample->ownsData = !decoder->io->persistent;
 5266|  9.67k|            sample->partialData = (bytesToRead != sample->size);
 5267|  9.67k|            if (decoder->io->persistent) {
  ------------------
  |  Branch (5267:17): [True: 6.05k, False: 3.62k]
  ------------------
 5268|  6.05k|                sample->data = sampleContents;
 5269|  6.05k|            } else {
 5270|  3.62k|                AVIF_CHECKRES(avifRWDataSet((avifRWData *)&sample->data, sampleContents.data, sampleContents.size));
  ------------------
  |  |   54|  3.62k|    do {                                  \
  |  |   55|  3.62k|        const avifResult result__ = (A);  \
  |  |   56|  3.62k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 3.62k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  3.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.62k]
  |  |  ------------------
  ------------------
 5271|  3.62k|            }
 5272|  9.67k|        }
 5273|  1.20M|    }
 5274|   399k|    return AVIF_RESULT_OK;
 5275|  1.21M|}
read.c:avifDecoderDataFrameFullyDecoded:
 6860|  1.09M|{
 6861|  1.14M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6861:21): [True: 1.14M, False: 6.28k]
  ------------------
 6862|  1.14M|        if (data->tileInfos[c].decodedTileCount != data->tileInfos[c].tileCount) {
  ------------------
  |  Branch (6862:13): [True: 1.09M, False: 52.2k]
  ------------------
 6863|  1.09M|            return AVIF_FALSE;
  ------------------
  |  |   89|  1.09M|#define AVIF_FALSE 0
  ------------------
 6864|  1.09M|        }
 6865|  1.14M|    }
 6866|  6.28k|    return AVIF_TRUE;
  ------------------
  |  |   88|  6.28k|#define AVIF_TRUE 1
  ------------------
 6867|  1.09M|}
read.c:avifDecoderCreateCodecs:
 5425|  12.1k|{
 5426|  12.1k|    avifDecoderData * data = decoder->data;
 5427|  12.1k|    avifDecoderDataResetCodec(data);
 5428|       |
 5429|  12.1k|    if (data->source == AVIF_DECODER_SOURCE_TRACKS) {
  ------------------
  |  Branch (5429:9): [True: 1.71k, False: 10.3k]
  ------------------
 5430|       |        // In this case, we will use at most two codec instances (one for the color planes and one for the alpha plane).
 5431|       |        // Gain maps are not supported.
 5432|  1.71k|        AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, &decoder->data->tiles.tile[0], &decoder->diag, &data->codec));
  ------------------
  |  |   54|  1.71k|    do {                                  \
  |  |   55|  1.71k|        const avifResult result__ = (A);  \
  |  |   56|  1.71k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.71k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.71k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.71k]
  |  |  ------------------
  ------------------
 5433|  1.71k|        data->tiles.tile[0].codec = data->codec;
 5434|  1.71k|        if (data->tiles.count > 1) {
  ------------------
  |  Branch (5434:13): [True: 19, False: 1.69k]
  ------------------
 5435|     19|            AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, &decoder->data->tiles.tile[1], &decoder->diag, &data->codecAlpha));
  ------------------
  |  |   54|     19|    do {                                  \
  |  |   55|     19|        const avifResult result__ = (A);  \
  |  |   56|     19|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 19]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     19|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 19]
  |  |  ------------------
  ------------------
 5436|     19|            data->tiles.tile[1].codec = data->codecAlpha;
 5437|     19|        }
 5438|  10.3k|    } else {
 5439|       |        // In this case, we will use one codec instance when there is only one tile or when all of the following conditions are
 5440|       |        // met:
 5441|       |        //   - The image must have exactly one layer (i.e. decoder->imageCount == 1).
 5442|       |        //   - All the tiles must have the same operating point (because the codecs take operating point once at initialization
 5443|       |        //     and do not allow it to be changed later).
 5444|       |        //   - All the tiles must have the same value for allLayers (because the codecs take allLayers once at initialization
 5445|       |        //     and do not allow it to be changed later).
 5446|       |        //   - If the image has a single tile, it must not have a single tile alpha plane (in this case we will steal the planes
 5447|       |        //     from the decoder, so we cannot use the same decoder for both the color and the alpha planes).
 5448|       |        //   - All tiles have the same type (AV1 or AV2).
 5449|       |        //   - No tile buffer access after another tile was decoded (i.e. no Sample Transform compositing because it happens
 5450|       |        //     after decoding all tiles).
 5451|       |        // Otherwise, we will use |tiles.count| decoder instances (one instance for each tile).
 5452|  10.3k|        const avifBool canUseSingleCodecInstance =
 5453|  10.3k|            ((data->tiles.count == 1) || (decoder->imageCount == 1 && avifTilesCanBeDecodedWithSameCodecInstance(data))) &&
  ------------------
  |  Branch (5453:14): [True: 9.29k, False: 1.09k]
  |  Branch (5453:43): [True: 1.09k, False: 0]
  |  Branch (5453:71): [True: 249, False: 849]
  ------------------
 5454|  9.54k|            data->sampleTransformNumInputImageItems == 0;
  ------------------
  |  Branch (5454:13): [True: 9.54k, False: 0]
  ------------------
 5455|  10.3k|        if (canUseSingleCodecInstance) {
  ------------------
  |  Branch (5455:13): [True: 9.54k, False: 849]
  ------------------
 5456|  9.54k|            AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, &decoder->data->tiles.tile[0], &decoder->diag, &data->codec));
  ------------------
  |  |   54|  9.54k|    do {                                  \
  |  |   55|  9.54k|        const avifResult result__ = (A);  \
  |  |   56|  9.54k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 9.54k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  9.54k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 9.54k]
  |  |  ------------------
  ------------------
 5457|  22.2k|            for (unsigned int i = 0; i < decoder->data->tiles.count; ++i) {
  ------------------
  |  Branch (5457:38): [True: 12.6k, False: 9.54k]
  ------------------
 5458|  12.6k|                decoder->data->tiles.tile[i].codec = data->codec;
 5459|  12.6k|            }
 5460|  9.54k|        } else {
 5461|  2.86k|            for (unsigned int i = 0; i < decoder->data->tiles.count; ++i) {
  ------------------
  |  Branch (5461:38): [True: 2.01k, False: 849]
  ------------------
 5462|  2.01k|                avifTile * tile = &decoder->data->tiles.tile[i];
 5463|  2.01k|                AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, tile, &decoder->diag, &tile->codec));
  ------------------
  |  |   54|  2.01k|    do {                                  \
  |  |   55|  2.01k|        const avifResult result__ = (A);  \
  |  |   56|  2.01k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 2.01k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  2.01k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 2.01k]
  |  |  ------------------
  ------------------
 5464|  2.01k|            }
 5465|    849|        }
 5466|  10.3k|    }
 5467|  12.1k|    return AVIF_RESULT_OK;
 5468|  12.1k|}
read.c:avifCodecCreateInternal:
 5359|  13.3k|{
 5360|       |#if defined(AVIF_CODEC_AVM)
 5361|       |    // AVIF_CODEC_CHOICE_AUTO leads to AVIF_CODEC_TYPE_AV1 by default. Reroute correctly.
 5362|       |    if (choice == AVIF_CODEC_CHOICE_AUTO && tile->codecType == AVIF_CODEC_TYPE_AV2) {
 5363|       |        choice = AVIF_CODEC_CHOICE_AVM;
 5364|       |    }
 5365|       |#endif
 5366|       |
 5367|  13.3k|    const avifCodecType codecTypeFromChoice = avifCodecTypeFromChoice(choice, AVIF_CODEC_FLAG_CAN_DECODE);
 5368|  13.3k|    if (codecTypeFromChoice == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (5368:9): [True: 0, False: 13.3k]
  ------------------
 5369|      0|        avifDiagnosticsPrintf(diag,
 5370|      0|                              "Tile type is %s but there is no compatible codec available to decode it",
 5371|      0|                              avifGetConfigurationPropertyName(tile->codecType));
 5372|      0|        return AVIF_RESULT_NO_CODEC_AVAILABLE;
 5373|  13.3k|    } else if (choice != AVIF_CODEC_CHOICE_AUTO && codecTypeFromChoice != tile->codecType) {
  ------------------
  |  Branch (5373:16): [True: 0, False: 13.3k]
  |  Branch (5373:52): [True: 0, False: 0]
  ------------------
 5374|      0|        avifDiagnosticsPrintf(diag,
 5375|      0|                              "Tile type is %s but incompatible %s codec was explicitly set as decoding implementation",
 5376|      0|                              avifGetConfigurationPropertyName(tile->codecType),
 5377|      0|                              avifCodecName(choice, AVIF_CODEC_FLAG_CAN_DECODE));
 5378|      0|        return AVIF_RESULT_DECODE_COLOR_FAILED;
 5379|      0|    }
 5380|       |
 5381|  13.3k|    AVIF_CHECKRES(avifCodecCreate(choice, AVIF_CODEC_FLAG_CAN_DECODE, codec));
  ------------------
  |  |   54|  13.3k|    do {                                  \
  |  |   55|  13.3k|        const avifResult result__ = (A);  \
  |  |   56|  13.3k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 13.3k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
 5382|  13.3k|    AVIF_CHECKERR(*codec, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  13.3k|    do {                        \
  |  |   46|  13.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 13.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
 5383|  13.3k|    (*codec)->diag = diag;
 5384|  13.3k|    (*codec)->operatingPoint = tile->operatingPoint;
 5385|  13.3k|    (*codec)->allLayers = tile->input->allLayers;
 5386|  13.3k|    return AVIF_RESULT_OK;
 5387|  13.3k|}
read.c:avifTilesCanBeDecodedWithSameCodecInstance:
 5390|  1.09k|{
 5391|  1.09k|    int32_t numImageBuffers = 0, numStolenImageBuffers = 0;
 5392|  9.88k|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (5392:21): [True: 8.78k, False: 1.09k]
  ------------------
 5393|  8.78k|        if (data->tileInfos[c].tileCount > 0) {
  ------------------
  |  Branch (5393:13): [True: 2.08k, False: 6.69k]
  ------------------
 5394|  2.08k|            ++numImageBuffers;
 5395|  2.08k|        }
 5396|       |        // The sample operations require multiple buffers for compositing so no plane is stolen
 5397|       |        // when there is a 'sato' Sample Transform derived image item.
 5398|  8.78k|        if (c >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY && c <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY && data->tileInfos[c].tileCount > 0) {
  ------------------
  |  |  428|  17.5k|#define AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR
  ------------------
                      if (c >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY && c <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY && data->tileInfos[c].tileCount > 0) {
  ------------------
  |  |  430|  13.1k|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS - 1)
  |  |  ------------------
  |  |  |  |  424|  4.39k|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (5398:13): [True: 4.39k, False: 4.39k]
  |  Branch (5398:56): [True: 4.39k, False: 0]
  |  Branch (5398:99): [True: 100, False: 4.29k]
  ------------------
 5399|    100|            continue;
 5400|    100|        }
 5401|  8.68k|        if (data->tileInfos[c].tileCount == 1) {
  ------------------
  |  Branch (5401:13): [True: 1.57k, False: 7.10k]
  ------------------
 5402|  1.57k|            ++numStolenImageBuffers;
 5403|  1.57k|        }
 5404|  8.68k|    }
 5405|  1.09k|    if (numStolenImageBuffers > 0 && numImageBuffers > 1) {
  ------------------
  |  Branch (5405:9): [True: 849, False: 249]
  |  Branch (5405:38): [True: 849, False: 0]
  ------------------
 5406|       |        // Single tile image with single tile alpha plane or gain map. In this case each tile needs its own decoder since the planes will be
 5407|       |        // "stolen". Stealing either the color or the alpha plane (or gain map) will invalidate the other ones when decode is called the second
 5408|       |        // (or third) time.
 5409|    849|        return AVIF_FALSE;
  ------------------
  |  |   89|    849|#define AVIF_FALSE 0
  ------------------
 5410|    849|    }
 5411|    249|    const uint8_t firstTileOperatingPoint = data->tiles.tile[0].operatingPoint;
 5412|    249|    const avifBool firstTileAllLayers = data->tiles.tile[0].input->allLayers;
 5413|  3.39k|    for (unsigned int i = 1; i < data->tiles.count; ++i) {
  ------------------
  |  Branch (5413:30): [True: 3.14k, False: 249]
  ------------------
 5414|  3.14k|        const avifTile * tile = &data->tiles.tile[i];
 5415|  3.14k|        if (tile->operatingPoint != firstTileOperatingPoint || tile->input->allLayers != firstTileAllLayers) {
  ------------------
  |  Branch (5415:13): [True: 0, False: 3.14k]
  |  Branch (5415:64): [True: 0, False: 3.14k]
  ------------------
 5416|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5417|      0|        }
 5418|       |        // avifDecoderItemValidateProperties() verified during avifDecoderParse() that all tiles
 5419|       |        // share the same coding format so no need to check for codecType equality here.
 5420|  3.14k|    }
 5421|    249|    return AVIF_TRUE;
  ------------------
  |  |   88|    249|#define AVIF_TRUE 1
  ------------------
 5422|    249|}
read.c:avifDecoderPrepareTiles:
 6659|  4.41M|{
 6660|  4.42M|    for (unsigned int tileIndex = info->decodedTileCount; tileIndex < info->tileCount; ++tileIndex) {
  ------------------
  |  Branch (6660:59): [True: 590k, False: 3.83M]
  ------------------
 6661|   590k|        avifTile * tile = &decoder->data->tiles.tile[info->firstTileIndex + tileIndex];
 6662|       |
 6663|   590k|        if (nextImageIndex >= tile->input->samples.count) {
  ------------------
  |  Branch (6663:13): [True: 0, False: 590k]
  ------------------
 6664|      0|            return AVIF_RESULT_NO_IMAGES_REMAINING;
 6665|      0|        }
 6666|       |
 6667|   590k|        avifDecodeSample * sample = &tile->input->samples.sample[nextImageIndex];
 6668|   590k|        avifResult prepareResult = avifDecoderPrepareSample(decoder, sample, 0);
 6669|   590k|        if (prepareResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6669:13): [True: 574k, False: 16.1k]
  ------------------
 6670|   574k|            return prepareResult;
 6671|   574k|        }
 6672|   590k|    }
 6673|  3.83M|    return AVIF_RESULT_OK;
 6674|  4.41M|}
read.c:avifDecoderDecodeTiles:
 6730|  4.37M|{
 6731|  4.37M|    const unsigned int oldDecodedTileCount = info->decodedTileCount;
 6732|  4.38M|    for (unsigned int tileIndex = oldDecodedTileCount; tileIndex < info->tileCount; ++tileIndex) {
  ------------------
  |  Branch (6732:56): [True: 589k, False: 3.79M]
  ------------------
 6733|   589k|        avifTile * tile = &decoder->data->tiles.tile[info->firstTileIndex + tileIndex];
 6734|       |
 6735|   589k|        const avifDecodeSample * sample = &tile->input->samples.sample[nextImageIndex];
 6736|   589k|        if (sample->data.size < sample->size) {
  ------------------
  |  Branch (6736:13): [True: 574k, False: 15.0k]
  ------------------
 6737|   574k|            AVIF_ASSERT_OR_RETURN(decoder->allowIncremental);
  ------------------
  |  |   64|   574k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   574k|    do {                        \
  |  |  |  |   46|   574k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 574k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   574k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 574k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6738|       |            // Data is missing but there is no error yet. Output available pixel rows.
 6739|   574k|            return AVIF_RESULT_OK;
 6740|   574k|        }
 6741|       |
 6742|  15.0k|        avifBool isLimitedRangeAlpha = AVIF_FALSE;
  ------------------
  |  |   89|  15.0k|#define AVIF_FALSE 0
  ------------------
 6743|  15.0k|        tile->codec->maxThreads = decoder->maxThreads;
 6744|  15.0k|        tile->codec->imageSizeLimit = decoder->imageSizeLimit;
 6745|  15.0k|        tile->codec->imageDimensionLimit = decoder->imageDimensionLimit;
 6746|  15.0k|        if (!tile->codec->getNextImage(tile->codec, sample, avifIsAlpha(tile->input->itemCategory), &isLimitedRangeAlpha, tile->image)) {
  ------------------
  |  Branch (6746:13): [True: 5.62k, False: 9.39k]
  ------------------
 6747|  5.62k|            avifDiagnosticsPrintf(&decoder->diag, "tile->codec->getNextImage() failed");
 6748|  5.62k|            return avifGetErrorForItemCategory(tile->input->itemCategory);
 6749|  5.62k|        }
 6750|       |
 6751|       |        // Section 2.3.4 of AV1 Codec ISO Media File Format Binding v1.2.0 says:
 6752|       |        //   the full_range_flag in the colr box shall match the color_range
 6753|       |        //   flag in the Sequence Header OBU.
 6754|       |        // See https://aomediacodec.github.io/av1-isobmff/v1.2.0.html#av1codecconfigurationbox-semantics.
 6755|       |        // If a 'colr' box of colour_type 'nclx' was parsed, a mismatch between
 6756|       |        // the 'colr' decoder->image->yuvRange and the AV1 OBU
 6757|       |        // tile->image->yuvRange should be treated as an error.
 6758|       |        // However codec_svt.c was not encoding the color_range field for
 6759|       |        // multiple years, so there probably are files in the wild that will
 6760|       |        // fail decoding if this is enforced. Thus this pattern is allowed.
 6761|       |        // Section 12.1.5.1 of ISO 14496-12 (ISOBMFF) says:
 6762|       |        //   If colour information is supplied in both this [colr] box, and also
 6763|       |        //   in the video bitstream, this box takes precedence, and over-rides
 6764|       |        //   the information in the bitstream.
 6765|       |        // So decoder->image->yuvRange is kept because it was either the 'colr'
 6766|       |        // value set when the 'colr' box was parsed, or it was the AV1 OBU value
 6767|       |        // extracted from the sequence header OBU of the first tile of the first
 6768|       |        // frame (if no 'colr' box of colour_type 'nclx' was found).
 6769|       |
 6770|       |        // Alpha plane with limited range is not allowed by the latest revision
 6771|       |        // of the specification. However, it was allowed in version 1.0.0 of the
 6772|       |        // specification. To allow such files, simply convert the alpha plane to
 6773|       |        // full range.
 6774|  9.39k|        if (avifIsAlpha(tile->input->itemCategory) && isLimitedRangeAlpha) {
  ------------------
  |  Branch (6774:13): [True: 1.07k, False: 8.31k]
  |  Branch (6774:55): [True: 408, False: 669]
  ------------------
 6775|    408|            avifResult result = avifImageLimitedToFullAlpha(tile->image);
 6776|    408|            if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6776:17): [True: 0, False: 408]
  ------------------
 6777|      0|                avifDiagnosticsPrintf(&decoder->diag, "avifImageLimitedToFullAlpha failed");
 6778|      0|                return result;
 6779|      0|            }
 6780|    408|        }
 6781|       |
 6782|       |        // Scale the decoded image so that it corresponds to this tile's output dimensions
 6783|  9.39k|        if ((tile->width != tile->image->width) || (tile->height != tile->image->height)) {
  ------------------
  |  Branch (6783:13): [True: 7.49k, False: 1.90k]
  |  Branch (6783:52): [True: 1.04k, False: 860]
  ------------------
 6784|  8.53k|            if (avifImageScaleWithLimit(tile->image,
  ------------------
  |  Branch (6784:17): [True: 29, False: 8.50k]
  ------------------
 6785|  8.53k|                                        tile->width,
 6786|  8.53k|                                        tile->height,
 6787|  8.53k|                                        decoder->imageSizeLimit,
 6788|  8.53k|                                        decoder->imageDimensionLimit,
 6789|  8.53k|                                        &decoder->diag) != AVIF_RESULT_OK) {
 6790|     29|                return avifGetErrorForItemCategory(tile->input->itemCategory);
 6791|     29|            }
 6792|  8.53k|        }
 6793|       |
 6794|  9.36k|        ++info->decodedTileCount;
 6795|       |
 6796|  9.36k|        const avifBool isGrid = (info->grid.rows > 0) && (info->grid.columns > 0);
  ------------------
  |  Branch (6796:33): [True: 2.41k, False: 6.95k]
  |  Branch (6796:58): [True: 2.41k, False: 0]
  ------------------
 6797|  9.36k|        avifBool stealPlanes = !isGrid;
 6798|  9.36k|        if (decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (6798:13): [True: 181, False: 9.18k]
  ------------------
 6799|       |            // Keep everything as a copy for now.
 6800|    181|            stealPlanes = AVIF_FALSE;
  ------------------
  |  |   89|    181|#define AVIF_FALSE 0
  ------------------
 6801|    181|        }
 6802|  9.36k|        if (tile->input->itemCategory >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY &&
  ------------------
  |  |  428|  18.7k|#define AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR
  ------------------
  |  Branch (6802:13): [True: 82, False: 9.28k]
  ------------------
 6803|     82|            tile->input->itemCategory <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY) {
  ------------------
  |  |  430|     82|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS - 1)
  |  |  ------------------
  |  |  |  |  424|     82|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (6803:13): [True: 82, False: 0]
  ------------------
 6804|       |            // Keep Sample Transform input image item samples in tiles.
 6805|       |            // The expression will be applied in avifDecoderNextImage() below instead, once all the tiles are available.
 6806|     82|            continue;
 6807|     82|        }
 6808|       |
 6809|  9.28k|        if (!stealPlanes) {
  ------------------
  |  Branch (6809:13): [True: 2.51k, False: 6.77k]
  ------------------
 6810|  2.51k|            avifImage * dstImage = decoder->image;
 6811|  2.51k|            if (tile->input->itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (6811:17): [True: 177, False: 2.33k]
  ------------------
 6812|    177|                AVIF_ASSERT_OR_RETURN(dstImage->gainMap && dstImage->gainMap->image);
  ------------------
  |  |   64|    177|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    177|    do {                        \
  |  |  |  |   46|    354|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 177, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 177, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    177|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 177]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6813|    177|                dstImage = dstImage->gainMap->image;
 6814|    177|            }
 6815|  2.51k|            if (tileIndex == 0) {
  ------------------
  |  Branch (6815:17): [True: 427, False: 2.08k]
  ------------------
 6816|    427|                AVIF_CHECKRES(avifDecoderDataAllocateImagePlanes(decoder->data, info, dstImage, &decoder->data->cicpSet));
  ------------------
  |  |   54|    427|    do {                                  \
  |  |   55|    427|        const avifResult result__ = (A);  \
  |  |   56|    427|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 18, False: 409]
  |  |  ------------------
  |  |   57|     18|            avifBreakOnError();           \
  |  |   58|     18|            return result__;              \
  |  |   59|     18|        }                                 \
  |  |   60|    427|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 409]
  |  |  ------------------
  ------------------
 6817|    427|            }
 6818|  2.49k|            AVIF_CHECKRES(avifDecoderDataCopyTileToImage(decoder->data, info, dstImage, tile, tileIndex));
  ------------------
  |  |   54|  2.49k|    do {                                  \
  |  |   55|  2.49k|        const avifResult result__ = (A);  \
  |  |   56|  2.49k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 15, False: 2.47k]
  |  |  ------------------
  |  |   57|     15|            avifBreakOnError();           \
  |  |   58|     15|            return result__;              \
  |  |   59|     15|        }                                 \
  |  |   60|  2.49k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 2.47k]
  |  |  ------------------
  ------------------
 6819|  6.77k|        } else {
 6820|  6.77k|            AVIF_ASSERT_OR_RETURN(info->tileCount == 1);
  ------------------
  |  |   64|  6.77k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  6.77k|    do {                        \
  |  |  |  |   46|  6.77k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 6.77k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  6.77k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 6.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6821|  6.77k|            AVIF_ASSERT_OR_RETURN(tileIndex == 0);
  ------------------
  |  |   64|  6.77k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  6.77k|    do {                        \
  |  |  |  |   46|  6.77k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 6.77k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  6.77k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 6.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6822|  6.77k|            avifImage * src = tile->image;
 6823|       |
 6824|  6.77k|            if (tile->input->itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (6824:17): [True: 29, False: 6.74k]
  ------------------
 6825|     29|                AVIF_ASSERT_OR_RETURN(decoder->image->gainMap && decoder->image->gainMap->image);
  ------------------
  |  |   64|     29|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     29|    do {                        \
  |  |  |  |   46|     58|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 29, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 29, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     29|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6826|     29|                decoder->image->gainMap->image->width = src->width;
 6827|     29|                decoder->image->gainMap->image->height = src->height;
 6828|     29|                decoder->image->gainMap->image->depth = src->depth;
 6829|  6.74k|            } else {
 6830|  6.74k|                if ((decoder->image->width != src->width) || (decoder->image->height != src->height) ||
  ------------------
  |  Branch (6830:21): [True: 4, False: 6.74k]
  |  Branch (6830:62): [True: 4, False: 6.73k]
  ------------------
 6831|  6.73k|                    (decoder->image->depth != src->depth)) {
  ------------------
  |  Branch (6831:21): [True: 3.59k, False: 3.14k]
  ------------------
 6832|  3.59k|                    if (avifIsAlpha(tile->input->itemCategory)) {
  ------------------
  |  Branch (6832:25): [True: 43, False: 3.55k]
  ------------------
 6833|     43|                        avifDiagnosticsPrintf(&decoder->diag,
 6834|     43|                                              "The color image item does not match the alpha image item in width, height, or bit depth");
 6835|     43|                        return AVIF_RESULT_DECODE_ALPHA_FAILED;
 6836|     43|                    }
 6837|  3.55k|                    avifImageFreePlanes(decoder->image, AVIF_PLANES_ALL);
 6838|       |
 6839|  3.55k|                    decoder->image->width = src->width;
 6840|  3.55k|                    decoder->image->height = src->height;
 6841|  3.55k|                    decoder->image->depth = src->depth;
 6842|  3.55k|                }
 6843|  6.74k|            }
 6844|       |
 6845|  6.73k|            if (avifIsAlpha(tile->input->itemCategory)) {
  ------------------
  |  Branch (6845:17): [True: 513, False: 6.21k]
  ------------------
 6846|    513|                avifImageStealPlanes(decoder->image, src, AVIF_PLANES_A);
 6847|  6.21k|            } else if (tile->input->itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (6847:24): [True: 29, False: 6.19k]
  ------------------
 6848|     29|                AVIF_ASSERT_OR_RETURN(decoder->image->gainMap && decoder->image->gainMap->image);
  ------------------
  |  |   64|     29|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     29|    do {                        \
  |  |  |  |   46|     58|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 29, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 29, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     29|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6849|     29|                avifImageStealPlanes(decoder->image->gainMap->image, src, AVIF_PLANES_YUV);
 6850|  6.19k|            } else { // AVIF_ITEM_COLOR
 6851|  6.19k|                avifImageStealPlanes(decoder->image, src, AVIF_PLANES_YUV);
 6852|  6.19k|            }
 6853|  6.73k|        }
 6854|  9.28k|    }
 6855|  3.79M|    return AVIF_RESULT_OK;
 6856|  4.37M|}
read.c:avifGetErrorForItemCategory:
 6719|  5.65k|{
 6720|  5.65k|    if (itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (6720:9): [True: 24, False: 5.63k]
  ------------------
 6721|     24|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 6722|     24|    }
 6723|  5.63k|    if (itemCategory >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY && itemCategory <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY) {
  ------------------
  |  |  428|  11.2k|#define AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR
  ------------------
                  if (itemCategory >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY && itemCategory <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY) {
  ------------------
  |  |  430|     17|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS - 1)
  |  |  ------------------
  |  |  |  |  424|     17|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (6723:9): [True: 17, False: 5.61k]
  |  Branch (6723:63): [True: 17, False: 0]
  ------------------
 6724|     17|        return AVIF_RESULT_DECODE_SAMPLE_TRANSFORM_FAILED;
 6725|     17|    }
 6726|  5.61k|    return avifIsAlpha(itemCategory) ? AVIF_RESULT_DECODE_ALPHA_FAILED : AVIF_RESULT_DECODE_COLOR_FAILED;
  ------------------
  |  Branch (6726:12): [True: 94, False: 5.52k]
  ------------------
 6727|  5.63k|}
read.c:avifImageLimitedToFullAlpha:
 6677|    408|{
 6678|    408|    if (image->imageOwnsAlphaPlane) {
  ------------------
  |  Branch (6678:9): [True: 0, False: 408]
  ------------------
 6679|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 6680|      0|    }
 6681|       |
 6682|    408|    const uint8_t * alphaPlane = image->alphaPlane;
 6683|    408|    const uint32_t alphaRowBytes = image->alphaRowBytes;
 6684|       |
 6685|       |    // We cannot do the range conversion in place since it will modify the
 6686|       |    // codec's internal frame buffers. Allocate memory for the conversion.
 6687|    408|    image->alphaPlane = NULL;
 6688|    408|    image->alphaRowBytes = 0;
 6689|    408|    const avifResult allocationResult = avifImageAllocatePlanes(image, AVIF_PLANES_A);
 6690|    408|    if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6690:9): [True: 0, False: 408]
  ------------------
 6691|      0|        return allocationResult;
 6692|      0|    }
 6693|       |
 6694|    408|    if (image->depth > 8) {
  ------------------
  |  Branch (6694:9): [True: 269, False: 139]
  ------------------
 6695|  12.8k|        for (uint32_t j = 0; j < image->height; ++j) {
  ------------------
  |  Branch (6695:30): [True: 12.6k, False: 269]
  ------------------
 6696|  12.6k|            const uint8_t * srcRow = &alphaPlane[(size_t)j * alphaRowBytes];
 6697|  12.6k|            uint8_t * dstRow = &image->alphaPlane[(size_t)j * image->alphaRowBytes];
 6698|  1.34M|            for (uint32_t i = 0; i < image->width; ++i) {
  ------------------
  |  Branch (6698:34): [True: 1.33M, False: 12.6k]
  ------------------
 6699|  1.33M|                int srcAlpha = *((const uint16_t *)&srcRow[i * 2]);
 6700|  1.33M|                int dstAlpha = avifLimitedToFullY(image->depth, srcAlpha);
 6701|  1.33M|                *((uint16_t *)&dstRow[i * 2]) = (uint16_t)dstAlpha;
 6702|  1.33M|            }
 6703|  12.6k|        }
 6704|    269|    } else {
 6705|  3.15k|        for (uint32_t j = 0; j < image->height; ++j) {
  ------------------
  |  Branch (6705:30): [True: 3.01k, False: 139]
  ------------------
 6706|  3.01k|            const uint8_t * srcRow = &alphaPlane[(size_t)j * alphaRowBytes];
 6707|  3.01k|            uint8_t * dstRow = &image->alphaPlane[(size_t)j * image->alphaRowBytes];
 6708|   270k|            for (uint32_t i = 0; i < image->width; ++i) {
  ------------------
  |  Branch (6708:34): [True: 267k, False: 3.01k]
  ------------------
 6709|   267k|                int srcAlpha = srcRow[i];
 6710|   267k|                int dstAlpha = avifLimitedToFullY(image->depth, srcAlpha);
 6711|   267k|                dstRow[i] = (uint8_t)dstAlpha;
 6712|   267k|            }
 6713|  3.01k|        }
 6714|    139|    }
 6715|    408|    return AVIF_RESULT_OK;
 6716|    408|}
read.c:avifDecoderDataAllocateImagePlanes:
 1734|    427|{
 1735|    427|    const avifTile * tile = &data->tiles.tile[info->firstTileIndex];
 1736|    427|    uint32_t dstWidth;
 1737|    427|    uint32_t dstHeight;
 1738|       |
 1739|    427|    if (info->grid.rows > 0 && info->grid.columns > 0) {
  ------------------
  |  Branch (1739:9): [True: 328, False: 99]
  |  Branch (1739:32): [True: 328, False: 0]
  ------------------
 1740|    328|        const avifImageGrid * grid = &info->grid;
 1741|       |        // Validate grid image size and tile size.
 1742|       |        //
 1743|       |        // HEIF (ISO/IEC 23008-12:2017), Section 6.6.2.3.1:
 1744|       |        //   The tiled input images shall completely "cover" the reconstructed image grid canvas, ...
 1745|    328|        if ((((uint64_t)tile->image->width * grid->columns) < grid->outputWidth) ||
  ------------------
  |  Branch (1745:13): [True: 1, False: 327]
  ------------------
 1746|    327|            (((uint64_t)tile->image->height * grid->rows) < grid->outputHeight)) {
  ------------------
  |  Branch (1746:13): [True: 2, False: 325]
  ------------------
 1747|      3|            avifDiagnosticsPrintf(data->diag,
 1748|      3|                                  "Grid image tiles do not completely cover the image (HEIF (ISO/IEC 23008-12:2017), Section 6.6.2.3.1)");
 1749|      3|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1750|      3|        }
 1751|       |        // Tiles in the rightmost column and bottommost row must overlap the reconstructed image grid canvas. See MIAF (ISO/IEC 23000-22:2019), Section 7.3.11.4.2, Figure 2.
 1752|    325|        if ((((uint64_t)tile->image->width * (grid->columns - 1)) >= grid->outputWidth) ||
  ------------------
  |  Branch (1752:13): [True: 4, False: 321]
  ------------------
 1753|    321|            (((uint64_t)tile->image->height * (grid->rows - 1)) >= grid->outputHeight)) {
  ------------------
  |  Branch (1753:13): [True: 1, False: 320]
  ------------------
 1754|      5|            avifDiagnosticsPrintf(data->diag,
 1755|      5|                                  "Grid image tiles in the rightmost column and bottommost row do not overlap the reconstructed image grid canvas. See MIAF (ISO/IEC 23000-22:2019), Section 7.3.11.4.2, Figure 2");
 1756|      5|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1757|      5|        }
 1758|    320|        if (!avifAreGridDimensionsValid(tile->image->yuvFormat,
  ------------------
  |  Branch (1758:13): [True: 6, False: 314]
  ------------------
 1759|    320|                                        grid->outputWidth,
 1760|    320|                                        grid->outputHeight,
 1761|    320|                                        tile->image->width,
 1762|    320|                                        tile->image->height,
 1763|    320|                                        data->diag)) {
 1764|      6|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1765|      6|        }
 1766|    314|        dstWidth = grid->outputWidth;
 1767|    314|        dstHeight = grid->outputHeight;
 1768|    314|    } else {
 1769|       |        // Only one tile. Width and height are inherited from the 'ispe' property of the corresponding avifDecoderItem.
 1770|     99|        dstWidth = tile->width;
 1771|     99|        dstHeight = tile->height;
 1772|     99|    }
 1773|       |
 1774|    413|    const avifBool alpha = avifIsAlpha(tile->input->itemCategory);
 1775|    413|    if (alpha) {
  ------------------
  |  Branch (1775:9): [True: 65, False: 348]
  ------------------
 1776|       |        // An alpha tile does not contain any YUV pixels.
 1777|     65|        AVIF_ASSERT_OR_RETURN(tile->image->yuvFormat == AVIF_PIXEL_FORMAT_NONE);
  ------------------
  |  |   64|     65|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     65|    do {                        \
  |  |  |  |   46|     65|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 65]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     65|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 65]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1778|     65|    }
 1779|       |
 1780|    413|    const uint32_t dstDepth = tile->image->depth;
 1781|       |
 1782|       |    // Lazily populate dstImage with the new frame's properties.
 1783|    413|    const avifBool dimsOrDepthIsDifferent = (dstImage->width != dstWidth) || (dstImage->height != dstHeight) ||
  ------------------
  |  Branch (1783:45): [True: 38, False: 375]
  |  Branch (1783:78): [True: 9, False: 366]
  ------------------
 1784|    366|                                            (dstImage->depth != dstDepth);
  ------------------
  |  Branch (1784:45): [True: 196, False: 170]
  ------------------
 1785|    413|    const avifBool yuvFormatIsDifferent = !alpha && (dstImage->yuvFormat != tile->image->yuvFormat);
  ------------------
  |  Branch (1785:43): [True: 348, False: 65]
  |  Branch (1785:53): [True: 41, False: 307]
  ------------------
 1786|    413|    if (dimsOrDepthIsDifferent || yuvFormatIsDifferent) {
  ------------------
  |  Branch (1786:9): [True: 243, False: 170]
  |  Branch (1786:35): [True: 8, False: 162]
  ------------------
 1787|    251|        if (alpha) {
  ------------------
  |  Branch (1787:13): [True: 4, False: 247]
  ------------------
 1788|       |            // Alpha doesn't match size, just bail out
 1789|      4|            avifDiagnosticsPrintf(data->diag, "Alpha plane dimensions do not match color plane dimensions");
 1790|      4|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1791|      4|        }
 1792|       |
 1793|    247|        if (dimsOrDepthIsDifferent) {
  ------------------
  |  Branch (1793:13): [True: 239, False: 8]
  ------------------
 1794|    239|            avifImageFreePlanes(dstImage, AVIF_PLANES_ALL);
 1795|    239|            dstImage->width = dstWidth;
 1796|    239|            dstImage->height = dstHeight;
 1797|    239|            dstImage->depth = dstDepth;
 1798|    239|        }
 1799|    247|        if (yuvFormatIsDifferent) {
  ------------------
  |  Branch (1799:13): [True: 41, False: 206]
  ------------------
 1800|     41|            avifImageFreePlanes(dstImage, AVIF_PLANES_YUV);
 1801|     41|            dstImage->yuvFormat = tile->image->yuvFormat;
 1802|     41|        }
 1803|       |        // Keep dstImage->yuvRange which is already set to its correct value
 1804|       |        // (extracted from the 'colr' box if parsed or from a Sequence Header OBU otherwise).
 1805|       |
 1806|    247|        if (!*cicpSet) {
  ------------------
  |  Branch (1806:13): [True: 9, False: 238]
  ------------------
 1807|      9|            *cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|      9|#define AVIF_TRUE 1
  ------------------
 1808|      9|            dstImage->colorPrimaries = tile->image->colorPrimaries;
 1809|      9|            dstImage->transferCharacteristics = tile->image->transferCharacteristics;
 1810|      9|            dstImage->matrixCoefficients = tile->image->matrixCoefficients;
 1811|      9|        }
 1812|    247|    }
 1813|       |
 1814|    409|    if (avifImageAllocatePlanes(dstImage, alpha ? AVIF_PLANES_A : AVIF_PLANES_YUV) != AVIF_RESULT_OK) {
  ------------------
  |  Branch (1814:9): [True: 0, False: 409]
  |  Branch (1814:43): [True: 61, False: 348]
  ------------------
 1815|      0|        avifDiagnosticsPrintf(data->diag, "Image allocation failure");
 1816|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 1817|      0|    }
 1818|    409|    return AVIF_RESULT_OK;
 1819|    409|}
read.c:avifDecoderDataCopyTileToImage:
 1828|  2.49k|{
 1829|  2.49k|    const avifTile * firstTile = &data->tiles.tile[info->firstTileIndex];
 1830|  2.49k|    if (tile != firstTile) {
  ------------------
  |  Branch (1830:9): [True: 2.08k, False: 409]
  ------------------
 1831|       |        // Check for tile consistency. All tiles in a grid image should match the first tile in the properties checked below.
 1832|  2.08k|        if ((tile->image->width != firstTile->image->width) || (tile->image->height != firstTile->image->height) ||
  ------------------
  |  Branch (1832:13): [True: 6, False: 2.07k]
  |  Branch (1832:64): [True: 1, False: 2.07k]
  ------------------
 1833|  2.07k|            (tile->image->depth != firstTile->image->depth) || (tile->image->yuvFormat != firstTile->image->yuvFormat) ||
  ------------------
  |  Branch (1833:13): [True: 1, False: 2.07k]
  |  Branch (1833:64): [True: 1, False: 2.07k]
  ------------------
 1834|  2.07k|            (tile->image->yuvRange != firstTile->image->yuvRange) || (tile->image->colorPrimaries != firstTile->image->colorPrimaries) ||
  ------------------
  |  Branch (1834:13): [True: 1, False: 2.07k]
  |  Branch (1834:70): [True: 1, False: 2.07k]
  ------------------
 1835|  2.07k|            (tile->image->transferCharacteristics != firstTile->image->transferCharacteristics) ||
  ------------------
  |  Branch (1835:13): [True: 3, False: 2.06k]
  ------------------
 1836|  2.06k|            (tile->image->matrixCoefficients != firstTile->image->matrixCoefficients)) {
  ------------------
  |  Branch (1836:13): [True: 1, False: 2.06k]
  ------------------
 1837|     15|            avifDiagnosticsPrintf(data->diag, "Grid image contains mismatched tiles");
 1838|     15|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1839|     15|        }
 1840|  2.08k|    }
 1841|       |
 1842|       |    // Only keep the relevant planes in the destination image. Otherwise,
 1843|       |    // unjustified failures may come from trying to copy alpha tiles with odd
 1844|       |    // coordinates into the dstImage when the chroma planes are subsampled.
 1845|  2.47k|    avifImage dstView;
 1846|  2.47k|    avifImageSetDefaults(&dstView);
 1847|  2.47k|    const avifCropRect srcViewRect = { 0, 0, dstImage->width, dstImage->height };
 1848|  2.47k|    AVIF_ASSERT_OR_RETURN(avifImageSetViewRect(&dstView, dstImage, &srcViewRect) == AVIF_RESULT_OK);
  ------------------
  |  |   64|  2.47k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  2.47k|    do {                        \
  |  |  |  |   46|  2.47k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 2.47k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  2.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1849|  2.47k|    if (avifIsAlpha(tile->input->itemCategory)) {
  ------------------
  |  Branch (1849:9): [True: 517, False: 1.96k]
  ------------------
 1850|    517|        avifImageFreePlanes(&dstView, AVIF_PLANES_YUV);
 1851|    517|        dstView.yuvFormat = AVIF_PIXEL_FORMAT_NONE;
 1852|  1.96k|    } else {
 1853|  1.96k|        avifImageFreePlanes(&dstView, AVIF_PLANES_A);
 1854|  1.96k|    }
 1855|       |
 1856|  2.47k|    avifImage srcTileView;
 1857|  2.47k|    avifImageSetDefaults(&srcTileView);
 1858|  2.47k|    avifImage dstTileView;
 1859|  2.47k|    avifImageSetDefaults(&dstTileView);
 1860|  2.47k|    avifCropRect dstTileViewRect = { 0, 0, firstTile->image->width, firstTile->image->height };
 1861|  2.47k|    if (info->grid.rows > 0 && info->grid.columns > 0) {
  ------------------
  |  Branch (1861:9): [True: 2.37k, False: 99]
  |  Branch (1861:32): [True: 2.37k, False: 0]
  ------------------
 1862|  2.37k|        unsigned int rowIndex = tileIndex / info->grid.columns;
 1863|  2.37k|        unsigned int colIndex = tileIndex % info->grid.columns;
 1864|  2.37k|        dstTileViewRect.x = firstTile->image->width * colIndex;
 1865|  2.37k|        dstTileViewRect.y = firstTile->image->height * rowIndex;
 1866|  2.37k|        if (dstTileViewRect.x + dstTileViewRect.width > info->grid.outputWidth) {
  ------------------
  |  Branch (1866:13): [True: 108, False: 2.27k]
  ------------------
 1867|    108|            dstTileViewRect.width = info->grid.outputWidth - dstTileViewRect.x;
 1868|    108|        }
 1869|  2.37k|        if (dstTileViewRect.y + dstTileViewRect.height > info->grid.outputHeight) {
  ------------------
  |  Branch (1869:13): [True: 69, False: 2.30k]
  ------------------
 1870|     69|            dstTileViewRect.height = info->grid.outputHeight - dstTileViewRect.y;
 1871|     69|        }
 1872|  2.37k|    }
 1873|  2.47k|    const avifCropRect srcTileViewRect = { 0, 0, dstTileViewRect.width, dstTileViewRect.height };
 1874|  2.47k|    AVIF_ASSERT_OR_RETURN(avifImageSetViewRect(&dstTileView, &dstView, &dstTileViewRect) == AVIF_RESULT_OK);
  ------------------
  |  |   64|  2.47k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  2.47k|    do {                        \
  |  |  |  |   46|  2.47k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 2.47k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  2.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1875|  2.47k|    AVIF_ASSERT_OR_RETURN(avifImageSetViewRect(&srcTileView, tile->image, &srcTileViewRect) == AVIF_RESULT_OK);
  ------------------
  |  |   64|  2.47k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  2.47k|    do {                        \
  |  |  |  |   46|  2.47k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 2.47k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  2.47k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1876|  2.47k|    avifImageCopySamples(&dstTileView, &srcTileView, avifIsAlpha(tile->input->itemCategory) ? AVIF_PLANES_A : AVIF_PLANES_YUV);
  ------------------
  |  Branch (1876:54): [True: 517, False: 1.96k]
  ------------------
 1877|  2.47k|    return AVIF_RESULT_OK;
 1878|  2.47k|}
read.c:avifDecoderApplySampleTransform:
 6940|    161|{
 6941|    161|    if (dstImage->depth != decoder->data->meta->sampleTransformDepth) {
  ------------------
  |  Branch (6941:9): [True: 79, False: 82]
  ------------------
 6942|     79|        AVIF_ASSERT_OR_RETURN(dstImage->yuvPlanes[0] != NULL);
  ------------------
  |  |   64|     79|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     79|    do {                        \
  |  |  |  |   46|     79|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 79]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     79|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 79]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6943|     79|        AVIF_ASSERT_OR_RETURN(dstImage->imageOwnsYUVPlanes);
  ------------------
  |  |   64|     79|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     79|    do {                        \
  |  |  |  |   46|     79|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 79]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     79|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 79]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6944|       |
 6945|       |        // Use a temporary buffer because dstImage may point to decoder->image, which could be an input image.
 6946|     79|        avifImage * dstImageWithCorrectDepth =
 6947|     79|            avifImageCreate(dstImage->width, dstImage->height, decoder->data->meta->sampleTransformDepth, dstImage->yuvFormat);
 6948|     79|        AVIF_CHECKERR(dstImageWithCorrectDepth != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|     79|    do {                        \
  |  |   46|     79|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 79]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     79|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 79]
  |  |  ------------------
  ------------------
 6949|     79|        dstImageWithCorrectDepth->yuvRange = dstImage->yuvRange;
 6950|     79|        avifResult result =
 6951|     79|            avifImageAllocatePlanes(dstImageWithCorrectDepth, dstImage->alphaPlane != NULL ? AVIF_PLANES_ALL : AVIF_PLANES_YUV);
  ------------------
  |  Branch (6951:63): [True: 0, False: 79]
  ------------------
 6952|     79|        if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (6952:13): [True: 79, False: 0]
  ------------------
 6953|     79|            result = avifDecoderApplySampleTransform(decoder, dstImageWithCorrectDepth);
 6954|     79|            if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (6954:17): [True: 78, False: 1]
  ------------------
 6955|       |                // Keep the same dstImage object rather than swapping decoder->image, in case the user already accessed it.
 6956|     78|                avifImageFreePlanes(dstImage, AVIF_PLANES_ALL);
 6957|     78|                dstImage->depth = dstImageWithCorrectDepth->depth;
 6958|     78|                avifImageStealPlanes(dstImage, dstImageWithCorrectDepth, AVIF_PLANES_ALL);
 6959|     78|            }
 6960|     79|        }
 6961|     79|        avifImageDestroy(dstImageWithCorrectDepth);
 6962|     79|        return result;
 6963|     79|    }
 6964|       |
 6965|     82|    AVIF_CHECKRES(avifDecoderApplySampleTransformForPlanes(decoder, AVIF_PLANES_YUV, dstImage));
  ------------------
  |  |   54|     82|    do {                                  \
  |  |   55|     82|        const avifResult result__ = (A);  \
  |  |   56|     82|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 81]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|     82|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 81]
  |  |  ------------------
  ------------------
 6966|     81|    if (decoder->alphaPresent) {
  ------------------
  |  Branch (6966:9): [True: 0, False: 81]
  ------------------
 6967|      0|        AVIF_CHECKRES(avifDecoderApplySampleTransformForPlanes(decoder, AVIF_PLANES_A, dstImage));
  ------------------
  |  |   54|      0|    do {                                  \
  |  |   55|      0|        const avifResult result__ = (A);  \
  |  |   56|      0|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6968|      0|    }
 6969|     81|    return AVIF_RESULT_OK;
 6970|     81|}
read.c:avifDecoderApplySampleTransformForPlanes:
 6928|     82|{
 6929|     82|    avifImage * toDestroy[AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS] = { NULL };
 6930|     82|    const avifResult result = avifDecoderApplySampleTransformForPlanesImpl(decoder, planes, dstImage, toDestroy);
 6931|    328|    for (uint32_t i = 0; i < AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS; ++i) {
  ------------------
  |  |  426|    328|    (1 /* for AVIF_ITEM_COLOR */ + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS)
  |  |  ------------------
  |  |  |  |  424|    328|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (6931:26): [True: 246, False: 82]
  ------------------
 6932|    246|        if (toDestroy[i] != NULL) {
  ------------------
  |  Branch (6932:13): [True: 0, False: 246]
  ------------------
 6933|      0|            avifImageDestroy(toDestroy[i]);
 6934|      0|        }
 6935|    246|    }
 6936|     82|    return result;
 6937|     82|}
read.c:avifDecoderApplySampleTransformForPlanesImpl:
 6877|     82|{
 6878|     82|    AVIF_ASSERT_OR_RETURN(decoder->data->sampleTransformNumInputImageItems != 0);
  ------------------
  |  |   64|     82|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     82|    do {                        \
  |  |  |  |   46|     82|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 82]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     82|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 82]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6879|     82|    AVIF_ASSERT_OR_RETURN(decoder->data->sampleTransformNumInputImageItems <= AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS);
  ------------------
  |  |   64|     82|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     82|    do {                        \
  |  |  |  |   46|     82|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 82]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     82|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 82]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6880|     82|    const avifImage * inputImages[AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS];
 6881|    246|    for (uint32_t i = 0; i < decoder->data->sampleTransformNumInputImageItems; ++i) {
  ------------------
  |  Branch (6881:26): [True: 164, False: 82]
  ------------------
 6882|    164|        avifItemCategory category = decoder->data->sampleTransformInputImageItems[i];
 6883|    164|        if (category == AVIF_ITEM_COLOR) {
  ------------------
  |  Branch (6883:13): [True: 82, False: 82]
  ------------------
 6884|       |            // If the primary image item was a grid, it was already aggregated
 6885|       |            // into this single output buffer in avifDecoderDecodeTiles().
 6886|     82|            inputImages[i] = decoder->image;
 6887|     82|        } else {
 6888|     82|            AVIF_ASSERT_OR_RETURN(category >= AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR &&
  ------------------
  |  |   64|     82|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     82|    do {                        \
  |  |  |  |   46|    164|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 82, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 82, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     82|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 82]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6889|     82|                                  category < AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR +
 6890|     82|                                                 AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS);
 6891|     82|            if (planes == AVIF_PLANES_A) {
  ------------------
  |  Branch (6891:17): [True: 0, False: 82]
  ------------------
 6892|      0|                category += AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS;
  ------------------
  |  |  424|      0|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  ------------------
 6893|      0|            }
 6894|     82|            const avifTileInfo * info = &decoder->data->tileInfos[category];
 6895|     82|            AVIF_ASSERT_OR_RETURN(info != NULL);
  ------------------
  |  |   64|     82|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     82|    do {                        \
  |  |  |  |   46|     82|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 82]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     82|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 82]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6896|     82|            const avifTile * firstTile = &decoder->data->tiles.tile[info->firstTileIndex];
 6897|     82|            AVIF_ASSERT_OR_RETURN(firstTile != NULL && firstTile->image != NULL);
  ------------------
  |  |   64|     82|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     82|    do {                        \
  |  |  |  |   46|    164|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 82, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 82, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     82|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 82]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6898|     82|            if (info->tileCount == 1) {
  ------------------
  |  Branch (6898:17): [True: 82, False: 0]
  ------------------
 6899|     82|                inputImages[i] = firstTile->image;
 6900|     82|            } else {
 6901|       |                // Combine the tiles into a single buffer used as one of the input images in avifImageApplyExpression().
 6902|      0|                reconstructedInputImages[i] = avifImageCreateEmpty();
 6903|      0|                AVIF_CHECKERR(reconstructedInputImages[i] != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|      0|    do {                        \
  |  |   46|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6904|      0|                avifImageCopyNoAlloc(reconstructedInputImages[i], firstTile->image);
 6905|      0|                reconstructedInputImages[i]->width = decoder->image->width;
 6906|      0|                reconstructedInputImages[i]->height = decoder->image->height;
 6907|      0|                avifBool cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
 6908|      0|                AVIF_CHECKRES(avifDecoderDataAllocateImagePlanes(decoder->data, info, reconstructedInputImages[i], &cicpSet));
  ------------------
  |  |   54|      0|    do {                                  \
  |  |   55|      0|        const avifResult result__ = (A);  \
  |  |   56|      0|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6909|      0|                for (unsigned int tileIndex = 0; tileIndex < info->tileCount; ++tileIndex) {
  ------------------
  |  Branch (6909:50): [True: 0, False: 0]
  ------------------
 6910|      0|                    const avifTile * tile = firstTile + tileIndex;
 6911|      0|                    AVIF_CHECKRES(avifDecoderDataCopyTileToImage(decoder->data, info, reconstructedInputImages[i], tile, tileIndex));
  ------------------
  |  |   54|      0|    do {                                  \
  |  |   55|      0|        const avifResult result__ = (A);  \
  |  |   56|      0|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 6912|      0|                }
 6913|      0|                inputImages[i] = reconstructedInputImages[i];
 6914|      0|            }
 6915|     82|        }
 6916|    164|    }
 6917|     82|    AVIF_CHECKRES(avifImageApplyExpression(dstImage,
  ------------------
  |  |   54|     82|    do {                                  \
  |  |   55|     82|        const avifResult result__ = (A);  \
  |  |   56|     82|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 81]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|     82|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 81]
  |  |  ------------------
  ------------------
 6918|     82|                                           AVIF_SAMPLE_TRANSFORM_BIT_DEPTH_32,
 6919|     82|                                           &decoder->data->meta->sampleTransformExpression,
 6920|     82|                                           decoder->data->sampleTransformNumInputImageItems,
 6921|     82|                                           inputImages,
 6922|     82|                                           planes));
 6923|     81|    return AVIF_RESULT_OK;
 6924|     82|}
read.c:avifSampleTableGetImageDelta:
  357|    981|{
  358|    981|    uint32_t maxSampleIndex = 0;
  359|    981|    for (uint32_t i = 0; i < sampleTable->timeToSamples.count; ++i) {
  ------------------
  |  Branch (359:26): [True: 613, False: 368]
  ------------------
  360|    613|        const avifSampleTableTimeToSample * timeToSample = &sampleTable->timeToSamples.timeToSample[i];
  361|    613|        maxSampleIndex += timeToSample->sampleCount;
  362|    613|        if ((imageIndex < maxSampleIndex) || (i == (sampleTable->timeToSamples.count - 1))) {
  ------------------
  |  Branch (362:13): [True: 606, False: 7]
  |  Branch (362:46): [True: 7, False: 0]
  ------------------
  363|    613|            return timeToSample->sampleDelta;
  364|    613|        }
  365|    613|    }
  366|       |
  367|       |    // TODO: fail here?
  368|    368|    return 1;
  369|    981|}
read.c:avifDecoderDataResetCodec:
 1012|  12.1k|{
 1013|  28.5k|    for (unsigned int i = 0; i < data->tiles.count; ++i) {
  ------------------
  |  Branch (1013:30): [True: 16.4k, False: 12.1k]
  ------------------
 1014|  16.4k|        avifTile * tile = &data->tiles.tile[i];
 1015|  16.4k|        if (tile->image) {
  ------------------
  |  Branch (1015:13): [True: 16.4k, False: 0]
  ------------------
 1016|  16.4k|            avifImageFreePlanes(tile->image, AVIF_PLANES_ALL); // forget any pointers into codec image buffers
 1017|  16.4k|        }
 1018|  16.4k|        if (tile->codec) {
  ------------------
  |  Branch (1018:13): [True: 0, False: 16.4k]
  ------------------
 1019|       |            // Check if tile->codec was created separately and destroy it in that case.
 1020|      0|            if (tile->codec != data->codec && tile->codec != data->codecAlpha) {
  ------------------
  |  Branch (1020:17): [True: 0, False: 0]
  |  Branch (1020:47): [True: 0, False: 0]
  ------------------
 1021|      0|                avifCodecDestroy(tile->codec);
 1022|      0|            }
 1023|      0|            tile->codec = NULL;
 1024|      0|        }
 1025|  16.4k|    }
 1026|   109k|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (1026:21): [True: 96.9k, False: 12.1k]
  ------------------
 1027|  96.9k|        data->tileInfos[c].decodedTileCount = 0;
 1028|  96.9k|    }
 1029|  12.1k|    if (data->codec) {
  ------------------
  |  Branch (1029:9): [True: 0, False: 12.1k]
  ------------------
 1030|      0|        avifCodecDestroy(data->codec);
 1031|      0|        data->codec = NULL;
 1032|      0|    }
 1033|  12.1k|    if (data->codecAlpha) {
  ------------------
  |  Branch (1033:9): [True: 0, False: 12.1k]
  ------------------
 1034|      0|        avifCodecDestroy(data->codecAlpha);
 1035|       |        data->codecAlpha = NULL;
 1036|      0|    }
 1037|  12.1k|}
read.c:avifGetDecodedRowCount:
 7190|  3.79M|{
 7191|  3.79M|    if (info->decodedTileCount == info->tileCount) {
  ------------------
  |  Branch (7191:9): [True: 3.22M, False: 574k]
  ------------------
 7192|  3.22M|        return image->height;
 7193|  3.22M|    }
 7194|   574k|    if (info->decodedTileCount == 0) {
  ------------------
  |  Branch (7194:9): [True: 573k, False: 1.00k]
  ------------------
 7195|   573k|        return 0;
 7196|   573k|    }
 7197|       |
 7198|  1.00k|    if (decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (7198:9): [True: 0, False: 1.00k]
  ------------------
 7199|       |        // TODO(yguyon): Support incremental Sample Transforms
 7200|      0|        return 0;
 7201|      0|    }
 7202|       |
 7203|  1.00k|    if ((info->grid.rows > 0) && (info->grid.columns > 0)) {
  ------------------
  |  Branch (7203:9): [True: 1.00k, False: 0]
  |  Branch (7203:34): [True: 1.00k, False: 0]
  ------------------
 7204|       |        // Grid of AVIF tiles (not to be confused with AV1 tiles).
 7205|  1.00k|        const uint32_t tileHeight = decoder->data->tiles.tile[info->firstTileIndex].height;
 7206|  1.00k|        return AVIF_MIN((info->decodedTileCount / info->grid.columns) * tileHeight, image->height);
  ------------------
  |  |   19|  1.00k|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 1.00k, False: 0]
  |  |  ------------------
  ------------------
 7207|  1.00k|    } else {
 7208|       |        // Non-grid image.
 7209|      0|        return image->height;
 7210|      0|    }
 7211|  1.00k|}

avifLimitedToFullY:
 1777|  1.59M|{
 1778|  1.59M|    switch (depth) {
  ------------------
  |  Branch (1778:13): [True: 1.59M, False: 0]
  ------------------
 1779|   267k|        case 8:
  ------------------
  |  Branch (1779:9): [True: 267k, False: 1.33M]
  ------------------
 1780|   267k|            LIMITED_TO_FULL(16, 235, 255);
  ------------------
  |  | 1759|   267k|    v = (((v - MINLIMITEDY) * FULLY) + ((MAXLIMITEDY - MINLIMITEDY) / 2)) / (MAXLIMITEDY - MINLIMITEDY); \
  |  | 1760|   267k|    v = AVIF_CLAMP(v, 0, FULLY)
  |  |  ------------------
  |  |  |  |   18|   267k|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:35): [True: 3.73k, False: 263k]
  |  |  |  |  |  Branch (18:60): [True: 10.6k, False: 253k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1781|   267k|            break;
 1782|  1.32M|        case 10:
  ------------------
  |  Branch (1782:9): [True: 1.32M, False: 270k]
  ------------------
 1783|  1.32M|            LIMITED_TO_FULL(64, 940, 1023);
  ------------------
  |  | 1759|  1.32M|    v = (((v - MINLIMITEDY) * FULLY) + ((MAXLIMITEDY - MINLIMITEDY) / 2)) / (MAXLIMITEDY - MINLIMITEDY); \
  |  | 1760|  1.32M|    v = AVIF_CLAMP(v, 0, FULLY)
  |  |  ------------------
  |  |  |  |   18|  1.32M|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:35): [True: 17.0k, False: 1.31M]
  |  |  |  |  |  Branch (18:60): [True: 13.9k, False: 1.29M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1784|  1.32M|            break;
 1785|  2.61k|        case 12:
  ------------------
  |  Branch (1785:9): [True: 2.61k, False: 1.59M]
  ------------------
 1786|  2.61k|            LIMITED_TO_FULL(256, 3760, 4095);
  ------------------
  |  | 1759|  2.61k|    v = (((v - MINLIMITEDY) * FULLY) + ((MAXLIMITEDY - MINLIMITEDY) / 2)) / (MAXLIMITEDY - MINLIMITEDY); \
  |  | 1760|  2.61k|    v = AVIF_CLAMP(v, 0, FULLY)
  |  |  ------------------
  |  |  |  |   18|  2.61k|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:35): [True: 242, False: 2.37k]
  |  |  |  |  |  Branch (18:60): [True: 257, False: 2.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1787|  2.61k|            break;
 1788|  1.59M|    }
 1789|  1.59M|    return v;
 1790|  1.59M|}

avifSampleTransformExpressionIsValid:
   14|    205|{
   15|    205|    uint32_t stackSize = 0;
   16|  1.58k|    for (uint32_t t = 0; t < tokens->count; ++t) {
  ------------------
  |  Branch (16:26): [True: 1.38k, False: 194]
  ------------------
   17|  1.38k|        const avifSampleTransformToken * token = &tokens->tokens[t];
   18|  1.38k|        AVIF_CHECK(token->type < AVIF_SAMPLE_TRANSFORM_RESERVED);
  ------------------
  |  |   36|  1.38k|    do {                        \
  |  |   37|  1.38k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 5, False: 1.38k]
  |  |  ------------------
  |  |   38|      5|            avifBreakOnError(); \
  |  |   39|      5|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      5|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      5|        }                       \
  |  |   41|  1.38k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
   19|  1.38k|        if (token->type == AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX) {
  ------------------
  |  Branch (19:13): [True: 395, False: 988]
  ------------------
   20|       |            // inputImageItemIndex is 1-based.
   21|    395|            AVIF_CHECK(token->inputImageItemIndex != 0);
  ------------------
  |  |   36|    395|    do {                        \
  |  |   37|    395|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 395]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    395|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 395]
  |  |  ------------------
  ------------------
   22|    395|            AVIF_CHECK(token->inputImageItemIndex <= numInputImageItems);
  ------------------
  |  |   36|    395|    do {                        \
  |  |   37|    395|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 393]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|    395|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 393]
  |  |  ------------------
  ------------------
   23|    395|        }
   24|  1.38k|        if (token->type < AVIF_SAMPLE_TRANSFORM_FIRST_UNARY_OPERATOR) {
  ------------------
  |  Branch (24:13): [True: 791, False: 590]
  ------------------
   25|       |            // Likely an operand.
   26|    791|            ++stackSize;
   27|    791|        } else if (token->type < AVIF_SAMPLE_TRANSFORM_FIRST_BINARY_OPERATOR) {
  ------------------
  |  Branch (27:20): [True: 3, False: 587]
  ------------------
   28|       |            // Likely a unary operator.
   29|      3|            AVIF_CHECK(stackSize >= 1);
  ------------------
  |  |   36|      3|    do {                        \
  |  |   37|      3|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 1]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
   30|       |            // Pop one and push one.
   31|    587|        } else {
   32|       |            // Likely a binary operator.
   33|    587|            AVIF_CHECK(stackSize >= 2);
  ------------------
  |  |   36|    587|    do {                        \
  |  |   37|    587|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 585]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|    587|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 585]
  |  |  ------------------
  ------------------
   34|    585|            --stackSize; // Pop two and push one.
   35|    585|        }
   36|  1.38k|    }
   37|    194|    AVIF_CHECK(stackSize == 1);
  ------------------
  |  |   36|    194|    do {                        \
  |  |   37|    194|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 193]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    194|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 193]
  |  |  ------------------
  ------------------
   38|    193|    return AVIF_TRUE;
  ------------------
  |  |   88|    193|#define AVIF_TRUE 1
  ------------------
   39|    194|}
avifImageApplyExpression:
  359|     82|{
  360|       |    // Check that the expression is valid.
  361|     82|    AVIF_ASSERT_OR_RETURN(avifSampleTransformExpressionIsValid(expression, numInputImageItems));
  ------------------
  |  |   64|     82|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     82|    do {                        \
  |  |  |  |   46|     82|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 82]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     82|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 82]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  362|     82|    const avifBool skipColor = !(planes & AVIF_PLANES_YUV);
  363|     82|    const avifBool skipAlpha = !(planes & AVIF_PLANES_A);
  364|    407|    for (int c = AVIF_CHAN_Y; c <= AVIF_CHAN_A; ++c) {
  ------------------
  |  Branch (364:31): [True: 326, False: 81]
  ------------------
  365|    326|        const avifBool alpha = c == AVIF_CHAN_A;
  366|    326|        if ((skipColor && !alpha) || (skipAlpha && alpha)) {
  ------------------
  |  Branch (366:14): [True: 0, False: 326]
  |  Branch (366:27): [True: 0, False: 0]
  |  Branch (366:39): [True: 326, False: 0]
  |  Branch (366:52): [True: 81, False: 245]
  ------------------
  367|     81|            continue;
  368|     81|        }
  369|       |
  370|    245|        const uint32_t planeWidth = avifImagePlaneWidth(dstImage, c);
  371|    245|        const uint32_t planeHeight = avifImagePlaneHeight(dstImage, c);
  372|    734|        for (uint32_t i = 0; i < numInputImageItems; ++i) {
  ------------------
  |  Branch (372:30): [True: 490, False: 244]
  ------------------
  373|    490|            AVIF_CHECKERR(avifImagePlaneWidth(inputImageItems[i], c) == planeWidth, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    490|    do {                        \
  |  |   46|    490|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 489]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    490|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 489]
  |  |  ------------------
  ------------------
  374|    489|            AVIF_CHECKERR(avifImagePlaneHeight(inputImageItems[i], c) == planeHeight, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    489|    do {                        \
  |  |   46|    489|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 489]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    489|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 489]
  |  |  ------------------
  ------------------
  375|    489|        }
  376|    245|    }
  377|       |
  378|       |    // Then apply it. This part should not fail except for memory shortage reasons.
  379|     81|    if (bitDepth == AVIF_SAMPLE_TRANSFORM_BIT_DEPTH_32) {
  ------------------
  |  Branch (379:9): [True: 81, False: 0]
  ------------------
  380|     81|        uint32_t stackCapacity = expression->count / 2 + 1;
  381|     81|        int32_t * stack = avifAlloc(stackCapacity * sizeof(int32_t));
  382|     81|        AVIF_CHECKERR(stack != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|     81|    do {                        \
  |  |   46|     81|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 81]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     81|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 81]
  |  |  ------------------
  ------------------
  383|     81|        const avifResult result = avifImageApplyExpression32b(dstImage, expression, inputImageItems, planes, stack, stackCapacity);
  384|     81|        avifFree(stack);
  385|     81|        return result;
  386|     81|    }
  387|      0|    return AVIF_RESULT_NOT_IMPLEMENTED;
  388|     81|}
sampletransform.c:avifImageApplyExpression32b:
  290|     81|{
  291|       |    // This slow path could be avoided by recognizing the recipe thanks to avifSampleTransformExpressionToRecipe()
  292|       |    // and having a dedicated optimized implementation for each recipe.
  293|       |
  294|     81|    const int32_t minValue = 0;
  295|     81|    const int32_t maxValue = (1 << dstImage->depth) - 1;
  296|       |
  297|     81|    const avifBool skipColor = !(planes & AVIF_PLANES_YUV);
  298|     81|    const avifBool skipAlpha = !(planes & AVIF_PLANES_A);
  299|    405|    for (int c = AVIF_CHAN_Y; c <= AVIF_CHAN_A; ++c) {
  ------------------
  |  Branch (299:31): [True: 324, False: 81]
  ------------------
  300|    324|        const avifBool alpha = c == AVIF_CHAN_A;
  301|    324|        if ((skipColor && !alpha) || (skipAlpha && alpha)) {
  ------------------
  |  Branch (301:14): [True: 0, False: 324]
  |  Branch (301:27): [True: 0, False: 0]
  |  Branch (301:39): [True: 324, False: 0]
  |  Branch (301:52): [True: 81, False: 243]
  ------------------
  302|     81|            continue;
  303|     81|        }
  304|       |
  305|    243|        const uint32_t planeWidth = avifImagePlaneWidth(dstImage, c);
  306|    243|        const uint32_t planeHeight = avifImagePlaneHeight(dstImage, c);
  307|   170k|        for (uint32_t y = 0; y < planeHeight; ++y) {
  ------------------
  |  Branch (307:30): [True: 170k, False: 243]
  ------------------
  308|   173M|            for (uint32_t x = 0; x < planeWidth; ++x) {
  ------------------
  |  Branch (308:34): [True: 173M, False: 170k]
  ------------------
  309|   173M|                uint32_t stackSize = 0;
  310|  1.38G|                for (uint32_t t = 0; t < expression->count; ++t) {
  ------------------
  |  Branch (310:38): [True: 1.21G, False: 173M]
  ------------------
  311|  1.21G|                    const avifSampleTransformToken * token = &expression->tokens[t];
  312|  1.21G|                    if (token->type == AVIF_SAMPLE_TRANSFORM_CONSTANT) {
  ------------------
  |  Branch (312:25): [True: 346M, False: 865M]
  ------------------
  313|   346M|                        AVIF_ASSERT_OR_RETURN(stackSize < stackCapacity);
  ------------------
  |  |   64|   346M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   346M|    do {                        \
  |  |  |  |   46|   346M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 346M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   346M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 346M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  314|   346M|                        stack[stackSize++] = token->constant;
  315|   865M|                    } else if (token->type == AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX) {
  ------------------
  |  Branch (315:32): [True: 346M, False: 519M]
  ------------------
  316|   346M|                        const avifImage * image = inputImageItems[token->inputImageItemIndex - 1]; // 1-based
  317|   346M|                        const uint8_t * row = avifImagePlane(image, c);
  318|   346M|                        AVIF_ASSERT_OR_RETURN(row != NULL);
  ------------------
  |  |   64|   346M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   346M|    do {                        \
  |  |  |  |   46|   346M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 346M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   346M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 346M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  319|   346M|                        row += (size_t)avifImagePlaneRowBytes(image, c) * y;
  320|   346M|                        AVIF_ASSERT_OR_RETURN(stackSize < stackCapacity);
  ------------------
  |  |   64|   346M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   346M|    do {                        \
  |  |  |  |   46|   346M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 346M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   346M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 346M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  321|   346M|                        stack[stackSize++] = avifImageUsesU16(image) ? ((const uint16_t *)row)[x] : row[x];
  ------------------
  |  Branch (321:46): [True: 250M, False: 95.4M]
  ------------------
  322|   519M|                    } else if (token->type == AVIF_SAMPLE_TRANSFORM_NEGATION || token->type == AVIF_SAMPLE_TRANSFORM_ABSOLUTE ||
  ------------------
  |  Branch (322:32): [True: 0, False: 519M]
  |  Branch (322:81): [True: 0, False: 519M]
  ------------------
  323|   519M|                               token->type == AVIF_SAMPLE_TRANSFORM_NOT || token->type == AVIF_SAMPLE_TRANSFORM_BSR) {
  ------------------
  |  Branch (323:32): [True: 0, False: 519M]
  |  Branch (323:76): [True: 0, False: 519M]
  ------------------
  324|      0|                        AVIF_ASSERT_OR_RETURN(stackSize >= 1);
  ------------------
  |  |   64|      0|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|      0|    do {                        \
  |  |  |  |   46|      0|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  325|      0|                        stack[stackSize - 1] = avifSampleTransformOperation32bOneOperand(stack[stackSize - 1], token->type);
  326|       |                        // Pop one and push one.
  327|   519M|                    } else {
  328|   519M|                        AVIF_ASSERT_OR_RETURN(stackSize >= 2);
  ------------------
  |  |   64|   519M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   519M|    do {                        \
  |  |  |  |   46|   519M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 519M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   519M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 519M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  329|   519M|                        stack[stackSize - 2] =
  330|   519M|                            avifSampleTransformOperation32bTwoOperands(stack[stackSize - 2], stack[stackSize - 1], token->type);
  331|   519M|                        stackSize--; // Pop two and push one.
  332|   519M|                    }
  333|  1.21G|                }
  334|   173M|                AVIF_ASSERT_OR_RETURN(stackSize == 1);
  ------------------
  |  |   64|   173M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   173M|    do {                        \
  |  |  |  |   46|   173M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 173M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   173M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 173M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  335|       |                // Fit to the range defined by the PixelInformationProperty.
  336|       |                // The limited/full range is ignored, like in other libavif encoding and decoding paths.
  337|   173M|                stack[0] = AVIF_CLAMP(stack[0], minValue, maxValue);
  ------------------
  |  |   18|   173M|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  ------------------
  |  |  |  Branch (18:35): [True: 67.0M, False: 106M]
  |  |  |  Branch (18:60): [True: 69.2M, False: 36.8M]
  |  |  ------------------
  ------------------
  338|       |
  339|   173M|                uint8_t * row = avifImagePlane(dstImage, c);
  340|   173M|                AVIF_ASSERT_OR_RETURN(row != NULL);
  ------------------
  |  |   64|   173M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   173M|    do {                        \
  |  |  |  |   46|   173M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 173M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   173M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 173M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  341|   173M|                row += (size_t)avifImagePlaneRowBytes(dstImage, c) * y;
  342|   173M|                if (avifImageUsesU16(dstImage)) {
  ------------------
  |  Branch (342:21): [True: 173M, False: 0]
  ------------------
  343|   173M|                    ((uint16_t *)row)[x] = (uint16_t)stack[0];
  344|   173M|                } else {
  345|      0|                    row[x] = (uint8_t)stack[0];
  346|      0|                }
  347|   173M|            }
  348|   170k|        }
  349|    243|    }
  350|     81|    return AVIF_RESULT_OK;
  351|     81|}
sampletransform.c:avifSampleTransformClamp32b:
  196|   502M|{
  197|   502M|    return value <= INT32_MIN ? INT32_MIN : value >= INT32_MAX ? INT32_MAX : (int32_t)value;
  ------------------
  |  Branch (197:12): [True: 66.7M, False: 435M]
  |  Branch (197:45): [True: 69.7M, False: 365M]
  ------------------
  198|   502M|}
sampletransform.c:avifSampleTransformOperation32bTwoOperands:
  227|   519M|{
  228|   519M|    switch (operator) {
  229|   103M|        case AVIF_SAMPLE_TRANSFORM_SUM:
  ------------------
  |  Branch (229:9): [True: 103M, False: 415M]
  ------------------
  230|   103M|            return avifSampleTransformClamp32b((int64_t)leftOperand + rightOperand);
  231|   131M|        case AVIF_SAMPLE_TRANSFORM_DIFFERENCE:
  ------------------
  |  Branch (231:9): [True: 131M, False: 388M]
  ------------------
  232|   131M|            return avifSampleTransformClamp32b((int64_t)leftOperand - rightOperand);
  233|   194M|        case AVIF_SAMPLE_TRANSFORM_PRODUCT:
  ------------------
  |  Branch (233:9): [True: 194M, False: 325M]
  ------------------
  234|   194M|            return avifSampleTransformClamp32b((int64_t)leftOperand * rightOperand);
  235|  73.4M|        case AVIF_SAMPLE_TRANSFORM_QUOTIENT:
  ------------------
  |  Branch (235:9): [True: 73.4M, False: 445M]
  ------------------
  236|  73.4M|            return rightOperand == 0 ? leftOperand : avifSampleTransformClamp32b((int64_t)leftOperand / rightOperand);
  ------------------
  |  Branch (236:20): [True: 416k, False: 73.0M]
  ------------------
  237|      0|        case AVIF_SAMPLE_TRANSFORM_AND:
  ------------------
  |  Branch (237:9): [True: 0, False: 519M]
  ------------------
  238|      0|            return leftOperand & rightOperand;
  239|      0|        case AVIF_SAMPLE_TRANSFORM_OR:
  ------------------
  |  Branch (239:9): [True: 0, False: 519M]
  ------------------
  240|      0|            return leftOperand | rightOperand;
  241|      0|        case AVIF_SAMPLE_TRANSFORM_XOR:
  ------------------
  |  Branch (241:9): [True: 0, False: 519M]
  ------------------
  242|      0|            return leftOperand ^ rightOperand;
  243|  16.8M|        case AVIF_SAMPLE_TRANSFORM_POW: {
  ------------------
  |  Branch (243:9): [True: 16.8M, False: 502M]
  ------------------
  244|  16.8M|            if (leftOperand == 0 || leftOperand == 1) {
  ------------------
  |  Branch (244:17): [True: 0, False: 16.8M]
  |  Branch (244:37): [True: 0, False: 16.8M]
  ------------------
  245|      0|                return leftOperand;
  246|      0|            }
  247|  16.8M|            if (leftOperand == -1) {
  ------------------
  |  Branch (247:17): [True: 0, False: 16.8M]
  ------------------
  248|      0|                return (rightOperand % 2 == 0) ? 1 : -1;
  ------------------
  |  Branch (248:24): [True: 0, False: 0]
  ------------------
  249|      0|            }
  250|  16.8M|            if (rightOperand == 0) {
  ------------------
  |  Branch (250:17): [True: 93.7k, False: 16.7M]
  ------------------
  251|  93.7k|                return 1;
  252|  93.7k|            }
  253|  16.7M|            if (rightOperand == 1) {
  ------------------
  |  Branch (253:17): [True: 15.5k, False: 16.7M]
  ------------------
  254|  15.5k|                return leftOperand;
  255|  15.5k|            }
  256|  16.7M|            if (rightOperand < 0) {
  ------------------
  |  Branch (256:17): [True: 0, False: 16.7M]
  ------------------
  257|       |                // L^R is in ]-1:1[ here, so truncating it always gives 0.
  258|      0|                return 0;
  259|      0|            }
  260|  16.7M|            int64_t result = leftOperand;
  261|  16.7M|            for (int32_t i = 1; i < rightOperand; ++i) {
  ------------------
  |  Branch (261:33): [True: 16.7M, False: 0]
  ------------------
  262|  16.7M|                result *= leftOperand;
  263|  16.7M|                if (result < INT32_MIN || result > INT32_MAX) {
  ------------------
  |  Branch (263:21): [True: 0, False: 16.7M]
  |  Branch (263:43): [True: 16.7M, False: 0]
  ------------------
  264|  16.7M|                    return (leftOperand > 0 || rightOperand % 2 == 0) ? INT32_MAX : INT32_MIN;
  ------------------
  |  Branch (264:29): [True: 0, False: 16.7M]
  |  Branch (264:48): [True: 9.57M, False: 7.13M]
  ------------------
  265|  16.7M|                }
  266|  16.7M|            }
  267|      0|            return (int32_t)result;
  268|  16.7M|        }
  269|      0|        case AVIF_SAMPLE_TRANSFORM_MIN:
  ------------------
  |  Branch (269:9): [True: 0, False: 519M]
  ------------------
  270|      0|            return leftOperand <= rightOperand ? leftOperand : rightOperand;
  ------------------
  |  Branch (270:20): [True: 0, False: 0]
  ------------------
  271|      0|        case AVIF_SAMPLE_TRANSFORM_MAX:
  ------------------
  |  Branch (271:9): [True: 0, False: 519M]
  ------------------
  272|      0|            return leftOperand <= rightOperand ? rightOperand : leftOperand;
  ------------------
  |  Branch (272:20): [True: 0, False: 0]
  ------------------
  273|      0|        default:
  ------------------
  |  Branch (273:9): [True: 0, False: 519M]
  ------------------
  274|      0|            assert(AVIF_FALSE);
  275|   519M|    }
  276|      0|    return 0;
  277|   519M|}

avifImageScaleWithLimit:
   30|  8.53k|{
   31|  8.53k|    if ((image->width == dstWidth) && (image->height == dstHeight)) {
  ------------------
  |  Branch (31:9): [True: 1.04k, False: 7.49k]
  |  Branch (31:39): [True: 0, False: 1.04k]
  ------------------
   32|       |        // Nothing to do
   33|      0|        return AVIF_RESULT_OK;
   34|      0|    }
   35|       |
   36|  8.53k|    if ((dstWidth == 0) || (dstHeight == 0)) {
  ------------------
  |  Branch (36:9): [True: 5, False: 8.53k]
  |  Branch (36:28): [True: 1, False: 8.53k]
  ------------------
   37|      6|        avifDiagnosticsPrintf(diag, "avifImageScaleWithLimit requested invalid dst dimensions [%ux%u]", dstWidth, dstHeight);
   38|      6|        return AVIF_RESULT_INVALID_ARGUMENT;
   39|      6|    }
   40|  8.53k|    if (avifDimensionsTooLarge(dstWidth, dstHeight, imageSizeLimit, imageDimensionLimit)) {
  ------------------
  |  Branch (40:9): [True: 17, False: 8.51k]
  ------------------
   41|     17|        avifDiagnosticsPrintf(diag, "avifImageScaleWithLimit requested dst dimensions that are too large [%ux%u]", dstWidth, dstHeight);
   42|     17|        return AVIF_RESULT_NOT_IMPLEMENTED;
   43|     17|    }
   44|       |
   45|  8.51k|    uint8_t * srcYUVPlanes[AVIF_PLANE_COUNT_YUV];
   46|  8.51k|    uint32_t srcYUVRowBytes[AVIF_PLANE_COUNT_YUV];
   47|  34.0k|    for (int i = 0; i < AVIF_PLANE_COUNT_YUV; ++i) {
  ------------------
  |  |  112|  34.0k|#define AVIF_PLANE_COUNT_YUV 3
  ------------------
  |  Branch (47:21): [True: 25.5k, False: 8.51k]
  ------------------
   48|  25.5k|        srcYUVPlanes[i] = image->yuvPlanes[i];
   49|  25.5k|        image->yuvPlanes[i] = NULL;
   50|  25.5k|        srcYUVRowBytes[i] = image->yuvRowBytes[i];
   51|  25.5k|        image->yuvRowBytes[i] = 0;
   52|  25.5k|    }
   53|  8.51k|    const avifBool srcImageOwnsYUVPlanes = image->imageOwnsYUVPlanes;
   54|  8.51k|    image->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  8.51k|#define AVIF_FALSE 0
  ------------------
   55|       |
   56|  8.51k|    uint8_t * srcAlphaPlane = image->alphaPlane;
   57|  8.51k|    image->alphaPlane = NULL;
   58|  8.51k|    uint32_t srcAlphaRowBytes = image->alphaRowBytes;
   59|  8.51k|    image->alphaRowBytes = 0;
   60|  8.51k|    const avifBool srcImageOwnsAlphaPlane = image->imageOwnsAlphaPlane;
   61|  8.51k|    image->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|  8.51k|#define AVIF_FALSE 0
  ------------------
   62|       |
   63|  8.51k|    const uint32_t srcWidth = image->width;
   64|  8.51k|    const uint32_t srcHeight = image->height;
   65|  8.51k|    const uint32_t srcUVWidth = avifImagePlaneWidth(image, AVIF_CHAN_U);
   66|  8.51k|    const uint32_t srcUVHeight = avifImagePlaneHeight(image, AVIF_CHAN_U);
   67|  8.51k|    image->width = dstWidth;
   68|  8.51k|    image->height = dstHeight;
   69|       |
   70|  8.51k|    avifResult result = AVIF_RESULT_OK;
   71|  8.51k|    if (srcYUVPlanes[0] || srcAlphaPlane) {
  ------------------
  |  Branch (71:9): [True: 7.62k, False: 888]
  |  Branch (71:28): [True: 888, False: 0]
  ------------------
   72|       |        // A simple conservative check to avoid integer overflows in libyuv's ScalePlane() and
   73|       |        // ScalePlane_12() functions.
   74|  8.51k|        if (srcWidth > 16384) {
  ------------------
  |  Branch (74:13): [True: 0, False: 8.51k]
  ------------------
   75|      0|            avifDiagnosticsPrintf(diag, "avifImageScaleWithLimit requested invalid width scale for libyuv [%u -> %u]", srcWidth, dstWidth);
   76|      0|            result = AVIF_RESULT_NOT_IMPLEMENTED;
   77|      0|            goto cleanup;
   78|      0|        }
   79|  8.51k|        if (srcHeight > 16384) {
  ------------------
  |  Branch (79:13): [True: 6, False: 8.50k]
  ------------------
   80|      6|            avifDiagnosticsPrintf(diag, "avifImageScaleWithLimit requested invalid height scale for libyuv [%u -> %u]", srcHeight, dstHeight);
   81|      6|            result = AVIF_RESULT_NOT_IMPLEMENTED;
   82|      6|            goto cleanup;
   83|      6|        }
   84|  8.51k|    }
   85|       |
   86|  8.50k|    if (srcYUVPlanes[0]) {
  ------------------
  |  Branch (86:9): [True: 7.61k, False: 888]
  ------------------
   87|  7.61k|        const avifResult allocationResult = avifImageAllocatePlanes(image, AVIF_PLANES_YUV);
   88|  7.61k|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (88:13): [True: 0, False: 7.61k]
  ------------------
   89|      0|            avifDiagnosticsPrintf(diag, "Allocation of YUV planes failed: %s", avifResultToString(allocationResult));
   90|      0|            result = AVIF_RESULT_OUT_OF_MEMORY;
   91|      0|            goto cleanup;
   92|      0|        }
   93|       |
   94|  30.4k|        for (int i = 0; i < AVIF_PLANE_COUNT_YUV; ++i) {
  ------------------
  |  |  112|  30.4k|#define AVIF_PLANE_COUNT_YUV 3
  ------------------
  |  Branch (94:25): [True: 22.8k, False: 7.61k]
  ------------------
   95|  22.8k|            if (!srcYUVPlanes[i]) {
  ------------------
  |  Branch (95:17): [True: 3.26k, False: 19.5k]
  ------------------
   96|  3.26k|                continue;
   97|  3.26k|            }
   98|       |
   99|  19.5k|            const uint32_t srcW = (i == AVIF_CHAN_Y) ? srcWidth : srcUVWidth;
  ------------------
  |  Branch (99:35): [True: 7.61k, False: 11.9k]
  ------------------
  100|  19.5k|            const uint32_t srcH = (i == AVIF_CHAN_Y) ? srcHeight : srcUVHeight;
  ------------------
  |  Branch (100:35): [True: 7.61k, False: 11.9k]
  ------------------
  101|  19.5k|            const uint32_t dstW = avifImagePlaneWidth(image, i);
  102|  19.5k|            const uint32_t dstH = avifImagePlaneHeight(image, i);
  103|  19.5k|            if (image->depth > 8) {
  ------------------
  |  Branch (103:17): [True: 11.6k, False: 7.95k]
  ------------------
  104|  11.6k|                uint16_t * const srcPlane = (uint16_t *)srcYUVPlanes[i];
  105|  11.6k|                const uint32_t srcStride = srcYUVRowBytes[i] / 2;
  106|  11.6k|                uint16_t * const dstPlane = (uint16_t *)image->yuvPlanes[i];
  107|  11.6k|                const uint32_t dstStride = image->yuvRowBytes[i] / 2;
  108|  11.6k|#if LIBYUV_VERSION >= 1880
  109|  11.6k|                const int failure =
  110|  11.6k|                    ScalePlane_12(srcPlane, srcStride, srcW, srcH, dstPlane, dstStride, dstW, dstH, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|  11.6k|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  111|  11.6k|                if (failure) {
  ------------------
  |  Branch (111:21): [True: 0, False: 11.6k]
  ------------------
  112|      0|                    avifDiagnosticsPrintf(diag, "ScalePlane_12() failed (%d)", failure);
  113|      0|                    result = (failure == 1) ? AVIF_RESULT_OUT_OF_MEMORY : AVIF_RESULT_UNKNOWN_ERROR;
  ------------------
  |  Branch (113:30): [True: 0, False: 0]
  ------------------
  114|      0|                    goto cleanup;
  115|      0|                }
  116|       |#elif LIBYUV_VERSION >= 1774
  117|       |                ScalePlane_12(srcPlane, srcStride, srcW, srcH, dstPlane, dstStride, dstW, dstH, AVIF_LIBYUV_FILTER_MODE);
  118|       |#else
  119|       |                ScalePlane_16(srcPlane, srcStride, srcW, srcH, dstPlane, dstStride, dstW, dstH, AVIF_LIBYUV_FILTER_MODE);
  120|       |#endif
  121|  11.6k|            } else {
  122|  7.95k|                uint8_t * const srcPlane = srcYUVPlanes[i];
  123|  7.95k|                const uint32_t srcStride = srcYUVRowBytes[i];
  124|  7.95k|                uint8_t * const dstPlane = image->yuvPlanes[i];
  125|  7.95k|                const uint32_t dstStride = image->yuvRowBytes[i];
  126|  7.95k|#if LIBYUV_VERSION >= 1880
  127|  7.95k|                const int failure = ScalePlane(srcPlane, srcStride, srcW, srcH, dstPlane, dstStride, dstW, dstH, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|  7.95k|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  128|  7.95k|                if (failure) {
  ------------------
  |  Branch (128:21): [True: 0, False: 7.95k]
  ------------------
  129|      0|                    avifDiagnosticsPrintf(diag, "ScalePlane() failed (%d)", failure);
  130|      0|                    result = (failure == 1) ? AVIF_RESULT_OUT_OF_MEMORY : AVIF_RESULT_UNKNOWN_ERROR;
  ------------------
  |  Branch (130:30): [True: 0, False: 0]
  ------------------
  131|      0|                    goto cleanup;
  132|      0|                }
  133|       |#else
  134|       |                ScalePlane(srcPlane, srcStride, srcW, srcH, dstPlane, dstStride, dstW, dstH, AVIF_LIBYUV_FILTER_MODE);
  135|       |#endif
  136|  7.95k|            }
  137|  19.5k|        }
  138|  7.61k|    }
  139|       |
  140|  8.50k|    if (srcAlphaPlane) {
  ------------------
  |  Branch (140:9): [True: 888, False: 7.61k]
  ------------------
  141|    888|        const avifResult allocationResult = avifImageAllocatePlanes(image, AVIF_PLANES_A);
  142|    888|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (142:13): [True: 0, False: 888]
  ------------------
  143|      0|            avifDiagnosticsPrintf(diag, "Allocation of alpha plane failed: %s", avifResultToString(allocationResult));
  144|      0|            result = AVIF_RESULT_OUT_OF_MEMORY;
  145|      0|            goto cleanup;
  146|      0|        }
  147|       |
  148|    888|        if (image->depth > 8) {
  ------------------
  |  Branch (148:13): [True: 338, False: 550]
  ------------------
  149|    338|            uint16_t * const srcPlane = (uint16_t *)srcAlphaPlane;
  150|    338|            const uint32_t srcStride = srcAlphaRowBytes / 2;
  151|    338|            uint16_t * const dstPlane = (uint16_t *)image->alphaPlane;
  152|    338|            const uint32_t dstStride = image->alphaRowBytes / 2;
  153|    338|#if LIBYUV_VERSION >= 1880
  154|    338|            const int failure =
  155|    338|                ScalePlane_12(srcPlane, srcStride, srcWidth, srcHeight, dstPlane, dstStride, dstWidth, dstHeight, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|    338|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  156|    338|            if (failure) {
  ------------------
  |  Branch (156:17): [True: 0, False: 338]
  ------------------
  157|      0|                avifDiagnosticsPrintf(diag, "ScalePlane_12() failed (%d)", failure);
  158|      0|                result = (failure == 1) ? AVIF_RESULT_OUT_OF_MEMORY : AVIF_RESULT_UNKNOWN_ERROR;
  ------------------
  |  Branch (158:26): [True: 0, False: 0]
  ------------------
  159|      0|                goto cleanup;
  160|      0|            }
  161|       |#elif LIBYUV_VERSION >= 1774
  162|       |            ScalePlane_12(srcPlane, srcStride, srcWidth, srcHeight, dstPlane, dstStride, dstWidth, dstHeight, AVIF_LIBYUV_FILTER_MODE);
  163|       |#else
  164|       |            ScalePlane_16(srcPlane, srcStride, srcWidth, srcHeight, dstPlane, dstStride, dstWidth, dstHeight, AVIF_LIBYUV_FILTER_MODE);
  165|       |#endif
  166|    550|        } else {
  167|    550|            uint8_t * const srcPlane = srcAlphaPlane;
  168|    550|            const uint32_t srcStride = srcAlphaRowBytes;
  169|    550|            uint8_t * const dstPlane = image->alphaPlane;
  170|    550|            const uint32_t dstStride = image->alphaRowBytes;
  171|    550|#if LIBYUV_VERSION >= 1880
  172|    550|            const int failure =
  173|    550|                ScalePlane(srcPlane, srcStride, srcWidth, srcHeight, dstPlane, dstStride, dstWidth, dstHeight, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|    550|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  174|    550|            if (failure) {
  ------------------
  |  Branch (174:17): [True: 0, False: 550]
  ------------------
  175|      0|                avifDiagnosticsPrintf(diag, "ScalePlane() failed (%d)", failure);
  176|      0|                result = (failure == 1) ? AVIF_RESULT_OUT_OF_MEMORY : AVIF_RESULT_UNKNOWN_ERROR;
  ------------------
  |  Branch (176:26): [True: 0, False: 0]
  ------------------
  177|      0|                goto cleanup;
  178|      0|            }
  179|       |#else
  180|       |            ScalePlane(srcPlane, srcStride, srcWidth, srcHeight, dstPlane, dstStride, dstWidth, dstHeight, AVIF_LIBYUV_FILTER_MODE);
  181|       |#endif
  182|    550|        }
  183|    888|    }
  184|       |
  185|  8.51k|cleanup:
  186|  8.51k|    if (srcYUVPlanes[0] && srcImageOwnsYUVPlanes) {
  ------------------
  |  Branch (186:9): [True: 7.62k, False: 888]
  |  Branch (186:28): [True: 0, False: 7.62k]
  ------------------
  187|      0|        for (int i = 0; i < AVIF_PLANE_COUNT_YUV; ++i) {
  ------------------
  |  |  112|      0|#define AVIF_PLANE_COUNT_YUV 3
  ------------------
  |  Branch (187:25): [True: 0, False: 0]
  ------------------
  188|      0|            avifFree(srcYUVPlanes[i]);
  189|      0|        }
  190|      0|    }
  191|  8.51k|    if (srcAlphaPlane && srcImageOwnsAlphaPlane) {
  ------------------
  |  Branch (191:9): [True: 888, False: 7.62k]
  |  Branch (191:26): [True: 389, False: 499]
  ------------------
  192|    389|        avifFree(srcAlphaPlane);
  193|    389|    }
  194|  8.51k|    return result;
  195|  8.50k|}

avifROStreamCurrent:
   15|  12.0M|{
   16|  12.0M|    return stream->raw->data + stream->offset;
   17|  12.0M|}
avifROStreamStart:
   20|  13.9M|{
   21|  13.9M|    stream->raw = raw;
   22|  13.9M|    stream->offset = 0;
   23|  13.9M|    stream->numUsedBitsInPartialByte = 0;
   24|  13.9M|    stream->diag = diag;
   25|  13.9M|    stream->diagContext = diagContext;
   26|       |
   27|       |    // If diag is non-NULL, diagContext must also be non-NULL
   28|       |    assert(!stream->diag || stream->diagContext);
   29|  13.9M|}
avifROStreamHasBytesLeft:
   32|  86.1M|{
   33|  86.1M|    return byteCount <= (stream->raw->size - stream->offset);
   34|  86.1M|}
avifROStreamRemainingBytes:
   37|  12.8M|{
   38|  12.8M|    return stream->raw->size - stream->offset;
   39|  12.8M|}
avifROStreamOffset:
   42|  6.69M|{
   43|  6.69M|    return stream->offset;
   44|  6.69M|}
avifROStreamSkip:
   56|  19.0M|{
   57|  19.0M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
   58|  19.0M|    if (!avifROStreamHasBytesLeft(stream, byteCount)) {
  ------------------
  |  Branch (58:9): [True: 69, False: 19.0M]
  ------------------
   59|     69|        avifDiagnosticsPrintf(stream->diag, "%s: Failed to skip %zu bytes, truncated data?", stream->diagContext, byteCount);
   60|     69|        return AVIF_FALSE;
  ------------------
  |  |   89|     69|#define AVIF_FALSE 0
  ------------------
   61|     69|    }
   62|  19.0M|    stream->offset += byteCount;
   63|  19.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  19.0M|#define AVIF_TRUE 1
  ------------------
   64|  19.0M|}
avifROStreamRead:
   67|  56.9M|{
   68|  56.9M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
   69|  56.9M|    if (!avifROStreamHasBytesLeft(stream, size)) {
  ------------------
  |  Branch (69:9): [True: 560, False: 56.9M]
  ------------------
   70|    560|        avifDiagnosticsPrintf(stream->diag, "%s: Failed to read %zu bytes, truncated data?", stream->diagContext, size);
   71|    560|        return AVIF_FALSE;
  ------------------
  |  |   89|    560|#define AVIF_FALSE 0
  ------------------
   72|    560|    }
   73|       |
   74|  56.9M|    memcpy(data, stream->raw->data + stream->offset, size);
   75|  56.9M|    stream->offset += size;
   76|  56.9M|    return AVIF_TRUE;
  ------------------
  |  |   88|  56.9M|#define AVIF_TRUE 1
  ------------------
   77|  56.9M|}
avifROStreamReadUX8:
   80|  21.0M|{
   81|  21.0M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
   82|  21.0M|    if (factor == 0) {
  ------------------
  |  Branch (82:9): [True: 19.3M, False: 1.69M]
  ------------------
   83|       |        // Don't read anything, just set to 0
   84|  19.3M|        *v = 0;
   85|  19.3M|    } else if (factor == 1) {
  ------------------
  |  Branch (85:16): [True: 0, False: 1.69M]
  ------------------
   86|      0|        uint8_t tmp;
   87|      0|        AVIF_CHECK(avifROStreamRead(stream, &tmp, 1));
  ------------------
  |  |   36|      0|    do {                        \
  |  |   37|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   88|      0|        *v = tmp;
   89|  1.69M|    } else if (factor == 2) {
  ------------------
  |  Branch (89:16): [True: 0, False: 1.69M]
  ------------------
   90|      0|        uint16_t tmp;
   91|      0|        AVIF_CHECK(avifROStreamReadU16(stream, &tmp));
  ------------------
  |  |   36|      0|    do {                        \
  |  |   37|      0|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 0]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
   92|      0|        *v = tmp;
   93|  1.69M|    } else if (factor == 4) {
  ------------------
  |  Branch (93:16): [True: 1.65M, False: 31.3k]
  ------------------
   94|  1.65M|        uint32_t tmp;
   95|  1.65M|        AVIF_CHECK(avifROStreamReadU32(stream, &tmp));
  ------------------
  |  |   36|  1.65M|    do {                        \
  |  |   37|  1.65M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 46, False: 1.65M]
  |  |  ------------------
  |  |   38|     46|            avifBreakOnError(); \
  |  |   39|     46|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     46|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     46|        }                       \
  |  |   41|  1.65M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.65M]
  |  |  ------------------
  ------------------
   96|  1.65M|        *v = tmp;
   97|  1.65M|    } else if (factor == 8) {
  ------------------
  |  Branch (97:16): [True: 31.3k, False: 0]
  ------------------
   98|  31.3k|        uint64_t tmp;
   99|  31.3k|        AVIF_CHECK(avifROStreamReadU64(stream, &tmp));
  ------------------
  |  |   36|  31.3k|    do {                        \
  |  |   37|  31.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 62, False: 31.3k]
  |  |  ------------------
  |  |   38|     62|            avifBreakOnError(); \
  |  |   39|     62|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     62|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     62|        }                       \
  |  |   41|  31.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 31.3k]
  |  |  ------------------
  ------------------
  100|  31.3k|        *v = tmp;
  101|  31.3k|    } else {
  102|       |        // Unsupported factor
  103|      0|        avifDiagnosticsPrintf(stream->diag, "%s: Failed to read UX8 value; Unsupported UX8 factor [%" PRIu64 "]", stream->diagContext, factor);
  104|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  105|      0|    }
  106|  21.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  21.0M|#define AVIF_TRUE 1
  ------------------
  107|  21.0M|}
avifROStreamReadU16:
  110|  8.77M|{
  111|  8.77M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  112|  8.77M|    AVIF_CHECK(avifROStreamRead(stream, (uint8_t *)v, sizeof(uint16_t)));
  ------------------
  |  |   36|  8.77M|    do {                        \
  |  |   37|  8.77M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 73, False: 8.77M]
  |  |  ------------------
  |  |   38|     73|            avifBreakOnError(); \
  |  |   39|     73|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     73|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     73|        }                       \
  |  |   41|  8.77M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 8.77M]
  |  |  ------------------
  ------------------
  113|  8.77M|    *v = avifNTOHS(*v);
  114|  8.77M|    return AVIF_TRUE;
  ------------------
  |  |   88|  8.77M|#define AVIF_TRUE 1
  ------------------
  115|  8.77M|}
avifROStreamReadU32:
  126|  20.0M|{
  127|  20.0M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  128|  20.0M|    AVIF_CHECK(avifROStreamRead(stream, (uint8_t *)v, sizeof(uint32_t)));
  ------------------
  |  |   36|  20.0M|    do {                        \
  |  |   37|  20.0M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 326, False: 20.0M]
  |  |  ------------------
  |  |   38|    326|            avifBreakOnError(); \
  |  |   39|    326|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    326|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    326|        }                       \
  |  |   41|  20.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 20.0M]
  |  |  ------------------
  ------------------
  129|  20.0M|    *v = avifNTOHL(*v);
  130|  20.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  20.0M|#define AVIF_TRUE 1
  ------------------
  131|  20.0M|}
avifROStreamReadU64:
  142|   138k|{
  143|   138k|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  144|   138k|    AVIF_CHECK(avifROStreamRead(stream, (uint8_t *)v, sizeof(uint64_t)));
  ------------------
  |  |   36|   138k|    do {                        \
  |  |   37|   138k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 73, False: 138k]
  |  |  ------------------
  |  |   38|     73|            avifBreakOnError(); \
  |  |   39|     73|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     73|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     73|        }                       \
  |  |   41|   138k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 138k]
  |  |  ------------------
  ------------------
  145|   138k|    *v = avifNTOH64(*v);
  146|   138k|    return AVIF_TRUE;
  ------------------
  |  |   88|   138k|#define AVIF_TRUE 1
  ------------------
  147|   138k|}
avifROStreamReadBitsU8:
  167|  12.3M|{
  168|  12.3M|    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
  ------------------
  |  |   36|  12.3M|    do {                        \
  |  |   37|  12.3M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 12.3M]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  12.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.3M]
  |  |  ------------------
  ------------------
  169|  12.3M|    uint32_t vU32;
  170|  12.3M|    AVIF_CHECK(avifROStreamReadBitsU32(stream, &vU32, bitCount));
  ------------------
  |  |   36|  12.3M|    do {                        \
  |  |   37|  12.3M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 20, False: 12.3M]
  |  |  ------------------
  |  |   38|     20|            avifBreakOnError(); \
  |  |   39|     20|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     20|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     20|        }                       \
  |  |   41|  12.3M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.3M]
  |  |  ------------------
  ------------------
  171|  12.3M|    *v = (uint8_t)vU32;
  172|  12.3M|    return AVIF_TRUE;
  ------------------
  |  |   88|  12.3M|#define AVIF_TRUE 1
  ------------------
  173|  12.3M|}
avifROStreamReadBitsU16:
  176|    117|{
  177|    117|    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
  ------------------
  |  |   36|    117|    do {                        \
  |  |   37|    117|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 117]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    117|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 117]
  |  |  ------------------
  ------------------
  178|    117|    uint32_t vU32;
  179|    117|    AVIF_CHECK(avifROStreamReadBitsU32(stream, &vU32, bitCount));
  ------------------
  |  |   36|    117|    do {                        \
  |  |   37|    117|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 114]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|    117|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 114]
  |  |  ------------------
  ------------------
  180|    114|    *v = (uint16_t)vU32;
  181|    114|    return AVIF_TRUE;
  ------------------
  |  |   88|    114|#define AVIF_TRUE 1
  ------------------
  182|    117|}
avifROStreamReadBitsU32:
  185|  18.0M|{
  186|  18.0M|    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
  ------------------
  |  |   36|  18.0M|    do {                        \
  |  |   37|  18.0M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 18.0M]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  18.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 18.0M]
  |  |  ------------------
  ------------------
  187|  18.0M|    *v = 0;
  188|  36.2M|    while (bitCount) {
  ------------------
  |  Branch (188:12): [True: 18.2M, False: 18.0M]
  ------------------
  189|  18.2M|        if (stream->numUsedBitsInPartialByte == 0) {
  ------------------
  |  Branch (189:13): [True: 7.47M, False: 10.7M]
  ------------------
  190|  7.47M|            AVIF_CHECK(avifROStreamSkip(stream, sizeof(uint8_t))); // Book a new partial byte in the stream.
  ------------------
  |  |   36|  7.47M|    do {                        \
  |  |   37|  7.47M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 61, False: 7.47M]
  |  |  ------------------
  |  |   38|     61|            avifBreakOnError(); \
  |  |   39|     61|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     61|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     61|        }                       \
  |  |   41|  7.47M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 7.47M]
  |  |  ------------------
  ------------------
  191|  7.47M|        }
  192|  18.2M|        assert(stream->offset > 0);
  193|  18.2M|        const uint8_t * packedBits = stream->raw->data + stream->offset - 1;
  194|       |
  195|  18.2M|        const size_t numBits = AVIF_MIN(bitCount, 8 - stream->numUsedBitsInPartialByte);
  ------------------
  |  |   19|  18.2M|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 10.7M, False: 7.47M]
  |  |  ------------------
  ------------------
  196|  18.2M|        stream->numUsedBitsInPartialByte += numBits;
  197|  18.2M|        bitCount -= numBits;
  198|       |        // The stream bits are packed starting with the most significant bit of the first input byte.
  199|       |        // This way, packed bits can be found in the same order in the bit stream.
  200|  18.2M|        const uint32_t bits = (*packedBits >> (8 - stream->numUsedBitsInPartialByte)) & ((1 << numBits) - 1);
  201|       |        // The value bits are ordered from the most significant bit to the least significant bit.
  202|       |        // In the case where avifROStreamReadBitsU32() is used to parse the unsigned integer value *v
  203|       |        // over multiple aligned bytes, this order corresponds to big endianness.
  204|  18.2M|        *v |= bits << bitCount;
  205|       |
  206|  18.2M|        if (stream->numUsedBitsInPartialByte == 8) {
  ------------------
  |  Branch (206:13): [True: 7.47M, False: 10.7M]
  ------------------
  207|       |            // Start a new partial byte the next time a bit is needed.
  208|  7.47M|            stream->numUsedBitsInPartialByte = 0;
  209|  7.47M|        }
  210|  18.2M|    }
  211|  18.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  18.0M|#define AVIF_TRUE 1
  ------------------
  212|  18.0M|}
avifROStreamReadString:
  215|  1.70M|{
  216|  1.70M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  217|       |
  218|       |    // Check for the presence of a null terminator in the stream.
  219|  1.70M|    size_t remainingBytes = avifROStreamRemainingBytes(stream);
  220|  1.70M|    const uint8_t * p = avifROStreamCurrent(stream);
  221|  1.70M|    avifBool foundNullTerminator = AVIF_FALSE;
  ------------------
  |  |   89|  1.70M|#define AVIF_FALSE 0
  ------------------
  222|  15.8M|    for (size_t i = 0; i < remainingBytes; ++i) {
  ------------------
  |  Branch (222:24): [True: 15.8M, False: 20]
  ------------------
  223|  15.8M|        if (p[i] == 0) {
  ------------------
  |  Branch (223:13): [True: 1.70M, False: 14.1M]
  ------------------
  224|  1.70M|            foundNullTerminator = AVIF_TRUE;
  ------------------
  |  |   88|  1.70M|#define AVIF_TRUE 1
  ------------------
  225|  1.70M|            break;
  226|  1.70M|        }
  227|  15.8M|    }
  228|  1.70M|    if (!foundNullTerminator) {
  ------------------
  |  Branch (228:9): [True: 20, False: 1.70M]
  ------------------
  229|     20|        avifDiagnosticsPrintf(stream->diag, "%s: Failed to find a NULL terminator when reading a string", stream->diagContext);
  230|     20|        return AVIF_FALSE;
  ------------------
  |  |   89|     20|#define AVIF_FALSE 0
  ------------------
  231|     20|    }
  232|       |
  233|  1.70M|    const char * streamString = (const char *)p;
  234|  1.70M|    size_t stringLen = strlen(streamString);
  235|  1.70M|    stream->offset += stringLen + 1; // update the stream to have read the "whole string" in
  236|       |
  237|  1.70M|    if (output && outputSize) {
  ------------------
  |  Branch (237:9): [True: 125k, False: 1.57M]
  |  Branch (237:19): [True: 125k, False: 0]
  ------------------
  238|       |        // clamp to our output buffer
  239|   125k|        if (stringLen >= outputSize) {
  ------------------
  |  Branch (239:13): [True: 0, False: 125k]
  ------------------
  240|      0|            stringLen = outputSize - 1;
  241|      0|        }
  242|   125k|        memcpy(output, streamString, stringLen);
  243|   125k|        output[stringLen] = 0;
  244|   125k|    }
  245|  1.70M|    return AVIF_TRUE;
  ------------------
  |  |   88|  1.70M|#define AVIF_TRUE 1
  ------------------
  246|  1.70M|}
avifROStreamReadBoxHeaderPartial:
  249|  13.1M|{
  250|       |    // Section 4.2.2 of ISO/IEC 14496-12.
  251|  13.1M|    size_t startOffset = stream->offset;
  252|       |
  253|  13.1M|    uint32_t smallSize;
  254|  13.1M|    AVIF_CHECK(avifROStreamReadU32(stream, &smallSize));   // unsigned int(32) size;
  ------------------
  |  |   36|  13.1M|    do {                        \
  |  |   37|  13.1M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 43, False: 13.1M]
  |  |  ------------------
  |  |   38|     43|            avifBreakOnError(); \
  |  |   39|     43|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     43|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     43|        }                       \
  |  |   41|  13.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 13.1M]
  |  |  ------------------
  ------------------
  255|  13.1M|    AVIF_CHECK(avifROStreamRead(stream, header->type, 4)); // unsigned int(32) type = boxtype;
  ------------------
  |  |   36|  13.1M|    do {                        \
  |  |   37|  13.1M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 19, False: 13.1M]
  |  |  ------------------
  |  |   38|     19|            avifBreakOnError(); \
  |  |   39|     19|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     19|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     19|        }                       \
  |  |   41|  13.1M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 13.1M]
  |  |  ------------------
  ------------------
  256|       |
  257|  13.1M|    uint64_t size = smallSize;
  258|  13.1M|    if (size == 1) {
  ------------------
  |  Branch (258:9): [True: 580, False: 13.1M]
  ------------------
  259|    580|        AVIF_CHECK(avifROStreamReadU64(stream, &size)); // unsigned int(64) largesize;
  ------------------
  |  |   36|    580|    do {                        \
  |  |   37|    580|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 576]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|    580|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 576]
  |  |  ------------------
  ------------------
  260|    580|    }
  261|       |
  262|  13.1M|    if (!memcmp(header->type, "uuid", 4)) {
  ------------------
  |  Branch (262:9): [True: 39.3k, False: 13.0M]
  ------------------
  263|  39.3k|        AVIF_CHECK(avifROStreamRead(stream, header->usertype, 16)); // unsigned int(8) usertype[16] = extended_type;
  ------------------
  |  |   36|  39.3k|    do {                        \
  |  |   37|  39.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 6, False: 39.3k]
  |  |  ------------------
  |  |   38|      6|            avifBreakOnError(); \
  |  |   39|      6|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      6|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      6|        }                       \
  |  |   41|  39.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 39.3k]
  |  |  ------------------
  ------------------
  264|  13.0M|    } else {
  265|  13.0M|        memset(header->usertype, 0, sizeof(header->usertype));
  266|  13.0M|    }
  267|       |
  268|  13.1M|    size_t bytesRead = stream->offset - startOffset;
  269|  13.1M|    if (size == 0) {
  ------------------
  |  Branch (269:9): [True: 16.0k, False: 13.0M]
  ------------------
  270|       |        // Section 4.2.2 of ISO/IEC 14496-12.
  271|       |        //   if size is 0, then this box shall be in a top-level box (i.e. not contained in another
  272|       |        //   box), and be the last box in its 'file', and its payload extends to the end of that
  273|       |        //   enclosing 'file'. This is normally only used for a MediaDataBox ('mdat').
  274|  16.0k|        if (!topLevel) {
  ------------------
  |  Branch (274:13): [True: 17, False: 16.0k]
  ------------------
  275|     17|            avifDiagnosticsPrintf(stream->diag, "%s: Non-top-level box with size 0", stream->diagContext);
  276|     17|            return AVIF_FALSE;
  ------------------
  |  |   89|     17|#define AVIF_FALSE 0
  ------------------
  277|     17|        }
  278|       |
  279|       |        // The given stream may be incomplete and there is no guarantee that sizeHint is available and accurate.
  280|       |        // Otherwise size could be set to avifROStreamRemainingBytes(stream) + (stream->offset - startOffset) right now.
  281|       |
  282|       |        // Wait for avifIOReadFunc() to return AVIF_RESULT_OK.
  283|  16.0k|        header->isSizeZeroBox = AVIF_TRUE;
  ------------------
  |  |   88|  16.0k|#define AVIF_TRUE 1
  ------------------
  284|  16.0k|        header->size = 0;
  285|  16.0k|        return AVIF_TRUE;
  ------------------
  |  |   88|  16.0k|#define AVIF_TRUE 1
  ------------------
  286|  16.0k|    }
  287|       |
  288|  13.0M|    if ((size < bytesRead) || ((size - bytesRead) > SIZE_MAX)) {
  ------------------
  |  Branch (288:9): [True: 2, False: 13.0M]
  |  Branch (288:31): [True: 0, False: 13.0M]
  ------------------
  289|      2|        avifDiagnosticsPrintf(stream->diag, "%s: Header size overflow check failure", stream->diagContext);
  290|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
  291|      2|    }
  292|  13.0M|    header->isSizeZeroBox = AVIF_FALSE;
  ------------------
  |  |   89|  13.0M|#define AVIF_FALSE 0
  ------------------
  293|  13.0M|    header->size = (size_t)(size - bytesRead);
  294|  13.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  13.0M|#define AVIF_TRUE 1
  ------------------
  295|  13.0M|}
avifROStreamReadBoxHeader:
  298|  9.54M|{
  299|  9.54M|    AVIF_CHECK(avifROStreamReadBoxHeaderPartial(stream, header, /*topLevel=*/AVIF_FALSE));
  ------------------
  |  |   36|  9.54M|    do {                        \
  |  |   37|  9.54M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 52, False: 9.54M]
  |  |  ------------------
  |  |   38|     52|            avifBreakOnError(); \
  |  |   39|     52|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     52|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     52|        }                       \
  |  |   41|  9.54M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 9.54M]
  |  |  ------------------
  ------------------
  300|  9.54M|    if (header->size > avifROStreamRemainingBytes(stream)) {
  ------------------
  |  Branch (300:9): [True: 256, False: 9.54M]
  ------------------
  301|    256|        avifDiagnosticsPrintf(stream->diag, "%s: Child box too large, possibly truncated data", stream->diagContext);
  302|    256|        return AVIF_FALSE;
  ------------------
  |  |   89|    256|#define AVIF_FALSE 0
  ------------------
  303|    256|    }
  304|  9.54M|    return AVIF_TRUE;
  ------------------
  |  |   88|  9.54M|#define AVIF_TRUE 1
  ------------------
  305|  9.54M|}
avifROStreamReadVersionAndFlags:
  308|  6.27M|{
  309|  6.27M|    uint8_t versionAndFlags[4];
  310|  6.27M|    AVIF_CHECK(avifROStreamRead(stream, versionAndFlags, 4));
  ------------------
  |  |   36|  6.27M|    do {                        \
  |  |   37|  6.27M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 15, False: 6.27M]
  |  |  ------------------
  |  |   38|     15|            avifBreakOnError(); \
  |  |   39|     15|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     15|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     15|        }                       \
  |  |   41|  6.27M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 6.27M]
  |  |  ------------------
  ------------------
  311|  6.27M|    if (version) {
  ------------------
  |  Branch (311:9): [True: 6.22M, False: 52.9k]
  ------------------
  312|  6.22M|        *version = versionAndFlags[0];
  313|  6.22M|    }
  314|  6.27M|    if (flags) {
  ------------------
  |  Branch (314:9): [True: 2.76M, False: 3.51M]
  ------------------
  315|  2.76M|        *flags = (versionAndFlags[1] << 16) + (versionAndFlags[2] << 8) + (versionAndFlags[3] << 0);
  316|  2.76M|    }
  317|  6.27M|    return AVIF_TRUE;
  ------------------
  |  |   88|  6.27M|#define AVIF_TRUE 1
  ------------------
  318|  6.27M|}
avifROStreamReadAndEnforceVersion:
  321|  2.78M|{
  322|  2.78M|    uint8_t version;
  323|  2.78M|    AVIF_CHECK(avifROStreamReadVersionAndFlags(stream, &version, flags));
  ------------------
  |  |   36|  2.78M|    do {                        \
  |  |   37|  2.78M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 2.78M]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|  2.78M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 2.78M]
  |  |  ------------------
  ------------------
  324|  2.78M|    if (version != enforcedVersion) {
  ------------------
  |  Branch (324:9): [True: 23, False: 2.78M]
  ------------------
  325|     23|        avifDiagnosticsPrintf(stream->diag, "%s: Expecting box version %u, got version %u", stream->diagContext, enforcedVersion, version);
  326|     23|        return AVIF_FALSE;
  ------------------
  |  |   89|     23|#define AVIF_FALSE 0
  ------------------
  327|     23|    }
  328|  2.78M|    return AVIF_TRUE;
  ------------------
  |  |   88|  2.78M|#define AVIF_TRUE 1
  ------------------
  329|  2.78M|}

avifNTOHS:
   28|  8.77M|{
   29|  8.77M|    const uint8_t * data = (const uint8_t *)&s;
   30|  8.77M|    return (uint16_t)((data[1] << 0) | (data[0] << 8));
   31|  8.77M|}
avifNTOHL:
   51|  20.0M|{
   52|  20.0M|    const uint8_t * data = (const uint8_t *)&l;
   53|  20.0M|    return ((uint32_t)data[3] << 0) | ((uint32_t)data[2] << 8) | ((uint32_t)data[1] << 16) | ((uint32_t)data[0] << 24);
   54|  20.0M|}
avifNTOH64:
   78|   138k|{
   79|   138k|    const uint8_t * data = (const uint8_t *)&l;
   80|   138k|    return ((uint64_t)data[7] << 0) | ((uint64_t)data[6] << 8) | ((uint64_t)data[5] << 16) | ((uint64_t)data[4] << 24) |
   81|   138k|           ((uint64_t)data[3] << 32) | ((uint64_t)data[2] << 40) | ((uint64_t)data[1] << 48) | ((uint64_t)data[0] << 56);
   82|   138k|}
avifArrayCreate:
   88|  13.5M|{
   89|  13.5M|    avifArrayInternal * arr = (avifArrayInternal *)arrayStruct;
   90|  13.5M|    arr->elementSize = elementSize ? elementSize : 1;
  ------------------
  |  Branch (90:24): [True: 13.5M, False: 0]
  ------------------
   91|  13.5M|    arr->count = 0;
   92|  13.5M|    arr->capacity = initialCapacity;
   93|  13.5M|    if (arr->capacity > SIZE_MAX / arr->elementSize) {
  ------------------
  |  Branch (93:9): [True: 0, False: 13.5M]
  ------------------
   94|      0|        arr->ptr = NULL;
   95|      0|        arr->capacity = 0;
   96|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
   97|      0|    }
   98|  13.5M|    size_t byteCount = (size_t)arr->elementSize * arr->capacity;
   99|  13.5M|    arr->ptr = (uint8_t *)avifAlloc(byteCount);
  100|  13.5M|    if (!arr->ptr) {
  ------------------
  |  Branch (100:9): [True: 0, False: 13.5M]
  ------------------
  101|      0|        arr->capacity = 0;
  102|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  103|      0|    }
  104|  13.5M|    memset(arr->ptr, 0, byteCount);
  105|  13.5M|    return AVIF_TRUE;
  ------------------
  |  |   88|  13.5M|#define AVIF_TRUE 1
  ------------------
  106|  13.5M|}
avifArrayPush:
  109|  19.4M|{
  110|  19.4M|    avifArrayInternal * arr = (avifArrayInternal *)arrayStruct;
  111|  19.4M|    if (arr->count == arr->capacity) {
  ------------------
  |  Branch (111:9): [True: 108k, False: 19.3M]
  ------------------
  112|   108k|        uint8_t * oldPtr = arr->ptr;
  113|   108k|        size_t oldByteCount = (size_t)arr->elementSize * arr->capacity;
  114|   108k|        if (oldByteCount > SIZE_MAX / 2 || arr->capacity > UINT32_MAX / 2) {
  ------------------
  |  Branch (114:13): [True: 0, False: 108k]
  |  Branch (114:44): [True: 0, False: 108k]
  ------------------
  115|      0|            return NULL;
  116|      0|        }
  117|   108k|        size_t newByteCount = oldByteCount * 2;
  118|   108k|        uint8_t * newPtr = (uint8_t *)avifAlloc(newByteCount);
  119|   108k|        if (newPtr == NULL) {
  ------------------
  |  Branch (119:13): [True: 0, False: 108k]
  ------------------
  120|      0|            return NULL;
  121|      0|        }
  122|   108k|        arr->ptr = newPtr;
  123|   108k|        memset(arr->ptr + oldByteCount, 0, oldByteCount);
  124|   108k|        memcpy(arr->ptr, oldPtr, oldByteCount);
  125|   108k|        arr->capacity *= 2;
  126|   108k|        avifFree(oldPtr);
  127|   108k|    }
  128|  19.4M|    ++arr->count;
  129|  19.4M|    return &arr->ptr[(arr->count - 1) * (size_t)arr->elementSize];
  130|  19.4M|}
avifArrayDestroy:
  141|  15.3M|{
  142|  15.3M|    avifArrayInternal * arr = (avifArrayInternal *)arrayStruct;
  143|  15.3M|    if (arr->ptr) {
  ------------------
  |  Branch (143:9): [True: 13.5M, False: 1.83M]
  ------------------
  144|  13.5M|        avifFree(arr->ptr);
  145|       |        arr->ptr = NULL;
  146|  13.5M|    }
  147|  15.3M|    memset(arr, 0, sizeof(avifArrayInternal));
  148|  15.3M|}

avif_fuzztest_dec_incr.cc:_ZN4avif8testutil12_GLOBAL__N_110DecodeIncrERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjb:
   52|  12.8k|                bool use_nth_image_api) {
   53|  12.8k|  ASSERT_FALSE(GetSeedDataDirs().empty());  // Make sure seeds are available.
  ------------------
  |  Branch (53:3): [True: 12.8k, False: 0]
  |  Branch (53:3): [True: 0, False: 12.8k]
  |  Branch (53:3): [True: 12.8k, False: 0]
  ------------------
   54|       |
   55|  12.8k|  ImagePtr reference(avifImageCreateEmpty());
   56|  12.8k|  ASSERT_NE(reference.get(), nullptr);
  ------------------
  |  Branch (56:3): [True: 12.8k, False: 0]
  |  Branch (56:3): [True: 0, False: 12.8k]
  |  Branch (56:3): [True: 12.8k, False: 0]
  ------------------
   57|       |
   58|  12.8k|  DecoderInput data = {reinterpret_cast<const uint8_t*>(arbitrary_bytes.data()),
   59|  12.8k|                       arbitrary_bytes.size(), 0};
   60|  12.8k|  avifIO io = {.destroy = nullptr,
   61|  12.8k|               .read = AvifIoRead,
   62|  12.8k|               .write = nullptr,
   63|  12.8k|               .sizeHint = arbitrary_bytes.size(),
   64|  12.8k|               .persistent = AVIF_TRUE,
  ------------------
  |  |   88|  12.8k|#define AVIF_TRUE 1
  ------------------
   65|  12.8k|               .data = &data};
   66|       |
   67|  12.8k|  DecoderPtr decoder(avifDecoderCreate());
   68|  12.8k|  ASSERT_NE(decoder.get(), nullptr);
  ------------------
  |  Branch (68:3): [True: 12.8k, False: 0]
  |  Branch (68:3): [True: 0, False: 12.8k]
  |  Branch (68:3): [True: 12.8k, False: 0]
  ------------------
   69|  12.8k|  avifDecoderSetIO(decoder.get(), &io);
   70|       |  // OSS-Fuzz limits the allocated memory to 2560 MB.
   71|  12.8k|  constexpr uint32_t kMaxMem = 2560u * 1024 * 1024;
   72|       |  // Consider at most four planes of 16-bit samples.
   73|  12.8k|  constexpr uint32_t kMaxImageSize =
   74|  12.8k|      kMaxMem / (AVIF_PLANE_COUNT_YUV + 1) / sizeof(uint16_t);
  ------------------
  |  |  112|  12.8k|#define AVIF_PLANE_COUNT_YUV 3
  ------------------
   75|       |  // Reduce the limit further to include pixel buffer copies and other memory
   76|       |  // allocations.
   77|  12.8k|  constexpr uint32_t kImageSizeLimit = kMaxImageSize / 4;
   78|       |  // avifDecoderParse returns AVIF_RESULT_NOT_IMPLEMENTED if kImageSizeLimit is
   79|       |  // bigger than AVIF_DEFAULT_IMAGE_SIZE_LIMIT.
   80|  12.8k|  static_assert(kImageSizeLimit <= AVIF_DEFAULT_IMAGE_SIZE_LIMIT,
   81|  12.8k|                "Too big an image size limit");
   82|  12.8k|  decoder->imageSizeLimit = kImageSizeLimit;
   83|       |  // This can lead to AVIF_RESULT_NO_CONTENT.
   84|  12.8k|  decoder->imageContentToDecode = content_to_decode;
   85|       |
   86|  12.8k|  avifResult result = avifDecoderRead(decoder.get(), reference.get());
   87|       |  // AVIF_RESULT_INTERNAL_ERROR means a broken invariant and should not happen.
   88|  12.8k|  ASSERT_NE(result, AVIF_RESULT_INTERNAL_ERROR);
  ------------------
  |  Branch (88:3): [True: 12.8k, False: 0]
  |  Branch (88:3): [True: 0, False: 12.8k]
  |  Branch (88:3): [True: 12.8k, False: 0]
  ------------------
   89|  12.8k|  if (result != AVIF_RESULT_OK) return;
  ------------------
  |  Branch (89:7): [True: 9.20k, False: 3.63k]
  ------------------
   90|       |
   91|       |  // Avoid timeouts by discarding big images decoded many times.
   92|  3.63k|  if (reference->width * reference->height * data.read_size > 8 * 1024 * 1024) {
  ------------------
  |  Branch (92:7): [True: 721, False: 2.91k]
  ------------------
   93|    721|    return;
   94|    721|  }
   95|       |  // decodeIncrementally() will fail if there are leftover bytes.
   96|  2.91k|  const avifRWData encoded_data = {const_cast<uint8_t*>(data.available_bytes),
   97|  2.91k|                                   data.read_size};
   98|       |  // No clue on whether encoded_data is tiled so use a lower bound of a single
   99|       |  // tile for the whole image.
  100|       |  // Note that an AVIF tile is at most as high as an AV1 frame
  101|       |  // (aomediacodec.github.io/av1-spec says max_frame_height_minus_1 < 65536)
  102|       |  // but libavif successfully decodes AVIF files with dimensions unrelated to
  103|       |  // the underlying AV1 frame (for example a 1x1000000 AVIF for a 1x1 AV1).
  104|       |  // Otherwise we could use the minimum of reference->height and 65536u below.
  105|  2.91k|  const uint32_t max_cell_height = reference->height;
  106|  2.91k|  result = DecodeIncrementally(
  107|  2.91k|      encoded_data, decoder.get(), is_persistent, give_size_hint,
  108|  2.91k|      use_nth_image_api, *reference, max_cell_height,
  109|  2.91k|      /*enable_fine_incremental_check=*/false, /*expect_whole_file_read=*/true,
  110|  2.91k|      /*expect_parse_success_from_partial_file=*/false);
  111|       |  ASSERT_NE(result, AVIF_RESULT_INTERNAL_ERROR);
  ------------------
  |  Branch (111:3): [True: 2.91k, False: 0]
  |  Branch (111:3): [True: 0, False: 2.91k]
  |  Branch (111:3): [True: 2.91k, False: 0]
  ------------------
  112|  2.91k|}
avif_fuzztest_dec_incr.cc:_ZN4avif8testutil12_GLOBAL__N_110AvifIoReadEP6avifIOjmmP10avifROData:
   34|  86.0k|                      size_t size, avifROData* out) {
   35|  86.0k|  DecoderInput* data = reinterpret_cast<DecoderInput*>(io->data);
   36|  86.0k|  if (read_flags != 0 || !data || data->available_size < offset) {
  ------------------
  |  Branch (36:7): [True: 0, False: 86.0k]
  |  Branch (36:26): [True: 0, False: 86.0k]
  |  Branch (36:35): [True: 0, False: 86.0k]
  ------------------
   37|      0|    return AVIF_RESULT_IO_ERROR;
   38|      0|  }
   39|  86.0k|  out->data = data->available_bytes + offset;
   40|  86.0k|  out->size =
   41|  86.0k|      std::min(size, data->available_size - static_cast<size_t>(offset));
   42|  86.0k|  data->read_size =
   43|  86.0k|      std::max(data->read_size, static_cast<size_t>(offset) + out->size);
   44|  86.0k|  return AVIF_RESULT_OK;
   45|  86.0k|}

_ZN4avif8testutil15GetSeedDataDirsEv:
  243|  12.8k|std::vector<std::string> GetSeedDataDirs() {
  244|  12.8k|  const char* var = std::getenv("TEST_DATA_DIRS");
  245|  12.8k|  std::vector<std::string> res;
  246|  12.8k|  if (var == nullptr || *var == 0) return res;
  ------------------
  |  Branch (246:7): [True: 0, False: 12.8k]
  |  Branch (246:25): [True: 0, False: 12.8k]
  ------------------
  247|  12.8k|  const char* var_start = var;
  248|   616k|  while (true) {
  ------------------
  |  Branch (248:10): [True: 616k, Folded]
  ------------------
  249|   616k|    if (*var == 0 || *var == ';') {
  ------------------
  |  Branch (249:9): [True: 12.8k, False: 603k]
  |  Branch (249:22): [True: 0, False: 603k]
  ------------------
  250|  12.8k|      res.push_back(std::string(var_start, var - var_start));
  251|  12.8k|      if (*var == 0) break;
  ------------------
  |  Branch (251:11): [True: 12.8k, False: 0]
  ------------------
  252|      0|      var_start = var + 1;
  253|      0|    }
  254|   603k|    ++var;
  255|   603k|  }
  256|  12.8k|  return res;
  257|  12.8k|}
_ZN4avif8testutil21GetTestImagesContentsEmRKNSt3__16vectorI17avifAppFileFormatNS1_9allocatorIS3_EEEE:
  260|      2|    size_t max_file_size, const std::vector<avifAppFileFormat>& image_formats) {
  261|       |  // Use an environment variable to get the test data directory because
  262|       |  // fuzztest seeds are created before the main() function is called, so the
  263|       |  // test has no chance to parse command line arguments.
  264|      2|  const std::vector<std::string> test_data_dirs = GetSeedDataDirs();
  265|      2|  if (test_data_dirs.empty()) {
  ------------------
  |  Branch (265:7): [True: 0, False: 2]
  ------------------
  266|       |    // Only a warning because this can happen when running the binary with
  267|       |    // --list_fuzz_tests (such as with gtest_discover_tests() in cmake).
  268|      0|    std::cerr << "WARNING: TEST_DATA_DIRS env variable not set, unable to read "
  269|      0|                 "seed files\n";
  270|      0|    return {};
  271|      0|  }
  272|       |
  273|      2|  std::vector<std::string> seeds;
  274|      2|  for (const std::string& test_data_dir : test_data_dirs) {
  ------------------
  |  Branch (274:41): [True: 2, False: 2]
  ------------------
  275|      2|    std::cout << "Reading seeds from " << test_data_dir
  276|      2|              << " (non recursively)\n";
  277|      2|    auto tuple_vector = fuzztest::ReadFilesFromDirectory(test_data_dir);
  278|      2|    seeds.reserve(tuple_vector.size());
  279|    202|    for (auto& [file_content] : tuple_vector) {
  ------------------
  |  Branch (279:31): [True: 202, False: 2]
  ------------------
  280|    202|      if (file_content.size() > max_file_size) continue;
  ------------------
  |  Branch (280:11): [True: 6, False: 196]
  ------------------
  281|    196|      if (!image_formats.empty()) {
  ------------------
  |  Branch (281:11): [True: 196, False: 0]
  ------------------
  282|    196|        const avifAppFileFormat format = avifGuessBufferFileFormat(
  283|    196|            reinterpret_cast<const uint8_t*>(file_content.data()),
  284|    196|            file_content.size());
  285|    196|        if (std::find(image_formats.begin(), image_formats.end(), format) ==
  ------------------
  |  Branch (285:13): [True: 68, False: 128]
  ------------------
  286|    196|            image_formats.end()) {
  287|     68|          continue;
  288|     68|        }
  289|    196|      }
  290|       |
  291|    128|      seeds.push_back(std::move(file_content));
  292|    128|    }
  293|      2|  }
  294|      2|  if (seeds.empty()) {
  ------------------
  |  Branch (294:7): [True: 0, False: 2]
  ------------------
  295|      0|    std::cerr << "ERROR: no files found that match the given file size and "
  296|      0|                 "format criteria\n";
  297|      0|    std::abort();
  298|      0|  }
  299|      2|  std::cout << "Returning " << seeds.size() << " seed images\n";
  300|      2|  return seeds;
  301|      2|}

_ZN4avif8testutil23ArbitraryImageWithSeedsERKNSt3__16vectorI17avifAppFileFormatNS1_9allocatorIS3_EEEE:
  370|      2|    const std::vector<avifAppFileFormat>& image_formats) {
  371|      2|  constexpr uint32_t kMaxSeedFileSize = 1024 * 1024;  // 1MB.
  372|      2|  return fuzztest::Arbitrary<std::string>()
  373|      2|      .WithMaxSize(kMaxSeedFileSize)
  374|      2|      .WithSeeds(GetTestImagesContents(kMaxSeedFileSize, image_formats));
  375|      2|}

_ZN4avif8testutil19DecodeIncrementallyERK10avifRWDataP11avifDecoderbbbRK9avifImagejbbb:
  299|  2.91k|                               bool expect_parse_success_from_partial_file) {
  300|       |  // AVIF cells are at least 64 pixels tall.
  301|  2.91k|  if (cell_height != reference.height) {
  ------------------
  |  Branch (301:7): [True: 0, False: 2.91k]
  ------------------
  302|      0|    AVIF_CHECKERR(cell_height >= 64u, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   43|      0|  do {                        \
  |  |   44|      0|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  303|      0|  }
  304|       |
  305|       |  // Emulate a byte-by-byte stream.
  306|  2.91k|  PartialData data = {
  307|  2.91k|      /*available=*/{encoded_avif.data, 0}, /*fullSize=*/encoded_avif.size,
  308|  2.91k|      /*nonpersistent_bytes=*/nullptr, /*num_nonpersistent_bytes=*/0};
  309|  2.91k|  avifIO io = {
  310|  2.91k|      /*destroy=*/nullptr, PartialRead,
  311|  2.91k|      /*write=*/nullptr,   give_size_hint ? encoded_avif.size : 0,
  ------------------
  |  Branch (311:28): [True: 1.26k, False: 1.64k]
  ------------------
  312|  2.91k|      is_persistent,       &data};
  313|  2.91k|  avifDecoderSetIO(decoder, &io);
  314|       |  // Reset the decoder's IO to nullptr before 'io' goes out of scope and becomes
  315|       |  // invalid.
  316|  2.91k|  auto cleanup_io_fn = [](avifDecoder* decoder) {
  317|  2.91k|    avifDecoderSetIO(decoder, nullptr);
  318|  2.91k|  };
  319|  2.91k|  std::unique_ptr<avifDecoder, decltype(cleanup_io_fn)> cleanup_io(
  320|  2.91k|      decoder, cleanup_io_fn);  // Call automatically at end of scope.
  321|       |
  322|  2.91k|  decoder->allowIncremental = AVIF_TRUE;
  ------------------
  |  |   88|  2.91k|#define AVIF_TRUE 1
  ------------------
  323|  2.91k|  const size_t step = std::max<size_t>(1, data.full_size / 10000);
  324|       |
  325|       |  // Parsing is not incremental.
  326|  2.91k|  avifResult parse_result = avifDecoderParse(decoder);
  327|  1.67M|  while (parse_result == AVIF_RESULT_WAITING_ON_IO) {
  ------------------
  |  Branch (327:10): [True: 1.67M, False: 2.91k]
  ------------------
  328|  1.67M|    if (data.available.size >= data.full_size) {
  ------------------
  |  Branch (328:9): [True: 0, False: 1.67M]
  ------------------
  329|      0|      std::cerr << "avifDecoderParse() returned WAITING_ON_IO instead of OK"
  330|      0|                << std::endl;
  331|      0|      return AVIF_RESULT_TRUNCATED_DATA;
  332|      0|    }
  333|  1.67M|    data.available.size = std::min(data.available.size + step, data.full_size);
  334|  1.67M|    parse_result = avifDecoderParse(decoder);
  335|  1.67M|  }
  336|  2.91k|  if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) &&
  ------------------
  |  Branch (336:7): [True: 2.64k, False: 271]
  ------------------
  337|  2.64k|      data.available.size == data.full_size &&
  ------------------
  |  Branch (337:7): [True: 819, False: 1.82k]
  ------------------
  338|    819|      expect_parse_success_from_partial_file) {
  ------------------
  |  Branch (338:7): [True: 0, False: 819]
  ------------------
  339|       |    // Can happen if the data is in 'idat', or if some metadata is at the end of
  340|       |    // the file. But ideally this should be avoided.
  341|      0|    printf(
  342|      0|        "ERROR: had to provide the whole file for avifDecoderParse() to "
  343|      0|        "succeed\n");
  344|      0|    AVIF_CHECKERR(false, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   43|      0|  do {                        \
  |  |   44|      0|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, Folded]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  345|      0|  }
  346|  2.91k|  AVIF_CHECKRES(parse_result);
  ------------------
  |  |   52|  2.91k|  do {                                \
  |  |   53|  2.91k|    const avifResult result__ = (A);  \
  |  |   54|  2.91k|    if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (54:9): [True: 250, False: 2.66k]
  |  |  ------------------
  |  |   55|    250|      avifBreakOnError();             \
  |  |   56|    250|      return result__;                \
  |  |   57|    250|    }                                 \
  |  |   58|  2.91k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (58:12): [Folded, False: 2.66k]
  |  |  ------------------
  ------------------
  347|       |
  348|       |  // Decoding is incremental.
  349|  2.66k|  uint32_t previously_decoded_row_count = 0;
  350|  2.66k|  avifResult next_image_result = use_nth_image_api
  ------------------
  |  Branch (350:34): [True: 1.38k, False: 1.28k]
  ------------------
  351|  2.66k|                                     ? avifDecoderNthImage(decoder, 0)
  352|  2.66k|                                     : avifDecoderNextImage(decoder);
  353|   542k|  while (next_image_result == AVIF_RESULT_WAITING_ON_IO) {
  ------------------
  |  Branch (353:10): [True: 539k, False: 2.66k]
  ------------------
  354|   539k|    if (data.available.size >= data.full_size) {
  ------------------
  |  Branch (354:9): [True: 0, False: 539k]
  ------------------
  355|      0|      std::cerr << (use_nth_image_api ? "avifDecoderNthImage(0)"
  ------------------
  |  Branch (355:21): [True: 0, False: 0]
  ------------------
  356|      0|                                      : "avifDecoderNextImage()")
  357|      0|                << " returned WAITING_ON_IO instead of OK";
  358|      0|      AVIF_CHECKERR(false, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   43|      0|  do {                        \
  |  |   44|      0|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, Folded]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  359|      0|    }
  360|   539k|    const uint32_t decoded_row_count = avifDecoderDecodedRowCount(decoder);
  361|   539k|    if (decoded_row_count < previously_decoded_row_count) {
  ------------------
  |  Branch (361:9): [True: 0, False: 539k]
  ------------------
  362|      0|      printf("ERROR: decoded row count decreased from %d to %d\n",
  363|      0|             previously_decoded_row_count, decoded_row_count);
  364|      0|      AVIF_CHECKERR(false, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   43|      0|  do {                        \
  |  |   44|      0|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, Folded]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  365|      0|    }
  366|   539k|    if (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) {
  ------------------
  |  Branch (366:9): [True: 522k, False: 16.7k]
  ------------------
  367|   522k|      const uint32_t min_decoded_row_count = GetMinDecodedRowCount(
  368|   522k|          reference.height, cell_height, reference.alphaPlane != nullptr,
  369|   522k|          reference.gainMap != nullptr, data.available.size, data.full_size,
  370|   522k|          enable_fine_incremental_check);
  371|   522k|      if (decoded_row_count < min_decoded_row_count) {
  ------------------
  |  Branch (371:11): [True: 0, False: 522k]
  ------------------
  372|      0|        printf(
  373|      0|            "ERROR: expected to have decoded at least %d rows with %zu "
  374|      0|            "available bytes, but only %d were decoded\n",
  375|      0|            min_decoded_row_count, data.available.size, decoded_row_count);
  376|      0|        AVIF_CHECKERR(false, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   43|      0|  do {                        \
  |  |   44|      0|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, Folded]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  377|      0|      }
  378|   522k|    } else if (decoded_row_count != 0) {
  ------------------
  |  Branch (378:16): [True: 0, False: 16.7k]
  ------------------
  379|       |      // avifDecoderDecodedRowCount() is only for decoder->image->yuvPlanes[0].
  380|      0|      printf(
  381|      0|          "ERROR: decoded row count shall be 0 unless "
  382|      0|          "decoder->imageContentToDecode&AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA\n");
  383|      0|      AVIF_CHECKERR(false, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   43|      0|  do {                        \
  |  |   44|      0|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, Folded]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  384|      0|    }
  385|   539k|    ComparePartialYuva(reference, *decoder->image, decoded_row_count);
  386|       |
  387|   539k|    previously_decoded_row_count = decoded_row_count;
  388|   539k|    data.available.size = std::min(data.available.size + step, data.full_size);
  389|   539k|    next_image_result = use_nth_image_api ? avifDecoderNthImage(decoder, 0)
  ------------------
  |  Branch (389:25): [True: 273k, False: 266k]
  ------------------
  390|   539k|                                          : avifDecoderNextImage(decoder);
  391|   539k|  }
  392|  2.66k|  AVIF_CHECKRES(next_image_result);
  ------------------
  |  |   52|  2.66k|  do {                                \
  |  |   53|  2.66k|    const avifResult result__ = (A);  \
  |  |   54|  2.66k|    if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (54:9): [True: 13, False: 2.64k]
  |  |  ------------------
  |  |   55|     13|      avifBreakOnError();             \
  |  |   56|     13|      return result__;                \
  |  |   57|     13|    }                                 \
  |  |   58|  2.66k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (58:12): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
  393|  2.64k|  if (expect_whole_file_read) {
  ------------------
  |  Branch (393:7): [True: 2.64k, False: 0]
  ------------------
  394|  2.64k|    AVIF_CHECKERR(data.available.size == data.full_size,
  ------------------
  |  |   43|  2.64k|  do {                        \
  |  |   44|  2.64k|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, False: 2.64k]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|  2.64k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 2.64k]
  |  |  ------------------
  ------------------
  395|  2.64k|                  AVIF_RESULT_INVALID_ARGUMENT);
  396|  2.64k|  }
  397|  2.64k|  const uint32_t decoded_row_count = avifDecoderDecodedRowCount(decoder);
  398|  2.64k|  if (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) {
  ------------------
  |  Branch (398:7): [True: 2.39k, False: 256]
  ------------------
  399|  2.39k|    AVIF_CHECKERR(decoded_row_count == decoder->image->height,
  ------------------
  |  |   43|  2.39k|  do {                        \
  |  |   44|  2.39k|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, False: 2.39k]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|  2.39k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 2.39k]
  |  |  ------------------
  ------------------
  400|  2.39k|                  AVIF_RESULT_INVALID_ARGUMENT);
  401|  2.39k|    ComparePartialYuva(reference, *decoder->image, reference.height);
  402|  2.39k|  } else if (decoded_row_count != 0) {
  ------------------
  |  Branch (402:14): [True: 244, False: 12]
  ------------------
  403|       |    // avifDecoderDecodedRowCount() is only for decoder->image->yuvPlanes[0].
  404|    244|    printf(
  405|    244|        "ERROR: decoded row count shall be 0 unless "
  406|    244|        "decoder->imageContentToDecode&AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA\n");
  407|    244|    AVIF_CHECKERR(false, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   43|    244|  do {                        \
  |  |   44|    244|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 244, Folded]
  |  |  ------------------
  |  |   45|    244|      avifBreakOnError();     \
  |  |   46|    244|      return ERR;             \
  |  |   47|    244|    }                         \
  |  |   48|    244|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  408|    244|  }
  409|  2.40k|  return AVIF_RESULT_OK;
  410|  2.64k|}
avifincrtest_helpers.cc:_ZN4avif8testutil12_GLOBAL__N_111PartialReadEP6avifIOjmmP10avifROData:
  144|  8.48M|                       uint64_t offset64, size_t size, avifROData* out) {
  145|  8.48M|  PartialData* data = reinterpret_cast<PartialData*>(io->data);
  146|  8.48M|  if ((read_flags != 0) || !data || (data->full_size < offset64)) {
  ------------------
  |  Branch (146:7): [True: 0, False: 8.48M]
  |  Branch (146:28): [True: 0, False: 8.48M]
  |  Branch (146:37): [True: 0, False: 8.48M]
  ------------------
  147|      0|    return AVIF_RESULT_IO_ERROR;
  148|      0|  }
  149|  8.48M|  const size_t offset = static_cast<size_t>(offset64);
  150|       |  // Use |offset| instead of |offset64| from this point on.
  151|  8.48M|  if (size > (data->full_size - offset)) {
  ------------------
  |  Branch (151:7): [True: 8.25k, False: 8.47M]
  ------------------
  152|  8.25k|    size = data->full_size - offset;
  153|  8.25k|  }
  154|  8.48M|  if (data->available.size < (offset + size)) {
  ------------------
  |  Branch (154:7): [True: 2.25M, False: 6.23M]
  ------------------
  155|  2.25M|    return AVIF_RESULT_WAITING_ON_IO;
  156|  2.25M|  }
  157|  6.23M|  if (io->persistent) {
  ------------------
  |  Branch (157:7): [True: 2.91M, False: 3.32M]
  ------------------
  158|  2.91M|    out->data = data->available.data + offset;
  159|  3.32M|  } else {
  160|       |    // Dedicated buffer containing just the available bytes and nothing more.
  161|  3.32M|    std::unique_ptr<uint8_t[]> bytes(new uint8_t[size]);
  162|  3.32M|    std::copy(data->available.data + offset,
  163|  3.32M|              data->available.data + offset + size, bytes.get());
  164|  3.32M|    out->data = bytes.get();
  165|       |    // Flip the previously returned bytes to make sure the values changed.
  166|   323M|    for (size_t i = 0; i < data->num_nonpersistent_bytes; ++i) {
  ------------------
  |  Branch (166:24): [True: 320M, False: 3.32M]
  ------------------
  167|   320M|      data->nonpersistent_bytes[i] = ~data->nonpersistent_bytes[i];
  168|   320M|    }
  169|       |    // Free the memory to invalidate the old pointer. Only do that after
  170|       |    // allocating the new bytes to make sure to have a different pointer.
  171|  3.32M|    data->nonpersistent_bytes = std::move(bytes);
  172|  3.32M|    data->num_nonpersistent_bytes = size;
  173|  3.32M|  }
  174|  6.23M|  out->size = size;
  175|  6.23M|  return AVIF_RESULT_OK;
  176|  8.48M|}
avifincrtest_helpers.cc:_ZN4avif8testutil12_GLOBAL__N_121GetMinDecodedRowCountEjjbbmmb:
   83|   522k|                               bool enable_fine_incremental_check) {
   84|       |  // The whole image should be available when the full input is.
   85|   522k|  if (available_byte_count >= byte_count) {
  ------------------
  |  Branch (85:7): [True: 0, False: 522k]
  ------------------
   86|      0|    return height;
   87|      0|  }
   88|       |
   89|       |  // The tests below can be hard to tune for any kind of input, especially
   90|       |  // fuzzed grids, where tile ordering is unknown. Early exit in that case.
   91|   522k|  if (!enable_fine_incremental_check) return 0;
  ------------------
  |  Branch (91:7): [True: 522k, False: 0]
  ------------------
   92|       |
   93|       |  // There is no valid AV1 payload smaller than 10 bytes, so all but one cell
   94|       |  // should be decoded if at most 10 bytes are missing.
   95|      0|  if ((available_byte_count + 10) >= byte_count) {
  ------------------
  |  Branch (95:7): [True: 0, False: 0]
  ------------------
   96|      0|    return height - cell_height;
   97|      0|  }
   98|       |  // Subtract the header because decoding it does not output any pixel.
   99|       |  // Most AVIF headers are below 500 bytes.
  100|      0|  if (available_byte_count <= 500) {
  ------------------
  |  Branch (100:7): [True: 0, False: 0]
  ------------------
  101|      0|    return 0;
  102|      0|  }
  103|      0|  available_byte_count -= 500;
  104|      0|  byte_count -= 500;
  105|       |  // Extra planes (alpha, gain map), if any, are assumed to be located before
  106|       |  // the color planes. It's assumed that each extra planes is at most
  107|       |  // total_size / (1 + num_extra_planes).
  108|      0|  const int num_extra_planes = (has_alpha ? 1 : 0) + (has_gain_map ? 1 : 0);
  ------------------
  |  Branch (108:33): [True: 0, False: 0]
  |  Branch (108:55): [True: 0, False: 0]
  ------------------
  109|      0|  const size_t max_size_of_extra_planes = static_cast<size_t>(
  110|      0|      (byte_count / (num_extra_planes + 1)) * num_extra_planes);
  111|      0|  if (available_byte_count <= max_size_of_extra_planes) {
  ------------------
  |  Branch (111:7): [True: 0, False: 0]
  ------------------
  112|      0|    return 0;
  113|      0|  }
  114|      0|  available_byte_count -= max_size_of_extra_planes;
  115|      0|  byte_count -= max_size_of_extra_planes;
  116|       |  // Linearly map the input availability ratio to the decoded row ratio.
  117|      0|  const uint32_t min_decoded_cell_row_count = static_cast<uint32_t>(
  118|      0|      (height / cell_height) * available_byte_count / byte_count);
  119|      0|  const uint32_t min_decoded_px_row_count =
  120|      0|      min_decoded_cell_row_count * cell_height;
  121|       |  // One cell is the incremental decoding granularity.
  122|       |  // It is unlikely that bytes are evenly distributed among cells. Offset two of
  123|       |  // them.
  124|      0|  if (min_decoded_px_row_count <= (2 * cell_height)) {
  ------------------
  |  Branch (124:7): [True: 0, False: 0]
  ------------------
  125|      0|    return 0;
  126|      0|  }
  127|      0|  return min_decoded_px_row_count - 2 * cell_height;
  128|      0|}
avifincrtest_helpers.cc:_ZN4avif8testutil12_GLOBAL__N_118ComparePartialYuvaERK9avifImageS4_j:
   27|   542k|                        uint32_t row_count) {
   28|   542k|  if (row_count == 0) {
  ------------------
  |  Branch (28:7): [True: 538k, False: 3.40k]
  ------------------
   29|   538k|    return;
   30|   538k|  }
   31|   542k|  ASSERT_EQ(image1.width, image2.width);
  ------------------
  |  Branch (31:3): [True: 3.40k, False: 0]
  |  Branch (31:3): [True: 0, False: 3.40k]
  |  Branch (31:3): [True: 3.40k, False: 0]
  ------------------
   32|  3.40k|  ASSERT_GE(image1.height, row_count);
  ------------------
  |  Branch (32:3): [True: 3.40k, False: 0]
  |  Branch (32:3): [True: 0, False: 3.40k]
  |  Branch (32:3): [True: 3.40k, False: 0]
  ------------------
   33|  3.40k|  ASSERT_GE(image2.height, row_count);
  ------------------
  |  Branch (33:3): [True: 3.40k, False: 0]
  |  Branch (33:3): [True: 0, False: 3.40k]
  |  Branch (33:3): [True: 3.40k, False: 0]
  ------------------
   34|  3.40k|  ASSERT_EQ(image1.depth, image2.depth);
  ------------------
  |  Branch (34:3): [True: 3.40k, False: 0]
  |  Branch (34:3): [True: 0, False: 3.40k]
  |  Branch (34:3): [True: 3.40k, False: 0]
  ------------------
   35|  3.40k|  ASSERT_EQ(image1.yuvFormat, image2.yuvFormat);
  ------------------
  |  Branch (35:3): [True: 3.40k, False: 0]
  |  Branch (35:3): [True: 0, False: 3.40k]
  |  Branch (35:3): [True: 3.40k, False: 0]
  ------------------
   36|  3.40k|  ASSERT_EQ(image1.yuvRange, image2.yuvRange);
  ------------------
  |  Branch (36:3): [True: 3.40k, False: 0]
  |  Branch (36:3): [True: 0, False: 3.40k]
  |  Branch (36:3): [True: 3.40k, False: 0]
  ------------------
   37|       |
   38|  3.40k|  avifPixelFormatInfo info;
   39|  3.40k|  avifGetPixelFormatInfo(image1.yuvFormat, &info);
   40|  3.40k|  const uint32_t uv_height =
   41|  3.40k|      info.monochrome ? 0
  ------------------
  |  Branch (41:7): [True: 597, False: 2.80k]
  ------------------
   42|  3.40k|                      : ((row_count + info.chromaShiftY) >> info.chromaShiftY);
   43|  3.40k|  const size_t pixel_byte_count =
   44|  3.40k|      (image1.depth > 8) ? sizeof(uint16_t) : sizeof(uint8_t);
  ------------------
  |  Branch (44:7): [True: 1.51k, False: 1.88k]
  ------------------
   45|       |
   46|  3.40k|  if (image1.alphaPlane) {
  ------------------
  |  Branch (46:7): [True: 232, False: 3.16k]
  ------------------
   47|    232|    ASSERT_NE(image2.alphaPlane, nullptr);
  ------------------
  |  Branch (47:5): [True: 232, False: 0]
  |  Branch (47:5): [True: 0, False: 232]
  |  Branch (47:5): [True: 232, False: 0]
  ------------------
   48|    232|    ASSERT_EQ(image1.alphaPremultiplied, image2.alphaPremultiplied);
  ------------------
  |  Branch (48:5): [True: 232, False: 0]
  |  Branch (48:5): [True: 0, False: 232]
  |  Branch (48:5): [True: 232, False: 0]
  ------------------
   49|    232|  }
   50|       |
   51|  3.40k|  const int last_plane = image1.alphaPlane ? AVIF_CHAN_A : AVIF_CHAN_V;
  ------------------
  |  Branch (51:26): [True: 232, False: 3.16k]
  ------------------
   52|  13.8k|  for (int plane = AVIF_CHAN_Y; plane <= last_plane; ++plane) {
  ------------------
  |  Branch (52:33): [True: 10.4k, False: 3.40k]
  ------------------
   53|  10.4k|    const size_t width_byte_count =
   54|  10.4k|        avifImagePlaneWidth(&image1, plane) * pixel_byte_count;
   55|  10.4k|    const uint32_t height =
   56|  10.4k|        (plane == AVIF_CHAN_Y || plane == AVIF_CHAN_A) ? row_count : uv_height;
  ------------------
  |  Branch (56:10): [True: 3.40k, False: 7.03k]
  |  Branch (56:34): [True: 232, False: 6.80k]
  ------------------
   57|  10.4k|    const uint8_t* row1 = avifImagePlane(&image1, plane);
   58|  10.4k|    const uint8_t* row2 = avifImagePlane(&image2, plane);
   59|  10.4k|    const uint32_t row1_bytes = avifImagePlaneRowBytes(&image1, plane);
   60|  10.4k|    const uint32_t row2_bytes = avifImagePlaneRowBytes(&image2, plane);
   61|  1.19M|    for (uint32_t y = 0; y < height; ++y) {
  ------------------
  |  Branch (61:26): [True: 1.18M, False: 10.4k]
  ------------------
   62|  1.18M|      ASSERT_EQ(std::memcmp(row1, row2, width_byte_count), 0);
  ------------------
  |  Branch (62:7): [True: 1.18M, False: 0]
  |  Branch (62:7): [True: 0, False: 1.18M]
  |  Branch (62:7): [True: 1.18M, False: 0]
  ------------------
   63|  1.18M|      row1 += row1_bytes;
   64|  1.18M|      row2 += row2_bytes;
   65|  1.18M|    }
   66|  10.4k|  }
   67|       |
   68|  3.40k|  if (image1.gainMap != nullptr && image1.gainMap->image != nullptr &&
  ------------------
  |  Branch (68:7): [True: 20, False: 3.38k]
  |  Branch (68:36): [True: 9, False: 11]
  ------------------
   69|      9|      image2.gainMap != nullptr && image2.gainMap->image != nullptr) {
  ------------------
  |  Branch (69:7): [True: 9, False: 0]
  |  Branch (69:36): [True: 9, False: 0]
  ------------------
   70|      9|    const uint32_t gain_map_row_count = (uint32_t)roundf(
   71|      9|        (float)row_count / image1.height * image1.gainMap->image->height);
   72|      9|    ComparePartialYuva(*image1.gainMap->image, *image2.gainMap->image,
   73|      9|                       gain_map_row_count);
   74|      9|  }
   75|  3.40k|}
avifincrtest_helpers.cc:_ZZN4avif8testutil19DecodeIncrementallyERK10avifRWDataP11avifDecoderbbbRK9avifImagejbbbENK3$_0clES5_:
  316|  2.91k|  auto cleanup_io_fn = [](avifDecoder* decoder) {
  317|  2.91k|    avifDecoderSetIO(decoder, nullptr);
  318|  2.91k|  };

