avifGuessBufferFileFormat:
  285|    208|{
  286|    208|    if (size == 0) {
  ------------------
  |  Branch (286:9): [True: 0, False: 208]
  ------------------
  287|      0|        return AVIF_APP_FILE_FORMAT_UNKNOWN;
  288|      0|    }
  289|       |
  290|    208|    avifROData header;
  291|    208|    header.data = data;
  292|    208|    header.size = size;
  293|       |
  294|    208|    if (avifPeekCompatibleFileType(&header)) {
  ------------------
  |  Branch (294:9): [True: 138, False: 70]
  ------------------
  295|    138|        return AVIF_APP_FILE_FORMAT_AVIF;
  296|    138|    }
  297|       |
  298|     70|    static const uint8_t signatureJPEG[2] = { 0xFF, 0xD8 };
  299|     70|    static const uint8_t signaturePNG[8] = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A };
  300|     70|    static const uint8_t signatureY4M[9] = { 0x59, 0x55, 0x56, 0x34, 0x4D, 0x50, 0x45, 0x47, 0x32 }; // "YUV4MPEG2"
  301|     70|    struct avifHeaderSignature
  302|     70|    {
  303|     70|        avifAppFileFormat format;
  304|     70|        const uint8_t * magic;
  305|     70|        size_t magicSize;
  306|     70|    } signatures[] = { { AVIF_APP_FILE_FORMAT_JPEG, signatureJPEG, sizeof(signatureJPEG) },
  307|     70|                       { AVIF_APP_FILE_FORMAT_PNG, signaturePNG, sizeof(signaturePNG) },
  308|     70|                       { AVIF_APP_FILE_FORMAT_Y4M, signatureY4M, sizeof(signatureY4M) } };
  309|     70|    const size_t signaturesCount = sizeof(signatures) / sizeof(signatures[0]);
  310|       |
  311|    132|    for (size_t signatureIndex = 0; signatureIndex < signaturesCount; ++signatureIndex) {
  ------------------
  |  Branch (311:37): [True: 128, False: 4]
  ------------------
  312|    128|        const struct avifHeaderSignature * const signature = &signatures[signatureIndex];
  313|    128|        if (header.size < signature->magicSize) {
  ------------------
  |  Branch (313:13): [True: 0, False: 128]
  ------------------
  314|      0|            continue;
  315|      0|        }
  316|    128|        if (!memcmp(header.data, signature->magic, signature->magicSize)) {
  ------------------
  |  Branch (316:13): [True: 66, False: 62]
  ------------------
  317|     66|            return signature->format;
  318|     66|        }
  319|    128|    }
  320|       |
  321|      4|    return AVIF_APP_FILE_FORMAT_UNKNOWN;
  322|     70|}

_ZN4absl12lts_2026052613base_internal16SchedulingHelperC2ENS1_14SchedulingModeE:
  118|     50|  explicit SchedulingHelper(base_internal::SchedulingMode mode) : mode_(mode) {
  119|     50|    if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
  ------------------
  |  Branch (119:9): [True: 0, False: 50]
  ------------------
  120|      0|      guard_result_ = base_internal::SchedulingGuard::DisableRescheduling();
  121|      0|    }
  122|     50|  }
_ZN4absl12lts_2026052613base_internal16SchedulingHelperD2Ev:
  124|     50|  ~SchedulingHelper() {
  125|     50|    if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
  ------------------
  |  Branch (125:9): [True: 0, False: 50]
  ------------------
  126|      0|      base_internal::SchedulingGuard::EnableRescheduling(guard_result_);
  127|      0|    }
  128|     50|  }
_ZN4absl12lts_2026052613base_internal11ControlWordEPNS0_9once_flagE:
  195|     76|    once_flag* absl_nonnull flag) {
  196|     76|  return &flag->control_;
  197|     76|}
_ZN4absl12lts_202605269call_onceIMNS0_14flags_internal8FlagImplEFvvEJPS3_EEEvRNS0_9once_flagEOT_DpOT0_:
  215|     74|    call_once(absl::once_flag& flag, Callable&& fn, Args&&... args) {
  216|     74|  std::atomic<uint32_t>* once = base_internal::ControlWord(&flag);
  217|     74|  uint32_t s = once->load(std::memory_order_acquire);
  218|     74|  if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) {
  ------------------
  |  |  190|     74|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 48, False: 26]
  |  |  |  Branch (190:49): [Folded, False: 74]
  |  |  |  Branch (190:58): [True: 48, False: 26]
  |  |  ------------------
  ------------------
  219|     48|    base_internal::CallOnceImpl(
  220|     48|        once, base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL,
  221|     48|        std::forward<Callable>(fn), std::forward<Args>(args)...);
  222|     48|  }
  223|     74|}
_ZN4absl12lts_2026052613base_internal12CallOnceImplIMNS0_14flags_internal8FlagImplEFvvEJPS4_EEEvPNSt3__16atomicIjEENS1_14SchedulingModeEOT_DpOT0_:
  155|     48|                 Args&&... args) {
  156|       |#ifndef NDEBUG
  157|       |  {
  158|       |    uint32_t old_control = control->load(std::memory_order_relaxed);
  159|       |    if (old_control != kOnceInit &&
  160|       |        old_control != kOnceRunning &&
  161|       |        old_control != kOnceWaiter &&
  162|       |        old_control != kOnceDone) {
  163|       |      // Memory corruption may cause this error.
  164|       |      ABSL_RAW_LOG(FATAL, "Unexpected value for control word: 0x%lx",
  165|       |                   static_cast<unsigned long>(old_control));  // NOLINT
  166|       |    }
  167|       |  }
  168|       |#endif  // NDEBUG
  169|     48|  static const base_internal::SpinLockWaitTransition trans[] = {
  170|     48|      {kOnceInit, kOnceRunning, true},
  171|     48|      {kOnceRunning, kOnceWaiter, false},
  172|     48|      {kOnceDone, kOnceDone, true}};
  173|       |
  174|       |  // Must do this before potentially modifying control word's state.
  175|     48|  base_internal::SchedulingHelper maybe_disable_scheduling(scheduling_mode);
  176|       |  // Short circuit the simplest case to avoid procedure call overhead.
  177|       |  // The base_internal::SpinLockWait() call returns either kOnceInit or
  178|       |  // kOnceDone. If it returns kOnceDone, it must have loaded the control word
  179|       |  // with std::memory_order_acquire and seen a value of kOnceDone.
  180|     48|  uint32_t old_control = kOnceInit;
  181|     48|  if (control->compare_exchange_strong(old_control, kOnceRunning,
  ------------------
  |  Branch (181:7): [True: 48, False: 0]
  ------------------
  182|     48|                                       std::memory_order_relaxed) ||
  183|      0|      base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans,
  ------------------
  |  |   46|      0|  (sizeof(::absl::macros_internal::ArraySizeHelper(array)))
  ------------------
  |  Branch (183:7): [True: 0, False: 0]
  ------------------
  184|     48|                                  scheduling_mode) == kOnceInit) {
  185|     48|    std::invoke(std::forward<Callable>(fn), std::forward<Args>(args)...);
  186|     48|    old_control =
  187|     48|        control->exchange(base_internal::kOnceDone, std::memory_order_release);
  188|     48|    if (old_control == base_internal::kOnceWaiter) {
  ------------------
  |  Branch (188:9): [True: 0, False: 48]
  ------------------
  189|      0|      base_internal::SpinLockWake(control, true);
  190|      0|    }
  191|     48|  }  // else *control is already kOnceDone
  192|     48|}
_ZN4absl12lts_202605269call_onceIRFvvEJEEEvRNS0_9once_flagEOT_DpOT0_:
  215|      2|    call_once(absl::once_flag& flag, Callable&& fn, Args&&... args) {
  216|      2|  std::atomic<uint32_t>* once = base_internal::ControlWord(&flag);
  217|      2|  uint32_t s = once->load(std::memory_order_acquire);
  218|      2|  if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  219|      2|    base_internal::CallOnceImpl(
  220|      2|        once, base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL,
  221|      2|        std::forward<Callable>(fn), std::forward<Args>(args)...);
  222|      2|  }
  223|      2|}
_ZN4absl12lts_2026052613base_internal12CallOnceImplIRFvvEJEEEvPNSt3__16atomicIjEENS1_14SchedulingModeEOT_DpOT0_:
  155|      2|                 Args&&... args) {
  156|       |#ifndef NDEBUG
  157|       |  {
  158|       |    uint32_t old_control = control->load(std::memory_order_relaxed);
  159|       |    if (old_control != kOnceInit &&
  160|       |        old_control != kOnceRunning &&
  161|       |        old_control != kOnceWaiter &&
  162|       |        old_control != kOnceDone) {
  163|       |      // Memory corruption may cause this error.
  164|       |      ABSL_RAW_LOG(FATAL, "Unexpected value for control word: 0x%lx",
  165|       |                   static_cast<unsigned long>(old_control));  // NOLINT
  166|       |    }
  167|       |  }
  168|       |#endif  // NDEBUG
  169|      2|  static const base_internal::SpinLockWaitTransition trans[] = {
  170|      2|      {kOnceInit, kOnceRunning, true},
  171|      2|      {kOnceRunning, kOnceWaiter, false},
  172|      2|      {kOnceDone, kOnceDone, true}};
  173|       |
  174|       |  // Must do this before potentially modifying control word's state.
  175|      2|  base_internal::SchedulingHelper maybe_disable_scheduling(scheduling_mode);
  176|       |  // Short circuit the simplest case to avoid procedure call overhead.
  177|       |  // The base_internal::SpinLockWait() call returns either kOnceInit or
  178|       |  // kOnceDone. If it returns kOnceDone, it must have loaded the control word
  179|       |  // with std::memory_order_acquire and seen a value of kOnceDone.
  180|      2|  uint32_t old_control = kOnceInit;
  181|      2|  if (control->compare_exchange_strong(old_control, kOnceRunning,
  ------------------
  |  Branch (181:7): [True: 2, False: 0]
  ------------------
  182|      2|                                       std::memory_order_relaxed) ||
  183|      0|      base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans,
  ------------------
  |  |   46|      0|  (sizeof(::absl::macros_internal::ArraySizeHelper(array)))
  ------------------
  |  Branch (183:7): [True: 0, False: 0]
  ------------------
  184|      2|                                  scheduling_mode) == kOnceInit) {
  185|      2|    std::invoke(std::forward<Callable>(fn), std::forward<Args>(args)...);
  186|      2|    old_control =
  187|      2|        control->exchange(base_internal::kOnceDone, std::memory_order_release);
  188|      2|    if (old_control == base_internal::kOnceWaiter) {
  ------------------
  |  Branch (188:9): [True: 0, False: 2]
  ------------------
  189|      0|      base_internal::SpinLockWake(control, true);
  190|      0|    }
  191|      2|  }  // else *control is already kOnceDone
  192|      2|}

_ZN4absl12lts_202605268bit_castImlTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS5_EE5valuesr3std21is_trivially_copyableIS4_EE5valueEiE4typeELi0EEES4_RKS5_:
  190|  53.4k|inline constexpr Dest bit_cast(const Source& source) {
  191|  53.4k|  return __builtin_bit_cast(Dest, source);
  192|  53.4k|}
_ZN4absl12lts_202605268bit_castIlmTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS5_EE5valuesr3std21is_trivially_copyableIS4_EE5valueEiE4typeELi0EEES4_RKS5_:
  190|  26.7k|inline constexpr Dest bit_cast(const Source& source) {
  191|  26.7k|  return __builtin_bit_cast(Dest, source);
  192|  26.7k|}
_ZN4absl12lts_202605268bit_castIdmTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS5_EE5valuesr3std21is_trivially_copyableIS4_EE5valueEiE4typeELi0EEES4_RKS5_:
  190|  17.7k|inline constexpr Dest bit_cast(const Source& source) {
  191|  17.7k|  return __builtin_bit_cast(Dest, source);
  192|  17.7k|}
_ZN4absl12lts_202605268bit_castINS0_14flags_internal19FlagValueAndInitBitIN8fuzztest8internal14TimeBudgetTypeEEElTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableISB_EE5valuesr3std21is_trivially_copyableISA_EE5valueEiE4typeELi0EEESA_RKSB_:
  190|      2|inline constexpr Dest bit_cast(const Source& source) {
  191|      2|  return __builtin_bit_cast(Dest, source);
  192|      2|}
_ZN4absl12lts_202605268bit_castIPvNS0_14FastTypeIdTypeETnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS7_EE5valuesr3std21is_trivially_copyableIS6_EE5valueEiE4typeELi0EEES6_RKS7_:
  190|      4|inline constexpr Dest bit_cast(const Source& source) {
  191|      4|  return __builtin_bit_cast(Dest, source);
  192|      4|}
_ZN4absl12lts_202605268bit_castINS0_14flags_internal19FlagValueAndInitBitIbEElTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS8_EE5valuesr3std21is_trivially_copyableIS7_EE5valueEiE4typeELi0EEES7_RKS8_:
  190|     12|inline constexpr Dest bit_cast(const Source& source) {
  191|     12|  return __builtin_bit_cast(Dest, source);
  192|     12|}
_ZN4absl12lts_202605268bit_castINS0_14FastTypeIdTypeEPvTnNSt3__19enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS7_EE5valuesr3std21is_trivially_copyableIS6_EE5valueEiE4typeELi0EEES6_RKS7_:
  190|      4|inline constexpr Dest bit_cast(const Source& source) {
  191|      4|  return __builtin_bit_cast(Dest, source);
  192|      4|}
_ZN4absl12lts_202605268bit_castIlNSt3__15arrayIcLm8EEETnNS2_9enable_ifIXaaaaeqstT_stT0_sr3std21is_trivially_copyableIS7_EE5valuesr3std21is_trivially_copyableIS6_EE5valueEiE4typeELi0EEES6_RKS7_:
  190|     16|inline constexpr Dest bit_cast(const Source& source) {
  191|     16|  return __builtin_bit_cast(Dest, source);
  192|     16|}

_ZN4absl12lts_20260526eqENS0_14FastTypeIdTypeES1_:
   45|      4|  friend constexpr bool operator==(FastTypeIdType a, FastTypeIdType b) {
   46|      4|    return a.ptr_ == b.ptr_;
   47|      4|  }
_ZN4absl12lts_2026052614FastTypeIdTypeC2EPKv:
   57|      8|  explicit constexpr FastTypeIdType(const void* ptr) : ptr_(ptr) {}
_ZN4absl12lts_2026052610FastTypeIdIbEENS0_14FastTypeIdTypeEv:
   66|      4|constexpr FastTypeIdType FastTypeId() {
   67|      4|  return FastTypeIdType(&base_internal::FastTypeTag<Type>::kDummyVar);
   68|      4|}
_ZN4absl12lts_2026052610FastTypeIdINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEENS0_14FastTypeIdTypeEv:
   66|      2|constexpr FastTypeIdType FastTypeId() {
   67|      2|  return FastTypeIdType(&base_internal::FastTypeTag<Type>::kDummyVar);
   68|      2|}
_ZN4absl12lts_2026052610FastTypeIdImEENS0_14FastTypeIdTypeEv:
   66|      2|constexpr FastTypeIdType FastTypeId() {
   67|      2|  return FastTypeIdType(&base_internal::FastTypeTag<Type>::kDummyVar);
   68|      2|}

_ZN4absl12lts_202605269gbswap_32Ej:
   48|     20|constexpr uint32_t gbswap_32(uint32_t x) {
   49|     20|#if ABSL_HAVE_BUILTIN(__builtin_bswap32) || defined(__GNUC__)
   50|     20|  return __builtin_bswap32(x);
   51|       |#else
   52|       |  return (((x & uint32_t{0xFF}) << 24) |
   53|       |          ((x & uint32_t{0xFF00}) << 8) |
   54|       |          ((x & uint32_t{0xFF0000}) >> 8) |
   55|       |          ((x & uint32_t{0xFF000000}) >> 24));
   56|       |#endif
   57|     20|}
_ZN4absl12lts_202605269gbswap_16Et:
   59|      2|constexpr uint16_t gbswap_16(uint16_t x) {
   60|      2|#if ABSL_HAVE_BUILTIN(__builtin_bswap16) || defined(__GNUC__)
   61|      2|  return __builtin_bswap16(x);
   62|       |#else
   63|       |  return (((x & uint16_t{0xFF}) << 8) |
   64|       |          ((x & uint16_t{0xFF00}) >> 8));
   65|       |#endif
   66|      2|}
_ZN4absl12lts_2026052613little_endian10FromHost64Em:
  109|     10|inline uint64_t FromHost64(uint64_t x) { return x; }
_ZN4absl12lts_2026052613little_endian8ToHost64Em:
  110|     20|inline uint64_t ToHost64(uint64_t x) { return x; }
_ZN4absl12lts_2026052613little_endian6ToHostEm:
  136|     16|inline uint64_t ToHost(uint64_t x) { return ToHost64(x); }
_ZN4absl12lts_2026052613little_endian6Load64EPKv:
  176|      4|inline uint64_t Load64(const void* absl_nonnull p) {
  177|      4|  return ToHost64(ABSL_INTERNAL_UNALIGNED_LOAD64(p));
  ------------------
  |  |   78|      4|  (absl::base_internal::UnalignedLoad64(_p))
  ------------------
  178|      4|}
_ZN4absl12lts_2026052613little_endian7Store64EPvm:
  180|     10|inline void Store64(void* absl_nonnull p, uint64_t v) {
  181|     10|  ABSL_INTERNAL_UNALIGNED_STORE64(p, FromHost64(v));
  ------------------
  |  |   85|     10|  (absl::base_internal::UnalignedStore64(_p, _val))
  ------------------
  182|     10|}
_ZN4absl12lts_2026052610big_endian8ToHost16Et:
  194|      2|inline uint16_t ToHost16(uint16_t x) { return gbswap_16(x); }
_ZN4absl12lts_2026052610big_endian8ToHost32Ej:
  197|     20|inline uint32_t ToHost32(uint32_t x) { return gbswap_32(x); }
_ZN4absl12lts_2026052610big_endian6Load16EPKv:
  250|      2|inline uint16_t Load16(const void* absl_nonnull p) {
  251|      2|  return ToHost16(ABSL_INTERNAL_UNALIGNED_LOAD16(p));
  ------------------
  |  |   74|      2|  (absl::base_internal::UnalignedLoad16(_p))
  ------------------
  252|      2|}
_ZN4absl12lts_2026052610big_endian6Load32EPKv:
  258|     20|inline uint32_t Load32(const void* absl_nonnull p) {
  259|     20|  return ToHost32(ABSL_INTERNAL_UNALIGNED_LOAD32(p));
  ------------------
  |  |   76|     20|  (absl::base_internal::UnalignedLoad32(_p))
  ------------------
  260|     20|}

_ZN4absl12lts_2026052613base_internal17HardeningAssertLTImEEvT_S3_:
   88|     12|constexpr void HardeningAssertLT(T val1, T val2) {
   89|     12|  ABSL_ASSERT(val1 < val2);
  ------------------
  |  |  127|     12|#define ABSL_ASSERT(expr) ABSL_INTERNAL_UNEVALUATED((expr) ? void() : void())
  |  |  ------------------
  |  |  |  |   87|     12|#define ABSL_INTERNAL_UNEVALUATED(expr) (false ? (void)(expr) : void())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (87:42): [Folded, False: 12]
  |  |  |  |  |  Branch (87:57): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   90|       |#if (ABSL_OPTION_HARDENED == 1 || ABSL_OPTION_HARDENED == 2) && defined(NDEBUG)
   91|       |  if (!ABSL_PREDICT_TRUE(val1 < val2)) {
   92|       |    base_internal::HardeningAbort();
   93|       |  }
   94|       |#endif
   95|     12|}
_ZN4absl12lts_2026052613base_internal17HardeningAssertLEIPKjEEvT_S5_:
   98|      2|constexpr void HardeningAssertLE(T val1, T val2) {
   99|      2|  ABSL_ASSERT(val1 <= val2);
  ------------------
  |  |  127|      2|#define ABSL_ASSERT(expr) ABSL_INTERNAL_UNEVALUATED((expr) ? void() : void())
  |  |  ------------------
  |  |  |  |   87|      2|#define ABSL_INTERNAL_UNEVALUATED(expr) (false ? (void)(expr) : void())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (87:42): [Folded, False: 2]
  |  |  |  |  |  Branch (87:57): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  100|       |#if (ABSL_OPTION_HARDENED == 1 || ABSL_OPTION_HARDENED == 2) && defined(NDEBUG)
  101|       |  if (!ABSL_PREDICT_TRUE(val1 <= val2)) {
  102|       |    base_internal::HardeningAbort();
  103|       |  }
  104|       |#endif
  105|      2|}

_ZN4absl12lts_2026052613base_internal8SpinLockC2Ev:
   62|     16|  constexpr SpinLock() : lockword_(kSpinLockCooperative) { RegisterWithTsan(); }
_ZN4absl12lts_2026052613base_internal8SpinLock16RegisterWithTsanEv:
  221|     16|  constexpr void RegisterWithTsan() {
  222|     16|#if ABSL_HAVE_BUILTIN(__builtin_is_constant_evaluated)
  223|     16|    if (!__builtin_is_constant_evaluated()) {
  ------------------
  |  Branch (223:9): [True: 16, Folded]
  ------------------
  224|     16|      ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static);
  225|     16|    }
  226|     16|#endif
  227|     16|  }
_ZN4absl12lts_2026052613base_internal14SpinLockHolderC2ERNS1_8SpinLockE:
  257|     18|      : std::lock_guard<SpinLock>(l) {}
_ZN4absl12lts_2026052613base_internal8SpinLock4lockEv:
   98|     18|  inline void lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() {
   99|     18|    ABSL_TSAN_MUTEX_PRE_LOCK(this, 0);
  100|     18|    if (!TryLockImpl()) {
  ------------------
  |  Branch (100:9): [True: 0, False: 18]
  ------------------
  101|      0|      SlowLock();
  102|      0|    }
  103|     18|    ABSL_TSAN_MUTEX_POST_LOCK(this, 0, 0);
  104|     18|  }
_ZN4absl12lts_2026052613base_internal8SpinLock11TryLockImplEv:
  238|     18|  inline bool TryLockImpl() {
  239|     18|    uint32_t lock_value = lockword_.load(std::memory_order_relaxed);
  240|     18|    return (TryLockInternal(lock_value, 0) & kSpinLockHeld) == 0;
  241|     18|  }
_ZN4absl12lts_2026052613base_internal8SpinLock15TryLockInternalEjj:
  282|     18|                                          uint32_t wait_cycles) {
  283|     18|  if ((lock_value & kSpinLockHeld) != 0) {
  ------------------
  |  Branch (283:7): [True: 0, False: 18]
  ------------------
  284|      0|    return lock_value;
  285|      0|  }
  286|       |
  287|     18|  uint32_t sched_disabled_bit = 0;
  288|     18|  if ((lock_value & kSpinLockCooperative) == 0) {
  ------------------
  |  Branch (288:7): [True: 0, False: 18]
  ------------------
  289|       |    // For non-cooperative locks we must make sure we mark ourselves as
  290|       |    // non-reschedulable before we attempt to CompareAndSwap.
  291|      0|    if (SchedulingGuard::DisableRescheduling()) {
  ------------------
  |  Branch (291:9): [True: 0, False: 0]
  ------------------
  292|      0|      sched_disabled_bit = kSpinLockDisabledScheduling;
  293|      0|    }
  294|      0|  }
  295|       |
  296|     18|  if (!lockword_.compare_exchange_strong(
  ------------------
  |  Branch (296:7): [True: 0, False: 18]
  ------------------
  297|     18|          lock_value,
  298|     18|          kSpinLockHeld | lock_value | wait_cycles | sched_disabled_bit,
  299|     18|          std::memory_order_acquire, std::memory_order_relaxed)) {
  300|      0|    SchedulingGuard::EnableRescheduling(sched_disabled_bit != 0);
  301|      0|  }
  302|       |
  303|     18|  return lock_value;
  304|     18|}
_ZN4absl12lts_2026052613base_internal8SpinLock6unlockEv:
  128|     18|  inline void unlock() ABSL_UNLOCK_FUNCTION() {
  129|     18|    ABSL_TSAN_MUTEX_PRE_UNLOCK(this, 0);
  130|     18|    uint32_t lock_value = lockword_.load(std::memory_order_relaxed);
  131|     18|    lock_value = lockword_.exchange(lock_value & kSpinLockCooperative,
  132|     18|                                    std::memory_order_release);
  133|       |
  134|     18|    if ((lock_value & kSpinLockDisabledScheduling) != 0) {
  ------------------
  |  Branch (134:9): [True: 0, False: 18]
  ------------------
  135|      0|      SchedulingGuard::EnableRescheduling(true);
  136|      0|    }
  137|     18|    if ((lock_value & kWaitTimeMask) != 0) {
  ------------------
  |  Branch (137:9): [True: 0, False: 18]
  ------------------
  138|       |      // Collect contentionz profile info, and speed the wakeup of any waiter.
  139|       |      // The wait_cycles value indicates how long this thread spent waiting
  140|       |      // for the lock.
  141|      0|      SlowUnlock(lock_value);
  142|      0|    }
  143|     18|    ABSL_TSAN_MUTEX_POST_UNLOCK(this, 0);
  144|     18|  }

_ZN4absl12lts_2026052613base_internal15UnalignedLoad16EPKv:
   39|      2|inline uint16_t UnalignedLoad16(const void* absl_nonnull p) {
   40|      2|  uint16_t t;
   41|      2|  memcpy(&t, p, sizeof t);
   42|      2|  return t;
   43|      2|}
_ZN4absl12lts_2026052613base_internal15UnalignedLoad32EPKv:
   45|     60|inline uint32_t UnalignedLoad32(const void* absl_nonnull p) {
   46|     60|  uint32_t t;
   47|     60|  memcpy(&t, p, sizeof t);
   48|     60|  return t;
   49|     60|}
_ZN4absl12lts_2026052613base_internal15UnalignedLoad64EPKv:
   51|    278|inline uint64_t UnalignedLoad64(const void* absl_nonnull p) {
   52|    278|  uint64_t t;
   53|    278|  memcpy(&t, p, sizeof t);
   54|    278|  return t;
   55|    278|}
_ZN4absl12lts_2026052613base_internal16UnalignedStore64EPvm:
   65|     10|inline void UnalignedStore64(void* absl_nonnull p, uint64_t v) {
   66|     10|  memcpy(p, &v, sizeof v);
   67|     10|}

_ZN4absl12lts_2026052612NoDestructorINS0_5MutexEEC2IJETnNSt3__19enable_ifIXntsr3std7is_sameIFvDpRu7__decayIT_EEFvRS3_EEE5valueEiE4typeELi0EEEDpOS7_:
  122|     10|      : impl_(std::forward<Ts>(args)...) {}
_ZN4absl12lts_2026052612NoDestructorINS0_5MutexEE13PlacementImplC2IJEEEDpOT_:
  160|     10|    explicit PlacementImpl(Args&&... args) {
  161|     10|      new (&space_) T(std::forward<Args>(args)...);
  162|     10|    }
_ZN4absl12lts_2026052612NoDestructorINS0_5MutexEEdeEv:
  137|    118|  T& operator*() { return *get(); }
_ZN4absl12lts_2026052612NoDestructorINS0_5MutexEE3getEv:
  139|    118|  T* absl_nonnull get() { return impl_.get(); }
_ZN4absl12lts_2026052612NoDestructorINS0_5MutexEE13PlacementImpl3getEv:
  166|    118|    T* absl_nonnull get() {
  167|    118|      return std::launder(reinterpret_cast<T*>(&space_));
  168|    118|    }
_ZN4absl12lts_2026052612NoDestructorINS0_14flags_internal12FlagRegistryEEC2IJETnNSt3__19enable_ifIXntsr3std7is_sameIFvDpRu7__decayIT_EEFvRS4_EEE5valueEiE4typeELi0EEEDpOS8_:
  122|      2|      : impl_(std::forward<Ts>(args)...) {}
_ZN4absl12lts_2026052612NoDestructorINS0_14flags_internal12FlagRegistryEE13PlacementImplC2IJEEEDpOT_:
  160|      2|    explicit PlacementImpl(Args&&... args) {
  161|      2|      new (&space_) T(std::forward<Args>(args)...);
  162|      2|    }
_ZN4absl12lts_2026052612NoDestructorINS0_14flags_internal12FlagRegistryEEdeEv:
  137|     56|  T& operator*() { return *get(); }
_ZN4absl12lts_2026052612NoDestructorINS0_14flags_internal12FlagRegistryEE3getEv:
  139|     56|  T* absl_nonnull get() { return impl_.get(); }
_ZN4absl12lts_2026052612NoDestructorINS0_14flags_internal12FlagRegistryEE13PlacementImpl3getEv:
  166|     56|    T* absl_nonnull get() {
  167|     56|      return std::launder(reinterpret_cast<T*>(&space_));
  168|     56|    }

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

_ZN4absl12lts_2026052618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE5applyINS1_12EqualElementIS7_NS1_8StringEqEEEJRNS3_4pairIKS7_S9_EEEEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSJ_DpOSK_:
  680|      4|  apply(F&& f, Args&&... args) {
  681|      4|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  682|      4|                                                   std::forward<Args>(args)...);
  683|      4|  }
_ZN4absl12lts_2026052618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE7elementEPNS1_13map_slot_typeIS7_S9_EE:
  694|     82|  static std::pair<const K, V>& element(slot_type* slot) { return slot->value; }
_ZN4absl12lts_2026052618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE5applyINS1_12raw_hash_setISA_JEE19EmplaceDecomposableEJNS3_4pairIKS7_S9_EEEEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSI_DpOSJ_:
  680|     50|  apply(F&& f, Args&&... args) {
  681|     50|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  682|     50|                                                   std::forward<Args>(args)...);
  683|     50|  }
_ZN4absl12lts_2026052618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE5applyINS1_11HashElementINS1_10StringHashELb1EEEJRNS3_4pairIKS7_S9_EEEEEDTclsr4absl18container_internalE13DecomposePairclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSJ_DpOSK_:
  680|     28|  apply(F&& f, Args&&... args) {
  681|     28|    return absl::container_internal::DecomposePair(std::forward<F>(f),
  682|     28|                                                   std::forward<Args>(args)...);
  683|     28|  }
_ZN4absl12lts_2026052618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE8transferINS3_9allocatorINS3_4pairIKS7_S9_EEEEEEDaPT_PNS1_13map_slot_typeIS7_S9_EESL_:
  673|     28|                       slot_type* old_slot) {
  674|     28|    return slot_policy::transfer(alloc, new_slot, old_slot);
  675|     28|  }
_ZN4absl12lts_2026052618container_internal17FlatHashMapPolicyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE9constructINS3_9allocatorINS3_4pairIKS7_S9_EEEEJRKNS3_21piecewise_construct_tENS3_5tupleIJOSE_EEENSK_IJOS9_EEEEEEvPT_PNS1_13map_slot_typeIS7_S9_EEDpOT0_:
  661|     50|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  662|     50|    slot_policy::construct(alloc, slot, std::forward<Args>(args)...);
  663|     50|  }
_ZN4absl12lts_2026052613flat_hash_mapINSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPNS0_15CommandLineFlagENS0_18container_internal10StringHashENS9_8StringEqENS2_9allocatorINS2_4pairIKS6_S8_EEEEEC2Ev:
  196|      2|  flat_hash_map() {}

_ZN4absl12lts_2026052613InlinedVectorINS0_14SourceLocationELm1ENSt3__19allocatorIS2_EEED2Ev:
  300|  3.29k|  ~InlinedVector() {}
_ZN4absl12lts_2026052613InlinedVectorINS0_14SourceLocationELm1ENSt3__19allocatorIS2_EEEC2Ev:
  128|  3.29k|  InlinedVector() noexcept(noexcept(allocator_type())) : storage_() {}
_ZN4absl12lts_2026052613InlinedVectorINS0_14SourceLocationELm1ENSt3__19allocatorIS2_EEE9push_backERKS2_:
  753|  3.29k|  void push_back(const_reference v) { static_cast<void>(emplace_back(v)); }
_ZN4absl12lts_2026052613InlinedVectorINS0_14SourceLocationELm1ENSt3__19allocatorIS2_EEE12emplace_backIJRKS2_EEERS2_DpOT_:
  746|  3.29k|  reference emplace_back(Args&&... args) ABSL_ATTRIBUTE_LIFETIME_BOUND {
  747|  3.29k|    return storage_.EmplaceBack(std::forward<Args>(args)...);
  748|  3.29k|  }

_ZN4absl12lts_2026052618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE7elementISB_EEDTclsrT_7elementfp_EEPNS1_13map_slot_typeIS8_SA_EE:
   85|     82|      -> decltype(P::element(slot)) {
   86|     82|    return P::element(slot);
   87|     82|  }
_ZN4absl12lts_2026052618container_internal20common_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE8transferINS4_9allocatorINS4_4pairIKS8_SA_EEEEEEvPT_PNS1_13map_slot_typeIS8_SA_EESN_:
   75|     28|  static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) {
   76|     28|    transfer_impl(alloc, new_slot, old_slot, Rank2{});
   77|     28|  }
_ZN4absl12lts_2026052618container_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_5Rank2E:
  119|     28|                                                           old_slot)) {
  120|     28|    return P::transfer(alloc, new_slot, old_slot);
  121|     28|  }
_ZN4absl12lts_2026052618container_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_:
   51|     50|  static void construct(Alloc* alloc, slot_type* slot, Args&&... args) {
   52|     50|    Policy::construct(alloc, slot, std::forward<Args>(args)...);
   53|     50|  }

_ZNR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageImLm1ENS2_10StorageTagIJNSt3__19allocatorINS0_14SourceLocationEEEmEEELb0EE3getEv:
   92|  6.58k|  constexpr T& get() & { return value; }
_ZNR4absl12lts_2026052618container_internal15CompressedTupleIJNSt3__19allocatorINS0_14SourceLocationEEEmEE3getILi1EEERNS1_25internal_compressed_tuple4ElemIS7_XT_EE4typeEv:
  244|  6.58k|  constexpr ElemT<I>& get() & {
  245|  6.58k|    return StorageT<I>::get();
  246|  6.58k|  }
_ZNKR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageImLm1ENS2_10StorageTagIJNSt3__19allocatorINS0_14SourceLocationEEEmEEELb0EE3getEv:
   91|  9.87k|  constexpr const T& get() const& { return value; }
_ZNKR4absl12lts_2026052618container_internal15CompressedTupleIJNSt3__19allocatorINS0_14SourceLocationEEEmEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemIS7_XT_EE4typeEv:
  249|  9.87k|  constexpr const ElemT<I>& get() const& {
  250|  9.87k|    return StorageT<I>::get();
  251|  9.87k|  }
_ZNR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS0_14SourceLocationEEELm0ENS2_10StorageTagIJS7_mEEELb1EE3getEv:
  105|  3.29k|  constexpr T& get() & { return *this; }
_ZNR4absl12lts_2026052618container_internal15CompressedTupleIJNSt3__19allocatorINS0_14SourceLocationEEEmEE3getILi0EEERNS1_25internal_compressed_tuple4ElemIS7_XT_EE4typeEv:
  244|  3.29k|  constexpr ElemT<I>& get() & {
  245|  3.29k|    return StorageT<I>::get();
  246|  3.29k|  }
_ZNKR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ENS2_10StorageTagIJS4_NS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEEELb0EE3getEv:
   91|    376|  constexpr const T& get() const& { return value; }
_ZNKR4absl12lts_2026052618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEE3getILi0EEERKNS1_25internal_compressed_tuple4ElemIS9_XT_EE4typeEv:
  249|    376|  constexpr const ElemT<I>& get() const& {
  250|    376|    return StorageT<I>::get();
  251|    376|  }
_ZNR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ENS2_10StorageTagIJS4_NS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEEELb0EE3getEv:
   92|    236|  constexpr T& get() & { return value; }
_ZNR4absl12lts_2026052618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEE3getILi0EEERNS1_25internal_compressed_tuple4ElemIS9_XT_EE4typeEv:
  244|    236|  constexpr ElemT<I>& get() & {
  245|    236|    return StorageT<I>::get();
  246|    236|  }
_ZNR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIcEELm3ENS2_10StorageTagIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqES6_EEELb1EE3getEv:
  105|     80|  constexpr T& get() & { return *this; }
_ZNR4absl12lts_2026052618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEE3getILi3EEERNS1_25internal_compressed_tuple4ElemIS9_XT_EE4typeEv:
  244|     80|  constexpr ElemT<I>& get() & {
  245|     80|    return StorageT<I>::get();
  246|     80|  }
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_12CommonFieldsELm0ENS2_10StorageTagIJS4_NS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEEELb0EEC2IS4_EENS8_10in_place_tEOT_:
   90|      2|      : value(std::forward<V>(v)) {}
_ZNKR4absl12lts_2026052618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEE3getILi1EEERKNS1_25internal_compressed_tuple4ElemIS9_XT_EE4typeEv:
  249|     74|  constexpr const ElemT<I>& get() const& {
  250|     74|    return StorageT<I>::get();
  251|     74|  }
_ZNKR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ENS2_10StorageTagIJNS1_12CommonFieldsES4_NS1_8StringEqENSt3__19allocatorIcEEEEELb1EE3getEv:
  104|     74|  constexpr const T& get() const& { return *this; }
_ZNKR4absl12lts_2026052618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEE3getILi2EEERKNS1_25internal_compressed_tuple4ElemIS9_XT_EE4typeEv:
  249|      4|  constexpr const ElemT<I>& get() const& {
  250|      4|    return StorageT<I>::get();
  251|      4|  }
_ZNKR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_8StringEqELm2ENS2_10StorageTagIJNS1_12CommonFieldsENS1_10StringHashES4_NSt3__19allocatorIcEEEEELb1EE3getEv:
  104|      4|  constexpr const T& get() const& { return *this; }
_ZNR4absl12lts_2026052618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEE3getILi1EEERNS1_25internal_compressed_tuple4ElemIS9_XT_EE4typeEv:
  244|      4|  constexpr ElemT<I>& get() & {
  245|      4|    return StorageT<I>::get();
  246|      4|  }
_ZNR4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ENS2_10StorageTagIJNS1_12CommonFieldsES4_NS1_8StringEqENSt3__19allocatorIcEEEEELb1EE3getEv:
  105|      4|  constexpr T& get() & { return *this; }
_ZN4absl12lts_2026052618container_internal15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEEC2IS3_JS4_S5_S8_ETnNS6_9enable_ifIXsr3std11conjunctionINS6_8negationINS6_7is_sameIFvS9_EFvu7__decayIT_EEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleIS9_JSF_DpT0_EEEEE5valueEbE4typeELb1EEEOSF_DpOSM_:
  239|      2|      : CompressedTuple::CompressedTupleImpl(std::in_place,
  240|      2|                                             std::forward<First>(first),
  241|      2|                                             std::forward<Vs>(base)...) {}
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqENSt3__19allocatorIcEEEEENS8_16integer_sequenceImJLm0ELm1ELm2ELm3EEEELb1EEC2IJS5_S6_S7_SA_EEENS8_10in_place_tEDpOT_:
  126|      8|      : Storage<Ts, I, StorageTag<Ts...>>(std::in_place,
  127|      8|                                          std::forward<Vs>(args))... {}
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_10StringHashELm1ENS2_10StorageTagIJNS1_12CommonFieldsES4_NS1_8StringEqENSt3__19allocatorIcEEEEELb1EEC2IS4_EENS8_10in_place_tEOT_:
  102|      2|  explicit constexpr Storage(std::in_place_t, V&& v) : T(std::forward<V>(v)) {}
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINS1_8StringEqELm2ENS2_10StorageTagIJNS1_12CommonFieldsENS1_10StringHashES4_NSt3__19allocatorIcEEEEELb1EEC2IS4_EENS8_10in_place_tEOT_:
  102|      2|  explicit constexpr Storage(std::in_place_t, V&& v) : T(std::forward<V>(v)) {}
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorIcEELm3ENS2_10StorageTagIJNS1_12CommonFieldsENS1_10StringHashENS1_8StringEqES6_EEELb1EEC2IS6_EENS4_10in_place_tEOT_:
  102|      2|  explicit constexpr Storage(std::in_place_t, V&& v) : T(std::forward<V>(v)) {}
_ZN4absl12lts_2026052618container_internal15CompressedTupleIJNSt3__19allocatorINS0_14SourceLocationEEEmEEC2IS6_JjETnNS3_9enable_ifIXsr3std11conjunctionINS3_8negationINS3_7is_sameIFvS7_EFvu7__decayIT_EEEEEENS1_25internal_compressed_tuple27TupleItemsMoveConstructibleIS7_JSD_DpT0_EEEEE5valueEbE4typeELb1EEEOSD_DpOSK_:
  239|  3.29k|      : CompressedTuple::CompressedTupleImpl(std::in_place,
  240|  3.29k|                                             std::forward<First>(first),
  241|  3.29k|                                             std::forward<Vs>(base)...) {}
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple19CompressedTupleImplINS1_15CompressedTupleIJNSt3__19allocatorINS0_14SourceLocationEEEmEEENS5_16integer_sequenceImJLm0ELm1EEEELb1EEC2IJS8_jEEENS5_10in_place_tEDpOT_:
  126|  6.58k|      : Storage<Ts, I, StorageTag<Ts...>>(std::in_place,
  127|  6.58k|                                          std::forward<Vs>(args))... {}
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageINSt3__19allocatorINS0_14SourceLocationEEELm0ENS2_10StorageTagIJS7_mEEELb1EEC2IS7_EENS4_10in_place_tEOT_:
  102|  3.29k|  explicit constexpr Storage(std::in_place_t, V&& v) : T(std::forward<V>(v)) {}
_ZN4absl12lts_2026052618container_internal25internal_compressed_tuple7StorageImLm1ENS2_10StorageTagIJNSt3__19allocatorINS0_14SourceLocationEEEmEEELb0EEC2IjEENS5_10in_place_tEOT_:
   90|  3.29k|      : value(std::forward<V>(v)) {}

_ZN4absl12lts_2026052618container_internal27SanitizerPoisonMemoryRegionEPKvm:
  240|     38|inline void SanitizerPoisonMemoryRegion(const void* m, size_t s) {
  241|       |#ifdef ABSL_HAVE_ADDRESS_SANITIZER
  242|       |  ASAN_POISON_MEMORY_REGION(m, s);
  243|       |#endif
  244|       |#ifdef ABSL_HAVE_MEMORY_SANITIZER
  245|       |  __msan_poison(m, s);
  246|       |#endif
  247|     38|  (void)m;
  248|     38|  (void)s;
  249|     38|}
_ZN4absl12lts_2026052618container_internal29SanitizerUnpoisonMemoryRegionEPKvm:
  251|     90|inline void SanitizerUnpoisonMemoryRegion(const void* m, size_t s) {
  252|       |#ifdef ABSL_HAVE_ADDRESS_SANITIZER
  253|       |  ASAN_UNPOISON_MEMORY_REGION(m, s);
  254|       |#endif
  255|       |#ifdef ABSL_HAVE_MEMORY_SANITIZER
  256|       |  __msan_unpoison(m, s);
  257|       |#endif
  258|     90|  (void)m;
  259|     90|  (void)s;
  260|     90|}
_ZN4absl12lts_2026052618container_internal11HashElementINS1_10StringHashELb1EEC2ERKS3_m:
  495|     78|  HashElement(const Hash& h, size_t s) : hash(h), seed(s) {}
_ZN4absl12lts_2026052618container_internal13DecomposePairINS1_12EqualElementINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEENS1_8StringEqEEEJRNS4_4pairIKS8_PNS0_15CommandLineFlagEEEEEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSH_DpOSI_:
  226|      4|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  227|      4|  return memory_internal::DecomposePairImpl(
  228|      4|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  229|      4|}
_ZN4absl12lts_2026052618container_internal15memory_internal17DecomposePairImplINS1_12EqualElementINSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS1_8StringEqEEERKS9_NS5_5tupleIJRKPNS0_15CommandLineFlagEEEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS5_19piecewise_constructEEclsr3stdE7declvalINSE_IJSL_EEEEEclsr3stdE7declvalIT1_EEEEOSK_NS5_4pairISO_SP_EE:
  158|      4|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  159|      4|  const auto& key = std::get<0>(p.first);
  160|      4|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  161|      4|                            std::move(p.second));
  162|      4|}
_ZNK4absl12lts_2026052618container_internal12EqualElementINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEENS1_8StringEqEEclIS7_JRKNS3_21piecewise_construct_tENS3_5tupleIJRKS7_EEENSE_IJRKPNS0_15CommandLineFlagEEEEEEEbRKT_DpOT0_:
  529|      4|  bool operator()(const K2& lhs, Args&&...) const {
  530|      4|    ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(eq(lhs, rhs));
  ------------------
  |  |  488|      4|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
  531|      4|  }
_ZN4absl12lts_2026052618container_internal8PairArgsIKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJRKT_EEENSC_IJRKT0_EEEEERKNSB_ISD_SH_EE:
  207|     32|    const std::pair<F, S>& p) {
  208|     32|  return PairArgs(p.first, p.second);
  209|     32|}
_ZN4absl12lts_2026052618container_internal8PairArgsIRKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERKPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJOT_EEENSF_IJOT0_EEEEESH_SK_:
  201|     32|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(F&& f, S&& s) {
  202|     32|  return {std::piecewise_construct, std::forward_as_tuple(std::forward<F>(f)),
  203|     32|          std::forward_as_tuple(std::forward<S>(s))};
  204|     32|}
_ZNK4absl12lts_2026052618container_internal11HashElementINS1_10StringHashELb1EEclINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEJEEEmRKT_DpOT0_:
  498|     50|  size_t operator()(const K& key, Args&&...) const {
  499|     50|    if constexpr (kIsDefault) {
  500|       |      // TODO(b/384509507): resolve `no header providing
  501|       |      // "absl::hash_internal::SupportsHashWithSeed" is directly included`.
  502|       |      // Maybe we should make "internal/hash.h" be a separate library.
  503|     50|      return absl::hash_internal::HashWithSeed().hash(hash, key, seed);
  504|     50|    }
  505|       |    // NOLINTNEXTLINE(clang-diagnostic-sign-conversion)
  506|      0|    return hash(key) ^ seed;
  507|     50|  }
_ZN4absl12lts_2026052618container_internal13DecomposePairINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS5_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE19EmplaceDecomposableEJNS5_4pairIKS9_SB_EEEEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSI_DpOSJ_:
  226|     50|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  227|     50|  return memory_internal::DecomposePairImpl(
  228|     50|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  229|     50|}
_ZN4absl12lts_2026052618container_internal15memory_internal17DecomposePairImplINS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE19EmplaceDecomposableEOKSA_NS6_5tupleIJOSC_EEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS6_19piecewise_constructEEclsr3stdE7declvalINSI_IJSM_EEEEEclsr3stdE7declvalIT1_EEEEOSL_NS6_4pairISP_SQ_EE:
  158|     50|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  159|     50|  const auto& key = std::get<0>(p.first);
  160|     50|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  161|     50|                            std::move(p.second));
  162|     50|}
_ZN4absl12lts_2026052618container_internal23TypeErasedApplyToSlotFnINS1_10StringHashENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEELb1EEEmPKvPvm:
  542|      2|size_t TypeErasedApplyToSlotFn(const void* fn, void* slot, size_t seed) {
  543|      2|  const auto* f = static_cast<const Fn*>(fn);
  544|      2|  return HashElement<Fn, kIsDefault>{*f, seed}(*static_cast<const T*>(slot));
  545|      2|}
_ZN4absl12lts_2026052618container_internal13DecomposePairINS1_11HashElementINS1_10StringHashELb1EEEJRNSt3__14pairIKNS6_17basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEEEEDTclsr15memory_internalE17DecomposePairImplclsr3stdE7forwardIT_Efp_Ecl8PairArgsspclsr3stdE7forwardIT0_Efp0_EEEEOSH_DpOSI_:
  226|     28|        std::forward<F>(f), PairArgs(std::forward<Args>(args)...))) {
  227|     28|  return memory_internal::DecomposePairImpl(
  228|     28|      std::forward<F>(f), PairArgs(std::forward<Args>(args)...));
  229|     28|}
_ZN4absl12lts_2026052618container_internal15memory_internal17DecomposePairImplINS1_11HashElementINS1_10StringHashELb1EEERKNSt3__117basic_string_viewIcNS7_11char_traitsIcEEEENS7_5tupleIJRKPNS0_15CommandLineFlagEEEEEEDTclclsr3stdE7declvalIT_EEclsr3stdE7declvalIRKT0_EEL_ZNS7_19piecewise_constructEEclsr3stdE7declvalINSE_IJSL_EEEEEclsr3stdE7declvalIT1_EEEEOSK_NS7_4pairISO_SP_EE:
  158|     28|DecomposePairImpl(F&& f, std::pair<std::tuple<K>, V> p) {
  159|     28|  const auto& key = std::get<0>(p.first);
  160|     28|  return std::forward<F>(f)(key, std::piecewise_construct, std::move(p.first),
  161|     28|                            std::move(p.second));
  162|     28|}
_ZNK4absl12lts_2026052618container_internal11HashElementINS1_10StringHashELb1EEclINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEJRKNS6_21piecewise_construct_tENS6_5tupleIJRKSA_EEENSE_IJRKPNS0_15CommandLineFlagEEEEEEEmRKT_DpOT0_:
  498|     28|  size_t operator()(const K& key, Args&&...) const {
  499|     28|    if constexpr (kIsDefault) {
  500|       |      // TODO(b/384509507): resolve `no header providing
  501|       |      // "absl::hash_internal::SupportsHashWithSeed" is directly included`.
  502|       |      // Maybe we should make "internal/hash.h" be a separate library.
  503|     28|      return absl::hash_internal::HashWithSeed().hash(hash, key, seed);
  504|     28|    }
  505|       |    // NOLINTNEXTLINE(clang-diagnostic-sign-conversion)
  506|      0|    return hash(key) ^ seed;
  507|     28|  }
_ZN4absl12lts_2026052618container_internal15map_slot_policyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE8transferINS3_9allocatorINS3_4pairIKS7_S9_EEEEEEDaPT_PNS1_13map_slot_typeIS7_S9_EESL_:
  442|     28|                       slot_type* old_slot) {
  443|       |    // This should really just be
  444|       |    // typename absl::is_trivially_relocatable<value_type>::type()
  445|       |    // but std::pair is not trivially copyable in C++23 in some standard
  446|       |    // library versions.
  447|       |    // See https://github.com/llvm/llvm-project/pull/95444 for instance.
  448|     28|    auto is_relocatable = typename std::conjunction<
  449|     28|        absl::is_trivially_relocatable<typename value_type::first_type>,
  450|     28|        absl::is_trivially_relocatable<typename value_type::second_type>>::
  451|     28|        type();
  452|       |
  453|     28|    emplace(new_slot);
  454|     28|    if (is_relocatable) {
  ------------------
  |  Branch (454:9): [True: 28, Folded]
  ------------------
  455|       |      // TODO(b/247130232,b/251814870): remove casts after fixing warnings.
  456|     28|      std::memcpy(static_cast<void*>(std::launder(&new_slot->value)),
  457|     28|                  static_cast<const void*>(&old_slot->value),
  458|     28|                  sizeof(value_type));
  459|     28|      return is_relocatable;
  460|     28|    }
  461|       |
  462|      0|    if (kMutableKeys::value) {
  ------------------
  |  Branch (462:9): [True: 0, Folded]
  ------------------
  463|      0|      std::allocator_traits<Allocator>::construct(
  464|      0|          *alloc, &new_slot->mutable_value, std::move(old_slot->mutable_value));
  465|      0|    } else {
  466|      0|      std::allocator_traits<Allocator>::construct(*alloc, &new_slot->value,
  467|      0|                                                  std::move(old_slot->value));
  468|      0|    }
  469|      0|    destroy(alloc, old_slot);
  470|      0|    return is_relocatable;
  471|     28|  }
_ZN4absl12lts_2026052618container_internal15map_slot_policyINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEE7emplaceEPNS1_13map_slot_typeIS7_S9_EE:
  368|     78|  static void emplace(slot_type* slot) {
  369|       |    // The construction of union doesn't do anything at runtime but it allows us
  370|       |    // to access its members without violating aliasing rules.
  371|     78|    new (slot) slot_type;
  372|     78|  }
_ZN4absl12lts_2026052618container_internal13map_slot_typeINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEC2Ev:
  349|     78|  map_slot_type() {}
_ZN4absl12lts_2026052618container_internal7HashKeyINS1_10StringHashENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEELb1EEC2ERKS3_RKS8_:
  515|      4|  HashKey(const Hash& h, const Key& k) : hash(h), key(k) {}
_ZNK4absl12lts_2026052618container_internal7HashKeyINS1_10StringHashENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEELb1EEclEm:
  517|      2|  size_t operator()(size_t seed) const {
  518|      2|    return HashElement<Hash, kIsDefault>{hash, seed}(key);
  519|      2|  }
_ZN4absl12lts_2026052618container_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_:
  397|     50|  static void construct(Allocator* alloc, slot_type* slot, Args&&... args) {
  398|     50|    emplace(slot);
  399|     50|    if (kMutableKeys::value) {
  ------------------
  |  Branch (399:9): [True: 50, Folded]
  ------------------
  400|     50|      std::allocator_traits<Allocator>::construct(*alloc, &slot->mutable_value,
  401|     50|                                                  std::forward<Args>(args)...);
  402|     50|    } else {
  403|      0|      std::allocator_traits<Allocator>::construct(*alloc, &slot->value,
  404|      0|                                                  std::forward<Args>(args)...);
  405|      0|    }
  406|     50|  }
_ZN4absl12lts_2026052618container_internal8PairArgsIKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJOT_EEENSC_IJOT0_EEEEEONSB_ISD_SG_EE:
  211|     50|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(std::pair<F, S>&& p) {
  212|     50|  return PairArgs(std::forward<F>(p.first), std::forward<S>(p.second));
  213|     50|}
_ZN4absl12lts_2026052618container_internal8PairArgsIKNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPNS0_15CommandLineFlagEEENS3_4pairINS3_5tupleIJOT_EEENSC_IJOT0_EEEEESE_SH_:
  201|     50|std::pair<std::tuple<F&&>, std::tuple<S&&>> PairArgs(F&& f, S&& s) {
  202|     50|  return {std::piecewise_construct, std::forward_as_tuple(std::forward<F>(f)),
  203|     50|          std::forward_as_tuple(std::forward<S>(s))};
  204|     50|}
_ZN4absl12lts_2026052618container_internal8AllocateILm8ENSt3__19allocatorIcEEEEPvPT0_m:
   62|     10|void* Allocate(Alloc* alloc, size_t n) {
   63|     10|  static_assert(Alignment > 0, "");
   64|     10|  assert(n && "n must be positive");
   65|     10|  using M = AlignedType<Alignment>;
   66|     10|  using A = typename std::allocator_traits<Alloc>::template rebind_alloc<M>;
   67|     10|  using AT = typename std::allocator_traits<Alloc>::template rebind_traits<M>;
   68|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
   69|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
   70|       |  // with the "foo(bar)" syntax.
   71|     10|  A my_mem_alloc(*alloc);
   72|     10|  void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M));
   73|       |  assert(reinterpret_cast<uintptr_t>(p) % Alignment == 0 &&
   74|     10|         "allocator does not respect alignment");
   75|     10|  return p;
   76|     10|}
_ZN4absl12lts_2026052618container_internal10DeallocateILm8ENSt3__19allocatorIcEEEEvPT0_Pvm:
   93|      8|void Deallocate(Alloc* alloc, void* p, size_t n) {
   94|      8|  static_assert(Alignment > 0, "");
   95|      8|  assert(n && "n must be positive");
   96|      8|  using M = AlignedType<Alignment>;
   97|      8|  using A = typename std::allocator_traits<Alloc>::template rebind_alloc<M>;
   98|      8|  using AT = typename std::allocator_traits<Alloc>::template rebind_traits<M>;
   99|       |  // On macOS, "mem_alloc" is a #define with one argument defined in
  100|       |  // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it
  101|       |  // with the "foo(bar)" syntax.
  102|      8|  A my_mem_alloc(*alloc);
  103|      8|  AT::deallocate(my_mem_alloc, static_cast<M*>(p),
  104|      8|                 (n + sizeof(M) - 1) / sizeof(M));
  105|      8|}

_ZNK4absl12lts_2026052618container_internal10StringHash14hash_with_seedENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEm:
   86|     78|  size_t hash_with_seed(absl::string_view v, size_t seed) const {
   87|     78|    return absl::hash_internal::HashWithSeed().hash(
   88|     78|        absl::Hash<absl::string_view>{}, v, seed);
   89|     78|  }
_ZNK4absl12lts_2026052618container_internal8StringEqclENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEES7_:
   98|      4|  bool operator()(absl::string_view lhs, absl::string_view rhs) const {
   99|      4|    return lhs == rhs;
  100|      4|  }

_ZN4absl12lts_2026052618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE5applyINS1_12EqualElementIS8_NS1_8StringEqEEEJRNS4_4pairIKS8_SA_EEESB_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSM_DpOSN_:
  130|      4|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  131|      4|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  132|      4|  }
_ZN4absl12lts_2026052618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE5applyINS1_12raw_hash_setISB_JEE19EmplaceDecomposableEJNS4_4pairIKS8_SA_EEESB_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSL_DpOSM_:
  130|     50|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  131|     50|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  132|     50|  }
_ZN4absl12lts_2026052618container_internal18hash_policy_traitsINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEvE5applyINS1_11HashElementINS1_10StringHashELb1EEEJRNS4_4pairIKS8_SA_EEESB_EEDTclsrT1_5applyclsr3stdE7forwardIT_Efp_Espclsr3stdE7forwardIT0_Efp0_EEEOSM_DpOSN_:
  130|     28|      -> decltype(P::apply(std::forward<F>(f), std::forward<Ts>(ts)...)) {
  131|     28|    return P::apply(std::forward<F>(f), std::forward<Ts>(ts)...);
  132|     28|  }

_ZN4absl12lts_2026052618container_internal13GroupSse2ImplC2EPKNS1_6ctrl_tE:
  284|     50|  explicit GroupSse2Impl(const ctrl_t* pos) {
  285|     50|    ctrl = _mm_loadu_si128(reinterpret_cast<const __m128i*>(pos));
  286|     50|  }
_ZNK4absl12lts_2026052618container_internal13GroupSse2Impl5MatchEh:
  289|     46|  BitMaskType Match(h2_t hash) const {
  290|     46|    auto match = _mm_set1_epi8(static_cast<char>(hash));
  291|     46|    return BitMaskType(MoveMask(_mm_cmpeq_epi8(match, ctrl)));
  292|     46|  }
_ZNK4absl12lts_2026052618container_internal13GroupSse2Impl9MaskEmptyEv:
  295|     46|  NonIterableBitMaskType MaskEmpty() const {
  296|       |#ifdef ABSL_INTERNAL_HAVE_SSSE3
  297|       |    // This only works because ctrl_t::kEmpty is -128.
  298|       |    return NonIterableBitMaskType(MoveMask(_mm_sign_epi8(ctrl, ctrl)));
  299|       |#else
  300|     46|    auto match = _mm_set1_epi8(static_cast<char>(ctrl_t::kEmpty));
  301|     46|    return NonIterableBitMaskType(MoveMask(_mm_cmpeq_epi8(match, ctrl)));
  302|     46|#endif
  303|     46|  }
_ZNK4absl12lts_2026052618container_internal13GroupSse2Impl8MaskFullEv:
  308|      2|  BitMaskType MaskFull() const { return BitMaskType(MoveMask(ctrl) ^ 0xffff); }
_ZNK4absl12lts_2026052618container_internal13GroupSse2Impl18MaskEmptyOrDeletedEv:
  316|      2|  NonIterableBitMaskType MaskEmptyOrDeleted() const {
  317|      2|    auto special = _mm_set1_epi8(static_cast<char>(ctrl_t::kSentinel));
  318|      2|    return NonIterableBitMaskType(
  319|      2|        MoveMask(_mm_cmpgt_epi8_fixed(special, ctrl)));
  320|      2|  }
_ZN4absl12lts_2026052618container_internal13GroupSse2Impl8MoveMaskEDv2_x:
  344|     96|  static MaskInt MoveMask(__m128i xmm) {
  345|     96|    auto mask = static_cast<MaskInt>(_mm_movemask_epi8(xmm));
  346|     96|#ifdef __clang__
  347|       |    // TODO(b/472522597): Without the inline asm, clang ends up generating an
  348|       |    // unnecessary movzx to zero the upper bits of the output, but those bits
  349|       |    // are already zero. See https://godbolt.org/z/G6xW1Ecbx.
  350|     96|    asm("" : "+r"(mask));  // NOLINT
  351|     96|#endif
  352|     96|    return mask;
  353|     96|  }
_ZN4absl12lts_2026052618container_internal6IsFullENS1_6ctrl_tE:
  221|     46|inline bool IsFull(ctrl_t c) {
  222|       |  // Cast `c` to the underlying type instead of casting `0` to `ctrl_t` as `0`
  223|       |  // is not a value in the enum. Both ways are equivalent, but this way makes
  224|       |  // linters happier.
  225|     46|  return static_cast<std::underlying_type_t<ctrl_t>>(c) >= 0;
  226|     46|}
_ZN4absl12lts_2026052618container_internal16IsEmptyOrDeletedENS1_6ctrl_tE:
  228|     66|inline bool IsEmptyOrDeleted(ctrl_t c) { return c < ctrl_t::kSentinel; }
_ZN4absl12lts_2026052618container_internal20_mm_cmpgt_epi8_fixedEDv2_xS2_:
  264|      2|inline __m128i _mm_cmpgt_epi8_fixed(__m128i a, __m128i b) {
  265|       |#if defined(__GNUC__) && !defined(__clang__)
  266|       |  if (std::is_unsigned<char>::value) {
  267|       |    const __m128i mask = _mm_set1_epi8(0x80);
  268|       |    const __m128i diff = _mm_subs_epi8(b, a);
  269|       |    return _mm_cmpeq_epi8(_mm_and_si128(diff, mask), mask);
  270|       |  }
  271|       |#endif
  272|      2|  return _mm_cmpgt_epi8(a, b);
  273|      2|}
_ZNK4absl12lts_2026052618container_internal7BitMaskIjLi16ELi0ELb0EE5beginEv:
  153|     48|  BitMask begin() const { return *this; }
_ZNK4absl12lts_2026052618container_internal7BitMaskIjLi16ELi0ELb0EE3endEv:
  154|     48|  BitMask end() const { return BitMask(0); }
_ZN4absl12lts_2026052618container_internalneERKNS1_7BitMaskIjLi16ELi0ELb0EEES5_:
  160|     78|  friend bool operator!=(const BitMask& a, const BitMask& b) {
  161|     78|    return a.mask_ != b.mask_;
  162|     78|  }
_ZN4absl12lts_2026052618container_internal7BitMaskIjLi16ELi0ELb0EEppEv:
  143|     30|  BitMask& operator++() {
  144|     30|    if (Shift == 3 && NullifyBitsOnIteration) {
  ------------------
  |  Branch (144:9): [Folded, False: 30]
  |  Branch (144:23): [Folded, False: 0]
  ------------------
  145|      0|      this->mask_ &= kMsbs8Bytes;
  146|      0|    }
  147|     30|    this->mask_ &= (this->mask_ - 1);
  148|     30|    return *this;
  149|     30|  }
_ZNK4absl12lts_2026052618container_internal7BitMaskIjLi16ELi0ELb0EEdeEv:
  151|     30|  uint32_t operator*() const { return Base::LowestBitSet(); }
_ZNK4absl12lts_2026052618container_internal18NonIterableBitMaskIjLi16ELi0EE12LowestBitSetEv:
   90|     72|  uint32_t LowestBitSet() const {
   91|     72|    return container_internal::TrailingZeros(mask_) >> Shift;
   92|     72|  }
_ZN4absl12lts_2026052618container_internal13TrailingZerosIjEEjT_:
   63|     72|uint32_t TrailingZeros(T x) {
   64|     72|  ABSL_ASSUME(x != 0);
  ------------------
  |  |  271|     72|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
   65|     72|  return static_cast<uint32_t>(countr_zero(x));
   66|     72|}
_ZNK4absl12lts_2026052618container_internal18NonIterableBitMaskIjLi16ELi0EEcvbEv:
   87|     48|  explicit operator bool() const { return mask_ != 0; }
_ZN4absl12lts_2026052618container_internal13TrailingZerosImEEjT_:
   63|     12|uint32_t TrailingZeros(T x) {
   64|     12|  ABSL_ASSUME(x != 0);
  ------------------
  |  |  271|     12|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
   65|     12|  return static_cast<uint32_t>(countr_zero(x));
   66|     12|}
_ZN4absl12lts_2026052618container_internal7BitMaskIjLi16ELi0ELb0EEC2Ej:
  133|     96|  explicit BitMask(T mask) : Base(mask) {
  134|     96|    if (Shift == 3 && !NullifyBitsOnIteration) {
  ------------------
  |  Branch (134:9): [Folded, False: 96]
  |  Branch (134:23): [True: 0, Folded]
  ------------------
  135|       |      ABSL_SWISSTABLE_ASSERT(this->mask_ == (this->mask_ & kMsbs8Bytes));
  ------------------
  |  |   58|      0|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  136|      0|    }
  137|     96|  }
_ZN4absl12lts_2026052618container_internal18NonIterableBitMaskIjLi16ELi0EEC2Ej:
   85|    144|  explicit NonIterableBitMask(T mask) : mask_(mask) {}

_ZNK4absl12lts_2026052618container_internal20HashtablezInfoHandle9IsSampledEv:
  204|     10|  inline bool IsSampled() const { return false; }
_ZN4absl12lts_2026052618container_internal20HashtablezInfoHandle20RecordStorageChangedEmm:
  205|      2|  inline void RecordStorageChanged(size_t /*size*/, size_t /*capacity*/) {}
_ZN4absl12lts_2026052618container_internal20HashtablezInfoHandle16RecordInsertMissEmm:
  210|     40|                               size_t /*distance_from_desired*/) {}
_ZN4absl12lts_2026052618container_internal21ShouldSampleNextTableEv:
  226|      2|inline bool ShouldSampleNextTable() {
  227|       |#if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE)
  228|       |  if (ABSL_PREDICT_TRUE(--global_next_sample.next_sample > 0)) {
  229|       |    return false;
  230|       |  }
  231|       |  return true;
  232|       |#else
  233|      2|  return false;
  234|      2|#endif  // ABSL_INTERNAL_HASHTABLEZ_SAMPLE
  235|      2|}

_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE21GetSizeAndIsAllocatedEv:
  365|  6.58k|  SizeType<A>& GetSizeAndIsAllocated() { return metadata_.template get<1>(); }
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE21DeallocateIfAllocatedEv:
  521|  3.29k|  void DeallocateIfAllocated() {
  522|  3.29k|    if (GetIsAllocated()) {
  ------------------
  |  Branch (522:9): [True: 0, False: 3.29k]
  ------------------
  523|      0|      MallocAdapter<A>::Deallocate(GetAllocator(), GetAllocatedData(),
  524|      0|                                   GetAllocatedCapacity());
  525|      0|    }
  526|  3.29k|  }
_ZNK4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE14GetIsAllocatedEv:
  373|  6.58k|  bool GetIsAllocated() const { return GetSizeAndIsAllocated() & 1; }
_ZNK4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE21GetSizeAndIsAllocatedEv:
  367|  9.87k|  const SizeType<A>& GetSizeAndIsAllocated() const {
  368|  9.87k|    return metadata_.template get<1>();
  369|  9.87k|  }
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE12GetAllocatorEv:
  420|  3.29k|  A& GetAllocator() { return metadata_.template get<0>(); }
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE14GetInlinedDataEv:
  397|  3.29k|  ABSL_ATTRIBUTE_NO_SANITIZE_CFI Pointer<A> GetInlinedData() {
  398|  3.29k|    return reinterpret_cast<Pointer<A>>(data_.inlined.inlined_data);
  399|  3.29k|  }
_ZNK4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE7GetSizeEv:
  371|  3.29k|  SizeType<A> GetSize() const { return GetSizeAndIsAllocated() >> 1; }
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEED2Ev:
  343|  3.29k|  ~Storage() {
  344|       |    // Fast path: if we are empty and not allocated, there's nothing to do.
  345|  3.29k|    if (GetSizeAndIsAllocated() == 0) {
  ------------------
  |  Branch (345:9): [True: 0, False: 3.29k]
  ------------------
  346|      0|      return;
  347|      0|    }
  348|       |
  349|       |    // Fast path: if no destructors need to be run and we know the allocator
  350|       |    // doesn't do anything fancy, then all we need to do is deallocate (and
  351|       |    // maybe not even that).
  352|  3.29k|    if (std::is_trivially_destructible<ValueType<A>>::value &&
  ------------------
  |  Branch (352:9): [True: 0, Folded]
  ------------------
  353|  3.29k|        std::is_same<A, std::allocator<ValueType<A>>>::value) {
  ------------------
  |  Branch (353:9): [True: 0, Folded]
  ------------------
  354|  3.29k|      DeallocateIfAllocated();
  355|  3.29k|      return;
  356|  3.29k|    }
  357|       |
  358|      0|    DestroyContents();
  359|      0|  }
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEEC2Ev:
  338|  3.29k|  Storage() : metadata_(A(), /* size and is_allocated */ 0u) {}
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE11EmplaceBackIJRKS3_EEERS3_DpOT_:
  817|  3.29k|auto Storage<T, N, A>::EmplaceBack(Args&&... args) -> Reference<A> {
  818|  3.29k|  StorageView<A> storage_view = MakeStorageView();
  819|  3.29k|  const SizeType<A> n = storage_view.size;
  820|  3.29k|  if (ABSL_PREDICT_TRUE(n != storage_view.capacity)) {
  ------------------
  |  |  191|  3.29k|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 3.29k, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 3.29k]
  |  |  |  Branch (191:57): [True: 3.29k, False: 0]
  |  |  ------------------
  ------------------
  821|       |    // Fast path; new element fits.
  822|  3.29k|    Pointer<A> last_ptr = storage_view.data + n;
  823|  3.29k|    AllocatorTraits<A>::construct(GetAllocator(), last_ptr,
  824|  3.29k|                                  std::forward<Args>(args)...);
  825|  3.29k|    AddSize(1);
  826|  3.29k|    return *last_ptr;
  827|  3.29k|  }
  828|       |  // TODO(b/173712035): Annotate with musttail attribute to prevent regression.
  829|      0|  return EmplaceBackSlow(std::forward<Args>(args)...);
  830|  3.29k|}
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE15MakeStorageViewEv:
  413|  3.29k|  StorageView<A> MakeStorageView() {
  414|  3.29k|    return GetIsAllocated() ? StorageView<A>{GetAllocatedData(), GetSize(),
  ------------------
  |  Branch (414:12): [True: 0, False: 3.29k]
  ------------------
  415|      0|                                             GetAllocatedCapacity()}
  416|  3.29k|                            : StorageView<A>{GetInlinedData(), GetSize(),
  417|  3.29k|                                             GetInlinedCapacity()};
  418|  3.29k|  }
_ZNK4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE18GetInlinedCapacityEv:
  409|  3.29k|  SizeType<A> GetInlinedCapacity() const {
  410|  3.29k|    return static_cast<SizeType<A>>(kOptimalInlinedSize);
  411|  3.29k|  }
_ZN4absl12lts_2026052623inlined_vector_internal7StorageINS0_14SourceLocationELm1ENSt3__19allocatorIS3_EEE7AddSizeEm:
  475|  3.29k|  void AddSize(SizeType<A> count) {
  476|  3.29k|    GetSizeAndIsAllocated() += count << static_cast<SizeType<A>>(1);
  477|  3.29k|  }

_ZN4absl12lts_2026052618container_internal12raw_hash_mapINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEEC2Ev:
  107|      2|  raw_hash_map() {}

_ZN4absl12lts_2026052618container_internal17NextHashTableSeedEv:
  138|      2|uint16_t NextHashTableSeed() {
  139|      2|  static_assert(PerTableSeed::kBitCount <= 16);
  140|      2|  thread_local uint16_t seed =
  141|      2|      static_cast<uint16_t>(reinterpret_cast<uintptr_t>(&seed));
  142|      2|  seed += uint16_t{0xad53};
  143|      2|  return seed;
  144|      2|}
_ZN4absl12lts_2026052618container_internal17ClearBackingArrayERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEPvb:
  670|      2|                       bool reuse) {
  671|      2|  ABSL_SWISSTABLE_ASSERT(c.capacity() > MaxSmallCapacity());
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  672|      2|  if (reuse) {
  ------------------
  |  Branch (672:7): [True: 2, False: 0]
  ------------------
  673|      2|    c.set_size_to_zero();
  674|      2|    ResetCtrl(c, policy.slot_size);
  675|      2|    ResetGrowthLeft(c);
  676|      2|    c.infoz().RecordStorageChanged(0, c.capacity());
  677|      2|  } else {
  678|      0|    ClearBackingArrayNoReuse(c, policy, alloc);
  679|      0|  }
  680|      2|}
_ZN4absl12lts_2026052618container_internal24PrepareInsertSmallNonSooERNS1_12CommonFieldsERKNS1_15PolicyFunctionsENS0_11FunctionRefIFmmEEE:
 1541|      4|    absl::FunctionRef<size_t(size_t)> get_hash) {
 1542|      4|  ABSL_SWISSTABLE_ASSERT(common.is_small());
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1543|      4|  ABSL_SWISSTABLE_ASSERT(!policy.soo_enabled);
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1544|      4|  if (common.capacity() == 1) {
  ------------------
  |  Branch (1544:7): [True: 2, False: 2]
  ------------------
 1545|      2|    if (common.empty()) {
  ------------------
  |  Branch (1545:9): [True: 0, False: 2]
  ------------------
 1546|      0|      IncrementSmallSizeNonSoo(common, policy);
 1547|      0|      if (common.has_infoz()) {
  ------------------
  |  Branch (1547:11): [True: 0, False: 0]
  ------------------
 1548|      0|        common.infoz().RecordInsertMiss(get_hash(common.seed().seed()),
 1549|      0|                                        /*distance_from_desired=*/0);
 1550|      0|      }
 1551|      0|      return {SooControl(), common.slot_array()};
 1552|      2|    } else {
 1553|      2|      return Grow1To3AndPrepareInsert(common, policy, get_hash);
 1554|      2|    }
 1555|      2|  }
 1556|       |
 1557|       |  // Growing from 0 to 1 capacity.
 1558|      2|  ABSL_SWISSTABLE_ASSERT(common.capacity() == 0);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1559|      2|  constexpr size_t kNewCapacity = 1;
 1560|       |
 1561|      2|  common.set_capacity(kNewCapacity);
 1562|      2|  HashtablezInfoHandle infoz;
 1563|      2|  const bool should_sample =
 1564|      2|      policy.is_hashtablez_eligible && ShouldSampleNextTable();
  ------------------
  |  Branch (1564:7): [True: 2, False: 0]
  |  Branch (1564:40): [True: 0, False: 2]
  ------------------
 1565|      2|  if (ABSL_PREDICT_FALSE(should_sample)) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 1566|      0|    infoz = ForcedTrySample(policy.slot_size, policy.key_size,
 1567|      0|                            policy.value_size, policy.soo_capacity());
 1568|      0|  }
 1569|      2|  const bool has_infoz = infoz.IsSampled();
 1570|      2|  void* alloc = policy.get_char_alloc(common);
 1571|       |
 1572|      2|  const auto [new_ctrl, new_slots] =
 1573|      2|      AllocBackingArray(common, policy, kNewCapacity, has_infoz, alloc);
 1574|      2|  common.set_control(new_ctrl);
 1575|      2|  common.set_slots(new_slots);
 1576|       |
 1577|      2|  static_assert(NextCapacity(0) == 1);
 1578|      2|  PrepareInsertCommon(common);
 1579|       |
 1580|      2|  if (ABSL_PREDICT_FALSE(has_infoz)) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 1581|      0|    common.generate_new_seed(/*has_infoz=*/true);
 1582|      0|    ReportSingleGroupTableGrowthToInfoz(common, infoz,
 1583|      0|                                        get_hash(common.seed().seed()));
 1584|      0|  }
 1585|      2|  return {SooControl(), new_slots};
 1586|      4|}
_ZN4absl12lts_2026052618container_internal19GetRefForEmptyClassERNS1_12CommonFieldsE:
 1752|     12|void* GetRefForEmptyClass(CommonFields& common) {
 1753|       |  // Empty base optimization typically make the empty base class address to be
 1754|       |  // the same as the first address of the derived class object.
 1755|       |  // But we generally assume that for empty classes we can return any valid
 1756|       |  // pointer.
 1757|     12|  return &common;
 1758|     12|}
_ZN4absl12lts_2026052618container_internal18PrepareInsertLargeERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEmNS1_18NonIterableBitMaskIjLi16ELi0EEENS1_8FindInfoE:
 2012|     46|                          FindInfo target_group) {
 2013|       |  // NOLINTNEXTLINE(misc-static-assert)
 2014|       |  ABSL_SWISSTABLE_ASSERT(!SwisstableGenerationsEnabled());
  ------------------
  |  |   62|     46|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 2015|     46|  return PrepareInsertLargeImpl(common, policy, hash, mask_empty, target_group);
 2016|     46|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_119Resize1To3NewOffsetEmNS1_16PerTableSeedImplIhEE:
  107|      2|size_t Resize1To3NewOffset(size_t hash, PerTableSeed seed) {
  108|       |  // After resize from capacity 1 to 3, we always have exactly the slot with
  109|       |  // index 1 occupied, so we need to insert either at index 0 or index 2.
  110|      2|  static_assert(SooSlotIndex() == 1);
  111|      2|  return SingleGroupTableH1(hash, seed) & 2;
  112|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_118SingleGroupTableH1EmNS1_16PerTableSeedImplIhEE:
  102|      6|size_t SingleGroupTableH1(size_t hash, PerTableSeed seed) {
  103|      6|  return hash ^ seed.seed();
  104|      6|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_111SlotAddressEPvmm:
  116|      2|inline void* SlotAddress(void* slot_array, size_t slot, size_t slot_size) {
  117|      2|  return static_cast<void*>(static_cast<char*>(slot_array) +
  118|      2|                            (slot * slot_size));
  119|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_119PrepareInsertCommonERNS1_12CommonFieldsE:
  335|     50|void PrepareInsertCommon(CommonFields& common) {
  336|     50|  common.increment_size();
  337|     50|  common.maybe_increment_generation_on_insert();
  338|     50|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_135InitializeThreeElementsControlBytesEhhmPNS1_6ctrl_tE:
  557|      2|    h2_t orig_h2, h2_t new_h2, size_t new_offset, ctrl_t* new_ctrl) {
  558|      2|  static constexpr size_t kNewCapacity = NextCapacity(SooCapacity());
  559|      2|  static_assert(kNewCapacity == 3);
  560|      2|  static_assert(is_single_group(kNewCapacity));
  561|      2|  static_assert(SooSlotIndex() == 1);
  562|      2|  ABSL_SWISSTABLE_ASSERT(new_offset == 0 || new_offset == 2);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  563|       |
  564|      2|  static constexpr uint64_t kEmptyXorSentinel =
  565|      2|      static_cast<uint8_t>(ctrl_t::kEmpty) ^
  566|      2|      static_cast<uint8_t>(ctrl_t::kSentinel);
  567|      2|  static constexpr uint64_t kEmpty64 = static_cast<uint8_t>(ctrl_t::kEmpty);
  568|      2|  static constexpr size_t kMirroredSooSlotIndex =
  569|      2|      SooSlotIndex() + kNewCapacity + 1;
  570|       |  // The first 8 bytes, where SOO slot original and mirrored positions are
  571|       |  // replaced with 0.
  572|       |  // Result will look like: E0ESE0EE
  573|      2|  static constexpr uint64_t kFirstCtrlBytesWithZeroes =
  574|      2|      k8EmptyBytes ^ (kEmpty64 << (8 * SooSlotIndex())) ^
  575|      2|      (kEmptyXorSentinel << (8 * kNewCapacity)) ^
  576|      2|      (kEmpty64 << (8 * kMirroredSooSlotIndex));
  577|       |
  578|      2|  const uint64_t soo_h2 = static_cast<uint64_t>(orig_h2);
  579|      2|  const uint64_t new_h2_xor_empty =
  580|      2|      static_cast<uint64_t>(new_h2 ^ static_cast<uint8_t>(ctrl_t::kEmpty));
  581|       |  // Fill the original and mirrored bytes for SOO slot.
  582|       |  // Result will look like:
  583|       |  // EHESEHEE
  584|       |  // Where H = soo_h2, E = kEmpty, S = kSentinel.
  585|      2|  uint64_t first_ctrl_bytes =
  586|      2|      ((soo_h2 << (8 * SooSlotIndex())) | kFirstCtrlBytesWithZeroes) |
  587|      2|      (soo_h2 << (8 * kMirroredSooSlotIndex));
  588|       |  // Replace original and mirrored empty bytes for the new position.
  589|       |  // Result for new_offset 0 will look like:
  590|       |  // NHESNHEE
  591|       |  // Where H = soo_h2, N = H2(new_hash), E = kEmpty, S = kSentinel.
  592|       |  // Result for new_offset 2 will look like:
  593|       |  // EHNSEHNE
  594|      2|  first_ctrl_bytes ^= (new_h2_xor_empty << (8 * new_offset));
  595|      2|  size_t new_mirrored_offset = new_offset + kNewCapacity + 1;
  596|      2|  first_ctrl_bytes ^= (new_h2_xor_empty << (8 * new_mirrored_offset));
  597|       |
  598|       |  // Fill last bytes with kEmpty.
  599|      2|  std::memset(new_ctrl + kNewCapacity, static_cast<int8_t>(ctrl_t::kEmpty),
  600|      2|              Group::kWidth);
  601|       |  // Overwrite the first 8 bytes with first_ctrl_bytes.
  602|      2|  absl::little_endian::Store64(new_ctrl, first_ctrl_bytes);
  603|       |
  604|       |  // Example for group size 16:
  605|       |  // new_ctrl after 1st memset =      ???EEEEEEEEEEEEEEEE
  606|       |  // new_offset 0:
  607|       |  // new_ctrl after 2nd store  =      NHESNHEEEEEEEEEEEEE
  608|       |  // new_offset 2:
  609|       |  // new_ctrl after 2nd store  =      EHNSEHNEEEEEEEEEEEE
  610|       |
  611|       |  // Example for group size 8:
  612|       |  // new_ctrl after 1st memset =      ???EEEEEEEE
  613|       |  // new_offset 0:
  614|       |  // new_ctrl after 2nd store  =      NHESNHEEEEE
  615|       |  // new_offset 2:
  616|       |  // new_ctrl after 2nd store  =      EHNSEHNEEEE
  617|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_17SetCtrlERKNS1_12CommonFieldsEmNS1_6ctrl_tEm:
  357|     40|                    size_t slot_size) {
  358|       |  ABSL_SWISSTABLE_ASSERT(!c.is_small());
  ------------------
  |  |   62|     40|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  359|     40|  DoSanitizeOnSetCtrl(c, i, h, slot_size);
  360|     40|  ctrl_t* ctrl = c.control();
  361|     40|  ctrl[i] = h;
  362|     40|  ctrl[((i - NumClonedBytes()) & c.capacity()) +
  363|     40|       (NumClonedBytes() & c.capacity())] = h;
  364|     40|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_119DoSanitizeOnSetCtrlERKNS1_12CommonFieldsEmNS1_6ctrl_tEm:
  342|     46|                                size_t slot_size) {
  343|     46|  ABSL_SWISSTABLE_ASSERT(i < c.capacity());
  ------------------
  |  |   62|     46|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  344|     46|  auto* slot_i = static_cast<const char*>(c.slot_array()) + i * slot_size;
  345|     46|  if (IsFull(h)) {
  ------------------
  |  Branch (345:7): [True: 46, False: 0]
  ------------------
  346|     46|    SanitizerUnpoisonMemoryRegion(slot_i, slot_size);
  347|     46|  } else {
  348|      0|    SanitizerPoisonMemoryRegion(slot_i, slot_size);
  349|      0|  }
  350|     46|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_119SetCtrlInLargeTableERKNS1_12CommonFieldsEmNS1_6ctrl_tEm:
  390|      2|                                size_t slot_size) {
  391|       |  ABSL_SWISSTABLE_ASSERT(c.capacity() >= Group::kWidth - 1);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  392|      2|  DoSanitizeOnSetCtrl(c, i, h, slot_size);
  393|      2|  ctrl_t* ctrl = c.control();
  394|      2|  ctrl[i] = h;
  395|      2|  ctrl[((i - NumClonedBytes()) & c.capacity()) + NumClonedBytes()] = h;
  396|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_19ResetCtrlERNS1_12CommonFieldsEm:
  532|      2|void ResetCtrl(CommonFields& common, size_t slot_size) {
  533|      2|  const size_t capacity = common.capacity();
  534|      2|  ctrl_t* ctrl = common.control();
  535|      2|  static constexpr size_t kTwoGroupCapacity = 2 * Group::kWidth - 1;
  536|      2|  if (ABSL_PREDICT_TRUE(capacity <= kTwoGroupCapacity)) {
  ------------------
  |  |  191|      2|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 2, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 2]
  |  |  |  Branch (191:57): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  537|      2|    if (IsSmallCapacity(capacity)) return;
  ------------------
  |  Branch (537:9): [True: 0, False: 2]
  ------------------
  538|      2|    std::memset(ctrl, static_cast<int8_t>(ctrl_t::kEmpty), Group::kWidth);
  539|      2|    std::memset(ctrl + capacity, static_cast<int8_t>(ctrl_t::kEmpty),
  540|      2|                Group::kWidth);
  541|      2|    if (capacity == kTwoGroupCapacity) {
  ------------------
  |  Branch (541:9): [True: 2, False: 0]
  ------------------
  542|      2|      std::memset(ctrl + Group::kWidth, static_cast<int8_t>(ctrl_t::kEmpty),
  543|      2|                  Group::kWidth);
  544|      2|    }
  545|      2|  } else {
  546|      0|    std::memset(ctrl, static_cast<int8_t>(ctrl_t::kEmpty),
  547|      0|                capacity + 1 + NumClonedBytes());
  548|      0|  }
  549|      2|  ctrl[capacity] = ctrl_t::kSentinel;
  550|      2|  SanitizerPoisonMemoryRegion(common.slot_array(), slot_size * capacity);
  551|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_115ResetGrowthLeftERNS1_12CommonFieldsE:
  306|      2|void ResetGrowthLeft(CommonFields& common) {
  307|      2|  ResetGrowthLeft(common.growth_info(), common.capacity(), common.size());
  308|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_115ResetGrowthLeftERNS1_10GrowthInfoEmm:
  302|      8|void ResetGrowthLeft(GrowthInfo& growth_info, size_t capacity, size_t size) {
  303|      8|  growth_info.InitGrowthLeftNoDeleted(CapacityToGrowth(capacity) - size);
  304|      8|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_117AllocBackingArrayERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEmbPv:
  776|     10|                                   void* alloc) {
  777|     10|  RawHashSetLayout layout(new_capacity, policy.slot_size, policy.slot_align,
  778|     10|                          has_infoz);
  779|       |  // Perform a direct call in the common case to allow for profile-guided
  780|       |  // heap optimization (PGHO) to understand which allocation function is used.
  781|     10|  constexpr size_t kDefaultAlignment = BackingArrayAlignment(alignof(size_t));
  782|     10|  char* mem = static_cast<char*>(
  783|     10|      ABSL_PREDICT_TRUE(
  ------------------
  |  |  191|     10|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 10, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 10]
  |  |  |  Branch (191:57): [True: 10, False: 0]
  |  |  ------------------
  ------------------
  784|     10|          policy.alloc ==
  785|     10|          (&AllocateBackingArray<kDefaultAlignment, std::allocator<char>>))
  786|     10|          ? AllocateBackingArray<kDefaultAlignment, std::allocator<char>>(
  787|     10|                alloc, layout.alloc_size())
  788|     10|          : policy.alloc(alloc, layout.alloc_size()));
  789|     10|  const GenerationType old_generation = common.generation();
  790|     10|  common.set_generation_ptr(
  791|     10|      reinterpret_cast<GenerationType*>(mem + layout.generation_offset()));
  792|     10|  common.set_generation(NextGeneration(old_generation));
  793|       |
  794|     10|  return {reinterpret_cast<ctrl_t*>(mem + layout.control_offset()),
  795|     10|          mem + layout.slot_offset()};
  796|     10|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_124Grow1To3AndPrepareInsertERNS1_12CommonFieldsERKNS1_15PolicyFunctionsENS0_11FunctionRefIFmmEEE:
 1415|      2|    absl::FunctionRef<size_t(size_t)> get_hash) {
 1416|       |  // TODO(b/413062340): Refactor to reuse more code with
 1417|       |  // GrowSooTableToNextCapacityAndPrepareInsert.
 1418|      2|  ABSL_SWISSTABLE_ASSERT(common.capacity() == 1);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1419|      2|  ABSL_SWISSTABLE_ASSERT(!common.empty());
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1420|      2|  ABSL_SWISSTABLE_ASSERT(!policy.soo_enabled);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1421|      2|  constexpr size_t kOldCapacity = 1;
 1422|      2|  constexpr size_t kNewCapacity = NextCapacity(kOldCapacity);
 1423|      2|  ctrl_t* old_ctrl = common.control();
 1424|      2|  void* old_slots = common.slot_array();
 1425|       |
 1426|      2|  const size_t slot_size = policy.slot_size;
 1427|      2|  const size_t slot_align = policy.slot_align;
 1428|      2|  void* alloc = policy.get_char_alloc(common);
 1429|      2|  HashtablezInfoHandle infoz = common.infoz();
 1430|      2|  const bool has_infoz = infoz.IsSampled();
 1431|      2|  common.set_capacity(kNewCapacity);
 1432|       |
 1433|      2|  const auto [new_ctrl, new_slots] =
 1434|      2|      AllocBackingArray(common, policy, kNewCapacity, has_infoz, alloc);
 1435|      2|  common.set_control(new_ctrl);
 1436|      2|  common.set_slots(new_slots);
 1437|      2|  SanitizerPoisonMemoryRegion(new_slots, kNewCapacity * slot_size);
 1438|       |
 1439|      2|  if (ABSL_PREDICT_TRUE(!has_infoz)) {
  ------------------
  |  |  191|      2|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 2, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 2]
  |  |  |  Branch (191:57): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 1440|       |    // When we're sampled, we already have a seed.
 1441|      2|    common.generate_new_seed(/*has_infoz=*/false);
 1442|      2|  }
 1443|      2|  const size_t new_hash = get_hash(common.seed().seed());
 1444|      2|  h2_t new_h2 = H2(new_hash);
 1445|      2|  size_t orig_hash =
 1446|      2|      policy.hash_slot(policy.hash_fn(common), old_slots, common.seed().seed());
 1447|      2|  size_t offset = Resize1To3NewOffset(new_hash, common.seed());
 1448|      2|  InitializeThreeElementsControlBytes(H2(orig_hash), new_h2, offset, new_ctrl);
 1449|       |
 1450|      2|  void* old_element_target = NextSlot(new_slots, slot_size);
 1451|      2|  SanitizerUnpoisonMemoryRegion(old_element_target, slot_size);
 1452|      2|  policy.transfer_n(&common, old_element_target, old_slots, 1);
 1453|       |
 1454|      2|  void* new_element_target_slot = SlotAddress(new_slots, offset, slot_size);
 1455|      2|  SanitizerUnpoisonMemoryRegion(new_element_target_slot, slot_size);
 1456|       |
 1457|      2|  policy.dealloc(alloc, kOldCapacity, old_ctrl, slot_size, slot_align,
 1458|      2|                 has_infoz);
 1459|      2|  PrepareInsertCommon(common);
 1460|      2|  ABSL_SWISSTABLE_ASSERT(common.size() == 2);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1461|      2|  GetGrowthInfoFromControl(new_ctrl).InitGrowthLeftNoDeleted(kNewCapacity - 2);
 1462|       |
 1463|      2|  if (ABSL_PREDICT_FALSE(has_infoz)) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 1464|      0|    ReportSingleGroupTableGrowthToInfoz(common, infoz, new_hash);
 1465|      0|  }
 1466|      2|  return {new_ctrl + offset, new_element_target_slot};
 1467|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_18NextSlotEPvmm:
  123|      6|inline void* NextSlot(void* slot, size_t slot_size, size_t i = 1) {
  124|      6|  return reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(slot) +
  125|      6|                                 slot_size * i);
  126|      6|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_125SetCtrlInSingleGroupTableERKNS1_12CommonFieldsEmhm:
  383|      4|                                      size_t slot_size) {
  384|      4|  SetCtrlInSingleGroupTable(c, i, static_cast<ctrl_t>(h), slot_size);
  385|      4|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_125SetCtrlInSingleGroupTableERKNS1_12CommonFieldsEmNS1_6ctrl_tEm:
  373|      4|                                      size_t slot_size) {
  374|      4|  ABSL_SWISSTABLE_ASSERT(!c.is_small());
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  375|       |  ABSL_SWISSTABLE_ASSERT(is_single_group(c.capacity()));
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  376|      4|  DoSanitizeOnSetCtrl(c, i, h, slot_size);
  377|      4|  ctrl_t* ctrl = c.control();
  378|      4|  ctrl[i] = h;
  379|      4|  ctrl[i + c.capacity() + 1] = h;
  380|      4|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_17SetCtrlERKNS1_12CommonFieldsEmhm:
  366|     40|inline void SetCtrl(const CommonFields& c, size_t i, h2_t h, size_t slot_size) {
  367|     40|  SetCtrl(c, i, static_cast<ctrl_t>(h), slot_size);
  368|     40|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_122PrepareInsertLargeImplERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEmNS1_18NonIterableBitMaskIjLi16ELi0EEENS1_8FindInfoE:
 1990|     46|                              FindInfo target_group) {
 1991|     46|  ABSL_SWISSTABLE_ASSERT(!common.is_small());
  ------------------
  |  |   62|     46|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1992|     46|  const GrowthInfo growth_info = common.growth_info();
 1993|       |  // When there are no deleted slots in the table
 1994|       |  // and growth_left is positive, we can insert at the first
 1995|       |  // empty slot in the probe sequence (target).
 1996|     46|  if (ABSL_PREDICT_FALSE(!growth_info.HasNoDeletedAndGrowthLeft())) {
  ------------------
  |  |  190|     46|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 6, False: 40]
  |  |  |  Branch (190:49): [Folded, False: 46]
  |  |  |  Branch (190:58): [True: 6, False: 40]
  |  |  ------------------
  ------------------
 1997|      6|    return PrepareInsertLargeSlow(common, policy, hash);
 1998|      6|  }
 1999|     40|  PrepareInsertCommon(common);
 2000|     40|  common.growth_info().OverwriteEmptyAsFull();
 2001|     40|  target_group.offset += mask_empty.LowestBitSet();
 2002|     40|  target_group.offset &= common.capacity();
 2003|     40|  SetCtrl(common, target_group.offset, H2(hash), policy.slot_size);
 2004|     40|  common.infoz().RecordInsertMiss(hash, target_group.probe_length);
 2005|     40|  return target_group.offset;
 2006|     46|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_122PrepareInsertLargeSlowERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEm:
 1653|      6|                              size_t hash) {
 1654|      6|  const GrowthInfo growth_info = common.growth_info();
 1655|      6|  ABSL_SWISSTABLE_ASSERT(!growth_info.HasNoDeletedAndGrowthLeft());
  ------------------
  |  |   62|      6|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1656|      6|  if (ABSL_PREDICT_TRUE(growth_info.HasNoGrowthLeftAndNoDeleted())) {
  ------------------
  |  |  191|      6|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 6, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 6]
  |  |  |  Branch (191:57): [True: 6, False: 0]
  |  |  ------------------
  ------------------
 1657|       |    // Table without deleted slots (>95% cases) that needs to be resized.
 1658|      6|    ABSL_SWISSTABLE_ASSERT(growth_info.HasNoDeleted() &&
  ------------------
  |  |   62|      6|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1659|      6|                           growth_info.GetGrowthLeft() == 0);
 1660|      6|    return GrowToNextCapacityAndPrepareInsert(common, policy, hash);
 1661|      6|  }
 1662|      0|  if (ABSL_PREDICT_FALSE(growth_info.HasNoGrowthLeftAssumingMayHaveDeleted())) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1663|       |    // Table with deleted slots that needs to be rehashed or resized.
 1664|      0|    return RehashOrGrowToNextCapacityAndPrepareInsert(common, policy, hash);
 1665|      0|  }
 1666|       |  // Table with deleted slots that has space for the inserting element.
 1667|      0|  FindInfo target = find_first_non_full(common, hash);
 1668|      0|  PrepareInsertCommon(common);
 1669|      0|  common.growth_info().OverwriteControlAsFull(common.control()[target.offset]);
 1670|      0|  SetCtrlInLargeTable(common, target.offset, H2(hash), policy.slot_size);
 1671|      0|  common.infoz().RecordInsertMiss(hash, target.probe_length);
 1672|      0|  return target.offset;
 1673|      0|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_134GrowToNextCapacityAndPrepareInsertERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEm:
 1473|      6|    size_t new_hash) {
 1474|      6|  ABSL_SWISSTABLE_ASSERT(common.growth_left() == 0);
  ------------------
  |  |   62|      6|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1475|      6|  const size_t old_capacity = common.capacity();
 1476|      6|  ABSL_SWISSTABLE_ASSERT(old_capacity > policy.soo_capacity());
  ------------------
  |  |   62|      6|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1477|      6|  ABSL_SWISSTABLE_ASSERT(!IsSmallCapacity(old_capacity));
  ------------------
  |  |   62|      6|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1478|       |
 1479|      6|  const size_t new_capacity = NextCapacity(old_capacity);
 1480|      6|  ctrl_t* old_ctrl = common.control();
 1481|      6|  void* old_slots = common.slot_array();
 1482|       |
 1483|      6|  common.set_capacity(new_capacity);
 1484|      6|  const size_t slot_size = policy.slot_size;
 1485|      6|  const size_t slot_align = policy.slot_align;
 1486|      6|  void* alloc = policy.get_char_alloc(common);
 1487|      6|  HashtablezInfoHandle infoz = common.infoz();
 1488|      6|  const bool has_infoz = infoz.IsSampled();
 1489|       |
 1490|      6|  const auto [new_ctrl, new_slots] =
 1491|      6|      AllocBackingArray(common, policy, new_capacity, has_infoz, alloc);
 1492|      6|  common.set_control(new_ctrl);
 1493|      6|  common.set_slots(new_slots);
 1494|      6|  SanitizerPoisonMemoryRegion(new_slots, new_capacity * slot_size);
 1495|       |
 1496|      6|  h2_t new_h2 = H2(new_hash);
 1497|      6|  size_t total_probe_length = 0;
 1498|      6|  FindInfo find_info;
 1499|      6|  if (ABSL_PREDICT_TRUE(is_single_group(new_capacity))) {
  ------------------
  |  |  191|      6|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 4, False: 2]
  |  |  |  Branch (191:48): [Folded, False: 6]
  |  |  |  Branch (191:57): [True: 4, False: 2]
  |  |  ------------------
  ------------------
 1500|      4|    size_t offset;
 1501|      4|    GrowIntoSingleGroupShuffleControlBytes(old_ctrl, old_capacity, new_ctrl,
 1502|      4|                                           new_capacity);
 1503|       |    // We put the new element either at the beginning or at the end of the
 1504|       |    // table with approximately equal probability.
 1505|      4|    offset =
 1506|      4|        SingleGroupTableH1(new_hash, common.seed()) & 1 ? 0 : new_capacity - 1;
  ------------------
  |  Branch (1506:9): [True: 4, False: 0]
  ------------------
 1507|       |
 1508|      4|    ABSL_SWISSTABLE_ASSERT(IsEmpty(new_ctrl[offset]));
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1509|      4|    SetCtrlInSingleGroupTable(common, offset, new_h2, policy.slot_size);
 1510|      4|    find_info = FindInfo{offset, 0};
 1511|       |    // Single group tables have all slots full on resize. So we can transfer
 1512|       |    // all slots without checking the control bytes.
 1513|      4|    ABSL_SWISSTABLE_ASSERT(common.size() == old_capacity);
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1514|      4|    void* target = NextSlot(new_slots, slot_size);
 1515|      4|    SanitizerUnpoisonMemoryRegion(target, old_capacity * slot_size);
 1516|      4|    policy.transfer_n(&common, target, old_slots, old_capacity);
 1517|      4|  } else {
 1518|      2|    total_probe_length =
 1519|      2|        GrowToNextCapacityDispatch(common, policy, old_ctrl, old_slots);
 1520|      2|    find_info = find_first_non_full(common, new_hash);
 1521|      2|    SetCtrlInLargeTable(common, find_info.offset, new_h2, policy.slot_size);
 1522|      2|  }
 1523|      6|  ABSL_SWISSTABLE_ASSERT(old_capacity > policy.soo_capacity());
  ------------------
  |  |   62|      6|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1524|      6|  (*policy.dealloc)(alloc, old_capacity, old_ctrl, slot_size, slot_align,
 1525|      6|                    has_infoz);
 1526|      6|  PrepareInsertCommon(common);
 1527|      6|  ResetGrowthLeft(GetGrowthInfoFromControl(new_ctrl), new_capacity,
 1528|      6|                  common.size());
 1529|       |
 1530|      6|  if (ABSL_PREDICT_FALSE(has_infoz)) {
  ------------------
  |  |  190|      6|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 6]
  |  |  |  Branch (190:49): [Folded, False: 6]
  |  |  |  Branch (190:58): [True: 0, False: 6]
  |  |  ------------------
  ------------------
 1531|      0|    ReportGrowthToInfoz(common, infoz, new_hash, total_probe_length,
 1532|      0|                        find_info.probe_length);
 1533|      0|  }
 1534|      6|  return find_info.offset;
 1535|      6|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_138GrowIntoSingleGroupShuffleControlBytesEPNS1_6ctrl_tEmS4_m:
  957|      4|                                            size_t new_capacity) {
  958|      4|  ABSL_SWISSTABLE_ASSERT(is_single_group(new_capacity));
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  959|      4|  constexpr size_t kHalfWidth = Group::kWidth / 2;
  960|      4|  ABSL_ASSUME(old_capacity < kHalfWidth);
  ------------------
  |  |  271|      4|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
  961|      4|  ABSL_ASSUME(old_capacity > 0);
  ------------------
  |  |  271|      4|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
  962|      4|  static_assert(Group::kWidth == 8 || Group::kWidth == 16,
  963|      4|                "Group size is not supported.");
  964|       |
  965|       |  // NOTE: operations are done with compile time known size = 8.
  966|       |  // Compiler optimizes that into single ASM operation.
  967|       |
  968|       |  // Load the bytes from old_capacity. This contains
  969|       |  // - the sentinel byte
  970|       |  // - all the old control bytes
  971|       |  // - the rest is filled with kEmpty bytes
  972|       |  // Example:
  973|       |  // old_ctrl =     012S012EEEEEEEEE...
  974|       |  // copied_bytes = S012EEEE
  975|      4|  uint64_t copied_bytes = absl::little_endian::Load64(old_ctrl + old_capacity);
  976|       |
  977|       |  // We change the sentinel byte to kEmpty before storing to both the start of
  978|       |  // the new_ctrl, and past the end of the new_ctrl later for the new cloned
  979|       |  // bytes. Note that this is faster than setting the sentinel byte to kEmpty
  980|       |  // after the copy directly in new_ctrl because we are limited on store
  981|       |  // bandwidth.
  982|      4|  static constexpr uint64_t kEmptyXorSentinel =
  983|      4|      static_cast<uint8_t>(ctrl_t::kEmpty) ^
  984|      4|      static_cast<uint8_t>(ctrl_t::kSentinel);
  985|       |
  986|       |  // Replace the first byte kSentinel with kEmpty.
  987|       |  // Resulting bytes will be shifted by one byte old control blocks.
  988|       |  // Example:
  989|       |  // old_ctrl = 012S012EEEEEEEEE...
  990|       |  // before =   S012EEEE
  991|       |  // after  =   E012EEEE
  992|      4|  copied_bytes ^= kEmptyXorSentinel;
  993|       |
  994|      4|  if (Group::kWidth == 8) {
  ------------------
  |  Branch (994:7): [Folded, False: 4]
  ------------------
  995|       |    // With group size 8, we can grow with two write operations.
  996|      0|    ABSL_SWISSTABLE_ASSERT(old_capacity < 8 &&
  ------------------
  |  |   62|      0|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  997|      0|                           "old_capacity is too large for group size 8");
  998|      0|    absl::little_endian::Store64(new_ctrl, copied_bytes);
  999|       |
 1000|      0|    static constexpr uint64_t kSentinal64 =
 1001|      0|        static_cast<uint8_t>(ctrl_t::kSentinel);
 1002|       |
 1003|       |    // Prepend kSentinel byte to the beginning of copied_bytes.
 1004|       |    // We have maximum 3 non-empty bytes at the beginning of copied_bytes for
 1005|       |    // group size 8.
 1006|       |    // Example:
 1007|       |    // old_ctrl = 012S012EEEE
 1008|       |    // before =   E012EEEE
 1009|       |    // after  =   SE012EEE
 1010|      0|    copied_bytes = (copied_bytes << 8) ^ kSentinal64;
 1011|      0|    absl::little_endian::Store64(new_ctrl + new_capacity, copied_bytes);
 1012|       |    // Example for capacity 3:
 1013|       |    // old_ctrl = 012S012EEEE
 1014|       |    // After the first store:
 1015|       |    //           >!
 1016|       |    // new_ctrl = E012EEEE???????
 1017|       |    // After the second store:
 1018|       |    //                  >!
 1019|       |    // new_ctrl = E012EEESE012EEE
 1020|      0|    return;
 1021|      0|  }
 1022|       |
 1023|      4|  ABSL_SWISSTABLE_ASSERT(Group::kWidth == 16);  // NOLINT(misc-static-assert)
  ------------------
  |  |   62|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1024|       |
 1025|       |  // Fill the second half of the main control bytes with kEmpty.
 1026|       |  // For small capacity that may write into mirrored control bytes.
 1027|       |  // It is fine as we will overwrite all the bytes later.
 1028|      4|  std::memset(new_ctrl + kHalfWidth, static_cast<int8_t>(ctrl_t::kEmpty),
 1029|      4|              kHalfWidth);
 1030|       |  // Fill the second half of the mirrored control bytes with kEmpty.
 1031|      4|  std::memset(new_ctrl + new_capacity + kHalfWidth,
 1032|      4|              static_cast<int8_t>(ctrl_t::kEmpty), kHalfWidth);
 1033|       |  // Copy the first half of the non-mirrored control bytes.
 1034|      4|  absl::little_endian::Store64(new_ctrl, copied_bytes);
 1035|      4|  new_ctrl[new_capacity] = ctrl_t::kSentinel;
 1036|       |  // Copy the first half of the mirrored control bytes.
 1037|      4|  absl::little_endian::Store64(new_ctrl + new_capacity + 1, copied_bytes);
 1038|       |
 1039|       |  // Example for growth capacity 1->3:
 1040|       |  // old_ctrl =                  0S0EEEEEEEEEEEEEE
 1041|       |  // new_ctrl at the end =       E0ESE0EEEEEEEEEEEEE
 1042|       |  //                                    >!
 1043|       |  // new_ctrl after 1st memset = ????????EEEEEEEE???
 1044|       |  //                                       >!
 1045|       |  // new_ctrl after 2nd memset = ????????EEEEEEEEEEE
 1046|       |  //                            >!
 1047|       |  // new_ctrl after 1st store =  E0EEEEEEEEEEEEEEEEE
 1048|       |  // new_ctrl after kSentinel =  E0ESEEEEEEEEEEEEEEE
 1049|       |  //                                >!
 1050|       |  // new_ctrl after 2nd store =  E0ESE0EEEEEEEEEEEEE
 1051|       |
 1052|       |  // Example for growth capacity 3->7:
 1053|       |  // old_ctrl =                  012S012EEEEEEEEEEEE
 1054|       |  // new_ctrl at the end =       E012EEESE012EEEEEEEEEEE
 1055|       |  //                                    >!
 1056|       |  // new_ctrl after 1st memset = ????????EEEEEEEE???????
 1057|       |  //                                           >!
 1058|       |  // new_ctrl after 2nd memset = ????????EEEEEEEEEEEEEEE
 1059|       |  //                            >!
 1060|       |  // new_ctrl after 1st store =  E012EEEEEEEEEEEEEEEEEEE
 1061|       |  // new_ctrl after kSentinel =  E012EEESEEEEEEEEEEEEEEE
 1062|       |  //                                >!
 1063|       |  // new_ctrl after 2nd store =  E012EEESE012EEEEEEEEEEE
 1064|       |
 1065|       |  // Example for growth capacity 7->15:
 1066|       |  // old_ctrl =                  0123456S0123456EEEEEEEE
 1067|       |  // new_ctrl at the end =       E0123456EEEEEEESE0123456EEEEEEE
 1068|       |  //                                    >!
 1069|       |  // new_ctrl after 1st memset = ????????EEEEEEEE???????????????
 1070|       |  //                                                   >!
 1071|       |  // new_ctrl after 2nd memset = ????????EEEEEEEE???????EEEEEEEE
 1072|       |  //                            >!
 1073|       |  // new_ctrl after 1st store =  E0123456EEEEEEEE???????EEEEEEEE
 1074|       |  // new_ctrl after kSentinel =  E0123456EEEEEEES???????EEEEEEEE
 1075|       |  //                                            >!
 1076|       |  // new_ctrl after 2nd store =  E0123456EEEEEEESE0123456EEEEEEE
 1077|      4|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_126GrowToNextCapacityDispatchERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEPNS1_6ctrl_tEPv:
 1385|      2|                                  ctrl_t* old_ctrl, void* old_slots) {
 1386|      2|  const size_t new_capacity = common.capacity();
 1387|      2|  if (ABSL_PREDICT_TRUE(new_capacity <= kMaxLocalBufferNewCapacity)) {
  ------------------
  |  |  191|      2|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 2, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 2]
  |  |  |  Branch (191:57): [True: 2, False: 0]
  |  |  ------------------
  ------------------
 1388|      2|    return GrowToNextCapacityThatFitsInLocalBuffer(common, policy, old_ctrl,
 1389|      2|                                                   old_slots);
 1390|      2|  } else {
 1391|      0|    return GrowToNextCapacityOverflowLocalBuffer(common, policy, old_ctrl,
 1392|      0|                                                 old_slots);
 1393|      0|  }
 1394|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_139GrowToNextCapacityThatFitsInLocalBufferERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEPNS1_6ctrl_tEPv:
 1335|      2|    ctrl_t* old_ctrl, void* old_slots) {
 1336|       |  ABSL_SWISSTABLE_ASSERT(common.capacity() <= kMaxLocalBufferNewCapacity);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1337|      2|  return GrowToNextCapacity<
 1338|      2|      ProbedItemEncoder<ProbedItem4Bytes, /*kGuaranteedFitToBuffer=*/true>>(
 1339|      2|      common, policy, old_ctrl, old_slots);
 1340|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_118GrowToNextCapacityINS2_17ProbedItemEncoderINS1_14ProbedItemImplIjLm32EEELb1EEEEEmRNS1_12CommonFieldsERKNS1_15PolicyFunctionsEPNS1_6ctrl_tEPv:
 1316|      2|                          ctrl_t* old_ctrl, void* old_slots) {
 1317|      2|  using ProbedItem = typename Encoder::ProbedItem;
 1318|       |  ABSL_SWISSTABLE_ASSERT(common.capacity() <= ProbedItem::kMaxNewCapacity);
  ------------------
  |  |   62|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1319|      2|  Encoder encoder(old_ctrl);
 1320|      2|  policy.transfer_unprobed_elements_to_next_capacity(
 1321|      2|      common, old_ctrl, old_slots, &encoder,
 1322|      2|      [](void* probed_storage, h2_t h2, size_t source_offset, size_t h1) {
 1323|      2|        auto encoder_ptr = static_cast<Encoder*>(probed_storage);
 1324|      2|        encoder_ptr->EncodeItem(ProbedItem(h2, source_offset, h1));
 1325|      2|      });
 1326|      2|  InitializeMirroredControlBytes(common.control(), common.capacity());
 1327|      2|  return encoder.DecodeAndInsertToTable(common, policy, old_slots);
 1328|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_117ProbedItemEncoderINS1_14ProbedItemImplIjLm32EEELb1EEC2EPNS1_6ctrl_tE:
 1190|      2|  explicit ProbedItemEncoder(ctrl_t* control) : control_(control) {}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_130InitializeMirroredControlBytesEPNS1_6ctrl_tEm:
 1166|      2|void InitializeMirroredControlBytes(ctrl_t* new_ctrl, size_t new_capacity) {
 1167|      2|  std::memcpy(new_ctrl + new_capacity,
 1168|       |              // We own GrowthInfo just before control bytes. So it is ok
 1169|       |              // to read one byte from it.
 1170|      2|              new_ctrl - 1, Group::kWidth);
 1171|      2|  new_ctrl[new_capacity] = ctrl_t::kSentinel;
 1172|      2|}
raw_hash_set.cc:_ZNK4absl12lts_2026052618container_internal12_GLOBAL__N_117ProbedItemEncoderINS1_14ProbedItemImplIjLm32EEELb1EE22DecodeAndInsertToTableERNS1_12CommonFieldsERKNS1_15PolicyFunctionsEPv:
 1207|      2|                                void* old_slots) const {
 1208|      2|    if (pos_ == buffer_) {
  ------------------
  |  Branch (1208:9): [True: 2, False: 0]
  ------------------
 1209|      2|      return 0;
 1210|      2|    }
 1211|      0|    if constexpr (kGuaranteedFitToBuffer) {
 1212|      0|      return DecodeAndInsertImpl(common, policy, buffer_, pos_, old_slots);
 1213|      0|    }
 1214|      0|    size_t total_probe_length = DecodeAndInsertImpl(
 1215|      0|        common, policy, buffer_,
 1216|      0|        local_buffer_full_ ? buffer_ + kBufferSize : pos_, old_slots);
  ------------------
  |  Branch (1216:9): [True: 0, False: 0]
  ------------------
 1217|      0|    if (!local_buffer_full_) {
  ------------------
  |  Branch (1217:9): [True: 0, False: 0]
  ------------------
 1218|      0|      return total_probe_length;
 1219|      0|    }
 1220|      0|    total_probe_length +=
 1221|      0|        DecodeAndInsertToTableOverflow(common, policy, old_slots);
 1222|      0|    return total_probe_length;
 1223|      0|  }
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_127find_first_non_full_from_h1EPKNS1_6ctrl_tEmNS1_21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EEE:
  188|      2|                                     HashtableCapacity capacity) {
  189|      2|  auto seq = probe_h1(capacity, h1);
  190|      2|  if (IsEmptyOrDeleted(ctrl[seq.offset()])) {
  ------------------
  |  Branch (190:7): [True: 0, False: 2]
  ------------------
  191|      0|    return {seq.offset(), /*probe_length=*/0};
  192|      0|  }
  193|      2|  auto mask = probe_till_first_non_full_group(ctrl, seq, capacity.capacity());
  194|      2|  return {seq.offset(mask.LowestBitSet()), seq.index()};
  195|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_131probe_till_first_non_full_groupEPKNS1_6ctrl_tERNS1_9probe_seqILm16EEEm:
  175|      2|    [[maybe_unused]] size_t capacity) {
  176|      2|  while (true) {
  ------------------
  |  Branch (176:10): [True: 2, Folded]
  ------------------
  177|      2|    GroupFullEmptyOrDeleted g{ctrl + seq.offset()};
  178|      2|    auto mask = g.MaskEmptyOrDeleted();
  179|      2|    if (mask) {
  ------------------
  |  Branch (179:9): [True: 2, False: 0]
  ------------------
  180|      2|      return mask;
  181|      2|    }
  182|      0|    seq.next();
  183|       |    ABSL_SWISSTABLE_ASSERT(seq.index() <= capacity && "full table!");
  ------------------
  |  |   62|      0|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  184|      0|  }
  185|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_119find_first_non_fullERKNS1_12CommonFieldsEm:
  204|      2|FindInfo find_first_non_full(const CommonFields& common, size_t hash) {
  205|      2|  return find_first_non_full_from_h1(common.control(), H1(hash),
  206|      2|                                     common.capacity_impl());
  207|      2|}
raw_hash_set.cc:_ZN4absl12lts_2026052618container_internal12_GLOBAL__N_119SetCtrlInLargeTableERKNS1_12CommonFieldsEmhm:
  399|      2|                                size_t slot_size) {
  400|      2|  SetCtrlInLargeTable(c, i, static_cast<ctrl_t>(h), slot_size);
  401|      2|}

_ZN4absl12lts_2026052618container_internal34CommonFieldsGenerationInfoDisabled36maybe_increment_generation_on_insertEv:
  838|     50|  void maybe_increment_generation_on_insert() {}
_ZN4absl12lts_2026052618container_internal34CommonFieldsGenerationInfoDisabled19set_reserved_growthEm:
  842|      2|  void set_reserved_growth(size_t) {}
_ZN4absl12lts_2026052618container_internal34CommonFieldsGenerationInfoDisabled20set_reservation_sizeEm:
  844|      2|  void set_reservation_size(size_t) {}
_ZNK4absl12lts_2026052618container_internal34CommonFieldsGenerationInfoDisabled10generationEv:
  845|     10|  GenerationType generation() const { return 0; }
_ZN4absl12lts_2026052618container_internal34CommonFieldsGenerationInfoDisabled14set_generationEh:
  846|     10|  void set_generation(GenerationType) {}
_ZNK4absl12lts_2026052618container_internal34CommonFieldsGenerationInfoDisabled14generation_ptrEv:
  847|     54|  GenerationType* generation_ptr() const { return nullptr; }
_ZN4absl12lts_2026052618container_internal34CommonFieldsGenerationInfoDisabled18set_generation_ptrEPh:
  848|     10|  void set_generation_ptr(GenerationType*) {}
_ZN4absl12lts_2026052618container_internal37HashSetIteratorGenerationInfoDisabledC2EPKh:
  871|     54|  explicit HashSetIteratorGenerationInfoDisabled(const GenerationType*) {}
_ZNK4absl12lts_2026052618container_internal37HashSetIteratorGenerationInfoDisabled10generationEv:
  873|    204|  GenerationType generation() const { return 0; }
_ZNK4absl12lts_2026052618container_internal37HashSetIteratorGenerationInfoDisabled14generation_ptrEv:
  875|    308|  const GenerationType* generation_ptr() const { return nullptr; }
_ZN4absl12lts_2026052618container_internal10GrowthInfo23InitGrowthLeftNoDeletedEm:
  914|     10|  void InitGrowthLeftNoDeleted(size_t growth_left) {
  915|     10|    growth_left_info_ = growth_left;
  916|     10|  }
_ZN4absl12lts_2026052618container_internal10GrowthInfo20OverwriteEmptyAsFullEv:
  922|     40|  void OverwriteEmptyAsFull() {
  923|       |    ABSL_SWISSTABLE_ASSERT(GetGrowthLeft() > 0);
  ------------------
  |  |  256|     40|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  924|     40|    --growth_left_info_;
  925|     40|  }
_ZNK4absl12lts_2026052618container_internal10GrowthInfo25HasNoDeletedAndGrowthLeftEv:
  946|     46|  bool HasNoDeletedAndGrowthLeft() const {
  947|     46|    return static_cast<std::make_signed_t<size_t>>(growth_left_info_) > 0;
  948|     46|  }
_ZNK4absl12lts_2026052618container_internal10GrowthInfo27HasNoGrowthLeftAndNoDeletedEv:
  953|      6|  bool HasNoGrowthLeftAndNoDeleted() const { return growth_left_info_ == 0; }
_ZN4absl12lts_2026052618container_internal16RawHashSetLayoutC2Emmmb:
 1020|     18|            ControlOffset(has_infoz, HasGrowthInfoForCapacity(capacity))),
 1021|     18|        generation_offset_(control_offset_ + NumControlBytes(capacity)),
 1022|       |        slot_offset_(
 1023|     18|            AlignUpTo(generation_offset_ + NumGenerationBytes(), slot_align)),
 1024|     18|        alloc_size_(slot_offset_ + capacity * slot_size) {
 1025|     18|    ABSL_SWISSTABLE_ASSERT(IsValidCapacity(capacity));
  ------------------
  |  |  256|     18|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1026|       |    ABSL_SWISSTABLE_ASSERT(
  ------------------
  |  |  256|     18|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1027|     18|        slot_size <=
 1028|     18|        ((std::numeric_limits<size_t>::max)() - slot_offset_) / capacity);
 1029|     18|  }
_ZNK4absl12lts_2026052618container_internal16RawHashSetLayout14control_offsetEv:
 1033|     18|  size_t control_offset() const { return control_offset_; }
_ZNK4absl12lts_2026052618container_internal16RawHashSetLayout17generation_offsetEv:
 1037|     10|  size_t generation_offset() const { return generation_offset_; }
_ZNK4absl12lts_2026052618container_internal16RawHashSetLayout11slot_offsetEv:
 1041|     10|  size_t slot_offset() const { return slot_offset_; }
_ZNK4absl12lts_2026052618container_internal16RawHashSetLayout10alloc_sizeEv:
 1045|     26|  size_t alloc_size() const { return alloc_size_; }
_ZN4absl12lts_2026052618container_internal9HeapOrSoo7controlEv:
 1088|     10|  MaybeInitializedPtr<ctrl_t>& control() {
 1089|     10|    ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(heap.control);
  ------------------
  |  |  488|     10|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
 1090|     10|  }
_ZNK4absl12lts_2026052618container_internal9HeapOrSoo7controlEv:
 1091|    296|  MaybeInitializedPtr<ctrl_t> control() const {
 1092|    296|    ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(heap.control);
  ------------------
  |  |  488|    296|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
 1093|    296|  }
_ZN4absl12lts_2026052618container_internal9HeapOrSoo10slot_arrayEv:
 1094|     10|  MaybeInitializedPtr<void>& slot_array() {
 1095|     10|    ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(heap.slot_array);
  ------------------
  |  |  488|     10|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
 1096|     10|  }
_ZNK4absl12lts_2026052618container_internal9HeapOrSoo10slot_arrayEv:
 1097|    156|  MaybeInitializedPtr<void> slot_array() const {
 1098|    156|    ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(heap.slot_array);
  ------------------
  |  |  488|    156|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
 1099|    156|  }
_ZN4absl12lts_2026052618container_internal12CommonFieldsC2ENS1_13non_soo_tag_tE:
 1131|      2|      : inline_data_(HashtableCapacity(0), no_seed_empty_tag_t{}) {}
_ZNK4absl12lts_2026052618container_internal12CommonFields7controlEv:
 1158|    296|  ctrl_t* control() const {
 1159|    296|    ABSL_SWISSTABLE_ASSERT(capacity() > 0);
  ------------------
  |  |  256|    296|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1160|       |    // Assume that the control bytes don't alias `this`.
 1161|    296|    ctrl_t* ctrl = heap_or_soo_.control().get();
 1162|    296|    [[maybe_unused]] size_t num_control_bytes = NumControlBytes(capacity());
 1163|    296|    ABSL_ASSUME(reinterpret_cast<uintptr_t>(ctrl + num_control_bytes) <=
  ------------------
  |  |  271|    592|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  |  |  ------------------
  |  |  |  Branch (271:44): [True: 0, False: 296]
  |  |  |  Branch (271:44): [True: 296, False: 0]
  |  |  ------------------
  ------------------
 1164|    296|                    reinterpret_cast<uintptr_t>(this) ||
 1165|    296|                reinterpret_cast<uintptr_t>(this + 1) <=
 1166|    296|                    reinterpret_cast<uintptr_t>(ctrl));
 1167|    296|    ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(ctrl);
  ------------------
  |  |  488|    296|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
 1168|    296|  }
_ZN4absl12lts_2026052618container_internal12CommonFields11set_controlEPNS1_6ctrl_tE:
 1170|     10|  void set_control(ctrl_t* c) { heap_or_soo_.control().set(c); }
_ZNK4absl12lts_2026052618container_internal12CommonFields10slot_arrayEv:
 1173|    154|  void* slot_array() const { return heap_or_soo_.slot_array().get(); }
_ZNK4absl12lts_2026052618container_internal12CommonFields11slots_unionEv:
 1174|      2|  MaybeInitializedPtr<void> slots_union() const {
 1175|      2|    return heap_or_soo_.slot_array();
 1176|      2|  }
_ZN4absl12lts_2026052618container_internal12CommonFields9set_slotsEPv:
 1177|     10|  void set_slots(void* s) { heap_or_soo_.slot_array().set(s); }
_ZNK4absl12lts_2026052618container_internal12CommonFields4sizeEv:
 1180|     16|  size_t size() const { return inline_data_.size(); }
_ZN4absl12lts_2026052618container_internal12CommonFields16set_size_to_zeroEv:
 1182|      2|  void set_size_to_zero() { inline_data_.set_size(0); }
_ZN4absl12lts_2026052618container_internal12CommonFields14increment_sizeEv:
 1191|     50|  void increment_size() {
 1192|       |    ABSL_SWISSTABLE_ASSERT(size() < capacity());
  ------------------
  |  |  256|     50|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1193|     50|    inline_data_.increment_size();
 1194|     50|  }
_ZNK4absl12lts_2026052618container_internal12CommonFields5emptyEv:
 1203|      2|  bool empty() const { return inline_data_.empty(); }
_ZNK4absl12lts_2026052618container_internal12CommonFields4seedEv:
 1212|     84|  PerTableSeed seed() const { return inline_data_.seed(); }
_ZN4absl12lts_2026052618container_internal12CommonFields17generate_new_seedEb:
 1216|      2|  void generate_new_seed(bool has_infoz) {
 1217|       |    // Note: we can't use has_infoz() here because we set has_infoz later than
 1218|       |    // we generate the seed.
 1219|      2|    if (ABSL_PREDICT_FALSE(has_infoz)) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 1220|      0|      inline_data_.set_sampled_seed();
 1221|      0|      return;
 1222|      0|    }
 1223|      2|    inline_data_.generate_new_seed();
 1224|      2|  }
_ZNK4absl12lts_2026052618container_internal12CommonFields13capacity_implEv:
 1227|    494|  HashtableCapacity capacity_impl() const {
 1228|    494|    HashtableCapacity cap = inline_data_.capacity();
 1229|       |    ABSL_SWISSTABLE_ASSERT(cap.IsValid());
  ------------------
  |  |  256|    494|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1230|    494|    return cap;
 1231|    494|  }
_ZNK4absl12lts_2026052618container_internal21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EE8capacityEv:
  520|    500|  constexpr size_t capacity() const {
  521|    500|    ABSL_SWISSTABLE_ASSERT(IsValid());
  ------------------
  |  |  256|    500|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  522|    500|    return StorageMode == kCapacityByValue ? capacity_data_
  ------------------
  |  Branch (522:12): [Folded, False: 500]
  ------------------
  523|    500|                                           : (size_t{1} << capacity_data_) - 1;
  524|    500|  }
_ZNK4absl12lts_2026052618container_internal12CommonFields8capacityEv:
 1232|    446|  size_t capacity() const { return capacity_impl().capacity(); }
_ZN4absl12lts_2026052618container_internal12CommonFields12set_capacityENS1_21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EEE:
 1238|     10|  void set_capacity(HashtableCapacity c) { inline_data_.set_capacity(c); }
_ZN4absl12lts_2026052618container_internal12CommonFields12set_capacityEm:
 1239|     10|  void set_capacity(size_t c) {
 1240|     10|    set_capacity(HashtableCapacity(c));
 1241|     10|  }
_ZNK4absl12lts_2026052618container_internal12CommonFields8is_smallEv:
 1242|     54|  bool is_small() const { return inline_data_.is_small(); }
_ZN4absl12lts_2026052618container_internal12CommonFields11growth_infoEv:
 1250|     94|  GrowthInfo& growth_info() {
 1251|       |    ABSL_SWISSTABLE_ASSERT(HasGrowthInfoForCapacity(capacity()));
  ------------------
  |  |  256|     94|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1252|     94|    return GetGrowthInfoFromControl(control());
 1253|     94|  }
_ZNK4absl12lts_2026052618container_internal12CommonFields9has_infozEv:
 1258|     50|  bool has_infoz() const { return inline_data_.has_infoz(); }
_ZN4absl12lts_2026052618container_internal12CommonFields5infozEv:
 1274|     50|  HashtablezInfoHandle infoz() {
 1275|     50|    return has_infoz() ? *infoz_ptr() : HashtablezInfoHandle();
  ------------------
  |  Branch (1275:12): [True: 0, False: 50]
  ------------------
 1276|     50|  }
_ZNK4absl12lts_2026052618container_internal21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EE4maskEm:
  536|     52|  constexpr size_t mask(size_t value) const {
  537|       |#ifdef __BMI2__
  538|       |    if constexpr (StorageMode == kCapacityByLog) {
  539|       |      if constexpr (sizeof(size_t) == 8) {
  540|       |        return _bzhi_u64(value, capacity_data_);
  541|       |      } else {
  542|       |        return _bzhi_u32(value, capacity_data_);
  543|       |      }
  544|       |    }
  545|       |#endif  // __BMI2__
  546|     52|    return value & capacity();
  547|     52|  }
_ZN4absl12lts_2026052618container_internal23SentinelEmptyGenerationEv:
  264|     10|constexpr GenerationType SentinelEmptyGeneration() { return 0; }
_ZN4absl12lts_2026052618container_internal14NextGenerationEh:
  266|     10|constexpr GenerationType NextGeneration(GenerationType generation) {
  267|     10|  return ++generation == SentinelEmptyGeneration() ? ++generation : generation;
  ------------------
  |  Branch (267:10): [True: 0, False: 10]
  ------------------
  268|     10|}
_ZN4absl12lts_2026052618container_internal18NumGenerationBytesEv:
  275|     18|constexpr size_t NumGenerationBytes() { return 0; }
_ZN4absl12lts_2026052618container_internal10SooControlEv:
  340|      2|inline ctrl_t* SooControl() {
  341|       |  // Const must be cast away here; no uses of this function will actually write
  342|       |  // to it because it is only used for SOO iterators.
  343|      2|  return const_cast<ctrl_t*>(kSooControl);
  344|      2|}
_ZN4absl12lts_2026052618container_internal16MaxSmallCapacityEv:
  366|    334|constexpr size_t MaxSmallCapacity() { return 1; }
_ZN4absl12lts_2026052618container_internal15IsValidCapacityEm:
  381|      2|constexpr bool IsValidCapacity(size_t n) { return ((n + 1) & n) == 0 && n > 0; }
  ------------------
  |  Branch (381:51): [True: 2, False: 0]
  |  Branch (381:73): [True: 2, False: 0]
  ------------------
_ZN4absl12lts_2026052618container_internal15IsSmallCapacityEm:
  384|    334|constexpr bool IsSmallCapacity(size_t capacity) {
  385|    334|  return capacity <= MaxSmallCapacity();
  386|    334|}
_ZN4absl12lts_2026052618container_internal12NextCapacityEm:
  394|      6|constexpr size_t NextCapacity(size_t n) {
  395|       |  ABSL_SWISSTABLE_ASSERT(IsValidCapacity(n) || n == 0);
  ------------------
  |  |  256|      6|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  396|      6|  return n * 2 + 1;
  397|      6|}
_ZN4absl12lts_2026052618container_internal16PreviousCapacityEm:
  400|      2|constexpr size_t PreviousCapacity(size_t n) {
  401|       |  ABSL_SWISSTABLE_ASSERT(IsValidCapacity(n));
  ------------------
  |  |  256|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  402|      2|  return n / 2;
  403|      2|}
_ZN4absl12lts_2026052618container_internal16CapacityToGrowthEm:
  415|      8|constexpr size_t CapacityToGrowth(size_t capacity) {
  416|      8|  ABSL_SWISSTABLE_ASSERT(IsValidCapacity(capacity));
  ------------------
  |  |  256|      8|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  417|       |  // `capacity*7/8`
  418|      8|  if (Group::kWidth == 8 && capacity == 7) {
  ------------------
  |  Branch (418:7): [Folded, False: 8]
  |  Branch (418:29): [True: 0, False: 0]
  ------------------
  419|       |    // x-x/8 does not work when x==7.
  420|      0|    return 6;
  421|      0|  }
  422|      8|  return capacity - capacity / 8;
  423|      8|}
_ZN4absl12lts_2026052618container_internal2H1Em:
  740|     76|inline size_t H1(size_t hash) { return hash; }
_ZN4absl12lts_2026052618container_internal2H2Em:
  745|    124|inline h2_t H2(size_t hash) { return hash >> (sizeof(size_t) * 8 - 7); }
_ZN4absl12lts_2026052618container_internal14NumClonedBytesEv:
  985|    392|constexpr size_t NumClonedBytes() { return Group::kWidth - 1; }
_ZN4absl12lts_2026052618container_internal15NumControlBytesEm:
  988|    314|constexpr size_t NumControlBytes(size_t capacity) {
  989|    314|  return IsSmallCapacity(capacity) ? 0 : capacity + 1 + NumClonedBytes();
  ------------------
  |  Branch (989:10): [True: 6, False: 308]
  ------------------
  990|    314|}
_ZN4absl12lts_2026052618container_internal24HasGrowthInfoForCapacityEm:
  993|     18|constexpr bool HasGrowthInfoForCapacity(size_t capacity) {
  994|     18|  return !IsSmallCapacity(capacity);
  995|     18|}
_ZN4absl12lts_2026052618container_internal13ControlOffsetEbb:
  999|     18|constexpr size_t ControlOffset(bool has_infoz, bool has_growth_info) {
 1000|     18|  if (ABSL_PREDICT_FALSE(has_infoz)) {
  ------------------
  |  |  190|     18|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 18]
  |  |  |  Branch (190:49): [Folded, False: 18]
  |  |  |  Branch (190:58): [True: 0, False: 18]
  |  |  ------------------
  ------------------
 1001|       |    // We always allocate GrowthInfo for sampled tables to allow branchless
 1002|       |    // access to infoz pointer.
 1003|      0|    return sizeof(HashtablezInfoHandle) + sizeof(GrowthInfo);
 1004|      0|  }
 1005|     18|  return has_growth_info ? sizeof(GrowthInfo) : 0;
  ------------------
  |  Branch (1005:10): [True: 14, False: 4]
  ------------------
 1006|     18|}
_ZN4absl12lts_2026052618container_internal9AlignUpToEmm:
 1010|     18|constexpr size_t AlignUpTo(size_t offset, size_t align) {
 1011|     18|  return (offset + align - 1) & (~align + 1);
 1012|     18|}
_ZN4absl12lts_2026052618container_internal24GetGrowthInfoFromControlEPNS1_6ctrl_tE:
 1113|    102|inline GrowthInfo& GetGrowthInfoFromControl(ctrl_t* control) {
 1114|    102|  auto* gl_ptr = reinterpret_cast<GrowthInfo*>(control) - 1;
 1115|       |  ABSL_SWISSTABLE_ASSERT(
  ------------------
  |  |  256|    102|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1116|    102|      reinterpret_cast<uintptr_t>(gl_ptr) % alignof(GrowthInfo) == 0);
 1117|    102|  return *gl_ptr;
 1118|    102|}
_ZN4absl12lts_2026052618container_internal12AssertIsFullEPKNS1_6ctrl_tEhPKhPKc:
 1413|    100|                         const char* operation) {
 1414|    100|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1414:7): [True: 100, Folded]
  ------------------
 1415|       |  // `SwisstableDebugEnabled()` is also true for release builds with hardening
 1416|       |  // enabled. To minimize their impact in those builds:
 1417|       |  // - use `ABSL_PREDICT_FALSE()` to provide a compiler hint for code layout
 1418|       |  // - use `ABSL_RAW_LOG()` with a format string to reduce code size and improve
 1419|       |  //   the chances that the hot paths will be inlined.
 1420|      0|  if (ABSL_PREDICT_FALSE(ctrl == nullptr)) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1421|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1422|      0|  }
 1423|      0|  if (ABSL_PREDICT_FALSE(ctrl == DefaultIterControl())) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1424|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1425|      0|                 operation);
 1426|      0|  }
 1427|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1427:7): [Folded, False: 0]
  ------------------
 1428|      0|    if (ABSL_PREDICT_FALSE(generation !=
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1429|      0|                           CrashIfIteratorIsInvalid(generation_ptr))) {
 1430|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1431|      0|                   "%s called on invalid iterator. The table could have "
 1432|      0|                   "rehashed or moved since this iterator was initialized.",
 1433|      0|                   operation);
 1434|      0|    }
 1435|      0|    if (ABSL_PREDICT_FALSE(!IsFull(CrashIfIteratorIsInvalid(ctrl)))) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1436|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1437|      0|          FATAL,
 1438|      0|          "%s called on invalid iterator. The element was likely erased.",
 1439|      0|          operation);
 1440|      0|    }
 1441|      0|  } else {
 1442|      0|    if (ABSL_PREDICT_FALSE(!IsFull(CrashIfIteratorIsInvalid(ctrl)))) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1443|       |      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1444|      0|          FATAL,
 1445|      0|          "%s called on invalid iterator. The element might have been erased "
 1446|      0|          "or the table might have rehashed. Consider running with "
 1447|      0|          "--config=asan to diagnose rehashing issues.",
 1448|      0|          operation);
 1449|      0|    }
 1450|      0|  }
 1451|      0|}
_ZN4absl12lts_2026052618container_internal26AssertIsValidForComparisonEPKNS1_6ctrl_tEhPKh:
 1456|    104|                                       const GenerationType* generation_ptr) {
 1457|    104|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1457:7): [True: 104, Folded]
  ------------------
 1458|      0|  const bool ctrl_is_valid_for_comparison =
 1459|      0|      ctrl == nullptr || ctrl == DefaultIterControl() ||
  ------------------
  |  Branch (1459:7): [True: 0, False: 0]
  |  Branch (1459:26): [True: 0, False: 0]
  ------------------
 1460|      0|      IsFull(CrashIfIteratorIsInvalid(ctrl));
  ------------------
  |  Branch (1460:7): [True: 0, False: 0]
  ------------------
 1461|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1461:7): [Folded, False: 0]
  ------------------
 1462|      0|    if (ABSL_PREDICT_FALSE(generation !=
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1463|      0|                           CrashIfIteratorIsInvalid(generation_ptr))) {
 1464|       |      // Note: in the case of a rehash, we would expect to see a sanitizer crash
 1465|       |      // in CrashIfIteratorIsInvalid so this assertion will only catch moved
 1466|       |      // table cases, unless we're using a custom allocator that does not
 1467|       |      // deallocate the old backing array (e.g. an arena allocator).
 1468|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1469|      0|          FATAL,
 1470|      0|          "Invalid iterator comparison. The table was likely moved (or "
 1471|      0|          "possibly rehashed) since this iterator was initialized.");
 1472|      0|    }
 1473|      0|    if (ABSL_PREDICT_FALSE(!ctrl_is_valid_for_comparison)) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1474|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1475|      0|          FATAL, "Invalid iterator comparison. The element was likely erased.");
 1476|      0|    }
 1477|      0|  } else {
 1478|      0|    ABSL_HARDENING_ASSERT_SLOW(
  ------------------
  |  |  175|      0|#define ABSL_HARDENING_ASSERT_SLOW(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |  127|      0|#define ABSL_ASSERT(expr) ABSL_INTERNAL_UNEVALUATED((expr) ? void() : void())
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|      0|#define ABSL_INTERNAL_UNEVALUATED(expr) (false ? (void)(expr) : void())
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (87:42): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (87:57): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (87:57): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      0|        ctrl_is_valid_for_comparison &&
 1480|      0|        "Invalid iterator comparison. The element might have been erased or "
 1481|      0|        "the table might have rehashed. Consider running with --config=asan to "
 1482|      0|        "diagnose rehashing issues.");
 1483|      0|  }
 1484|      0|}
_ZN4absl12lts_2026052618container_internal19AssertSameContainerEPKNS1_6ctrl_tES4_RKPKvS8_PKhSA_:
 1516|     52|                                const GenerationType* generation_ptr_b) {
 1517|     52|  if (!SwisstableDebugEnabled()) return;
  ------------------
  |  Branch (1517:7): [True: 52, Folded]
  ------------------
 1518|       |  // `SwisstableDebugEnabled()` is also true for release builds with hardening
 1519|       |  // enabled. To minimize their impact in those builds:
 1520|       |  // - use `ABSL_PREDICT_FALSE()` to provide a compiler hint for code layout
 1521|       |  // - use `ABSL_RAW_LOG()` with a format string to reduce code size and improve
 1522|       |  //   the chances that the hot paths will be inlined.
 1523|       |
 1524|       |  // fail_if(is_invalid, message) crashes when is_invalid is true and provides
 1525|       |  // an error message based on `message`.
 1526|      0|  const auto fail_if = [](bool is_invalid, const char* message) {
 1527|      0|    if (ABSL_PREDICT_FALSE(is_invalid)) {
 1528|      0|      ABSL_RAW_LOG(FATAL, "Invalid iterator comparison. %s", message);
 1529|      0|    }
 1530|      0|  };
 1531|       |
 1532|      0|  const bool a_is_default = ctrl_a == DefaultIterControl();
 1533|      0|  const bool b_is_default = ctrl_b == DefaultIterControl();
 1534|      0|  if (a_is_default && b_is_default) return;
  ------------------
  |  Branch (1534:7): [True: 0, False: 0]
  |  Branch (1534:23): [True: 0, False: 0]
  ------------------
 1535|      0|  fail_if(a_is_default != b_is_default,
 1536|      0|          "Comparing default-constructed hashtable iterator with a "
 1537|      0|          "non-default-constructed hashtable iterator.");
 1538|       |
 1539|      0|  if (SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (1539:7): [Folded, False: 0]
  ------------------
 1540|      0|    if (ABSL_PREDICT_TRUE(generation_ptr_a == generation_ptr_b)) return;
  ------------------
  |  |  191|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 0, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 0]
  |  |  |  Branch (191:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1541|      0|    const bool a_is_empty = IsEmptyGeneration(generation_ptr_a);
 1542|      0|    const bool b_is_empty = IsEmptyGeneration(generation_ptr_b);
 1543|      0|    fail_if(a_is_empty != b_is_empty,
 1544|      0|            "Comparing an iterator from an empty hashtable with an iterator "
 1545|      0|            "from a non-empty hashtable.");
 1546|      0|    fail_if(a_is_empty && b_is_empty,
  ------------------
  |  Branch (1546:13): [True: 0, False: 0]
  |  Branch (1546:27): [True: 0, False: 0]
  ------------------
 1547|      0|            "Comparing iterators from different empty hashtables.");
 1548|       |
 1549|      0|    const bool a_is_end = ctrl_a == nullptr;
 1550|      0|    const bool b_is_end = ctrl_b == nullptr;
 1551|      0|    fail_if(a_is_end || b_is_end,
  ------------------
  |  Branch (1551:13): [True: 0, False: 0]
  |  Branch (1551:25): [True: 0, False: 0]
  ------------------
 1552|      0|            "Comparing iterator with an end() iterator from a different "
 1553|      0|            "hashtable.");
 1554|      0|    fail_if(true, "Comparing non-end() iterators from different hashtables.");
 1555|      0|  } else {
 1556|      0|    ABSL_HARDENING_ASSERT_SLOW(
  ------------------
  |  |  175|      0|#define ABSL_HARDENING_ASSERT_SLOW(expr) ABSL_ASSERT(expr)
  |  |  ------------------
  |  |  |  |  127|      0|#define ABSL_ASSERT(expr) ABSL_INTERNAL_UNEVALUATED((expr) ? void() : void())
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|      0|#define ABSL_INTERNAL_UNEVALUATED(expr) (false ? (void)(expr) : void())
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (87:42): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (87:57): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (87:57): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1557|      0|        AreItersFromSameContainer(ctrl_a, ctrl_b, slot_a, slot_b) &&
 1558|      0|        "Invalid iterator comparison. The iterators may be from different "
 1559|      0|        "containers or the container might have rehashed or moved. Consider "
 1560|      0|        "running with --config=asan to diagnose issues.");
 1561|      0|  }
 1562|      0|}
_ZN4absl12lts_2026052618container_internal15is_single_groupEm:
 1571|      6|constexpr bool is_single_group(size_t capacity) {
 1572|      6|  return capacity <= Group::kWidth;
 1573|      6|}
_ZN4absl12lts_2026052618container_internal8probe_h1ENS1_21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EEEm:
 1625|     48|                                         size_t h1) {
 1626|     48|  return probe_seq<Group::kWidth>(capacity, h1);
 1627|     48|}
_ZN4absl12lts_2026052618container_internal5probeENS1_21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EEEm:
 1628|     46|inline probe_seq<Group::kWidth> probe(HashtableCapacity capacity, size_t hash) {
 1629|     46|  return probe_h1(capacity, H1(hash));
 1630|     46|}
_ZN4absl12lts_2026052618container_internal5probeERKNS1_12CommonFieldsEm:
 1631|     46|inline probe_seq<Group::kWidth> probe(const CommonFields& common, size_t hash) {
 1632|     46|  return probe(common.capacity_impl(), hash);
 1633|     46|}
_ZN4absl12lts_2026052618container_internal12SooSlotIndexEv:
 1848|      2|constexpr size_t SooSlotIndex() { return 1; }
_ZN4absl12lts_2026052618container_internal12CommonFields13CreateDefaultILb0EEES2_v:
 1149|      2|  static CommonFields CreateDefault() {
 1150|      2|    return kSooEnabled ? CommonFields{soo_tag_t{}}
  ------------------
  |  Branch (1150:12): [Folded, False: 2]
  ------------------
 1151|      2|                       : CommonFields{non_soo_tag_t{}};
 1152|      2|  }
_ZNK4absl12lts_2026052618container_internal16PerTableSeedImplIhE4seedEv:
  598|     84|  size_t seed() const { return seed_; }
_ZN4absl12lts_2026052618container_internal29TryFindNewIndexWithoutProbingIvEEmmmmPNS1_6ctrl_tEm:
 1652|     28|                                            size_t new_capacity) {
 1653|     28|  size_t index_diff = old_index - h1;
 1654|       |  // The first probe group starts with h1 & capacity.
 1655|       |  // All following groups start at (h1 + Group::kWidth * K) & capacity.
 1656|       |  // We can find an index within the floating group as index_diff modulo
 1657|       |  // Group::kWidth.
 1658|       |  // Both old and new capacity are larger than Group::kWidth so we can avoid
 1659|       |  // computing `& capacity`.
 1660|     28|  size_t in_floating_group_index = index_diff & (Group::kWidth - 1);
 1661|       |  // By subtracting we will get the difference between the first probe group
 1662|       |  // and the probe group corresponding to old_index.
 1663|     28|  index_diff -= in_floating_group_index;
 1664|     28|  if (ABSL_PREDICT_TRUE((index_diff & old_capacity) == 0)) {
  ------------------
  |  |  191|     28|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 28, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 28]
  |  |  |  Branch (191:57): [True: 28, False: 0]
  |  |  ------------------
  ------------------
 1665|     28|    size_t new_index = (h1 + in_floating_group_index) & new_capacity;
 1666|     28|    ABSL_ASSUME(new_index != kProbedElementIndexSentinel);
  ------------------
  |  |  271|     28|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1667|     28|    return new_index;
 1668|     28|  }
 1669|      0|  ABSL_SWISSTABLE_ASSERT(((old_index - h1) & old_capacity) >= Group::kWidth);
  ------------------
  |  |  256|      0|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 1670|       |  // Try to insert element into the first probe group.
 1671|       |  // new_ctrl is not yet fully initialized so we can't use regular search via
 1672|       |  // find_first_non_full.
 1673|       |
 1674|       |  // We can search in the first probe group only if it is located in already
 1675|       |  // initialized part of the table.
 1676|      0|  if (ABSL_PREDICT_FALSE((h1 & old_capacity) >= old_index)) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1677|      0|    return kProbedElementIndexSentinel;
 1678|      0|  }
 1679|      0|  size_t offset = h1 & new_capacity;
 1680|      0|  Group new_g(new_ctrl + offset);
 1681|      0|  if (auto mask = new_g.MaskNonFull(); ABSL_PREDICT_TRUE(mask)) {
  ------------------
  |  |  191|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 0, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 0]
  |  |  |  Branch (191:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1682|      0|    size_t result = offset + mask.LowestBitSet();
 1683|      0|    ABSL_ASSUME(result != kProbedElementIndexSentinel);
  ------------------
  |  |  271|      0|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1684|      0|    return result;
 1685|      0|  }
 1686|      0|  return kProbedElementIndexSentinel;
 1687|      0|}
_ZNK4absl12lts_2026052618container_internal9probe_seqILm16EE6offsetEv:
 1606|    142|  size_t offset() const { return offset_; }
_ZNK4absl12lts_2026052618container_internal9probe_seqILm16EE6offsetEm:
 1607|      4|  size_t offset(size_t i) const { return capacity_.mask(offset_ + i); }
_ZNK4absl12lts_2026052618container_internal9probe_seqILm16EE5indexEv:
 1615|     48|  size_t index() const { return index_; }
_ZNK4absl12lts_2026052618container_internal21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EE9ToRawDataEv:
  506|     12|  IntType ToRawData() const { return capacity_data_; }
_ZNK4absl12lts_2026052618container_internal19MaybeInitializedPtrINS1_6ctrl_tEE3getEv:
 1060|    296|  T* get() const { ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(p); }
  ------------------
  |  |  488|    296|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
_ZN4absl12lts_2026052618container_internal19MaybeInitializedPtrINS1_6ctrl_tEE3setEPS3_:
 1061|     10|  void set(T* ptr) { p = ptr; }
_ZNK4absl12lts_2026052618container_internal19MaybeInitializedPtrIvE3getEv:
 1060|    156|  T* get() const { ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(p); }
  ------------------
  |  |  488|    156|#define ABSL_SWISSTABLE_IGNORE_UNINITIALIZED_RETURN(x) return x
  ------------------
_ZN4absl12lts_2026052618container_internal19MaybeInitializedPtrIvE3setEPv:
 1061|     10|  void set(T* ptr) { p = ptr; }
_ZNK4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE4sizeEv:
  645|     16|  size_t size() const { return static_cast<size_t>(data_ >> kSizeShift); }
_ZN4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE8set_sizeEm:
  663|      2|  void set_size(size_t size) {
  664|      2|    data_ =
  665|      2|        (data_ & kMetadataMask) | (static_cast<uint64_t>(size) << kSizeShift);
  666|      2|  }
_ZN4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE14increment_sizeEv:
  646|     50|  void increment_size() { data_ += kSizeOneNoMetadata; }
_ZNK4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE5emptyEv:
  652|      2|  bool empty() const { return data_ < kSizeOneNoMetadata; }
_ZNK4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE4seedEv:
  668|     84|  PerTableSeed seed() const { return PerTableSeed(data_ & kSeedMask); }
_ZN4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE8set_seedEh:
  712|      2|  void set_seed(typename PerTableSeed::IntType seed) {
  713|      2|    data_ = (data_ & ~kSeedMask) | seed;
  714|      2|  }
_ZN4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE17generate_new_seedEv:
  670|      2|  void generate_new_seed() {
  671|      2|    set_seed(static_cast<typename PerTableSeed::IntType>(NextHashTableSeed()));
  672|      2|  }
_ZNK4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE8capacityEv:
  636|    548|  HashtableCapacity capacity() const {
  637|    548|    return HashtableCapacity::FromRawData(capacity_internal_);
  638|    548|  }
_ZN4absl12lts_2026052618container_internal21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EE11FromRawDataEm:
  501|    548|  static HashtableCapacityImpl FromRawData(uint64_t capacity) {
  502|    548|    auto cap = HashtableCapacityImpl(uninitialized_tag_t{});
  503|    548|    cap.capacity_data_ = static_cast<IntType>(capacity);
  504|    548|    return cap;
  505|    548|  }
_ZN4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE12set_capacityENS1_21HashtableCapacityImplILS3_1EEE:
  641|     10|  void set_capacity(HashtableCapacity c) { capacity_internal_ = c.ToRawData(); }
_ZNK4absl12lts_2026052618container_internal21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EE8is_smallEv:
  526|     54|  constexpr bool is_small() const {
  527|       |    // Small tables have capacity 0 or 1. This expression is valid for both
  528|       |    // capacity storage modes.
  529|       |    // Comparing capacity_data_ directly leads to a better generated code.
  530|       |    // One byte comparison is used before computing the capacity in order to
  531|       |    // detect small tables faster for critical path.
  532|     54|    static_assert(MaxSmallCapacity() == 1);
  533|     54|    return capacity_data_ <= 1;
  534|     54|  }
_ZNK4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE8is_smallEv:
  639|     54|  bool is_small() const { return capacity().is_small(); }
_ZNK4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EE9has_infozEv:
  683|     50|  bool has_infoz() const {
  684|     50|    return ABSL_PREDICT_FALSE((data_ & kHasInfozMask) != 0);
  ------------------
  |  |  190|     50|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:49): [Folded, False: 50]
  |  |  |  Branch (190:58): [True: 0, False: 50]
  |  |  ------------------
  ------------------
  685|     50|  }
_ZN4absl12lts_2026052618container_internal21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EEC2Em:
  491|     12|      : capacity_data_(static_cast<IntType>(
  492|     12|            StorageMode == kCapacityByValue ? capacity
  ------------------
  |  Branch (492:13): [Folded, False: 12]
  ------------------
  493|     12|                                            : TrailingZeros(capacity + 1))) {
  494|       |    ABSL_SWISSTABLE_ASSERT(capacity == 0 || IsValidCapacity(capacity));
  ------------------
  |  |  256|     12|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
  495|     12|  }
_ZN4absl12lts_2026052618container_internal23HashtableInlineDataImplILNS1_28HashtableCapacityStorageModeE1EEC2ENS1_21HashtableCapacityImplILS3_1EEENS1_19no_seed_empty_tag_tE:
  629|      2|      : capacity_internal_(capacity.ToRawData()), data_(0) {}
_ZN4absl12lts_2026052618container_internal21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EEC2ENS1_19uninitialized_tag_tE:
  489|    548|  explicit HashtableCapacityImpl(uninitialized_tag_t) {}
_ZN4absl12lts_2026052618container_internal16PerTableSeedImplIhEC2Em:
  605|     84|      : seed_(static_cast<IntType>(seed)) {}
_ZN4absl12lts_2026052618container_internal9probe_seqILm16EEC2ENS1_21HashtableCapacityImplILNS1_28HashtableCapacityStorageModeE1EEEm:
 1603|     48|      : capacity_(capacity), offset_(capacity.mask(hash)) {}
_ZN4absl12lts_2026052618container_internal20TransferNRelocatableILm24EEEvPvS3_S3_m:
 1955|      6|                                                  size_t count) {
 1956|       |  // TODO(b/382423690): Experiment with making specialization for power of 2 and
 1957|       |  // non power of 2. This would require passing the size of the slot.
 1958|      6|  memcpy(dst, src, SizeOfSlot * count);
 1959|      6|}
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8capacityEv:
 2601|      2|  size_t capacity() const {
 2602|      2|    const size_t cap = common().capacity();
 2603|       |    // Compiler complains when using functions in ASSUME so use local variables.
 2604|      2|    [[maybe_unused]] const bool kIsValid = IsValidCapacity(cap);
 2605|      2|    [[maybe_unused]] const size_t kDefaultCapacity = DefaultCapacity();
 2606|      2|    [[maybe_unused]] const size_t kMaxValidCapacity = MaxValidCapacity();
 2607|      2|    ABSL_ASSUME(kIsValid || cap == 0);
  ------------------
  |  |  271|      2|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  |  |  ------------------
  |  |  |  Branch (271:44): [True: 2, False: 0]
  |  |  |  Branch (271:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2608|      2|    ABSL_ASSUME(cap >= kDefaultCapacity);
  ------------------
  |  |  271|      2|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 2609|      2|    ABSL_ASSUME(cap <= kMaxValidCapacity);
  ------------------
  |  |  271|      2|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 2610|      2|    return cap;
 2611|      2|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE6commonEv:
 3719|    376|  const CommonFields& common() const { return settings_.template get<0>(); }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8is_smallEv:
 2117|     54|  bool is_small() const { return common().is_small(); }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE5emptyEv:
 2593|      6|  bool empty() const { return !size(); }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE6commonEv:
 3718|    236|  CommonFields& common() { return settings_.template get<0>(); }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE14char_alloc_refEv:
 3772|     80|  CharAlloc& char_alloc_ref() { return settings_.template get<3>(); }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE11single_slotEv:
 3743|      2|  slot_type* single_slot() {
 3744|      2|    ABSL_SWISSTABLE_ASSERT(is_small());
  ------------------
  |  |  256|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3745|      2|    return SooEnabled() ? soo_slot() : slot_array();
  ------------------
  |  Branch (3745:12): [Folded, False: 2]
  ------------------
 3746|      2|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE10slot_arrayEv:
 3730|     98|  slot_type* slot_array() const {
 3731|       |    ABSL_SWISSTABLE_ASSERT(!is_soo());
  ------------------
  |  |  256|     98|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3732|     98|    return static_cast<slot_type*>(common().slot_array());
 3733|     98|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE13destroy_slotsEv:
 3280|      2|  void destroy_slots() {
 3281|      2|    ABSL_SWISSTABLE_ASSERT(!is_small());
  ------------------
  |  |  256|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3282|      2|    if (PolicyTraits::template destroy_is_trivial<Alloc>()) return;
  ------------------
  |  Branch (3282:9): [True: 2, Folded]
  ------------------
 3283|      0|    auto destroy_slot = [&](const ctrl_t*, void* slot) {
 3284|      0|      this->destroy(static_cast<slot_type*>(slot));
 3285|      0|    };
 3286|       |    if constexpr (SwisstableAssertAccessToDestroyedTable()) {
 3287|       |      CommonFields common_copy(non_soo_tag_t{}, this->common());
 3288|       |      common().set_capacity(HashtableCapacity::CreateDestroyed());
 3289|       |      IterateOverFullSlots(common_copy, sizeof(slot_type), destroy_slot);
 3290|       |      common().set_capacity(common_copy.capacity());
 3291|      0|    } else {
 3292|      0|      IterateOverFullSlots(common(), sizeof(slot_type), destroy_slot);
 3293|      0|    }
 3294|      0|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE7controlEv:
 3726|    140|  ctrl_t* control() const {
 3727|       |    ABSL_SWISSTABLE_ASSERT(!is_soo());
  ------------------
  |  |  256|    140|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3728|    140|    return common().control();
 3729|    140|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE12AssertOnFindIS8_EEvRKT_:
 3567|     50|  void AssertOnFind([[maybe_unused]] const K& key) {
 3568|     50|    AssertHashEqConsistent(key);
 3569|     50|    AssertNotDebugCapacity();
 3570|     50|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE22AssertHashEqConsistentIS8_EEvRKT_:
 3605|     50|  void AssertHashEqConsistent(const K& key) {
 3606|     50|#ifdef NDEBUG
 3607|     50|    return;
 3608|      0|#endif
 3609|       |    // If the hash/eq functors are known to be consistent, then skip validation.
 3610|      0|    if (std::is_same<hasher, absl::container_internal::StringHash>::value &&
  ------------------
  |  Branch (3610:9): [True: 0, Folded]
  ------------------
 3611|      0|        std::is_same<key_equal, absl::container_internal::StringEq>::value) {
  ------------------
  |  Branch (3611:9): [True: 0, Folded]
  ------------------
 3612|      0|      return;
 3613|      0|    }
 3614|      0|    if (std::is_scalar<key_type>::value &&
  ------------------
  |  Branch (3614:9): [Folded, False: 0]
  ------------------
 3615|      0|        std::is_same<hasher, absl::Hash<key_type>>::value &&
  ------------------
  |  Branch (3615:9): [Folded, False: 0]
  ------------------
 3616|      0|        std::is_same<key_equal, std::equal_to<key_type>>::value) {
  ------------------
  |  Branch (3616:9): [Folded, False: 0]
  ------------------
 3617|      0|      return;
 3618|      0|    }
 3619|      0|    if (empty()) return;
  ------------------
  |  Branch (3619:9): [True: 0, False: 0]
  ------------------
 3620|       |
 3621|      0|    const size_t hash_of_arg = hash_of(key);
 3622|      0|    const auto assert_consistent = [&](const ctrl_t*, void* slot) {
 3623|      0|      const bool is_key_equal = equal_to(key, to_slot(slot));
 3624|      0|      if (!is_key_equal) return;
 3625|       |
 3626|      0|      [[maybe_unused]] const bool is_hash_equal =
 3627|      0|          hash_of_arg == hash_of(to_slot(slot));
 3628|      0|      assert((!is_key_equal || is_hash_equal) &&
 3629|      0|             "eq(k1, k2) must imply that hash(k1) == hash(k2). "
 3630|      0|             "hash/eq functors are inconsistent.");
 3631|      0|    };
 3632|       |
 3633|      0|    if (is_small()) {
  ------------------
  |  Branch (3633:9): [True: 0, False: 0]
  ------------------
 3634|      0|      assert_consistent(/*unused*/ nullptr, single_slot());
 3635|      0|      return;
 3636|      0|    }
 3637|       |    // We only do validation for small tables so that it's constant time.
 3638|      0|    if (capacity() > 16) return;
  ------------------
  |  Branch (3638:9): [True: 0, False: 0]
  ------------------
 3639|      0|    IterateOverFullSlots(common(), sizeof(slot_type), assert_consistent);
 3640|      0|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE22AssertNotDebugCapacityEv:
 3573|     62|  void AssertNotDebugCapacity() const {
 3574|     62|#ifdef NDEBUG
 3575|     62|    if (!SwisstableGenerationsEnabled()) {
  ------------------
  |  Branch (3575:9): [True: 62, Folded]
  ------------------
 3576|     62|      return;
 3577|     62|    }
 3578|      0|#endif
 3579|      0|    const HashtableCapacity cap = maybe_invalid_capacity();
 3580|      0|    if (ABSL_PREDICT_TRUE(cap.IsValid())) {
  ------------------
  |  |  191|      0|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 0, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 0]
  |  |  |  Branch (191:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3581|      0|      return;
 3582|      0|    }
 3583|      0|    assert(!cap.IsReentrance() &&
 3584|      0|           "Reentrant container access during element construction/destruction "
 3585|      0|           "is not allowed.");
 3586|       |    if constexpr (SwisstableAssertAccessToDestroyedTable()) {
 3587|       |      if (cap.IsDestroyed()) {
 3588|       |        ABSL_RAW_LOG(FATAL, "Use of destroyed hash table.");
 3589|       |      }
 3590|       |    }
 3591|      0|    if (SwisstableGenerationsEnabled() &&
  ------------------
  |  Branch (3591:9): [Folded, False: 0]
  ------------------
 3592|      0|        ABSL_PREDICT_FALSE(cap.IsMovedFrom())) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3593|      0|      if (cap.IsSelfMovedFrom()) {
  ------------------
  |  Branch (3593:11): [True: 0, False: 0]
  ------------------
 3594|       |        // If this log triggers, then a hash table was move-assigned to itself
 3595|       |        // and then used again later without being reinitialized.
 3596|      0|        ABSL_RAW_LOG(FATAL, "Use of self-move-assigned hash table.");
  ------------------
  |  |   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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3597|      0|      }
 3598|      0|      ABSL_RAW_LOG(FATAL, "Use of moved-from hash table.");
  ------------------
  |  |   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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3599|      0|    }
 3600|      0|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8equal_toIS8_EEbRKT_PNS1_13map_slot_typeIS8_SA_EE:
 3344|      4|                                             slot_type* slot) const {
 3345|      4|    return PolicyTraits::apply(EqualElement<K, key_equal>{key, eq_ref()},
 3346|      4|                               PolicyTraits::element(slot));
 3347|      4|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE6eq_refEv:
 3771|      4|  const key_equal& eq_ref() const { return settings_.template get<2>(); }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iteratorC2EPNS1_6ctrl_tEPNS1_13map_slot_typeIS8_SA_EEPKh:
 2236|     50|        : HashSetIteratorGenerationInfo(generation_ptr),
 2237|     50|          ctrl_(ctrl),
 2238|     50|          slot_(slot) {
 2239|       |      // This assumption helps the compiler know that any non-end iterator is
 2240|       |      // not equal to any end iterator.
 2241|     50|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  271|     50|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 2242|     50|    }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE19prefetch_heap_blockEv:
 3711|     46|  void prefetch_heap_block() const {
 3712|       |    ABSL_SWISSTABLE_ASSERT(!is_soo());
  ------------------
  |  |  256|     46|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3713|     46|#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__)
 3714|     46|    __builtin_prefetch(control(), 0, 1);
 3715|     46|#endif
 3716|     46|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE11iterator_atEm:
 3671|     46|  iterator iterator_at(size_t i) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3672|     46|    return {control() + i, slot_array() + i, common().generation_ptr()};
 3673|     46|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE7hash_ofIS8_EEmRKT_:
 3349|     46|  ABSL_ATTRIBUTE_ALWAYS_INLINE size_t hash_of(const K& key) const {
 3350|     46|    return HashElement<hasher, kIsDefaultHash>{hash_ref(),
 3351|     46|                                               common().seed().seed()}(key);
 3352|     46|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8hash_refEv:
 3769|     74|  const hasher& hash_ref() const { return settings_.template get<1>(); }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE3endEv:
 2577|      2|  iterator end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2578|      2|    AssertNotDebugCapacity();
 2579|      2|    return iterator(common().generation_ptr());
 2580|      2|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iteratorC2EPKh:
 2257|      2|        : HashSetIteratorGenerationInfo(generation_ptr), ctrl_(nullptr) {}
_ZN4absl12lts_2026052618container_internalneERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iteratorESF_:
 2229|     52|    friend bool operator!=(const iterator& a, const iterator& b) {
 2230|     52|      return !(a == b);
 2231|     52|    }
_ZN4absl12lts_2026052618container_internaleqERKNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iteratorESF_:
 2222|     52|    friend bool operator==(const iterator& a, const iterator& b) {
 2223|     52|      AssertIsValidForComparison(a.ctrl_, a.generation(), a.generation_ptr());
 2224|     52|      AssertIsValidForComparison(b.ctrl_, b.generation(), b.generation_ptr());
 2225|     52|      AssertSameContainer(a.ctrl_, b.ctrl_, a.slot_, b.slot_,
 2226|     52|                          a.generation_ptr(), b.generation_ptr());
 2227|     52|      return a.ctrl_ == b.ctrl_;
 2228|     52|    }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iterator14assert_is_fullEPKc:
 2259|    100|    void assert_is_full(const char* operation) const {
 2260|    100|      AssertIsFull(ctrl_, generation(), generation_ptr(), operation);
 2261|    100|    }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE6insertINS4_4pairIKS8_SA_EELi0EEENSE_INSC_8iteratorEbEEOT_:
 2653|     50|  std::pair<iterator, bool> insert(T&& value) ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2654|     50|    return emplace(std::forward<T>(value));
 2655|     50|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE7emplaceIJNS4_4pairIKS8_SA_EEETnNS4_9enable_ifIXsr14IsDecomposableIDpT_EE5valueEiE4typeELi0EEENSE_INSC_8iteratorEbEEDpOSI_:
 2799|     50|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2800|     50|    return PolicyTraits::apply(EmplaceDecomposable{*this},
 2801|     50|                               std::forward<Args>(args)...);
 2802|     50|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE19EmplaceDecomposableclIS8_JRKNS4_21piecewise_construct_tENS4_5tupleIJOKS8_EEENSI_IJOSA_EEEEEENS4_4pairINSC_8iteratorEbEERKT_DpOT0_:
 3177|     50|    std::pair<iterator, bool> operator()(const K& key, Args&&... args) const {
 3178|     50|      auto res = s.find_or_prepare_insert(key);
 3179|     50|      if (res.second) {
  ------------------
  |  Branch (3179:11): [True: 50, False: 0]
  ------------------
 3180|     50|        s.emplace_at(res.first, std::forward<Args>(args)...);
 3181|     50|      }
 3182|     50|      return res;
 3183|     50|    }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE22find_or_prepare_insertIS8_EENS4_4pairINSC_8iteratorEbEERKT_:
 3646|     50|  std::pair<iterator, bool> find_or_prepare_insert(const K& key) {
 3647|     50|    AssertOnFind(key);
 3648|     50|    if (is_small()) return find_or_prepare_insert_small(key);
  ------------------
  |  Branch (3648:9): [True: 4, False: 46]
  ------------------
 3649|     46|    return find_or_prepare_insert_large(key);
 3650|     50|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE28find_or_prepare_insert_smallIS8_EENS4_4pairINSC_8iteratorEbEERKT_:
 3497|      4|  std::pair<iterator, bool> find_or_prepare_insert_small(const K& key) {
 3498|      4|    ABSL_SWISSTABLE_ASSERT(is_small());
  ------------------
  |  |  256|      4|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3499|       |    if constexpr (SooEnabled()) {
 3500|       |      return find_or_prepare_insert_soo(key);
 3501|       |    }
 3502|      4|    if (!empty()) {
  ------------------
  |  Branch (3502:9): [True: 2, False: 2]
  ------------------
 3503|      2|      if (equal_to(key, single_slot())) {
  ------------------
  |  Branch (3503:11): [True: 0, False: 2]
  ------------------
 3504|      0|        return {single_iterator(), false};
 3505|      0|      }
 3506|      2|    }
 3507|      4|    return {iterator_at_ptr(PrepareInsertSmallNonSoo(
 3508|      4|                common(), GetPolicyFunctions(),
 3509|      4|                HashKey<hasher, K, kIsDefaultHash>{hash_ref(), key})),
 3510|      4|            true};
 3511|      4|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE15iterator_at_ptrENS4_4pairIPNS1_6ctrl_tEPvEE:
 3678|      4|      ABSL_ATTRIBUTE_LIFETIME_BOUND {
 3679|      4|    return {ptrs.first, to_slot(ptrs.second), common().generation_ptr()};
 3680|      4|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE7to_slotEPv:
 3361|      8|  static ABSL_ATTRIBUTE_ALWAYS_INLINE slot_type* to_slot(void* buf) {
 3362|      8|    return static_cast<slot_type*>(buf);
 3363|      8|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE18GetPolicyFunctionsEv:
 3851|     52|  static const PolicyFunctions& GetPolicyFunctions() {
 3852|     52|    static_assert(sizeof(slot_type) <= (std::numeric_limits<uint32_t>::max)(),
 3853|     52|                  "Slot size is too large. Use std::unique_ptr for value type "
 3854|     52|                  "or use absl::node_hash_{map,set}.");
 3855|     52|    static_assert(alignof(slot_type) <=
 3856|     52|                  size_t{(std::numeric_limits<uint16_t>::max)()});
 3857|     52|    static_assert(sizeof(key_type) <=
 3858|     52|                  size_t{(std::numeric_limits<uint32_t>::max)()});
 3859|     52|    static_assert(sizeof(value_type) <=
 3860|     52|                  size_t{(std::numeric_limits<uint32_t>::max)()});
 3861|     52|    static constexpr size_t kBackingArrayAlignment =
 3862|     52|        BackingArrayAlignment(alignof(slot_type));
 3863|     52|    static constexpr PolicyFunctions value = {
 3864|     52|        static_cast<uint32_t>(sizeof(key_type)),
 3865|     52|        static_cast<uint32_t>(sizeof(value_type)),
 3866|     52|        static_cast<uint32_t>(sizeof(slot_type)),
 3867|     52|        static_cast<uint16_t>(alignof(slot_type)), SooEnabled(),
 3868|     52|        ShouldSampleHashtablezInfoForAlloc<CharAlloc>(),
 3869|       |        // TODO(b/328722020): try to type erase
 3870|       |        // for standard layout and alignof(Hash) <= alignof(CommonFields).
 3871|     52|        std::is_empty_v<hasher> ? &GetRefForEmptyClass
  ------------------
  |  Branch (3871:9): [True: 0, Folded]
  ------------------
 3872|     52|                                : &raw_hash_set::get_hash_ref_fn,
 3873|     52|        PolicyTraits::template get_hash_slot_fn<hasher, kIsDefaultHash>(),
 3874|     52|        PolicyTraits::transfer_uses_memcpy()
  ------------------
  |  Branch (3874:9): [True: 0, Folded]
  ------------------
 3875|     52|            ? TransferNRelocatable<sizeof(slot_type)>
 3876|     52|            : &raw_hash_set::transfer_n_slots_fn,
 3877|     52|        std::is_empty_v<Alloc> ? &GetRefForEmptyClass
  ------------------
  |  Branch (3877:9): [True: 0, Folded]
  ------------------
 3878|     52|                               : &raw_hash_set::get_char_alloc_ref_fn,
 3879|     52|        &AllocateBackingArray<kBackingArrayAlignment, CharAlloc>,
 3880|     52|        &DeallocateBackingArray<kBackingArrayAlignment, CharAlloc>,
 3881|     52|        &raw_hash_set::transfer_unprobed_elements_to_next_capacity_fn};
 3882|     52|    return value;
 3883|     52|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE46transfer_unprobed_elements_to_next_capacity_fnERNS1_12CommonFieldsEPKNS1_6ctrl_tEPvSI_PFvSI_hmmE:
 3804|      2|                                    size_t source_offset, size_t h1)) {
 3805|      2|    const size_t new_capacity = common.capacity();
 3806|      2|    const size_t old_capacity = PreviousCapacity(new_capacity);
 3807|      2|    ABSL_ASSUME(old_capacity + 1 >= Group::kWidth);
  ------------------
  |  |  271|      2|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 3808|      2|    ABSL_ASSUME((old_capacity + 1) % Group::kWidth == 0);
  ------------------
  |  |  271|      2|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 3809|       |
 3810|      2|    auto* set = reinterpret_cast<raw_hash_set*>(&common);
 3811|      2|    slot_type* old_slots_ptr = to_slot(old_slots);
 3812|      2|    ctrl_t* new_ctrl = common.control();
 3813|      2|    slot_type* new_slots = set->slot_array();
 3814|       |
 3815|      4|    for (size_t group_index = 0; group_index < old_capacity;
  ------------------
  |  Branch (3815:34): [True: 2, False: 2]
  ------------------
 3816|      2|         group_index += Group::kWidth) {
 3817|      2|      GroupFullEmptyOrDeleted old_g(old_ctrl + group_index);
 3818|      2|      std::memset(new_ctrl + group_index, static_cast<int8_t>(ctrl_t::kEmpty),
 3819|      2|                  Group::kWidth);
 3820|      2|      std::memset(new_ctrl + group_index + old_capacity + 1,
 3821|      2|                  static_cast<int8_t>(ctrl_t::kEmpty), Group::kWidth);
 3822|       |      // TODO(b/382423690): try to type erase everything outside of the loop.
 3823|       |      // We will share a lot of code in expense of one function call per group.
 3824|     28|      for (auto in_fixed_group_index : old_g.MaskFull()) {
  ------------------
  |  Branch (3824:38): [True: 28, False: 2]
  ------------------
 3825|     28|        size_t old_index = group_index + in_fixed_group_index;
 3826|     28|        slot_type* old_slot = old_slots_ptr + old_index;
 3827|       |        // TODO(b/382423690): try to avoid entire hash calculation since we need
 3828|       |        // only one new bit of h1.
 3829|     28|        size_t hash = set->hash_of(old_slot);
 3830|     28|        size_t h1 = H1(hash);
 3831|     28|        h2_t h2 = H2(hash);
 3832|     28|        size_t new_index = TryFindNewIndexWithoutProbing(
 3833|     28|            h1, old_index, old_capacity, new_ctrl, new_capacity);
 3834|       |        // Note that encode_probed_element is allowed to use old_ctrl buffer
 3835|       |        // till and included the old_index.
 3836|     28|        if (ABSL_PREDICT_FALSE(new_index == kProbedElementIndexSentinel)) {
  ------------------
  |  |  190|     28|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 28]
  |  |  |  Branch (190:49): [Folded, False: 28]
  |  |  |  Branch (190:58): [True: 0, False: 28]
  |  |  ------------------
  ------------------
 3837|      0|          encode_probed_element(probed_storage, h2, old_index, h1);
 3838|      0|          continue;
 3839|      0|        }
 3840|     28|        ABSL_SWISSTABLE_ASSERT((new_index & old_capacity) <= old_index);
  ------------------
  |  |  256|     28|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3841|       |        ABSL_SWISSTABLE_ASSERT(IsEmpty(new_ctrl[new_index]));
  ------------------
  |  |  256|     28|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3842|     28|        new_ctrl[new_index] = static_cast<ctrl_t>(h2);
 3843|     28|        auto* new_slot = new_slots + new_index;
 3844|     28|        SanitizerUnpoisonMemoryRegion(new_slot, sizeof(slot_type));
 3845|     28|        set->transfer(new_slot, old_slot);
 3846|     28|        SanitizerPoisonMemoryRegion(old_slot, sizeof(slot_type));
 3847|     28|      }
 3848|      2|    }
 3849|      2|  }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE7hash_ofEPNS1_13map_slot_typeIS8_SA_EE:
 3353|     28|  ABSL_ATTRIBUTE_ALWAYS_INLINE size_t hash_of(slot_type* slot) const {
 3354|     28|    return PolicyTraits::apply(
 3355|     28|        HashElement<hasher, kIsDefaultHash>{hash_ref(), common().seed().seed()},
 3356|     28|        PolicyTraits::element(slot));
 3357|     28|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8transferEPNS1_13map_slot_typeIS8_SA_EESF_:
 3217|     28|  inline void transfer(slot_type* to, slot_type* from) {
 3218|     28|    common().RunWithReentrancyGuard([&] {
 3219|     28|      allocator_type alloc(char_alloc_ref());
 3220|     28|      PolicyTraits::transfer(&alloc, to, from);
 3221|     28|    });
 3222|     28|  }
_ZN4absl12lts_2026052618container_internal12CommonFields22RunWithReentrancyGuardIZNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8transferEPNS1_13map_slot_typeISA_SC_EESH_EUlvE_EEvT_:
 1322|     28|  void RunWithReentrancyGuard(F f) {
 1323|     28|#ifdef NDEBUG
 1324|     28|    f();
 1325|     28|    return;
 1326|      0|#endif
 1327|      0|    const HashtableCapacity cap = maybe_invalid_capacity();
 1328|      0|    set_capacity(HashtableCapacity::CreateReentrance());
 1329|      0|    f();
 1330|      0|    set_capacity(cap);
 1331|      0|  }
_ZZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8transferEPNS1_13map_slot_typeIS8_SA_EESF_ENKUlvE_clEv:
 3218|     28|    common().RunWithReentrancyGuard([&] {
 3219|     28|      allocator_type alloc(char_alloc_ref());
 3220|     28|      PolicyTraits::transfer(&alloc, to, from);
 3221|     28|    });
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8hash_refEv:
 3768|      4|  hasher& hash_ref() { return settings_.template get<1>(); }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE28find_or_prepare_insert_largeIS8_EENS4_4pairINSC_8iteratorEbEERKT_:
 3514|     46|  std::pair<iterator, bool> find_or_prepare_insert_large(const K& key) {
 3515|     46|    ABSL_SWISSTABLE_ASSERT(!is_soo());
  ------------------
  |  |  256|     46|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3516|     46|    prefetch_heap_block();
 3517|     46|    const size_t hash = hash_of(key);
 3518|     46|    auto seq = probe(common(), hash);
 3519|     46|    const h2_t h2 = H2(hash);
 3520|     46|    const ctrl_t* ctrl = control();
 3521|     46|    size_t index;
 3522|     46|    bool inserted;
 3523|       |    // We use a lambda function to be able to exit from the nested loop without
 3524|       |    // duplicating generated code for the return statement (e.g. iterator_at).
 3525|     46|    [&]() ABSL_ATTRIBUTE_ALWAYS_INLINE {
 3526|     46|      while (true) {
 3527|     46|#ifndef ABSL_HAVE_MEMORY_SANITIZER
 3528|     46|        absl::PrefetchToLocalCache(slot_array() + seq.offset());
 3529|     46|#endif
 3530|     46|        Group g{ctrl + seq.offset()};
 3531|     46|        for (uint32_t i : g.Match(h2)) {
 3532|     46|          if (ABSL_PREDICT_TRUE(equal_to(key, slot_array() + seq.offset(i)))) {
 3533|     46|            index = seq.offset(i);
 3534|     46|            inserted = false;
 3535|     46|            return;
 3536|     46|          }
 3537|     46|        }
 3538|     46|        auto mask_empty = g.MaskEmpty();
 3539|     46|        if (ABSL_PREDICT_TRUE(mask_empty)) {
 3540|     46|          size_t target_group_offset = seq.offset();
 3541|     46|          index = SwisstableGenerationsEnabled()
 3542|     46|                      ? PrepareInsertLargeGenerationsEnabled(
 3543|     46|                            common(), GetPolicyFunctions(), hash, mask_empty,
 3544|     46|                            FindInfo{target_group_offset, seq.index()},
 3545|     46|                            HashKey<hasher, K, kIsDefaultHash>{hash_ref(), key})
 3546|     46|                      : PrepareInsertLarge(
 3547|     46|                            common(), GetPolicyFunctions(), hash, mask_empty,
 3548|     46|                            FindInfo{target_group_offset, seq.index()});
 3549|     46|          inserted = true;
 3550|     46|          return;
 3551|     46|        }
 3552|     46|        seq.next();
 3553|     46|        ABSL_SWISSTABLE_ASSERT(seq.index() <= capacity() && "full table!");
 3554|     46|      }
 3555|     46|    }();
 3556|     46|    return {iterator_at(index), inserted};
 3557|     46|  }
_ZZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE28find_or_prepare_insert_largeIS8_EENS4_4pairINSC_8iteratorEbEERKT_ENKUlvE_clEv:
 3525|     46|    [&]() ABSL_ATTRIBUTE_ALWAYS_INLINE {
 3526|     46|      while (true) {
  ------------------
  |  Branch (3526:14): [True: 46, Folded]
  ------------------
 3527|     46|#ifndef ABSL_HAVE_MEMORY_SANITIZER
 3528|     46|        absl::PrefetchToLocalCache(slot_array() + seq.offset());
 3529|     46|#endif
 3530|     46|        Group g{ctrl + seq.offset()};
 3531|     46|        for (uint32_t i : g.Match(h2)) {
  ------------------
  |  Branch (3531:25): [True: 2, False: 46]
  ------------------
 3532|      2|          if (ABSL_PREDICT_TRUE(equal_to(key, slot_array() + seq.offset(i)))) {
  ------------------
  |  |  191|      2|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 0, False: 2]
  |  |  |  Branch (191:48): [Folded, False: 2]
  |  |  |  Branch (191:57): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3533|      0|            index = seq.offset(i);
 3534|      0|            inserted = false;
 3535|      0|            return;
 3536|      0|          }
 3537|      2|        }
 3538|     46|        auto mask_empty = g.MaskEmpty();
 3539|     46|        if (ABSL_PREDICT_TRUE(mask_empty)) {
  ------------------
  |  |  191|     46|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 46, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 46]
  |  |  |  Branch (191:57): [True: 46, False: 0]
  |  |  ------------------
  ------------------
 3540|     46|          size_t target_group_offset = seq.offset();
 3541|     46|          index = SwisstableGenerationsEnabled()
  ------------------
  |  Branch (3541:19): [Folded, False: 46]
  ------------------
 3542|     46|                      ? PrepareInsertLargeGenerationsEnabled(
 3543|      0|                            common(), GetPolicyFunctions(), hash, mask_empty,
 3544|      0|                            FindInfo{target_group_offset, seq.index()},
 3545|      0|                            HashKey<hasher, K, kIsDefaultHash>{hash_ref(), key})
 3546|     46|                      : PrepareInsertLarge(
 3547|     46|                            common(), GetPolicyFunctions(), hash, mask_empty,
 3548|     46|                            FindInfo{target_group_offset, seq.index()});
 3549|     46|          inserted = true;
 3550|     46|          return;
 3551|     46|        }
 3552|      0|        seq.next();
 3553|       |        ABSL_SWISSTABLE_ASSERT(seq.index() <= capacity() && "full table!");
  ------------------
  |  |  256|      0|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3554|      0|      }
 3555|     46|    }();
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE10emplace_atIJRKNS4_21piecewise_construct_tENS4_5tupleIJOKS8_EEENSH_IJOSA_EEEEEEvNSC_8iteratorEDpOT_:
 3661|     50|  void emplace_at(iterator iter, Args&&... args) {
 3662|     50|    construct(iter.slot(), std::forward<Args>(args)...);
 3663|       |
 3664|       |    // When is_small, find calls find_small and if size is 0, then it will
 3665|       |    // return an end iterator. This can happen in the raw_hash_set copy ctor.
 3666|       |    assert((is_small() ||
 3667|     50|            PolicyTraits::apply(FindElement{*this}, *iter) == iter) &&
 3668|     50|           "constructed value does not match the lookup key");
 3669|     50|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE9constructIJRKNS4_21piecewise_construct_tENS4_5tupleIJOKS8_EEENSH_IJOSA_EEEEEEvPNS1_13map_slot_typeIS8_SA_EEDpOT_:
 3205|     50|  inline void construct(slot_type* slot, Args&&... args) {
 3206|     50|    common().RunWithReentrancyGuard([&] {
 3207|     50|      allocator_type alloc(char_alloc_ref());
 3208|     50|      PolicyTraits::construct(&alloc, slot, std::forward<Args>(args)...);
 3209|     50|    });
 3210|     50|  }
_ZN4absl12lts_2026052618container_internal12CommonFields22RunWithReentrancyGuardIZNS1_12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE9constructIJRKNS6_21piecewise_construct_tENS6_5tupleIJOKSA_EEENSJ_IJOSC_EEEEEEvPNS1_13map_slot_typeISA_SC_EEDpOT_EUlvE_EEvT_:
 1322|     50|  void RunWithReentrancyGuard(F f) {
 1323|     50|#ifdef NDEBUG
 1324|     50|    f();
 1325|     50|    return;
 1326|      0|#endif
 1327|      0|    const HashtableCapacity cap = maybe_invalid_capacity();
 1328|      0|    set_capacity(HashtableCapacity::CreateReentrance());
 1329|      0|    f();
 1330|      0|    set_capacity(cap);
 1331|      0|  }
_ZZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE9constructIJRKNS4_21piecewise_construct_tENS4_5tupleIJOKS8_EEENSH_IJOSA_EEEEEEvPNS1_13map_slot_typeIS8_SA_EEDpOT_ENKUlvE_clEv:
 3206|     50|    common().RunWithReentrancyGuard([&] {
 3207|     50|      allocator_type alloc(char_alloc_ref());
 3208|     50|      PolicyTraits::construct(&alloc, slot, std::forward<Args>(args)...);
 3209|     50|    });
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iterator4slotEv:
 2285|     50|    slot_type* slot() const { return slot_; }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE5beginEv:
 2568|      2|  iterator begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 2569|      2|    if (ABSL_PREDICT_FALSE(empty())) return end();
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 2570|      2|    if (is_small()) return single_iterator();
  ------------------
  |  Branch (2570:9): [True: 0, False: 2]
  ------------------
 2571|      2|    iterator it = {control(), common().slots_union(),
 2572|      2|                   common().generation_ptr()};
 2573|      2|    it.skip_empty_or_deleted();
 2574|       |    ABSL_SWISSTABLE_ASSERT(IsFull(*it.control()));
  ------------------
  |  |  256|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 2575|      2|    return it;
 2576|      2|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iteratorC2EPNS1_6ctrl_tENS1_19MaybeInitializedPtrIvEEPKh:
 2248|      2|        : HashSetIteratorGenerationInfo(generation_ptr),
 2249|      2|          ctrl_(ctrl),
 2250|      2|          slot_(to_slot(slot.get())) {
 2251|       |      // This assumption helps the compiler know that any non-end iterator is
 2252|       |      // not equal to any end iterator.
 2253|      2|      ABSL_ASSUME(ctrl != nullptr);
  ------------------
  |  |  271|      2|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 2254|      2|    }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iterator21skip_empty_or_deletedEv:
 2265|     52|    void skip_empty_or_deleted() {
 2266|     64|      while (IsEmptyOrDeleted(*ctrl_)) {
  ------------------
  |  Branch (2266:14): [True: 12, False: 52]
  ------------------
 2267|     12|        ++ctrl_;
 2268|     12|        ++slot_;
 2269|     12|      }
 2270|     52|    }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iteratorppEv:
 2207|     50|    iterator& operator++() {
 2208|     50|      assert_is_full("operator++");
 2209|     50|      ++ctrl_;
 2210|     50|      ++slot_;
 2211|     50|      skip_empty_or_deleted();
 2212|     50|      if (ABSL_PREDICT_FALSE(*ctrl_ == ctrl_t::kSentinel)) ctrl_ = nullptr;
  ------------------
  |  |  190|     50|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 48]
  |  |  |  Branch (190:49): [Folded, False: 50]
  |  |  |  Branch (190:58): [True: 2, False: 48]
  |  |  ------------------
  ------------------
 2213|     50|      return *this;
 2214|     50|    }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iteratordeEv:
 2195|     50|    reference operator*() const {
 2196|     50|      assert_is_full("operator*()");
 2197|     50|      return unchecked_deref();
 2198|     50|    }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE8iterator15unchecked_derefEv:
 2282|     50|    reference unchecked_deref() const { return PolicyTraits::element(slot_); }
_ZNK4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE4sizeEv:
 2594|      8|  size_t size() const {
 2595|      8|    AssertNotDebugCapacity();
 2596|      8|    const size_t size = common().size();
 2597|      8|    [[maybe_unused]] const size_t kMaxValidSize = MaxValidSize();
 2598|      8|    ABSL_ASSUME(size <= kMaxValidSize);
  ------------------
  |  |  271|      8|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 2599|      8|    return size;
 2600|      8|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE5clearEv:
 2614|      2|  ABSL_ATTRIBUTE_REINITIALIZES void clear() {
 2615|      2|    if (SwisstableGenerationsEnabled() &&
  ------------------
  |  Branch (2615:9): [Folded, False: 2]
  |  Branch (2615:9): [Folded, False: 2]
  ------------------
 2616|      0|        maybe_invalid_capacity().IsMovedFrom()) {
  ------------------
  |  Branch (2616:9): [True: 0, False: 0]
  ------------------
 2617|      0|      common().set_capacity(DefaultCapacity());
 2618|      0|    }
 2619|      2|    AssertNotDebugCapacity();
 2620|       |    // Iterating over this container is O(bucket_count()). When bucket_count()
 2621|       |    // is much greater than size(), iteration becomes prohibitively expensive.
 2622|       |    // For clear() it is more important to reuse the allocated array when the
 2623|       |    // container is small because allocation takes comparatively long time
 2624|       |    // compared to destruction of the elements of the container. So we pick the
 2625|       |    // largest bucket_count() threshold for which iteration is still fast and
 2626|       |    // past that we simply deallocate the array.
 2627|      2|    const size_t cap = capacity();
 2628|      2|    if (cap == 0) {
  ------------------
  |  Branch (2628:9): [True: 0, False: 2]
  ------------------
 2629|       |      // Already guaranteed to be empty; so nothing to do.
 2630|      2|    } else if (is_small()) {
  ------------------
  |  Branch (2630:16): [True: 0, False: 2]
  ------------------
 2631|      0|      if (!empty()) {
  ------------------
  |  Branch (2631:11): [True: 0, False: 0]
  ------------------
 2632|      0|        destroy(single_slot());
 2633|      0|        decrement_small_size();
 2634|      0|      }
 2635|      2|    } else {
 2636|      2|      destroy_slots();
 2637|      2|      clear_backing_array(/*reuse=*/cap < 128);
 2638|      2|    }
 2639|      2|    common().set_reserved_growth(0);
 2640|      2|    common().set_reservation_size(0);
 2641|      2|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEE19clear_backing_arrayEb:
 3275|      2|  void clear_backing_array(bool reuse) {
 3276|       |    ABSL_SWISSTABLE_ASSERT(capacity() > MaxSmallCapacity());
  ------------------
  |  |  256|      2|  assert((CONDITION) && "Try enabling sanitizers.")
  ------------------
 3277|      2|    ClearBackingArray(common(), GetPolicyFunctions(), &char_alloc_ref(), reuse);
 3278|      2|  }
_ZN4absl12lts_2026052618container_internal12raw_hash_setINS1_17FlatHashMapPolicyINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEPNS0_15CommandLineFlagEEEJEEC2Ev:
 2352|      2|      std::is_nothrow_default_constructible<allocator_type>::value) {}
_ZN4absl12lts_2026052618container_internal20AllocateBackingArrayILm8ENSt3__19allocatorIcEEEEPvS6_m:
 1722|     10|void* AllocateBackingArray(void* alloc, size_t n) {
 1723|     10|  return Allocate<AlignOfBackingArray>(static_cast<Alloc*>(alloc), n);
 1724|     10|}
_ZN4absl12lts_2026052618container_internal22DeallocateBackingArrayILm8ENSt3__19allocatorIcEEEEvPvmPNS1_6ctrl_tEmmb:
 1731|      8|    size_t slot_align, bool had_infoz) {
 1732|      8|  RawHashSetLayout layout(capacity, slot_size, slot_align, had_infoz);
 1733|      8|  void* backing_array = ctrl - layout.control_offset();
 1734|       |  // Unpoison before returning the memory to the allocator.
 1735|      8|  SanitizerUnpoisonMemoryRegion(backing_array, layout.alloc_size());
 1736|      8|  Deallocate<AlignOfBackingArray>(static_cast<Alloc*>(alloc), backing_array,
 1737|      8|                                  layout.alloc_size());
 1738|      8|}

_ZN4absl12lts_2026052627InstallFailureSignalHandlerERKNS0_27FailureSignalHandlerOptionsE:
  426|      2|void InstallFailureSignalHandler(const FailureSignalHandlerOptions& options) {
  427|      2|  fsh_options = options;
  428|     14|  for (auto& it : failure_signal_data) {
  ------------------
  |  Branch (428:17): [True: 14, False: 2]
  ------------------
  429|     14|    InstallOneFailureHandler(&it, AbslFailureSignalHandler);
  430|     14|  }
  431|      2|}
failure_signal_handler.cc:_ZN4absl12lts_20260526L24InstallOneFailureHandlerEPNS0_17FailureSignalDataEPFviP9siginfo_tPvE:
  231|     14|                                     void (*handler)(int, siginfo_t*, void*)) {
  232|     14|  struct sigaction act;
  233|     14|  memset(&act, 0, sizeof(act));
  234|     14|  sigemptyset(&act.sa_mask);
  235|     14|  act.sa_flags |= SA_SIGINFO;
  236|       |  // SA_NODEFER is required to handle SIGABRT from
  237|       |  // ImmediateAbortSignalHandler().
  238|     14|  act.sa_flags |= SA_NODEFER;
  239|     14|  if (fsh_options.use_alternate_stack) {
  ------------------
  |  Branch (239:7): [True: 14, False: 0]
  ------------------
  240|     14|    act.sa_flags |= MaybeSetupAlternateStack();
  241|     14|  }
  242|     14|  act.sa_sigaction = handler;
  243|       |  ABSL_RAW_CHECK(sigaction(data->signo, &act, &data->previous_action) == 0,
  ------------------
  |  |   60|     14|  do {                                                                 \
  |  |   61|     14|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     14|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 14]
  |  |  |  |  |  Branch (190:49): [Folded, False: 14]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     14|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 14]
  |  |  ------------------
  ------------------
  244|     14|                 "sigaction() failed");
  245|     14|}
failure_signal_handler.cc:_ZN4absl12lts_20260526L24MaybeSetupAlternateStackEv:
  221|     14|static int MaybeSetupAlternateStack() {
  222|     14|#ifdef ABSL_HAVE_SIGALTSTACK
  223|     14|  ABSL_ATTRIBUTE_UNUSED static const bool kOnce = SetupAlternateStackOnce();
  ------------------
  |  |  582|     14|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
  224|     14|  return SA_ONSTACK;
  225|       |#else
  226|       |  return 0;
  227|       |#endif
  228|     14|}
failure_signal_handler.cc:_ZN4absl12lts_20260526L23SetupAlternateStackOnceEv:
  159|      2|static bool SetupAlternateStackOnce() {
  160|       |#if defined(__wasm__) || defined(__asmjs__)
  161|       |  const size_t page_mask = static_cast<size_t>(getpagesize()) - 1;
  162|       |#else
  163|      2|  const size_t page_mask = static_cast<size_t>(sysconf(_SC_PAGESIZE)) - 1;
  164|      2|#endif
  165|      2|  size_t stack_size =
  166|      2|      (std::max(static_cast<size_t>(SIGSTKSZ), size_t{65536}) + page_mask) &
  167|      2|      ~page_mask;
  168|       |#if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
  169|       |    defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER)
  170|       |  // Account for sanitizer instrumentation requiring additional stack space.
  171|       |  stack_size *= 5;
  172|       |#endif
  173|       |
  174|      2|  stack_t sigstk;
  175|      2|  memset(&sigstk, 0, sizeof(sigstk));
  176|      2|  sigstk.ss_size = stack_size;
  177|       |
  178|      2|#ifdef ABSL_HAVE_MMAP
  179|       |#ifndef MAP_STACK
  180|       |#define MAP_STACK 0
  181|       |#endif
  182|      2|  sigstk.ss_sp = mmap(nullptr, sigstk.ss_size, PROT_READ | PROT_WRITE,
  183|      2|                      MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);
  184|      2|  if (sigstk.ss_sp == MAP_FAILED) {
  ------------------
  |  Branch (184:7): [True: 0, False: 2]
  ------------------
  185|      0|    ABSL_RAW_LOG(FATAL, "mmap() for alternate signal stack failed");
  ------------------
  |  |   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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  186|      0|  }
  187|       |#else
  188|       |  sigstk.ss_sp = malloc(sigstk.ss_size);
  189|       |  if (sigstk.ss_sp == nullptr) {
  190|       |    ABSL_RAW_LOG(FATAL, "malloc() for alternate signal stack failed");
  191|       |  }
  192|       |#endif
  193|       |
  194|      2|  if (sigaltstack(&sigstk, nullptr) != 0) {
  ------------------
  |  Branch (194:7): [True: 0, False: 2]
  ------------------
  195|      0|    ABSL_RAW_LOG(FATAL, "sigaltstack() failed with errno=%d", errno);
  ------------------
  |  |   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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  196|      0|  }
  197|       |
  198|      2|#ifdef __linux__
  199|       |#if defined(PR_SET_VMA) && defined(PR_SET_VMA_ANON_NAME)
  200|       |  // Make a best-effort attempt to name the allocated region in
  201|       |  // /proc/$PID/smaps.
  202|       |  //
  203|       |  // The call to prctl() may fail if the kernel was not configured with the
  204|       |  // CONFIG_ANON_VMA_NAME kernel option.  This is OK since the call is
  205|       |  // primarily a debugging aid.
  206|       |  prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, sigstk.ss_sp, sigstk.ss_size,
  207|       |        "absl-signalstack");
  208|       |#endif
  209|      2|#endif  // __linux__
  210|       |
  211|      2|  return true;
  212|      2|}

_ZN4absl12lts_2026052618debugging_internal11ElfMemImageC2EPKv:
   87|      2|ElfMemImage::ElfMemImage(const void *base) {
   88|      2|  ABSL_RAW_CHECK(base != kInvalidBase, "bad pointer");
  ------------------
  |  |   60|      2|  do {                                                                 \
  |  |   61|      2|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|      2|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
   89|      2|  Init(base);
   90|      2|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage13GetNumSymbolsEv:
   92|     68|uint32_t ElfMemImage::GetNumSymbols() const { return num_syms_; }
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage9GetDynsymEj:
   94|     22|const ElfW(Sym) * ElfMemImage::GetDynsym(uint32_t index) const {
   95|     22|  ABSL_RAW_CHECK(index < GetNumSymbols(), "index out of range");
  ------------------
  |  |   60|     22|  do {                                                                 \
  |  |   61|     22|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     22|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 22]
  |  |  |  |  |  Branch (190:49): [Folded, False: 22]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     22|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 22]
  |  |  ------------------
  ------------------
   96|     22|  return dynsym_ + index;
   97|     22|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage9GetVersymEj:
   99|     22|const ElfW(Versym) *ElfMemImage::GetVersym(uint32_t index) const {
  100|     22|  ABSL_RAW_CHECK(index < GetNumSymbols(), "index out of range");
  ------------------
  |  |   60|     22|  do {                                                                 \
  |  |   61|     22|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     22|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 22]
  |  |  |  |  |  Branch (190:49): [Folded, False: 22]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     22|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 22]
  |  |  ------------------
  ------------------
  101|     22|  return versym_ + index;
  102|     22|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage7GetPhdrEi:
  104|      8|const ElfW(Phdr) *ElfMemImage::GetPhdr(int index) const {
  105|      8|  ABSL_RAW_CHECK(index >= 0 && index < ehdr_->e_phnum, "index out of range");
  ------------------
  |  |   60|      8|  do {                                                                 \
  |  |   61|      8|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     16|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 8]
  |  |  |  |  |  Branch (190:49): [Folded, False: 8]
  |  |  |  |  |  Branch (190:59): [True: 8, False: 0]
  |  |  |  |  |  Branch (190:59): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|      8|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 8]
  |  |  ------------------
  ------------------
  106|      8|  return GetTableElement<ElfW(Phdr)>(ehdr_, ehdr_->e_phoff, ehdr_->e_phentsize,
  107|      8|                                     static_cast<size_t>(index));
  108|      8|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage9GetDynstrEj:
  110|     22|const char *ElfMemImage::GetDynstr(ElfW(Word) offset) const {
  111|     22|  ABSL_RAW_CHECK(offset < strsize_, "offset out of range");
  ------------------
  |  |   60|     22|  do {                                                                 \
  |  |   61|     22|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     22|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 22]
  |  |  |  |  |  Branch (190:49): [Folded, False: 22]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     22|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 22]
  |  |  ------------------
  ------------------
  112|     22|  return dynstr_ + offset;
  113|     22|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage10GetSymAddrEPK9Elf64_Sym:
  115|     22|const void *ElfMemImage::GetSymAddr(const ElfW(Sym) *sym) const {
  116|     22|  if (sym->st_shndx == SHN_UNDEF || sym->st_shndx >= SHN_LORESERVE) {
  ------------------
  |  Branch (116:7): [True: 2, False: 20]
  |  Branch (116:37): [True: 2, False: 18]
  ------------------
  117|       |    // Symbol corresponds to "special" (e.g. SHN_ABS) section.
  118|      4|    return reinterpret_cast<const void *>(sym->st_value);
  119|      4|  }
  120|     18|  ABSL_RAW_CHECK(link_base_ < sym->st_value, "symbol out of range");
  ------------------
  |  |   60|     18|  do {                                                                 \
  |  |   61|     18|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     18|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 18]
  |  |  |  |  |  Branch (190:49): [Folded, False: 18]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     18|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 18]
  |  |  ------------------
  ------------------
  121|     18|  return GetTableElement<char>(ehdr_, 0, 1, sym->st_value - link_base_);
  122|     18|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage9GetVerdefEi:
  124|     20|const ElfW(Verdef) *ElfMemImage::GetVerdef(int index) const {
  125|     20|  ABSL_RAW_CHECK(0 <= index && static_cast<size_t>(index) <= verdefnum_,
  ------------------
  |  |   60|     20|  do {                                                                 \
  |  |   61|     20|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     40|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 20]
  |  |  |  |  |  Branch (190:49): [Folded, False: 20]
  |  |  |  |  |  Branch (190:59): [True: 20, False: 0]
  |  |  |  |  |  Branch (190:59): [True: 20, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     20|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 20]
  |  |  ------------------
  ------------------
  126|     20|                 "index out of range");
  127|     20|  const ElfW(Verdef) *version_definition = verdef_;
  128|     40|  while (version_definition->vd_ndx < index && version_definition->vd_next) {
  ------------------
  |  Branch (128:10): [True: 20, False: 20]
  |  Branch (128:48): [True: 20, False: 0]
  ------------------
  129|     20|    const char *const version_definition_as_char =
  130|     20|        reinterpret_cast<const char *>(version_definition);
  131|     20|    version_definition =
  132|     20|        reinterpret_cast<const ElfW(Verdef) *>(version_definition_as_char +
  133|     20|                                               version_definition->vd_next);
  134|     20|  }
  135|     20|  return version_definition->vd_ndx == index ? version_definition : nullptr;
  ------------------
  |  Branch (135:10): [True: 20, False: 0]
  ------------------
  136|     20|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage12GetVerdefAuxEPK12Elf64_Verdef:
  139|     20|    const ElfW(Verdef) *verdef) const {
  140|     20|  return reinterpret_cast<const ElfW(Verdaux) *>(verdef+1);
  141|     20|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage9GetVerstrEj:
  143|     20|const char *ElfMemImage::GetVerstr(ElfW(Word) offset) const {
  144|     20|  ABSL_RAW_CHECK(offset < strsize_, "offset out of range");
  ------------------
  |  |   60|     20|  do {                                                                 \
  |  |   61|     20|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     20|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 20]
  |  |  |  |  |  Branch (190:49): [Folded, False: 20]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     20|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 20]
  |  |  ------------------
  ------------------
  145|     20|  return dynstr_ + offset;
  146|     20|}
_ZN4absl12lts_2026052618debugging_internal11ElfMemImage4InitEPKv:
  148|      2|void ElfMemImage::Init(const void *base) {
  149|      2|  ehdr_      = nullptr;
  150|      2|  dynsym_    = nullptr;
  151|      2|  dynstr_    = nullptr;
  152|      2|  versym_    = nullptr;
  153|      2|  verdef_    = nullptr;
  154|      2|  num_syms_ = 0;
  155|      2|  strsize_   = 0;
  156|      2|  verdefnum_ = 0;
  157|       |  // Sentinel: PT_LOAD .p_vaddr can't possibly be this.
  158|      2|  link_base_ = ~ElfW(Addr){0};  // NOLINT(readability/braces)
  159|      2|  if (!base) {
  ------------------
  |  Branch (159:7): [True: 0, False: 2]
  ------------------
  160|      0|    return;
  161|      0|  }
  162|      2|  const char *const base_as_char = reinterpret_cast<const char *>(base);
  163|      2|  if (base_as_char[EI_MAG0] != ELFMAG0 || base_as_char[EI_MAG1] != ELFMAG1 ||
  ------------------
  |  Branch (163:7): [True: 0, False: 2]
  |  Branch (163:43): [True: 0, False: 2]
  ------------------
  164|      2|      base_as_char[EI_MAG2] != ELFMAG2 || base_as_char[EI_MAG3] != ELFMAG3) {
  ------------------
  |  Branch (164:7): [True: 0, False: 2]
  |  Branch (164:43): [True: 0, False: 2]
  ------------------
  165|      0|    assert(false);
  166|      0|    return;
  167|      0|  }
  168|      2|  int elf_class = base_as_char[EI_CLASS];
  169|      2|  if (elf_class != kElfClass) {
  ------------------
  |  Branch (169:7): [True: 0, False: 2]
  ------------------
  170|      0|    assert(false);
  171|      0|    return;
  172|      0|  }
  173|      2|  switch (base_as_char[EI_DATA]) {
  174|      2|    case ELFDATA2LSB: {
  ------------------
  |  Branch (174:5): [True: 2, False: 0]
  ------------------
  175|       |#ifndef ABSL_IS_LITTLE_ENDIAN
  176|       |      assert(false);
  177|       |      return;
  178|       |#endif
  179|      2|      break;
  180|      0|    }
  181|      0|    case ELFDATA2MSB: {
  ------------------
  |  Branch (181:5): [True: 0, False: 2]
  ------------------
  182|      0|#ifndef ABSL_IS_BIG_ENDIAN
  183|      0|      assert(false);
  184|      0|      return;
  185|      0|#endif
  186|      0|      break;
  187|      0|    }
  188|      0|    default: {
  ------------------
  |  Branch (188:5): [True: 0, False: 2]
  ------------------
  189|      0|      assert(false);
  190|      0|      return;
  191|      0|    }
  192|      2|  }
  193|       |
  194|      2|  ehdr_ = reinterpret_cast<const ElfW(Ehdr) *>(base);
  195|      2|  const ElfW(Phdr) *dynamic_program_header = nullptr;
  196|     10|  for (int i = 0; i < ehdr_->e_phnum; ++i) {
  ------------------
  |  Branch (196:19): [True: 8, False: 2]
  ------------------
  197|      8|    const ElfW(Phdr) *const program_header = GetPhdr(i);
  198|      8|    switch (program_header->p_type) {
  ------------------
  |  Branch (198:13): [True: 4, False: 4]
  ------------------
  199|      2|      case PT_LOAD:
  ------------------
  |  Branch (199:7): [True: 2, False: 6]
  ------------------
  200|      2|        if (!~link_base_) {
  ------------------
  |  Branch (200:13): [True: 2, False: 0]
  ------------------
  201|      2|          link_base_ = program_header->p_vaddr;
  202|      2|        }
  203|      2|        break;
  204|      2|      case PT_DYNAMIC:
  ------------------
  |  Branch (204:7): [True: 2, False: 6]
  ------------------
  205|      2|        dynamic_program_header = program_header;
  206|      2|        break;
  207|      8|    }
  208|      8|  }
  209|      2|  if (!~link_base_ || !dynamic_program_header) {
  ------------------
  |  Branch (209:7): [True: 0, False: 2]
  |  Branch (209:23): [True: 0, False: 2]
  ------------------
  210|      0|    assert(false);
  211|       |    // Mark this image as not present. Can not recur infinitely.
  212|      0|    Init(nullptr);
  213|      0|    return;
  214|      0|  }
  215|      2|  ptrdiff_t relocation =
  216|      2|      base_as_char - reinterpret_cast<const char *>(link_base_);
  217|      2|  ElfW(Dyn)* dynamic_entry = reinterpret_cast<ElfW(Dyn)*>(
  218|      2|      static_cast<intptr_t>(dynamic_program_header->p_vaddr) + relocation);
  219|      2|  uint32_t *sysv_hash = nullptr;
  220|      2|  uint32_t *gnu_hash = nullptr;
  221|     26|  for (; dynamic_entry->d_tag != DT_NULL; ++dynamic_entry) {
  ------------------
  |  Branch (221:10): [True: 24, False: 2]
  ------------------
  222|     24|    const auto value =
  223|     24|        static_cast<intptr_t>(dynamic_entry->d_un.d_val) + relocation;
  224|     24|    switch (dynamic_entry->d_tag) {
  225|      2|      case DT_HASH:
  ------------------
  |  Branch (225:7): [True: 2, False: 22]
  ------------------
  226|      2|        sysv_hash = reinterpret_cast<uint32_t *>(value);
  227|      2|        break;
  228|      2|      case DT_GNU_HASH:
  ------------------
  |  Branch (228:7): [True: 2, False: 22]
  ------------------
  229|      2|        gnu_hash = reinterpret_cast<uint32_t *>(value);
  230|      2|        break;
  231|      2|      case DT_SYMTAB:
  ------------------
  |  Branch (231:7): [True: 2, False: 22]
  ------------------
  232|      2|        dynsym_ = reinterpret_cast<ElfW(Sym) *>(value);
  233|      2|        break;
  234|      2|      case DT_STRTAB:
  ------------------
  |  Branch (234:7): [True: 2, False: 22]
  ------------------
  235|      2|        dynstr_ = reinterpret_cast<const char *>(value);
  236|      2|        break;
  237|      2|      case DT_VERSYM:
  ------------------
  |  Branch (237:7): [True: 2, False: 22]
  ------------------
  238|      2|        versym_ = reinterpret_cast<ElfW(Versym) *>(value);
  239|      2|        break;
  240|      2|      case DT_VERDEF:
  ------------------
  |  Branch (240:7): [True: 2, False: 22]
  ------------------
  241|      2|        verdef_ = reinterpret_cast<ElfW(Verdef) *>(value);
  242|      2|        break;
  243|      2|      case DT_VERDEFNUM:
  ------------------
  |  Branch (243:7): [True: 2, False: 22]
  ------------------
  244|      2|        verdefnum_ = static_cast<size_t>(dynamic_entry->d_un.d_val);
  245|      2|        break;
  246|      2|      case DT_STRSZ:
  ------------------
  |  Branch (246:7): [True: 2, False: 22]
  ------------------
  247|      2|        strsize_ = static_cast<size_t>(dynamic_entry->d_un.d_val);
  248|      2|        break;
  249|      8|      default:
  ------------------
  |  Branch (249:7): [True: 8, False: 16]
  ------------------
  250|       |        // Unrecognized entries explicitly ignored.
  251|      8|        break;
  252|     24|    }
  253|     24|  }
  254|      2|  if ((!sysv_hash && !gnu_hash) || !dynsym_ || !dynstr_ || !versym_ ||
  ------------------
  |  Branch (254:8): [True: 0, False: 2]
  |  Branch (254:22): [True: 0, False: 0]
  |  Branch (254:36): [True: 0, False: 2]
  |  Branch (254:48): [True: 0, False: 2]
  |  Branch (254:60): [True: 0, False: 2]
  ------------------
  255|      2|      !verdef_ || !verdefnum_ || !strsize_) {
  ------------------
  |  Branch (255:7): [True: 0, False: 2]
  |  Branch (255:19): [True: 0, False: 2]
  |  Branch (255:34): [True: 0, False: 2]
  ------------------
  256|      0|    assert(false);  // invalid VDSO
  257|       |    // Mark this image as not present. Can not recur infinitely.
  258|      0|    Init(nullptr);
  259|      0|    return;
  260|      0|  }
  261|      2|  if (sysv_hash) {
  ------------------
  |  Branch (261:7): [True: 2, False: 0]
  ------------------
  262|      2|    num_syms_ = sysv_hash[1];
  263|      2|  } else {
  264|      0|    assert(gnu_hash);
  265|       |    // Compute the number of symbols for DT_GNU_HASH, which is specified by
  266|       |    // https://sourceware.org/gnu-gabi/program-loading-and-dynamic-linking.txt
  267|      0|    uint32_t nbuckets = gnu_hash[0];
  268|       |    // The buckets array is located after the header (4 uint32) and the bloom
  269|       |    // filter (size_t array of gnu_hash[2] elements).
  270|      0|    uint32_t *buckets = gnu_hash + 4 + sizeof(size_t) / 4 * gnu_hash[2];
  271|       |    // Find the chain of the last non-empty bucket.
  272|      0|    uint32_t idx = 0;
  273|      0|    for (uint32_t i = nbuckets; i > 0;) {
  ------------------
  |  Branch (273:33): [True: 0, False: 0]
  ------------------
  274|      0|      idx = buckets[--i];
  275|      0|      if (idx != 0) break;
  ------------------
  |  Branch (275:11): [True: 0, False: 0]
  ------------------
  276|      0|    }
  277|      0|    if (idx != 0) {
  ------------------
  |  Branch (277:9): [True: 0, False: 0]
  ------------------
  278|       |      // Find the last element of the chain, which has an odd value.
  279|       |      // Add one to get the number of symbols.
  280|      0|      uint32_t *chain = buckets + nbuckets - gnu_hash[1];
  281|      0|      while (chain[idx++] % 2 == 0) {
  ------------------
  |  Branch (281:14): [True: 0, False: 0]
  ------------------
  282|      0|      }
  283|      0|    }
  284|      0|    num_syms_ = idx;
  285|      0|  }
  286|      2|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage12LookupSymbolEPKcS4_iPNS2_10SymbolInfoE:
  291|      2|                               SymbolInfo *info_out) const {
  292|     22|  for (const SymbolInfo& info : *this) {
  ------------------
  |  Branch (292:31): [True: 22, False: 0]
  ------------------
  293|     22|    if (strcmp(info.name, name) == 0 && strcmp(info.version, version) == 0 &&
  ------------------
  |  Branch (293:9): [True: 2, False: 20]
  |  Branch (293:41): [True: 2, False: 0]
  ------------------
  294|      2|        ElfType(info.symbol) == type) {
  ------------------
  |  Branch (294:9): [True: 2, False: 0]
  ------------------
  295|      2|      if (info_out) {
  ------------------
  |  Branch (295:11): [True: 2, False: 0]
  ------------------
  296|      2|        *info_out = info;
  297|      2|      }
  298|      2|      return true;
  299|      2|    }
  300|     22|  }
  301|      0|  return false;
  302|      2|}
_ZN4absl12lts_2026052618debugging_internal11ElfMemImage14SymbolIteratorC2EPKvj:
  332|      4|    : index_(index), image_(image) {}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage14SymbolIteratordeEv:
  338|     22|const ElfMemImage::SymbolInfo& ElfMemImage::SymbolIterator::operator*() const {
  339|     22|  return info_;
  340|     22|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage14SymbolIteratoreqERKS3_:
  342|     22|bool ElfMemImage::SymbolIterator::operator==(const SymbolIterator &rhs) const {
  343|     22|  return this->image_ == rhs.image_ && this->index_ == rhs.index_;
  ------------------
  |  Branch (343:10): [True: 22, False: 0]
  |  Branch (343:40): [True: 0, False: 22]
  ------------------
  344|     22|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage14SymbolIteratorneERKS3_:
  346|     22|bool ElfMemImage::SymbolIterator::operator!=(const SymbolIterator &rhs) const {
  347|     22|  return !(*this == rhs);
  348|     22|}
_ZN4absl12lts_2026052618debugging_internal11ElfMemImage14SymbolIteratorppEv:
  350|     20|ElfMemImage::SymbolIterator &ElfMemImage::SymbolIterator::operator++() {
  351|     20|  this->Update(1);
  352|     20|  return *this;
  353|     20|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage5beginEv:
  355|      2|ElfMemImage::SymbolIterator ElfMemImage::begin() const {
  356|      2|  SymbolIterator it(this, 0);
  357|      2|  it.Update(0);
  358|      2|  return it;
  359|      2|}
_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage3endEv:
  361|      2|ElfMemImage::SymbolIterator ElfMemImage::end() const {
  362|      2|  return SymbolIterator(this, GetNumSymbols());
  363|      2|}
_ZN4absl12lts_2026052618debugging_internal11ElfMemImage14SymbolIterator6UpdateEj:
  365|     22|void ElfMemImage::SymbolIterator::Update(uint32_t increment) {
  366|     22|  const ElfMemImage *image = reinterpret_cast<const ElfMemImage *>(image_);
  367|     22|  ABSL_RAW_CHECK(image->IsPresent() || increment == 0, "");
  ------------------
  |  |   60|     22|  do {                                                                 \
  |  |   61|     22|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     22|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 22]
  |  |  |  |  |  Branch (190:49): [Folded, False: 22]
  |  |  |  |  |  Branch (190:59): [True: 22, False: 0]
  |  |  |  |  |  Branch (190:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     22|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 22]
  |  |  ------------------
  ------------------
  368|     22|  if (!image->IsPresent()) {
  ------------------
  |  Branch (368:7): [True: 0, False: 22]
  ------------------
  369|      0|    return;
  370|      0|  }
  371|     22|  index_ += increment;
  372|     22|  if (index_ >= image->GetNumSymbols()) {
  ------------------
  |  Branch (372:7): [True: 0, False: 22]
  ------------------
  373|      0|    index_ = image->GetNumSymbols();
  374|      0|    return;
  375|      0|  }
  376|     22|  const ElfW(Sym)    *symbol = image->GetDynsym(index_);
  377|     22|  const ElfW(Versym) *version_symbol = image->GetVersym(index_);
  378|     22|  ABSL_RAW_CHECK(symbol && version_symbol, "");
  ------------------
  |  |   60|     22|  do {                                                                 \
  |  |   61|     22|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     44|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 22]
  |  |  |  |  |  Branch (190:49): [Folded, False: 22]
  |  |  |  |  |  Branch (190:59): [True: 22, False: 0]
  |  |  |  |  |  Branch (190:59): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     22|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 22]
  |  |  ------------------
  ------------------
  379|     22|  const char *const symbol_name = image->GetDynstr(symbol->st_name);
  380|       |#if defined(__NetBSD__)
  381|       |  const int version_index = version_symbol->vs_vers & VERSYM_VERSION;
  382|       |#else
  383|     22|  const ElfW(Versym) version_index = version_symbol[0] & VERSYM_VERSION;
  ------------------
  |  |   42|     22|#define VERSYM_VERSION 0x7fff
  ------------------
  384|     22|#endif
  385|     22|  const ElfW(Verdef) *version_definition = nullptr;
  386|     22|  const char *version_name = "";
  387|     22|  if (symbol->st_shndx == SHN_UNDEF) {
  ------------------
  |  Branch (387:7): [True: 2, False: 20]
  ------------------
  388|       |    // Undefined symbols reference DT_VERNEED, not DT_VERDEF, and
  389|       |    // version_index could well be greater than verdefnum_, so calling
  390|       |    // GetVerdef(version_index) may trigger assertion.
  391|     20|  } else {
  392|     20|    version_definition = image->GetVerdef(version_index);
  393|     20|  }
  394|     22|  if (version_definition) {
  ------------------
  |  Branch (394:7): [True: 20, False: 2]
  ------------------
  395|       |    // I am expecting 1 or 2 auxiliary entries: 1 for the version itself,
  396|       |    // optional 2nd if the version has a parent.
  397|     20|    ABSL_RAW_CHECK(
  ------------------
  |  |   60|     20|  do {                                                                 \
  |  |   61|     20|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|     20|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 20]
  |  |  |  |  |  Branch (190:49): [Folded, False: 20]
  |  |  |  |  |  Branch (190:59): [True: 20, False: 0]
  |  |  |  |  |  Branch (190:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|     20|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 20]
  |  |  ------------------
  ------------------
  398|     20|        version_definition->vd_cnt == 1 || version_definition->vd_cnt == 2,
  399|     20|        "wrong number of entries");
  400|     20|    const ElfW(Verdaux) *version_aux = image->GetVerdefAux(version_definition);
  401|     20|    version_name = image->GetVerstr(version_aux->vda_name);
  402|     20|  }
  403|     22|  info_.name    = symbol_name;
  404|     22|  info_.version = version_name;
  405|     22|  info_.address = image->GetSymAddr(symbol);
  406|     22|  info_.symbol  = symbol;
  407|     22|}
elf_mem_image.cc:_ZN4absl12lts_2026052618debugging_internal12_GLOBAL__N_17ElfTypeEPK9Elf64_Sym:
   57|      2|int ElfType(const ElfW(Sym) *symbol) { return ELF64_ST_TYPE(symbol->st_info); }
elf_mem_image.cc:_ZN4absl12lts_2026052618debugging_internal12_GLOBAL__N_115GetTableElementI10Elf64_PhdrEEPKT_PK10Elf64_Ehdrmjm:
   75|      8|                         ElfW(Word) element_size, size_t index) {
   76|      8|  return reinterpret_cast<const T*>(reinterpret_cast<const char *>(ehdr)
   77|      8|                                    + table_offset
   78|      8|                                    + index * element_size);
   79|      8|}
elf_mem_image.cc:_ZN4absl12lts_2026052618debugging_internal12_GLOBAL__N_115GetTableElementIcEEPKT_PK10Elf64_Ehdrmjm:
   75|     18|                         ElfW(Word) element_size, size_t index) {
   76|     18|  return reinterpret_cast<const T*>(reinterpret_cast<const char *>(ehdr)
   77|     18|                                    + table_offset
   78|     18|                                    + index * element_size);
   79|     18|}

_ZNK4absl12lts_2026052618debugging_internal11ElfMemImage9IsPresentEv:
   96|     44|  bool                 IsPresent() const { return ehdr_ != nullptr; }

_ZN4absl12lts_2026052618debugging_internal11VDSOSupportC2Ev:
   79|      2|    : image_(vdso_base_.load(std::memory_order_relaxed) ==
  ------------------
  |  Branch (79:14): [True: 0, False: 2]
  ------------------
   80|      2|                     debugging_internal::ElfMemImage::kInvalidBase
   81|      2|                 ? Init()
   82|      2|                 : vdso_base_.load(std::memory_order_relaxed)) {}
_ZN4absl12lts_2026052618debugging_internal11VDSOSupport4InitEv:
   93|      2|const void *VDSOSupport::Init() {
   94|      2|  const auto kInvalidBase = debugging_internal::ElfMemImage::kInvalidBase;
   95|      2|#ifdef ABSL_HAVE_GETAUXVAL
   96|      2|  if (vdso_base_.load(std::memory_order_relaxed) == kInvalidBase) {
  ------------------
  |  Branch (96:7): [True: 2, False: 0]
  ------------------
   97|      2|    errno = 0;
   98|      2|    const void *const sysinfo_ehdr =
   99|      2|        reinterpret_cast<const void *>(getauxval(AT_SYSINFO_EHDR));
  100|      2|    if (errno == 0) {
  ------------------
  |  Branch (100:9): [True: 2, False: 0]
  ------------------
  101|      2|      vdso_base_.store(sysinfo_ehdr, std::memory_order_relaxed);
  102|      2|    }
  103|      2|  }
  104|      2|#endif  // ABSL_HAVE_GETAUXVAL
  105|      2|  if (vdso_base_.load(std::memory_order_relaxed) == kInvalidBase) {
  ------------------
  |  Branch (105:7): [True: 0, False: 2]
  ------------------
  106|      0|    int fd = open("/proc/self/auxv", O_RDONLY);
  107|      0|    if (fd == -1) {
  ------------------
  |  Branch (107:9): [True: 0, False: 0]
  ------------------
  108|       |      // Kernel too old to have a VDSO.
  109|      0|      vdso_base_.store(nullptr, std::memory_order_relaxed);
  110|      0|      getcpu_fn_.store(&GetCPUViaSyscall, std::memory_order_relaxed);
  111|      0|      return nullptr;
  112|      0|    }
  113|      0|    ElfW(auxv_t) aux;
  114|      0|    while (read(fd, &aux, sizeof(aux)) == sizeof(aux)) {
  ------------------
  |  Branch (114:12): [True: 0, False: 0]
  ------------------
  115|      0|      if (aux.a_type == AT_SYSINFO_EHDR) {
  ------------------
  |  Branch (115:11): [True: 0, False: 0]
  ------------------
  116|       |#if defined(__NetBSD__)
  117|       |        vdso_base_.store(reinterpret_cast<void *>(aux.a_v),
  118|       |                         std::memory_order_relaxed);
  119|       |#else
  120|      0|        vdso_base_.store(reinterpret_cast<void *>(aux.a_un.a_val),
  121|      0|                         std::memory_order_relaxed);
  122|      0|#endif
  123|      0|        break;
  124|      0|      }
  125|      0|    }
  126|      0|    close(fd);
  127|      0|    if (vdso_base_.load(std::memory_order_relaxed) == kInvalidBase) {
  ------------------
  |  Branch (127:9): [True: 0, False: 0]
  ------------------
  128|       |      // Didn't find AT_SYSINFO_EHDR in auxv[].
  129|      0|      vdso_base_.store(nullptr, std::memory_order_relaxed);
  130|      0|    }
  131|      0|  }
  132|      2|  GetCpuFn fn = &GetCPUViaSyscall;  // default if VDSO not present.
  133|      2|  if (vdso_base_.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (133:7): [True: 2, False: 0]
  ------------------
  134|      2|    VDSOSupport vdso;
  135|      2|    SymbolInfo info;
  136|      2|    if (vdso.LookupSymbol("__vdso_getcpu", "LINUX_2.6", STT_FUNC, &info)) {
  ------------------
  |  Branch (136:9): [True: 2, False: 0]
  ------------------
  137|      2|      fn = reinterpret_cast<GetCpuFn>(const_cast<void *>(info.address));
  138|      2|    }
  139|      2|  }
  140|       |  // Subtle: this code runs outside of any locks; prevent compiler
  141|       |  // from assigning to getcpu_fn_ more than once.
  142|      2|  getcpu_fn_.store(fn, std::memory_order_relaxed);
  143|      2|  return vdso_base_.load(std::memory_order_relaxed);
  144|      2|}
_ZNK4absl12lts_2026052618debugging_internal11VDSOSupport12LookupSymbolEPKcS4_iPNS1_11ElfMemImage10SymbolInfoE:
  160|      2|                               SymbolInfo *info) const {
  161|      2|  return image_.LookupSymbol(name, version, type, info);
  162|      2|}

_ZN4absl12lts_2026052620InitializeSymbolizerEPKc:
   92|      2|void InitializeSymbolizer(const char *argv0) {
   93|      2|#ifdef ABSL_HAVE_VDSO_SUPPORT
   94|       |  // We need to make sure VDSOSupport::Init() is called before any setuid or
   95|       |  // chroot calls, so InitializeSymbolizer() should be called very early in the
   96|       |  // life of a program.
   97|      2|  absl::debugging_internal::VDSOSupport::Init();
   98|      2|#endif
   99|      2|  if (argv0_value != nullptr) {
  ------------------
  |  Branch (99:7): [True: 0, False: 2]
  ------------------
  100|      0|    free(argv0_value);
  101|      0|    argv0_value = nullptr;
  102|      0|  }
  103|      2|  if (argv0 != nullptr && argv0[0] != '\0') {
  ------------------
  |  Branch (103:7): [True: 2, False: 0]
  |  Branch (103:27): [True: 2, False: 0]
  ------------------
  104|      2|    argv0_value = strdup(argv0);
  105|      2|  }
  106|      2|}

_ZNK4absl12lts_2026052615CommandLineFlag8IsOfTypeIbEEbv:
   84|      4|  inline bool IsOfType() const {
   85|      4|    return TypeId() == FastTypeId<T>();
   86|      4|  }

_ZN25AbslFlagDefaultGenForfuzz3GenEPv:
  258|      4|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      4|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      4|    }                                                                         \
_ZN29AbslFlagDefaultGenForfuzz_for3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN36AbslFlagDefaultGenForcorpus_database3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN34AbslFlagDefaultGenForreplay_corpus3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN38AbslFlagDefaultGenForreplay_corpus_for3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN37AbslFlagDefaultGenFortime_budget_type3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN33AbslFlagDefaultGenForexecution_id3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN41AbslFlagDefaultGenFortime_limit_per_input3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN25AbslFlagDefaultGenForjobs3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN47AbslFlagDefaultGenForsubprocess_cleanup_timeout3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN47AbslFlagDefaultGenForinternal_centipede_command3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN48AbslFlagDefaultGenForinternal_override_fuzz_test3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN4absl12lts_202605267GetFlagINSt3__18optionalINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEEET_RKNS0_14flags_internal4FlagISB_EE:
   98|     14|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|     14|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|     14|}
_ZN55AbslFlagDefaultGenForinternal_override_total_time_limit3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN4absl12lts_202605267GetFlagINS0_8DurationEEET_RKNS0_14flags_internal4FlagIS3_EE:
   98|     14|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|     14|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|     14|}
_ZN57AbslFlagDefaultGenForinternal_crashing_input_to_reproduce3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN4absl12lts_202605267GetFlagIN8fuzztest8internal14TimeBudgetTypeEEET_RKNS0_14flags_internal4FlagIS5_EE:
   98|      2|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|      2|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|      2|}
_ZN4absl12lts_202605267GetFlagINSt3__18optionalImEEEET_RKNS0_14flags_internal4FlagIS5_EE:
   98|      2|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|      2|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|      2|}
_ZN4absl12lts_202605267GetFlagImEET_RKNS0_14flags_internal4FlagIS2_EE:
   98|      4|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|      4|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|      4|}
_ZN4absl12lts_202605267GetFlagIbEET_RKNS0_14flags_internal4FlagIS2_EE:
   98|     12|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|     12|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|     12|}
_ZN4absl12lts_202605267GetFlagINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEET_RKNS0_14flags_internal4FlagIS9_EE:
   98|     16|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|     16|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|     16|}
_ZN29AbslFlagDefaultGenForflagfile3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN28AbslFlagDefaultGenForfromenv3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN31AbslFlagDefaultGenFortryfromenv3GenEPv:
  258|      2|    static void Gen(void* absl_flag_default_loc) {                            \
  259|      2|      new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value);  \
  260|      2|    }                                                                         \
_ZN4absl12lts_202605267GetFlagINSt3__16vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEEEET_RKNS0_14flags_internal4FlagISC_EE:
   98|     10|[[nodiscard]] T GetFlag(const absl::Flag<T>& flag) {
   99|     10|  return flags_internal::FlagImplPeer::InvokeGet<T>(flag);
  100|     10|}

_ZN4absl12lts_2026052614flags_internal15DynValueDeleterC2EPFPvNS1_6FlagOpEPKvS3_S3_E:
  168|      4|DynValueDeleter::DynValueDeleter(FlagOpFn op_arg) : op(op_arg) {}
_ZNK4absl12lts_2026052614flags_internal15DynValueDeleterclEPv:
  170|      4|void DynValueDeleter::operator()(void* ptr) const {
  171|      4|  if (op == nullptr) return;
  ------------------
  |  Branch (171:7): [True: 0, False: 4]
  ------------------
  172|       |
  173|      4|  Delete(op, ptr);
  174|      4|}
_ZN4absl12lts_2026052614flags_internal13MaskedPointerC2EPvb:
  176|     20|MaskedPointer::MaskedPointer(ptr_t rhs, bool is_candidate) : ptr_(rhs) {
  177|     20|  if (is_candidate) {
  ------------------
  |  Branch (177:7): [True: 20, False: 0]
  ------------------
  178|     20|    ApplyMask(kUnprotectedReadCandidate);
  179|     20|  }
  180|     20|}
_ZNK4absl12lts_2026052614flags_internal13MaskedPointer26IsUnprotectedReadCandidateEv:
  182|     22|bool MaskedPointer::IsUnprotectedReadCandidate() const {
  183|     22|  return CheckMask(kUnprotectedReadCandidate);
  184|     22|}
_ZNK4absl12lts_2026052614flags_internal13MaskedPointer11HasBeenReadEv:
  186|     22|bool MaskedPointer::HasBeenRead() const { return CheckMask(kHasBeenRead); }
_ZN4absl12lts_2026052614flags_internal13MaskedPointer3SetEPFPvNS1_6FlagOpEPKvS3_S3_ES6_b:
  188|      2|void MaskedPointer::Set(FlagOpFn op, const void* src, bool is_candidate) {
  189|      2|  flags_internal::Copy(op, src, Ptr());
  190|      2|  if (is_candidate) {
  ------------------
  |  Branch (190:7): [True: 2, False: 0]
  ------------------
  191|      2|    ApplyMask(kUnprotectedReadCandidate);
  192|      2|  }
  193|      2|}
_ZN4absl12lts_2026052614flags_internal13MaskedPointer10MarkAsReadEv:
  194|     20|void MaskedPointer::MarkAsRead() { ApplyMask(kHasBeenRead); }
_ZN4absl12lts_2026052614flags_internal13MaskedPointer9ApplyMaskEm:
  196|     42|void MaskedPointer::ApplyMask(mask_t mask) {
  197|     42|  ptr_ = reinterpret_cast<ptr_t>(reinterpret_cast<mask_t>(ptr_) | mask);
  198|     42|}
_ZNK4absl12lts_2026052614flags_internal13MaskedPointer9CheckMaskEm:
  199|     44|bool MaskedPointer::CheckMask(mask_t mask) const {
  200|     44|  return (reinterpret_cast<mask_t>(ptr_) & mask) != 0;
  201|     44|}
_ZN4absl12lts_2026052614flags_internal8FlagImpl4InitEv:
  203|     48|void FlagImpl::Init() {
  204|     48|  new (&data_guard_) absl::Mutex;
  205|       |
  206|     48|  auto def_kind = static_cast<FlagDefaultKind>(def_kind_);
  207|       |
  208|     48|  switch (ValueStorageKind()) {
  ------------------
  |  Branch (208:11): [True: 48, False: 0]
  ------------------
  209|     12|    case FlagValueStorageKind::kValueAndInitBit:
  ------------------
  |  Branch (209:5): [True: 12, False: 36]
  ------------------
  210|     16|    case FlagValueStorageKind::kOneWordAtomic: {
  ------------------
  |  Branch (210:5): [True: 4, False: 44]
  ------------------
  211|     16|      alignas(int64_t) std::array<char, sizeof(int64_t)> buf{};
  212|     16|      if (def_kind == FlagDefaultKind::kGenFunc) {
  ------------------
  |  Branch (212:11): [True: 2, False: 14]
  ------------------
  213|      2|        (*default_value_.gen_func)(buf.data());
  214|     14|      } else {
  215|     14|        assert(def_kind != FlagDefaultKind::kDynamicValue);
  216|     14|        std::memcpy(buf.data(), &default_value_, Sizeof(op_));
  217|     14|      }
  218|     16|      if (ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit) {
  ------------------
  |  Branch (218:11): [True: 12, False: 4]
  ------------------
  219|       |        // We presume here the memory layout of FlagValueAndInitBit struct.
  220|     12|        uint8_t initialized = 1;
  221|     12|        std::memcpy(buf.data() + Sizeof(op_), &initialized,
  222|     12|                    sizeof(initialized));
  223|     12|      }
  224|       |      // Type can contain valid uninitialized bits, e.g. padding.
  225|     16|      ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(buf.data(), buf.size());
  226|     16|      OneWordValue().store(absl::bit_cast<int64_t>(buf),
  227|     16|                           std::memory_order_release);
  228|     16|      break;
  229|     12|    }
  230|     12|    case FlagValueStorageKind::kSequenceLocked: {
  ------------------
  |  Branch (230:5): [True: 12, False: 36]
  ------------------
  231|       |      // For this storage kind the default_value_ always points to gen_func
  232|       |      // during initialization.
  233|     12|      assert(def_kind == FlagDefaultKind::kGenFunc);
  234|     12|      (*default_value_.gen_func)(AtomicBufferValue());
  235|     12|      break;
  236|     12|    }
  237|     20|    case FlagValueStorageKind::kHeapAllocated:
  ------------------
  |  Branch (237:5): [True: 20, False: 28]
  ------------------
  238|       |      // For this storage kind the default_value_ always points to gen_func
  239|       |      // during initialization.
  240|     20|      assert(def_kind == FlagDefaultKind::kGenFunc);
  241|       |      // Flag value initially points to the internal buffer.
  242|     20|      MaskedPointer ptr_value = PtrStorage().load(std::memory_order_acquire);
  243|     20|      (*default_value_.gen_func)(ptr_value.Ptr());
  244|       |      // Default value is a candidate for an unprotected read.
  245|     20|      PtrStorage().store(MaskedPointer(ptr_value.Ptr(), true),
  246|     20|                         std::memory_order_release);
  247|     20|      break;
  248|     48|  }
  249|     48|  seq_lock_.MarkInitialized();
  250|     48|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl9DataGuardEv:
  252|     74|absl::Mutex& FlagImpl::DataGuard() const {
  253|     74|  absl::call_once(const_cast<FlagImpl*>(this)->init_control_, &FlagImpl::Init,
  254|     74|                  const_cast<FlagImpl*>(this));
  255|       |
  256|       |  // data_guard_ is initialized inside Init.
  257|     74|  return *reinterpret_cast<absl::Mutex*>(&data_guard_);
  258|     74|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl13MakeInitValueEv:
  285|      4|std::unique_ptr<void, DynValueDeleter> FlagImpl::MakeInitValue() const {
  286|      4|  void* res = nullptr;
  287|      4|  switch (DefaultKind()) {
  288|      0|    case FlagDefaultKind::kDynamicValue:
  ------------------
  |  Branch (288:5): [True: 0, False: 4]
  ------------------
  289|      0|      res = flags_internal::Clone(op_, default_value_.dynamic_value);
  290|      0|      break;
  291|      2|    case FlagDefaultKind::kGenFunc:
  ------------------
  |  Branch (291:5): [True: 2, False: 2]
  ------------------
  292|      2|      res = flags_internal::Alloc(op_);
  293|      2|      (*default_value_.gen_func)(res);
  294|      2|      break;
  295|      2|    default:
  ------------------
  |  Branch (295:5): [True: 2, False: 2]
  ------------------
  296|      2|      res = flags_internal::Clone(op_, &default_value_);
  297|      2|      break;
  298|      4|  }
  299|      4|  return {res, DynValueDeleter{op_}};
  300|      4|}
_ZN4absl12lts_2026052614flags_internal8FlagImpl10StoreValueEPKvNS1_11ValueSourceE:
  302|      4|void FlagImpl::StoreValue(const void* src, ValueSource source) {
  303|      4|  switch (ValueStorageKind()) {
  ------------------
  |  Branch (303:11): [True: 4, False: 0]
  ------------------
  304|      0|    case FlagValueStorageKind::kValueAndInitBit:
  ------------------
  |  Branch (304:5): [True: 0, False: 4]
  ------------------
  305|      2|    case FlagValueStorageKind::kOneWordAtomic: {
  ------------------
  |  Branch (305:5): [True: 2, False: 2]
  ------------------
  306|       |      // Load the current value to avoid setting 'init' bit manually.
  307|      2|      int64_t one_word_val = OneWordValue().load(std::memory_order_acquire);
  308|      2|      std::memcpy(&one_word_val, src, Sizeof(op_));
  309|      2|      OneWordValue().store(one_word_val, std::memory_order_release);
  310|      2|      seq_lock_.IncrementModificationCount();
  311|      2|      break;
  312|      0|    }
  313|      0|    case FlagValueStorageKind::kSequenceLocked: {
  ------------------
  |  Branch (313:5): [True: 0, False: 4]
  ------------------
  314|      0|      seq_lock_.Write(AtomicBufferValue(), src, Sizeof(op_));
  315|      0|      break;
  316|      0|    }
  317|      2|    case FlagValueStorageKind::kHeapAllocated:
  ------------------
  |  Branch (317:5): [True: 2, False: 2]
  ------------------
  318|      2|      MaskedPointer ptr_value = PtrStorage().load(std::memory_order_acquire);
  319|       |
  320|      2|      if (ptr_value.IsUnprotectedReadCandidate() && ptr_value.HasBeenRead()) {
  ------------------
  |  Branch (320:11): [True: 2, False: 0]
  |  Branch (320:53): [True: 0, False: 2]
  ------------------
  321|       |        // If current value is a candidate for an unprotected read and if it was
  322|       |        // already read at least once, follow up reads (if any) are done without
  323|       |        // mutex protection. We can't guarantee it is safe to reuse this memory
  324|       |        // since it may have been accessed by another thread concurrently, so
  325|       |        // instead we move the memory to a freelist so it can still be safely
  326|       |        // accessed, and allocate a new one for the new value.
  327|      0|        AddToFreelist(ptr_value.Ptr());
  328|      0|        ptr_value = MaskedPointer(Clone(op_, src), source == kCommandLine);
  329|      2|      } else {
  330|       |        // Current value either was set programmatically or was never read.
  331|       |        // We can reuse the memory since all accesses to this value (if any)
  332|       |        // were protected by mutex. That said, if a new value comes from command
  333|       |        // line it now becomes a candidate for an unprotected read.
  334|      2|        ptr_value.Set(op_, src, source == kCommandLine);
  335|      2|      }
  336|       |
  337|      2|      PtrStorage().store(ptr_value, std::memory_order_release);
  338|      2|      seq_lock_.IncrementModificationCount();
  339|      2|      break;
  340|      4|  }
  341|      4|  modified_ = true;
  342|      4|  InvokeCallback();
  343|      4|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl4NameEv:
  345|    598|absl::string_view FlagImpl::Name() const { return name_; }
_ZNK4absl12lts_2026052614flags_internal8FlagImpl8FilenameEv:
  349|     50|std::string FlagImpl::Filename() const {
  350|     50|  return flags_internal::GetUsageConfig().normalize_filename(filename_);
  351|     50|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl6TypeIdEv:
  358|      4|FlagFastTypeId FlagImpl::TypeId() const {
  359|      4|  return flags_internal::FastTypeId(op_);
  360|      4|}
_ZN4absl12lts_2026052614flags_internal8FlagImpl11SetCallbackEPFvvE:
  404|     14|void FlagImpl::SetCallback(const FlagCallbackFunc mutation_callback) {
  405|     14|  absl::MutexLock l(DataGuard());
  406|       |
  407|     14|  if (callback_ == nullptr) {
  ------------------
  |  Branch (407:7): [True: 14, False: 0]
  ------------------
  408|     14|    callback_ = new FlagCallback;
  409|     14|  }
  410|     14|  callback_->func = mutation_callback;
  411|       |
  412|     14|  InvokeCallback();
  413|     14|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl14InvokeCallbackEv:
  415|     18|void FlagImpl::InvokeCallback() const {
  416|     18|  if (!callback_) return;
  ------------------
  |  Branch (416:7): [True: 4, False: 14]
  ------------------
  417|       |
  418|       |  // Make a copy of the C-style function pointer that we are about to invoke
  419|       |  // before we release the lock guarding it.
  420|     14|  FlagCallbackFunc cb = callback_->func;
  421|       |
  422|       |  // If the flag has a mutation callback this function invokes it. While the
  423|       |  // callback is being invoked the primary flag's mutex is unlocked and it is
  424|       |  // re-locked back after call to callback is completed. Callback invocation is
  425|       |  // guarded by flag's secondary mutex instead which prevents concurrent
  426|       |  // callback invocation. Note that it is possible for other thread to grab the
  427|       |  // primary lock and update flag's value at any time during the callback
  428|       |  // invocation. This is by design. Callback can get a value of the flag if
  429|       |  // necessary, but it might be different from the value initiated the callback
  430|       |  // and it also can be different by the time the callback invocation is
  431|       |  // completed. Requires that *primary_lock be held in exclusive mode; it may be
  432|       |  // released and reacquired by the implementation.
  433|     14|  MutexRelock relock(DataGuard());
  434|     14|  absl::MutexLock lock(callback_->guard);
  435|     14|  cb();
  436|     14|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl17AtomicBufferValueEv:
  503|     22|std::atomic<uint64_t>* FlagImpl::AtomicBufferValue() const {
  504|       |  assert(ValueStorageKind() == FlagValueStorageKind::kSequenceLocked);
  505|     22|  return OffsetValue<std::atomic<uint64_t>>();
  506|     22|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl12OneWordValueEv:
  508|     32|std::atomic<int64_t>& FlagImpl::OneWordValue() const {
  509|       |  assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic ||
  510|     32|         ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit);
  511|     32|  return OffsetValue<FlagOneWordValue>()->value;
  512|     32|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl10PtrStorageEv:
  514|     84|std::atomic<MaskedPointer>& FlagImpl::PtrStorage() const {
  515|       |  assert(ValueStorageKind() == FlagValueStorageKind::kHeapAllocated);
  516|     84|  return OffsetValue<FlagMaskedPointerValue>()->value;
  517|     84|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl8TryParseENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERNS3_12basic_stringIcS6_NS3_9allocatorIcEEEE:
  524|      4|    absl::string_view value, std::string& err) const {
  525|      4|  std::unique_ptr<void, DynValueDeleter> tentative_value = MakeInitValue();
  526|       |
  527|      4|  std::string parse_err;
  528|      4|  if (!flags_internal::Parse(op_, value, tentative_value.get(), &parse_err)) {
  ------------------
  |  Branch (528:7): [True: 0, False: 4]
  ------------------
  529|      0|    absl::string_view err_sep = parse_err.empty() ? "" : "; ";
  ------------------
  |  Branch (529:33): [True: 0, False: 0]
  ------------------
  530|      0|    err = absl::StrCat("Illegal value '", value, "' specified for flag '",
  531|      0|                       Name(), "'", err_sep, parse_err);
  532|      0|    return nullptr;
  533|      0|  }
  534|       |
  535|      4|  return tentative_value;
  536|      4|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl4ReadEPv:
  538|     30|void FlagImpl::Read(void* dst) const {
  539|     30|  auto& guard = DataGuard();  // Make sure flag initialized
  540|     30|  switch (ValueStorageKind()) {
  ------------------
  |  Branch (540:11): [True: 30, False: 0]
  ------------------
  541|      0|    case FlagValueStorageKind::kValueAndInitBit:
  ------------------
  |  Branch (541:5): [True: 0, False: 30]
  ------------------
  542|      0|    case FlagValueStorageKind::kOneWordAtomic: {
  ------------------
  |  Branch (542:5): [True: 0, False: 30]
  ------------------
  543|      0|      const int64_t one_word_val =
  544|      0|          OneWordValue().load(std::memory_order_acquire);
  545|      0|      std::memcpy(dst, &one_word_val, Sizeof(op_));
  546|      0|      break;
  547|      0|    }
  548|     10|    case FlagValueStorageKind::kSequenceLocked: {
  ------------------
  |  Branch (548:5): [True: 10, False: 20]
  ------------------
  549|     10|      ReadSequenceLockedData(dst);
  550|     10|      break;
  551|      0|    }
  552|     20|    case FlagValueStorageKind::kHeapAllocated: {
  ------------------
  |  Branch (552:5): [True: 20, False: 10]
  ------------------
  553|     20|      absl::MutexLock l(guard);
  554|     20|      MaskedPointer ptr_value = PtrStorage().load(std::memory_order_acquire);
  555|       |
  556|     20|      flags_internal::CopyConstruct(op_, ptr_value.Ptr(), dst);
  557|       |
  558|       |      // For unprotected read candidates, mark that the value as has been read.
  559|     20|      if (ptr_value.IsUnprotectedReadCandidate() && !ptr_value.HasBeenRead()) {
  ------------------
  |  Branch (559:11): [True: 20, False: 0]
  |  Branch (559:53): [True: 20, False: 0]
  ------------------
  560|     20|        ptr_value.MarkAsRead();
  561|     20|        PtrStorage().store(ptr_value, std::memory_order_release);
  562|     20|      }
  563|     20|      break;
  564|      0|    }
  565|     30|  }
  566|     30|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl11ReadOneWordEv:
  568|      4|int64_t FlagImpl::ReadOneWord() const {
  569|       |  assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic ||
  570|      4|         ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit);
  571|      4|  auto& guard = DataGuard();  // Make sure flag initialized
  572|      4|  (void)guard;
  573|      4|  return OneWordValue().load(std::memory_order_acquire);
  574|      4|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl11ReadOneBoolEv:
  576|      8|bool FlagImpl::ReadOneBool() const {
  577|       |  assert(ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit);
  578|      8|  auto& guard = DataGuard();  // Make sure flag initialized
  579|      8|  (void)guard;
  580|      8|  return absl::bit_cast<FlagValueAndInitBit<bool>>(
  581|      8|             OneWordValue().load(std::memory_order_acquire))
  582|      8|      .value;
  583|      8|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl22ReadSequenceLockedDataEPv:
  585|     10|void FlagImpl::ReadSequenceLockedData(void* dst) const {
  586|     10|  size_t size = Sizeof(op_);
  587|       |  // Attempt to read using the sequence lock.
  588|     10|  if (ABSL_PREDICT_TRUE(seq_lock_.TryRead(dst, AtomicBufferValue(), size))) {
  ------------------
  |  |  191|     10|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 10, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 10]
  |  |  |  Branch (191:57): [True: 10, False: 0]
  |  |  ------------------
  ------------------
  589|     10|    return;
  590|     10|  }
  591|       |  // We failed due to contention. Acquire the lock to prevent contention
  592|       |  // and try again.
  593|      0|  absl::ReaderMutexLock l(DataGuard());
  594|      0|  bool success = seq_lock_.TryRead(dst, AtomicBufferValue(), size);
  595|       |  assert(success);
  596|      0|  static_cast<void>(success);
  597|      0|}
_ZN4absl12lts_2026052614flags_internal8FlagImpl9ParseFromENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEENS1_15FlagSettingModeENS1_11ValueSourceERNS3_12basic_stringIcS6_NS3_9allocatorIcEEEE:
  625|      4|                         ValueSource source, std::string& err) {
  626|      4|  absl::MutexLock l(DataGuard());
  627|       |
  628|      4|  switch (set_mode) {
  ------------------
  |  Branch (628:11): [True: 4, False: 0]
  ------------------
  629|      4|    case SET_FLAGS_VALUE: {
  ------------------
  |  Branch (629:5): [True: 4, False: 0]
  ------------------
  630|       |      // set or modify the flag's value
  631|      4|      auto tentative_value = TryParse(value, err);
  632|      4|      if (!tentative_value) return false;
  ------------------
  |  Branch (632:11): [True: 0, False: 4]
  ------------------
  633|       |
  634|      4|      StoreValue(tentative_value.get(), source);
  635|       |
  636|      4|      if (source == kCommandLine) {
  ------------------
  |  Branch (636:11): [True: 4, False: 0]
  ------------------
  637|      4|        on_command_line_ = true;
  638|      4|      }
  639|      4|      break;
  640|      4|    }
  641|      0|    case SET_FLAG_IF_DEFAULT: {
  ------------------
  |  Branch (641:5): [True: 0, False: 4]
  ------------------
  642|       |      // set the flag's value, but only if it hasn't been set by someone else
  643|      0|      if (modified_) {
  ------------------
  |  Branch (643:11): [True: 0, False: 0]
  ------------------
  644|       |        // TODO(rogeeff): review and fix this semantic. Currently we do not fail
  645|       |        // in this case if flag is modified. This is misleading since the flag's
  646|       |        // value is not updated even though we return true.
  647|       |        // *err = absl::StrCat(Name(), " is already set to ",
  648|       |        //                     CurrentValue(), "\n");
  649|       |        // return false;
  650|      0|        return true;
  651|      0|      }
  652|      0|      auto tentative_value = TryParse(value, err);
  653|      0|      if (!tentative_value) return false;
  ------------------
  |  Branch (653:11): [True: 0, False: 0]
  ------------------
  654|       |
  655|      0|      StoreValue(tentative_value.get(), source);
  656|      0|      break;
  657|      0|    }
  658|      0|    case SET_FLAGS_DEFAULT: {
  ------------------
  |  Branch (658:5): [True: 0, False: 4]
  ------------------
  659|      0|      auto tentative_value = TryParse(value, err);
  660|      0|      if (!tentative_value) return false;
  ------------------
  |  Branch (660:11): [True: 0, False: 0]
  ------------------
  661|       |
  662|      0|      if (DefaultKind() == FlagDefaultKind::kDynamicValue) {
  ------------------
  |  Branch (662:11): [True: 0, False: 0]
  ------------------
  663|      0|        void* old_value = default_value_.dynamic_value;
  664|      0|        default_value_.dynamic_value = tentative_value.release();
  665|      0|        tentative_value.reset(old_value);
  666|      0|      } else {
  667|      0|        default_value_.dynamic_value = tentative_value.release();
  668|      0|        def_kind_ = static_cast<uint8_t>(FlagDefaultKind::kDynamicValue);
  669|      0|      }
  670|       |
  671|      0|      if (!modified_) {
  ------------------
  |  Branch (671:11): [True: 0, False: 0]
  ------------------
  672|       |        // Need to set both default value *and* current, in this case.
  673|      0|        StoreValue(default_value_.dynamic_value, source);
  674|      0|        modified_ = false;
  675|      0|      }
  676|      0|      break;
  677|      0|    }
  678|      4|  }
  679|       |
  680|      4|  return true;
  681|      4|}
flag.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_111MutexRelockC2ERNS0_5MutexE:
   77|     14|  explicit MutexRelock(absl::Mutex& mu) : mu_(mu) { mu_.unlock(); }
flag.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_111MutexRelockD2Ev:
   78|     14|  ~MutexRelock() { mu_.lock(); }
_ZNK4absl12lts_2026052614flags_internal8FlagImpl11OffsetValueINSt3__16atomicImEEEEPT_v:
  495|     22|StorageT* FlagImpl::OffsetValue() const {
  496|     22|  char* p = reinterpret_cast<char*>(const_cast<FlagImpl*>(this));
  497|       |  // The offset is deduced via Flag value type specific op_.
  498|     22|  ptrdiff_t offset = flags_internal::ValueOffset(op_);
  499|       |
  500|     22|  return reinterpret_cast<StorageT*>(p + offset);
  501|     22|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl11OffsetValueINS1_16FlagOneWordValueEEEPT_v:
  495|     32|StorageT* FlagImpl::OffsetValue() const {
  496|     32|  char* p = reinterpret_cast<char*>(const_cast<FlagImpl*>(this));
  497|       |  // The offset is deduced via Flag value type specific op_.
  498|     32|  ptrdiff_t offset = flags_internal::ValueOffset(op_);
  499|       |
  500|     32|  return reinterpret_cast<StorageT*>(p + offset);
  501|     32|}
_ZNK4absl12lts_2026052614flags_internal8FlagImpl11OffsetValueINS1_22FlagMaskedPointerValueEEEPT_v:
  495|     84|StorageT* FlagImpl::OffsetValue() const {
  496|     84|  char* p = reinterpret_cast<char*>(const_cast<FlagImpl*>(this));
  497|       |  // The offset is deduced via Flag value type specific op_.
  498|     84|  ptrdiff_t offset = flags_internal::ValueOffset(op_);
  499|       |
  500|     84|  return reinterpret_cast<StorageT*>(p + offset);
  501|     84|}

_ZN4absl12lts_2026052614flags_internal13FlagRegistrarIbLb1EEC2ERNS1_4FlagIbEEPKc:
  942|     10|      : flag_(flag) {
  943|     10|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 10, Folded]
  ------------------
  944|     10|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|     10|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarIbLb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|     10|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal16InitDefaultValueINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEET_SA_:
  276|      8|constexpr T InitDefaultValue(T t) {
  277|      8|  return t;
  278|      8|}
_ZN4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELb1EEC2ERNS1_4FlagIS9_EEPKc:
  942|      6|      : flag_(flag) {
  943|      6|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 6, Folded]
  ------------------
  944|      6|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|      6|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|      6|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal16InitDefaultValueINS0_8DurationEEET_S4_:
  276|     10|constexpr T InitDefaultValue(T t) {
  277|     10|  return t;
  278|     10|}
_ZN4absl12lts_2026052614flags_internal13FlagRegistrarINS0_8DurationELb1EEC2ERNS1_4FlagIS3_EEPKc:
  942|     10|      : flag_(flag) {
  943|     10|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 10, Folded]
  ------------------
  944|     10|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|     10|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarINS0_8DurationELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|     10|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal16InitDefaultValueIN8fuzztest8internal14TimeBudgetTypeEEET_S6_:
  276|      2|constexpr T InitDefaultValue(T t) {
  277|      2|  return t;
  278|      2|}
_ZN4absl12lts_2026052614flags_internal13FlagRegistrarIN8fuzztest8internal14TimeBudgetTypeELb1EEC2ERNS1_4FlagIS5_EEPKc:
  942|      2|      : flag_(flag) {
  943|      2|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 2, Folded]
  ------------------
  944|      2|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|      2|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarIN8fuzztest8internal14TimeBudgetTypeELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|      2|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal16InitDefaultValueINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEET_SC_:
  276|      8|constexpr T InitDefaultValue(T t) {
  277|      8|  return t;
  278|      8|}
_ZN4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEELb1EEC2ERNS1_4FlagISB_EEPKc:
  942|      8|      : flag_(flag) {
  943|      8|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 8, Folded]
  ------------------
  944|      8|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|      8|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|      8|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal13FlagRegistrarImLb1EEC2ERNS1_4FlagImEEPKc:
  942|      4|      : flag_(flag) {
  943|      4|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 4, Folded]
  ------------------
  944|      4|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|      4|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarImLb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|      4|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal16InitDefaultValueINSt3__18optionalImEEEET_S6_:
  276|      2|constexpr T InitDefaultValue(T t) {
  277|      2|  return t;
  278|      2|}
_ZN4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__18optionalImEELb1EEC2ERNS1_4FlagIS5_EEPKc:
  942|      2|      : flag_(flag) {
  943|      2|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 2, Folded]
  ------------------
  944|      2|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|      2|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__18optionalImEELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|      2|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetINSt3__18optionalINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS1_4FlagISC_EEEET_RKT0_:
  860|     14|  static T InvokeGet(const FlagType& flag) {
  861|     14|    return flag.Get();
  862|     14|  }
_ZNK4absl12lts_2026052614flags_internal4FlagINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEE3GetEv:
  820|     14|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|     14|    union U {
  823|     14|      T value;
  824|     14|      U() {}
  825|     14|      ~U() { value.~T(); }
  826|     14|    };
  827|     14|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|     14|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|     14|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 8, False: 6]
  |  |  |  Branch (190:49): [Folded, False: 14]
  |  |  |  Branch (190:58): [True: 8, False: 6]
  |  |  ------------------
  ------------------
  834|      8|      impl_.Read(&u.value);
  835|      8|    }
  836|     14|    return std::move(u.value);
  837|     14|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEE3GetEvEN1UC2Ev:
  824|     14|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEELNS1_20FlagValueStorageKindE3EE3GetERKNS1_12SequenceLockERSB_:
  536|     14|  bool Get(const SequenceLock&, T& dst) const {
  537|     14|    MaskedPointer ptr_value = value.load(std::memory_order_acquire);
  538|       |
  539|     14|    if (ABSL_PREDICT_TRUE(ptr_value.AllowsUnprotectedRead())) {
  ------------------
  |  |  191|     14|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 6, False: 8]
  |  |  |  Branch (191:48): [Folded, False: 14]
  |  |  |  Branch (191:57): [True: 6, False: 8]
  |  |  ------------------
  ------------------
  540|      6|      ::new (static_cast<void*>(&dst)) T(*static_cast<T*>(ptr_value.Ptr()));
  541|      6|      return true;
  542|      6|    }
  543|      8|    return false;
  544|     14|  }
_ZNK4absl12lts_2026052614flags_internal13MaskedPointer21AllowsUnprotectedReadEv:
  387|     40|  bool AllowsUnprotectedRead() const {
  388|     40|    return (reinterpret_cast<mask_t>(ptr_) & kAllowsUnprotectedRead) ==
  389|     40|           kAllowsUnprotectedRead;
  390|     40|  }
_ZNK4absl12lts_2026052614flags_internal13MaskedPointer3PtrEv:
  383|     82|  void* Ptr() const {
  384|     82|    return reinterpret_cast<void*>(reinterpret_cast<mask_t>(ptr_) &
  385|     82|                                   kPtrValueMask);
  386|     82|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEE3GetEvEN1UD2Ev:
  825|     14|      ~U() { value.~T(); }
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetINS0_8DurationENS1_4FlagIS4_EEEET_RKT0_:
  860|     14|  static T InvokeGet(const FlagType& flag) {
  861|     14|    return flag.Get();
  862|     14|  }
_ZNK4absl12lts_2026052614flags_internal4FlagINS0_8DurationEE3GetEv:
  820|     14|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|     14|    union U {
  823|     14|      T value;
  824|     14|      U() {}
  825|     14|      ~U() { value.~T(); }
  826|     14|    };
  827|     14|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|     14|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|     14|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 8, False: 6]
  |  |  |  Branch (190:49): [Folded, False: 14]
  |  |  |  Branch (190:58): [True: 8, False: 6]
  |  |  ------------------
  ------------------
  834|      8|      impl_.Read(&u.value);
  835|      8|    }
  836|     14|    return std::move(u.value);
  837|     14|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINS0_8DurationEE3GetEvEN1UC2Ev:
  824|     14|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueINS0_8DurationELNS1_20FlagValueStorageKindE2EE3GetERKNS1_12SequenceLockERS3_:
  481|     14|  bool Get(const SequenceLock& lock, T& dst) const {
  482|     14|    return lock.TryRead(&dst, value_words, sizeof(T));
  483|     14|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINS0_8DurationEE3GetEvEN1UD2Ev:
  825|     14|      ~U() { value.~T(); }
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetIN8fuzztest8internal14TimeBudgetTypeENS1_4FlagIS6_EEEET_RKT0_:
  860|      2|  static T InvokeGet(const FlagType& flag) {
  861|      2|    return flag.Get();
  862|      2|  }
_ZNK4absl12lts_2026052614flags_internal4FlagIN8fuzztest8internal14TimeBudgetTypeEE3GetEv:
  820|      2|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|      2|    union U {
  823|      2|      T value;
  824|      2|      U() {}
  825|      2|      ~U() { value.~T(); }
  826|      2|    };
  827|      2|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|      2|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  834|      2|      impl_.Read(&u.value);
  835|      2|    }
  836|      2|    return std::move(u.value);
  837|      2|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagIN8fuzztest8internal14TimeBudgetTypeEE3GetEvEN1UC2Ev:
  824|      2|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueIN8fuzztest8internal14TimeBudgetTypeELNS1_20FlagValueStorageKindE0EE3GetERKNS1_12SequenceLockERS5_:
  442|      2|  bool Get(const SequenceLock&, T& dst) const {
  443|      2|    int64_t storage = value.load(std::memory_order_acquire);
  444|      2|    if (ABSL_PREDICT_FALSE(storage == 0)) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  445|       |      // This assert is to ensure that the initialization inside FlagImpl::Init
  446|       |      // is able to set init member correctly.
  447|      2|      static_assert(offsetof(FlagValueAndInitBit<T>, init) == sizeof(T),
  448|      2|                    "Unexpected memory layout of FlagValueAndInitBit");
  449|      2|      return false;
  450|      2|    }
  451|      0|    dst = absl::bit_cast<FlagValueAndInitBit<T>>(storage).value;
  452|      0|    return true;
  453|      2|  }
_ZNK4absl12lts_2026052614flags_internal8FlagImpl4ReadIN8fuzztest8internal14TimeBudgetTypeETnNSt3__19enable_ifIXeqclsr14flags_internalE11StorageKindIT_EELNS1_20FlagValueStorageKindE0EEiE4typeELi0EEEvPS9_:
  622|      2|  void Read(T* value) const ABSL_LOCKS_EXCLUDED(DataGuard()) {
  623|      2|    *value = absl::bit_cast<FlagValueAndInitBit<T>>(ReadOneWord()).value;
  624|      2|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagIN8fuzztest8internal14TimeBudgetTypeEE3GetEvEN1UD2Ev:
  825|      2|      ~U() { value.~T(); }
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetINSt3__18optionalImEENS1_4FlagIS6_EEEET_RKT0_:
  860|      2|  static T InvokeGet(const FlagType& flag) {
  861|      2|    return flag.Get();
  862|      2|  }
_ZNK4absl12lts_2026052614flags_internal4FlagINSt3__18optionalImEEE3GetEv:
  820|      2|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|      2|    union U {
  823|      2|      T value;
  824|      2|      U() {}
  825|      2|      ~U() { value.~T(); }
  826|      2|    };
  827|      2|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|      2|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  834|      2|      impl_.Read(&u.value);
  835|      2|    }
  836|      2|    return std::move(u.value);
  837|      2|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__18optionalImEEE3GetEvEN1UC2Ev:
  824|      2|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueINSt3__18optionalImEELNS1_20FlagValueStorageKindE2EE3GetERKNS1_12SequenceLockERS5_:
  481|      2|  bool Get(const SequenceLock& lock, T& dst) const {
  482|      2|    return lock.TryRead(&dst, value_words, sizeof(T));
  483|      2|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__18optionalImEEE3GetEvEN1UD2Ev:
  825|      2|      ~U() { value.~T(); }
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetImNS1_4FlagImEEEET_RKT0_:
  860|      4|  static T InvokeGet(const FlagType& flag) {
  861|      4|    return flag.Get();
  862|      4|  }
_ZNK4absl12lts_2026052614flags_internal4FlagImE3GetEv:
  820|      4|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|      4|    union U {
  823|      4|      T value;
  824|      4|      U() {}
  825|      4|      ~U() { value.~T(); }
  826|      4|    };
  827|      4|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|      4|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|      4|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 4]
  |  |  |  Branch (190:58): [True: 2, False: 2]
  |  |  ------------------
  ------------------
  834|      2|      impl_.Read(&u.value);
  835|      2|    }
  836|      4|    return std::move(u.value);
  837|      4|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagImE3GetEvEN1UC2Ev:
  824|      4|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueImLNS1_20FlagValueStorageKindE1EE3GetERKNS1_12SequenceLockERm:
  463|      4|  bool Get(const SequenceLock&, T& dst) const {
  464|      4|    int64_t one_word_val = value.load(std::memory_order_acquire);
  465|      4|    if (ABSL_PREDICT_FALSE(one_word_val == FlagOneWordValue::Uninitialized())) {
  ------------------
  |  |  190|      4|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 4]
  |  |  |  Branch (190:58): [True: 2, False: 2]
  |  |  ------------------
  ------------------
  466|      2|      return false;
  467|      2|    }
  468|      2|    std::memcpy(&dst, static_cast<const void*>(&one_word_val), sizeof(T));
  469|      2|    return true;
  470|      4|  }
_ZN4absl12lts_2026052614flags_internal16FlagOneWordValue13UninitializedEv:
  342|      4|  constexpr static int64_t Uninitialized() {
  343|      4|    return static_cast<int64_t>(0xababababababababll);
  344|      4|  }
_ZNK4absl12lts_2026052614flags_internal8FlagImpl4ReadImTnNSt3__19enable_ifIXeqclsr14flags_internalE11StorageKindIT_EELNS1_20FlagValueStorageKindE1EEiE4typeELi0EEEvPS6_:
  614|      2|  void Read(T* value) const ABSL_LOCKS_EXCLUDED(DataGuard()) {
  615|      2|    int64_t v = ReadOneWord();
  616|      2|    std::memcpy(value, static_cast<const void*>(&v), sizeof(T));
  617|      2|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagImE3GetEvEN1UD2Ev:
  825|      4|      ~U() { value.~T(); }
_ZN4absl12lts_2026052614flags_internal7FlagOpsIbEEPvNS1_6FlagOpEPKvS3_S3_:
  876|     38|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|     38|  struct AlignedSpace {
  878|     38|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|     38|        T) unsigned char buf[sizeof(T)];
  880|     38|  };
  881|     38|  using Allocator = std::allocator<AlignedSpace>;
  882|     38|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 38, False: 0]
  ------------------
  883|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 0, False: 38]
  ------------------
  884|      0|      Allocator alloc;
  885|      0|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 0, False: 38]
  ------------------
  888|      0|      T* p = static_cast<T*>(v2);
  889|      0|      p->~T();
  890|      0|      Allocator alloc;
  891|      0|      std::allocator_traits<Allocator>::deallocate(
  892|      0|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      0|      return nullptr;
  894|      0|    }
  895|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 0, False: 38]
  ------------------
  896|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      0|      return nullptr;
  898|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 0, False: 38]
  ------------------
  899|      0|      new (v2) T(*static_cast<const T*>(v1));
  900|      0|      return nullptr;
  901|     20|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 20, False: 18]
  ------------------
  902|     20|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 0, False: 38]
  ------------------
  904|      0|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 38]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 0, False: 38]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      0|      T temp(*static_cast<T*>(v2));
  911|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      0|      *static_cast<T*>(v2) = std::move(temp);
  916|      0|      return v2;
  917|      0|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 38]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|     18|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 18, False: 20]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|     18|      size_t round_to = alignof(FlagValue<T>);
  926|     18|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|     18|      return reinterpret_cast<void*>(offset);
  928|      0|    }
  929|     38|  }
  930|      0|  return nullptr;
  931|     38|}
_ZNO4absl12lts_2026052614flags_internal13FlagRegistrarIbLb1EE8OnUpdateEPFvvE:
  947|      2|  FlagRegistrar OnUpdate(FlagCallbackFunc cb) && {
  948|      2|    flag_.impl_.SetCallback(cb);
  949|      2|    return *this;
  950|      2|  }
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetIbNS1_4FlagIbEEEET_RKT0_:
  860|     12|  static T InvokeGet(const FlagType& flag) {
  861|     12|    return flag.Get();
  862|     12|  }
_ZNK4absl12lts_2026052614flags_internal4FlagIbE3GetEv:
  820|     12|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|     12|    union U {
  823|     12|      T value;
  824|     12|      U() {}
  825|     12|      ~U() { value.~T(); }
  826|     12|    };
  827|     12|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|     12|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|     12|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 8, False: 4]
  |  |  |  Branch (190:49): [Folded, False: 12]
  |  |  |  Branch (190:58): [True: 8, False: 4]
  |  |  ------------------
  ------------------
  834|      8|      impl_.Read(&u.value);
  835|      8|    }
  836|     12|    return std::move(u.value);
  837|     12|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagIbE3GetEvEN1UC2Ev:
  824|     12|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueIbLNS1_20FlagValueStorageKindE0EE3GetERKNS1_12SequenceLockERb:
  442|     12|  bool Get(const SequenceLock&, T& dst) const {
  443|     12|    int64_t storage = value.load(std::memory_order_acquire);
  444|     12|    if (ABSL_PREDICT_FALSE(storage == 0)) {
  ------------------
  |  |  190|     12|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 8, False: 4]
  |  |  |  Branch (190:49): [Folded, False: 12]
  |  |  |  Branch (190:58): [True: 8, False: 4]
  |  |  ------------------
  ------------------
  445|       |      // This assert is to ensure that the initialization inside FlagImpl::Init
  446|       |      // is able to set init member correctly.
  447|      8|      static_assert(offsetof(FlagValueAndInitBit<T>, init) == sizeof(T),
  448|      8|                    "Unexpected memory layout of FlagValueAndInitBit");
  449|      8|      return false;
  450|      8|    }
  451|      4|    dst = absl::bit_cast<FlagValueAndInitBit<T>>(storage).value;
  452|      4|    return true;
  453|     12|  }
_ZNK4absl12lts_2026052614flags_internal8FlagImpl4ReadEPb:
  607|      8|  void Read(bool* value) const ABSL_LOCKS_EXCLUDED(DataGuard()) {
  608|      8|    *value = ReadOneBool();
  609|      8|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagIbE3GetEvEN1UD2Ev:
  825|     12|      ~U() { value.~T(); }
_ZN4absl12lts_2026052614flags_internal7FlagOpsINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEPvNS1_6FlagOpEPKvSA_SA_:
  876|     44|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|     44|  struct AlignedSpace {
  878|     44|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|     44|        T) unsigned char buf[sizeof(T)];
  880|     44|  };
  881|     44|  using Allocator = std::allocator<AlignedSpace>;
  882|     44|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 44, False: 0]
  ------------------
  883|      2|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 2, False: 42]
  ------------------
  884|      2|      Allocator alloc;
  885|      2|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      2|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 2, False: 42]
  ------------------
  888|      2|      T* p = static_cast<T*>(v2);
  889|      2|      p->~T();
  890|      2|      Allocator alloc;
  891|      2|      std::allocator_traits<Allocator>::deallocate(
  892|      2|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      2|      return nullptr;
  894|      0|    }
  895|      2|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 2, False: 42]
  ------------------
  896|      2|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      2|      return nullptr;
  898|      6|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 6, False: 38]
  ------------------
  899|      6|      new (v2) T(*static_cast<const T*>(v1));
  900|      6|      return nullptr;
  901|      0|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 0, False: 44]
  ------------------
  902|      0|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      2|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 2, False: 42]
  ------------------
  904|      2|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 44]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      2|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 2, False: 42]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      2|      T temp(*static_cast<T*>(v2));
  911|      2|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 2]
  ------------------
  912|      2|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      2|      *static_cast<T*>(v2) = std::move(temp);
  916|      2|      return v2;
  917|      2|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 44]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|     28|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 28, False: 16]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|     28|      size_t round_to = alignof(FlagValue<T>);
  926|     28|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|     28|      return reinterpret_cast<void*>(offset);
  928|      2|    }
  929|     44|  }
  930|      0|  return nullptr;
  931|     44|}
_ZN4absl12lts_2026052614flags_internal7FlagOpsINS0_8DurationEEEPvNS1_6FlagOpEPKvS4_S4_:
  876|     26|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|     26|  struct AlignedSpace {
  878|     26|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|     26|        T) unsigned char buf[sizeof(T)];
  880|     26|  };
  881|     26|  using Allocator = std::allocator<AlignedSpace>;
  882|     26|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 26, False: 0]
  ------------------
  883|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 0, False: 26]
  ------------------
  884|      0|      Allocator alloc;
  885|      0|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 0, False: 26]
  ------------------
  888|      0|      T* p = static_cast<T*>(v2);
  889|      0|      p->~T();
  890|      0|      Allocator alloc;
  891|      0|      std::allocator_traits<Allocator>::deallocate(
  892|      0|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      0|      return nullptr;
  894|      0|    }
  895|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 0, False: 26]
  ------------------
  896|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      0|      return nullptr;
  898|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 0, False: 26]
  ------------------
  899|      0|      new (v2) T(*static_cast<const T*>(v1));
  900|      0|      return nullptr;
  901|      8|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 8, False: 18]
  ------------------
  902|      8|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 0, False: 26]
  ------------------
  904|      0|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 26]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 0, False: 26]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      0|      T temp(*static_cast<T*>(v2));
  911|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      0|      *static_cast<T*>(v2) = std::move(temp);
  916|      0|      return v2;
  917|      0|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 26]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|     18|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 18, False: 8]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|     18|      size_t round_to = alignof(FlagValue<T>);
  926|     18|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|     18|      return reinterpret_cast<void*>(offset);
  928|      0|    }
  929|     26|  }
  930|      0|  return nullptr;
  931|     26|}
_ZN4absl12lts_2026052614flags_internal7FlagOpsIN8fuzztest8internal14TimeBudgetTypeEEEPvNS1_6FlagOpEPKvS6_S6_:
  876|      6|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|      6|  struct AlignedSpace {
  878|      6|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|      6|        T) unsigned char buf[sizeof(T)];
  880|      6|  };
  881|      6|  using Allocator = std::allocator<AlignedSpace>;
  882|      6|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 6, False: 0]
  ------------------
  883|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 0, False: 6]
  ------------------
  884|      0|      Allocator alloc;
  885|      0|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 0, False: 6]
  ------------------
  888|      0|      T* p = static_cast<T*>(v2);
  889|      0|      p->~T();
  890|      0|      Allocator alloc;
  891|      0|      std::allocator_traits<Allocator>::deallocate(
  892|      0|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      0|      return nullptr;
  894|      0|    }
  895|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 0, False: 6]
  ------------------
  896|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      0|      return nullptr;
  898|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 0, False: 6]
  ------------------
  899|      0|      new (v2) T(*static_cast<const T*>(v1));
  900|      0|      return nullptr;
  901|      2|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 2, False: 4]
  ------------------
  902|      2|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 0, False: 6]
  ------------------
  904|      0|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 6]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 0, False: 6]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      0|      T temp(*static_cast<T*>(v2));
  911|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      0|      *static_cast<T*>(v2) = std::move(temp);
  916|      0|      return v2;
  917|      0|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 6]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|      4|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 4, False: 2]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|      4|      size_t round_to = alignof(FlagValue<T>);
  926|      4|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|      4|      return reinterpret_cast<void*>(offset);
  928|      0|    }
  929|      6|  }
  930|      0|  return nullptr;
  931|      6|}
_ZN4absl12lts_2026052614flags_internal7FlagOpsINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEEEPvNS1_6FlagOpEPKvSC_SC_:
  876|     40|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|     40|  struct AlignedSpace {
  878|     40|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|     40|        T) unsigned char buf[sizeof(T)];
  880|     40|  };
  881|     40|  using Allocator = std::allocator<AlignedSpace>;
  882|     40|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 40, False: 0]
  ------------------
  883|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 0, False: 40]
  ------------------
  884|      0|      Allocator alloc;
  885|      0|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 0, False: 40]
  ------------------
  888|      0|      T* p = static_cast<T*>(v2);
  889|      0|      p->~T();
  890|      0|      Allocator alloc;
  891|      0|      std::allocator_traits<Allocator>::deallocate(
  892|      0|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      0|      return nullptr;
  894|      0|    }
  895|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 0, False: 40]
  ------------------
  896|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      0|      return nullptr;
  898|      8|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 8, False: 32]
  ------------------
  899|      8|      new (v2) T(*static_cast<const T*>(v1));
  900|      8|      return nullptr;
  901|      0|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 0, False: 40]
  ------------------
  902|      0|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 0, False: 40]
  ------------------
  904|      0|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 40]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 0, False: 40]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      0|      T temp(*static_cast<T*>(v2));
  911|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      0|      *static_cast<T*>(v2) = std::move(temp);
  916|      0|      return v2;
  917|      0|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 40]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|     32|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 32, False: 8]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|     32|      size_t round_to = alignof(FlagValue<T>);
  926|     32|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|     32|      return reinterpret_cast<void*>(offset);
  928|      0|    }
  929|     40|  }
  930|      0|  return nullptr;
  931|     40|}
_ZN4absl12lts_2026052614flags_internal7FlagOpsImEEPvNS1_6FlagOpEPKvS3_S3_:
  876|     26|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|     26|  struct AlignedSpace {
  878|     26|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|     26|        T) unsigned char buf[sizeof(T)];
  880|     26|  };
  881|     26|  using Allocator = std::allocator<AlignedSpace>;
  882|     26|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 26, False: 0]
  ------------------
  883|      2|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 2, False: 24]
  ------------------
  884|      2|      Allocator alloc;
  885|      2|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      2|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 2, False: 24]
  ------------------
  888|      2|      T* p = static_cast<T*>(v2);
  889|      2|      p->~T();
  890|      2|      Allocator alloc;
  891|      2|      std::allocator_traits<Allocator>::deallocate(
  892|      2|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      2|      return nullptr;
  894|      0|    }
  895|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 0, False: 26]
  ------------------
  896|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      0|      return nullptr;
  898|      2|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 2, False: 24]
  ------------------
  899|      2|      new (v2) T(*static_cast<const T*>(v1));
  900|      2|      return nullptr;
  901|      6|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 6, False: 20]
  ------------------
  902|      6|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      2|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 2, False: 24]
  ------------------
  904|      2|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 26]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      2|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 2, False: 24]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      2|      T temp(*static_cast<T*>(v2));
  911|      2|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 2]
  ------------------
  912|      2|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      2|      *static_cast<T*>(v2) = std::move(temp);
  916|      2|      return v2;
  917|      2|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 26]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|     10|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 10, False: 16]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|     10|      size_t round_to = alignof(FlagValue<T>);
  926|     10|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|     10|      return reinterpret_cast<void*>(offset);
  928|      2|    }
  929|     26|  }
  930|      0|  return nullptr;
  931|     26|}
_ZN4absl12lts_2026052614flags_internal7FlagOpsINSt3__18optionalImEEEEPvNS1_6FlagOpEPKvS6_S6_:
  876|      6|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|      6|  struct AlignedSpace {
  878|      6|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|      6|        T) unsigned char buf[sizeof(T)];
  880|      6|  };
  881|      6|  using Allocator = std::allocator<AlignedSpace>;
  882|      6|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 6, False: 0]
  ------------------
  883|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 0, False: 6]
  ------------------
  884|      0|      Allocator alloc;
  885|      0|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 0, False: 6]
  ------------------
  888|      0|      T* p = static_cast<T*>(v2);
  889|      0|      p->~T();
  890|      0|      Allocator alloc;
  891|      0|      std::allocator_traits<Allocator>::deallocate(
  892|      0|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      0|      return nullptr;
  894|      0|    }
  895|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 0, False: 6]
  ------------------
  896|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      0|      return nullptr;
  898|      0|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 0, False: 6]
  ------------------
  899|      0|      new (v2) T(*static_cast<const T*>(v1));
  900|      0|      return nullptr;
  901|      2|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 2, False: 4]
  ------------------
  902|      2|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 0, False: 6]
  ------------------
  904|      0|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 6]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 0, False: 6]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      0|      T temp(*static_cast<T*>(v2));
  911|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      0|      *static_cast<T*>(v2) = std::move(temp);
  916|      0|      return v2;
  917|      0|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 6]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|      4|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 4, False: 2]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|      4|      size_t round_to = alignof(FlagValue<T>);
  926|      4|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|      4|      return reinterpret_cast<void*>(offset);
  928|      0|    }
  929|      6|  }
  930|      0|  return nullptr;
  931|      6|}
_ZNO4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__18optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEELb1EE8OnUpdateEPFvvE:
  947|      4|  FlagRegistrar OnUpdate(FlagCallbackFunc cb) && {
  948|      4|    flag_.impl_.SetCallback(cb);
  949|      4|    return *this;
  950|      4|  }
_ZNO4absl12lts_2026052614flags_internal13FlagRegistrarINS0_8DurationELb1EE8OnUpdateEPFvvE:
  947|      2|  FlagRegistrar OnUpdate(FlagCallbackFunc cb) && {
  948|      2|    flag_.impl_.SetCallback(cb);
  949|      2|    return *this;
  950|      2|  }
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS1_4FlagISA_EEEET_RKT0_:
  860|     16|  static T InvokeGet(const FlagType& flag) {
  861|     16|    return flag.Get();
  862|     16|  }
_ZNK4absl12lts_2026052614flags_internal4FlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEE3GetEv:
  820|     16|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|     16|    union U {
  823|     16|      T value;
  824|     16|      U() {}
  825|     16|      ~U() { value.~T(); }
  826|     16|    };
  827|     16|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|     16|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|     16|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 6, False: 10]
  |  |  |  Branch (190:49): [Folded, False: 16]
  |  |  |  Branch (190:58): [True: 6, False: 10]
  |  |  ------------------
  ------------------
  834|      6|      impl_.Read(&u.value);
  835|      6|    }
  836|     16|    return std::move(u.value);
  837|     16|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEE3GetEvEN1UC2Ev:
  824|     16|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEELNS1_20FlagValueStorageKindE3EE3GetERKNS1_12SequenceLockERS9_:
  536|     16|  bool Get(const SequenceLock&, T& dst) const {
  537|     16|    MaskedPointer ptr_value = value.load(std::memory_order_acquire);
  538|       |
  539|     16|    if (ABSL_PREDICT_TRUE(ptr_value.AllowsUnprotectedRead())) {
  ------------------
  |  |  191|     16|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 10, False: 6]
  |  |  |  Branch (191:48): [Folded, False: 16]
  |  |  |  Branch (191:57): [True: 10, False: 6]
  |  |  ------------------
  ------------------
  540|     10|      ::new (static_cast<void*>(&dst)) T(*static_cast<T*>(ptr_value.Ptr()));
  541|     10|      return true;
  542|     10|    }
  543|      6|    return false;
  544|     16|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEE3GetEvEN1UD2Ev:
  825|     16|      ~U() { value.~T(); }
_ZNK4absl12lts_2026052614flags_internal8FlagImpl16ValueStorageKindEv:
  692|     98|  FlagValueStorageKind ValueStorageKind() const {
  693|     98|    return static_cast<FlagValueStorageKind>(value_storage_kind_);
  694|     98|  }
_ZNK4absl12lts_2026052614flags_internal8FlagImpl11DefaultKindEv:
  696|      4|      ABSL_EXCLUSIVE_LOCKS_REQUIRED(DataGuard()) {
  697|      4|    return static_cast<FlagDefaultKind>(def_kind_);
  698|      4|  }
_ZN4absl12lts_2026052614flags_internal5AllocEPFPvNS1_6FlagOpEPKvS2_S2_E:
   96|      4|inline void* Alloc(FlagOpFn op) {
   97|      4|  return op(FlagOp::kAlloc, nullptr, nullptr, nullptr);
   98|      4|}
_ZN4absl12lts_2026052614flags_internal6DeleteEPFPvNS1_6FlagOpEPKvS2_S2_ES2_:
  100|      4|inline void Delete(FlagOpFn op, void* obj) {
  101|      4|  op(FlagOp::kDelete, nullptr, obj, nullptr);
  102|      4|}
_ZN4absl12lts_2026052614flags_internal4CopyEPFPvNS1_6FlagOpEPKvS2_S2_ES5_S2_:
  104|      2|inline void Copy(FlagOpFn op, const void* src, void* dst) {
  105|      2|  op(FlagOp::kCopy, src, dst, nullptr);
  106|      2|}
_ZN4absl12lts_2026052614flags_internal13CopyConstructEPFPvNS1_6FlagOpEPKvS2_S2_ES5_S2_:
  109|     22|inline void CopyConstruct(FlagOpFn op, const void* src, void* dst) {
  110|     22|  op(FlagOp::kCopyConstruct, src, dst, nullptr);
  111|     22|}
_ZN4absl12lts_2026052614flags_internal5CloneEPFPvNS1_6FlagOpEPKvS2_S2_ES5_:
  113|      2|inline void* Clone(FlagOpFn op, const void* obj) {
  114|      2|  void* res = flags_internal::Alloc(op);
  115|      2|  flags_internal::CopyConstruct(op, obj, res);
  116|      2|  return res;
  117|      2|}
_ZN4absl12lts_2026052614flags_internal5ParseEPFPvNS1_6FlagOpEPKvS2_S2_ENSt3__117basic_string_viewIcNS8_11char_traitsIcEEEES2_PNS8_12basic_stringIcSB_NS8_9allocatorIcEEEE:
  120|      4|                  std::string* error) {
  121|      4|  return op(FlagOp::kParse, &text, dst, error) != nullptr;
  122|      4|}
_ZN4absl12lts_2026052614flags_internal6SizeofEPFPvNS1_6FlagOpEPKvS2_S2_E:
  130|     38|inline size_t Sizeof(FlagOpFn op) {
  131|       |  // This sequence of casts reverses the sequence from
  132|       |  // `flags_internal::FlagOps()`
  133|     38|  return static_cast<size_t>(reinterpret_cast<intptr_t>(
  134|     38|      op(FlagOp::kSizeof, nullptr, nullptr, nullptr)));
  135|     38|}
_ZN4absl12lts_2026052614flags_internal10FastTypeIdEPFPvNS1_6FlagOpEPKvS2_S2_E:
  137|      4|inline FlagFastTypeId FastTypeId(FlagOpFn op) {
  138|      4|  return absl::bit_cast<FlagFastTypeId>(
  139|      4|      op(FlagOp::kFastTypeId, nullptr, nullptr, nullptr));
  140|      4|}
_ZN4absl12lts_2026052614flags_internal11ValueOffsetEPFPvNS1_6FlagOpEPKvS2_S2_E:
  150|    138|inline ptrdiff_t ValueOffset(FlagOpFn op) {
  151|       |  // This sequence of casts reverses the sequence from
  152|       |  // `flags_internal::FlagOps()`
  153|    138|  return static_cast<ptrdiff_t>(reinterpret_cast<intptr_t>(
  154|    138|      op(FlagOp::kValueOffset, nullptr, nullptr, nullptr)));
  155|    138|}
_ZN4absl12lts_2026052614flags_internal16InitDefaultValueINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEEET_NS1_11EmptyBracesE:
  281|      6|constexpr T InitDefaultValue(EmptyBraces) {
  282|      6|  return T{};
  283|      6|}
_ZN4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELb1EEC2ERNS1_4FlagISC_EEPKc:
  942|      8|      : flag_(flag) {
  943|      8|    if (do_register)
  ------------------
  |  Branch (943:9): [True: 8, Folded]
  ------------------
  944|      8|      flags_internal::RegisterCommandLineFlag(flag_.impl_, filename);
  945|      8|  }
_ZNK4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELb1EEcvNS1_18FlagRegistrarEmptyEEv:
  955|      8|  constexpr operator FlagRegistrarEmpty() const { return {}; }  // NOLINT
_ZN4absl12lts_2026052614flags_internal7FlagOpsINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEEEPvNS1_6FlagOpEPKvSD_SD_:
  876|     30|void* FlagOps(FlagOp op, const void* v1, void* v2, void* v3) {
  877|     30|  struct AlignedSpace {
  878|     30|    alignas(MaskedPointer::RequiredAlignment()) alignas(
  879|     30|        T) unsigned char buf[sizeof(T)];
  880|     30|  };
  881|     30|  using Allocator = std::allocator<AlignedSpace>;
  882|     30|  switch (op) {
  ------------------
  |  Branch (882:11): [True: 30, False: 0]
  ------------------
  883|      0|    case FlagOp::kAlloc: {
  ------------------
  |  Branch (883:5): [True: 0, False: 30]
  ------------------
  884|      0|      Allocator alloc;
  885|      0|      return std::allocator_traits<Allocator>::allocate(alloc, 1);
  886|      0|    }
  887|      0|    case FlagOp::kDelete: {
  ------------------
  |  Branch (887:5): [True: 0, False: 30]
  ------------------
  888|      0|      T* p = static_cast<T*>(v2);
  889|      0|      p->~T();
  890|      0|      Allocator alloc;
  891|      0|      std::allocator_traits<Allocator>::deallocate(
  892|      0|          alloc, reinterpret_cast<AlignedSpace*>(p), 1);
  893|      0|      return nullptr;
  894|      0|    }
  895|      0|    case FlagOp::kCopy:
  ------------------
  |  Branch (895:5): [True: 0, False: 30]
  ------------------
  896|      0|      *static_cast<T*>(v2) = *static_cast<const T*>(v1);
  897|      0|      return nullptr;
  898|      6|    case FlagOp::kCopyConstruct:
  ------------------
  |  Branch (898:5): [True: 6, False: 24]
  ------------------
  899|      6|      new (v2) T(*static_cast<const T*>(v1));
  900|      6|      return nullptr;
  901|      0|    case FlagOp::kSizeof:
  ------------------
  |  Branch (901:5): [True: 0, False: 30]
  ------------------
  902|      0|      return reinterpret_cast<void*>(static_cast<uintptr_t>(sizeof(T)));
  903|      0|    case FlagOp::kFastTypeId:
  ------------------
  |  Branch (903:5): [True: 0, False: 30]
  ------------------
  904|      0|      return absl::bit_cast<void*>(absl::FastTypeId<T>());
  905|      0|    case FlagOp::kRuntimeTypeId:
  ------------------
  |  Branch (905:5): [True: 0, False: 30]
  ------------------
  906|      0|      return const_cast<std::type_info*>(GenRuntimeTypeId<T>());
  907|      0|    case FlagOp::kParse: {
  ------------------
  |  Branch (907:5): [True: 0, False: 30]
  ------------------
  908|       |      // Initialize the temporary instance of type T based on current value in
  909|       |      // destination (which is going to be flag's default value).
  910|      0|      T temp(*static_cast<T*>(v2));
  911|      0|      if (!absl::ParseFlag<T>(*static_cast<const absl::string_view*>(v1), &temp,
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|                              static_cast<std::string*>(v3))) {
  913|      0|        return nullptr;
  914|      0|      }
  915|      0|      *static_cast<T*>(v2) = std::move(temp);
  916|      0|      return v2;
  917|      0|    }
  918|      0|    case FlagOp::kUnparse:
  ------------------
  |  Branch (918:5): [True: 0, False: 30]
  ------------------
  919|      0|      *static_cast<std::string*>(v2) =
  920|      0|          absl::UnparseFlag<T>(*static_cast<const T*>(v1));
  921|      0|      return nullptr;
  922|     24|    case FlagOp::kValueOffset: {
  ------------------
  |  Branch (922:5): [True: 24, False: 6]
  ------------------
  923|       |      // Round sizeof(FlagImp) to a multiple of alignof(FlagValue<T>) to get the
  924|       |      // offset of the data.
  925|     24|      size_t round_to = alignof(FlagValue<T>);
  926|     24|      size_t offset = (sizeof(FlagImpl) + round_to - 1) / round_to * round_to;
  927|     24|      return reinterpret_cast<void*>(offset);
  928|      0|    }
  929|     30|  }
  930|      0|  return nullptr;
  931|     30|}
_ZNO4absl12lts_2026052614flags_internal13FlagRegistrarINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELb1EE8OnUpdateEPFvvE:
  947|      6|  FlagRegistrar OnUpdate(FlagCallbackFunc cb) && {
  948|      6|    flag_.impl_.SetCallback(cb);
  949|      6|    return *this;
  950|      6|  }
_ZN4absl12lts_2026052614flags_internal12FlagImplPeer9InvokeGetINSt3__16vectorINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS9_ISB_EEEENS1_4FlagISD_EEEET_RKT0_:
  860|     10|  static T InvokeGet(const FlagType& flag) {
  861|     10|    return flag.Get();
  862|     10|  }
_ZNK4absl12lts_2026052614flags_internal4FlagINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEE3GetEv:
  820|     10|  T Get() const {
  821|       |    // See implementation notes in CommandLineFlag::Get().
  822|     10|    union U {
  823|     10|      T value;
  824|     10|      U() {}
  825|     10|      ~U() { value.~T(); }
  826|     10|    };
  827|     10|    U u;
  828|       |
  829|       |#if !defined(NDEBUG)
  830|       |    impl_.AssertValidType(absl::FastTypeId<T>(), &GenRuntimeTypeId<T>);
  831|       |#endif
  832|       |
  833|     10|    if (ABSL_PREDICT_FALSE(!value_.Get(impl_.seq_lock_, u.value))) {
  ------------------
  |  |  190|     10|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 6, False: 4]
  |  |  |  Branch (190:49): [Folded, False: 10]
  |  |  |  Branch (190:58): [True: 6, False: 4]
  |  |  ------------------
  ------------------
  834|      6|      impl_.Read(&u.value);
  835|      6|    }
  836|     10|    return std::move(u.value);
  837|     10|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEE3GetEvEN1UC2Ev:
  824|     10|      U() {}
_ZNK4absl12lts_2026052614flags_internal9FlagValueINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEELNS1_20FlagValueStorageKindE3EE3GetERKNS1_12SequenceLockERSC_:
  536|     10|  bool Get(const SequenceLock&, T& dst) const {
  537|     10|    MaskedPointer ptr_value = value.load(std::memory_order_acquire);
  538|       |
  539|     10|    if (ABSL_PREDICT_TRUE(ptr_value.AllowsUnprotectedRead())) {
  ------------------
  |  |  191|     10|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 4, False: 6]
  |  |  |  Branch (191:48): [Folded, False: 10]
  |  |  |  Branch (191:57): [True: 4, False: 6]
  |  |  ------------------
  ------------------
  540|      4|      ::new (static_cast<void*>(&dst)) T(*static_cast<T*>(ptr_value.Ptr()));
  541|      4|      return true;
  542|      4|    }
  543|      6|    return false;
  544|     10|  }
_ZZNK4absl12lts_2026052614flags_internal4FlagINSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEE3GetEvEN1UD2Ev:
  825|     10|      ~U() { value.~T(); }

_ZN4absl12lts_2026052614flags_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_2026052614flags_internal21ProgramInvocationNameEv:
   39|      2|std::string ProgramInvocationName() {
   40|      2|  absl::MutexLock l(ProgramNameMutex());
   41|      2|  return program_name ? *program_name : "UNKNOWN";
  ------------------
  |  Branch (41:10): [True: 0, False: 2]
  ------------------
   42|      2|}
_ZN4absl12lts_2026052614flags_internal24SetProgramInvocationNameENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   50|      2|void SetProgramInvocationName(absl::string_view prog_name_str) {
   51|      2|  absl::MutexLock l(ProgramNameMutex());
   52|      2|  if (!program_name) {
  ------------------
  |  Branch (52:7): [True: 2, False: 0]
  ------------------
   53|      2|    program_name = new std::string(prog_name_str);
   54|      2|  } else {
   55|      0|    program_name->assign(prog_name_str.data(), prog_name_str.size());
   56|      0|  }
   57|      2|}
program_name.cc:_ZN4absl12lts_2026052614flags_internalL16ProgramNameMutexEv:
   32|      4|static absl::Mutex& ProgramNameMutex() {
   33|      4|  static absl::NoDestructor<absl::Mutex> mutex;
   34|      4|  return *mutex;
   35|      4|}

_ZNK4absl12lts_2026052614flags_internal12SequenceLock7TryReadEPvPKNSt3__16atomicImEEm:
   80|     26|  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|     26|    int64_t seq_before = lock_.load(std::memory_order_acquire);
   84|     26|    if (ABSL_PREDICT_FALSE(seq_before & 1) == 1) return false;
  ------------------
  |  |  190|     26|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:49): [Folded, False: 26]
  |  |  |  Branch (190:58): [True: 10, False: 16]
  |  |  ------------------
  ------------------
  |  Branch (84:9): [True: 10, False: 16]
  ------------------
   85|     16|    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|     16|    std::atomic_thread_fence(std::memory_order_acquire);
   89|     16|    int64_t seq_after = lock_.load(std::memory_order_relaxed);
   90|     16|    return ABSL_PREDICT_TRUE(seq_before == seq_after);
  ------------------
  |  |  191|     16|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:48): [Folded, False: 16]
  |  |  |  Branch (191:57): [True: 16, False: 0]
  |  |  ------------------
  ------------------
   91|     26|  }
_ZN4absl12lts_2026052614flags_internal12SequenceLock21RelaxedCopyFromAtomicEPvPKNSt3__16atomicImEEm:
  144|     16|                                    size_t size) {
  145|     16|    char* dst_byte = static_cast<char*>(dst);
  146|     34|    while (size >= sizeof(uint64_t)) {
  ------------------
  |  Branch (146:12): [True: 18, False: 16]
  ------------------
  147|     18|      uint64_t word = src->load(std::memory_order_relaxed);
  148|     18|      std::memcpy(dst_byte, &word, sizeof(word));
  149|     18|      dst_byte += sizeof(word);
  150|     18|      src++;
  151|     18|      size -= sizeof(word);
  152|     18|    }
  153|     16|    if (size > 0) {
  ------------------
  |  Branch (153:9): [True: 14, False: 2]
  ------------------
  154|     14|      uint64_t word = src->load(std::memory_order_relaxed);
  155|     14|      std::memcpy(dst_byte, &word, size);
  156|     14|    }
  157|     16|  }
_ZN4absl12lts_2026052614flags_internal12SequenceLock15MarkInitializedEv:
   63|     48|  void MarkInitialized() {
   64|       |    assert(lock_.load(std::memory_order_relaxed) == kUninitialized);
   65|     48|    lock_.store(0, std::memory_order_release);
   66|     48|  }
_ZN4absl12lts_2026052614flags_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_2026052614flags_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_2026052614flags_internal16GetFlagsHelpModeEv:
  462|      4|HelpMode GetFlagsHelpMode() {
  463|      4|  absl::MutexLock l(HelpAttributesMutex());
  464|      4|  return help_mode;
  465|      4|}
_ZN4absl12lts_2026052614flags_internal9MaybeExitENS1_8HelpModeE:
  542|      2|void MaybeExit(HelpMode mode) {
  543|      2|  switch (mode) {
  544|      2|    case flags_internal::HelpMode::kNone:
  ------------------
  |  Branch (544:5): [True: 2, False: 0]
  ------------------
  545|      2|      return;
  546|      0|    case flags_internal::HelpMode::kOnlyCheckArgs:
  ------------------
  |  Branch (546:5): [True: 0, False: 2]
  ------------------
  547|      0|    case flags_internal::HelpMode::kVersion:
  ------------------
  |  Branch (547:5): [True: 0, False: 2]
  ------------------
  548|      0|      std::exit(0);
  549|      0|    default:  // For all the other modes we exit with 1
  ------------------
  |  Branch (549:5): [True: 0, False: 2]
  ------------------
  550|      0|      std::exit(1);
  551|      2|  }
  552|      2|}
usage.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_119HelpAttributesMutexEv:
  437|      4|absl::Mutex& HelpAttributesMutex() {
  438|      4|  static absl::NoDestructor<absl::Mutex> mutex;
  439|      4|  return *mutex;
  440|      4|}

_ZN4absl12lts_2026052614flags_internal13AbslParseFlagENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPmPNS2_12basic_stringIcS5_NS2_9allocatorIcEEEE:
  104|      2|bool AbslParseFlag(absl::string_view text, unsigned long* dst, std::string*) {
  105|      2|  return ParseFlagImpl(text, *dst);
  106|      2|}
_ZN4absl12lts_2026052614flags_internal13AbslParseFlagENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPNS2_12basic_stringIcS5_NS2_9allocatorIcEEEESB_:
  157|      2|bool AbslParseFlag(absl::string_view text, std::string* dst, std::string*) {
  158|      2|  dst->assign(text.data(), text.size());
  159|      2|  return true;
  160|      2|}
marshalling.cc:_ZN4absl12lts_2026052614flags_internalL11NumericBaseENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   57|      2|static int NumericBase(absl::string_view text) {
   58|      2|  if (text.empty()) return 0;
  ------------------
  |  Branch (58:7): [True: 0, False: 2]
  ------------------
   59|      2|  size_t num_start = (text[0] == '-' || text[0] == '+') ? 1 : 0;
  ------------------
  |  Branch (59:23): [True: 0, False: 2]
  |  Branch (59:41): [True: 0, False: 2]
  ------------------
   60|      2|  const bool hex = (text.size() >= num_start + 2 && text[num_start] == '0' &&
  ------------------
  |  Branch (60:21): [True: 2, False: 0]
  |  Branch (60:53): [True: 0, False: 2]
  ------------------
   61|      0|                    (text[num_start + 1] == 'x' || text[num_start + 1] == 'X'));
  ------------------
  |  Branch (61:22): [True: 0, False: 0]
  |  Branch (61:52): [True: 0, False: 0]
  ------------------
   62|      2|  return hex ? 16 : 10;
  ------------------
  |  Branch (62:10): [True: 0, False: 2]
  ------------------
   63|      2|}
_ZN4absl12lts_2026052614flags_internal13ParseFlagImplImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERT_:
   66|      2|inline bool ParseFlagImpl(absl::string_view text, IntType& dst) {
   67|      2|  text = absl::StripAsciiWhitespace(text);
   68|       |
   69|      2|  return absl::numbers_internal::safe_strtoi_base(text, &dst,
   70|      2|                                                  NumericBase(text));
   71|      2|}

_ZN4absl12lts_202605269ParseFlagINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEbNS2_17basic_string_viewIcS5_EEPT_PS8_:
  307|      2|inline bool ParseFlag(absl::string_view input, T* dst, std::string* error) {
  308|      2|  return flags_internal::InvokeParseFlag(input, dst, error);
  309|      2|}
_ZN4absl12lts_2026052614flags_internal15InvokeParseFlagINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEEbNS3_17basic_string_viewIcS6_EEPT_PS9_:
  256|      2|bool InvokeParseFlag(absl::string_view input, T* dst, std::string* err) {
  257|       |  // Comment on next line provides a good compiler error message if T
  258|       |  // does not have AbslParseFlag(absl::string_view, T*, std::string*).
  259|      2|  return AbslParseFlag(input, dst, err);  // Is T missing AbslParseFlag?
  260|      2|}
_ZN4absl12lts_202605269ParseFlagImEEbNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPT_PNS2_12basic_stringIcS5_NS2_9allocatorIcEEEE:
  307|      2|inline bool ParseFlag(absl::string_view input, T* dst, std::string* error) {
  308|      2|  return flags_internal::InvokeParseFlag(input, dst, error);
  309|      2|}
_ZN4absl12lts_2026052614flags_internal15InvokeParseFlagImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPT_PNS3_12basic_stringIcS6_NS3_9allocatorIcEEEE:
  256|      2|bool InvokeParseFlag(absl::string_view input, T* dst, std::string* err) {
  257|       |  // Comment on next line provides a good compiler error message if T
  258|       |  // does not have AbslParseFlag(absl::string_view, T*, std::string*).
  259|      2|  return AbslParseFlag(input, dst, err);  // Is T missing AbslParseFlag?
  260|      2|}

_ZN4absl12lts_2026052614flags_internal24ParseAbseilFlagsOnlyImplEiPPcRNSt3__16vectorIS2_NS4_9allocatorIS2_EEEERNS5_INS0_16UnrecognizedFlagENS6_ISA_EEEENS1_16UsageFlagsActionE:
  753|      2|    UsageFlagsAction usage_flag_action) {
  754|      2|  ABSL_INTERNAL_CHECK(argc > 0, "Missing argv[0]");
  ------------------
  |  |   85|      2|  do {                                                             \
  |  |   86|      2|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  |  |  Branch (190: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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241: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]
  |  |  ------------------
  ------------------
  755|       |
  756|      2|  using flags_internal::ArgsList;
  757|      2|  using flags_internal::specified_flags;
  758|       |
  759|      2|  std::vector<std::string> flagfile_value;
  760|      2|  std::vector<ArgsList> input_args;
  761|       |
  762|       |  // Once parsing has started we will not allow more flag registrations.
  763|      2|  flags_internal::FinalizeRegistry();
  764|       |
  765|       |  // This routine does not return anything since we abort on failure.
  766|      2|  flags_internal::CheckDefaultValuesParsingRoundtrip();
  767|       |
  768|      2|  input_args.push_back(ArgsList(argc, argv));
  769|       |
  770|       |  // Set program invocation name if it is not set before.
  771|      2|  if (flags_internal::ProgramInvocationName() == "UNKNOWN") {
  ------------------
  |  Branch (771:7): [True: 2, False: 0]
  ------------------
  772|      2|    flags_internal::SetProgramInvocationName(argv[0]);
  773|      2|  }
  774|      2|  positional_args.push_back(argv[0]);
  775|       |
  776|      2|  absl::MutexLock l(flags_internal::SpecifiedFlagsMutex());
  777|      2|  if (specified_flags == nullptr) {
  ------------------
  |  Branch (777:7): [True: 2, False: 0]
  ------------------
  778|      2|    specified_flags = new std::vector<const CommandLineFlag*>;
  779|      2|  } else {
  780|      0|    specified_flags->clear();
  781|      0|  }
  782|       |
  783|       |  // Iterate through the list of the input arguments. First level are
  784|       |  // arguments originated from argc/argv. Following levels are arguments
  785|       |  // originated from recursive parsing of flagfile(s).
  786|      2|  bool success = true;
  787|      6|  while (!input_args.empty()) {
  ------------------
  |  Branch (787:10): [True: 6, False: 0]
  ------------------
  788|       |    // First we process the built-in generator flags.
  789|      6|    success &= flags_internal::HandleGeneratorFlags(input_args, flagfile_value);
  790|       |
  791|       |    // Select top-most (most recent) arguments list. If it is empty drop it
  792|       |    // and re-try.
  793|      6|    ArgsList& curr_list = input_args.back();
  794|       |
  795|       |    // Every ArgsList starts with real or fake program name, so we can always
  796|       |    // start by skipping it.
  797|      6|    curr_list.PopFront();
  798|       |
  799|      6|    if (curr_list.Size() == 0) {
  ------------------
  |  Branch (799:9): [True: 0, False: 6]
  ------------------
  800|      0|      input_args.pop_back();
  801|      0|      continue;
  802|      0|    }
  803|       |
  804|       |    // Handle the next argument in the current list. If the stack of argument
  805|       |    // lists contains only one element - we are processing an argument from
  806|       |    // the original argv.
  807|      6|    absl::string_view arg(curr_list.Front());
  808|      6|    bool arg_from_argv = input_args.size() == 1;
  809|       |
  810|       |    // If argument does not start with '-' or is just "-" - this is
  811|       |    // positional argument.
  812|      6|    if (!absl::ConsumePrefix(&arg, "-") || arg.empty()) {
  ------------------
  |  Branch (812:9): [True: 0, False: 6]
  |  Branch (812:44): [True: 0, False: 6]
  ------------------
  813|      0|      ABSL_INTERNAL_CHECK(arg_from_argv,
  ------------------
  |  |   85|      0|  do {                                                             \
  |  |   86|      0|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  |  |  Branch (190: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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241: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]
  |  |  ------------------
  ------------------
  814|      0|                          "Flagfile cannot contain positional argument");
  815|       |
  816|      0|      positional_args.push_back(argv[curr_list.FrontIndex()]);
  817|      0|      continue;
  818|      0|    }
  819|       |
  820|       |    // Split the current argument on '=' to deduce the argument flag name and
  821|       |    // value. If flag name is empty it means we've got an "--" argument. Value
  822|       |    // can be empty either if there were no '=' in argument string at all or
  823|       |    // an argument looked like "--foo=". In a latter case is_empty_value is
  824|       |    // true.
  825|      6|    absl::string_view flag_name;
  826|      6|    absl::string_view value;
  827|      6|    bool is_empty_value = false;
  828|       |
  829|      6|    std::tie(flag_name, value, is_empty_value) =
  830|      6|        flags_internal::SplitNameAndValue(arg);
  831|       |
  832|       |    // Standalone "--" argument indicates that the rest of the arguments are
  833|       |    // positional. We do not support positional arguments in flagfiles.
  834|      6|    if (flag_name.empty()) {
  ------------------
  |  Branch (834:9): [True: 2, False: 4]
  ------------------
  835|      2|      ABSL_INTERNAL_CHECK(arg_from_argv,
  ------------------
  |  |   85|      2|  do {                                                             \
  |  |   86|      2|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  |  |  Branch (190: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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241: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]
  |  |  ------------------
  ------------------
  836|      2|                          "Flagfile cannot contain positional argument");
  837|       |
  838|      2|      curr_list.PopFront();
  839|      2|      break;
  840|      2|    }
  841|       |
  842|       |    // Locate the flag based on flag name. Handle both --foo and --nofoo.
  843|      4|    CommandLineFlag* flag = nullptr;
  844|      4|    bool is_negative = false;
  845|      4|    std::tie(flag, is_negative) = flags_internal::LocateFlag(flag_name);
  846|       |
  847|      4|    if (flag == nullptr) {
  ------------------
  |  Branch (847:9): [True: 0, False: 4]
  ------------------
  848|       |      // Usage flags are not modeled as Abseil flags. Locate them separately.
  849|      0|      if (flags_internal::DeduceUsageFlags(flag_name, value)) {
  ------------------
  |  Branch (849:11): [True: 0, False: 0]
  ------------------
  850|      0|        continue;
  851|      0|      }
  852|      0|      unrecognized_flags.emplace_back(arg_from_argv
  ------------------
  |  Branch (852:39): [True: 0, False: 0]
  ------------------
  853|      0|                                          ? UnrecognizedFlag::kFromArgv
  854|      0|                                          : UnrecognizedFlag::kFromFlagfile,
  855|      0|                                      flag_name);
  856|      0|      continue;
  857|      0|    }
  858|       |
  859|       |    // Deduce flag's value (from this or next argument).
  860|      4|    bool value_success = true;
  861|      4|    std::tie(value_success, value) = flags_internal::DeduceFlagValue(
  862|      4|        *flag, value, is_negative, is_empty_value, &curr_list);
  863|      4|    success &= value_success;
  864|       |
  865|       |    // Set the located flag to a new value, unless it is retired. Setting
  866|       |    // retired flag fails, but we ignoring it here while also reporting access
  867|       |    // to retired flag.
  868|      4|    std::string error;
  869|      4|    if (!flags_internal::PrivateHandleAccessor::ParseFrom(
  ------------------
  |  Branch (869:9): [True: 0, False: 4]
  ------------------
  870|      4|            *flag, value, flags_internal::SET_FLAGS_VALUE,
  871|      4|            flags_internal::kCommandLine, error)) {
  872|      0|      if (flag->IsRetired()) continue;
  ------------------
  |  Branch (872:11): [True: 0, False: 0]
  ------------------
  873|       |
  874|      0|      flags_internal::ReportUsageError(error, true);
  875|      0|      success = false;
  876|      4|    } else {
  877|      4|      specified_flags->push_back(flag);
  878|      4|    }
  879|      4|  }
  880|       |
  881|      2|  flags_internal::ResetGeneratorFlags(flagfile_value);
  882|       |
  883|       |  // All the remaining arguments are positional.
  884|      2|  if (!input_args.empty()) {
  ------------------
  |  Branch (884:7): [True: 2, False: 0]
  ------------------
  885|      2|    for (size_t arg_index = input_args.back().FrontIndex();
  886|     11|         arg_index < static_cast<size_t>(argc); ++arg_index) {
  ------------------
  |  Branch (886:10): [True: 9, False: 2]
  ------------------
  887|      9|      positional_args.push_back(argv[arg_index]);
  888|      9|    }
  889|      2|  }
  890|       |
  891|       |  // Trim and sort the vector.
  892|      2|  specified_flags->shrink_to_fit();
  893|      2|  std::sort(specified_flags->begin(), specified_flags->end(),
  894|      2|            flags_internal::SpecifiedFlagsCompare{});
  895|       |
  896|       |  // Filter out unrecognized flags, which are ok to ignore.
  897|      2|  std::vector<UnrecognizedFlag> filtered;
  898|      2|  filtered.reserve(unrecognized_flags.size());
  899|      2|  for (const auto& unrecognized : unrecognized_flags) {
  ------------------
  |  Branch (899:33): [True: 0, False: 2]
  ------------------
  900|      0|    if (flags_internal::CanIgnoreUndefinedFlag(unrecognized.flag_name))
  ------------------
  |  Branch (900:9): [True: 0, False: 0]
  ------------------
  901|      0|      continue;
  902|      0|    filtered.push_back(unrecognized);
  903|      0|  }
  904|       |
  905|      2|  std::swap(unrecognized_flags, filtered);
  906|       |
  907|      2|  if (!success) {
  ------------------
  |  Branch (907:7): [True: 0, False: 2]
  ------------------
  908|       |#if ABSL_FLAGS_STRIP_NAMES
  909|       |    flags_internal::ReportUsageError(
  910|       |        "NOTE: command line flags are disabled in this build", true);
  911|       |#else
  912|      0|    flags_internal::HandleUsageFlags(std::cerr, ProgramUsageMessage());
  913|      0|#endif
  914|      0|    return HelpMode::kFull;  // We just need to make sure the exit with
  915|       |                             // code 1.
  916|      0|  }
  917|       |
  918|      2|  return usage_flag_action == UsageFlagsAction::kHandleUsage
  ------------------
  |  Branch (918:10): [True: 2, False: 0]
  ------------------
  919|      2|             ? flags_internal::HandleUsageFlags(std::cout,
  920|      2|                                                ProgramUsageMessage())
  921|      2|             : HelpMode::kNone;
  922|      2|}
_ZN4absl12lts_2026052620ParseAbseilFlagsOnlyEiPPcRNSt3__16vectorIS1_NS3_9allocatorIS1_EEEERNS4_INS0_16UnrecognizedFlagENS5_IS9_EEEE:
  928|      2|                          std::vector<UnrecognizedFlag>& unrecognized_flags) {
  929|      2|  auto help_mode = flags_internal::ParseAbseilFlagsOnlyImpl(
  930|      2|      argc, argv, positional_args, unrecognized_flags,
  931|      2|      flags_internal::UsageFlagsAction::kHandleUsage);
  932|       |
  933|      2|  flags_internal::MaybeExit(help_mode);
  934|      2|}
parse.cc:_ZNK3$_0clEv:
  113|      2|    .OnUpdate([]() {
  114|      2|      if (absl::GetFlag(FLAGS_flagfile).empty()) return;
  ------------------
  |  Branch (114:11): [True: 2, False: 0]
  ------------------
  115|       |
  116|      0|      absl::MutexLock l(absl::flags_internal::ProcessingChecksMutex());
  117|       |
  118|       |      // Setting this flag twice before it is handled most likely an internal
  119|       |      // error and should be reviewed by developers.
  120|      0|      if (absl::flags_internal::flagfile_needs_processing) {
  ------------------
  |  Branch (120:11): [True: 0, False: 0]
  ------------------
  121|      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]
  |  |  ------------------
  ------------------
  122|      0|      }
  123|       |
  124|      0|      absl::flags_internal::flagfile_needs_processing = true;
  125|      0|    });
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_121ProcessingChecksMutexEv:
   67|      8|absl::Mutex& ProcessingChecksMutex() {
   68|      8|  static absl::NoDestructor<absl::Mutex> mutex;
   69|      8|  return *mutex;
   70|      8|}
parse.cc:_ZNK3$_1clEv:
  129|      2|    .OnUpdate([]() {
  130|      2|      if (absl::GetFlag(FLAGS_fromenv).empty()) return;
  ------------------
  |  Branch (130:11): [True: 2, False: 0]
  ------------------
  131|       |
  132|      0|      absl::MutexLock l(absl::flags_internal::ProcessingChecksMutex());
  133|       |
  134|       |      // Setting this flag twice before it is handled most likely an internal
  135|       |      // error and should be reviewed by developers.
  136|      0|      if (absl::flags_internal::fromenv_needs_processing) {
  ------------------
  |  Branch (136:11): [True: 0, False: 0]
  ------------------
  137|      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]
  |  |  ------------------
  ------------------
  138|      0|      }
  139|       |
  140|      0|      absl::flags_internal::fromenv_needs_processing = true;
  141|      0|    });
parse.cc:_ZNK3$_2clEv:
  145|      2|    .OnUpdate([]() {
  146|      2|      if (absl::GetFlag(FLAGS_tryfromenv).empty()) return;
  ------------------
  |  Branch (146:11): [True: 2, False: 0]
  ------------------
  147|       |
  148|      0|      absl::MutexLock l(absl::flags_internal::ProcessingChecksMutex());
  149|       |
  150|       |      // Setting this flag twice before it is handled most likely an internal
  151|       |      // error and should be reviewed by developers.
  152|      0|      if (absl::flags_internal::tryfromenv_needs_processing) {
  ------------------
  |  Branch (152:11): [True: 0, False: 0]
  ------------------
  153|      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]
  |  |  ------------------
  ------------------
  154|      0|                          "tryfromenv set twice before it is handled.");
  155|      0|      }
  156|       |
  157|      0|      absl::flags_internal::tryfromenv_needs_processing = true;
  158|      0|    });
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_119SpecifiedFlagsMutexEv:
   79|      2|absl::Mutex& SpecifiedFlagsMutex() {
   80|      2|  static absl::NoDestructor<absl::Mutex> mutex;
   81|      2|  return *mutex;
   82|      2|}
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_134CheckDefaultValuesParsingRoundtripEv:
  331|      2|void CheckDefaultValuesParsingRoundtrip() {
  332|       |#ifndef NDEBUG
  333|       |  flags_internal::ForEachFlag([&](CommandLineFlag& flag) {
  334|       |    if (flag.IsRetired()) return;
  335|       |
  336|       |#define ABSL_FLAGS_INTERNAL_IGNORE_TYPE(T, _) \
  337|       |  if (flag.IsOfType<T>()) return;
  338|       |
  339|       |    ABSL_FLAGS_INTERNAL_SUPPORTED_TYPES(ABSL_FLAGS_INTERNAL_IGNORE_TYPE)
  340|       |#undef ABSL_FLAGS_INTERNAL_IGNORE_TYPE
  341|       |
  342|       |    flags_internal::PrivateHandleAccessor::CheckDefaultValueParsingRoundtrip(
  343|       |        flag);
  344|       |  });
  345|       |#endif
  346|      2|}
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_18ArgsListC2EiPPc:
  176|      2|  ArgsList(int argc, char* argv[]) : args_(argv, argv + argc), next_arg_(0) {}
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_120HandleGeneratorFlagsERNSt3__16vectorINS2_8ArgsListENS3_9allocatorIS5_EEEERNS4_INS3_12basic_stringIcNS3_11char_traitsIcEENS6_IcEEEENS6_ISE_EEEE:
  424|      6|                          std::vector<std::string>& flagfile_value) {
  425|      6|  bool success = true;
  426|       |
  427|      6|  absl::MutexLock l(flags_internal::ProcessingChecksMutex());
  428|       |
  429|       |  // flagfile could have been set either on a command line or
  430|       |  // programmatically before invoking ParseCommandLine. Note that we do not
  431|       |  // actually process arguments specified in the flagfile, but instead
  432|       |  // create a secondary arguments list to be processed along with the rest
  433|       |  // of the command line arguments. Since we always the process most recently
  434|       |  // created list of arguments first, this will result in flagfile argument
  435|       |  // being processed before any other argument in the command line. If
  436|       |  // FLAGS_flagfile contains more than one file name we create multiple new
  437|       |  // levels of arguments in a reverse order of file names. Thus we always
  438|       |  // process arguments from first file before arguments containing in a
  439|       |  // second file, etc. If flagfile contains another
  440|       |  // --flagfile inside of it, it will produce new level of arguments and
  441|       |  // processed before the rest of the flagfile. We are also collecting all
  442|       |  // flagfiles set on original command line. Unlike the rest of the flags,
  443|       |  // this flag can be set multiple times and is expected to be handled
  444|       |  // multiple times. We are collecting them all into a single list and set
  445|       |  // the value of FLAGS_flagfile to that value at the end of the parsing.
  446|      6|  if (flags_internal::flagfile_needs_processing) {
  ------------------
  |  Branch (446:7): [True: 0, False: 6]
  ------------------
  447|      0|    auto flagfiles = absl::GetFlag(FLAGS_flagfile);
  448|       |
  449|      0|    if (input_args.size() == 1) {
  ------------------
  |  Branch (449:9): [True: 0, False: 0]
  ------------------
  450|      0|      flagfile_value.insert(flagfile_value.end(), flagfiles.begin(),
  451|      0|                            flagfiles.end());
  452|      0|    }
  453|       |
  454|      0|    success &= ReadFlagfiles(flagfiles, input_args);
  455|       |
  456|      0|    flags_internal::flagfile_needs_processing = false;
  457|      0|  }
  458|       |
  459|       |  // Similar to flagfile fromenv/tryfromemv can be set both
  460|       |  // programmatically and at runtime on a command line. Unlike flagfile these
  461|       |  // can't be recursive.
  462|      6|  if (flags_internal::fromenv_needs_processing) {
  ------------------
  |  Branch (462:7): [True: 0, False: 6]
  ------------------
  463|      0|    auto flags_list = absl::GetFlag(FLAGS_fromenv);
  464|       |
  465|      0|    success &= ReadFlagsFromEnv(flags_list, input_args, true);
  466|       |
  467|      0|    flags_internal::fromenv_needs_processing = false;
  468|      0|  }
  469|       |
  470|      6|  if (flags_internal::tryfromenv_needs_processing) {
  ------------------
  |  Branch (470:7): [True: 0, False: 6]
  ------------------
  471|      0|    auto flags_list = absl::GetFlag(FLAGS_tryfromenv);
  472|       |
  473|      0|    success &= ReadFlagsFromEnv(flags_list, input_args, false);
  474|       |
  475|      0|    flags_internal::tryfromenv_needs_processing = false;
  476|      0|  }
  477|       |
  478|      6|  return success;
  479|      6|}
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_18ArgsList8PopFrontEv:
  186|      8|  void PopFront() { next_arg_++; }
parse.cc:_ZNK4absl12lts_2026052614flags_internal12_GLOBAL__N_18ArgsList4SizeEv:
  183|      6|  size_t Size() const { return args_.size() - next_arg_; }
parse.cc:_ZNK4absl12lts_2026052614flags_internal12_GLOBAL__N_18ArgsList5FrontEv:
  185|      6|  absl::string_view Front() const { return args_[next_arg_]; }
parse.cc:_ZNK4absl12lts_2026052614flags_internal12_GLOBAL__N_18ArgsList10FrontIndexEv:
  184|      2|  size_t FrontIndex() const { return next_arg_; }
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_117SplitNameAndValueENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  287|      6|    absl::string_view arg) {
  288|       |  // Allow -foo and --foo
  289|      6|  absl::ConsumePrefix(&arg, "-");
  290|       |
  291|      6|  if (arg.empty()) {
  ------------------
  |  Branch (291:7): [True: 2, False: 4]
  ------------------
  292|      2|    return std::make_tuple("", "", false);
  293|      2|  }
  294|       |
  295|      4|  auto equal_sign_pos = arg.find('=');
  296|       |
  297|      4|  absl::string_view flag_name = arg.substr(0, equal_sign_pos);
  298|       |
  299|      4|  absl::string_view value;
  300|      4|  bool is_empty_value = false;
  301|       |
  302|      4|  if (equal_sign_pos != absl::string_view::npos) {
  ------------------
  |  Branch (302:7): [True: 4, False: 0]
  ------------------
  303|      4|    value = arg.substr(equal_sign_pos + 1);
  304|      4|    is_empty_value = value.empty();
  305|      4|  }
  306|       |
  307|      4|  return std::make_tuple(flag_name, value, is_empty_value);
  308|      6|}
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_110LocateFlagENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  315|      4|std::tuple<CommandLineFlag*, bool> LocateFlag(absl::string_view flag_name) {
  316|      4|  CommandLineFlag* flag = absl::FindCommandLineFlag(flag_name);
  317|      4|  bool is_negative = false;
  318|       |
  319|      4|  if (!flag && absl::ConsumePrefix(&flag_name, "no")) {
  ------------------
  |  Branch (319:7): [True: 0, False: 4]
  |  Branch (319:16): [True: 0, False: 0]
  ------------------
  320|      0|    flag = absl::FindCommandLineFlag(flag_name);
  321|      0|    is_negative = true;
  322|      0|  }
  323|       |
  324|      4|  return std::make_tuple(flag, is_negative);
  325|      4|}
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_115DeduceFlagValueERKNS0_15CommandLineFlagENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEbbPNS2_8ArgsListE:
  518|      4|                                                    ArgsList* curr_list) {
  519|       |  // Value is either an argument suffix after `=` in "--foo=<value>"
  520|       |  // or separate argument in case of "--foo" "<value>".
  521|       |
  522|       |  // boolean flags have these forms:
  523|       |  //   --foo
  524|       |  //   --nofoo
  525|       |  //   --foo=true
  526|       |  //   --foo=false
  527|       |  //   --nofoo=<value> is not supported
  528|       |  //   --foo <value> is not supported
  529|       |
  530|       |  // non boolean flags have these forms:
  531|       |  // --foo=<value>
  532|       |  // --foo <value>
  533|       |  // --nofoo is not supported
  534|       |
  535|      4|  if (flag.IsOfType<bool>()) {
  ------------------
  |  Branch (535:7): [True: 0, False: 4]
  ------------------
  536|      0|    if (value.empty()) {
  ------------------
  |  Branch (536:9): [True: 0, False: 0]
  ------------------
  537|      0|      if (is_empty_value) {
  ------------------
  |  Branch (537:11): [True: 0, False: 0]
  ------------------
  538|       |        // "--bool_flag=" case
  539|      0|        flags_internal::ReportUsageError(
  540|      0|            absl::StrCat(
  541|      0|                "Missing the value after assignment for the boolean flag '",
  542|      0|                flag.Name(), "'"),
  543|      0|            true);
  544|      0|        return std::make_tuple(false, "");
  545|      0|      }
  546|       |
  547|       |      // "--bool_flag" case
  548|      0|      value = is_negative ? "0" : "1";
  ------------------
  |  Branch (548:15): [True: 0, False: 0]
  ------------------
  549|      0|    } else if (is_negative) {
  ------------------
  |  Branch (549:16): [True: 0, False: 0]
  ------------------
  550|       |      // "--nobool_flag=Y" case
  551|      0|      flags_internal::ReportUsageError(
  552|      0|          absl::StrCat("Negative form with assignment is not valid for the "
  553|      0|                       "boolean flag '",
  554|      0|                       flag.Name(), "'"),
  555|      0|          true);
  556|      0|      return std::make_tuple(false, "");
  557|      0|    }
  558|      4|  } else if (is_negative) {
  ------------------
  |  Branch (558:14): [True: 0, False: 4]
  ------------------
  559|       |    // "--noint_flag=1" case
  560|      0|    flags_internal::ReportUsageError(
  561|      0|        absl::StrCat("Negative form is not valid for the flag '", flag.Name(),
  562|      0|                     "'"),
  563|      0|        true);
  564|      0|    return std::make_tuple(false, "");
  565|      4|  } else if (value.empty() && (!is_empty_value)) {
  ------------------
  |  Branch (565:14): [True: 0, False: 4]
  |  Branch (565:31): [True: 0, False: 0]
  ------------------
  566|      0|    if (curr_list->Size() == 1) {
  ------------------
  |  Branch (566:9): [True: 0, False: 0]
  ------------------
  567|       |      // "--int_flag" case
  568|      0|      flags_internal::ReportUsageError(
  569|      0|          absl::StrCat("Missing the value for the flag '", flag.Name(), "'"),
  570|      0|          true);
  571|      0|      return std::make_tuple(false, "");
  572|      0|    }
  573|       |
  574|       |    // "--int_flag" "10" case
  575|      0|    curr_list->PopFront();
  576|      0|    value = curr_list->Front();
  577|       |
  578|       |    // Heuristic to detect the case where someone treats a string arg
  579|       |    // like a bool or just forgets to pass a value:
  580|       |    // --my_string_var --foo=bar
  581|       |    // We look for a flag of string type, whose value begins with a
  582|       |    // dash and corresponds to known flag or standalone --.
  583|      0|    if (!value.empty() && value[0] == '-' && flag.IsOfType<std::string>()) {
  ------------------
  |  Branch (583:9): [True: 0, False: 0]
  |  Branch (583:27): [True: 0, False: 0]
  |  Branch (583:46): [True: 0, False: 0]
  ------------------
  584|      0|      auto maybe_flag_name = std::get<0>(SplitNameAndValue(value.substr(1)));
  585|       |
  586|      0|      if (maybe_flag_name.empty() ||
  ------------------
  |  Branch (586:11): [True: 0, False: 0]
  |  Branch (586:11): [True: 0, False: 0]
  ------------------
  587|      0|          std::get<0>(LocateFlag(maybe_flag_name)) != nullptr) {
  ------------------
  |  Branch (587:11): [True: 0, False: 0]
  ------------------
  588|       |        // "--string_flag" "--known_flag" case
  589|      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]
  |  |  ------------------
  ------------------
  590|      0|            WARNING,
  591|      0|            absl::StrCat("Did you really mean to set flag '", flag.Name(),
  592|      0|                         "' to the value '", value, "'?"));
  593|      0|      }
  594|      0|    }
  595|      0|  }
  596|       |
  597|      4|  return std::make_tuple(true, value);
  598|      4|}
parse.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_119ResetGeneratorFlagsERKNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEE:
  483|      2|void ResetGeneratorFlags(const std::vector<std::string>& flagfile_value) {
  484|       |  // Setting flagfile to the value which collates all the values set on a
  485|       |  // command line and programmatically. So if command line looked like
  486|       |  // --flagfile=f1 --flagfile=f2 the final value of the FLAGS_flagfile flag is
  487|       |  // going to be {"f1", "f2"}
  488|      2|  if (!flagfile_value.empty()) {
  ------------------
  |  Branch (488:7): [True: 0, False: 2]
  ------------------
  489|      0|    absl::SetFlag(&FLAGS_flagfile, flagfile_value);
  490|      0|    absl::MutexLock l(flags_internal::ProcessingChecksMutex());
  491|      0|    flags_internal::flagfile_needs_processing = false;
  492|      0|  }
  493|       |
  494|       |  // fromenv/tryfromenv are set to <undefined> value.
  495|      2|  if (!absl::GetFlag(FLAGS_fromenv).empty()) {
  ------------------
  |  Branch (495:7): [True: 0, False: 2]
  ------------------
  496|      0|    absl::SetFlag(&FLAGS_fromenv, {});
  497|      0|  }
  498|      2|  if (!absl::GetFlag(FLAGS_tryfromenv).empty()) {
  ------------------
  |  Branch (498:7): [True: 0, False: 2]
  ------------------
  499|      0|    absl::SetFlag(&FLAGS_tryfromenv, {});
  500|      0|  }
  501|       |
  502|      2|  absl::MutexLock l(flags_internal::ProcessingChecksMutex());
  503|      2|  flags_internal::fromenv_needs_processing = false;
  504|      2|  flags_internal::tryfromenv_needs_processing = false;
  505|      2|}
parse.cc:_ZNK4absl12lts_2026052614flags_internal12_GLOBAL__N_121SpecifiedFlagsCompareclEPKNS0_15CommandLineFlagES6_:
   93|      2|  bool operator()(const CommandLineFlag* a, const CommandLineFlag* b) const {
   94|      2|    return a->Name() < b->Name();
   95|      2|  }

_ZN4absl12lts_2026052614flags_internal12FlagRegistry8FindFlagENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
  103|      4|CommandLineFlag* FlagRegistry::FindFlag(absl::string_view name) {
  104|      4|  if (finalized_flags_.load(std::memory_order_acquire)) {
  ------------------
  |  Branch (104:7): [True: 4, False: 0]
  ------------------
  105|       |    // We could save some gcus here if we make `Name()` be non-virtual.
  106|       |    // We could move the `const char*` name to the base class.
  107|      4|    auto it = std::partition_point(
  108|      4|        flat_flags_.begin(), flat_flags_.end(),
  109|      4|        [=](CommandLineFlag* f) { return f->Name() < name; });
  110|      4|    if (it != flat_flags_.end() && (*it)->Name() == name) return *it;
  ------------------
  |  Branch (110:9): [True: 4, False: 0]
  |  Branch (110:9): [True: 4, False: 0]
  |  Branch (110:36): [True: 4, False: 0]
  ------------------
  111|      4|  }
  112|       |
  113|      0|  FlagRegistryLock frl(*this);
  114|      0|  auto it = flags_.find(name);
  115|      0|  return it != flags_.end() ? it->second : nullptr;
  ------------------
  |  Branch (115:10): [True: 0, False: 0]
  ------------------
  116|      4|}
_ZN4absl12lts_2026052614flags_internal12FlagRegistry12RegisterFlagERNS0_15CommandLineFlagEPKc:
  118|     50|void FlagRegistry::RegisterFlag(CommandLineFlag& flag, const char* filename) {
  119|     50|  if (filename != nullptr &&
  ------------------
  |  Branch (119:7): [True: 50, False: 0]
  |  Branch (119:7): [True: 0, False: 50]
  ------------------
  120|     50|      flag.Filename() != GetUsageConfig().normalize_filename(filename)) {
  ------------------
  |  Branch (120:7): [True: 0, False: 50]
  ------------------
  121|      0|    flags_internal::ReportUsageError(
  122|      0|        absl::StrCat(
  123|      0|            "Inconsistency between flag object and registration for flag '",
  124|      0|            flag.Name(),
  125|      0|            "', likely due to duplicate flags or an ODR violation. Relevant "
  126|      0|            "files: ",
  127|      0|            flag.Filename(), " and ", filename),
  128|      0|        true);
  129|      0|    std::exit(1);
  130|      0|  }
  131|       |
  132|     50|  FlagRegistryLock registry_lock(*this);
  133|       |
  134|     50|  std::pair<FlagIterator, bool> ins =
  135|     50|      flags_.insert(FlagMap::value_type(flag.Name(), &flag));
  136|     50|  if (ins.second == false) {  // means the name was already in the map
  ------------------
  |  Branch (136:7): [True: 0, False: 50]
  ------------------
  137|      0|    CommandLineFlag& old_flag = *ins.first->second;
  138|      0|    if (flag.IsRetired() != old_flag.IsRetired()) {
  ------------------
  |  Branch (138:9): [True: 0, False: 0]
  ------------------
  139|       |      // All registrations must agree on the 'retired' flag.
  140|      0|      flags_internal::ReportUsageError(
  141|      0|          absl::StrCat(
  142|      0|              "Retired flag '", flag.Name(), "' was defined normally in file '",
  143|      0|              (flag.IsRetired() ? old_flag.Filename() : flag.Filename()), "'."),
  ------------------
  |  Branch (143:16): [True: 0, False: 0]
  ------------------
  144|      0|          true);
  145|      0|    } else if (flags_internal::PrivateHandleAccessor::TypeId(flag) !=
  ------------------
  |  Branch (145:16): [True: 0, False: 0]
  ------------------
  146|      0|               flags_internal::PrivateHandleAccessor::TypeId(old_flag)) {
  147|      0|      flags_internal::ReportUsageError(
  148|      0|          absl::StrCat("Flag '", flag.Name(),
  149|      0|                       "' was defined more than once but with "
  150|      0|                       "differing types. Defined in files '",
  151|      0|                       old_flag.Filename(), "' and '", flag.Filename(), "'."),
  152|      0|          true);
  153|      0|    } else if (old_flag.IsRetired()) {
  ------------------
  |  Branch (153:16): [True: 0, False: 0]
  ------------------
  154|      0|      return;
  155|      0|    } else if (old_flag.Filename() != flag.Filename()) {
  ------------------
  |  Branch (155:16): [True: 0, False: 0]
  ------------------
  156|      0|      flags_internal::ReportUsageError(
  157|      0|          absl::StrCat("Flag '", flag.Name(),
  158|      0|                       "' was defined more than once (in files '",
  159|      0|                       old_flag.Filename(), "' and '", flag.Filename(), "')."),
  160|      0|          true);
  161|      0|    } else {
  162|      0|      flags_internal::ReportUsageError(
  163|      0|          absl::StrCat(
  164|      0|              "Something is wrong with flag '", flag.Name(), "' in file '",
  165|      0|              flag.Filename(), "'. One possibility: file '", flag.Filename(),
  166|      0|              "' is being linked both statically and dynamically into this "
  167|      0|              "executable. e.g. some files listed as srcs to a test and also "
  168|      0|              "listed as srcs of some shared lib deps of the same test."),
  169|      0|          true);
  170|      0|    }
  171|       |    // All cases above are fatal, except for the retired flags.
  172|      0|    std::exit(1);
  173|      0|  }
  174|     50|}
_ZN4absl12lts_2026052614flags_internal12FlagRegistry14GlobalRegistryEv:
  176|     56|FlagRegistry& FlagRegistry::GlobalRegistry() {
  177|     56|  static absl::NoDestructor<FlagRegistry> global_registry;
  178|     56|  return *global_registry;
  179|     56|}
_ZN4absl12lts_2026052614flags_internal23RegisterCommandLineFlagERNS0_15CommandLineFlagEPKc:
  196|     50|bool RegisterCommandLineFlag(CommandLineFlag& flag, const char* filename) {
  197|     50|  FlagRegistry::GlobalRegistry().RegisterFlag(flag, filename);
  198|     50|  return true;
  199|     50|}
_ZN4absl12lts_2026052614flags_internal16FinalizeRegistryEv:
  201|      2|void FinalizeRegistry() {
  202|      2|  auto& registry = FlagRegistry::GlobalRegistry();
  203|      2|  FlagRegistryLock frl(registry);
  204|      2|  if (registry.finalized_flags_.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (204:7): [True: 0, False: 2]
  ------------------
  205|       |    // Was already finalized. Ignore the second time.
  206|      0|    return;
  207|      0|  }
  208|      2|  registry.flat_flags_.reserve(registry.flags_.size());
  209|     50|  for (const auto& f : registry.flags_) {
  ------------------
  |  Branch (209:22): [True: 50, False: 2]
  ------------------
  210|     50|    registry.flat_flags_.push_back(f.second);
  211|     50|  }
  212|      2|  std::sort(std::begin(registry.flat_flags_), std::end(registry.flat_flags_),
  213|      2|            [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) {
  214|      2|              return lhs->Name() < rhs->Name();
  215|      2|            });
  216|      2|  registry.flags_.clear();
  217|      2|  registry.finalized_flags_.store(true, std::memory_order_release);
  218|      2|}
_ZN4absl12lts_2026052619FindCommandLineFlagENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  350|      4|CommandLineFlag* FindCommandLineFlag(absl::string_view name) {
  351|      4|  if (name.empty()) return nullptr;
  ------------------
  |  Branch (351:7): [True: 0, False: 4]
  ------------------
  352|      4|  flags_internal::FlagRegistry& registry =
  353|      4|      flags_internal::FlagRegistry::GlobalRegistry();
  354|      4|  return registry.FindFlag(name);
  355|      4|}
reflection.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_116FlagRegistryLockC2ERNS1_12FlagRegistryE:
   94|     52|  explicit FlagRegistryLock(FlagRegistry& fr) : fr_(fr) { fr_.lock(); }
_ZN4absl12lts_2026052614flags_internal12FlagRegistry4lockEv:
   57|     52|  void lock() ABSL_EXCLUSIVE_LOCK_FUNCTION(lock_) { lock_.lock(); }
reflection.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_116FlagRegistryLockD2Ev:
   95|     52|  ~FlagRegistryLock() { fr_.unlock(); }
_ZN4absl12lts_2026052614flags_internal12FlagRegistry6unlockEv:
   60|     52|  void unlock() ABSL_UNLOCK_FUNCTION(lock_) { lock_.unlock(); }
_ZN4absl12lts_2026052614flags_internal12FlagRegistryC2Ev:
   51|      2|  FlagRegistry() = default;
reflection.cc:_ZZN4absl12lts_2026052614flags_internal12FlagRegistry8FindFlagENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEENK3$_0clEPNS0_15CommandLineFlagE:
  109|     20|        [=](CommandLineFlag* f) { return f->Name() < name; });
reflection.cc:_ZZN4absl12lts_2026052614flags_internal16FinalizeRegistryEvENK3$_0clEPKNS0_15CommandLineFlagES5_:
  213|    260|            [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) {
  214|    260|              return lhs->Name() < rhs->Name();
  215|    260|            });

_ZN4absl12lts_2026052619ProgramUsageMessageEv:
   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_2026052614flags_internal14GetUsageConfigEv:
  118|    100|FlagsUsageConfig GetUsageConfig() {
  119|    100|  absl::MutexLock l(CustomUsageConfigMutex());
  120|       |
  121|    100|  if (custom_usage_config) return *custom_usage_config;
  ------------------
  |  Branch (121:7): [True: 0, False: 100]
  ------------------
  122|       |
  123|    100|  FlagsUsageConfig default_config;
  124|    100|  default_config.contains_helpshort_flags = &ContainsHelpshortFlags;
  125|    100|  default_config.contains_help_flags = &ContainsHelppackageFlags;
  126|    100|  default_config.contains_helppackage_flags = &ContainsHelppackageFlags;
  127|    100|  default_config.version_string = &VersionString;
  128|    100|  default_config.normalize_filename = &NormalizeFilename;
  129|       |
  130|    100|  return default_config;
  131|    100|}
usage_config.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_122CustomUsageConfigMutexEv:
  108|    100|absl::Mutex& CustomUsageConfigMutex() {
  109|    100|  static absl::NoDestructor<absl::Mutex> mutex;
  110|    100|  return *mutex;
  111|    100|}
usage_config.cc:_ZN4absl12lts_2026052614flags_internal12_GLOBAL__N_117NormalizeFilenameENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   97|    100|std::string NormalizeFilename(absl::string_view filename) {
   98|       |  // Skip any leading slashes
   99|    100|  auto pos = filename.find_first_not_of("\\/");
  100|    100|  if (pos == absl::string_view::npos) return "";
  ------------------
  |  Branch (100:7): [True: 0, False: 100]
  ------------------
  101|       |
  102|    100|  filename.remove_prefix(pos);
  103|    100|  return std::string(filename);
  104|    100|}

_ZN4absl12lts_2026052612AnyInvocableIKFNSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS2_14default_deleteIS6_EEEERKNS5_8FuzzTestEEEC2IZNS5_17RegistrationToken24GetFuzzTestFuzzerFactoryINS5_27RegistrationWithDomainsBaseIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEENS5_9NoFixtureEPFvRKSO_bbjbEPvEESE_ONS5_12RegistrationIT0_T1_T_T2_EEEUlSC_E_vEEOSZ_:
  197|      2|      : Impl(internal_any_invocable::ConversionConstruct(),
  198|      2|             std::forward<F>(f)) {}
_ZN4absl12lts_2026052612AnyInvocableIKFNSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS2_14default_deleteIS6_EEEERKNS5_8FuzzTestEEEC2EOSE_:
  187|      4|  AnyInvocable(AnyInvocable&& /*f*/) noexcept = default;
compatibility_mode.cc:_ZN4absl12lts_2026052612AnyInvocableIFvvOEEC2IZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS6_13ConfigurationEE3$_0vEEOT_:
  197|      2|      : Impl(internal_any_invocable::ConversionConstruct(),
  198|      2|             std::forward<F>(f)) {}
runtime.cc:_ZN4absl12lts_2026052612AnyInvocableIFvvOEEC2IZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS7_5InputEE3$_0vEEOT_:
  197|  13.3k|      : Impl(internal_any_invocable::ConversionConstruct(),
  198|  13.3k|             std::forward<F>(f)) {}

init_fuzztest.cc:_ZN4absl12lts_2026052611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEC2IZNS2_19ListRegisteredTestsEvE3$_0vEEOT_:
  112|      6|      : FunctionRef(std::in_place, std::forward<F>(f)) {}
init_fuzztest.cc:_ZN4absl12lts_2026052611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEC2IZNS2_19ListRegisteredTestsEvE3$_0EENSt3__110in_place_tEOT_:
  100|      6|      : invoker_(&absl::functional_internal::InvokeObject<F&, R, Args...>) {
  101|      6|    absl::functional_internal::AssertNonNull(f);
  102|      6|    ptr_.obj = &f;
  103|      6|  }
_ZN4absl12lts_2026052611FunctionRefIFmmEEC2INS0_18container_internal7HashKeyINS5_10StringHashENSt3__117basic_string_viewIcNS8_11char_traitsIcEEEELb1EEEvEEOT_:
  112|      4|      : FunctionRef(std::in_place, std::forward<F>(f)) {}
_ZN4absl12lts_2026052611FunctionRefIFmmEEC2INS0_18container_internal7HashKeyINS5_10StringHashENSt3__117basic_string_viewIcNS8_11char_traitsIcEEEELb1EEEEENS8_10in_place_tEOT_:
  100|      4|      : invoker_(&absl::functional_internal::InvokeObject<F&, R, Args...>) {
  101|      4|    absl::functional_internal::AssertNonNull(f);
  102|      4|    ptr_.obj = &f;
  103|      4|  }
googletest_adaptor.cc:_ZN4absl12lts_2026052611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEC2IZNS3_30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS3_13ConfigurationEE3$_0vEEOT_:
  112|      2|      : FunctionRef(std::in_place, std::forward<F>(f)) {}
googletest_adaptor.cc:_ZN4absl12lts_2026052611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEC2IZNS3_30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS3_13ConfigurationEE3$_0EENSt3__110in_place_tEOT_:
  100|      2|      : invoker_(&absl::functional_internal::InvokeObject<F&, R, Args...>) {
  101|      2|    absl::functional_internal::AssertNonNull(f);
  102|      2|    ptr_.obj = &f;
  103|      2|  }
_ZNK4absl12lts_2026052611FunctionRefIFvRN8fuzztest8internal8FuzzTestEEEclES5_:
  164|      8|  R operator()(Args... args) const {
  165|      8|    return invoker_(ptr_, std::forward<Args>(args)...);
  166|      8|  }
status.cc:_ZN4absl12lts_2026052611FunctionRefIFvNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS0_4CordEEEC2IZ10SetMessageRKNS0_6StatusES6_E3$_0vEEOT_:
  112|     42|      : FunctionRef(std::in_place, std::forward<F>(f)) {}
status.cc:_ZN4absl12lts_2026052611FunctionRefIFvNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEERKNS0_4CordEEEC2IZ10SetMessageRKNS0_6StatusES6_E3$_0EENS2_10in_place_tEOT_:
  100|     42|      : invoker_(&absl::functional_internal::InvokeObject<F&, R, Args...>) {
  101|     42|    absl::functional_internal::AssertNonNull(f);
  102|     42|    ptr_.obj = &f;
  103|     42|  }
_ZNK4absl12lts_2026052611FunctionRefIFmmEEclEm:
  164|      2|  R operator()(Args... args) const {
  165|      2|    return invoker_(ptr_, std::forward<Args>(args)...);
  166|      2|  }

_ZN4absl12lts_2026052622internal_any_invocable12EmptyManagerENS1_14FunctionToCallEPNS1_15TypeErasedStateES4_:
  213|      4|                         TypeErasedState* /*to*/) noexcept {}
_ZN4absl12lts_2026052622internal_any_invocable19LocalManagerTrivialENS1_14FunctionToCallEPNS1_15TypeErasedStateES4_:
  219|  13.3k|                                TypeErasedState* const to) noexcept {
  220|       |  // This single statement without branching handles both possible operations.
  221|       |  //
  222|       |  // For FunctionToCall::dispose, "from" and "to" point to the same state, and
  223|       |  // so this assignment logically would do nothing.
  224|       |  //
  225|       |  // Note: Correctness here relies on http://wg21.link/p0593, which has only
  226|       |  // become standard in C++20, though implementations do not break it in
  227|       |  // practice for earlier versions of C++.
  228|       |  //
  229|       |  // The correct way to do this without that paper is to first placement-new a
  230|       |  // default-constructed T in "to->storage" prior to the memmove, but doing so
  231|       |  // requires a different function to be created for each T that is stored
  232|       |  // locally, which can cause unnecessary bloat and be less cache friendly.
  233|  13.3k|  *to = *from;
  234|       |
  235|       |  // Note: Because the type is trivially copyable, the destructor does not need
  236|       |  // to be called ("trivially copyable" requires a trivial destructor).
  237|  13.3k|}
_ZNK4absl12lts_2026052622internal_any_invocable4ImplIKFNSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEERKNS6_8FuzzTestEEE14ExtractInvokerEv:
  736|      2|    InvokerType<noex, ReturnType, P...>* ExtractInvoker() cv {                 \
  737|      2|      using QualifiedTestType = int cv ref;                                    \
  738|      2|      auto* invoker = this->invoker_;                                          \
  739|      2|      if (!std::is_const<QualifiedTestType>::value &&                          \
  ------------------
  |  Branch (739:11): [Folded, False: 2]
  ------------------
  740|      2|          std::is_rvalue_reference<QualifiedTestType>::value) {                \
  ------------------
  |  Branch (740:11): [Folded, False: 0]
  ------------------
  741|      0|        ABSL_ASSERT([this]() {                                                 \
  ------------------
  |  |  127|      0|#define ABSL_ASSERT(expr) ABSL_INTERNAL_UNEVALUATED((expr) ? void() : void())
  |  |  ------------------
  |  |  |  |   87|      0|#define ABSL_INTERNAL_UNEVALUATED(expr) (false ? (void)(expr) : void())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (87:42): [Folded, False: 0]
  |  |  |  |  |  Branch (87:57): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  742|      0|          /* We checked that this isn't const above, so const_cast is safe */  \
  743|      0|          const_cast<Impl*>(this)->invoker_ = InvokedAfterMove;                \
  744|      0|          return this->HasValue();                                             \
  745|      0|        }());                                                                  \
  746|      0|      }                                                                        \
  747|      2|      return invoker;                                                          \
  748|      2|    }                                                                          \
_ZN4absl12lts_2026052622internal_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_:
  719|      2|        : Core(TypedConversionConstruct<                                       \
  720|      2|                   typename std::decay<F>::type inv_quals>(),                  \
  721|      2|               std::forward<F>(f)) {}                                          \
_ZN4absl12lts_2026052622internal_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_:
  417|      2|  explicit CoreImpl(TypedConversionConstruct<QualDecayedTRef>, F&& f) {
  418|      2|    using DecayedT = RemoveCVRef<QualDecayedTRef>;
  419|       |
  420|       |    if constexpr (std::is_pointer<DecayedT>::value ||
  421|       |                  std::is_member_pointer<DecayedT>::value) {
  422|       |      // This condition handles types that decay into pointers. This includes
  423|       |      // function references, which cannot be null. GCC warns against comparing
  424|       |      // their decayed form with nullptr (https://godbolt.org/z/9r9TMTcPK).
  425|       |      // We could work around this warning with constexpr programming, using
  426|       |      // std::is_function_v<std::remove_reference_t<F>>, but we choose to ignore
  427|       |      // it instead of writing more code.
  428|       |#if !defined(__clang__) && defined(__GNUC__)
  429|       |#pragma GCC diagnostic push
  430|       |#pragma GCC diagnostic ignored "-Wpragmas"
  431|       |#pragma GCC diagnostic ignored "-Waddress"
  432|       |#pragma GCC diagnostic ignored "-Wnonnull-compare"
  433|       |#endif
  434|       |      if (static_cast<DecayedT>(f) == nullptr) {
  435|       |#if !defined(__clang__) && defined(__GNUC__)
  436|       |#pragma GCC diagnostic pop
  437|       |#endif
  438|       |        manager_ = EmptyManager;
  439|       |        invoker_ = nullptr;
  440|       |      } else {
  441|       |        InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  442|       |      }
  443|       |    } else if constexpr (IsCompatibleAnyInvocable<DecayedT>::value) {
  444|       |      // In this case we can "steal the guts" of the other AnyInvocable.
  445|       |      f.manager_(FunctionToCall::relocate_from_to, &f.state_, &state_);
  446|       |      manager_ = f.manager_;
  447|       |      invoker_ = f.invoker_;
  448|       |
  449|       |      f.manager_ = EmptyManager;
  450|       |      f.invoker_ = nullptr;
  451|       |    } else if constexpr (IsAnyInvocable<DecayedT>::value) {
  452|       |      if (f.HasValue()) {
  453|       |        InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  454|       |      } else {
  455|       |        manager_ = EmptyManager;
  456|       |        invoker_ = nullptr;
  457|       |      }
  458|      2|    } else {
  459|      2|      InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  460|      2|    }
  461|      2|  }
_ZN4absl12lts_2026052622internal_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_EEEvDpOT0_:
  513|      2|  void InitializeStorage(Args&&... args) {
  514|      2|    using RawT = RemoveCVRef<QualTRef>;
  515|       |    if constexpr (IsStoredLocally<RawT>()) {
  516|       |      ::new (static_cast<void*>(&state_.storage))
  517|       |          RawT(std::forward<Args>(args)...);
  518|       |      invoker_ = LocalInvoker<SigIsNoexcept, ReturnType, QualTRef, P...>;
  519|       |      // We can simplify our manager if we know the type is trivially copyable.
  520|       |      if constexpr (std::is_trivially_copyable_v<RawT>) {
  521|       |        manager_ = LocalManagerTrivial;
  522|       |      } else {
  523|       |        manager_ = LocalManagerNontrivial<RawT>;
  524|       |      }
  525|      2|    } else {
  526|      2|      InitializeRemoteManager<RawT>(std::forward<Args>(args)...);
  527|       |      // This is set after everything else in case an exception is thrown in an
  528|       |      // earlier step of the initialization.
  529|      2|      invoker_ = RemoteInvoker<SigIsNoexcept, ReturnType, QualTRef, P...>;
  530|      2|    }
  531|      2|  }
_ZN4absl12lts_2026052622internal_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_EEEvDpOT0_:
  534|      2|  void InitializeRemoteManager(Args&&... args) {
  535|       |    if constexpr (std::is_trivially_destructible_v<T> &&
  536|       |                  alignof(T) <= ABSL_INTERNAL_DEFAULT_NEW_ALIGNMENT) {
  537|       |      // unique_ptr is used for exception-safety in case construction throws.
  538|       |      std::unique_ptr<void, TrivialDeleter> uninitialized_target(
  539|       |          ::operator new(sizeof(T)), TrivialDeleter(sizeof(T)));
  540|       |      ::new (uninitialized_target.get()) T(std::forward<Args>(args)...);
  541|       |      state_.remote.target = uninitialized_target.release();
  542|       |      state_.remote.size = sizeof(T);
  543|       |      manager_ = RemoteManagerTrivial;
  544|      2|    } else {
  545|      2|      state_.remote.target = ::new T(std::forward<Args>(args)...);
  546|      2|      manager_ = RemoteManagerNontrivial<T>;
  547|      2|    }
  548|      2|  }
_ZN4absl12lts_2026052622internal_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_:
  309|      4|                             TypeErasedState* const to) noexcept {
  310|      4|  static_assert(!IsStoredLocally<T>(),
  311|      4|                "Remote storage must only be used for types that do not "
  312|      4|                "qualify for local storage.");
  313|       |
  314|      4|  switch (operation) {
  ------------------
  |  Branch (314:11): [True: 4, False: 0]
  ------------------
  315|      4|    case FunctionToCall::relocate_from_to:
  ------------------
  |  Branch (315:5): [True: 4, False: 0]
  ------------------
  316|      4|    case FunctionToCall::relocate_from_to_and_query_rust:
  ------------------
  |  Branch (316:5): [True: 0, False: 4]
  ------------------
  317|       |      // NOTE: Requires that the left-hand operand is already empty.
  318|      4|      to->remote.target = from->remote.target;
  319|      4|      return;
  320|      0|    case FunctionToCall::dispose:
  ------------------
  |  Branch (320:5): [True: 0, False: 4]
  ------------------
  321|      0|      ::delete static_cast<T*>(from->remote.target);  // Must not throw.
  322|      0|      return;
  323|      4|  }
  324|      0|  ABSL_UNREACHABLE();
  ------------------
  |  |  237|      0|  do {                                           \
  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  ------------------
  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  ------------------
  |  |  241|      0|  } while (false)
  |  |  ------------------
  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  325|      0|}
_ZN4absl12lts_2026052622internal_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:
  331|      2|    ForwardedParameterType<P>... args) noexcept(SigIsNoexcept) {
  332|      2|  using RawT = RemoveCVRef<QualTRef>;
  333|      2|  static_assert(!IsStoredLocally<RawT>(),
  334|      2|                "Target object must be in remote storage in order to be "
  335|      2|                "invoked from it.");
  336|       |
  337|      2|  auto& f = *static_cast<RawT*>(state->remote.target);
  338|      2|  return (InvokeR<ReturnType>)(static_cast<QualTRef>(f),
  339|      2|                               static_cast<ForwardedParameterType<P>>(args)...);
  340|      2|}
_ZN4absl12lts_2026052622internal_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_EEES10_OSY_DpOT1_:
  119|      2|ReturnType InvokeR(F&& f, P&&... args) {
  120|       |  if constexpr (std::is_void_v<ReturnType>) {
  121|       |    std::invoke(std::forward<F>(f), std::forward<P>(args)...);
  122|      2|  } else {
  123|      2|    return std::invoke(std::forward<F>(f), std::forward<P>(args)...);
  124|      2|  }
  125|      2|}
_ZN4absl12lts_2026052622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEED2Ev:
  499|      4|  ~CoreImpl() { manager_(FunctionToCall::dispose, &state_, &state_); }
_ZN4absl12lts_2026052622internal_any_invocable8CoreImplILb0ENSt3__110unique_ptrIN8fuzztest8internal14FuzzTestFuzzerENS3_14default_deleteIS7_EEEEJRKNS6_8FuzzTestEEEC2EOSE_:
  471|      4|  CoreImpl(CoreImpl&& other) noexcept {
  472|      4|    other.manager_(FunctionToCall::relocate_from_to, &other.state_, &state_);
  473|      4|    manager_ = other.manager_;
  474|      4|    invoker_ = other.invoker_;
  475|      4|    other.manager_ = EmptyManager;
  476|      4|    other.invoker_ = nullptr;
  477|      4|  }
_ZN4absl12lts_2026052622internal_any_invocable8CoreImplILb0EvJEED2Ev:
  499|  13.3k|  ~CoreImpl() { manager_(FunctionToCall::dispose, &state_, &state_); }
compatibility_mode.cc:_ZN4absl12lts_2026052622internal_any_invocable4ImplIFvvOEEC2IZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS7_13ConfigurationEE3$_0EENS1_19ConversionConstructEOT_:
  719|      2|        : Core(TypedConversionConstruct<                                       \
  720|      2|                   typename std::decay<F>::type inv_quals>(),                  \
  721|      2|               std::forward<F>(f)) {}                                          \
compatibility_mode.cc:_ZN4absl12lts_2026052622internal_any_invocable8CoreImplILb0EvJEEC2IOZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS6_13ConfigurationEE3$_0SF_EENS1_24TypedConversionConstructIT_EEOT0_:
  417|      2|  explicit CoreImpl(TypedConversionConstruct<QualDecayedTRef>, F&& f) {
  418|      2|    using DecayedT = RemoveCVRef<QualDecayedTRef>;
  419|       |
  420|       |    if constexpr (std::is_pointer<DecayedT>::value ||
  421|       |                  std::is_member_pointer<DecayedT>::value) {
  422|       |      // This condition handles types that decay into pointers. This includes
  423|       |      // function references, which cannot be null. GCC warns against comparing
  424|       |      // their decayed form with nullptr (https://godbolt.org/z/9r9TMTcPK).
  425|       |      // We could work around this warning with constexpr programming, using
  426|       |      // std::is_function_v<std::remove_reference_t<F>>, but we choose to ignore
  427|       |      // it instead of writing more code.
  428|       |#if !defined(__clang__) && defined(__GNUC__)
  429|       |#pragma GCC diagnostic push
  430|       |#pragma GCC diagnostic ignored "-Wpragmas"
  431|       |#pragma GCC diagnostic ignored "-Waddress"
  432|       |#pragma GCC diagnostic ignored "-Wnonnull-compare"
  433|       |#endif
  434|       |      if (static_cast<DecayedT>(f) == nullptr) {
  435|       |#if !defined(__clang__) && defined(__GNUC__)
  436|       |#pragma GCC diagnostic pop
  437|       |#endif
  438|       |        manager_ = EmptyManager;
  439|       |        invoker_ = nullptr;
  440|       |      } else {
  441|       |        InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  442|       |      }
  443|       |    } else if constexpr (IsCompatibleAnyInvocable<DecayedT>::value) {
  444|       |      // In this case we can "steal the guts" of the other AnyInvocable.
  445|       |      f.manager_(FunctionToCall::relocate_from_to, &f.state_, &state_);
  446|       |      manager_ = f.manager_;
  447|       |      invoker_ = f.invoker_;
  448|       |
  449|       |      f.manager_ = EmptyManager;
  450|       |      f.invoker_ = nullptr;
  451|       |    } else if constexpr (IsAnyInvocable<DecayedT>::value) {
  452|       |      if (f.HasValue()) {
  453|       |        InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  454|       |      } else {
  455|       |        manager_ = EmptyManager;
  456|       |        invoker_ = nullptr;
  457|       |      }
  458|      2|    } else {
  459|      2|      InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  460|      2|    }
  461|      2|  }
compatibility_mode.cc:_ZN4absl12lts_2026052622internal_any_invocable8CoreImplILb0EvJEE17InitializeStorageIOZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS6_13ConfigurationEE3$_0JSF_EEEvDpOT0_:
  513|      2|  void InitializeStorage(Args&&... args) {
  514|      2|    using RawT = RemoveCVRef<QualTRef>;
  515|      2|    if constexpr (IsStoredLocally<RawT>()) {
  516|      2|      ::new (static_cast<void*>(&state_.storage))
  517|      2|          RawT(std::forward<Args>(args)...);
  518|      2|      invoker_ = LocalInvoker<SigIsNoexcept, ReturnType, QualTRef, P...>;
  519|       |      // We can simplify our manager if we know the type is trivially copyable.
  520|      2|      if constexpr (std::is_trivially_copyable_v<RawT>) {
  521|      2|        manager_ = LocalManagerTrivial;
  522|       |      } else {
  523|       |        manager_ = LocalManagerNontrivial<RawT>;
  524|       |      }
  525|       |    } else {
  526|       |      InitializeRemoteManager<RawT>(std::forward<Args>(args)...);
  527|       |      // This is set after everything else in case an exception is thrown in an
  528|       |      // earlier step of the initialization.
  529|       |      invoker_ = RemoteInvoker<SigIsNoexcept, ReturnType, QualTRef, P...>;
  530|       |    }
  531|      2|  }
compatibility_mode.cc:_ZN4absl12lts_2026052622internal_any_invocable12LocalInvokerILb0EvOZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS4_13ConfigurationEE3$_0JEEET0_PNS1_15TypeErasedStateEDpNS1_18ForwardedParameterIT2_E4typeE:
  271|      2|    ForwardedParameterType<P>... args) noexcept(SigIsNoexcept) {
  272|      2|  using RawT = RemoveCVRef<QualTRef>;
  273|      2|  static_assert(
  274|      2|      IsStoredLocally<RawT>(),
  275|      2|      "Target object must be in local storage in order to be invoked from it.");
  276|       |
  277|      2|  auto& f = (ObjectInLocalStorage<RawT>)(state);
  278|      2|  return (InvokeR<ReturnType>)(static_cast<QualTRef>(f),
  279|      2|                               static_cast<ForwardedParameterType<P>>(args)...);
  280|      2|}
compatibility_mode.cc:_ZN4absl12lts_2026052622internal_any_invocable20ObjectInLocalStorageIZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS4_13ConfigurationEE3$_0EERT_PNS1_15TypeErasedStateE:
  191|      2|T& ObjectInLocalStorage(TypeErasedState* const state) {
  192|       |  // We launder here because the storage may be reused with the same type.
  193|      2|  return *std::launder(reinterpret_cast<T*>(&state->storage));
  194|      2|}
compatibility_mode.cc:_ZN4absl12lts_2026052622internal_any_invocable7InvokeRIvZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS4_13ConfigurationEE3$_0JEEET_OT0_DpOT1_:
  119|      2|ReturnType InvokeR(F&& f, P&&... args) {
  120|      2|  if constexpr (std::is_void_v<ReturnType>) {
  121|      2|    std::invoke(std::forward<F>(f), std::forward<P>(args)...);
  122|       |  } else {
  123|       |    return std::invoke(std::forward<F>(f), std::forward<P>(args)...);
  124|       |  }
  125|      2|}
runtime.cc:_ZN4absl12lts_2026052622internal_any_invocable4ImplIFvvOEEC2IZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS8_5InputEE3$_0EENS1_19ConversionConstructEOT_:
  719|  13.3k|        : Core(TypedConversionConstruct<                                       \
  720|  13.3k|                   typename std::decay<F>::type inv_quals>(),                  \
  721|  13.3k|               std::forward<F>(f)) {}                                          \
runtime.cc:_ZN4absl12lts_2026052622internal_any_invocable8CoreImplILb0EvJEEC2IOZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS7_5InputEE3$_0SB_EENS1_24TypedConversionConstructIT_EEOT0_:
  417|  13.3k|  explicit CoreImpl(TypedConversionConstruct<QualDecayedTRef>, F&& f) {
  418|  13.3k|    using DecayedT = RemoveCVRef<QualDecayedTRef>;
  419|       |
  420|       |    if constexpr (std::is_pointer<DecayedT>::value ||
  421|       |                  std::is_member_pointer<DecayedT>::value) {
  422|       |      // This condition handles types that decay into pointers. This includes
  423|       |      // function references, which cannot be null. GCC warns against comparing
  424|       |      // their decayed form with nullptr (https://godbolt.org/z/9r9TMTcPK).
  425|       |      // We could work around this warning with constexpr programming, using
  426|       |      // std::is_function_v<std::remove_reference_t<F>>, but we choose to ignore
  427|       |      // it instead of writing more code.
  428|       |#if !defined(__clang__) && defined(__GNUC__)
  429|       |#pragma GCC diagnostic push
  430|       |#pragma GCC diagnostic ignored "-Wpragmas"
  431|       |#pragma GCC diagnostic ignored "-Waddress"
  432|       |#pragma GCC diagnostic ignored "-Wnonnull-compare"
  433|       |#endif
  434|       |      if (static_cast<DecayedT>(f) == nullptr) {
  435|       |#if !defined(__clang__) && defined(__GNUC__)
  436|       |#pragma GCC diagnostic pop
  437|       |#endif
  438|       |        manager_ = EmptyManager;
  439|       |        invoker_ = nullptr;
  440|       |      } else {
  441|       |        InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  442|       |      }
  443|       |    } else if constexpr (IsCompatibleAnyInvocable<DecayedT>::value) {
  444|       |      // In this case we can "steal the guts" of the other AnyInvocable.
  445|       |      f.manager_(FunctionToCall::relocate_from_to, &f.state_, &state_);
  446|       |      manager_ = f.manager_;
  447|       |      invoker_ = f.invoker_;
  448|       |
  449|       |      f.manager_ = EmptyManager;
  450|       |      f.invoker_ = nullptr;
  451|       |    } else if constexpr (IsAnyInvocable<DecayedT>::value) {
  452|       |      if (f.HasValue()) {
  453|       |        InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  454|       |      } else {
  455|       |        manager_ = EmptyManager;
  456|       |        invoker_ = nullptr;
  457|       |      }
  458|  13.3k|    } else {
  459|  13.3k|      InitializeStorage<QualDecayedTRef>(std::forward<F>(f));
  460|  13.3k|    }
  461|  13.3k|  }
runtime.cc:_ZN4absl12lts_2026052622internal_any_invocable8CoreImplILb0EvJEE17InitializeStorageIOZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS7_5InputEE3$_0JSB_EEEvDpOT0_:
  513|  13.3k|  void InitializeStorage(Args&&... args) {
  514|  13.3k|    using RawT = RemoveCVRef<QualTRef>;
  515|  13.3k|    if constexpr (IsStoredLocally<RawT>()) {
  516|  13.3k|      ::new (static_cast<void*>(&state_.storage))
  517|  13.3k|          RawT(std::forward<Args>(args)...);
  518|  13.3k|      invoker_ = LocalInvoker<SigIsNoexcept, ReturnType, QualTRef, P...>;
  519|       |      // We can simplify our manager if we know the type is trivially copyable.
  520|  13.3k|      if constexpr (std::is_trivially_copyable_v<RawT>) {
  521|  13.3k|        manager_ = LocalManagerTrivial;
  522|       |      } else {
  523|       |        manager_ = LocalManagerNontrivial<RawT>;
  524|       |      }
  525|       |    } else {
  526|       |      InitializeRemoteManager<RawT>(std::forward<Args>(args)...);
  527|       |      // This is set after everything else in case an exception is thrown in an
  528|       |      // earlier step of the initialization.
  529|       |      invoker_ = RemoteInvoker<SigIsNoexcept, ReturnType, QualTRef, P...>;
  530|       |    }
  531|  13.3k|  }
runtime.cc:_ZN4absl12lts_2026052622internal_any_invocable12LocalInvokerILb0EvOZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS5_5InputEE3$_0JEEET0_PNS1_15TypeErasedStateEDpNS1_18ForwardedParameterIT2_E4typeE:
  271|  13.3k|    ForwardedParameterType<P>... args) noexcept(SigIsNoexcept) {
  272|  13.3k|  using RawT = RemoveCVRef<QualTRef>;
  273|  13.3k|  static_assert(
  274|  13.3k|      IsStoredLocally<RawT>(),
  275|  13.3k|      "Target object must be in local storage in order to be invoked from it.");
  276|       |
  277|  13.3k|  auto& f = (ObjectInLocalStorage<RawT>)(state);
  278|  13.3k|  return (InvokeR<ReturnType>)(static_cast<QualTRef>(f),
  279|  13.3k|                               static_cast<ForwardedParameterType<P>>(args)...);
  280|  13.3k|}
runtime.cc:_ZN4absl12lts_2026052622internal_any_invocable20ObjectInLocalStorageIZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS5_5InputEE3$_0EERT_PNS1_15TypeErasedStateE:
  191|  13.3k|T& ObjectInLocalStorage(TypeErasedState* const state) {
  192|       |  // We launder here because the storage may be reused with the same type.
  193|  13.3k|  return *std::launder(reinterpret_cast<T*>(&state->storage));
  194|  13.3k|}
runtime.cc:_ZN4absl12lts_2026052622internal_any_invocable7InvokeRIvZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS5_5InputEE3$_0JEEET_OT0_DpOT1_:
  119|  13.3k|ReturnType InvokeR(F&& f, P&&... args) {
  120|  13.3k|  if constexpr (std::is_void_v<ReturnType>) {
  121|  13.3k|    std::invoke(std::forward<F>(f), std::forward<P>(args)...);
  122|       |  } else {
  123|       |    return std::invoke(std::forward<F>(f), std::forward<P>(args)...);
  124|       |  }
  125|  13.3k|}
_ZN4absl12lts_2026052622internal_any_invocable4ImplIFvvOEE14ExtractInvokerEv:
  736|  13.3k|    InvokerType<noex, ReturnType, P...>* ExtractInvoker() cv {                 \
  737|  13.3k|      using QualifiedTestType = int cv ref;                                    \
  738|  13.3k|      auto* invoker = this->invoker_;                                          \
  739|  13.3k|      if (!std::is_const<QualifiedTestType>::value &&                          \
  ------------------
  |  Branch (739:11): [True: 0, Folded]
  ------------------
  740|  13.3k|          std::is_rvalue_reference<QualifiedTestType>::value) {                \
  ------------------
  |  Branch (740:11): [True: 0, Folded]
  ------------------
  741|  13.3k|        ABSL_ASSERT([this]() {                                                 \
  ------------------
  |  |  127|  13.3k|#define ABSL_ASSERT(expr) ABSL_INTERNAL_UNEVALUATED((expr) ? void() : void())
  |  |  ------------------
  |  |  |  |   87|  13.3k|#define ABSL_INTERNAL_UNEVALUATED(expr) (false ? (void)(expr) : void())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (87:42): [Folded, False: 13.3k]
  |  |  |  |  |  Branch (87:57): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  742|  13.3k|          /* We checked that this isn't const above, so const_cast is safe */  \
  743|  13.3k|          const_cast<Impl*>(this)->invoker_ = InvokedAfterMove;                \
  744|  13.3k|          return this->HasValue();                                             \
  745|  13.3k|        }());                                                                  \
  746|  13.3k|      }                                                                        \
  747|  13.3k|      return invoker;                                                          \
  748|  13.3k|    }                                                                          \

init_fuzztest.cc:_ZN4absl12lts_2026052619functional_internal12InvokeObjectIRZN8fuzztest19ListRegisteredTestsEvE3$_0vJRNS3_8internal8FuzzTestEEEET0_NS1_7VoidPtrEDpNS1_8ForwardTIT1_E4typeE:
   74|      6|R InvokeObject(VoidPtr ptr, typename ForwardT<Args>::type... args) {
   75|      6|  using T = std::remove_reference_t<Obj>;
   76|      6|  return static_cast<R>(std::invoke(
   77|      6|      std::forward<Obj>(*const_cast<T*>(static_cast<const T*>(ptr.obj))),
   78|      6|      std::forward<typename ForwardT<Args>::type>(args)...));
   79|      6|}
init_fuzztest.cc:_ZN4absl12lts_2026052619functional_internal13AssertNonNullIZN8fuzztest19ListRegisteredTestsEvE3$_0EEvRKT_:
  136|      6|void AssertNonNull(const F&) {}
_ZN4absl12lts_2026052619functional_internal12InvokeObjectIRNS0_18container_internal7HashKeyINS3_10StringHashENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEELb1EEEmJmEEET0_NS1_7VoidPtrEDpNS1_8ForwardTIT1_E4typeE:
   74|      2|R InvokeObject(VoidPtr ptr, typename ForwardT<Args>::type... args) {
   75|      2|  using T = std::remove_reference_t<Obj>;
   76|      2|  return static_cast<R>(std::invoke(
   77|      2|      std::forward<Obj>(*const_cast<T*>(static_cast<const T*>(ptr.obj))),
   78|      2|      std::forward<typename ForwardT<Args>::type>(args)...));
   79|      2|}
_ZN4absl12lts_2026052619functional_internal13AssertNonNullINS0_18container_internal7HashKeyINS3_10StringHashENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEELb1EEEEEvRKT_:
  136|      4|void AssertNonNull(const F&) {}
googletest_adaptor.cc:_ZN4absl12lts_2026052619functional_internal12InvokeObjectIRZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS4_13ConfigurationEE3$_0vJRNS4_8FuzzTestEEEET0_NS1_7VoidPtrEDpNS1_8ForwardTIT1_E4typeE:
   74|      2|R InvokeObject(VoidPtr ptr, typename ForwardT<Args>::type... args) {
   75|      2|  using T = std::remove_reference_t<Obj>;
   76|      2|  return static_cast<R>(std::invoke(
   77|      2|      std::forward<Obj>(*const_cast<T*>(static_cast<const T*>(ptr.obj))),
   78|      2|      std::forward<typename ForwardT<Args>::type>(args)...));
   79|      2|}
googletest_adaptor.cc:_ZN4absl12lts_2026052619functional_internal13AssertNonNullIZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS4_13ConfigurationEE3$_0EEvRKT_:
  136|      2|void AssertNonNull(const F&) {}
status.cc:_ZN4absl12lts_2026052619functional_internal13AssertNonNullIZ10SetMessageRKNS0_6StatusENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEE3$_0EEvRKT_:
  136|     42|void AssertNonNull(const F&) {}

_ZN4absl12lts_2026052613hash_internal43CombineLargeContiguousImplOn64BitLengthGt32EmPKhm:
  417|      8|                                                     size_t len) {
  418|      8|  assert(len > 32);
  419|      8|  assert(sizeof(size_t) == 8);  // NOLINT(misc-static-assert)
  420|      8|  if (ABSL_PREDICT_TRUE(len <= PiecewiseChunkSize())) {
  ------------------
  |  |  191|      8|#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
  |  |  ------------------
  |  |  |  Branch (191:30): [True: 8, False: 0]
  |  |  |  Branch (191:48): [Folded, False: 8]
  |  |  |  Branch (191:57): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  421|      8|    return HashBlockOn64Bit(state, first, len);
  422|      8|  }
  423|      0|  return SplitAndCombineOn64Bit(state, first, len);
  424|      8|}
hash.cc:_ZN4absl12lts_2026052613hash_internal12_GLOBAL__N_116HashBlockOn64BitEmPKhm:
  376|      8|    uint64_t state, const unsigned char* data, size_t len) {
  377|      8|#ifdef ABSL_HAVE_INTRINSIC_INT128
  378|      8|  return LowLevelHashLenGt32(state, data, len);
  379|       |#else
  380|       |  return hash_internal::CityHash64WithSeed(reinterpret_cast<const char*>(data),
  381|       |                                           len, state);
  382|       |#endif
  383|      8|}
hash.cc:_ZN4absl12lts_2026052613hash_internal12_GLOBAL__N_119LowLevelHashLenGt32EmPKvm:
  341|      8|                                              size_t len) {
  342|      8|  assert(len > 32);
  343|      8|  if (ABSL_PREDICT_FALSE(len > 64)) {
  ------------------
  |  |  190|      8|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 8]
  |  |  |  Branch (190:49): [Folded, False: 8]
  |  |  |  Branch (190:58): [True: 0, False: 8]
  |  |  ------------------
  ------------------
  344|      0|    return LowLevelHashLenGt64(seed, data, len);
  345|      0|  }
  346|      8|  return LowLevelHash33To64(seed, static_cast<const uint8_t*>(data), len);
  347|      8|}
hash.cc:_ZN4absl12lts_2026052613hash_internal12_GLOBAL__N_110Mix32BytesEPKhm:
  271|     16|uint64_t Mix32Bytes(const uint8_t* ptr, uint64_t current_state) {
  272|     16|  uint64_t a = absl::base_internal::UnalignedLoad64(ptr);
  273|     16|  uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
  274|     16|  uint64_t c = absl::base_internal::UnalignedLoad64(ptr + 16);
  275|     16|  uint64_t d = absl::base_internal::UnalignedLoad64(ptr + 24);
  276|       |
  277|     16|  uint64_t cs0 = Mix(a ^ kStaticRandomData[1], b ^ current_state);
  278|     16|  uint64_t cs1 = Mix(c ^ kStaticRandomData[2], d ^ current_state);
  279|     16|  return cs0 ^ cs1;
  280|     16|}
hash.cc:_ZN4absl12lts_2026052613hash_internal12_GLOBAL__N_118LowLevelHash33To64EmPKhm:
  282|      8|uint64_t LowLevelHash33To64(uint64_t seed, const uint8_t* ptr, size_t len) {
  283|      8|  assert(len > 32);
  284|       |  assert(len <= 64);
  285|      8|  uint64_t current_state = seed ^ kStaticRandomData[0] ^ len;
  286|      8|  const uint8_t* last_32_ptr = ptr + len - 32;
  287|      8|  return Mix32Bytes(last_32_ptr, Mix32Bytes(ptr, current_state));
  288|      8|}

_ZN4absl12lts_2026052613hash_internal15MixingHashState18combine_contiguousES2_PKhm:
 1399|     78|                                            size_t size) {
 1400|     78|    return MixingHashState(
 1401|     78|        CombineContiguousImpl(hash_state.state_, first, size,
 1402|     78|                              std::integral_constant<int, sizeof(size_t)>{}));
 1403|     78|  }
_ZN4absl12lts_2026052613hash_internal15MixingHashStateC2Em:
 1450|    156|  explicit MixingHashState(uint64_t state) : state_(state) {}
_ZN4absl12lts_2026052613hash_internal18PiecewiseChunkSizeEv:
  157|      8|constexpr size_t PiecewiseChunkSize() { return 1024; }
_ZN4absl12lts_2026052613hash_internal19PrecombineLengthMixEmm:
 1005|     70|inline uint64_t PrecombineLengthMix(uint64_t state, size_t len) {
 1006|     70|  ABSL_ASSUME(len + sizeof(uint64_t) <= sizeof(kStaticRandomData));
  ------------------
  |  |  271|     70|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1007|     70|  uint64_t data = absl::base_internal::UnalignedLoad64(
 1008|     70|      reinterpret_cast<const unsigned char*>(&kStaticRandomData[0]) + len);
 1009|     70|  return state ^ data;
 1010|     70|}
_ZN4absl12lts_2026052613hash_internal3MixEmm:
 1012|    122|ABSL_ATTRIBUTE_ALWAYS_INLINE inline uint64_t Mix(uint64_t lhs, uint64_t rhs) {
 1013|       |  // Though the 128-bit product needs multiple instructions on non-x86-64
 1014|       |  // platforms, it is still a good balance between speed and hash quality.
 1015|    122|  absl::uint128 m = lhs;
 1016|    122|  m *= rhs;
 1017|    122|  return Uint128High64(m) ^ Uint128Low64(m);
 1018|    122|}
_ZN4absl12lts_2026052613hash_internal5Read8EPKh:
 1028|    140|inline uint64_t Read8(const unsigned char* p) {
 1029|    140|  return absl::base_internal::UnalignedLoad64(p);
 1030|    140|}
_ZN4absl12lts_2026052613hash_internal9Read9To16EPKhm:
 1039|     30|                                               size_t len) {
 1040|     30|  return {Read8(p), Read8(p + len - 8)};
 1041|     30|}
_ZN4absl12lts_2026052613hash_internal8Read4To8EPKhm:
 1045|     20|inline uint64_t Read4To8(const unsigned char* p, size_t len) {
 1046|       |  // If `len < 8`, we duplicate bytes. We always put low memory at the end.
 1047|       |  // E.g., on little endian platforms:
 1048|       |  // `ABCD` will be read as `ABCDABCD`.
 1049|       |  // `ABCDE` will be read as `BCDEABCD`.
 1050|       |  // `ABCDEF` will be read as `CDEFABCD`.
 1051|       |  // `ABCDEFG` will be read as `DEFGABCD`.
 1052|       |  // `ABCDEFGH` will be read as `EFGHABCD`.
 1053|       |  // We also do not care about endianness. On big-endian platforms, bytes will
 1054|       |  // be permuted differently. We always shift low memory by 32, because that
 1055|       |  // can be pipelined earlier. Reading high memory requires computing
 1056|       |  // `p + len - 4`.
 1057|     20|  uint64_t most_significant =
 1058|     20|      static_cast<uint64_t>(absl::base_internal::UnalignedLoad32(p)) << 32;
 1059|     20|  uint64_t least_significant =
 1060|     20|      absl::base_internal::UnalignedLoad32(p + len - 4);
 1061|     20|  return most_significant | least_significant;
 1062|     20|}
_ZN4absl12lts_2026052613hash_internal14CombineRawImplEmm:
 1120|     20|                                                            uint64_t value) {
 1121|     20|  return Mix(state ^ value, kMul);
 1122|     20|}
_ZN4absl12lts_2026052613hash_internal26CombineSmallContiguousImplEmPKhm:
 1136|     20|    uint64_t state, const unsigned char* first, size_t len) {
 1137|     20|  ABSL_ASSUME(len <= 8);
  ------------------
  |  |  271|     20|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1138|     20|  uint64_t v;
 1139|     20|  if (len >= 4) {
  ------------------
  |  Branch (1139:7): [True: 20, False: 0]
  ------------------
 1140|     20|    v = Read4To8(first, len);
 1141|     20|  } else if (len > 0) {
  ------------------
  |  Branch (1141:14): [True: 0, False: 0]
  ------------------
 1142|      0|    v = Read1To3(first, len);
 1143|      0|  } else {
 1144|       |    // Empty string must modify the state.
 1145|      0|    v = 0x57;
 1146|      0|  }
 1147|     20|  return CombineRawImpl(state, v);
 1148|     20|}
_ZN4absl12lts_2026052613hash_internal26CombineContiguousImpl9to16EmPKhm:
 1151|     30|    uint64_t state, const unsigned char* first, size_t len) {
 1152|     30|  ABSL_ASSUME(len >= 9);
  ------------------
  |  |  271|     30|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1153|     30|  ABSL_ASSUME(len <= 16);
  ------------------
  |  |  271|     30|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1154|       |  // Note: any time one half of the mix function becomes zero it will fail to
 1155|       |  // incorporate any bits from the other half. However, there is exactly 1 in
 1156|       |  // 2^64 values for each side that achieve this, and only when the size is
 1157|       |  // exactly 16 -- for smaller sizes there is an overlapping byte that makes
 1158|       |  // this impossible unless the seed is *also* incredibly unlucky.
 1159|     30|  auto p = Read9To16(first, len);
 1160|     30|  return Mix(state ^ p.first, kMul ^ p.second);
 1161|     30|}
_ZN4absl12lts_2026052613hash_internal27CombineContiguousImpl17to32EmPKhm:
 1164|     20|    uint64_t state, const unsigned char* first, size_t len) {
 1165|     20|  ABSL_ASSUME(len >= 17);
  ------------------
  |  |  271|     20|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1166|     20|  ABSL_ASSUME(len <= 32);
  ------------------
  |  |  271|     20|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1167|       |  // Do two mixes of overlapping 16-byte ranges in parallel to minimize
 1168|       |  // latency.
 1169|     20|  const uint64_t m0 =
 1170|     20|      Mix(Read8(first) ^ kStaticRandomData[1], Read8(first + 8) ^ state);
 1171|       |
 1172|     20|  const unsigned char* tail_16b_ptr = first + (len - 16);
 1173|     20|  const uint64_t m1 = Mix(Read8(tail_16b_ptr) ^ kStaticRandomData[3],
 1174|     20|                          Read8(tail_16b_ptr + 8) ^ state);
 1175|     20|  return m0 ^ m1;
 1176|     20|}
_ZN4absl12lts_2026052613hash_internal21CombineContiguousImplEmPKhmNSt3__117integral_constantIiLi8EEE:
 1260|     78|    std::integral_constant<int, 8> /* sizeof_size_t */) {
 1261|       |  // For large values we use LowLevelHash or CityHash depending on the platform,
 1262|       |  // for small ones we use custom low latency hash.
 1263|     78|  if (len <= 8) {
  ------------------
  |  Branch (1263:7): [True: 20, False: 58]
  ------------------
 1264|     20|    return CombineSmallContiguousImpl(PrecombineLengthMix(state, len), first,
 1265|     20|                                      len);
 1266|     20|  }
 1267|     58|  if (len <= 16) {
  ------------------
  |  Branch (1267:7): [True: 30, False: 28]
  ------------------
 1268|     30|    return CombineContiguousImpl9to16(PrecombineLengthMix(state, len), first,
 1269|     30|                                      len);
 1270|     30|  }
 1271|     28|  if (len <= 32) {
  ------------------
  |  Branch (1271:7): [True: 20, False: 8]
  ------------------
 1272|     20|    return CombineContiguousImpl17to32(PrecombineLengthMix(state, len), first,
 1273|     20|                                       len);
 1274|     20|  }
 1275|       |  // We must not mix length into the state here because calling
 1276|       |  // CombineContiguousImpl twice with PiecewiseChunkSize() must be equivalent
 1277|       |  // to calling CombineLargeContiguousImpl once with 2 * PiecewiseChunkSize().
 1278|      8|  return CombineLargeContiguousImplOn64BitLengthGt32(state, first, len);
 1279|     28|}
_ZN4absl12lts_2026052613hash_internal13AbslHashValueINS1_15MixingHashStateEEET_S4_NSt3__117basic_string_viewIcNS5_11char_traitsIcEEEE:
  661|     78|H AbslHashValue(H hash_state, absl::string_view str) {
  662|     78|  return H::combine_contiguous(std::move(hash_state), str.data(), str.size());
  663|     78|}
_ZN4absl12lts_2026052613hash_internal13HashStateBaseINS1_15MixingHashStateEE18combine_contiguousIcEES3_S3_PKT_m:
 1556|     78|H HashStateBase<H>::combine_contiguous(H state, const T* data, size_t size) {
 1557|     78|  return hash_internal::hash_range_or_bytes(std::move(state), data, size);
 1558|     78|}
_ZN4absl12lts_2026052613hash_internal19hash_range_or_bytesINS1_15MixingHashStateEcEENSt3__19enable_ifIXsr23is_uniquely_representedIT0_EE5valueET_E4typeES7_PKS6_m:
  978|     78|hash_range_or_bytes(H hash_state, const T* data, size_t size) {
  979|     78|  const auto* bytes = reinterpret_cast<const unsigned char*>(data);
  980|     78|  return H::combine_contiguous(std::move(hash_state), bytes, sizeof(T) * size);
  981|     78|}
_ZN4absl12lts_2026052613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineES3_:
  299|     78|  static H combine(H state) { return state; }
_ZN4absl12lts_2026052613hash_internal15MixingHashState14hash_with_seedINSt3__117basic_string_viewIcNS4_11char_traitsIcEEEETnNS4_9enable_ifIXntsr16IntegralFastPathIT_EE5valueEiE4typeELi0EEEmRKSA_m:
 1423|     78|  static size_t hash_with_seed(const T& value, size_t seed) {
 1424|     78|    return static_cast<size_t>(combine(MixingHashState{seed}, value).state_);
 1425|     78|  }
_ZN4absl12lts_2026052613hash_internal13HashStateBaseINS1_15MixingHashStateEE7combineINSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEJEEES3_S3_RKT_DpRKT0_:
 1548|     78|H HashStateBase<H>::combine(H state, const T& value, const Ts&... values) {
 1549|     78|  return H::combine(hash_internal::HashSelect::template Apply<T>::Invoke(
 1550|     78|                        std::move(state), value),
 1551|     78|                    values...);
 1552|     78|}
_ZN4absl12lts_2026052613hash_internal10HashSelect14HashValueProbe6InvokeINS1_15MixingHashStateENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEEENS6_9enable_ifIXsr3std7is_sameIT_DTcl13AbslHashValueclsr3stdE4movefp_Efp0_EEEE5valueESC_E4typeESC_RKT0_:
 1326|     78|        H> {
 1327|     78|      return AbslHashValue(std::move(state), value);
 1328|     78|    }
_ZNK4absl12lts_2026052613hash_internal12HashWithSeed4hashINS1_4HashINSt3__117basic_string_viewIcNS5_11char_traitsIcEEEEEES9_EEmRKT_RKT0_m:
  412|     78|  size_t hash(const Hasher& hasher, const T& value, size_t seed) const {
  413|       |    // NOLINTNEXTLINE(clang-diagnostic-sign-conversion)
  414|     78|    return hasher.hash_with_seed(value, seed);
  415|     78|  }
_ZNK4absl12lts_2026052613hash_internal8HashImplINSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEE14hash_with_seedERKS7_m:
 1537|     78|  size_t hash_with_seed(const T& value, size_t seed) const {
 1538|     78|    return MixingHashState::hash_with_seed(value, seed);
 1539|     78|  }
_ZNK4absl12lts_2026052613hash_internal12HashWithSeed4hashINS0_18container_internal10StringHashENSt3__117basic_string_viewIcNS6_11char_traitsIcEEEEEEmRKT_RKT0_m:
  412|     78|  size_t hash(const Hasher& hasher, const T& value, size_t seed) const {
  413|       |    // NOLINTNEXTLINE(clang-diagnostic-sign-conversion)
  414|     78|    return hasher.hash_with_seed(value, seed);
  415|     78|  }

_ZN4absl12lts_2026052611countl_zeroImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  108|  24.7k|    countl_zero(T x) noexcept {
  109|  24.7k|  return numeric_internal::CountLeadingZeroes(x);
  110|  24.7k|}
_ZN4absl12lts_202605269bit_widthImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  165|  4.95k|    bit_width(T x) noexcept {
  166|  4.95k|  return std::numeric_limits<T>::digits - countl_zero(x);
  167|  4.95k|}
_ZN4absl12lts_2026052611countr_zeroIjEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  123|     72|    countr_zero(T x) noexcept {
  124|     72|  return numeric_internal::CountTrailingZeroes(x);
  125|     72|}
_ZN4absl12lts_2026052611countr_zeroImEENSt3__19enable_ifIXsr3std11is_unsignedIT_EE5valueEiE4typeES4_:
  123|     12|    countr_zero(T x) noexcept {
  124|     12|  return numeric_internal::CountTrailingZeroes(x);
  125|     12|}

_ZN4absl12lts_202605267uint128rSEi:
  631|  26.8k|inline uint128& uint128::operator>>=(int amount) {
  632|  26.8k|  *this = *this >> amount;
  633|  26.8k|  return *this;
  634|  26.8k|}
_ZN4absl12lts_202605267uint128pLES1_:
  636|  2.47k|inline uint128& uint128::operator+=(uint128 other) {
  637|  2.47k|  *this = *this + other;
  638|  2.47k|  return *this;
  639|  2.47k|}
_ZN4absl12lts_202605267uint128mLES1_:
  646|  13.1k|inline uint128& uint128::operator*=(uint128 other) {
  647|  13.1k|  *this = *this * other;
  648|  13.1k|  return *this;
  649|  13.1k|}
_ZN4absl12lts_2026052612Uint128Low64ENS0_7uint128E:
  661|  12.7k|constexpr uint64_t Uint128Low64(uint128 v) { return v.lo_; }
_ZN4absl12lts_2026052613Uint128High64ENS0_7uint128E:
  663|  52.9k|constexpr uint64_t Uint128High64(uint128 v) { return v.hi_; }
_ZNK4absl12lts_202605267uint128cvmEv:
  777|  16.6k|constexpr uint128::operator unsigned long() const {  // NOLINT(runtime/int)
  778|  16.6k|  return static_cast<unsigned long>(lo_);            // NOLINT(runtime/int)
  779|  16.6k|}
_ZNK4absl12lts_202605267uint128cvoEv:
  794|   271k|constexpr uint128::operator unsigned __int128() const {
  795|   271k|  return (static_cast<unsigned __int128>(hi_) << 64) + lo_;
  796|   271k|}
_ZN4absl12lts_20260526eqENS0_7uint128ES1_:
  820|  24.0k|constexpr bool operator==(uint128 lhs, uint128 rhs) {
  821|  24.0k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  822|  24.0k|  return static_cast<unsigned __int128>(lhs) ==
  823|  24.0k|         static_cast<unsigned __int128>(rhs);
  824|       |#else
  825|       |  return (Uint128Low64(lhs) == Uint128Low64(rhs) &&
  826|       |          Uint128High64(lhs) == Uint128High64(rhs));
  827|       |#endif
  828|  24.0k|}
_ZN4absl12lts_20260526ltENS0_7uint128ES1_:
  832|  14.5k|constexpr bool operator<(uint128 lhs, uint128 rhs) {
  833|  14.5k|#ifdef ABSL_HAVE_INTRINSIC_INT128
  834|  14.5k|  return static_cast<unsigned __int128>(lhs) <
  835|  14.5k|         static_cast<unsigned __int128>(rhs);
  836|       |#else
  837|       |  return (Uint128High64(lhs) == Uint128High64(rhs))
  838|       |             ? (Uint128Low64(lhs) < Uint128Low64(rhs))
  839|       |             : (Uint128High64(lhs) < Uint128High64(rhs));
  840|       |#endif
  841|  14.5k|}
_ZN4absl12lts_20260526gtENS0_7uint128ES1_:
  843|  14.5k|constexpr bool operator>(uint128 lhs, uint128 rhs) { return rhs < lhs; }
_ZN4absl12lts_20260526anENS0_7uint128ES1_:
  923|  16.1k|constexpr inline uint128 operator&(uint128 lhs, uint128 rhs) {
  924|  16.1k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  925|  16.1k|  return static_cast<unsigned __int128>(lhs) &
  926|  16.1k|         static_cast<unsigned __int128>(rhs);
  927|       |#else
  928|       |  return MakeUint128(Uint128High64(lhs) & Uint128High64(rhs),
  929|       |                     Uint128Low64(lhs) & Uint128Low64(rhs));
  930|       |#endif
  931|  16.1k|}
_ZN4absl12lts_20260526eoENS0_7uint128ES1_:
  933|      4|constexpr inline uint128 operator^(uint128 lhs, uint128 rhs) {
  934|      4|#if defined(ABSL_HAVE_INTRINSIC_INT128)
  935|      4|  return static_cast<unsigned __int128>(lhs) ^
  936|      4|         static_cast<unsigned __int128>(rhs);
  937|       |#else
  938|       |  return MakeUint128(Uint128High64(lhs) ^ Uint128High64(rhs),
  939|       |                     Uint128Low64(lhs) ^ Uint128Low64(rhs));
  940|       |#endif
  941|      4|}
_ZN4absl12lts_202605267uint128eOES1_:
  953|      4|inline uint128& uint128::operator^=(uint128 other) {
  954|      4|  *this = *this ^ other;
  955|      4|  return *this;
  956|      4|}
_ZN4absl12lts_20260526lsENS0_7uint128Ei:
  960|  31.2k|constexpr uint128 operator<<(uint128 lhs, int amount) {
  961|  31.2k|#ifdef ABSL_HAVE_INTRINSIC_INT128
  962|  31.2k|  return static_cast<unsigned __int128>(lhs) << amount;
  963|       |#else
  964|       |  // uint64_t shifts of >= 64 are undefined, so we will need some
  965|       |  // special-casing.
  966|       |  return amount >= 64  ? MakeUint128(Uint128Low64(lhs) << (amount - 64), 0)
  967|       |         : amount == 0 ? lhs
  968|       |                       : MakeUint128((Uint128High64(lhs) << amount) |
  969|       |                                         (Uint128Low64(lhs) >> (64 - amount)),
  970|       |                                     Uint128Low64(lhs) << amount);
  971|       |#endif
  972|  31.2k|}
_ZN4absl12lts_20260526rsENS0_7uint128Ei:
  974|  26.8k|constexpr uint128 operator>>(uint128 lhs, int amount) {
  975|  26.8k|#ifdef ABSL_HAVE_INTRINSIC_INT128
  976|  26.8k|  return static_cast<unsigned __int128>(lhs) >> amount;
  977|       |#else
  978|       |  // uint64_t shifts of >= 64 are undefined, so we will need some
  979|       |  // special-casing.
  980|       |  return amount >= 64  ? MakeUint128(0, Uint128High64(lhs) >> (amount - 64))
  981|       |         : amount == 0 ? lhs
  982|       |                       : MakeUint128(Uint128High64(lhs) >> amount,
  983|       |                                     (Uint128Low64(lhs) >> amount) |
  984|       |                                         (Uint128High64(lhs) << (64 - amount)));
  985|       |#endif
  986|  26.8k|}
_ZN4absl12lts_20260526plENS0_7uint128ES1_:
  999|  4.74k|constexpr uint128 operator+(uint128 lhs, uint128 rhs) {
 1000|  4.74k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
 1001|  4.74k|  return static_cast<unsigned __int128>(lhs) +
 1002|  4.74k|         static_cast<unsigned __int128>(rhs);
 1003|       |#else
 1004|       |  return int128_internal::AddResult(
 1005|       |      MakeUint128(Uint128High64(lhs) + Uint128High64(rhs),
 1006|       |                  Uint128Low64(lhs) + Uint128Low64(rhs)),
 1007|       |      lhs);
 1008|       |#endif
 1009|  4.74k|}
_ZN4absl12lts_20260526miENS0_7uint128ES1_:
 1022|  24.6k|constexpr uint128 operator-(uint128 lhs, uint128 rhs) {
 1023|  24.6k|#if defined(ABSL_HAVE_INTRINSIC_INT128)
 1024|  24.6k|  return static_cast<unsigned __int128>(lhs) -
 1025|  24.6k|         static_cast<unsigned __int128>(rhs);
 1026|       |#else
 1027|       |  return int128_internal::SubstructResult(
 1028|       |      MakeUint128(Uint128High64(lhs) - Uint128High64(rhs),
 1029|       |                  Uint128Low64(lhs) - Uint128Low64(rhs)),
 1030|       |      lhs, rhs);
 1031|       |#endif
 1032|  24.6k|}
_ZN4absl12lts_20260526mlENS0_7uint128ES1_:
 1059|  22.6k|constexpr uint128 operator*(uint128 lhs, uint128 rhs) {
 1060|       |  // TODO(strel) Remove once alignment issues are resolved and unsigned __int128
 1061|       |  // can be used for uint128 storage.
 1062|  22.6k|  return static_cast<unsigned __int128>(lhs) *
 1063|  22.6k|         static_cast<unsigned __int128>(rhs);
 1064|  22.6k|}
_ZN4absl12lts_202605267uint128ppEv:
 1091|    617|inline uint128& uint128::operator++() {
 1092|    617|  *this += 1;
 1093|    617|  return *this;
 1094|    617|}
_ZN4absl12lts_202605267uint128C2Eo:
  692|   126k|    : lo_{static_cast<uint64_t>(v & ~uint64_t{0})},
  693|   126k|      hi_{static_cast<uint64_t>(v >> 64)} {}
_ZN4absl12lts_202605267uint128C2Em:
  683|  51.2k|constexpr uint128::uint128(unsigned long v) : lo_{v}, hi_{0} {}
_ZN4absl12lts_202605267uint128C2Ei:
  672|  59.9k|    : lo_{static_cast<uint64_t>(v)},
  673|  59.9k|      hi_{v < 0 ? (std::numeric_limits<uint64_t>::max)() : 0} {}
  ------------------
  |  Branch (673:11): [True: 0, False: 59.9k]
  ------------------

_ZN4absl12lts_2026052616numeric_internal20CountLeadingZeroes64Em:
  214|  24.7k|CountLeadingZeroes64(uint64_t x) {
  215|  24.7k|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_clzll)
  216|       |  // Use __builtin_clzll, which uses the following instructions:
  217|       |  //  x86: bsr, lzcnt
  218|       |  //  ARM64: clz
  219|       |  //  PPC: cntlzd
  220|  24.7k|  static_assert(sizeof(unsigned long long) == sizeof(x),  // NOLINT(runtime/int)
  221|  24.7k|                "__builtin_clzll does not take 64-bit arg");
  222|       |
  223|       |  // Handle 0 as a special case because __builtin_clzll(0) is undefined.
  224|  24.7k|  return x == 0 ? 64 : __builtin_clzll(x);
  ------------------
  |  Branch (224:10): [True: 0, False: 24.7k]
  ------------------
  225|       |#elif defined(_MSC_VER) && !defined(__clang__) && \
  226|       |    (defined(_M_X64) || defined(_M_ARM64))
  227|       |  // MSVC does not have __buitin_clzll. Use _BitScanReverse64.
  228|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  229|       |  if (_BitScanReverse64(&result, x)) {
  230|       |    return 63 - result;
  231|       |  }
  232|       |  return 64;
  233|       |#elif defined(_MSC_VER) && !defined(__clang__)
  234|       |  // MSVC does not have __buitin_clzll. Compose two calls to _BitScanReverse
  235|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  236|       |  if ((x >> 32) &&
  237|       |      _BitScanReverse(&result, static_cast<unsigned long>(x >> 32))) {
  238|       |    return 31 - result;
  239|       |  }
  240|       |  if (_BitScanReverse(&result, static_cast<unsigned long>(x))) {
  241|       |    return 63 - result;
  242|       |  }
  243|       |  return 64;
  244|       |#else
  245|       |  int zeroes = 60;
  246|       |  if (x >> 32) {
  247|       |    zeroes -= 32;
  248|       |    x >>= 32;
  249|       |  }
  250|       |  if (x >> 16) {
  251|       |    zeroes -= 16;
  252|       |    x >>= 16;
  253|       |  }
  254|       |  if (x >> 8) {
  255|       |    zeroes -= 8;
  256|       |    x >>= 8;
  257|       |  }
  258|       |  if (x >> 4) {
  259|       |    zeroes -= 4;
  260|       |    x >>= 4;
  261|       |  }
  262|       |  return "\4\3\2\2\1\1\1\1\0\0\0\0\0\0\0"[x] + zeroes;
  263|       |#endif
  264|  24.7k|}
_ZN4absl12lts_2026052616numeric_internal28CountTrailingZeroesNonzero32Ej:
  285|     72|CountTrailingZeroesNonzero32(uint32_t x) {
  286|     72|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_ctz)
  287|     72|  static_assert(sizeof(unsigned int) == sizeof(x),
  288|     72|                "__builtin_ctz does not take 32-bit arg");
  289|     72|  return __builtin_ctz(x);
  290|       |#elif defined(_MSC_VER) && !defined(__clang__)
  291|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  292|       |  _BitScanForward(&result, x);
  293|       |  return result;
  294|       |#else
  295|       |  int c = 31;
  296|       |  x &= ~x + 1;
  297|       |  if (x & 0x0000FFFF) c -= 16;
  298|       |  if (x & 0x00FF00FF) c -= 8;
  299|       |  if (x & 0x0F0F0F0F) c -= 4;
  300|       |  if (x & 0x33333333) c -= 2;
  301|       |  if (x & 0x55555555) c -= 1;
  302|       |  return c;
  303|       |#endif
  304|     72|}
_ZN4absl12lts_2026052616numeric_internal28CountTrailingZeroesNonzero64Em:
  307|     12|CountTrailingZeroesNonzero64(uint64_t x) {
  308|     12|#if ABSL_NUMERIC_INTERNAL_HAVE_BUILTIN_OR_GCC(__builtin_ctzll)
  309|     12|  static_assert(sizeof(unsigned long long) == sizeof(x),  // NOLINT(runtime/int)
  310|     12|                "__builtin_ctzll does not take 64-bit arg");
  311|     12|  return __builtin_ctzll(x);
  312|       |#elif defined(_MSC_VER) && !defined(__clang__) && \
  313|       |    (defined(_M_X64) || defined(_M_ARM64))
  314|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  315|       |  _BitScanForward64(&result, x);
  316|       |  return result;
  317|       |#elif defined(_MSC_VER) && !defined(__clang__)
  318|       |  unsigned long result = 0;  // NOLINT(runtime/int)
  319|       |  if (static_cast<uint32_t>(x) == 0) {
  320|       |    _BitScanForward(&result, static_cast<unsigned long>(x >> 32));
  321|       |    return result + 32;
  322|       |  }
  323|       |  _BitScanForward(&result, static_cast<unsigned long>(x));
  324|       |  return result;
  325|       |#else
  326|       |  int c = 63;
  327|       |  x &= ~x + 1;
  328|       |  if (x & 0x00000000FFFFFFFF) c -= 32;
  329|       |  if (x & 0x0000FFFF0000FFFF) c -= 16;
  330|       |  if (x & 0x00FF00FF00FF00FF) c -= 8;
  331|       |  if (x & 0x0F0F0F0F0F0F0F0F) c -= 4;
  332|       |  if (x & 0x3333333333333333) c -= 2;
  333|       |  if (x & 0x5555555555555555) c -= 1;
  334|       |  return c;
  335|       |#endif
  336|     12|}
_ZN4absl12lts_2026052616numeric_internal18CountLeadingZeroesImEEiT_:
  268|  24.7k|CountLeadingZeroes(T x) {
  269|  24.7k|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  270|  24.7k|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  271|  24.7k|                "T must have a power-of-2 size");
  272|  24.7k|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  273|  24.7k|  return sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (273:10): [Folded, False: 24.7k]
  ------------------
  274|  24.7k|             ? CountLeadingZeroes16(static_cast<uint16_t>(x)) -
  275|      0|                   (std::numeric_limits<uint16_t>::digits -
  276|      0|                    std::numeric_limits<T>::digits)
  277|  24.7k|             : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (277:17): [Folded, False: 24.7k]
  ------------------
  278|  24.7k|                    ? CountLeadingZeroes32(static_cast<uint32_t>(x)) -
  279|      0|                          (std::numeric_limits<uint32_t>::digits -
  280|      0|                           std::numeric_limits<T>::digits)
  281|  24.7k|                    : CountLeadingZeroes64(x));
  282|  24.7k|}
_ZN4absl12lts_2026052616numeric_internal19CountTrailingZeroesIjEEiT_:
  353|     72|CountTrailingZeroes(T x) noexcept {
  354|     72|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  355|     72|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  356|     72|                "T must have a power-of-2 size");
  357|     72|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  358|     72|  return x == 0 ? std::numeric_limits<T>::digits
  ------------------
  |  Branch (358:10): [True: 0, False: 72]
  ------------------
  359|     72|                : (sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (359:20): [Folded, False: 72]
  ------------------
  360|     72|                       ? CountTrailingZeroesNonzero16(static_cast<uint16_t>(x))
  361|     72|                       : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (361:27): [True: 72, Folded]
  ------------------
  362|     72|                              ? CountTrailingZeroesNonzero32(
  363|     72|                                    static_cast<uint32_t>(x))
  364|     72|                              : CountTrailingZeroesNonzero64(x)));
  365|     72|}
_ZN4absl12lts_2026052616numeric_internal19CountTrailingZeroesImEEiT_:
  353|     12|CountTrailingZeroes(T x) noexcept {
  354|     12|  static_assert(std::is_unsigned<T>::value, "T must be unsigned");
  355|     12|  static_assert(IsPowerOf2(std::numeric_limits<T>::digits),
  356|     12|                "T must have a power-of-2 size");
  357|     12|  static_assert(sizeof(T) <= sizeof(uint64_t), "T too large");
  358|     12|  return x == 0 ? std::numeric_limits<T>::digits
  ------------------
  |  Branch (358:10): [True: 0, False: 12]
  ------------------
  359|     12|                : (sizeof(T) <= sizeof(uint16_t)
  ------------------
  |  Branch (359:20): [Folded, False: 12]
  ------------------
  360|     12|                       ? CountTrailingZeroesNonzero16(static_cast<uint16_t>(x))
  361|     12|                       : (sizeof(T) <= sizeof(uint32_t)
  ------------------
  |  Branch (361:27): [Folded, False: 12]
  ------------------
  362|     12|                              ? CountTrailingZeroesNonzero32(
  363|      0|                                    static_cast<uint32_t>(x))
  364|     12|                              : CountTrailingZeroesNonzero64(x)));
  365|     12|}

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

_ZN4absl12lts_2026052621discrete_distributionIiEC2Ev:
  113|      2|  discrete_distribution() : param_() {}
_ZN4absl12lts_2026052621discrete_distributionIiE10param_typeC2Ev:
   62|      2|    param_type() { init(); }
_ZN4absl12lts_2026052621discrete_distributionIiE10param_type4initEv:
  185|      4|void discrete_distribution<IntType>::param_type::init() {
  186|      4|  if (p_.empty()) {
  ------------------
  |  Branch (186:7): [True: 2, False: 2]
  ------------------
  187|      2|    p_.push_back(1.0);
  188|      2|    q_.emplace_back(1.0, 0);
  189|      2|  } else {
  190|       |    assert(n() <= (std::numeric_limits<IntType>::max)());
  191|      2|    q_ = random_internal::InitDiscreteDistribution(&p_);
  192|      2|  }
  193|      4|}
_ZN4absl12lts_2026052621discrete_distributionIiEC2INSt3__111__wrap_iterIPdEEEET_S8_:
  119|      2|      : param_(begin, end) {}
_ZN4absl12lts_2026052621discrete_distributionIiE10param_typeC2INSt3__111__wrap_iterIPdEEEET_S9_:
   66|      2|        : p_(begin, end) {
   67|      2|      init();
   68|      2|    }

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

_ZN4absl12lts_2026052615random_internal18DistributionCallerINS0_6BitGenEE4CallINS1_26UniformDistributionWrapperIjEEJEEENT_11result_typeEPS3_DpOT0_:
   73|     16|  static typename DistrT::result_type Call(URBG* urbg, Args&&... args) {
   74|     16|    return Impl<DistrT, Args...>(RandomMockingAccess::HasInvokeMock<URBG>{},
   75|     16|                                 urbg, std::forward<Args>(args)...);
   76|     16|  }
_ZN4absl12lts_2026052615random_internal18DistributionCallerINS0_6BitGenEE4ImplINS1_26UniformDistributionWrapperIjEEJEEENT_11result_typeENSt3__117integral_constantIbLb0EEEPS3_DpOT0_:
   47|     16|                                           Args&&... args) {
   48|     16|    DistrT dist(std::forward<Args>(args)...);
   49|     16|    return dist(*urbg);
   50|     16|  }

_ZN4absl12lts_2026052615random_internal24GetEntropyFromRandenPoolEPvm:
  178|      2|void GetEntropyFromRandenPool(void* dest, size_t bytes) {
  179|      2|  auto* pool = GetPoolForCurrentThread();
  180|      2|  pool->Fill(reinterpret_cast<uint8_t*>(dest), bytes);
  181|      2|}
entropy_pool.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_123GetPoolForCurrentThreadEv:
  171|      2|RandenPoolEntry* GetPoolForCurrentThread() {
  172|      2|  absl::call_once(pool_once, InitPoolURBG);
  173|      2|  return shared_pools[GetPoolID()];
  174|      2|}
entropy_pool.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_112InitPoolURBGEv:
  155|      2|void InitPoolURBG() {
  156|      2|  static constexpr size_t kSeedSize =
  157|      2|      RandenTraits::kStateBytes / sizeof(uint32_t);
  158|       |  // Read OS entropy once, and use it to initialize each pool entry.
  159|      2|  uint32_t seed_material[kPoolSize * kSeedSize];
  160|      2|  if (!ReadSeedMaterialFromOSEntropy(absl::MakeSpan(seed_material))) {
  ------------------
  |  Branch (160:7): [True: 0, False: 2]
  ------------------
  161|      0|    ThrowSeedGenException();
  162|      0|  }
  163|     18|  for (size_t i = 0; i < kPoolSize; i++) {
  ------------------
  |  Branch (163:22): [True: 16, False: 2]
  ------------------
  164|     16|    shared_pools[i] = new RandenPoolEntry();
  165|     16|    shared_pools[i]->Init(
  166|     16|        absl::MakeSpan(&seed_material[i * kSeedSize], kSeedSize));
  167|     16|  }
  168|      2|}
entropy_pool.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_115RandenPoolEntry4InitENS0_4SpanIKjEE:
   57|     16|  void Init(absl::Span<const uint32_t> data) {
   58|     16|    SpinLockHolder l(mu_);  // Always uncontested.
   59|     16|    std::copy(data.begin(), data.end(), std::begin(state_));
   60|     16|    next_ = kState;
   61|     16|  }
entropy_pool.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_19GetPoolIDEv:
  116|      2|size_t GetPoolID() {
  117|      2|  static_assert(kPoolSize >= 1,
  118|      2|                "At least one urbg instance is required for PoolURBG");
  119|       |
  120|      2|  ABSL_CONST_INIT static std::atomic<uint64_t> sequence{0};
  ------------------
  |  |  849|      2|#define ABSL_CONST_INIT [[clang::require_constant_initialization]]
  ------------------
  121|       |
  122|      2|#ifdef ABSL_HAVE_THREAD_LOCAL
  123|      2|  static thread_local size_t my_pool_id = kPoolSize;
  124|      2|  if (ABSL_PREDICT_FALSE(my_pool_id == kPoolSize)) {
  ------------------
  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 2, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:58): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  125|      2|    my_pool_id = (sequence++ % kPoolSize);
  126|      2|  }
  127|      2|  return my_pool_id;
  128|       |#else
  129|       |  static pthread_key_t tid_key = [] {
  130|       |    pthread_key_t tmp_key;
  131|       |    int err = pthread_key_create(&tmp_key, nullptr);
  132|       |    if (err) {
  133|       |      ABSL_RAW_LOG(FATAL, "pthread_key_create failed with %d", err);
  134|       |    }
  135|       |    return tmp_key;
  136|       |  }();
  137|       |
  138|       |  // Store the value in the pthread_{get/set}specific. However an uninitialized
  139|       |  // value is 0, so add +1 to distinguish from the null value.
  140|       |  uintptr_t my_pool_id =
  141|       |      reinterpret_cast<uintptr_t>(pthread_getspecific(tid_key));
  142|       |  if (ABSL_PREDICT_FALSE(my_pool_id == 0)) {
  143|       |    // No allocated ID, allocate the next value, cache it, and return.
  144|       |    my_pool_id = (sequence++ % kPoolSize) + 1;
  145|       |    int err = pthread_setspecific(tid_key, reinterpret_cast<void*>(my_pool_id));
  146|       |    if (err) {
  147|       |      ABSL_RAW_LOG(FATAL, "pthread_setspecific failed with %d", err);
  148|       |    }
  149|       |  }
  150|       |  return my_pool_id - 1;
  151|       |#endif
  152|      2|}
entropy_pool.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_115RandenPoolEntry4FillEPhm:
   86|      2|void RandenPoolEntry::Fill(uint8_t* out, size_t bytes) {
   87|      2|  SpinLockHolder l(mu_);
   88|      4|  while (bytes > 0) {
  ------------------
  |  Branch (88:10): [True: 2, False: 2]
  ------------------
   89|      2|    MaybeRefill();
   90|      2|    size_t remaining = available() * sizeof(state_[0]);
   91|      2|    size_t to_copy = std::min(bytes, remaining);
   92|      2|    std::memcpy(out, &state_[next_], to_copy);
   93|      2|    out += to_copy;
   94|      2|    bytes -= to_copy;
   95|      2|    next_ += (to_copy + sizeof(state_[0]) - 1) / sizeof(state_[0]);
   96|      2|  }
   97|      2|}
entropy_pool.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_115RandenPoolEntry11MaybeRefillEv:
   66|      2|  inline void MaybeRefill() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) {
   67|      2|    if (next_ >= kState) {
  ------------------
  |  Branch (67:9): [True: 2, False: 0]
  ------------------
   68|      2|      next_ = kCapacity;
   69|      2|      impl_.Generate(state_);
   70|      2|    }
   71|      2|  }
entropy_pool.cc:_ZNK4absl12lts_2026052615random_internal12_GLOBAL__N_115RandenPoolEntry9availableEv:
   73|      2|  inline size_t available() const ABSL_SHARED_LOCKS_REQUIRED(mu_) {
   74|      2|    return kState - next_;
   75|      2|  }

_ZN4absl12lts_2026052615random_internal15FastUniformBitsIjEclINS0_6BitGenEEEjRT_:
  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 = std::conditional_t<IsPowerOfTwoOrZero(RangeSize<URBG>()),
  130|     16|                                  SimplifiedLoopTag, RejectionLoopTag>;
  131|     16|  return Generate(g, tag{});
  132|     16|}
_ZN4absl12lts_2026052615random_internal15FastUniformBitsIjE8GenerateINS0_6BitGenEEEjRT_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_2026052615random_internal17RandenPoolSeedSeq4sizeEv:
   66|      2|  size_t size() { return 0; }
_ZN4absl12lts_2026052615random_internal17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEC2Ev:
  100|      2|  NonsecureURBGBase() : urbg_(ConstructURBG()) {}
_ZN4absl12lts_2026052615random_internal17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEE13ConstructURBGEv:
  141|      2|  static URBG ConstructURBG() {
  142|      2|    Seeder seeder;
  143|      2|    return URBG(seeder);
  144|      2|  }
_ZN4absl12lts_2026052615random_internal17RandenPoolSeedSeq8generateIPjEEvT_S5_:
   72|      2|  void generate(RandomAccessIterator begin, RandomAccessIterator end) {
   73|       |    // RandomAccessIterator must be assignable from uint32_t
   74|      2|    if (begin != end) {
  ------------------
  |  Branch (74:9): [True: 2, False: 0]
  ------------------
   75|      2|      using U = typename std::iterator_traits<RandomAccessIterator>::value_type;
   76|       |      // ContiguousTag indicates the common case of a known contiguous buffer,
   77|       |      // which allows directly filling the buffer. In C++20,
   78|       |      // std::contiguous_iterator_tag provides a mechanism for testing this
   79|       |      // capability, however until Abseil's support requirements allow us to
   80|       |      // assume C++20, limit checks to a few common cases.
   81|      2|      using TagType = std::conditional_t<
   82|      2|          (std::is_pointer<RandomAccessIterator>::value ||
   83|      2|           std::is_same<RandomAccessIterator,
   84|      2|                        typename std::vector<U>::iterator>::value),
   85|      2|          ContiguousTag, BufferTag>;
   86|       |
   87|      2|      generate_impl(TagType{}, begin, end);
   88|      2|    }
   89|      2|  }
_ZN4absl12lts_2026052615random_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|    GetEntropyFromRandenPool(a, sizeof(*a) * n);
   50|      2|  }
_ZN4absl12lts_2026052615random_internal17NonsecureURBGBaseINS1_13randen_engineImEENS1_17RandenPoolSeedSeqEEclEv:
  125|     16|  result_type operator()() { return urbg_(); }

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

_ZN4absl12lts_2026052615random_internal28HasRandenHwAesImplementationEv:
   54|      2|bool HasRandenHwAesImplementation() { return false; }

_ZN4absl12lts_2026052615random_internal10RandenSlow7GetKeysEv:
  421|      2|const void* RandenSlow::GetKeys() {
  422|       |  // Round keys for one AES per Feistel round and branch.
  423|       |  // The canonical implementation uses first digits of Pi.
  424|      2|#ifdef ABSL_IS_LITTLE_ENDIAN
  425|      2|  return kRandenRoundKeys;
  426|       |#else
  427|       |  return kRandenRoundKeysBE;
  428|       |#endif
  429|      2|}
_ZN4absl12lts_2026052615random_internal10RandenSlow6AbsorbEPKvPv:
  431|      2|void RandenSlow::Absorb(const void* seed_void, void* state_void) {
  432|      2|  auto* state =
  433|      2|      reinterpret_cast<uint64_t * ABSL_RANDOM_INTERNAL_RESTRICT>(state_void);
  434|      2|  const auto* seed =
  435|      2|      reinterpret_cast<const uint64_t * ABSL_RANDOM_INTERNAL_RESTRICT>(
  436|      2|          seed_void);
  437|       |
  438|      2|  constexpr size_t kCapacityBlocks =
  439|      2|      RandenTraits::kCapacityBytes / sizeof(uint64_t);
  440|      2|  static_assert(
  441|      2|      kCapacityBlocks * sizeof(uint64_t) == RandenTraits::kCapacityBytes,
  442|      2|      "Not i*V");
  443|       |
  444|      2|  for (size_t i = kCapacityBlocks;
  445|     62|       i < RandenTraits::kStateBytes / sizeof(uint64_t); ++i) {
  ------------------
  |  Branch (445:8): [True: 60, False: 2]
  ------------------
  446|     60|    state[i] ^= seed[i - kCapacityBlocks];
  447|     60|  }
  448|      2|}
_ZN4absl12lts_2026052615random_internal10RandenSlow8GenerateEPKvPv:
  450|      4|void RandenSlow::Generate(const void* keys_void, void* state_void) {
  451|      4|  static_assert(RandenTraits::kCapacityBytes == sizeof(absl::uint128),
  452|      4|                "Capacity mismatch");
  453|       |
  454|      4|  auto* state = reinterpret_cast<absl::uint128*>(state_void);
  455|      4|  const auto* keys = reinterpret_cast<const absl::uint128*>(keys_void);
  456|       |
  457|      4|  const absl::uint128 prev_inner = state[0];
  458|       |
  459|      4|  SwapEndian(state);
  460|       |
  461|      4|  Permute(state, keys);
  462|       |
  463|      4|  SwapEndian(state);
  464|       |
  465|       |  // Ensure backtracking resistance.
  466|      4|  *state ^= prev_inner;
  467|      4|}
randen_slow.cc:_ZN12_GLOBAL__N_110SwapEndianEPN4absl12lts_202605267uint128E:
  400|      8|    absl::uint128* state) {
  401|       |#ifdef ABSL_IS_BIG_ENDIAN
  402|       |  for (uint32_t block = 0; block < RandenTraits::kFeistelBlocks; ++block) {
  403|       |    uint64_t new_lo = absl::little_endian::ToHost64(
  404|       |        static_cast<uint64_t>(state[block] >> 64));
  405|       |    uint64_t new_hi = absl::little_endian::ToHost64(
  406|       |        static_cast<uint64_t>((state[block] << 64) >> 64));
  407|       |    state[block] = (static_cast<absl::uint128>(new_hi) << 64) | new_lo;
  408|       |  }
  409|       |#else
  410|       |  // Avoid warning about unused variable.
  411|      8|  (void)state;
  412|      8|#endif
  413|      8|}
randen_slow.cc:_ZN12_GLOBAL__N_17PermuteEPN4absl12lts_202605267uint128EPKS2_:
  391|      4|    const absl::uint128* ABSL_RANDOM_INTERNAL_RESTRICT keys) {
  392|     72|  for (size_t round = 0; round < RandenTraits::kFeistelRounds; ++round) {
  ------------------
  |  Branch (392:26): [True: 68, False: 4]
  ------------------
  393|     68|    keys = FeistelRound(state, keys);
  394|     68|    BlockShuffle(state);
  395|     68|  }
  396|      4|}
randen_slow.cc:_ZN12_GLOBAL__N_112FeistelRoundEPN4absl12lts_202605267uint128EPKS2_:
  365|     68|             const absl::uint128* ABSL_RANDOM_INTERNAL_RESTRICT keys) {
  366|    340|  for (size_t branch = 0; branch < RandenTraits::kFeistelBlocks; branch += 4) {
  ------------------
  |  Branch (366:27): [True: 272, False: 68]
  ------------------
  367|    272|    const Vector128 s0 = Vector128Load(state + branch);
  368|    272|    const Vector128 s1 = Vector128Load(state + branch + 1);
  369|    272|    const Vector128 f0 = AesRound(s0, Vector128Load(keys));
  370|    272|    keys++;
  371|    272|    const Vector128 o1 = AesRound(f0, s1);
  372|    272|    Vector128Store(o1, state + branch + 1);
  373|       |
  374|       |    // Manually unroll this loop once. about 10% better than not unrolled.
  375|    272|    const Vector128 s2 = Vector128Load(state + branch + 2);
  376|    272|    const Vector128 s3 = Vector128Load(state + branch + 3);
  377|    272|    const Vector128 f2 = AesRound(s2, Vector128Load(keys));
  378|    272|    keys++;
  379|    272|    const Vector128 o3 = AesRound(f2, s3);
  380|    272|    Vector128Store(o3, state + branch + 3);
  381|    272|  }
  382|     68|  return keys;
  383|     68|}
randen_slow.cc:_ZN12_GLOBAL__N_113Vector128LoadEPKv:
  239|  1.63k|Vector128Load(const void* from) {
  240|  1.63k|  Vector128 result;
  241|  1.63k|  std::memcpy(result.s, from, sizeof(Vector128));
  242|  1.63k|  return result;
  243|  1.63k|}
randen_slow.cc:_ZN12_GLOBAL__N_18AesRoundERKNS_9Vector128ES2_:
  253|  1.08k|AesRound(const Vector128& state, const Vector128& round_key) {
  254|  1.08k|  Vector128 result;
  255|  1.08k|#ifdef ABSL_IS_LITTLE_ENDIAN
  256|  1.08k|  result.s[0] = round_key.s[0] ^                  //
  257|  1.08k|                te0[uint8_t(state.s[0])] ^        //
  258|  1.08k|                te1[uint8_t(state.s[1] >> 8)] ^   //
  259|  1.08k|                te2[uint8_t(state.s[2] >> 16)] ^  //
  260|  1.08k|                te3[uint8_t(state.s[3] >> 24)];
  261|  1.08k|  result.s[1] = round_key.s[1] ^                  //
  262|  1.08k|                te0[uint8_t(state.s[1])] ^        //
  263|  1.08k|                te1[uint8_t(state.s[2] >> 8)] ^   //
  264|  1.08k|                te2[uint8_t(state.s[3] >> 16)] ^  //
  265|  1.08k|                te3[uint8_t(state.s[0] >> 24)];
  266|  1.08k|  result.s[2] = round_key.s[2] ^                  //
  267|  1.08k|                te0[uint8_t(state.s[2])] ^        //
  268|  1.08k|                te1[uint8_t(state.s[3] >> 8)] ^   //
  269|  1.08k|                te2[uint8_t(state.s[0] >> 16)] ^  //
  270|  1.08k|                te3[uint8_t(state.s[1] >> 24)];
  271|  1.08k|  result.s[3] = round_key.s[3] ^                  //
  272|  1.08k|                te0[uint8_t(state.s[3])] ^        //
  273|  1.08k|                te1[uint8_t(state.s[0] >> 8)] ^   //
  274|  1.08k|                te2[uint8_t(state.s[1] >> 16)] ^  //
  275|  1.08k|                te3[uint8_t(state.s[2] >> 24)];
  276|       |#else
  277|       |  result.s[0] = round_key.s[0] ^                  //
  278|       |                te0[uint8_t(state.s[0])] ^        //
  279|       |                te1[uint8_t(state.s[3] >> 8)] ^   //
  280|       |                te2[uint8_t(state.s[2] >> 16)] ^  //
  281|       |                te3[uint8_t(state.s[1] >> 24)];
  282|       |  result.s[1] = round_key.s[1] ^                  //
  283|       |                te0[uint8_t(state.s[1])] ^        //
  284|       |                te1[uint8_t(state.s[0] >> 8)] ^   //
  285|       |                te2[uint8_t(state.s[3] >> 16)] ^  //
  286|       |                te3[uint8_t(state.s[2] >> 24)];
  287|       |  result.s[2] = round_key.s[2] ^                  //
  288|       |                te0[uint8_t(state.s[2])] ^        //
  289|       |                te1[uint8_t(state.s[1] >> 8)] ^   //
  290|       |                te2[uint8_t(state.s[0] >> 16)] ^  //
  291|       |                te3[uint8_t(state.s[3] >> 24)];
  292|       |  result.s[3] = round_key.s[3] ^                  //
  293|       |                te0[uint8_t(state.s[3])] ^        //
  294|       |                te1[uint8_t(state.s[2] >> 8)] ^   //
  295|       |                te2[uint8_t(state.s[1] >> 16)] ^  //
  296|       |                te3[uint8_t(state.s[0] >> 24)];
  297|       |#endif
  298|  1.08k|  return result;
  299|  1.08k|}
randen_slow.cc:_ZN12_GLOBAL__N_114Vector128StoreERKNS_9Vector128EPv:
  246|    544|    const Vector128& v, void* to) {
  247|    544|  std::memcpy(to, v.s, sizeof(Vector128));
  248|    544|}
randen_slow.cc:_ZN12_GLOBAL__N_112BlockShuffleEPN4absl12lts_202605267uint128E:
  305|     68|    absl::uint128* state) {
  306|     68|  static_assert(RandenTraits::kFeistelBlocks == 16,
  307|     68|                "Feistel block shuffle only works for 16 blocks.");
  308|       |
  309|     68|  constexpr size_t shuffle[RandenTraits::kFeistelBlocks] = {
  310|     68|      7, 2, 13, 4, 11, 8, 3, 6, 15, 0, 9, 10, 1, 14, 5, 12};
  311|       |
  312|       |  // The fully unrolled loop without the memcpy improves the speed by about
  313|       |  // 30% over the equivalent:
  314|       |#if 0
  315|       |  absl::uint128 source[RandenTraits::kFeistelBlocks];
  316|       |  std::memcpy(source, state, sizeof(source));
  317|       |  for (size_t i = 0; i < RandenTraits::kFeistelBlocks; i++) {
  318|       |    const absl::uint128 v0 = source[shuffle[i]];
  319|       |    state[i] = v0;
  320|       |  }
  321|       |  return;
  322|       |#endif
  323|       |
  324|     68|  const absl::uint128 v0 = state[shuffle[0]];
  325|     68|  const absl::uint128 v1 = state[shuffle[1]];
  326|     68|  const absl::uint128 v2 = state[shuffle[2]];
  327|     68|  const absl::uint128 v3 = state[shuffle[3]];
  328|     68|  const absl::uint128 v4 = state[shuffle[4]];
  329|     68|  const absl::uint128 v5 = state[shuffle[5]];
  330|     68|  const absl::uint128 v6 = state[shuffle[6]];
  331|     68|  const absl::uint128 v7 = state[shuffle[7]];
  332|     68|  const absl::uint128 w0 = state[shuffle[8]];
  333|     68|  const absl::uint128 w1 = state[shuffle[9]];
  334|     68|  const absl::uint128 w2 = state[shuffle[10]];
  335|     68|  const absl::uint128 w3 = state[shuffle[11]];
  336|     68|  const absl::uint128 w4 = state[shuffle[12]];
  337|     68|  const absl::uint128 w5 = state[shuffle[13]];
  338|     68|  const absl::uint128 w6 = state[shuffle[14]];
  339|     68|  const absl::uint128 w7 = state[shuffle[15]];
  340|     68|  state[0] = v0;
  341|     68|  state[1] = v1;
  342|     68|  state[2] = v2;
  343|     68|  state[3] = v3;
  344|     68|  state[4] = v4;
  345|     68|  state[5] = v5;
  346|     68|  state[6] = v6;
  347|     68|  state[7] = v7;
  348|     68|  state[8] = w0;
  349|     68|  state[9] = w1;
  350|     68|  state[10] = w2;
  351|     68|  state[11] = w3;
  352|     68|  state[12] = w4;
  353|     68|  state[13] = w5;
  354|     68|  state[14] = w6;
  355|     68|  state[15] = w7;
  356|     68|}

_ZN4absl12lts_2026052615random_internal29ReadSeedMaterialFromOSEntropyENS0_4SpanIjEE:
  188|      2|bool ReadSeedMaterialFromOSEntropy(absl::Span<uint32_t> values) {
  189|      2|  assert(values.data() != nullptr);
  190|      2|  if (values.data() == nullptr) {
  ------------------
  |  Branch (190:7): [True: 0, False: 2]
  ------------------
  191|      0|    return false;
  192|      0|  }
  193|      2|  if (values.empty()) {
  ------------------
  |  Branch (193:7): [True: 0, False: 2]
  ------------------
  194|      0|    return true;
  195|      0|  }
  196|      2|  return ReadSeedMaterialFromOSEntropyImpl(values);
  197|      2|}
seed_material.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_133ReadSeedMaterialFromOSEntropyImplENS0_4SpanIjEE:
  173|      2|bool ReadSeedMaterialFromOSEntropyImpl(absl::Span<uint32_t> values) {
  174|      2|#if defined(ABSL_RANDOM_USE_GET_ENTROPY)
  175|      2|  if (ReadSeedMaterialFromGetEntropy(values)) {
  ------------------
  |  Branch (175:7): [True: 2, False: 0]
  ------------------
  176|      2|    return true;
  177|      2|  }
  178|      0|#endif
  179|       |  // Libc may support getentropy, but the kernel may not, so we still have
  180|       |  // to fallback to ReadSeedMaterialFromDevURandom().
  181|      0|  return ReadSeedMaterialFromDevURandom(values);
  182|      2|}
seed_material.cc:_ZN4absl12lts_2026052615random_internal12_GLOBAL__N_130ReadSeedMaterialFromGetEntropyENS0_4SpanIjEE:
  122|      2|bool ReadSeedMaterialFromGetEntropy(absl::Span<uint32_t> values) {
  123|      2|  auto buffer = reinterpret_cast<uint8_t*>(values.data());
  124|      2|  size_t buffer_size = sizeof(uint32_t) * values.size();
  125|     18|  while (buffer_size > 0) {
  ------------------
  |  Branch (125:10): [True: 16, False: 2]
  ------------------
  126|       |    // getentropy() has a maximum permitted length of 256.
  127|     16|    size_t to_read = std::min<size_t>(buffer_size, 256);
  128|     16|    int result = getentropy(buffer, to_read);
  129|     16|    if (result < 0) {
  ------------------
  |  Branch (129:9): [True: 0, False: 16]
  ------------------
  130|      0|      return false;
  131|      0|    }
  132|       |    // https://github.com/google/sanitizers/issues/1173
  133|       |    // MemorySanitizer can't see through getentropy().
  134|     16|    ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(buffer, to_read);
  135|     16|    buffer += to_read;
  136|     16|    buffer_size -= to_read;
  137|     16|  }
  138|      2|  return true;
  139|      2|}

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

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

_ZNK4absl12lts_2026052615status_internal9StatusRep5UnrefEv:
   53|  3.29k|void StatusRep::Unref() const {
   54|       |  // Fast path: if ref==1, there is no need for a RefCountDec (since
   55|       |  // this is the only reference and therefore no other thread is
   56|       |  // allowed to be mucking with r).
   57|  3.29k|  if (ref_.load(std::memory_order_acquire) == 1 ||
  ------------------
  |  Branch (57:7): [True: 3.29k, False: 0]
  ------------------
   58|  3.29k|      ref_.fetch_sub(1, std::memory_order_acq_rel) - 1 == 0) {
  ------------------
  |  Branch (58:7): [True: 0, False: 0]
  ------------------
   59|  3.29k|    delete this;
   60|  3.29k|  }
   61|  3.29k|}
_ZNK4absl12lts_2026052615status_internal9StatusRep14ForEachPayloadENS0_11FunctionRefIFvNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEERKNS0_4CordEEEE:
  115|     42|    const {
  116|     42|  if (auto* payloads = payloads_.get()) {
  ------------------
  |  Branch (116:13): [True: 0, False: 42]
  ------------------
  117|      0|    bool in_reverse =
  118|      0|        payloads->size() > 1 && reinterpret_cast<uintptr_t>(payloads) % 13 > 6;
  ------------------
  |  Branch (118:9): [True: 0, False: 0]
  |  Branch (118:33): [True: 0, False: 0]
  ------------------
  119|       |
  120|      0|    for (size_t index = 0; index < payloads->size(); ++index) {
  ------------------
  |  Branch (120:28): [True: 0, False: 0]
  ------------------
  121|      0|      const auto& elem =
  122|      0|          (*payloads)[in_reverse ? payloads->size() - 1 - index : index];
  ------------------
  |  Branch (122:23): [True: 0, False: 0]
  ------------------
  123|       |
  124|      0|#ifdef NDEBUG
  125|      0|      visitor(elem.type_url, elem.payload);
  126|       |#else
  127|       |      // In debug mode invalidate the type url to prevent users from relying on
  128|       |      // this string lifetime.
  129|       |
  130|       |      // NOLINTNEXTLINE intentional extra conversion to force temporary.
  131|       |      visitor(std::string(elem.type_url), elem.payload);
  132|       |#endif  // NDEBUG
  133|      0|    }
  134|      0|  }
  135|     42|}
_ZN4absl12lts_2026052615status_internal9StatusRep17AddSourceLocationENS0_14SourceLocationE:
  141|  3.29k|void StatusRep::AddSourceLocation(absl::SourceLocation loc) {
  142|  3.29k|  source_locations_.push_back(loc);
  143|  3.29k|}
_ZN4absl12lts_2026052615status_internal14MapToLocalCodeEi:
  257|     42|absl::StatusCode MapToLocalCode(int value) {
  258|     42|  absl::StatusCode code = static_cast<absl::StatusCode>(value);
  259|     42|  switch (code) {
  260|      0|    case absl::StatusCode::kOk:
  ------------------
  |  Branch (260:5): [True: 0, False: 42]
  ------------------
  261|      0|    case absl::StatusCode::kCancelled:
  ------------------
  |  Branch (261:5): [True: 0, False: 42]
  ------------------
  262|      0|    case absl::StatusCode::kUnknown:
  ------------------
  |  Branch (262:5): [True: 0, False: 42]
  ------------------
  263|     42|    case absl::StatusCode::kInvalidArgument:
  ------------------
  |  Branch (263:5): [True: 42, False: 0]
  ------------------
  264|     42|    case absl::StatusCode::kDeadlineExceeded:
  ------------------
  |  Branch (264:5): [True: 0, False: 42]
  ------------------
  265|     42|    case absl::StatusCode::kNotFound:
  ------------------
  |  Branch (265:5): [True: 0, False: 42]
  ------------------
  266|     42|    case absl::StatusCode::kAlreadyExists:
  ------------------
  |  Branch (266:5): [True: 0, False: 42]
  ------------------
  267|     42|    case absl::StatusCode::kPermissionDenied:
  ------------------
  |  Branch (267:5): [True: 0, False: 42]
  ------------------
  268|     42|    case absl::StatusCode::kResourceExhausted:
  ------------------
  |  Branch (268:5): [True: 0, False: 42]
  ------------------
  269|     42|    case absl::StatusCode::kFailedPrecondition:
  ------------------
  |  Branch (269:5): [True: 0, False: 42]
  ------------------
  270|     42|    case absl::StatusCode::kAborted:
  ------------------
  |  Branch (270:5): [True: 0, False: 42]
  ------------------
  271|     42|    case absl::StatusCode::kOutOfRange:
  ------------------
  |  Branch (271:5): [True: 0, False: 42]
  ------------------
  272|     42|    case absl::StatusCode::kUnimplemented:
  ------------------
  |  Branch (272:5): [True: 0, False: 42]
  ------------------
  273|     42|    case absl::StatusCode::kInternal:
  ------------------
  |  Branch (273:5): [True: 0, False: 42]
  ------------------
  274|     42|    case absl::StatusCode::kUnavailable:
  ------------------
  |  Branch (274:5): [True: 0, False: 42]
  ------------------
  275|     42|    case absl::StatusCode::kDataLoss:
  ------------------
  |  Branch (275:5): [True: 0, False: 42]
  ------------------
  276|     42|    case absl::StatusCode::kUnauthenticated:
  ------------------
  |  Branch (276:5): [True: 0, False: 42]
  ------------------
  277|     42|      return code;
  278|      0|    default:
  ------------------
  |  Branch (278:5): [True: 0, False: 42]
  ------------------
  279|      0|      return absl::StatusCode::kUnknown;
  280|     42|  }
  281|     42|}

_ZN4absl12lts_2026052615status_internal9StatusRepC2ENS0_10StatusCodeENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEENS4_10unique_ptrINS0_13InlinedVectorINS1_7PayloadELm1ENS4_9allocatorISB_EEEENS4_14default_deleteISE_EEEE:
   82|  3.29k|      : ref_(int32_t{1}),
   83|  3.29k|        code_(code_arg),
   84|  3.29k|        message_(message_arg),
   85|  3.29k|        payloads_(std::move(payloads_arg)) {}
_ZNK4absl12lts_2026052615status_internal9StatusRep4codeEv:
   87|     42|  absl::StatusCode code() const { return code_; }
_ZNK4absl12lts_2026052615status_internal9StatusRep7messageEv:
   88|     42|  const std::string& message() const { return message_; }

_ZN4absl12lts_2026052617internal_statusor12PlacementNewINS0_6StatusEJEEEvPvDpOT0_:
  246|  13.3k|void PlacementNew(void* absl_nonnull p, Args&&... args) {
  247|  13.3k|  new (p) T(std::forward<Args>(args)...);
  248|  13.3k|}
_ZN4absl12lts_2026052617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEED2Ev:
  358|  16.5k|  ~StatusOrData() {
  359|  16.5k|    if (ok()) {
  ------------------
  |  Branch (359:9): [True: 13.3k, False: 3.25k]
  ------------------
  360|  13.3k|      status_.~Status();
  361|  13.3k|      if constexpr (!std::is_trivially_destructible_v<T>) {
  362|  13.3k|        data_.~T();
  363|  13.3k|      }
  364|  13.3k|    } else {
  365|  3.25k|      status_.~Status();
  366|  3.25k|    }
  367|  16.5k|  }
_ZNK4absl12lts_2026052617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE2okEv:
  386|  33.1k|  bool ok() const { return status_.ok(); }
_ZNO4absl12lts_2026052617internal_statusor12OperatorBaseIN8fuzztest8internal11CopyableAnyEEdeEv:
  473|  13.3k|  T&& operator*() && ABSL_ATTRIBUTE_LIFETIME_BOUND {
  474|  13.3k|    self().EnsureOk();
  475|  13.3k|    return std::move(self().data_);
  476|  13.3k|  }
_ZN4absl12lts_2026052617internal_statusor12OperatorBaseIN8fuzztest8internal11CopyableAnyEE4selfEv:
  459|  26.6k|  auto& self() { return static_cast<StatusOr<T>&>(*this); }
_ZNK4absl12lts_2026052617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE8EnsureOkEv:
  413|  13.3k|  void EnsureOk() const {
  414|  13.3k|    if (ABSL_PREDICT_FALSE(!ok())) Helper::Crash(status_);
  ------------------
  |  |  190|  13.3k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 13.3k]
  |  |  |  Branch (190:49): [Folded, False: 13.3k]
  |  |  |  Branch (190:58): [True: 0, False: 13.3k]
  |  |  ------------------
  ------------------
  415|  13.3k|  }
_ZN4absl12lts_2026052617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEEC2INS0_6StatusETnNSt3__19enable_ifIXsr3std16is_constructibleIS8_OT_EE5valueEiE4typeELi0EEESC_:
  336|  3.25k|  explicit StatusOrData(U&& v) : status_(std::forward<U>(v)) {
  337|  3.25k|    EnsureNotOk();
  338|  3.25k|  }
_ZN4absl12lts_2026052617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE11EnsureNotOkEv:
  417|  3.25k|  void EnsureNotOk() {
  418|  3.25k|    if (ABSL_PREDICT_FALSE(ok())) Helper::HandleInvalidStatusCtorArg(&status_);
  ------------------
  |  |  190|  3.25k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 3.25k]
  |  |  |  Branch (190:49): [Folded, False: 3.25k]
  |  |  |  Branch (190:58): [True: 0, False: 3.25k]
  |  |  ------------------
  ------------------
  419|  3.25k|  }
_ZN4absl12lts_2026052617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEEC2IJRS5_EEENSt3__110in_place_tEDpOT_:
  329|  13.3k|      : data_(std::forward<Args>(args)...) {
  330|  13.3k|    MakeStatus();
  331|  13.3k|  }
_ZN4absl12lts_2026052617internal_statusor12StatusOrDataIN8fuzztest8internal11CopyableAnyEE10MakeStatusIJEEEvDpOT_:
  432|  13.3k|  void MakeStatus(Args&&... args) {
  433|  13.3k|    internal_statusor::PlacementNew<Status>(&status_,
  434|  13.3k|                                            std::forward<Args>(args)...);
  435|  13.3k|  }

_ZN4absl12lts_2026052615status_internal13MakeErrorImplILi3EEENS0_6StatusENSt3__117basic_string_viewIcNS4_11char_traitsIcEEEENS0_14SourceLocationE:
  164|  3.25k|Status MakeErrorImpl(string_view message, SourceLocation loc) {
  165|  3.25k|  return Status(static_cast<StatusCode>(error_code), message, loc);
  166|  3.25k|}
_ZN4absl12lts_202605266Status7MakeRepEmNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEENS0_14SourceLocationE:
  116|  3.29k|                          absl::SourceLocation loc) {
  117|  3.29k|  bool ok = inlined_rep == CodeToInlinedRep(absl::StatusCode::kOk);
  118|  3.29k|  if (ok) return inlined_rep;
  ------------------
  |  Branch (118:7): [True: 0, False: 3.29k]
  ------------------
  119|  3.29k|  if (msg.empty()
  ------------------
  |  Branch (119:7): [True: 0, False: 3.29k]
  ------------------
  120|  3.29k|  ) {
  121|      0|    return inlined_rep;
  122|      0|  }
  123|  3.29k|  auto* rep = new status_internal::StatusRep(InlinedRepToCode(inlined_rep), msg,
  124|  3.29k|                                             nullptr);
  125|  3.29k|  if (loc.file_name()[0] != '\0') {
  ------------------
  |  Branch (125:7): [True: 3.29k, False: 0]
  ------------------
  126|  3.29k|    rep->AddSourceLocation(loc);
  127|  3.29k|  }
  128|  3.29k|  return PointerToRep(rep);
  129|  3.29k|}

_ZN4absl12lts_202605266StatusC2Em:
  714|  19.7M|  explicit Status(uintptr_t rep) : rep_(rep) {}
_ZN4absl12lts_202605266StatusaSEOS1_:
  918|  66.7k|inline Status& Status::operator=(Status&& x) noexcept {
  919|  66.7k|  uintptr_t old_rep = rep_;
  920|  66.7k|  if (x.rep_ != old_rep) {
  ------------------
  |  Branch (920:7): [True: 21, False: 66.7k]
  ------------------
  921|     21|    rep_ = x.rep_;
  922|     21|    x.rep_ = MovedFromRep();
  923|     21|    Unref(old_rep);
  924|     21|  }
  925|  66.7k|  return *this;
  926|  66.7k|}
_ZNK4absl12lts_202605266Status2okEv:
  942|  19.8M|inline bool Status::ok() const {
  943|  19.8M|  return rep_ == CodeToInlinedRep(absl::StatusCode::kOk);
  944|  19.8M|}
_ZNK4absl12lts_202605266Status4codeEv:
  946|     42|inline absl::StatusCode Status::code() const {
  947|     42|  return status_internal::MapToLocalCode(raw_code());
  948|     42|}
_ZNK4absl12lts_202605266Status8raw_codeEv:
  950|     42|inline int Status::raw_code() const {
  951|     42|  if (IsInlined(rep_)) return static_cast<int>(InlinedRepToCode(rep_));
  ------------------
  |  Branch (951:7): [True: 0, False: 42]
  ------------------
  952|     42|  return static_cast<int>(RepToPointer(rep_)->code());
  953|     42|}
_ZNK4absl12lts_202605266Status7messageEv:
  955|     42|inline absl::string_view Status::message() const {
  956|     42|  return !IsInlined(rep_)
  ------------------
  |  Branch (956:10): [True: 42, False: 0]
  ------------------
  957|     42|             ? RepToPointer(rep_)->message()
  958|     42|             : (IsMovedFrom(rep_) ? absl::string_view(kMovedFromString)
  ------------------
  |  Branch (958:17): [True: 0, False: 0]
  ------------------
  959|      0|                                  : absl::string_view());
  960|     42|}
_ZNK4absl12lts_202605266Status14ForEachPayloadENS0_11FunctionRefIFvNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEERKNS0_4CordEEEE:
 1009|     42|    const {
 1010|     42|  if (IsInlined(rep_)) return;
  ------------------
  |  Branch (1010:7): [True: 0, False: 42]
  ------------------
 1011|     42|  RepToPointer(rep_)->ForEachPayload(visitor);
 1012|     42|}
_ZN4absl12lts_202605266Status9IsInlinedEm:
 1014|  19.8M|constexpr bool Status::IsInlined(uintptr_t rep) { return (rep & 1) != 0; }
_ZN4absl12lts_202605266Status16CodeToInlinedRepENS0_10StatusCodeE:
 1018|  39.5M|constexpr uintptr_t Status::CodeToInlinedRep(absl::StatusCode code) {
 1019|  39.5M|  return (static_cast<uintptr_t>(code) << 2) + 1;
 1020|  39.5M|}
_ZN4absl12lts_202605266Status16InlinedRepToCodeEm:
 1022|  3.29k|constexpr absl::StatusCode Status::InlinedRepToCode(uintptr_t rep) {
 1023|  3.29k|  ABSL_ASSERT(IsInlined(rep));
  ------------------
  |  |  127|  3.29k|#define ABSL_ASSERT(expr) ABSL_INTERNAL_UNEVALUATED((expr) ? void() : void())
  |  |  ------------------
  |  |  |  |   87|  3.29k|#define ABSL_INTERNAL_UNEVALUATED(expr) (false ? (void)(expr) : void())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (87:42): [Folded, False: 3.29k]
  |  |  |  |  |  Branch (87:57): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1024|  3.29k|  return static_cast<absl::StatusCode>(rep >> 2);
 1025|  3.29k|}
_ZN4absl12lts_202605266Status12MovedFromRepEv:
 1027|  3.27k|constexpr uintptr_t Status::MovedFromRep() {
 1028|  3.27k|  return CodeToInlinedRep(absl::StatusCode::kInternal) | 2;
 1029|  3.27k|}
_ZN4absl12lts_202605266Status12RepToPointerEm:
 1032|  3.41k|    uintptr_t rep) {
 1033|       |  assert(!IsInlined(rep));
 1034|  3.41k|  return reinterpret_cast<const status_internal::StatusRep*>(rep);
 1035|  3.41k|}
_ZN4absl12lts_202605266Status12PointerToRepEPNS0_15status_internal9StatusRepE:
 1038|  3.29k|    status_internal::StatusRep* absl_nonnull rep) {
 1039|  3.29k|  return reinterpret_cast<uintptr_t>(rep);
 1040|  3.29k|}
_ZN4absl12lts_202605266Status3RefEm:
 1042|  66.7k|inline void Status::Ref(uintptr_t rep) {
 1043|  66.7k|  if (!IsInlined(rep)) RepToPointer(rep)->Ref();
  ------------------
  |  Branch (1043:7): [True: 0, False: 66.7k]
  ------------------
 1044|  66.7k|}
_ZN4absl12lts_202605266Status5UnrefEm:
 1046|  19.7M|inline void Status::Unref(uintptr_t rep) {
 1047|  19.7M|  if (!IsInlined(rep)) RepToPointer(rep)->Unref();
  ------------------
  |  Branch (1047:7): [True: 3.29k, False: 19.7M]
  ------------------
 1048|  19.7M|}
_ZN4absl12lts_202605268OkStatusEv:
 1050|  19.6M|inline Status OkStatus() { return Status(); }
_ZN4absl12lts_2026052620InvalidArgumentErrorENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEENS0_14SourceLocationE:
 1133|  3.25k|                                   absl::SourceLocation loc) {
 1134|  3.25k|  return status_internal::MakeError<StatusCode::kInvalidArgument>(message, loc);
 1135|  3.25k|}
_ZN4absl12lts_2026052615status_internal9MakeErrorILNS0_10StatusCodeE3EEENS0_6StatusENSt3__117basic_string_viewIcNS5_11char_traitsIcEEEENS0_14SourceLocationE:
 1090|  3.25k|Status MakeError(string_view message, SourceLocation loc) {
 1091|  3.25k|  Status out = MakeErrorImpl<static_cast<int>(error_code)>(message, loc);
 1092|       |  // -Wassume warning complains about potential side effects of `ok()`, so use a
 1093|       |  // local to avoid that.
 1094|  3.25k|  ABSL_ATTRIBUTE_UNUSED bool ok = out.ok();
  ------------------
  |  |  582|  3.25k|#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__))
  ------------------
 1095|  3.25k|  ABSL_ASSUME(!ok);
  ------------------
  |  |  271|  3.25k|#define ABSL_ASSUME(cond) __builtin_assume(cond)
  ------------------
 1096|  3.25k|  return out;
 1097|  3.25k|}
_ZN4absl12lts_202605266StatusD2Ev:
  940|  19.7M|inline Status::~Status() { Unref(rep_); }
_ZN4absl12lts_202605266StatusC2Ev:
  894|  19.6M|inline Status::Status() : Status(absl::StatusCode::kOk) {}
_ZN4absl12lts_202605266StatusC2ENS0_10StatusCodeE:
  896|  19.6M|inline Status::Status(absl::StatusCode code) : Status(CodeToInlinedRep(code)) {}
_ZN4absl12lts_202605266StatusC2EOS1_:
  914|  3.25k|inline Status::Status(Status&& x) noexcept : Status(x.rep_) {
  915|  3.25k|  x.rep_ = MovedFromRep();
  916|  3.25k|}
_ZN4absl12lts_202605266StatusC2ENS0_10StatusCodeENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEENS0_14SourceLocationE:
  900|  3.29k|    : Status(MakeRep(CodeToInlinedRep(code), msg, loc)) {}
_ZN4absl12lts_202605266StatusC2ERKS1_:
  902|  66.7k|inline Status::Status(const Status& x) : Status(x.rep_) { Ref(rep_); }

_ZNK4absl12lts_202605268StatusOrIN8fuzztest8internal11CopyableAnyEE2okEv:
  471|  16.5k|  ABSL_MUST_USE_RESULT bool ok() const { return this->status_.ok(); }
_ZN4absl12lts_202605268StatusOrIN8fuzztest8internal11CopyableAnyEEC2INS0_6StatusETnNSt3__19enable_ifIXsr17internal_statusor29IsConstructionFromStatusValidILb0ES4_T_EE5valueEiE4typeELi0EEEOSA_:
  367|  3.25k|  StatusOr(U&& v) : Base(std::forward<U>(v)) {}
_ZN4absl12lts_202605268StatusOrIN8fuzztest8internal11CopyableAnyEEC2IRS4_TnNSt3__19enable_ifIXsr17internal_statusor19IsConstructionValidILb0ES4_T_Lb0EEE5valueEiE4typeELi0EEEOSA_:
  436|  13.3k|      : StatusOr(std::in_place, std::forward<U>(u)) {}
_ZN4absl12lts_202605268StatusOrIN8fuzztest8internal11CopyableAnyEEC2IJRS4_EEENSt3__110in_place_tEDpOT_:
  751|  13.3k|    : Base(std::in_place, std::forward<Args>(args)...) {}

_ZN4absl12lts_2026052613ascii_isspaceEh:
  105|  54.3k|inline bool ascii_isspace(unsigned char c) {
  106|  54.3k|  return (ascii_internal::kPropertyBits[c] & 0x08) != 0;
  107|  54.3k|}
_ZN4absl12lts_2026052627StripLeadingAsciiWhitespaceENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  244|  25.9k|    absl::string_view str ABSL_ATTRIBUTE_LIFETIME_BOUND) {
  245|  25.9k|  auto it = std::find_if_not(str.begin(), str.end(), absl::ascii_isspace);
  246|  25.9k|  return str.substr(static_cast<size_t>(it - str.begin()));
  247|  25.9k|}
_ZN4absl12lts_2026052628StripTrailingAsciiWhitespaceENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  258|  25.9k|    absl::string_view str ABSL_ATTRIBUTE_LIFETIME_BOUND) {
  259|  25.9k|  auto it = std::find_if_not(str.rbegin(), str.rend(), absl::ascii_isspace);
  260|  25.9k|  return str.substr(0, static_cast<size_t>(str.rend() - it));
  261|  25.9k|}
_ZN4absl12lts_2026052620StripAsciiWhitespaceENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  272|  25.9k|    absl::string_view str ABSL_ATTRIBUTE_LIFETIME_BOUND) {
  273|  25.9k|  return StripTrailingAsciiWhitespace(StripLeadingAsciiWhitespace(str));
  274|  25.9k|}

_ZN4absl12lts_2026052610from_charsEPKcS2_RdNS0_12chars_formatE:
  949|  25.9k|                             chars_format fmt) {
  950|  25.9k|  return FromCharsImpl(first, last, value, fmt);
  951|  25.9k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_113FromCharsImplIdEENS0_17from_chars_resultEPKcS5_RT_NS0_12chars_formatE:
  862|  25.9k|                                chars_format fmt_flags) {
  863|  25.9k|  from_chars_result result;
  864|  25.9k|  result.ptr = first;  // overwritten on successful parse
  865|  25.9k|  result.ec = std::errc();
  866|       |
  867|  25.9k|  bool negative = false;
  868|  25.9k|  if (first != last && *first == '-') {
  ------------------
  |  Branch (868:7): [True: 25.9k, False: 0]
  |  Branch (868:24): [True: 2.61k, False: 23.3k]
  ------------------
  869|  2.61k|    ++first;
  870|  2.61k|    negative = true;
  871|  2.61k|  }
  872|       |  // If the `hex` flag is *not* set, then we will accept a 0x prefix and try
  873|       |  // to parse a hexadecimal float.
  874|  25.9k|  if ((fmt_flags & chars_format::hex) == chars_format{} && last - first >= 2 &&
  ------------------
  |  Branch (874:7): [True: 25.9k, False: 0]
  |  Branch (874:60): [True: 24.3k, False: 1.57k]
  ------------------
  875|  24.3k|      *first == '0' && (first[1] == 'x' || first[1] == 'X')) {
  ------------------
  |  Branch (875:7): [True: 5.97k, False: 18.3k]
  |  Branch (875:25): [True: 2.08k, False: 3.89k]
  |  Branch (875:44): [True: 2.91k, False: 977]
  ------------------
  876|  5.00k|    const char* hex_first = first + 2;
  877|  5.00k|    strings_internal::ParsedFloat hex_parse =
  878|  5.00k|        strings_internal::ParseFloat<16>(hex_first, last, fmt_flags);
  879|  5.00k|    if (hex_parse.end == nullptr ||
  ------------------
  |  Branch (879:9): [True: 23, False: 4.97k]
  ------------------
  880|  4.97k|        hex_parse.type != strings_internal::FloatType::kNumber) {
  ------------------
  |  Branch (880:9): [True: 1, False: 4.97k]
  ------------------
  881|       |      // Either we failed to parse a hex float after the "0x", or we read
  882|       |      // "0xinf" or "0xnan" which we don't want to match.
  883|       |      //
  884|       |      // However, a string that begins with "0x" also begins with "0", which
  885|       |      // is normally a valid match for the number zero.  So we want these
  886|       |      // strings to match zero unless fmt_flags is `scientific`.  (This flag
  887|       |      // means an exponent is required, which the string "0" does not have.)
  888|     24|      if (fmt_flags == chars_format::scientific) {
  ------------------
  |  Branch (888:11): [True: 0, False: 24]
  ------------------
  889|      0|        result.ec = std::errc::invalid_argument;
  890|     24|      } else {
  891|     24|        result.ptr = first + 1;
  892|     24|        value = negative ? -0.0f : 0.0f;
  ------------------
  |  Branch (892:17): [True: 4, False: 20]
  ------------------
  893|     24|      }
  894|     24|      return result;
  895|     24|    }
  896|       |    // We matched a value.
  897|  4.97k|    result.ptr = hex_parse.end;
  898|  4.97k|    if (HandleEdgeCase(hex_parse, negative, &value)) {
  ------------------
  |  Branch (898:9): [True: 948, False: 4.02k]
  ------------------
  899|    948|      return result;
  900|    948|    }
  901|  4.02k|    CalculatedFloat calculated =
  902|  4.02k|        CalculateFromParsedHexadecimal<FloatType>(hex_parse);
  903|  4.02k|    EncodeResult(calculated, negative, &result, &value);
  904|  4.02k|    return result;
  905|  4.97k|  }
  906|       |  // Otherwise, we choose the number base based on the flags.
  907|  20.9k|  if ((fmt_flags & chars_format::hex) == chars_format::hex) {
  ------------------
  |  Branch (907:7): [True: 0, False: 20.9k]
  ------------------
  908|      0|    strings_internal::ParsedFloat hex_parse =
  909|      0|        strings_internal::ParseFloat<16>(first, last, fmt_flags);
  910|      0|    if (hex_parse.end == nullptr) {
  ------------------
  |  Branch (910:9): [True: 0, False: 0]
  ------------------
  911|      0|      result.ec = std::errc::invalid_argument;
  912|      0|      return result;
  913|      0|    }
  914|      0|    result.ptr = hex_parse.end;
  915|      0|    if (HandleEdgeCase(hex_parse, negative, &value)) {
  ------------------
  |  Branch (915:9): [True: 0, False: 0]
  ------------------
  916|      0|      return result;
  917|      0|    }
  918|      0|    CalculatedFloat calculated =
  919|      0|        CalculateFromParsedHexadecimal<FloatType>(hex_parse);
  920|      0|    EncodeResult(calculated, negative, &result, &value);
  921|      0|    return result;
  922|  20.9k|  } else {
  923|  20.9k|    strings_internal::ParsedFloat decimal_parse =
  924|  20.9k|        strings_internal::ParseFloat<10>(first, last, fmt_flags);
  925|  20.9k|    if (decimal_parse.end == nullptr) {
  ------------------
  |  Branch (925:9): [True: 97, False: 20.8k]
  ------------------
  926|     97|      result.ec = std::errc::invalid_argument;
  927|     97|      return result;
  928|     97|    }
  929|  20.8k|    result.ptr = decimal_parse.end;
  930|  20.8k|    if (HandleEdgeCase(decimal_parse, negative, &value)) {
  ------------------
  |  Branch (930:9): [True: 3.24k, False: 17.5k]
  ------------------
  931|  3.24k|      return result;
  932|  3.24k|    }
  933|       |    // A nullptr subrange_begin means that the decimal_parse.mantissa is exact
  934|       |    // (not truncated), a precondition of the Eisel-Lemire algorithm.
  935|  17.5k|    if ((decimal_parse.subrange_begin == nullptr) &&
  ------------------
  |  Branch (935:9): [True: 8.54k, False: 9.05k]
  ------------------
  936|  8.54k|        EiselLemire<FloatType>(decimal_parse, negative, &value, &result.ec)) {
  ------------------
  |  Branch (936:9): [True: 4.14k, False: 4.40k]
  ------------------
  937|  4.14k|      return result;
  938|  4.14k|    }
  939|  13.4k|    CalculatedFloat calculated =
  940|  13.4k|        CalculateFromParsedDecimal<FloatType>(decimal_parse);
  941|  13.4k|    EncodeResult(calculated, negative, &result, &value);
  942|  13.4k|    return result;
  943|  17.5k|  }
  944|  20.9k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_114HandleEdgeCaseIdEEbRKNS0_16strings_internal11ParsedFloatEbPT_:
  360|  25.8k|                    FloatType* absl_nonnull value) {
  361|  25.8k|  if (input.type == strings_internal::FloatType::kNan) {
  ------------------
  |  Branch (361:7): [True: 707, False: 25.1k]
  ------------------
  362|       |    // A bug in gcc would cause the compiler to optimize away the buffer we are
  363|       |    // building below.  Declaring the buffer volatile avoids the issue, and has
  364|       |    // no measurable performance impact in microbenchmarks.
  365|       |    //
  366|       |    // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86113
  367|    707|    constexpr ptrdiff_t kNanBufferSize = 128;
  368|       |#if (defined(__GNUC__) && !defined(__clang__))
  369|       |    volatile char n_char_sequence[kNanBufferSize];
  370|       |#else
  371|    707|    char n_char_sequence[kNanBufferSize];
  372|    707|#endif
  373|    707|    if (input.subrange_begin == nullptr) {
  ------------------
  |  Branch (373:9): [True: 707, False: 0]
  ------------------
  374|    707|      n_char_sequence[0] = '\0';
  375|    707|    } else {
  376|      0|      ptrdiff_t nan_size = input.subrange_end - input.subrange_begin;
  377|      0|      nan_size = std::min(nan_size, kNanBufferSize - 1);
  378|      0|      std::copy_n(input.subrange_begin, nan_size, n_char_sequence);
  379|      0|      n_char_sequence[nan_size] = '\0';
  380|      0|    }
  381|    707|    char* nan_argument = const_cast<char*>(n_char_sequence);
  382|    707|    *value = negative ? -FloatTraits<FloatType>::MakeNan(nan_argument)
  ------------------
  |  Branch (382:14): [True: 195, False: 512]
  ------------------
  383|    707|                      : FloatTraits<FloatType>::MakeNan(nan_argument);
  384|    707|    return true;
  385|    707|  }
  386|  25.1k|  if (input.type == strings_internal::FloatType::kInfinity) {
  ------------------
  |  Branch (386:7): [True: 703, False: 24.4k]
  ------------------
  387|    703|    *value = negative ? -std::numeric_limits<FloatType>::infinity()
  ------------------
  |  Branch (387:14): [True: 0, False: 703]
  ------------------
  388|    703|                      : std::numeric_limits<FloatType>::infinity();
  389|    703|    return true;
  390|    703|  }
  391|  24.4k|  if (input.mantissa == 0) {
  ------------------
  |  Branch (391:7): [True: 2.78k, False: 21.6k]
  ------------------
  392|  2.78k|    *value = negative ? -0.0f : 0.0f;
  ------------------
  |  Branch (392:14): [True: 405, False: 2.37k]
  ------------------
  393|  2.78k|    return true;
  394|  2.78k|  }
  395|  21.6k|  return false;
  396|  24.4k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_111FloatTraitsIdE7MakeNanEPKc:
  123|    707|  static double MakeNan(const char* absl_nonnull tagp) {
  124|    707|#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|    707|    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|    707|  }
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_130CalculateFromParsedHexadecimalIdEENS1_15CalculatedFloatERKNS0_16strings_internal11ParsedFloatE:
  599|  4.02k|    const strings_internal::ParsedFloat& parsed_hex) {
  600|  4.02k|  uint64_t mantissa = parsed_hex.mantissa;
  601|  4.02k|  int exponent = parsed_hex.exponent;
  602|       |  // This static_cast is only needed when using a std::bit_width()
  603|       |  // implementation that does not have the fix for LWG 3656 applied.
  604|  4.02k|  int mantissa_width = static_cast<int>(bit_width(mantissa));
  605|  4.02k|  const int shift = NormalizedShiftSize<FloatType>(mantissa_width, exponent);
  606|  4.02k|  bool result_exact;
  607|  4.02k|  exponent += shift;
  608|  4.02k|  mantissa = ShiftRightAndRound(mantissa, shift,
  609|  4.02k|                                /* input exact= */ true, &result_exact);
  610|       |  // ParseFloat handles rounding in the hexadecimal case, so we don't have to
  611|       |  // check `result_exact` here.
  612|  4.02k|  return CalculatedFloatFromRawValues<FloatType>(mantissa, exponent);
  613|  4.02k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_119NormalizedShiftSizeIdEEiii:
  335|  17.0k|int NormalizedShiftSize(int mantissa_width, int binary_exponent) {
  336|  17.0k|  const int normal_shift =
  337|  17.0k|      mantissa_width - FloatTraits<FloatType>::kTargetMantissaBits;
  338|  17.0k|  const int minimum_shift =
  339|  17.0k|      FloatTraits<FloatType>::kMinNormalExponent - binary_exponent;
  340|  17.0k|  return std::max(normal_shift, minimum_shift);
  341|  17.0k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_118ShiftRightAndRoundENS0_7uint128EibPb:
  453|  17.0k|                            bool* absl_nonnull output_exact) {
  454|  17.0k|  if (shift <= 0) {
  ------------------
  |  Branch (454:7): [True: 2.07k, False: 14.9k]
  ------------------
  455|  2.07k|    *output_exact = input_exact;
  456|  2.07k|    return static_cast<uint64_t>(value << -shift);
  457|  2.07k|  }
  458|  14.9k|  if (shift >= 128) {
  ------------------
  |  Branch (458:7): [True: 385, False: 14.5k]
  ------------------
  459|       |    // Exponent is so small that we are shifting away all significant bits.
  460|       |    // Answer will not be representable, even as a subnormal, so return a zero
  461|       |    // mantissa (which represents underflow).
  462|    385|    *output_exact = true;
  463|    385|    return 0;
  464|    385|  }
  465|       |
  466|  14.5k|  *output_exact = true;
  467|  14.5k|  const uint128 shift_mask = (uint128(1) << shift) - 1;
  468|  14.5k|  const uint128 halfway_point = uint128(1) << (shift - 1);
  469|       |
  470|  14.5k|  const uint128 shifted_bits = value & shift_mask;
  471|  14.5k|  value >>= shift;
  472|  14.5k|  if (shifted_bits > halfway_point) {
  ------------------
  |  Branch (472:7): [True: 2.27k, False: 12.3k]
  ------------------
  473|       |    // Shifted bits greater than 10000... require rounding up.
  474|  2.27k|    return static_cast<uint64_t>(value + 1);
  475|  2.27k|  }
  476|  12.3k|  if (shifted_bits == halfway_point) {
  ------------------
  |  Branch (476:7): [True: 1.61k, False: 10.6k]
  ------------------
  477|       |    // In exact mode, shifted bits of 10000... mean we're exactly halfway
  478|       |    // between two numbers, and we must round to even.  So only round up if
  479|       |    // the low bit of `value` is set.
  480|       |    //
  481|       |    // In inexact mode, the nonzero error means the actual value is greater
  482|       |    // than the halfway point and we must always round up.
  483|  1.61k|    if ((value & 1) == 1 || !input_exact) {
  ------------------
  |  Branch (483:9): [True: 403, False: 1.21k]
  |  Branch (483:29): [True: 214, False: 1.00k]
  ------------------
  484|    617|      ++value;
  485|    617|    }
  486|  1.61k|    return static_cast<uint64_t>(value);
  487|  1.61k|  }
  488|  10.6k|  if (!input_exact && shifted_bits == halfway_point - 1) {
  ------------------
  |  Branch (488:7): [True: 10.0k, False: 616]
  |  Branch (488:23): [True: 9.20k, False: 873]
  ------------------
  489|       |    // Rounding direction is unclear, due to error.
  490|  9.20k|    *output_exact = false;
  491|  9.20k|  }
  492|       |  // Otherwise, round down.
  493|  10.6k|  return static_cast<uint64_t>(value);
  494|  12.3k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_128CalculatedFloatFromRawValuesIdEENS1_15CalculatedFloatEmi:
  580|  17.0k|CalculatedFloat CalculatedFloatFromRawValues(uint64_t mantissa, int exponent) {
  581|  17.0k|  CalculatedFloat result;
  582|  17.0k|  if (mantissa == uint64_t{1} << FloatTraits<FloatType>::kTargetMantissaBits) {
  ------------------
  |  Branch (582:7): [True: 850, False: 16.1k]
  ------------------
  583|    850|    mantissa >>= 1;
  584|    850|    exponent += 1;
  585|    850|  }
  586|  17.0k|  if (exponent > FloatTraits<FloatType>::kMaxExponent) {
  ------------------
  |  Branch (586:7): [True: 1.59k, False: 15.4k]
  ------------------
  587|  1.59k|    result.exponent = kOverflow;
  588|  15.4k|  } else if (mantissa == 0) {
  ------------------
  |  Branch (588:14): [True: 966, False: 14.4k]
  ------------------
  589|    966|    result.exponent = kUnderflow;
  590|  14.4k|  } else {
  591|  14.4k|    result.exponent = exponent;
  592|  14.4k|    result.mantissa = mantissa;
  593|  14.4k|  }
  594|  17.0k|  return result;
  595|  17.0k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_112EncodeResultIdEEvRKNS1_15CalculatedFloatEbPNS0_17from_chars_resultEPT_:
  407|  17.4k|                  FloatType* absl_nonnull value) {
  408|  17.4k|  if (calculated.exponent == kOverflow) {
  ------------------
  |  Branch (408:7): [True: 1.81k, False: 15.6k]
  ------------------
  409|  1.81k|    result->ec = std::errc::result_out_of_range;
  410|  1.81k|    *value = negative ? -std::numeric_limits<FloatType>::max()
  ------------------
  |  Branch (410:14): [True: 151, False: 1.66k]
  ------------------
  411|  1.81k|                      : std::numeric_limits<FloatType>::max();
  412|  1.81k|    return;
  413|  15.6k|  } else if (calculated.mantissa == 0 || calculated.exponent == kUnderflow) {
  ------------------
  |  Branch (413:14): [True: 1.19k, False: 14.4k]
  |  Branch (413:42): [True: 0, False: 14.4k]
  ------------------
  414|  1.19k|    result->ec = std::errc::result_out_of_range;
  415|  1.19k|    *value = negative ? -0.0f : 0.0f;
  ------------------
  |  Branch (415:14): [True: 130, False: 1.06k]
  ------------------
  416|  1.19k|    return;
  417|  1.19k|  }
  418|  14.4k|  *value = FloatTraits<FloatType>::Make(
  419|  14.4k|      static_cast<typename FloatTraits<FloatType>::mantissa_t>(
  420|  14.4k|          calculated.mantissa),
  421|  14.4k|      calculated.exponent, negative);
  422|  14.4k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_111FloatTraitsIdE4MakeEmib:
  150|  14.4k|  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.4k|    constexpr uint64_t kMantissaMask =
  158|  14.4k|        (uint64_t{1} << (kTargetMantissaBits - 1)) - 1;
  159|  14.4k|    uint64_t dbl = static_cast<uint64_t>(sign) << 63;
  160|  14.4k|    if (mantissa > kMantissaMask) {
  ------------------
  |  Branch (160:9): [True: 13.1k, False: 1.32k]
  ------------------
  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|  13.1k|      dbl += static_cast<uint64_t>(exponent + 1023 + kTargetMantissaBits - 1)
  166|  13.1k|             << 52;
  167|  13.1k|      mantissa &= kMantissaMask;
  168|  13.1k|    } else {
  169|       |      // subnormal value
  170|       |      assert(exponent == kMinNormalExponent);
  171|  1.32k|    }
  172|  14.4k|    dbl += mantissa;
  173|  14.4k|    return absl::bit_cast<double>(dbl);
  174|  14.4k|#endif  // ABSL_BIT_PACK_FLOATS
  175|  14.4k|  }
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_111EiselLemireIdEEbRKNS0_16strings_internal11ParsedFloatEbPT_PNSt3__14errcE:
  687|  8.54k|                 FloatType* absl_nonnull value, std::errc* absl_nonnull ec) {
  688|  8.54k|  uint64_t man = input.mantissa;
  689|  8.54k|  int exp10 = input.exponent;
  690|  8.54k|  if (exp10 < FloatTraits<FloatType>::kEiselLemireMinInclusiveExp10) {
  ------------------
  |  Branch (690:7): [True: 405, False: 8.13k]
  ------------------
  691|    405|    *value = negative ? -0.0f : 0.0f;
  ------------------
  |  Branch (691:14): [True: 11, False: 394]
  ------------------
  692|    405|    *ec = std::errc::result_out_of_range;
  693|    405|    return true;
  694|  8.13k|  } else if (exp10 >= FloatTraits<FloatType>::kEiselLemireMaxExclusiveExp10) {
  ------------------
  |  Branch (694:14): [True: 429, False: 7.70k]
  ------------------
  695|       |    // Return max (a finite value) consistent with from_chars and DR 3081. For
  696|       |    // SimpleAtod and SimpleAtof, post-processing will return infinity.
  697|    429|    *value = negative ? -std::numeric_limits<FloatType>::max()
  ------------------
  |  Branch (697:14): [True: 85, False: 344]
  ------------------
  698|    429|                      : std::numeric_limits<FloatType>::max();
  699|    429|    *ec = std::errc::result_out_of_range;
  700|    429|    return true;
  701|    429|  }
  702|       |
  703|       |  // Assert kPower10TableMinInclusive <= exp10 < kPower10TableMaxExclusive.
  704|       |  // Equivalently, !Power10Underflow(exp10) and !Power10Overflow(exp10).
  705|  7.70k|  static_assert(
  706|  7.70k|      FloatTraits<FloatType>::kEiselLemireMinInclusiveExp10 >=
  707|  7.70k|          kPower10TableMinInclusive,
  708|  7.70k|      "(exp10-kPower10TableMinInclusive) in kPower10MantissaHighTable bounds");
  709|  7.70k|  static_assert(
  710|  7.70k|      FloatTraits<FloatType>::kEiselLemireMaxExclusiveExp10 <=
  711|  7.70k|          kPower10TableMaxExclusive,
  712|  7.70k|      "(exp10-kPower10TableMinInclusive) in kPower10MantissaHighTable bounds");
  713|       |
  714|       |  // The terse (+) comments in this function body refer to sections of the
  715|       |  // https://nigeltao.github.io/blog/2020/eisel-lemire.html blog post.
  716|       |  //
  717|       |  // That blog post discusses double precision (11 exponent bits with a -1023
  718|       |  // bias, 52 mantissa bits), but the same approach applies to single precision
  719|       |  // (8 exponent bits with a -127 bias, 23 mantissa bits). Either way, the
  720|       |  // computation here happens with 64-bit values (e.g. man) or 128-bit values
  721|       |  // (e.g. x) before finally converting to 64- or 32-bit floating point.
  722|       |  //
  723|       |  // See also "Number Parsing at a Gigabyte per Second, Software: Practice and
  724|       |  // Experience 51 (8), 2021" (https://arxiv.org/abs/2101.11408) for detail.
  725|       |
  726|       |  // (+) Normalization.
  727|  7.70k|  int clz = countl_zero(man);
  728|  7.70k|  man <<= static_cast<unsigned int>(clz);
  729|       |  // The 217706 etc magic numbers are from the Power10Exponent function.
  730|  7.70k|  uint64_t ret_exp2 =
  731|  7.70k|      static_cast<uint64_t>((217706 * exp10 >> 16) + 64 +
  732|  7.70k|                            FloatTraits<FloatType>::kExponentBias - clz);
  733|       |
  734|       |  // (+) Multiplication.
  735|  7.70k|  uint128 x = static_cast<uint128>(man) *
  736|  7.70k|              static_cast<uint128>(
  737|  7.70k|                  kPower10MantissaHighTable[exp10 - kPower10TableMinInclusive]);
  738|       |
  739|       |  // (+) Wider Approximation.
  740|  7.70k|  static constexpr uint64_t high64_mask =
  741|  7.70k|      FloatTraits<FloatType>::kEiselLemireMask;
  742|  7.70k|  if (((Uint128High64(x) & high64_mask) == high64_mask) &&
  ------------------
  |  Branch (742:7): [True: 2.39k, False: 5.31k]
  ------------------
  743|  2.39k|      (man > (std::numeric_limits<uint64_t>::max() - Uint128Low64(x)))) {
  ------------------
  |  Branch (743:7): [True: 1.85k, False: 538]
  ------------------
  744|  1.85k|    uint128 y =
  745|  1.85k|        static_cast<uint128>(man) *
  746|  1.85k|        static_cast<uint128>(
  747|  1.85k|            kPower10MantissaLowTable[exp10 - kPower10TableMinInclusive]);
  748|  1.85k|    x += Uint128High64(y);
  749|       |    // For example, parsing "4503599627370497.5" will take the if-true
  750|       |    // branch here (for double precision), since:
  751|       |    //  - x   = 0x8000000000000BFF_FFFFFFFFFFFFFFFF
  752|       |    //  - y   = 0x8000000000000BFF_7FFFFFFFFFFFF400
  753|       |    //  - man = 0xA000000000000F00
  754|       |    // Likewise, when parsing "0.0625" for single precision:
  755|       |    //  - x   = 0x7FFFFFFFFFFFFFFF_FFFFFFFFFFFFFFFF
  756|       |    //  - y   = 0x813FFFFFFFFFFFFF_8A00000000000000
  757|       |    //  - man = 0x9C40000000000000
  758|  1.85k|    if (((Uint128High64(x) & high64_mask) == high64_mask) &&
  ------------------
  |  Branch (758:9): [True: 1.59k, False: 257]
  ------------------
  759|  1.59k|        ((Uint128Low64(x) + 1) == 0) &&
  ------------------
  |  Branch (759:9): [True: 1.29k, False: 305]
  ------------------
  760|  1.29k|        (man > (std::numeric_limits<uint64_t>::max() - Uint128Low64(y)))) {
  ------------------
  |  Branch (760:9): [True: 1.29k, False: 0]
  ------------------
  761|  1.29k|      return false;
  762|  1.29k|    }
  763|  1.85k|  }
  764|       |
  765|       |  // (+) Shifting to 54 Bits (or for single precision, to 25 bits).
  766|  6.41k|  uint64_t msb = Uint128High64(x) >> 63;
  767|  6.41k|  uint64_t ret_man =
  768|  6.41k|      Uint128High64(x) >> (msb + FloatTraits<FloatType>::kEiselLemireShift);
  769|  6.41k|  ret_exp2 -= 1 ^ msb;
  770|       |
  771|       |  // (+) Half-way Ambiguity.
  772|       |  //
  773|       |  // For example, parsing "1e+23" will take the if-true branch here (for double
  774|       |  // precision), since:
  775|       |  //  - x       = 0x54B40B1F852BDA00_0000000000000000
  776|       |  //  - ret_man = 0x002A5A058FC295ED
  777|       |  // Likewise, when parsing "20040229.0" for single precision:
  778|       |  //  - x       = 0x4C72894000000000_0000000000000000
  779|       |  //  - ret_man = 0x000000000131CA25
  780|  6.41k|  if ((Uint128Low64(x) == 0) && ((Uint128High64(x) & high64_mask) == 0) &&
  ------------------
  |  Branch (780:7): [True: 3.46k, False: 2.95k]
  |  Branch (780:33): [True: 2.41k, False: 1.04k]
  ------------------
  781|  2.41k|      ((ret_man & 3) == 1)) {
  ------------------
  |  Branch (781:7): [True: 716, False: 1.69k]
  ------------------
  782|    716|    return false;
  783|    716|  }
  784|       |
  785|       |  // (+) From 54 to 53 Bits (or for single precision, from 25 to 24 bits).
  786|  5.69k|  ret_man += ret_man & 1;  // Line From54a.
  787|  5.69k|  ret_man >>= 1;           // Line From54b.
  788|       |  // Incrementing ret_man (at line From54a) may have overflowed 54 bits (53
  789|       |  // bits after the right shift by 1 at line From54b), so adjust for that.
  790|       |  //
  791|       |  // For example, parsing "9223372036854775807" will take the if-true branch
  792|       |  // here (for double precision), since:
  793|       |  //  - ret_man = 0x0020000000000000 = (1 << 53)
  794|       |  // Likewise, when parsing "2147483647.0" for single precision:
  795|       |  //  - ret_man = 0x0000000001000000 = (1 << 24)
  796|  5.69k|  if ((ret_man >> FloatTraits<FloatType>::kTargetMantissaBits) > 0) {
  ------------------
  |  Branch (796:7): [True: 202, False: 5.49k]
  ------------------
  797|    202|    ret_exp2 += 1;
  798|       |    // Conceptually, we need a "ret_man >>= 1" in this if-block to balance
  799|       |    // incrementing ret_exp2 in the line immediately above. However, we only
  800|       |    // get here when line From54a overflowed (after adding a 1), so ret_man
  801|       |    // here is (1 << 53). Its low 53 bits are therefore all zeroes. The only
  802|       |    // remaining use of ret_man is to mask it with ((1 << 52) - 1), so only its
  803|       |    // low 52 bits matter. A "ret_man >>= 1" would have no effect in practice.
  804|       |    //
  805|       |    // We omit the "ret_man >>= 1", even if it is cheap (and this if-branch is
  806|       |    // rarely taken) and technically 'more correct', so that mutation tests
  807|       |    // that would otherwise modify or omit that "ret_man >>= 1" don't complain
  808|       |    // that such code mutations have no observable effect.
  809|    202|  }
  810|       |
  811|       |  // ret_exp2 is a uint64_t. Zero or underflow means that we're in subnormal
  812|       |  // space. max_exp2 (0x7FF for double precision, 0xFF for single precision) or
  813|       |  // above means that we're in Inf/NaN space.
  814|       |  //
  815|       |  // The if block is equivalent to (but has fewer branches than):
  816|       |  //   if ((ret_exp2 <= 0) || (ret_exp2 >= max_exp2)) { etc }
  817|       |  //
  818|       |  // For example, parsing "4.9406564584124654e-324" will take the if-true
  819|       |  // branch here, since ret_exp2 = -51.
  820|  5.69k|  static constexpr uint64_t max_exp2 =
  821|  5.69k|      (1 << FloatTraits<FloatType>::kTargetExponentBits) - 1;
  822|  5.69k|  if ((ret_exp2 - 1) >= (max_exp2 - 1)) {
  ------------------
  |  Branch (822:7): [True: 2.39k, False: 3.30k]
  ------------------
  823|  2.39k|    return false;
  824|  2.39k|  }
  825|       |
  826|       |#ifndef ABSL_BIT_PACK_FLOATS
  827|       |  if (FloatTraits<FloatType>::kTargetBits == 64) {
  828|       |    *value = FloatTraits<FloatType>::Make(
  829|       |        (ret_man & 0x000FFFFFFFFFFFFFu) | 0x0010000000000000u,
  830|       |        static_cast<int>(ret_exp2) - 1023 - 52, negative);
  831|       |    return true;
  832|       |  } else if (FloatTraits<FloatType>::kTargetBits == 32) {
  833|       |    *value = FloatTraits<FloatType>::Make(
  834|       |        (static_cast<uint32_t>(ret_man) & 0x007FFFFFu) | 0x00800000u,
  835|       |        static_cast<int>(ret_exp2) - 127 - 23, negative);
  836|       |    return true;
  837|       |  }
  838|       |#else
  839|  3.30k|  if (FloatTraits<FloatType>::kTargetBits == 64) {
  ------------------
  |  Branch (839:7): [True: 3.30k, Folded]
  ------------------
  840|  3.30k|    uint64_t ret_bits = (ret_exp2 << 52) | (ret_man & 0x000FFFFFFFFFFFFFu);
  841|  3.30k|    if (negative) {
  ------------------
  |  Branch (841:9): [True: 526, False: 2.78k]
  ------------------
  842|    526|      ret_bits |= 0x8000000000000000u;
  843|    526|    }
  844|  3.30k|    *value = static_cast<FloatType>(absl::bit_cast<double>(ret_bits));
  845|  3.30k|    return true;
  846|  3.30k|  } else if (FloatTraits<FloatType>::kTargetBits == 32) {
  ------------------
  |  Branch (846:14): [Folded, False: 0]
  ------------------
  847|      0|    uint32_t ret_bits = (static_cast<uint32_t>(ret_exp2) << 23) |
  848|      0|                        (static_cast<uint32_t>(ret_man) & 0x007FFFFFu);
  849|      0|    if (negative) {
  ------------------
  |  Branch (849:9): [True: 0, False: 0]
  ------------------
  850|      0|      ret_bits |= 0x80000000u;
  851|      0|    }
  852|      0|    *value = static_cast<FloatType>(absl::bit_cast<float>(ret_bits));
  853|      0|    return true;
  854|      0|  }
  855|      0|#endif  // ABSL_BIT_PACK_FLOATS
  856|      0|  return false;
  857|  3.30k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_126CalculateFromParsedDecimalIdEENS1_15CalculatedFloatERKNS0_16strings_internal11ParsedFloatE:
  617|  13.4k|    const strings_internal::ParsedFloat& parsed_decimal) {
  618|  13.4k|  CalculatedFloat result;
  619|       |
  620|       |  // Large or small enough decimal exponents will always result in overflow
  621|       |  // or underflow.
  622|  13.4k|  if (Power10Underflow(parsed_decimal.exponent)) {
  ------------------
  |  Branch (622:7): [True: 227, False: 13.2k]
  ------------------
  623|    227|    result.exponent = kUnderflow;
  624|    227|    return result;
  625|  13.2k|  } else if (Power10Overflow(parsed_decimal.exponent)) {
  ------------------
  |  Branch (625:14): [True: 218, False: 13.0k]
  ------------------
  626|    218|    result.exponent = kOverflow;
  627|    218|    return result;
  628|    218|  }
  629|       |
  630|       |  // Otherwise convert our power of 10 into a power of 2 times an integer
  631|       |  // mantissa, and multiply this by our parsed decimal mantissa.
  632|  13.0k|  uint128 wide_binary_mantissa = parsed_decimal.mantissa;
  633|  13.0k|  wide_binary_mantissa *= Power10Mantissa(parsed_decimal.exponent);
  634|  13.0k|  int binary_exponent = Power10Exponent(parsed_decimal.exponent);
  635|       |
  636|       |  // Discard bits that are inaccurate due to truncation error.  The magic
  637|       |  // `mantissa_width` constants below are justified in
  638|       |  // https://abseil.io/about/design/charconv. They represent the number of bits
  639|       |  // in `wide_binary_mantissa` that are guaranteed to be unaffected by error
  640|       |  // propagation.
  641|  13.0k|  bool mantissa_exact;
  642|  13.0k|  int mantissa_width;
  643|  13.0k|  if (parsed_decimal.subrange_begin) {
  ------------------
  |  Branch (643:7): [True: 8.61k, False: 4.40k]
  ------------------
  644|       |    // Truncated mantissa
  645|  8.61k|    mantissa_width = 58;
  646|  8.61k|    mantissa_exact = false;
  647|  8.61k|    binary_exponent +=
  648|  8.61k|        TruncateToBitWidth(mantissa_width, &wide_binary_mantissa);
  649|  8.61k|  } else if (!Power10Exact(parsed_decimal.exponent)) {
  ------------------
  |  Branch (649:14): [True: 3.68k, False: 716]
  ------------------
  650|       |    // Exact mantissa, truncated power of ten
  651|  3.68k|    mantissa_width = 63;
  652|  3.68k|    mantissa_exact = false;
  653|  3.68k|    binary_exponent +=
  654|  3.68k|        TruncateToBitWidth(mantissa_width, &wide_binary_mantissa);
  655|  3.68k|  } else {
  656|       |    // Product is exact
  657|    716|    mantissa_width = BitWidth(wide_binary_mantissa);
  658|    716|    mantissa_exact = true;
  659|    716|  }
  660|       |
  661|       |  // Shift into an FloatType-sized mantissa, and round to nearest.
  662|  13.0k|  const int shift =
  663|  13.0k|      NormalizedShiftSize<FloatType>(mantissa_width, binary_exponent);
  664|  13.0k|  bool result_exact;
  665|  13.0k|  binary_exponent += shift;
  666|  13.0k|  uint64_t binary_mantissa = ShiftRightAndRound(wide_binary_mantissa, shift,
  667|  13.0k|                                                mantissa_exact, &result_exact);
  668|  13.0k|  if (!result_exact) {
  ------------------
  |  Branch (668:7): [True: 9.20k, False: 3.81k]
  ------------------
  669|       |    // We could not determine the rounding direction using int128 math.  Use
  670|       |    // full resolution math instead.
  671|  9.20k|    if (MustRoundUp(binary_mantissa, binary_exponent, parsed_decimal)) {
  ------------------
  |  Branch (671:9): [True: 2.65k, False: 6.54k]
  ------------------
  672|  2.65k|      binary_mantissa += 1;
  673|  2.65k|    }
  674|  9.20k|  }
  675|       |
  676|  13.0k|  return CalculatedFloatFromRawValues<FloatType>(binary_mantissa,
  677|  13.0k|                                                 binary_exponent);
  678|  13.4k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_116Power10UnderflowEi:
  288|  13.4k|bool Power10Underflow(int n) { return n < kPower10TableMinInclusive; }
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_115Power10OverflowEi:
  284|  13.2k|bool Power10Overflow(int n) { return n >= kPower10TableMaxExclusive; }
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_115Power10MantissaEi:
  270|  13.0k|uint64_t Power10Mantissa(int n) {
  271|  13.0k|  return kPower10MantissaHighTable[n - kPower10TableMinInclusive];
  272|  13.0k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_115Power10ExponentEi:
  274|  13.0k|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|  13.0k|  return (217706 * n >> 16) - 63;
  280|  13.0k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_118TruncateToBitWidthEiPNS0_7uint128E:
  348|  12.2k|int TruncateToBitWidth(int bit_width, uint128* absl_nonnull value) {
  349|  12.2k|  const int current_bit_width = BitWidth(*value);
  350|  12.2k|  const int shift = current_bit_width - bit_width;
  351|  12.2k|  *value >>= shift;
  352|  12.2k|  return shift;
  353|  12.2k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_112Power10ExactEi:
  293|  4.40k|bool Power10Exact(int n) { return n >= 0 && n <= 27; }
  ------------------
  |  Branch (293:35): [True: 2.04k, False: 2.35k]
  |  Branch (293:45): [True: 716, False: 1.32k]
  ------------------
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_18BitWidthENS0_7uint128E:
  317|  13.0k|int BitWidth(uint128 value) {
  318|  13.0k|  if (Uint128High64(value) == 0) {
  ------------------
  |  Branch (318:7): [True: 924, False: 12.0k]
  ------------------
  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|    924|    return static_cast<int>(bit_width(Uint128Low64(value)));
  322|    924|  }
  323|  12.0k|  return 128 - countl_zero(Uint128High64(value));
  324|  13.0k|}
charconv.cc:_ZN4absl12lts_2026052612_GLOBAL__N_111MustRoundUpEmiRKNS0_16strings_internal11ParsedFloatE:
  510|  9.20k|                 const strings_internal::ParsedFloat& parsed_decimal) {
  511|       |  // 768 is the number of digits needed in the worst case.  We could determine a
  512|       |  // better limit dynamically based on the value of parsed_decimal.exponent.
  513|       |  // This would optimize pathological input cases only.  (Sane inputs won't have
  514|       |  // hundreds of digits of mantissa.)
  515|  9.20k|  absl::strings_internal::BigUnsigned<84> exact_mantissa;
  516|  9.20k|  int exact_exponent = exact_mantissa.ReadFloatMantissa(parsed_decimal, 768);
  517|       |
  518|       |  // Adjust the `guess` arguments to be halfway between A and B.
  519|  9.20k|  guess_mantissa = guess_mantissa * 2 + 1;
  520|  9.20k|  guess_exponent -= 1;
  521|       |
  522|       |  // In our comparison:
  523|       |  // lhs = exact = exact_mantissa * 10**exact_exponent
  524|       |  //             = exact_mantissa * 5**exact_exponent * 2**exact_exponent
  525|       |  // rhs = guess = guess_mantissa * 2**guess_exponent
  526|       |  //
  527|       |  // Because we are doing integer math, we can't directly deal with negative
  528|       |  // exponents.  We instead move these to the other side of the inequality.
  529|  9.20k|  absl::strings_internal::BigUnsigned<84>& lhs = exact_mantissa;
  530|  9.20k|  int comparison;
  531|  9.20k|  if (exact_exponent >= 0) {
  ------------------
  |  Branch (531:7): [True: 4.11k, False: 5.08k]
  ------------------
  532|  4.11k|    lhs.MultiplyByFiveToTheNth(exact_exponent);
  533|  4.11k|    absl::strings_internal::BigUnsigned<84> rhs(guess_mantissa);
  534|       |    // There are powers of 2 on both sides of the inequality; reduce this to
  535|       |    // a single bit-shift.
  536|  4.11k|    if (exact_exponent > guess_exponent) {
  ------------------
  |  Branch (536:9): [True: 0, False: 4.11k]
  ------------------
  537|      0|      lhs.ShiftLeft(exact_exponent - guess_exponent);
  538|  4.11k|    } else {
  539|  4.11k|      rhs.ShiftLeft(guess_exponent - exact_exponent);
  540|  4.11k|    }
  541|  4.11k|    comparison = Compare(lhs, rhs);
  542|  5.08k|  } else {
  543|       |    // Move the power of 5 to the other side of the equation, giving us:
  544|       |    // lhs = exact_mantissa * 2**exact_exponent
  545|       |    // rhs = guess_mantissa * 5**(-exact_exponent) * 2**guess_exponent
  546|  5.08k|    absl::strings_internal::BigUnsigned<84> rhs =
  547|  5.08k|        absl::strings_internal::BigUnsigned<84>::FiveToTheNth(-exact_exponent);
  548|  5.08k|    rhs.MultiplyBy(guess_mantissa);
  549|  5.08k|    if (exact_exponent > guess_exponent) {
  ------------------
  |  Branch (549:9): [True: 1.97k, False: 3.11k]
  ------------------
  550|  1.97k|      lhs.ShiftLeft(exact_exponent - guess_exponent);
  551|  3.11k|    } else {
  552|  3.11k|      rhs.ShiftLeft(guess_exponent - exact_exponent);
  553|  3.11k|    }
  554|  5.08k|    comparison = Compare(lhs, rhs);
  555|  5.08k|  }
  556|  9.20k|  if (comparison < 0) {
  ------------------
  |  Branch (556:7): [True: 6.20k, False: 3.00k]
  ------------------
  557|  6.20k|    return false;
  558|  6.20k|  } else if (comparison > 0) {
  ------------------
  |  Branch (558:14): [True: 2.35k, False: 653]
  ------------------
  559|  2.35k|    return true;
  560|  2.35k|  } else {
  561|       |    // When lhs == rhs, the decimal input is exactly between A and B.
  562|       |    // Round towards even -- round up only if the low bit of the initial
  563|       |    // `guess_mantissa` was a 1.  We shifted guess_mantissa left 1 bit at
  564|       |    // the beginning of this function, so test the 2nd bit here.
  565|    653|    return (guess_mantissa & 2) == 2;
  566|    653|  }
  567|  9.20k|}

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

_ZN4absl12lts_2026052619WebSafeBase64EscapeENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
 1123|      2|std::string WebSafeBase64Escape(absl::string_view src) {
 1124|      2|  return Base64EscapeToStringInternal(
 1125|      2|      reinterpret_cast<const unsigned char*>(src.data()), src.size(), false,
 1126|      2|      kWebSafeBase64Chars);
 1127|      2|}
escaping.cc:_ZN4absl12lts_2026052612_GLOBAL__N_128Base64EscapeToStringInternalEPKhmbPKc:
  615|      2|                                         const char* base64_chars) {
  616|      2|  std::string escaped;
  617|      2|  const size_t calc_escaped_size =
  618|      2|      strings_internal::CalculateBase64EscapedLenInternal(szsrc, do_padding);
  619|      2|  StringResizeAndOverwrite(
  620|      2|      escaped, calc_escaped_size,
  621|      2|      [src, szsrc, base64_chars, do_padding](char* buf, size_t buf_size) {
  622|      2|        const size_t escaped_len = Base64EscapeInternal(
  623|      2|            src, szsrc, buf, buf_size, base64_chars, do_padding);
  624|      2|        assert(escaped_len == buf_size);
  625|      2|        return escaped_len;
  626|      2|      });
  627|      2|  return escaped;
  628|      2|}
escaping.cc:_ZZN4absl12lts_2026052612_GLOBAL__N_128Base64EscapeToStringInternalEPKhmbPKcENK3$_0clEPcm:
  621|      2|      [src, szsrc, base64_chars, do_padding](char* buf, size_t buf_size) {
  622|      2|        const size_t escaped_len = Base64EscapeInternal(
  623|      2|            src, szsrc, buf, buf_size, base64_chars, do_padding);
  624|       |        assert(escaped_len == buf_size);
  625|      2|        return escaped_len;
  626|      2|      });
escaping.cc:_ZN4absl12lts_2026052612_GLOBAL__N_120Base64EscapeInternalEPKhmPcmPKcb:
  498|      2|                            bool do_padding) {
  499|      2|  constexpr char kPad64 = '=';
  500|       |
  501|      2|  constexpr size_t kMaxSize = (std::numeric_limits<size_t>::max() - 1) / 4 * 3;
  502|      2|  if (ABSL_PREDICT_FALSE(szsrc > kMaxSize || szsrc * 4 > szdest * 3)) return 0;
  ------------------
  |  |  190|      4|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  Branch (190:59): [True: 0, False: 2]
  |  |  |  Branch (190:59): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  503|       |
  504|      2|  char* cur_dest = dest;
  505|      2|  const unsigned char* cur_src = src;
  506|       |
  507|      2|  char* const limit_dest = dest + szdest;
  508|      2|  const unsigned char* const limit_src = src + szsrc;
  509|       |
  510|       |  // (from https://tools.ietf.org/html/rfc3548)
  511|       |  // Special processing is performed if fewer than 24 bits are available
  512|       |  // at the end of the data being encoded.  A full encoding quantum is
  513|       |  // always completed at the end of a quantity.  When fewer than 24 input
  514|       |  // bits are available in an input group, zero bits are added (on the
  515|       |  // right) to form an integral number of 6-bit groups.
  516|       |  //
  517|       |  // If do_padding is true, padding at the end of the data is performed. This
  518|       |  // output padding uses the '=' character.
  519|       |
  520|       |  // Three bytes of data encodes to four characters of cyphertext.
  521|       |  // So we can pump through three-byte chunks atomically.
  522|      2|  if (szsrc >= 3) {                    // "limit_src - 3" is UB if szsrc < 3.
  ------------------
  |  Branch (522:7): [True: 2, False: 0]
  ------------------
  523|     22|    while (cur_src < limit_src - 3) {  // While we have >= 32 bits.
  ------------------
  |  Branch (523:12): [True: 20, False: 2]
  ------------------
  524|     20|      uint32_t in = absl::big_endian::Load32(cur_src) >> 8;
  525|       |
  526|     20|      cur_dest[0] = base64[in >> 18];
  527|     20|      in &= 0x3FFFF;
  528|     20|      cur_dest[1] = base64[in >> 12];
  529|     20|      in &= 0xFFF;
  530|     20|      cur_dest[2] = base64[in >> 6];
  531|     20|      in &= 0x3F;
  532|     20|      cur_dest[3] = base64[in];
  533|       |
  534|     20|      cur_dest += 4;
  535|     20|      cur_src += 3;
  536|     20|    }
  537|      2|  }
  538|       |  // To save time, we didn't update szdest or szsrc in the loop.  So do it now.
  539|      2|  szdest = static_cast<size_t>(limit_dest - cur_dest);
  540|      2|  szsrc = static_cast<size_t>(limit_src - cur_src);
  541|       |
  542|       |  /* now deal with the tail (<=3 bytes) */
  543|      2|  switch (szsrc) {
  544|      0|    case 0:
  ------------------
  |  Branch (544:5): [True: 0, False: 2]
  ------------------
  545|       |      // Nothing left; nothing more to do.
  546|      0|      break;
  547|      0|    case 1: {
  ------------------
  |  Branch (547:5): [True: 0, False: 2]
  ------------------
  548|       |      // One byte left: this encodes to two characters, and (optionally)
  549|       |      // two pad characters to round out the four-character cypherblock.
  550|      0|      if (szdest < 2) return 0;
  ------------------
  |  Branch (550:11): [True: 0, False: 0]
  ------------------
  551|      0|      uint32_t in = cur_src[0];
  552|      0|      cur_dest[0] = base64[in >> 2];
  553|      0|      in &= 0x3;
  554|      0|      cur_dest[1] = base64[in << 4];
  555|      0|      cur_dest += 2;
  556|      0|      szdest -= 2;
  557|      0|      if (do_padding) {
  ------------------
  |  Branch (557:11): [True: 0, False: 0]
  ------------------
  558|      0|        if (szdest < 2) return 0;
  ------------------
  |  Branch (558:13): [True: 0, False: 0]
  ------------------
  559|      0|        cur_dest[0] = kPad64;
  560|      0|        cur_dest[1] = kPad64;
  561|      0|        cur_dest += 2;
  562|      0|        szdest -= 2;
  563|      0|      }
  564|      0|      break;
  565|      0|    }
  566|      2|    case 2: {
  ------------------
  |  Branch (566:5): [True: 2, False: 0]
  ------------------
  567|       |      // Two bytes left: this encodes to three characters, and (optionally)
  568|       |      // one pad character to round out the four-character cypherblock.
  569|      2|      if (szdest < 3) return 0;
  ------------------
  |  Branch (569:11): [True: 0, False: 2]
  ------------------
  570|      2|      uint32_t in = absl::big_endian::Load16(cur_src);
  571|      2|      cur_dest[0] = base64[in >> 10];
  572|      2|      in &= 0x3FF;
  573|      2|      cur_dest[1] = base64[in >> 4];
  574|      2|      in &= 0x00F;
  575|      2|      cur_dest[2] = base64[in << 2];
  576|      2|      cur_dest += 3;
  577|      2|      szdest -= 3;
  578|      2|      if (do_padding) {
  ------------------
  |  Branch (578:11): [True: 0, False: 2]
  ------------------
  579|      0|        if (szdest < 1) return 0;
  ------------------
  |  Branch (579:13): [True: 0, False: 0]
  ------------------
  580|      0|        cur_dest[0] = kPad64;
  581|      0|        cur_dest += 1;
  582|      0|        szdest -= 1;
  583|      0|      }
  584|      2|      break;
  585|      2|    }
  586|      2|    case 3: {
  ------------------
  |  Branch (586:5): [True: 0, False: 2]
  ------------------
  587|       |      // Three bytes left: same as in the big loop above.  We can't do this in
  588|       |      // the loop because the loop above always reads 4 bytes, and the fourth
  589|       |      // byte is past the end of the input.
  590|      0|      if (szdest < 4) return 0;
  ------------------
  |  Branch (590:11): [True: 0, False: 0]
  ------------------
  591|      0|      uint32_t in =
  592|      0|          (uint32_t{cur_src[0]} << 16) + absl::big_endian::Load16(cur_src + 1);
  593|      0|      cur_dest[0] = base64[in >> 18];
  594|      0|      in &= 0x3FFFF;
  595|      0|      cur_dest[1] = base64[in >> 12];
  596|      0|      in &= 0xFFF;
  597|      0|      cur_dest[2] = base64[in >> 6];
  598|      0|      in &= 0x3F;
  599|      0|      cur_dest[3] = base64[in];
  600|      0|      cur_dest += 4;
  601|      0|      szdest -= 4;
  602|      0|      break;
  603|      0|    }
  604|      0|    default:
  ------------------
  |  Branch (604:5): [True: 0, False: 2]
  ------------------
  605|       |      // Should not be reached: blocks of 4 bytes are handled
  606|       |      // in the while loop before this switch statement.
  607|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  608|      0|      break;
  609|      2|  }
  610|      2|  return static_cast<size_t>(cur_dest - dest);
  611|      2|}

_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE17ReadFloatMantissaERKNS1_11ParsedFloatEi:
  172|  9.20k|                                              int significant_digits) {
  173|  9.20k|  SetToZero();
  174|  9.20k|  assert(fp.type == FloatType::kNumber);
  175|       |
  176|  9.20k|  if (fp.subrange_begin == nullptr) {
  ------------------
  |  Branch (176:7): [True: 1.54k, False: 7.66k]
  ------------------
  177|       |    // We already exactly parsed the mantissa, so no more work is necessary.
  178|  1.54k|    words_[0] = fp.mantissa & 0xffffffffu;
  179|  1.54k|    words_[1] = fp.mantissa >> 32;
  180|  1.54k|    if (words_[1]) {
  ------------------
  |  Branch (180:9): [True: 334, False: 1.20k]
  ------------------
  181|    334|      size_ = 2;
  182|  1.20k|    } else if (words_[0]) {
  ------------------
  |  Branch (182:16): [True: 1.20k, False: 0]
  ------------------
  183|  1.20k|      size_ = 1;
  184|  1.20k|    }
  185|  1.54k|    return fp.exponent;
  186|  1.54k|  }
  187|  7.66k|  int exponent_adjust =
  188|  7.66k|      ReadDigits(fp.subrange_begin, fp.subrange_end, significant_digits);
  189|  7.66k|  return fp.literal_exponent + exponent_adjust;
  190|  9.20k|}
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE12FiveToTheNthEi:
  289|  5.08k|    int n) {
  290|  5.08k|  BigUnsigned answer(1u);
  291|       |
  292|       |  // Seed from the table of large powers, if possible.
  293|  5.08k|  bool first_pass = true;
  294|  10.8k|  while (n >= kLargePowerOfFiveStep) {
  ------------------
  |  Branch (294:10): [True: 5.71k, False: 5.08k]
  ------------------
  295|  5.71k|    int big_power =
  296|  5.71k|        std::min(n / kLargePowerOfFiveStep, kLargestPowerOfFiveIndex);
  297|  5.71k|    if (first_pass) {
  ------------------
  |  Branch (297:9): [True: 3.41k, False: 2.29k]
  ------------------
  298|       |      // just copy, rather than multiplying by 1
  299|  3.41k|      std::copy_n(LargePowerOfFiveData(big_power),
  300|  3.41k|                  LargePowerOfFiveSize(big_power), answer.words_);
  301|  3.41k|      answer.size_ = LargePowerOfFiveSize(big_power);
  302|  3.41k|      first_pass = false;
  303|  3.41k|    } else {
  304|  2.29k|      answer.MultiplyBy(LargePowerOfFiveSize(big_power),
  305|  2.29k|                        LargePowerOfFiveData(big_power));
  306|  2.29k|    }
  307|  5.71k|    n -= kLargePowerOfFiveStep * big_power;
  308|  5.71k|  }
  309|  5.08k|  answer.MultiplyByFiveToTheNth(n);
  310|  5.08k|  return answer;
  311|  5.08k|}
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE10ReadDigitsEPKcS5_i:
  194|  7.66k|                                       int significant_digits) {
  195|  7.66k|  assert(significant_digits <= Digits10() + 1);
  196|  7.66k|  SetToZero();
  197|       |
  198|  7.66k|  bool after_decimal_point = false;
  199|       |  // Discard any leading zeroes before the decimal point
  200|  7.92k|  while (begin < end && *begin == '0') {
  ------------------
  |  Branch (200:10): [True: 7.92k, False: 0]
  |  Branch (200:25): [True: 264, False: 7.66k]
  ------------------
  201|    264|    ++begin;
  202|    264|  }
  203|  7.66k|  int dropped_digits = 0;
  204|       |  // Discard any trailing zeroes.  These may or may not be after the decimal
  205|       |  // point.
  206|  8.96k|  while (begin < end && *std::prev(end) == '0') {
  ------------------
  |  Branch (206:10): [True: 8.96k, False: 0]
  |  Branch (206:25): [True: 1.30k, False: 7.66k]
  ------------------
  207|  1.30k|    --end;
  208|  1.30k|    ++dropped_digits;
  209|  1.30k|  }
  210|  7.66k|  if (begin < end && *std::prev(end) == '.') {
  ------------------
  |  Branch (210:7): [True: 7.66k, False: 0]
  |  Branch (210:22): [True: 340, False: 7.32k]
  ------------------
  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|    340|    dropped_digits = 0;
  214|    340|    --end;
  215|    846|    while (begin < end && *std::prev(end) == '0') {
  ------------------
  |  Branch (215:12): [True: 846, False: 0]
  |  Branch (215:27): [True: 506, False: 340]
  ------------------
  216|    506|      --end;
  217|    506|      ++dropped_digits;
  218|    506|    }
  219|  7.32k|  } else if (dropped_digits) {
  ------------------
  |  Branch (219:14): [True: 719, False: 6.60k]
  ------------------
  220|       |    // We dropped digits, and aren't sure if they're before or after the decimal
  221|       |    // point.  Figure that out now.
  222|    719|    const char* dp = std::find(begin, end, '.');
  223|    719|    if (dp != end) {
  ------------------
  |  Branch (223:9): [True: 479, False: 240]
  ------------------
  224|       |      // The dropped trailing digits were after the decimal point, so don't
  225|       |      // count them.
  226|    479|      dropped_digits = 0;
  227|    479|    }
  228|    719|  }
  229|       |  // Any non-fraction digits we dropped need to be accounted for in our exponent
  230|       |  // adjustment.
  231|  7.66k|  int exponent_adjust = dropped_digits;
  232|       |
  233|  7.66k|  uint32_t queued = 0;
  234|  7.66k|  int digits_queued = 0;
  235|  1.73M|  for (; begin != end && significant_digits > 0; ++begin) {
  ------------------
  |  Branch (235:10): [True: 1.72M, False: 7.01k]
  |  Branch (235:26): [True: 1.72M, False: 648]
  ------------------
  236|  1.72M|    if (*begin == '.') {
  ------------------
  |  Branch (236:9): [True: 4.81k, False: 1.72M]
  ------------------
  237|  4.81k|      after_decimal_point = true;
  238|  4.81k|      continue;
  239|  4.81k|    }
  240|  1.72M|    if (after_decimal_point) {
  ------------------
  |  Branch (240:9): [True: 1.58M, False: 141k]
  ------------------
  241|       |      // For each fractional digit we emit in our parsed integer, adjust our
  242|       |      // decimal exponent to compensate.
  243|  1.58M|      --exponent_adjust;
  244|  1.58M|    }
  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.36k, False: 1.72M]
  |  Branch (247:36): [True: 648, False: 714]
  ------------------
  248|    648|        (digit == 0 || digit == 5)) {
  ------------------
  |  Branch (248:10): [True: 203, False: 445]
  |  Branch (248:24): [True: 199, False: 246]
  ------------------
  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|    402|      ++digit;
  257|    402|    }
  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.66k|  if (digits_queued) {
  ------------------
  |  Branch (267:7): [True: 6.92k, False: 741]
  ------------------
  268|  6.92k|    MultiplyBy(kTenToNth[digits_queued]);
  269|  6.92k|    AddWithCarry(0, queued);
  270|  6.92k|  }
  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.66k|  if (begin < end && !after_decimal_point) {
  ------------------
  |  Branch (275:7): [True: 648, False: 7.01k]
  |  Branch (275:22): [True: 2, False: 646]
  ------------------
  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 += static_cast<int>(decimal_point - begin);
  283|      2|  }
  284|  7.66k|  return exponent_adjust;
  285|  7.66k|}
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE12MultiplyStepEiPKjii:
  316|   265k|                                          int other_size, int step) {
  317|   265k|  int this_i = std::min(original_size - 1, step);
  318|   265k|  int other_i = step - this_i;
  319|       |
  320|   265k|  uint64_t this_word = 0;
  321|   265k|  uint64_t carry = 0;
  322|  1.76M|  for (; this_i >= 0 && other_i < other_size; --this_i, ++other_i) {
  ------------------
  |  Branch (322:10): [True: 1.72M, False: 40.5k]
  |  Branch (322:25): [True: 1.49M, False: 225k]
  ------------------
  323|  1.49M|    uint64_t product = words_[this_i];
  324|  1.49M|    product *= other_words[other_i];
  325|  1.49M|    this_word += product;
  326|  1.49M|    carry += (this_word >> 32);
  327|  1.49M|    this_word &= 0xffffffff;
  328|  1.49M|  }
  329|   265k|  AddWithCarry(step + 1, carry);
  330|   265k|  words_[step] = this_word & 0xffffffff;
  331|   265k|  if (this_word > 0 && size_ <= step) {
  ------------------
  |  Branch (331:7): [True: 265k, False: 0]
  |  Branch (331:24): [True: 3.94k, False: 261k]
  ------------------
  332|  3.94k|    size_ = step + 1;
  333|  3.94k|  }
  334|   265k|}
charconv_bigint.cc:_ZN4absl12lts_2026052616strings_internal12_GLOBAL__N_120LargePowerOfFiveDataEi:
  152|  5.71k|const uint32_t* LargePowerOfFiveData(int i) {
  153|  5.71k|  return kLargePowersOfFive + i * (i - 1);
  154|  5.71k|}
charconv_bigint.cc:_ZN4absl12lts_2026052616strings_internal12_GLOBAL__N_120LargePowerOfFiveSizeEi:
  158|  9.12k|int LargePowerOfFiveSize(int i) { return 2 * i; }

_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EEC2Ev:
   62|  9.20k|  BigUnsigned() : size_(0), words_{} {}
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE22MultiplyByFiveToTheNthEi:
  174|  9.20k|  void MultiplyByFiveToTheNth(int n) {
  175|  42.1k|    while (n >= kMaxSmallPowerOfFive) {
  ------------------
  |  Branch (175:12): [True: 32.9k, False: 9.20k]
  ------------------
  176|  32.9k|      MultiplyBy(kFiveToNth[kMaxSmallPowerOfFive]);
  177|  32.9k|      n -= kMaxSmallPowerOfFive;
  178|  32.9k|    }
  179|  9.20k|    if (n > 0) {
  ------------------
  |  Branch (179:9): [True: 7.50k, False: 1.70k]
  ------------------
  180|  7.50k|      MultiplyBy(kFiveToNth[n]);
  181|  7.50k|    }
  182|  9.20k|  }
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE10MultiplyByEj:
  140|   236k|  void MultiplyBy(uint32_t v) {
  141|   236k|    if (size_ == 0 || v == 1) {
  ------------------
  |  Branch (141:9): [True: 7.66k, False: 228k]
  |  Branch (141:23): [True: 0, False: 228k]
  ------------------
  142|  7.66k|      return;
  143|  7.66k|    }
  144|   228k|    if (v == 0) {
  ------------------
  |  Branch (144:9): [True: 0, False: 228k]
  ------------------
  145|      0|      SetToZero();
  146|      0|      return;
  147|      0|    }
  148|   228k|    const uint64_t factor = v;
  149|   228k|    uint64_t window = 0;
  150|  7.17M|    for (int i = 0; i < size_; ++i) {
  ------------------
  |  Branch (150:21): [True: 6.94M, False: 228k]
  ------------------
  151|  6.94M|      window += factor * words_[i];
  152|  6.94M|      words_[i] = window & 0xffffffff;
  153|  6.94M|      window >>= 32;
  154|  6.94M|    }
  155|       |    // If carry bits remain and there's space for them, grow size_.
  156|   228k|    if (window && size_ < max_words) {
  ------------------
  |  Branch (156:9): [True: 209k, False: 19.6k]
  |  Branch (156:19): [True: 209k, False: 0]
  ------------------
  157|   209k|      words_[size_] = window & 0xffffffff;
  158|   209k|      ++size_;
  159|   209k|    }
  160|   228k|  }
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE9SetToZeroEv:
  209|  16.8k|  void SetToZero() {
  210|  16.8k|    std::fill_n(words_, size_, 0u);
  211|  16.8k|    size_ = 0;
  212|  16.8k|  }
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EEC2Em:
   64|  9.20k|      : size_((v >> 32) ? 2 : v ? 1 : 0),
  ------------------
  |  Branch (64:15): [True: 4.11k, False: 5.08k]
  |  Branch (64:31): [True: 5.08k, False: 0]
  ------------------
   65|  9.20k|        words_{static_cast<uint32_t>(v & 0xffffffffu),
   66|  9.20k|               static_cast<uint32_t>(v >> 32)} {}
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE9ShiftLeftEi:
  102|  9.20k|  void ShiftLeft(int count) {
  103|  9.20k|    if (count > 0) {
  ------------------
  |  Branch (103:9): [True: 8.88k, False: 320]
  ------------------
  104|  8.88k|      const int word_shift = count / 32;
  105|  8.88k|      if (word_shift >= max_words) {
  ------------------
  |  Branch (105:11): [True: 0, False: 8.88k]
  ------------------
  106|      0|        SetToZero();
  107|      0|        return;
  108|      0|      }
  109|  8.88k|      size_ = (std::min)(size_ + word_shift, max_words);
  110|  8.88k|      count %= 32;
  111|  8.88k|      if (count == 0) {
  ------------------
  |  Branch (111:11): [True: 504, False: 8.37k]
  ------------------
  112|       |// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=warray-bounds
  113|       |// shows a lot of bogus -Warray-bounds warnings under GCC.
  114|       |// This is not the only one in Abseil.
  115|       |#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(14, 0)
  116|       |#pragma GCC diagnostic push
  117|       |#pragma GCC diagnostic ignored "-Warray-bounds"
  118|       |#endif
  119|    504|        std::copy_backward(words_, words_ + size_ - word_shift, words_ + size_);
  120|       |#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(14, 0)
  121|       |#pragma GCC diagnostic pop
  122|       |#endif
  123|  8.37k|      } else {
  124|   143k|        for (int i = (std::min)(size_, max_words - 1); i > word_shift; --i) {
  ------------------
  |  Branch (124:56): [True: 135k, False: 8.37k]
  ------------------
  125|   135k|          words_[i] = (words_[i - word_shift] << count) |
  126|   135k|                      (words_[i - word_shift - 1] >> (32 - count));
  127|   135k|        }
  128|  8.37k|        words_[word_shift] = words_[0] << count;
  129|       |        // Grow size_ if necessary.
  130|  8.37k|        if (size_ < max_words && words_[size_]) {
  ------------------
  |  Branch (130:13): [True: 8.37k, False: 0]
  |  Branch (130:34): [True: 4.65k, False: 3.72k]
  ------------------
  131|  4.65k|          ++size_;
  132|  4.65k|        }
  133|  8.37k|      }
  134|  8.88k|      std::fill_n(words_, word_shift, 0u);
  135|  8.88k|    }
  136|  9.20k|  }
_ZN4absl12lts_2026052616strings_internal7CompareILi84ELi84EEEiRKNS1_11BigUnsignedIXT_EEERKNS3_IXT0_EEE:
  363|  9.20k|int Compare(const BigUnsigned<N>& lhs, const BigUnsigned<M>& rhs) {
  364|  9.20k|  int limit = (std::max)(lhs.size(), rhs.size());
  365|  26.7k|  for (int i = limit - 1; i >= 0; --i) {
  ------------------
  |  Branch (365:27): [True: 26.1k, False: 653]
  ------------------
  366|  26.1k|    const uint32_t lhs_word = lhs.GetWord(i);
  367|  26.1k|    const uint32_t rhs_word = rhs.GetWord(i);
  368|  26.1k|    if (lhs_word < rhs_word) {
  ------------------
  |  Branch (368:9): [True: 6.20k, False: 19.9k]
  ------------------
  369|  6.20k|      return -1;
  370|  19.9k|    } else if (lhs_word > rhs_word) {
  ------------------
  |  Branch (370:16): [True: 2.35k, False: 17.5k]
  ------------------
  371|  2.35k|      return 1;
  372|  2.35k|    }
  373|  26.1k|  }
  374|    653|  return 0;
  375|  9.20k|}
_ZNK4absl12lts_2026052616strings_internal11BigUnsignedILi84EE4sizeEv:
  227|  18.4k|  int size() const { return size_; }
_ZNK4absl12lts_2026052616strings_internal11BigUnsignedILi84EE7GetWordEi:
  216|  52.2k|  uint32_t GetWord(int index) const {
  217|  52.2k|    if (index < 0 || index >= size_) {
  ------------------
  |  Branch (217:9): [True: 0, False: 52.2k]
  |  Branch (217:22): [True: 238, False: 52.0k]
  ------------------
  218|    238|      return 0;
  219|    238|    }
  220|  52.0k|    return words_[index];
  221|  52.2k|  }
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE10MultiplyByEm:
  162|  5.08k|  void MultiplyBy(uint64_t v) {
  163|  5.08k|    uint32_t words[2];
  164|  5.08k|    words[0] = static_cast<uint32_t>(v);
  165|  5.08k|    words[1] = static_cast<uint32_t>(v >> 32);
  166|  5.08k|    if (words[1] == 0) {
  ------------------
  |  Branch (166:9): [True: 0, False: 5.08k]
  ------------------
  167|      0|      MultiplyBy(words[0]);
  168|  5.08k|    } else {
  169|  5.08k|      MultiplyBy(2, words);
  170|  5.08k|    }
  171|  5.08k|  }
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE10MultiplyByEiPKj:
  280|  7.38k|  void MultiplyBy(int other_size, const uint32_t* other_words) {
  281|  7.38k|    const int original_size = size_;
  282|  7.38k|    const int first_step =
  283|  7.38k|        (std::min)(original_size + other_size - 2, max_words - 1);
  284|   272k|    for (int step = first_step; step >= 0; --step) {
  ------------------
  |  Branch (284:33): [True: 265k, False: 7.38k]
  ------------------
  285|   265k|      MultiplyStep(original_size, other_words, other_size, step);
  286|   265k|    }
  287|  7.38k|  }
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE12AddWithCarryEij:
  290|   333k|  void AddWithCarry(int index, uint32_t value) {
  291|   333k|    if (value) {
  ------------------
  |  Branch (291:9): [True: 332k, False: 655]
  ------------------
  292|   691k|      while (index < max_words && value > 0) {
  ------------------
  |  Branch (292:14): [True: 691k, False: 0]
  |  Branch (292:35): [True: 359k, False: 332k]
  ------------------
  293|   359k|        words_[index] += value;
  294|       |        // carry if we overflowed in this word:
  295|   359k|        if (value > words_[index]) {
  ------------------
  |  Branch (295:13): [True: 26.5k, False: 332k]
  ------------------
  296|  26.5k|          value = 1;
  297|  26.5k|          ++index;
  298|   332k|        } else {
  299|   332k|          value = 0;
  300|   332k|        }
  301|   359k|      }
  302|   332k|      size_ = (std::min)(max_words, (std::max)(index + 1, size_));
  303|   332k|    }
  304|   333k|  }
_ZN4absl12lts_2026052616strings_internal11BigUnsignedILi84EE12AddWithCarryEim:
  306|   265k|  void AddWithCarry(int index, uint64_t value) {
  307|   265k|    if (value && index < max_words) {
  ------------------
  |  Branch (307:9): [True: 261k, False: 4.34k]
  |  Branch (307:18): [True: 261k, False: 0]
  ------------------
  308|   261k|      uint32_t high = value >> 32;
  309|   261k|      uint32_t low = value & 0xffffffff;
  310|   261k|      words_[index] += low;
  311|   261k|      if (words_[index] < low) {
  ------------------
  |  Branch (311:11): [True: 95.1k, False: 166k]
  ------------------
  312|  95.1k|        ++high;
  313|  95.1k|        if (high == 0) {
  ------------------
  |  Branch (313:13): [True: 0, False: 95.1k]
  ------------------
  314|       |          // Carry from the low word caused our high word to overflow.
  315|       |          // Short circuit here to do the right thing.
  316|      0|          AddWithCarry(index + 2, static_cast<uint32_t>(1));
  317|      0|          return;
  318|      0|        }
  319|  95.1k|      }
  320|   261k|      if (high > 0) {
  ------------------
  |  Branch (320:11): [True: 137k, False: 124k]
  ------------------
  321|   137k|        AddWithCarry(index + 1, high);
  322|   137k|      } else {
  323|       |        // Normally 32-bit AddWithCarry() sets size_, but since we don't call
  324|       |        // it when `high` is 0, do it ourselves here.
  325|   124k|        size_ = (std::min)(max_words, (std::max)(index + 1, size_));
  326|   124k|      }
  327|   261k|    }
  328|   265k|  }

_ZN4absl12lts_2026052616strings_internal10ParseFloatILi10EEENS1_11ParsedFloatEPKcS5_NS0_12chars_formatE:
  356|  20.9k|                                         chars_format format_flags) {
  357|  20.9k|  strings_internal::ParsedFloat result;
  358|       |
  359|       |  // Exit early if we're given an empty range.
  360|  20.9k|  if (begin == end) return result;
  ------------------
  |  Branch (360:7): [True: 1, False: 20.9k]
  ------------------
  361|       |
  362|       |  // Handle the infinity and NaN cases.
  363|  20.9k|  if (ParseInfinityOrNan(begin, end, &result)) {
  ------------------
  |  Branch (363:7): [True: 1.41k, False: 19.5k]
  ------------------
  364|  1.41k|    return result;
  365|  1.41k|  }
  366|       |
  367|  19.5k|  const char* const mantissa_begin = begin;
  368|  21.3k|  while (begin < end && *begin == '0') {
  ------------------
  |  Branch (368:10): [True: 20.8k, False: 506]
  |  Branch (368:25): [True: 1.85k, False: 19.0k]
  ------------------
  369|  1.85k|    ++begin;  // skip leading zeros
  370|  1.85k|  }
  371|  19.5k|  uint64_t mantissa = 0;
  372|       |
  373|  19.5k|  int exponent_adjustment = 0;
  374|  19.5k|  bool mantissa_is_inexact = false;
  375|  19.5k|  int pre_decimal_digits = ConsumeDigits<base>(
  376|  19.5k|      begin, end, MantissaDigitsMax<base>(), &mantissa, &mantissa_is_inexact);
  377|  19.5k|  begin += pre_decimal_digits;
  378|  19.5k|  int digits_left;
  379|  19.5k|  if (pre_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (379:7): [True: 0, False: 19.5k]
  ------------------
  380|       |    // refuse to parse pathological inputs
  381|      0|    return result;
  382|  19.5k|  } else if (pre_decimal_digits > MantissaDigitsMax<base>()) {
  ------------------
  |  Branch (382:14): [True: 6.06k, False: 13.4k]
  ------------------
  383|       |    // We dropped some non-fraction digits on the floor.  Adjust our exponent
  384|       |    // to compensate.
  385|  6.06k|    exponent_adjustment =
  386|  6.06k|        static_cast<int>(pre_decimal_digits - MantissaDigitsMax<base>());
  387|  6.06k|    digits_left = 0;
  388|  13.4k|  } else {
  389|  13.4k|    digits_left =
  390|  13.4k|        static_cast<int>(MantissaDigitsMax<base>() - pre_decimal_digits);
  391|  13.4k|  }
  392|  19.5k|  if (begin < end && *begin == '.') {
  ------------------
  |  Branch (392:7): [True: 15.8k, False: 3.66k]
  |  Branch (392:22): [True: 8.29k, False: 7.56k]
  ------------------
  393|  8.29k|    ++begin;
  394|  8.29k|    if (mantissa == 0) {
  ------------------
  |  Branch (394:9): [True: 3.88k, False: 4.40k]
  ------------------
  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.88k|      const char* begin_zeros = begin;
  398|  5.35k|      while (begin < end && *begin == '0') {
  ------------------
  |  Branch (398:14): [True: 4.70k, False: 651]
  |  Branch (398:29): [True: 1.47k, False: 3.23k]
  ------------------
  399|  1.47k|        ++begin;
  400|  1.47k|      }
  401|  3.88k|      int zeros_skipped = static_cast<int>(begin - begin_zeros);
  402|  3.88k|      if (zeros_skipped >= DigitLimit<base>()) {
  ------------------
  |  Branch (402:11): [True: 0, False: 3.88k]
  ------------------
  403|       |        // refuse to parse pathological inputs
  404|      0|        return result;
  405|      0|      }
  406|  3.88k|      exponent_adjustment -= static_cast<int>(zeros_skipped);
  407|  3.88k|    }
  408|  8.29k|    int post_decimal_digits = ConsumeDigits<base>(
  409|  8.29k|        begin, end, digits_left, &mantissa, &mantissa_is_inexact);
  410|  8.29k|    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|  8.29k|    if (post_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (416:9): [True: 0, False: 8.29k]
  ------------------
  417|       |      // refuse to parse pathological inputs
  418|      0|      return result;
  419|  8.29k|    } else if (post_decimal_digits > digits_left) {
  ------------------
  |  Branch (419:16): [True: 5.43k, False: 2.85k]
  ------------------
  420|  5.43k|      exponent_adjustment -= digits_left;
  421|  5.43k|    } else {
  422|  2.85k|      exponent_adjustment -= post_decimal_digits;
  423|  2.85k|    }
  424|  8.29k|  }
  425|       |  // If we've found no mantissa whatsoever, this isn't a number.
  426|  19.5k|  if (mantissa_begin == begin) {
  ------------------
  |  Branch (426:7): [True: 78, False: 19.4k]
  ------------------
  427|     78|    return result;
  428|     78|  }
  429|       |  // A bare "." doesn't count as a mantissa either.
  430|  19.4k|  if (begin - mantissa_begin == 1 && *mantissa_begin == '.') {
  ------------------
  |  Branch (430:7): [True: 4.77k, False: 14.6k]
  |  Branch (430:38): [True: 18, False: 4.76k]
  ------------------
  431|     18|    return result;
  432|     18|  }
  433|       |
  434|  19.4k|  if (mantissa_is_inexact) {
  ------------------
  |  Branch (434:7): [True: 9.05k, False: 10.3k]
  ------------------
  435|       |    // We dropped significant digits on the floor.  Handle this appropriately.
  436|  9.05k|    if (base == 10) {
  ------------------
  |  Branch (436:9): [True: 9.05k, 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|  9.05k|      result.subrange_begin = mantissa_begin;
  440|  9.05k|      result.subrange_end = begin;
  441|  9.05k|    } 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|  9.05k|  }
  447|  19.4k|  result.mantissa = mantissa;
  448|       |
  449|  19.4k|  const char* const exponent_begin = begin;
  450|  19.4k|  result.literal_exponent = 0;
  451|  19.4k|  bool found_exponent = false;
  452|  19.4k|  if (AllowExponent(format_flags) && begin < end &&
  ------------------
  |  Branch (452:7): [True: 19.4k, False: 0]
  |  Branch (452:38): [True: 9.97k, False: 9.45k]
  ------------------
  453|  9.97k|      IsExponentCharacter<base>(*begin)) {
  ------------------
  |  Branch (453:7): [True: 9.90k, False: 73]
  ------------------
  454|  9.90k|    bool negative_exponent = false;
  455|  9.90k|    ++begin;
  456|  9.90k|    if (begin < end && *begin == '-') {
  ------------------
  |  Branch (456:9): [True: 9.89k, False: 10]
  |  Branch (456:24): [True: 4.10k, False: 5.78k]
  ------------------
  457|  4.10k|      negative_exponent = true;
  458|  4.10k|      ++begin;
  459|  5.79k|    } else if (begin < end && *begin == '+') {
  ------------------
  |  Branch (459:16): [True: 5.78k, False: 10]
  |  Branch (459:31): [True: 1.46k, False: 4.31k]
  ------------------
  460|  1.46k|      ++begin;
  461|  1.46k|    }
  462|  9.90k|    const char* const exponent_digits_begin = begin;
  463|       |    // Exponent is always expressed in decimal, even for hexadecimal floats.
  464|  9.90k|    begin += ConsumeDigits<10>(begin, end, kDecimalExponentDigitsMax,
  465|  9.90k|                               &result.literal_exponent, nullptr);
  466|  9.90k|    if (begin == exponent_digits_begin) {
  ------------------
  |  Branch (466:9): [True: 35, False: 9.86k]
  ------------------
  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|     35|      found_exponent = false;
  470|     35|      begin = exponent_begin;
  471|  9.86k|    } else {
  472|  9.86k|      found_exponent = true;
  473|  9.86k|      if (negative_exponent) {
  ------------------
  |  Branch (473:11): [True: 4.10k, False: 5.76k]
  ------------------
  474|  4.10k|        result.literal_exponent = -result.literal_exponent;
  475|  4.10k|      }
  476|  9.86k|    }
  477|  9.90k|  }
  478|       |
  479|  19.4k|  if (!found_exponent && RequireExponent(format_flags)) {
  ------------------
  |  Branch (479:7): [True: 9.56k, False: 9.86k]
  |  Branch (479:26): [True: 0, False: 9.56k]
  ------------------
  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|  19.4k|  result.type = strings_internal::FloatType::kNumber;
  487|  19.4k|  if (result.mantissa > 0) {
  ------------------
  |  Branch (487:7): [True: 17.5k, False: 1.83k]
  ------------------
  488|  17.5k|    result.exponent = result.literal_exponent +
  489|  17.5k|                      (DigitMagnitude<base>() * exponent_adjustment);
  490|  17.5k|  } else {
  491|  1.83k|    result.exponent = 0;
  492|  1.83k|  }
  493|  19.4k|  result.end = begin;
  494|  19.4k|  return result;
  495|  19.4k|}
_ZN4absl12lts_2026052616strings_internal10ParseFloatILi16EEENS1_11ParsedFloatEPKcS5_NS0_12chars_formatE:
  356|  5.00k|                                         chars_format format_flags) {
  357|  5.00k|  strings_internal::ParsedFloat result;
  358|       |
  359|       |  // Exit early if we're given an empty range.
  360|  5.00k|  if (begin == end) return result;
  ------------------
  |  Branch (360:7): [True: 4, False: 4.99k]
  ------------------
  361|       |
  362|       |  // Handle the infinity and NaN cases.
  363|  4.99k|  if (ParseInfinityOrNan(begin, end, &result)) {
  ------------------
  |  Branch (363:7): [True: 1, False: 4.99k]
  ------------------
  364|      1|    return result;
  365|      1|  }
  366|       |
  367|  4.99k|  const char* const mantissa_begin = begin;
  368|  6.00k|  while (begin < end && *begin == '0') {
  ------------------
  |  Branch (368:10): [True: 5.80k, False: 196]
  |  Branch (368:25): [True: 1.01k, False: 4.79k]
  ------------------
  369|  1.01k|    ++begin;  // skip leading zeros
  370|  1.01k|  }
  371|  4.99k|  uint64_t mantissa = 0;
  372|       |
  373|  4.99k|  int exponent_adjustment = 0;
  374|  4.99k|  bool mantissa_is_inexact = false;
  375|  4.99k|  int pre_decimal_digits = ConsumeDigits<base>(
  376|  4.99k|      begin, end, MantissaDigitsMax<base>(), &mantissa, &mantissa_is_inexact);
  377|  4.99k|  begin += pre_decimal_digits;
  378|  4.99k|  int digits_left;
  379|  4.99k|  if (pre_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (379:7): [True: 0, False: 4.99k]
  ------------------
  380|       |    // refuse to parse pathological inputs
  381|      0|    return result;
  382|  4.99k|  } else if (pre_decimal_digits > MantissaDigitsMax<base>()) {
  ------------------
  |  Branch (382:14): [True: 701, False: 4.29k]
  ------------------
  383|       |    // We dropped some non-fraction digits on the floor.  Adjust our exponent
  384|       |    // to compensate.
  385|    701|    exponent_adjustment =
  386|    701|        static_cast<int>(pre_decimal_digits - MantissaDigitsMax<base>());
  387|    701|    digits_left = 0;
  388|  4.29k|  } else {
  389|  4.29k|    digits_left =
  390|  4.29k|        static_cast<int>(MantissaDigitsMax<base>() - pre_decimal_digits);
  391|  4.29k|  }
  392|  4.99k|  if (begin < end && *begin == '.') {
  ------------------
  |  Branch (392:7): [True: 3.81k, False: 1.18k]
  |  Branch (392:22): [True: 1.81k, False: 1.99k]
  ------------------
  393|  1.81k|    ++begin;
  394|  1.81k|    if (mantissa == 0) {
  ------------------
  |  Branch (394:9): [True: 1.01k, False: 801]
  ------------------
  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.01k|      const char* begin_zeros = begin;
  398|  1.77k|      while (begin < end && *begin == '0') {
  ------------------
  |  Branch (398:14): [True: 1.34k, False: 431]
  |  Branch (398:29): [True: 763, False: 584]
  ------------------
  399|    763|        ++begin;
  400|    763|      }
  401|  1.01k|      int zeros_skipped = static_cast<int>(begin - begin_zeros);
  402|  1.01k|      if (zeros_skipped >= DigitLimit<base>()) {
  ------------------
  |  Branch (402:11): [True: 0, False: 1.01k]
  ------------------
  403|       |        // refuse to parse pathological inputs
  404|      0|        return result;
  405|      0|      }
  406|  1.01k|      exponent_adjustment -= static_cast<int>(zeros_skipped);
  407|  1.01k|    }
  408|  1.81k|    int post_decimal_digits = ConsumeDigits<base>(
  409|  1.81k|        begin, end, digits_left, &mantissa, &mantissa_is_inexact);
  410|  1.81k|    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|  1.81k|    if (post_decimal_digits >= DigitLimit<base>()) {
  ------------------
  |  Branch (416:9): [True: 0, False: 1.81k]
  ------------------
  417|       |      // refuse to parse pathological inputs
  418|      0|      return result;
  419|  1.81k|    } else if (post_decimal_digits > digits_left) {
  ------------------
  |  Branch (419:16): [True: 547, False: 1.26k]
  ------------------
  420|    547|      exponent_adjustment -= digits_left;
  421|  1.26k|    } else {
  422|  1.26k|      exponent_adjustment -= post_decimal_digits;
  423|  1.26k|    }
  424|  1.81k|  }
  425|       |  // If we've found no mantissa whatsoever, this isn't a number.
  426|  4.99k|  if (mantissa_begin == begin) {
  ------------------
  |  Branch (426:7): [True: 5, False: 4.99k]
  ------------------
  427|      5|    return result;
  428|      5|  }
  429|       |  // A bare "." doesn't count as a mantissa either.
  430|  4.99k|  if (begin - mantissa_begin == 1 && *mantissa_begin == '.') {
  ------------------
  |  Branch (430:7): [True: 2.43k, False: 2.55k]
  |  Branch (430:38): [True: 14, False: 2.42k]
  ------------------
  431|     14|    return result;
  432|     14|  }
  433|       |
  434|  4.97k|  if (mantissa_is_inexact) {
  ------------------
  |  Branch (434:7): [True: 798, False: 4.17k]
  ------------------
  435|       |    // We dropped significant digits on the floor.  Handle this appropriately.
  436|    798|    if (base == 10) {
  ------------------
  |  Branch (436:9): [Folded, False: 798]
  ------------------
  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|    798|    } else if (base == 16) {
  ------------------
  |  Branch (441:16): [True: 798, 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|    798|      mantissa |= 1;
  445|    798|    }
  446|    798|  }
  447|  4.97k|  result.mantissa = mantissa;
  448|       |
  449|  4.97k|  const char* const exponent_begin = begin;
  450|  4.97k|  result.literal_exponent = 0;
  451|  4.97k|  bool found_exponent = false;
  452|  4.97k|  if (AllowExponent(format_flags) && begin < end &&
  ------------------
  |  Branch (452:7): [True: 4.97k, False: 0]
  |  Branch (452:38): [True: 2.19k, False: 2.78k]
  ------------------
  453|  2.19k|      IsExponentCharacter<base>(*begin)) {
  ------------------
  |  Branch (453:7): [True: 2.17k, False: 19]
  ------------------
  454|  2.17k|    bool negative_exponent = false;
  455|  2.17k|    ++begin;
  456|  2.17k|    if (begin < end && *begin == '-') {
  ------------------
  |  Branch (456:9): [True: 2.16k, False: 10]
  |  Branch (456:24): [True: 1.33k, False: 826]
  ------------------
  457|  1.33k|      negative_exponent = true;
  458|  1.33k|      ++begin;
  459|  1.33k|    } else if (begin < end && *begin == '+') {
  ------------------
  |  Branch (459:16): [True: 826, False: 10]
  |  Branch (459:31): [True: 195, False: 631]
  ------------------
  460|    195|      ++begin;
  461|    195|    }
  462|  2.17k|    const char* const exponent_digits_begin = begin;
  463|       |    // Exponent is always expressed in decimal, even for hexadecimal floats.
  464|  2.17k|    begin += ConsumeDigits<10>(begin, end, kDecimalExponentDigitsMax,
  465|  2.17k|                               &result.literal_exponent, nullptr);
  466|  2.17k|    if (begin == exponent_digits_begin) {
  ------------------
  |  Branch (466:9): [True: 23, False: 2.14k]
  ------------------
  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.14k|    } else {
  472|  2.14k|      found_exponent = true;
  473|  2.14k|      if (negative_exponent) {
  ------------------
  |  Branch (473:11): [True: 1.33k, False: 816]
  ------------------
  474|  1.33k|        result.literal_exponent = -result.literal_exponent;
  475|  1.33k|      }
  476|  2.14k|    }
  477|  2.17k|  }
  478|       |
  479|  4.97k|  if (!found_exponent && RequireExponent(format_flags)) {
  ------------------
  |  Branch (479:7): [True: 2.82k, False: 2.14k]
  |  Branch (479:26): [True: 0, False: 2.82k]
  ------------------
  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.97k|  result.type = strings_internal::FloatType::kNumber;
  487|  4.97k|  if (result.mantissa > 0) {
  ------------------
  |  Branch (487:7): [True: 4.02k, False: 948]
  ------------------
  488|  4.02k|    result.exponent = result.literal_exponent +
  489|  4.02k|                      (DigitMagnitude<base>() * exponent_adjustment);
  490|  4.02k|  } else {
  491|    948|    result.exponent = 0;
  492|    948|  }
  493|  4.97k|  result.end = begin;
  494|  4.97k|  return result;
  495|  4.97k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_113AllowExponentENS0_12chars_formatE:
  122|  24.4k|bool AllowExponent(chars_format flags) {
  123|  24.4k|  bool fixed = (flags & chars_format::fixed) == chars_format::fixed;
  124|  24.4k|  bool scientific =
  125|  24.4k|      (flags & chars_format::scientific) == chars_format::scientific;
  126|  24.4k|  return scientific || !fixed;
  ------------------
  |  Branch (126:10): [True: 24.4k, False: 0]
  |  Branch (126:24): [True: 0, False: 0]
  ------------------
  127|  24.4k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_115RequireExponentENS0_12chars_formatE:
  130|  12.3k|bool RequireExponent(chars_format flags) {
  131|  12.3k|  bool fixed = (flags & chars_format::fixed) == chars_format::fixed;
  132|  12.3k|  bool scientific =
  133|  12.3k|      (flags & chars_format::scientific) == chars_format::scientific;
  134|  12.3k|  return scientific && !fixed;
  ------------------
  |  Branch (134:10): [True: 12.3k, False: 0]
  |  Branch (134:24): [True: 0, False: 12.3k]
  ------------------
  135|  12.3k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_119IsExponentCharacterILi10EEEbc:
  201|  9.97k|bool IsExponentCharacter<10>(char ch) {
  202|  9.97k|  return ch == 'e' || ch == 'E';
  ------------------
  |  Branch (202:10): [True: 8.43k, False: 1.54k]
  |  Branch (202:23): [True: 1.47k, False: 73]
  ------------------
  203|  9.97k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_119IsExponentCharacterILi16EEEbc:
  206|  2.19k|bool IsExponentCharacter<16>(char ch) {
  207|  2.19k|  return ch == 'p' || ch == 'P';
  ------------------
  |  Branch (207:10): [True: 843, False: 1.34k]
  |  Branch (207:23): [True: 1.32k, False: 19]
  ------------------
  208|  2.19k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_117MantissaDigitsMaxILi10EEEiv:
  211|  58.5k|constexpr int MantissaDigitsMax<10>() {
  212|  58.5k|  return kDecimalMantissaDigitsMax;
  213|  58.5k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_117MantissaDigitsMaxILi16EEEiv:
  215|  14.9k|constexpr int MantissaDigitsMax<16>() {
  216|  14.9k|  return kHexadecimalMantissaDigitsMax;
  217|  14.9k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_110DigitLimitILi10EEEiv:
  220|  31.7k|constexpr int DigitLimit<10>() {
  221|  31.7k|  return kDecimalDigitLimit;
  222|  31.7k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_110DigitLimitILi16EEEiv:
  224|  7.82k|constexpr int DigitLimit<16>() {
  225|  7.82k|  return kHexadecimalDigitLimit;
  226|  7.82k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_114DigitMagnitudeILi10EEEiv:
  229|  17.5k|constexpr int DigitMagnitude<10>() {
  230|  17.5k|  return 1;
  231|  17.5k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_114DigitMagnitudeILi16EEEiv:
  233|  4.02k|constexpr int DigitMagnitude<16>() {
  234|  4.02k|  return 4;
  235|  4.02k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_118ParseInfinityOrNanEPKcS3_PNS0_16strings_internal11ParsedFloatE:
  298|  25.9k|                        strings_internal::ParsedFloat* out) {
  299|  25.9k|  if (end - begin < 3) {
  ------------------
  |  Branch (299:7): [True: 4.30k, False: 21.6k]
  ------------------
  300|  4.30k|    return false;
  301|  4.30k|  }
  302|  21.6k|  switch (*begin) {
  303|    522|    case 'i':
  ------------------
  |  Branch (303:5): [True: 522, False: 21.1k]
  ------------------
  304|    726|    case 'I': {
  ------------------
  |  Branch (304:5): [True: 204, False: 21.4k]
  ------------------
  305|       |      // An infinity string consists of the characters "inf" or "infinity",
  306|       |      // case insensitive.
  307|    726|      if (strings_internal::memcasecmp(begin + 1, "nf", 2) != 0) {
  ------------------
  |  Branch (307:11): [True: 23, False: 703]
  ------------------
  308|     23|        return false;
  309|     23|      }
  310|    703|      out->type = strings_internal::FloatType::kInfinity;
  311|    703|      if (end - begin >= 8 &&
  ------------------
  |  Branch (311:11): [True: 23, False: 680]
  ------------------
  312|     23|          strings_internal::memcasecmp(begin + 3, "inity", 5) == 0) {
  ------------------
  |  Branch (312:11): [True: 1, False: 22]
  ------------------
  313|      1|        out->end = begin + 8;
  314|    702|      } else {
  315|    702|        out->end = begin + 3;
  316|    702|      }
  317|    703|      return true;
  318|    726|    }
  319|    207|    case 'n':
  ------------------
  |  Branch (319:5): [True: 207, False: 21.4k]
  ------------------
  320|    726|    case 'N': {
  ------------------
  |  Branch (320:5): [True: 519, False: 21.1k]
  ------------------
  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|    726|      if (strings_internal::memcasecmp(begin + 1, "an", 2) != 0) {
  ------------------
  |  Branch (324:11): [True: 18, False: 708]
  ------------------
  325|     18|        return false;
  326|     18|      }
  327|    708|      out->type = strings_internal::FloatType::kNan;
  328|    708|      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|    708|      begin += 3;
  332|    708|      if (begin < end && *begin == '(') {
  ------------------
  |  Branch (332:11): [True: 2, False: 706]
  |  Branch (332:26): [True: 0, False: 2]
  ------------------
  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|    708|      return true;
  345|    726|    }
  346|  20.1k|    default:
  ------------------
  |  Branch (346:5): [True: 20.1k, False: 1.45k]
  ------------------
  347|  20.1k|      return false;
  348|  21.6k|  }
  349|  21.6k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_113ConsumeDigitsILi10EmEEiPKcS4_iPT0_Pb:
  250|  27.8k|                  bool* dropped_nonzero_digit) {
  251|  27.8k|  if (base == 10) {
  ------------------
  |  Branch (251:7): [True: 27.8k, Folded]
  ------------------
  252|  27.8k|    assert(max_digits <= std::numeric_limits<T>::digits10);
  253|  27.8k|  } else if (base == 16) {
  ------------------
  |  Branch (253:14): [Folded, False: 0]
  ------------------
  254|      0|    assert(max_digits * 4 <= std::numeric_limits<T>::digits);
  255|      0|  }
  256|  27.8k|  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|  27.8k|  while (!*out && end != begin && *begin == '0') ++begin;
  ------------------
  |  Branch (261:10): [True: 23.4k, False: 4.40k]
  |  Branch (261:19): [True: 22.2k, False: 1.15k]
  |  Branch (261:35): [True: 0, False: 22.2k]
  ------------------
  262|       |
  263|  27.8k|  T accumulator = *out;
  264|  27.8k|  const char* significant_digits_end =
  265|  27.8k|      (end - begin > max_digits) ? begin + max_digits : end;
  ------------------
  |  Branch (265:7): [True: 15.0k, False: 12.8k]
  ------------------
  266|   235k|  while (begin < significant_digits_end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (266:10): [True: 219k, False: 16.3k]
  |  Branch (266:44): [True: 207k, False: 11.4k]
  ------------------
  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|   207k|    auto digit = static_cast<T>(ToDigit<base>(*begin));
  270|   207k|    assert(accumulator * base >= accumulator);
  271|   207k|    accumulator *= base;
  272|   207k|    assert(accumulator + digit >= accumulator);
  273|   207k|    accumulator += digit;
  274|   207k|    ++begin;
  275|   207k|  }
  276|  27.8k|  bool dropped_nonzero = false;
  277|  1.65M|  while (begin < end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (277:10): [True: 1.64M, False: 9.46k]
  |  Branch (277:25): [True: 1.62M, False: 18.3k]
  ------------------
  278|  1.62M|    dropped_nonzero = dropped_nonzero || (*begin != '0');
  ------------------
  |  Branch (278:23): [True: 1.60M, False: 15.0k]
  |  Branch (278:42): [True: 11.2k, False: 3.79k]
  ------------------
  279|  1.62M|    ++begin;
  280|  1.62M|  }
  281|  27.8k|  if (dropped_nonzero && dropped_nonzero_digit != nullptr) {
  ------------------
  |  Branch (281:7): [True: 11.2k, False: 16.5k]
  |  Branch (281:26): [True: 11.2k, False: 0]
  ------------------
  282|  11.2k|    *dropped_nonzero_digit = true;
  283|  11.2k|  }
  284|  27.8k|  *out = accumulator;
  285|  27.8k|  return static_cast<int>(begin - original_begin);
  286|  27.8k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_17IsDigitILi10EEEbc:
  183|  1.89M|bool IsDigit<10>(char ch) {
  184|  1.89M|  return ch >= '0' && ch <= '9';
  ------------------
  |  Branch (184:10): [True: 1.88M, False: 13.8k]
  |  Branch (184:23): [True: 1.86M, False: 16.1k]
  ------------------
  185|  1.89M|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_17ToDigitILi10EEEjc:
  192|   240k|unsigned ToDigit<10>(char ch) {
  193|   240k|  return static_cast<unsigned>(ch - '0');
  194|   240k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_113ConsumeDigitsILi10EiEEiPKcS4_iPT0_Pb:
  250|  12.0k|                  bool* dropped_nonzero_digit) {
  251|  12.0k|  if (base == 10) {
  ------------------
  |  Branch (251:7): [True: 12.0k, Folded]
  ------------------
  252|  12.0k|    assert(max_digits <= std::numeric_limits<T>::digits10);
  253|  12.0k|  } else if (base == 16) {
  ------------------
  |  Branch (253:14): [Folded, False: 0]
  ------------------
  254|      0|    assert(max_digits * 4 <= std::numeric_limits<T>::digits);
  255|      0|  }
  256|  12.0k|  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|  13.1k|  while (!*out && end != begin && *begin == '0') ++begin;
  ------------------
  |  Branch (261:10): [True: 13.1k, False: 0]
  |  Branch (261:19): [True: 12.2k, False: 899]
  |  Branch (261:35): [True: 1.05k, False: 11.1k]
  ------------------
  262|       |
  263|  12.0k|  T accumulator = *out;
  264|  12.0k|  const char* significant_digits_end =
  265|  12.0k|      (end - begin > max_digits) ? begin + max_digits : end;
  ------------------
  |  Branch (265:7): [True: 317, False: 11.7k]
  ------------------
  266|  44.3k|  while (begin < significant_digits_end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (266:10): [True: 32.2k, False: 12.0k]
  |  Branch (266:44): [True: 32.2k, False: 48]
  ------------------
  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|  32.2k|    auto digit = static_cast<T>(ToDigit<base>(*begin));
  270|  32.2k|    assert(accumulator * base >= accumulator);
  271|  32.2k|    accumulator *= base;
  272|  32.2k|    assert(accumulator + digit >= accumulator);
  273|  32.2k|    accumulator += digit;
  274|  32.2k|    ++begin;
  275|  32.2k|  }
  276|  12.0k|  bool dropped_nonzero = false;
  277|  13.5k|  while (begin < end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (277:10): [True: 1.49k, False: 12.0k]
  |  Branch (277:25): [True: 1.44k, False: 51]
  ------------------
  278|  1.44k|    dropped_nonzero = dropped_nonzero || (*begin != '0');
  ------------------
  |  Branch (278:23): [True: 1.12k, False: 319]
  |  Branch (278:42): [True: 310, False: 9]
  ------------------
  279|  1.44k|    ++begin;
  280|  1.44k|  }
  281|  12.0k|  if (dropped_nonzero && dropped_nonzero_digit != nullptr) {
  ------------------
  |  Branch (281:7): [True: 310, False: 11.7k]
  |  Branch (281:26): [True: 0, False: 310]
  ------------------
  282|      0|    *dropped_nonzero_digit = true;
  283|      0|  }
  284|  12.0k|  *out = accumulator;
  285|  12.0k|  return static_cast<int>(begin - original_begin);
  286|  12.0k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_113ConsumeDigitsILi16EmEEiPKcS4_iPT0_Pb:
  250|  6.81k|                  bool* dropped_nonzero_digit) {
  251|  6.81k|  if (base == 10) {
  ------------------
  |  Branch (251:7): [Folded, False: 6.81k]
  ------------------
  252|      0|    assert(max_digits <= std::numeric_limits<T>::digits10);
  253|  6.81k|  } else if (base == 16) {
  ------------------
  |  Branch (253:14): [True: 6.81k, Folded]
  ------------------
  254|  6.81k|    assert(max_digits * 4 <= std::numeric_limits<T>::digits);
  255|  6.81k|  }
  256|  6.81k|  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.81k|  while (!*out && end != begin && *begin == '0') ++begin;
  ------------------
  |  Branch (261:10): [True: 6.01k, False: 801]
  |  Branch (261:19): [True: 5.38k, False: 627]
  |  Branch (261:35): [True: 0, False: 5.38k]
  ------------------
  262|       |
  263|  6.81k|  T accumulator = *out;
  264|  6.81k|  const char* significant_digits_end =
  265|  6.81k|      (end - begin > max_digits) ? begin + max_digits : end;
  ------------------
  |  Branch (265:7): [True: 1.38k, False: 5.42k]
  ------------------
  266|  28.6k|  while (begin < significant_digits_end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (266:10): [True: 25.2k, False: 3.32k]
  |  Branch (266:44): [True: 21.8k, False: 3.48k]
  ------------------
  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|  21.8k|    auto digit = static_cast<T>(ToDigit<base>(*begin));
  270|  21.8k|    assert(accumulator * base >= accumulator);
  271|  21.8k|    accumulator *= base;
  272|  21.8k|    assert(accumulator + digit >= accumulator);
  273|  21.8k|    accumulator += digit;
  274|  21.8k|    ++begin;
  275|  21.8k|  }
  276|  6.81k|  bool dropped_nonzero = false;
  277|  10.8k|  while (begin < end && IsDigit<base>(*begin)) {
  ------------------
  |  Branch (277:10): [True: 8.07k, False: 2.79k]
  |  Branch (277:25): [True: 4.06k, False: 4.01k]
  ------------------
  278|  4.06k|    dropped_nonzero = dropped_nonzero || (*begin != '0');
  ------------------
  |  Branch (278:23): [True: 2.36k, False: 1.69k]
  |  Branch (278:42): [True: 1.22k, False: 471]
  ------------------
  279|  4.06k|    ++begin;
  280|  4.06k|  }
  281|  6.81k|  if (dropped_nonzero && dropped_nonzero_digit != nullptr) {
  ------------------
  |  Branch (281:7): [True: 1.22k, False: 5.59k]
  |  Branch (281:26): [True: 1.22k, False: 0]
  ------------------
  282|  1.22k|    *dropped_nonzero_digit = true;
  283|  1.22k|  }
  284|  6.81k|  *out = accumulator;
  285|  6.81k|  return static_cast<int>(begin - original_begin);
  286|  6.81k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_17IsDigitILi16EEEbc:
  187|  33.3k|bool IsDigit<16>(char ch) {
  188|  33.3k|  return kAsciiToInt[static_cast<unsigned char>(ch)] >= 0;
  189|  33.3k|}
charconv_parse.cc:_ZN4absl12lts_2026052612_GLOBAL__N_17ToDigitILi16EEEjc:
  196|  21.8k|unsigned ToDigit<16>(char ch) {
  197|  21.8k|  return static_cast<unsigned>(kAsciiToInt[static_cast<unsigned char>(ch)]);
  198|  21.8k|}

_ZN4absl12lts_2026052616strings_internal33CalculateBase64EscapedLenInternalEmb:
   26|      2|size_t CalculateBase64EscapedLenInternal(size_t input_len, bool do_padding) {
   27|       |  // Base64 encodes three bytes of input at a time. If the input is not
   28|       |  // divisible by three, we pad as appropriate.
   29|       |  //
   30|       |  // Base64 encodes each three bytes of input into four bytes of output.
   31|      2|  constexpr size_t kMaxSize = (std::numeric_limits<size_t>::max() - 1) / 4 * 3;
   32|      2|  ABSL_INTERNAL_CHECK(input_len <= kMaxSize,
  ------------------
  |  |   85|      2|  do {                                                             \
  |  |   86|      2|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  190|      2|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 2]
  |  |  |  |  |  Branch (190:49): [Folded, False: 2]
  |  |  |  |  |  Branch (190: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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241: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]
  |  |  ------------------
  ------------------
   33|      2|                      "CalculateBase64EscapedLenInternal() overflow");
   34|      2|  size_t len = (input_len / 3) * 4;
   35|       |
   36|       |  // Since all base 64 input is an integral number of octets, only the following
   37|       |  // cases can arise:
   38|      2|  if (input_len % 3 == 0) {
  ------------------
  |  Branch (38:7): [True: 0, False: 2]
  ------------------
   39|       |    // (from https://tools.ietf.org/html/rfc3548)
   40|       |    // (1) the final quantum of encoding input is an integral multiple of 24
   41|       |    // bits; here, the final unit of encoded output will be an integral
   42|       |    // multiple of 4 characters with no "=" padding,
   43|      2|  } else if (input_len % 3 == 1) {
  ------------------
  |  Branch (43:14): [True: 0, False: 2]
  ------------------
   44|       |    // (from https://tools.ietf.org/html/rfc3548)
   45|       |    // (2) the final quantum of encoding input is exactly 8 bits; here, the
   46|       |    // final unit of encoded output will be two characters followed by two
   47|       |    // "=" padding characters, or
   48|      0|    len += 2;
   49|      0|    if (do_padding) {
  ------------------
  |  Branch (49:9): [True: 0, False: 0]
  ------------------
   50|      0|      len += 2;
   51|      0|    }
   52|      2|  } else {  // (input_len % 3 == 2)
   53|       |    // (from https://tools.ietf.org/html/rfc3548)
   54|       |    // (3) the final quantum of encoding input is exactly 16 bits; here, the
   55|       |    // final unit of encoded output will be three characters followed by one
   56|       |    // "=" padding character.
   57|      2|    len += 3;
   58|      2|    if (do_padding) {
  ------------------
  |  Branch (58:9): [True: 0, False: 2]
  ------------------
   59|      0|      len += 1;
   60|      0|    }
   61|      2|  }
   62|       |
   63|      2|  return len;
   64|      2|}

_ZN4absl12lts_2026052616strings_internal10memcasecmpEPKcS3_m:
   25|  1.47k|int memcasecmp(const char* s1, const char* s2, size_t len) {
   26|  1.47k|  const unsigned char* us1 = reinterpret_cast<const unsigned char*>(s1);
   27|  1.47k|  const unsigned char* us2 = reinterpret_cast<const unsigned char*>(s2);
   28|       |
   29|  4.36k|  for (size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (29:22): [True: 2.95k, False: 1.41k]
  ------------------
   30|  2.95k|    unsigned char c1 = us1[i];
   31|  2.95k|    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.95k|    if (c1 != c2) {
  ------------------
  |  Branch (36:9): [True: 725, False: 2.22k]
  ------------------
   37|    725|      c1 = c1 >= 'A' && c1 <= 'Z' ? c1 - 'A' + 'a' : c1;
  ------------------
  |  Branch (37:12): [True: 712, False: 13]
  |  Branch (37:25): [True: 680, False: 32]
  ------------------
   38|    725|      c2 = c2 >= 'A' && c2 <= 'Z' ? c2 - 'A' + 'a' : c2;
  ------------------
  |  Branch (38:12): [True: 725, False: 0]
  |  Branch (38:25): [True: 0, False: 725]
  ------------------
   39|    725|      const int diff = int{c1} - int{c2};
   40|    725|      if (diff != 0) return diff;
  ------------------
  |  Branch (40:11): [True: 63, False: 662]
  ------------------
   41|    725|    }
   42|  2.95k|  }
   43|  1.41k|  return 0;
   44|  1.47k|}

_ZN4absl12lts_2026052611StrContainsENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   47|      2|                        absl::string_view needle) noexcept {
   48|      2|  return haystack.find(needle, 0) != haystack.npos;
   49|      2|}
_ZN4absl12lts_2026052610StartsWithENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEES5_:
   59|     12|                                 absl::string_view prefix) noexcept {
   60|     12|  if (prefix.empty()) {
  ------------------
  |  Branch (60:7): [True: 0, False: 12]
  ------------------
   61|      0|    return true;
   62|      0|  }
   63|     12|  if (text.size() < prefix.size()) {
  ------------------
  |  Branch (63:7): [True: 0, False: 12]
  ------------------
   64|      0|    return false;
   65|      0|  }
   66|     12|  absl::string_view possible_match = text.substr(0, prefix.size());
   67|       |
   68|     12|  return possible_match == prefix;
   69|     12|}

_ZN4absl12lts_2026052610SimpleAtodENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEPd:
   86|  25.9k|bool SimpleAtod(absl::string_view str, double* absl_nonnull out) {
   87|  25.9k|  *out = 0.0;
   88|  25.9k|  str = StripAsciiWhitespace(str);
   89|  25.9k|  if (str.empty()) {
  ------------------
  |  Branch (89:7): [True: 2, False: 25.9k]
  ------------------
   90|       |    // absl::from_chars doesn't accept empty strings.
   91|      2|    return false;
   92|      2|  }
   93|       |  // std::from_chars doesn't accept an initial +, but SimpleAtod does, so if one
   94|       |  // is present, skip it, while avoiding accepting "+-0" as valid.
   95|  25.9k|  if (str[0] == '+') {
  ------------------
  |  Branch (95:7): [True: 598, False: 25.3k]
  ------------------
   96|    598|    str.remove_prefix(1);
   97|    598|    if (str.empty() || str[0] == '-') {
  ------------------
  |  Branch (97:9): [True: 1, False: 597]
  |  Branch (97:24): [True: 1, False: 596]
  ------------------
   98|      2|      return false;
   99|      2|    }
  100|    598|  }
  101|  25.9k|  auto result = absl::from_chars(str.data(), str.data() + str.size(), *out);
  102|  25.9k|  if (result.ec == std::errc::invalid_argument) {
  ------------------
  |  Branch (102:7): [True: 97, False: 25.8k]
  ------------------
  103|     97|    return false;
  104|     97|  }
  105|  25.8k|  if (result.ptr != str.data() + str.size()) {
  ------------------
  |  Branch (105:7): [True: 233, False: 25.6k]
  ------------------
  106|       |    // not all non-whitespace characters consumed
  107|    233|    return false;
  108|    233|  }
  109|       |  // from_chars() with DR 3081's current wording will return max() on
  110|       |  // overflow.  SimpleAtod returns infinity instead.
  111|  25.6k|  if (result.ec == std::errc::result_out_of_range) {
  ------------------
  |  Branch (111:7): [True: 3.82k, False: 21.7k]
  ------------------
  112|  3.82k|    if (*out > 1.0) {
  ------------------
  |  Branch (112:9): [True: 2.00k, False: 1.82k]
  ------------------
  113|  2.00k|      *out = std::numeric_limits<double>::infinity();
  114|  2.00k|    } else if (*out < -1.0) {
  ------------------
  |  Branch (114:16): [True: 233, False: 1.59k]
  ------------------
  115|    233|      *out = -std::numeric_limits<double>::infinity();
  116|    233|    }
  117|  3.82k|  }
  118|  25.6k|  return true;
  119|  25.8k|}
_ZN4absl12lts_2026052616numbers_internal18safe_strtou64_baseENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPmi:
 1625|  1.05k|                        int base) {
 1626|  1.05k|  return safe_uint_internal<uint64_t>(text, value, base);
 1627|  1.05k|}
numbers.cc:_ZN4absl12lts_2026052612_GLOBAL__N_124safe_parse_sign_and_baseEPNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPiPb:
 1168|  1.05k|    bool* absl_nonnull negative_ptr /*output*/) {
 1169|  1.05k|  if (text->data() == nullptr) {
  ------------------
  |  Branch (1169:7): [True: 0, False: 1.05k]
  ------------------
 1170|      0|    return false;
 1171|      0|  }
 1172|       |
 1173|  1.05k|  const char* start = text->data();
 1174|  1.05k|  const char* end = start + text->size();
 1175|  1.05k|  int base = *base_ptr;
 1176|       |
 1177|       |  // Consume whitespace.
 1178|  1.05k|  while (start < end &&
  ------------------
  |  Branch (1178:10): [True: 1.04k, False: 2]
  ------------------
 1179|  1.04k|         absl::ascii_isspace(static_cast<unsigned char>(start[0]))) {
  ------------------
  |  Branch (1179:10): [True: 0, False: 1.04k]
  ------------------
 1180|      0|    ++start;
 1181|      0|  }
 1182|  1.24k|  while (start < end &&
  ------------------
  |  Branch (1182:10): [True: 1.24k, False: 2]
  ------------------
 1183|  1.24k|         absl::ascii_isspace(static_cast<unsigned char>(end[-1]))) {
  ------------------
  |  Branch (1183:10): [True: 194, False: 1.04k]
  ------------------
 1184|    194|    --end;
 1185|    194|  }
 1186|  1.05k|  if (start >= end) {
  ------------------
  |  Branch (1186:7): [True: 2, False: 1.04k]
  ------------------
 1187|      2|    return false;
 1188|      2|  }
 1189|       |
 1190|       |  // Consume sign.
 1191|  1.04k|  *negative_ptr = (start[0] == '-');
 1192|  1.04k|  if (*negative_ptr || start[0] == '+') {
  ------------------
  |  Branch (1192:7): [True: 1, False: 1.04k]
  |  Branch (1192:24): [True: 391, False: 656]
  ------------------
 1193|    392|    ++start;
 1194|    392|    if (start >= end) {
  ------------------
  |  Branch (1194:9): [True: 10, False: 382]
  ------------------
 1195|     10|      return false;
 1196|     10|    }
 1197|    392|  }
 1198|       |
 1199|       |  // Consume base-dependent prefix.
 1200|       |  //  base 0: "0x" -> base 16, "0" -> base 8, default -> base 10
 1201|       |  //  base 16: "0x" -> base 16
 1202|       |  // Also validate the base.
 1203|  1.03k|  if (base == 0) {
  ------------------
  |  Branch (1203:7): [True: 0, False: 1.03k]
  ------------------
 1204|      0|    if (end - start >= 2 && start[0] == '0' &&
  ------------------
  |  Branch (1204:9): [True: 0, False: 0]
  |  Branch (1204:29): [True: 0, False: 0]
  ------------------
 1205|      0|        (start[1] == 'x' || start[1] == 'X')) {
  ------------------
  |  Branch (1205:10): [True: 0, False: 0]
  |  Branch (1205:29): [True: 0, False: 0]
  ------------------
 1206|      0|      base = 16;
 1207|      0|      start += 2;
 1208|      0|      if (start >= end) {
  ------------------
  |  Branch (1208:11): [True: 0, False: 0]
  ------------------
 1209|       |        // "0x" with no digits after is invalid.
 1210|      0|        return false;
 1211|      0|      }
 1212|      0|    } else if (end - start >= 1 && start[0] == '0') {
  ------------------
  |  Branch (1212:16): [True: 0, False: 0]
  |  Branch (1212:36): [True: 0, False: 0]
  ------------------
 1213|      0|      base = 8;
 1214|      0|      start += 1;
 1215|      0|    } else {
 1216|      0|      base = 10;
 1217|      0|    }
 1218|  1.03k|  } else if (base == 16) {
  ------------------
  |  Branch (1218:14): [True: 0, False: 1.03k]
  ------------------
 1219|      0|    if (end - start >= 2 && start[0] == '0' &&
  ------------------
  |  Branch (1219:9): [True: 0, False: 0]
  |  Branch (1219:29): [True: 0, False: 0]
  ------------------
 1220|      0|        (start[1] == 'x' || start[1] == 'X')) {
  ------------------
  |  Branch (1220:10): [True: 0, False: 0]
  |  Branch (1220:29): [True: 0, False: 0]
  ------------------
 1221|      0|      start += 2;
 1222|      0|      if (start >= end) {
  ------------------
  |  Branch (1222:11): [True: 0, False: 0]
  ------------------
 1223|       |        // "0x" with no digits after is invalid.
 1224|      0|        return false;
 1225|      0|      }
 1226|      0|    }
 1227|  1.03k|  } else if (base >= 2 && base <= 36) {
  ------------------
  |  Branch (1227:14): [True: 1.03k, False: 0]
  |  Branch (1227:27): [True: 1.03k, False: 0]
  ------------------
 1228|       |    // okay
 1229|  1.03k|  } else {
 1230|      0|    return false;
 1231|      0|  }
 1232|  1.03k|  *text = absl::string_view(start, static_cast<size_t>(end - start));
 1233|  1.03k|  *base_ptr = base;
 1234|  1.03k|  return true;
 1235|  1.03k|}
numbers.cc:_ZN4absl12lts_2026052612_GLOBAL__N_118safe_uint_internalImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPT_i:
 1550|  1.05k|                               IntType* absl_nonnull value_p, int base) {
 1551|  1.05k|  *value_p = 0;
 1552|  1.05k|  bool negative;
 1553|  1.05k|  if (!safe_parse_sign_and_base(&text, &base, &negative) || negative) {
  ------------------
  |  Branch (1553:7): [True: 12, False: 1.03k]
  |  Branch (1553:61): [True: 1, False: 1.03k]
  ------------------
 1554|     13|    return false;
 1555|     13|  }
 1556|  1.03k|  return safe_parse_positive_int(text, base, value_p);
 1557|  1.05k|}
numbers.cc:_ZN4absl12lts_2026052612_GLOBAL__N_123safe_parse_positive_intImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEiPT_:
 1453|  1.03k|                                    IntType* absl_nonnull value_p) {
 1454|  1.03k|  IntType value = 0;
 1455|  1.03k|  const IntType vmax = std::numeric_limits<IntType>::max();
 1456|  1.03k|  assert(vmax > 0);
 1457|  1.03k|  assert(base >= 0);
 1458|  1.03k|  const IntType base_inttype = static_cast<IntType>(base);
 1459|  1.03k|  assert(vmax >= base_inttype);
 1460|  1.03k|  const IntType vmax_over_base = LookupTables<IntType>::kVmaxOverBase[base];
 1461|  1.03k|  assert(base < 2 ||
 1462|  1.03k|         std::numeric_limits<IntType>::max() / base_inttype == vmax_over_base);
 1463|  1.03k|  const char* start = text.data();
 1464|  1.03k|  const char* end = start + text.size();
 1465|       |  // loop over digits
 1466|  5.09k|  for (; start < end; ++start) {
  ------------------
  |  Branch (1466:10): [True: 4.15k, False: 943]
  ------------------
 1467|  4.15k|    unsigned char c = static_cast<unsigned char>(start[0]);
 1468|  4.15k|    IntType digit = static_cast<IntType>(kAsciiToInt[c]);
 1469|  4.15k|    if (digit >= base_inttype) {
  ------------------
  |  Branch (1469:9): [True: 27, False: 4.12k]
  ------------------
 1470|     27|      *value_p = value;
 1471|     27|      return false;
 1472|     27|    }
 1473|  4.12k|    if (value > vmax_over_base) {
  ------------------
  |  Branch (1473:9): [True: 66, False: 4.06k]
  ------------------
 1474|     66|      *value_p = vmax;
 1475|     66|      return false;
 1476|     66|    }
 1477|  4.06k|    value *= base_inttype;
 1478|  4.06k|    if (value > vmax - digit) {
  ------------------
  |  Branch (1478:9): [True: 1, False: 4.06k]
  ------------------
 1479|      1|      *value_p = vmax;
 1480|      1|      return false;
 1481|      1|    }
 1482|  4.06k|    value += digit;
 1483|  4.06k|  }
 1484|    943|  *value_p = value;
 1485|    943|  return true;
 1486|  1.03k|}

_ZN4absl12lts_2026052616numbers_internal16safe_strtoi_baseImEEbNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEEPT_i:
  247|  1.05k|                                    int_type* absl_nonnull out, int base) {
  248|  1.05k|  static_assert(sizeof(*out) == 1 || sizeof(*out) == 2 || sizeof(*out) == 4 ||
  249|  1.05k|                    sizeof(*out) == 8,
  250|  1.05k|                "SimpleAtoi works only with 8, 16, 32, or 64-bit integers.");
  251|  1.05k|  static_assert(!std::is_floating_point<int_type>::value,
  252|  1.05k|                "Use SimpleAtof or SimpleAtod instead.");
  253|  1.05k|  bool parsed;
  254|       |  // These conditions are constexpr bools to suppress MSVC warning C4127.
  255|  1.05k|  constexpr bool kIsSigned = is_signed<int_type>();
  256|  1.05k|  constexpr int kIntTypeSize = sizeof(*out) * 8;
  257|  1.05k|  if (kIsSigned) {
  ------------------
  |  Branch (257:7): [Folded, False: 1.05k]
  ------------------
  258|      0|    if (kIntTypeSize == 64) {
  ------------------
  |  Branch (258:9): [True: 0, Folded]
  ------------------
  259|      0|      int64_t val;
  260|      0|      parsed = numbers_internal::safe_strto64_base(s, &val, base);
  261|      0|      *out = static_cast<int_type>(val);
  262|      0|    } else if (kIntTypeSize == 32) {
  ------------------
  |  Branch (262:16): [Folded, False: 0]
  ------------------
  263|      0|      int32_t val;
  264|      0|      parsed = numbers_internal::safe_strto32_base(s, &val, base);
  265|      0|      *out = static_cast<int_type>(val);
  266|      0|    } else if (kIntTypeSize == 16) {
  ------------------
  |  Branch (266:16): [Folded, False: 0]
  ------------------
  267|      0|      int16_t val;
  268|      0|      parsed = numbers_internal::safe_strto16_base(s, &val, base);
  269|      0|      *out = static_cast<int_type>(val);
  270|      0|    } else if (kIntTypeSize == 8) {
  ------------------
  |  Branch (270:16): [Folded, False: 0]
  ------------------
  271|      0|      int8_t val;
  272|      0|      parsed = numbers_internal::safe_strto8_base(s, &val, base);
  273|      0|      *out = static_cast<int_type>(val);
  274|      0|    }
  275|  1.05k|  } else {
  276|  1.05k|    if (kIntTypeSize == 64) {
  ------------------
  |  Branch (276:9): [True: 1.05k, Folded]
  ------------------
  277|  1.05k|      uint64_t val;
  278|  1.05k|      parsed = numbers_internal::safe_strtou64_base(s, &val, base);
  279|  1.05k|      *out = static_cast<int_type>(val);
  280|  1.05k|    } else if (kIntTypeSize == 32) {
  ------------------
  |  Branch (280:16): [Folded, False: 0]
  ------------------
  281|      0|      uint32_t val;
  282|      0|      parsed = numbers_internal::safe_strtou32_base(s, &val, base);
  283|      0|      *out = static_cast<int_type>(val);
  284|      0|    } else if (kIntTypeSize == 16) {
  ------------------
  |  Branch (284:16): [Folded, False: 0]
  ------------------
  285|      0|      uint16_t val;
  286|      0|      parsed = numbers_internal::safe_strtou16_base(s, &val, base);
  287|      0|      *out = static_cast<int_type>(val);
  288|      0|    } else if (kIntTypeSize == 8) {
  ------------------
  |  Branch (288:16): [Folded, False: 0]
  ------------------
  289|      0|      uint8_t val;
  290|      0|      parsed = numbers_internal::safe_strtou8_base(s, &val, base);
  291|      0|      *out = static_cast<int_type>(val);
  292|      0|    }
  293|  1.05k|  }
  294|  1.05k|  return parsed;
  295|  1.05k|}
_ZN4absl12lts_2026052610SimpleAtoiImEEbNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEPT_:
  330|  1.04k|                              int_type* absl_nonnull out) {
  331|  1.04k|  return numbers_internal::safe_strtoi_base(str, out, 10);
  332|  1.04k|}

escaping.cc:_ZN4absl12lts_2026052624StringResizeAndOverwriteINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEZNS0_12_GLOBAL__N_128Base64EscapeToStringInternalEPKhmbPKcE3$_0EEvRT_NSF_9size_typeET0_:
  186|      2|void StringResizeAndOverwrite(T& str, typename T::size_type n, Op op) {
  187|      2|  strings_internal::StringResizeAndOverwriteImpl(str, n, std::move(op));
  188|       |#if defined(ABSL_HAVE_MEMORY_SANITIZER)
  189|       |  __msan_check_mem_is_initialized(str.data(), str.size());
  190|       |#endif
  191|      2|}
escaping.cc:_ZN4absl12lts_2026052616strings_internal28StringResizeAndOverwriteImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEZNS0_12_GLOBAL__N_128Base64EscapeToStringInternalEPKhmbPKcE3$_0EEvRT_NSG_9size_typeET0_:
  149|      2|void StringResizeAndOverwriteImpl(T& str, typename T::size_type n, Op op) {
  150|       |#ifdef ABSL_INTERNAL_HAS_RESIZE_AND_OVERWRITE
  151|       |  str.resize_and_overwrite(n, std::move(op));
  152|       |#else
  153|       |  if constexpr (strings_internal::
  154|       |                    has__google_nonstandard_backport_resize_and_overwrite<
  155|       |                        T>::value) {
  156|       |    str.__google_nonstandard_backport_resize_and_overwrite(n, std::move(op));
  157|       |  } else if constexpr (strings_internal::has__resize_and_overwrite<T>::value) {
  158|       |    str.__resize_and_overwrite(n, std::move(op));
  159|      2|  } else if constexpr (strings_internal::has__resize_default_init<T>::value) {
  160|      2|    str.__resize_default_init(n);
  161|      2|    str.__resize_default_init(
  162|      2|        static_cast<typename T::size_type>(std::move(op)(str.data(), n)));
  163|       |  } else if constexpr (strings_internal::has_Resize_and_overwrite<T>::value) {
  164|       |    str._Resize_and_overwrite(n, std::move(op));
  165|       |  } else {
  166|       |    strings_internal::StringResizeAndOverwriteFallback(str, n, std::move(op));
  167|       |  }
  168|      2|#endif
  169|      2|}
str_cat.cc:_ZN4absl12lts_2026052624StringResizeAndOverwriteINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEZNS0_6StrCatERKNS0_8AlphaNumESB_SB_E3$_0EEvRT_NSD_9size_typeET0_:
  186|     50|void StringResizeAndOverwrite(T& str, typename T::size_type n, Op op) {
  187|     50|  strings_internal::StringResizeAndOverwriteImpl(str, n, std::move(op));
  188|       |#if defined(ABSL_HAVE_MEMORY_SANITIZER)
  189|       |  __msan_check_mem_is_initialized(str.data(), str.size());
  190|       |#endif
  191|     50|}
str_cat.cc:_ZN4absl12lts_2026052616strings_internal28StringResizeAndOverwriteImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEZNS0_6StrCatERKNS0_8AlphaNumESC_SC_E3$_0EEvRT_NSE_9size_typeET0_:
  149|     50|void StringResizeAndOverwriteImpl(T& str, typename T::size_type n, Op op) {
  150|       |#ifdef ABSL_INTERNAL_HAS_RESIZE_AND_OVERWRITE
  151|       |  str.resize_and_overwrite(n, std::move(op));
  152|       |#else
  153|       |  if constexpr (strings_internal::
  154|       |                    has__google_nonstandard_backport_resize_and_overwrite<
  155|       |                        T>::value) {
  156|       |    str.__google_nonstandard_backport_resize_and_overwrite(n, std::move(op));
  157|       |  } else if constexpr (strings_internal::has__resize_and_overwrite<T>::value) {
  158|       |    str.__resize_and_overwrite(n, std::move(op));
  159|     50|  } else if constexpr (strings_internal::has__resize_default_init<T>::value) {
  160|     50|    str.__resize_default_init(n);
  161|     50|    str.__resize_default_init(
  162|     50|        static_cast<typename T::size_type>(std::move(op)(str.data(), n)));
  163|       |  } else if constexpr (strings_internal::has_Resize_and_overwrite<T>::value) {
  164|       |    str._Resize_and_overwrite(n, std::move(op));
  165|       |  } else {
  166|       |    strings_internal::StringResizeAndOverwriteFallback(str, n, std::move(op));
  167|       |  }
  168|     50|#endif
  169|     50|}

_ZN4absl12lts_202605266StrCatERKNS0_8AlphaNumES3_S3_:
   77|     50|std::string StrCat(const AlphaNum& a, const AlphaNum& b, const AlphaNum& c) {
   78|     50|  std::string result;
   79|       |  // Use uint64_t to prevent size_t overflow. We assume it is not possible for
   80|       |  // in memory strings to overflow a uint64_t.
   81|     50|  constexpr uint64_t kMaxSize = uint64_t{std::numeric_limits<size_t>::max()};
   82|     50|  const uint64_t result_size = static_cast<uint64_t>(a.size()) +
   83|     50|                               static_cast<uint64_t>(b.size()) +
   84|     50|                               static_cast<uint64_t>(c.size());
   85|     50|  ABSL_INTERNAL_CHECK(result_size <= kMaxSize, "size_t overflow");
  ------------------
  |  |   85|     50|  do {                                                             \
  |  |   86|     50|    if (ABSL_PREDICT_FALSE(!(condition))) {                        \
  |  |  ------------------
  |  |  |  |  190|     50|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 50]
  |  |  |  |  |  Branch (190:49): [Folded, False: 50]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 50]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   82|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (82:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|      0|    }                                                              \
  |  |   91|     50|  } while (0)
  |  |  ------------------
  |  |  |  Branch (91:12): [Folded, False: 50]
  |  |  ------------------
  ------------------
   86|     50|  absl::StringResizeAndOverwrite(
   87|     50|      result, static_cast<size_t>(result_size),
   88|     50|      [&a, &b, &c](char* const begin, size_t buf_size) {
   89|     50|        char* out = begin;
   90|     50|        out = Append(out, a);
   91|     50|        out = Append(out, b);
   92|     50|        out = Append(out, c);
   93|     50|        assert(out == begin + buf_size);
   94|     50|        return buf_size;
   95|     50|      });
   96|     50|  return result;
   97|     50|}
str_cat.cc:_ZN4absl12lts_2026052612_GLOBAL__N_16AppendEPcRKNS0_8AlphaNumE:
   46|    150|inline char* absl_nonnull Append(char* absl_nonnull 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|    150|  char* after = out + x.size();
   50|    150|  if (x.size() != 0) {
  ------------------
  |  Branch (50:7): [True: 150, False: 0]
  ------------------
   51|    150|    memcpy(out, x.data(), x.size());
   52|    150|  }
   53|    150|  return after;
   54|    150|}
str_cat.cc:_ZZN4absl12lts_202605266StrCatERKNS0_8AlphaNumES3_S3_ENK3$_0clEPcm:
   88|     50|      [&a, &b, &c](char* const begin, size_t buf_size) {
   89|     50|        char* out = begin;
   90|     50|        out = Append(out, a);
   91|     50|        out = Append(out, b);
   92|     50|        out = Append(out, c);
   93|       |        assert(out == begin + buf_size);
   94|     50|        return buf_size;
   95|     50|      });

_ZN4absl12lts_202605268AlphaNumC2EPKc:
  400|     54|      : piece_(NullSafeStringView(c_str)) {}
_ZN4absl12lts_202605268AlphaNumC2ENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  403|     84|      : piece_(pc) {}
_ZNK4absl12lts_202605268AlphaNum4sizeEv:
  430|    600|  absl::string_view::size_type size() const { return piece_.size(); }
_ZNK4absl12lts_202605268AlphaNum4dataEv:
  431|    150|  const char* absl_nullable data() const { return piece_.data(); }
_ZN4absl12lts_202605268AlphaNumC2INSt3__19allocatorIcEEEERKNS3_12basic_stringIcNS3_11char_traitsIcEET_EE:
  422|     12|      : piece_(str) {}

_ZN4absl12lts_2026052618NullSafeStringViewEPKc:
   53|     54|constexpr string_view NullSafeStringView(const char* absl_nullable p) {
   54|     54|  return p ? string_view(p) : string_view();
  ------------------
  |  Branch (54:10): [True: 54, False: 0]
  ------------------
   55|     54|}

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

_ZN4absl12lts_2026052624synchronization_internal14InvalidGraphIdEv:
   58|    240|inline GraphId InvalidGraphId() {
   59|    240|  return GraphId{0};
   60|    240|}

_ZN4absl12lts_202605265Mutex4lockEv:
 1530|    240|void Mutex::lock() {
 1531|    240|  ABSL_TSAN_MUTEX_PRE_LOCK(this, 0);
 1532|    240|  GraphId id = DebugOnlyDeadlockCheck(this);
 1533|    240|  intptr_t v = mu_.load(std::memory_order_relaxed);
 1534|       |  // try fast acquire, then spin loop
 1535|    240|  if (ABSL_PREDICT_FALSE((v & (kMuWriter | kMuReader | kMuEvent)) != 0) ||
  ------------------
  |  |  190|    480|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 240]
  |  |  |  Branch (190:49): [Folded, False: 240]
  |  |  |  Branch (190:58): [True: 0, False: 240]
  |  |  ------------------
  ------------------
 1536|    240|      ABSL_PREDICT_FALSE(!mu_.compare_exchange_strong(
  ------------------
  |  |  190|    240|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 240]
  |  |  |  Branch (190:49): [Folded, False: 240]
  |  |  |  Branch (190:58): [True: 0, False: 240]
  |  |  ------------------
  ------------------
 1537|    240|          v, kMuWriter | v, std::memory_order_acquire,
 1538|    240|          std::memory_order_relaxed))) {
 1539|       |    // try spin acquire, then slow loop
 1540|      0|    if (ABSL_PREDICT_FALSE(!TryAcquireWithSpinning(&this->mu_))) {
  ------------------
  |  |  190|      0|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  Branch (190:49): [Folded, False: 0]
  |  |  |  Branch (190:58): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1541|      0|      this->LockSlow(kExclusive, nullptr, 0);
 1542|      0|    }
 1543|      0|  }
 1544|    240|  DebugOnlyLockEnter(this, id);
 1545|    240|  ABSL_TSAN_MUTEX_POST_LOCK(this, 0, 0);
 1546|    240|}
_ZN4absl12lts_202605265Mutex6unlockEv:
 1708|    240|void Mutex::unlock() {
 1709|    240|  ABSL_TSAN_MUTEX_PRE_UNLOCK(this, 0);
 1710|    240|  DebugOnlyLockLeave(this);
 1711|    240|  intptr_t v = mu_.load(std::memory_order_relaxed);
 1712|       |
 1713|    240|  if (kDebugMode && ((v & (kMuWriter | kMuReader)) != kMuWriter)) {
  ------------------
  |  Branch (1713:7): [Folded, False: 240]
  |  Branch (1713:21): [True: 0, False: 0]
  ------------------
 1714|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1715|      0|                 static_cast<unsigned>(v));
 1716|      0|  }
 1717|       |
 1718|       |  // should_try_cas is whether we'll try a compare-and-swap immediately.
 1719|       |  // NOTE: optimized out when kDebugMode is false.
 1720|    240|  bool should_try_cas = ((v & (kMuEvent | kMuWriter)) == kMuWriter &&
  ------------------
  |  Branch (1720:26): [True: 240, False: 0]
  ------------------
 1721|    240|                         (v & (kMuWait | kMuDesig)) != kMuWait);
  ------------------
  |  Branch (1721:26): [True: 240, False: 0]
  ------------------
 1722|       |
 1723|       |  // But, we can use an alternate computation of it, that compilers
 1724|       |  // currently don't find on their own.  When that changes, this function
 1725|       |  // can be simplified.
 1726|       |  //
 1727|       |  // should_try_cas is true iff the bits satisfy the following conditions:
 1728|       |  //
 1729|       |  //                   Ev Wr Wa De
 1730|       |  // equal to           0  1
 1731|       |  // and not equal to         1  0
 1732|       |  //
 1733|       |  // after xoring by    0  1  0  1,  this is equivalent to:
 1734|       |  //
 1735|       |  // equal to           0  0
 1736|       |  // and not equal to         1  1,  which is the same as:
 1737|       |  //
 1738|       |  // smaller than       0  0  1  1
 1739|    240|  static_assert(kMuEvent > kMuWait, "Needed for should_try_cas_fast");
 1740|    240|  static_assert(kMuEvent > kMuDesig, "Needed for should_try_cas_fast");
 1741|    240|  static_assert(kMuWriter > kMuWait, "Needed for should_try_cas_fast");
 1742|    240|  static_assert(kMuWriter > kMuDesig, "Needed for should_try_cas_fast");
 1743|       |
 1744|    240|  bool should_try_cas_fast =
 1745|    240|      ((v ^ (kMuWriter | kMuDesig)) &
 1746|    240|       (kMuEvent | kMuWriter | kMuWait | kMuDesig)) < (kMuWait | kMuDesig);
 1747|       |
 1748|    240|  if (kDebugMode && should_try_cas != should_try_cas_fast) {
  ------------------
  |  Branch (1748:7): [Folded, False: 240]
  |  Branch (1748:21): [True: 0, False: 0]
  ------------------
 1749|       |    // We would usually use PRIdPTR here, but is not correctly implemented
 1750|       |    // within the android toolchain.
 1751|      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()
  |  |  |  |  ------------------
  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   52|      0|  } while (0)
  |  |  ------------------
  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1752|      0|                 static_cast<long long>(v),
 1753|      0|                 static_cast<long long>(should_try_cas),
 1754|      0|                 static_cast<long long>(should_try_cas_fast));
 1755|      0|  }
 1756|    240|  if (should_try_cas_fast &&
  ------------------
  |  Branch (1756:7): [True: 240, False: 0]
  ------------------
 1757|    240|      mu_.compare_exchange_strong(v, v & ~(kMuWrWait | kMuWriter),
  ------------------
  |  Branch (1757:7): [True: 240, False: 0]
  ------------------
 1758|    240|                                  std::memory_order_release,
 1759|    240|                                  std::memory_order_relaxed)) {
 1760|       |    // fast writer release (writer with no waiters or with designated waker)
 1761|    240|  } else {
 1762|      0|    this->UnlockSlow(nullptr /*no waitp*/);  // take slow path
 1763|      0|  }
 1764|    240|  ABSL_TSAN_MUTEX_POST_UNLOCK(this, 0);
 1765|    240|}
mutex.cc:_ZN4absl12lts_20260526L22DebugOnlyDeadlockCheckEPNS0_5MutexE:
 1472|    240|static inline GraphId DebugOnlyDeadlockCheck(Mutex* mu) {
 1473|    240|  if (kDebugMode && synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1473:7): [Folded, False: 240]
  |  Branch (1473:21): [True: 0, False: 0]
  ------------------
 1474|      0|                        OnDeadlockCycle::kIgnore) {
 1475|      0|    return DeadlockCheck(mu);
 1476|    240|  } else {
 1477|    240|    return InvalidGraphId();
 1478|    240|  }
 1479|    240|}
mutex.cc:_ZN4absl12lts_20260526L18DebugOnlyLockEnterEPNS0_5MutexENS0_24synchronization_internal7GraphIdE:
 1305|    240|static inline void DebugOnlyLockEnter(Mutex* mu, GraphId id) {
 1306|    240|  if (kDebugMode) {
  ------------------
  |  Branch (1306:7): [Folded, False: 240]
  ------------------
 1307|      0|    if (synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1307:9): [True: 0, False: 0]
  ------------------
 1308|      0|        OnDeadlockCycle::kIgnore) {
 1309|      0|      LockEnter(mu, id, Synch_GetAllLocks());
 1310|      0|    }
 1311|      0|  }
 1312|    240|}
mutex.cc:_ZN4absl12lts_20260526L18DebugOnlyLockLeaveEPNS0_5MutexE:
 1315|    240|static inline void DebugOnlyLockLeave(Mutex* mu) {
 1316|    240|  if (kDebugMode) {
  ------------------
  |  Branch (1316:7): [Folded, False: 240]
  ------------------
 1317|      0|    if (synch_deadlock_detection.load(std::memory_order_acquire) !=
  ------------------
  |  Branch (1317:9): [True: 0, False: 0]
  ------------------
 1318|      0|        OnDeadlockCycle::kIgnore) {
 1319|      0|      LockLeave(mu, GetGraphId(mu), Synch_GetAllLocks());
 1320|      0|    }
 1321|      0|  }
 1322|    240|}

_ZN4absl12lts_202605269MutexLockC2ERNS0_5MutexE:
  626|    174|      : mu_(mu) {
  627|    174|    this->mu_.lock();
  628|    174|  }
_ZN4absl12lts_202605269MutexLockD2Ev:
  658|    174|  ~MutexLock() ABSL_UNLOCK_FUNCTION() { this->mu_.unlock(); }
_ZN4absl12lts_202605265MutexC2Ev:
 1186|     74|inline Mutex::Mutex() : mu_(0) {
 1187|     74|  ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static);
 1188|     74|}

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

_ZN4absl12lts_202605268DurationmIES1_:
  436|  26.6k|Duration& Duration::operator-=(Duration rhs) {
  437|  26.6k|  if (time_internal::IsInfiniteDuration(*this)) return *this;
  ------------------
  |  Branch (437:7): [True: 0, False: 26.6k]
  ------------------
  438|  26.6k|  if (time_internal::IsInfiniteDuration(rhs)) {
  ------------------
  |  Branch (438:7): [True: 0, False: 26.6k]
  ------------------
  439|      0|    return *this = rhs.rep_hi_.Get() >= 0 ? -InfiniteDuration()
  ------------------
  |  Branch (439:20): [True: 0, False: 0]
  ------------------
  440|      0|                                          : InfiniteDuration();
  441|      0|  }
  442|  26.6k|  const int64_t orig_rep_hi = rep_hi_.Get();
  443|  26.6k|  rep_hi_ = DecodeTwosComp(EncodeTwosComp(rep_hi_.Get()) -
  444|  26.6k|                           EncodeTwosComp(rhs.rep_hi_.Get()));
  445|  26.6k|  if (rep_lo_ < rhs.rep_lo_) {
  ------------------
  |  Branch (445:7): [True: 50, False: 26.6k]
  ------------------
  446|     50|    rep_hi_ = DecodeTwosComp(EncodeTwosComp(rep_hi_.Get()) - 1);
  447|     50|    rep_lo_ += kTicksPerSecond;
  448|     50|  }
  449|  26.6k|  rep_lo_ -= rhs.rep_lo_;
  450|  26.6k|  if (rhs.rep_hi_.Get() < 0 ? rep_hi_.Get() < orig_rep_hi
  ------------------
  |  Branch (450:7): [True: 0, False: 26.6k]
  |  Branch (450:7): [True: 0, False: 26.6k]
  ------------------
  451|  26.6k|                            : rep_hi_.Get() > orig_rep_hi) {
  452|      0|    return *this = rhs.rep_hi_.Get() >= 0 ? -InfiniteDuration()
  ------------------
  |  Branch (452:20): [True: 0, False: 0]
  ------------------
  453|      0|                                          : InfiniteDuration();
  454|      0|  }
  455|  26.6k|  return *this;
  456|  26.6k|}
duration.cc:_ZN4absl12lts_2026052612_GLOBAL__N_114DecodeTwosCompEm:
  187|  26.7k|inline int64_t DecodeTwosComp(uint64_t v) { return absl::bit_cast<int64_t>(v); }
duration.cc:_ZN4absl12lts_2026052612_GLOBAL__N_114EncodeTwosCompEl:
  184|  53.4k|inline uint64_t EncodeTwosComp(int64_t v) {
  185|  53.4k|  return absl::bit_cast<uint64_t>(v);
  186|  53.4k|}

clock.cc:_ZN4absl12lts_2026052613time_internalL29GetCurrentTimeNanosFromSystemEv:
   13|  40.0k|static int64_t GetCurrentTimeNanosFromSystem() {
   14|  40.0k|  const int64_t kNanosPerSecond = 1000 * 1000 * 1000;
   15|  40.0k|  struct timespec ts;
   16|  40.0k|  ABSL_RAW_CHECK(clock_gettime(CLOCK_REALTIME, &ts) == 0,
  ------------------
  |  |   60|  40.0k|  do {                                                                 \
  |  |   61|  40.0k|    if (ABSL_PREDICT_FALSE(!(condition))) {                            \
  |  |  ------------------
  |  |  |  |  190|  40.0k|#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 40.0k]
  |  |  |  |  |  Branch (190:49): [Folded, False: 40.0k]
  |  |  |  |  |  Branch (190:58): [True: 0, False: 40.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   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()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  237|      0|  do {                                           \
  |  |  |  |  |  |  |  |  238|      0|    /* NOLINTNEXTLINE: misc-static-assert */     \
  |  |  |  |  |  |  |  |  239|      0|    assert(false && "ABSL_UNREACHABLE reached"); \
  |  |  |  |  |  |  |  |  240|      0|    ABSL_INTERNAL_UNREACHABLE_IMPL();            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  215|      0|#define ABSL_INTERNAL_UNREACHABLE_IMPL() __builtin_unreachable()
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  241|      0|  } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (241:12): [Folded, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   52|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:12): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|      0|    }                                                                  \
  |  |   64|  40.0k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (64:12): [Folded, False: 40.0k]
  |  |  ------------------
  ------------------
   17|  40.0k|                 "Failed to read real-time clock.");
   18|  40.0k|  return (int64_t{ts.tv_sec} * kNanosPerSecond +
   19|  40.0k|          int64_t{ts.tv_nsec});
   20|  40.0k|}

_ZN4absl12lts_202605268DurationC2Ev:
  186|  26.6k|  constexpr Duration() : rep_hi_(0), rep_lo_(0) {}  // zero-length duration
_ZN4absl12lts_202605268DurationC2Elj:
  248|  56.6k|  constexpr Duration(int64_t hi, uint32_t lo) : rep_hi_(hi), rep_lo_(lo) {}
_ZN4absl12lts_202605268Duration5HiRepC2El:
  268|  83.3k|          lo_(0),
  269|  83.3k|          hi_(0)
  270|       |#endif
  271|  83.3k|    {
  272|  83.3k|      *this = value;
  273|  83.3k|    }
_ZNK4absl12lts_202605268Duration5HiRep3GetEv:
  275|   219k|    constexpr int64_t Get() const {
  276|   219k|      const uint64_t unsigned_value =
  277|   219k|          (static_cast<uint64_t>(hi_) << 32) | static_cast<uint64_t>(lo_);
  278|       |      // `static_cast<int64_t>(unsigned_value)` is implementation-defined
  279|       |      // before c++20. On all supported platforms the behaviour is that mandated
  280|       |      // by c++20, i.e. "If the destination type is signed, [...] the result is
  281|       |      // the unique value of the destination type equal to the source value
  282|       |      // modulo 2^n, where n is the number of bits used to represent the
  283|       |      // destination type."
  284|   219k|      static_assert(
  285|   219k|          (static_cast<int64_t>((std::numeric_limits<uint64_t>::max)()) ==
  286|   219k|           int64_t{-1}) &&
  287|   219k|              (static_cast<int64_t>(static_cast<uint64_t>(
  288|   219k|                                        (std::numeric_limits<int64_t>::max)()) +
  289|   219k|                                    1) ==
  290|   219k|               (std::numeric_limits<int64_t>::min)()),
  291|   219k|          "static_cast<int64_t>(uint64_t) does not have c++20 semantics");
  292|   219k|      return static_cast<int64_t>(unsigned_value);
  293|   219k|    }
_ZN4absl12lts_202605268Duration5HiRepaSEl:
  295|   110k|    constexpr HiRep& operator=(const int64_t value) {
  296|       |      // "If the destination type is unsigned, the resulting value is the
  297|       |      // smallest unsigned value equal to the source value modulo 2^n
  298|       |      // where `n` is the number of bits used to represent the destination
  299|       |      // type".
  300|   110k|      const auto unsigned_value = static_cast<uint64_t>(value);
  301|   110k|      hi_ = static_cast<uint32_t>(unsigned_value >> 32);
  302|   110k|      lo_ = static_cast<uint32_t>(unsigned_value);
  303|   110k|      return *this;
  304|   110k|    }
_ZN4absl12lts_202605264TimeC2ENS0_8DurationE:
  878|  56.6k|  constexpr explicit Time(Duration rep) : rep_(rep) {}
_ZN4absl12lts_2026052613time_internal9FromInt64ILl1EEENS0_8DurationElNSt3__15ratioILl1EXT_EEE:
 1672|      2|                                                           std::ratio<1, N>) {
 1673|      2|  static_assert(0 < N && N <= 1000 * 1000 * 1000, "Unsupported ratio");
 1674|       |  // Subsecond ratios cannot overflow.
 1675|      2|  return MakeNormalizedDuration(
 1676|      2|      v / N, v % N * kTicksPerNanosecond * 1000 * 1000 * 1000 / N);
 1677|      2|}
_ZN4absl12lts_20260526gtENS0_8DurationES1_:
  337|  26.6k|                                                       Duration rhs) {
  338|  26.6k|  return rhs < lhs;
  339|  26.6k|}
_ZN4absl12lts_20260526leENS0_8DurationES1_:
  345|      8|                                                        Duration rhs) {
  346|      8|  return !(rhs < lhs);
  347|      8|}
_ZN4absl12lts_20260526miENS0_8DurationES1_:
  362|  26.6k|                                                        Duration rhs) {
  363|  26.6k|  return lhs -= rhs;
  364|  26.6k|}
_ZN4absl12lts_2026052612ZeroDurationEv:
  438|  26.6k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Duration ZeroDuration() {
  439|  26.6k|  return Duration();
  440|  26.6k|}
_ZN4absl12lts_20260526eqENS0_4TimeES1_:
  904|  16.5k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator==(Time lhs, Time rhs) {
  905|  16.5k|  return lhs.rep_ == rhs.rep_;
  906|  16.5k|}
_ZN4absl12lts_20260526neENS0_4TimeES1_:
  907|  16.5k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator!=(Time lhs, Time rhs) {
  908|  16.5k|  return !(lhs == rhs);
  909|  16.5k|}
_ZN4absl12lts_20260526miENS0_4TimeES1_:
  921|  26.6k|ABSL_ATTRIBUTE_CONST_FUNCTION inline Duration operator-(Time lhs, Time rhs) {
  922|  26.6k|  return lhs.rep_ - rhs.rep_;
  923|  26.6k|}
_ZN4absl12lts_2026052614InfiniteFutureEv:
  944|  16.5k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Time InfiniteFuture() {
  945|  16.5k|  return Time(time_internal::MakeDuration((std::numeric_limits<int64_t>::max)(),
  946|  16.5k|                                          ~uint32_t{0}));
  947|  16.5k|}
_ZN4absl12lts_2026052613time_internal12MakeDurationElj:
 1598|  56.6k|                                                              uint32_t lo = 0) {
 1599|  56.6k|  return Duration(hi, lo);
 1600|  56.6k|}
_ZN4absl12lts_2026052613time_internal12MakeDurationEll:
 1603|  40.0k|                                                              int64_t lo) {
 1604|  40.0k|  return MakeDuration(hi, static_cast<uint32_t>(lo));
 1605|  40.0k|}
_ZN4absl12lts_2026052613time_internal22MakeNormalizedDurationEll:
 1624|      2|    int64_t sec, int64_t ticks) {
 1625|      2|  return (ticks < 0) ? MakeDuration(sec - 1, ticks + kTicksPerSecond)
  ------------------
  |  Branch (1625:10): [True: 0, False: 2]
  ------------------
 1626|      2|                     : MakeDuration(sec, ticks);
 1627|      2|}
_ZN4absl12lts_2026052613time_internal8GetRepHiENS0_8DurationE:
 1630|  86.5k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr int64_t GetRepHi(Duration d) {
 1631|  86.5k|  return d.rep_hi_.Get();
 1632|  86.5k|}
_ZN4absl12lts_2026052613time_internal8GetRepLoENS0_8DurationE:
 1633|  86.5k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr uint32_t GetRepLo(Duration d) {
 1634|  86.5k|  return d.rep_lo_;
 1635|  86.5k|}
_ZN4absl12lts_2026052613time_internal18IsInfiniteDurationENS0_8DurationE:
 1638|  53.3k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool IsInfiniteDuration(Duration d) {
 1639|  53.3k|  return GetRepLo(d) == ~uint32_t{0};
 1640|  53.3k|}
_ZN4absl12lts_2026052613time_internal16FromUnixDurationENS0_8DurationE:
 1663|  40.0k|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Time FromUnixDuration(Duration d) {
 1664|  40.0k|  return Time(d);
 1665|  40.0k|}
_ZN4absl12lts_20260526ltENS0_8DurationES1_:
 1760|  26.6k|                                                       Duration rhs) {
 1761|  26.6k|  return time_internal::GetRepHi(lhs) != time_internal::GetRepHi(rhs)
  ------------------
  |  Branch (1761:10): [True: 26.6k, False: 6]
  ------------------
 1762|  26.6k|             ? time_internal::GetRepHi(lhs) < time_internal::GetRepHi(rhs)
 1763|  26.6k|         : time_internal::GetRepHi(lhs) == (std::numeric_limits<int64_t>::min)()
  ------------------
  |  Branch (1763:12): [True: 0, False: 6]
  ------------------
 1764|      6|             ? time_internal::GetRepLo(lhs) + 1 <
 1765|      0|                   time_internal::GetRepLo(rhs) + 1
 1766|      6|             : time_internal::GetRepLo(lhs) < time_internal::GetRepLo(rhs);
 1767|  26.6k|}
_ZN4absl12lts_20260526eqENS0_8DurationES1_:
 1788|  16.5k|                                                        Duration rhs) {
 1789|  16.5k|  return time_internal::GetRepHi(lhs) == time_internal::GetRepHi(rhs) &&
  ------------------
  |  Branch (1789:10): [True: 16.5k, False: 0]
  ------------------
 1790|  16.5k|         time_internal::GetRepLo(lhs) == time_internal::GetRepLo(rhs);
  ------------------
  |  Branch (1790:10): [True: 16.5k, False: 0]
  ------------------
 1791|  16.5k|}
_ZN4absl12lts_2026052616InfiniteDurationEv:
 1818|     10|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Duration InfiniteDuration() {
 1819|     10|  return time_internal::MakeDuration((std::numeric_limits<int64_t>::max)(),
 1820|     10|                                     ~uint32_t{0});
 1821|     10|}
_ZN4absl12lts_202605267SecondsIiTnNSt3__19enable_ifIXoosr3std11is_integralIT_EE5valuesr3std7is_enumIS4_EE5valueEiE4typeELi0EEENS0_8DurationES4_:
  551|      2|ABSL_ATTRIBUTE_CONST_FUNCTION constexpr Duration Seconds(T n) {
  552|      2|  return time_internal::FromInt64(n, std::ratio<1>{});
  553|      2|}
_ZN4absl12lts_202605264TimeC2Ev:
  803|      4|  constexpr Time() = default;

_ZN4absl12lts_2026052613span_internal11GetDataImplIKNSt3__16vectorIN8fuzztest8internal6no_adl8IRObjectENS3_9allocatorIS8_EEEEEEDTcldtfp_4dataEERT_c:
   38|  13.5k|    -> decltype(c.data()) {
   39|  13.5k|  return c.data();
   40|  13.5k|}
_ZN4absl12lts_2026052613span_internal7GetDataIKNSt3__16vectorIN8fuzztest8internal6no_adl8IRObjectENS3_9allocatorIS8_EEEEEEDTcl11GetDataImplfp_Li0EEERT_:
   50|  13.5k|    -> decltype(GetDataImpl(c, 0)) {
   51|  13.5k|  return GetDataImpl(c, 0);
   52|  13.5k|}
_ZN4absl12lts_2026052613span_internal7GetDataIKNSt3__16vectorIjNS3_9allocatorIjEEEEEEDTcl11GetDataImplfp_Li0EEERT_:
   50|      2|    -> decltype(GetDataImpl(c, 0)) {
   51|      2|  return GetDataImpl(c, 0);
   52|      2|}
_ZN4absl12lts_2026052613span_internal11GetDataImplIKNSt3__16vectorIjNS3_9allocatorIjEEEEEEDTcldtfp_4dataEERT_c:
   38|      2|    -> decltype(c.data()) {
   39|      2|  return c.data();
   40|      2|}
_ZN4absl12lts_2026052613span_internal7GetDataIKNS0_4SpanIjEEEEDTcl11GetDataImplfp_Li0EEERT_:
   50|     16|    -> decltype(GetDataImpl(c, 0)) {
   51|     16|  return GetDataImpl(c, 0);
   52|     16|}
_ZN4absl12lts_2026052613span_internal11GetDataImplIKNS0_4SpanIjEEEEDTcldtfp_4dataEERT_c:
   38|     16|    -> decltype(c.data()) {
   39|     16|  return c.data();
   40|     16|}

_ZN4absl12lts_2026052614SourceLocation7currentENS1_10PrivateTagEjPKc:
  113|  3.29k|      const char* absl_nonnull file_name = __builtin_FILE()) {
  114|  3.29k|    return SourceLocation(line, file_name);
  115|  3.29k|  }
_ZNK4absl12lts_2026052614SourceLocation9file_nameEv:
  133|  3.29k|  constexpr const char* absl_nonnull file_name() const noexcept {
  134|  3.29k|    return file_name_;
  135|  3.29k|  }
_ZN4absl12lts_2026052614SourceLocationC2EjPKc:
  151|  3.29k|      : line_(line), file_name_(file_name) {}

_ZNK4absl12lts_202605264SpanIKN8fuzztest8internal6no_adl8IRObjectEE4sizeEv:
  323|  13.5k|  constexpr size_type size() const noexcept { return len_; }
_ZNK4absl12lts_202605264SpanIKN8fuzztest8internal6no_adl8IRObjectEE4dataEv:
  318|  13.4k|  constexpr pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_202605264SpanIKN8fuzztest8internal6no_adl8IRObjectEE5beginEv:
  375|  13.4k|  constexpr iterator begin() const noexcept { return data(); }
_ZNK4absl12lts_202605264SpanIjE4dataEv:
  318|     20|  constexpr pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_202605264SpanIjE4sizeEv:
  323|     20|  constexpr size_type size() const noexcept { return len_; }
_ZN4absl12lts_202605268MakeSpanITpTnRiJEKjEENS0_4SpanIT0_EEPS5_S7_:
  740|      2|                 T* absl_nullable end) noexcept {
  741|      2|  absl::base_internal::HardeningAssertLE(begin, end);
  742|      2|  return Span<T>(begin, static_cast<size_t>(end - begin));
  743|      2|}
_ZNK4absl12lts_202605264SpanIKjE4dataEv:
  318|     38|  constexpr pointer data() const noexcept { return ptr_; }
_ZNK4absl12lts_202605264SpanIKjE5beginEv:
  375|     18|  constexpr iterator begin() const noexcept { return data(); }
_ZNK4absl12lts_202605264SpanIKjE4sizeEv:
  323|     54|  constexpr size_type size() const noexcept { return len_; }
_ZNK4absl12lts_202605264SpanIKjE3endEv:
  388|     18|  constexpr iterator end() const noexcept { return data() + size(); }
_ZNK4absl12lts_202605264SpanIKjE5emptyEv:
  333|      2|  constexpr bool empty() const noexcept { return size() == 0; }
_ZNK4absl12lts_202605264SpanIKjEixEm:
  338|     12|  constexpr reference operator[](size_type i) const noexcept {
  339|     12|    absl::base_internal::HardeningAssertLT(i, size());
  340|     12|    return ptr_[i];
  341|     12|  }
_ZN4absl12lts_202605264SpanIKN8fuzztest8internal6no_adl8IRObjectEEC2INSt3__16vectorIS5_NS9_9allocatorIS5_EEEEvSD_iEERKT_:
  254|  13.5k|      : Span(span_internal::GetData(v), v.size()) {}
_ZN4absl12lts_202605264SpanIKN8fuzztest8internal6no_adl8IRObjectEEC2EPS6_m:
  230|  13.5k|      : ptr_(array), len_(length) {}
_ZN4absl12lts_202605264SpanIKN8fuzztest8internal6no_adl8IRObjectEEC2Ev:
  227|      3|  constexpr Span() noexcept : Span(nullptr, 0) {}
_ZN4absl12lts_202605264SpanIKjEC2EPS2_m:
  230|     20|      : ptr_(array), len_(length) {}
_ZN4absl12lts_202605264SpanIKjEC2INSt3__16vectorIjNS5_9allocatorIjEEEEvS9_iEERKT_:
  254|      2|      : Span(span_internal::GetData(v), v.size()) {}
_ZN4absl12lts_202605268MakeSpanITpTnRiJEjLm512EEENS0_4SpanIT0_EERAT1__S4_:
  764|      2|    T (&array ABSL_ATTRIBUTE_LIFETIME_BOUND)[N]) noexcept {
  765|      2|  return Span<T>(array, N);
  766|      2|}
_ZN4absl12lts_202605264SpanIjEC2EPjm:
  230|     18|      : ptr_(array), len_(length) {}
_ZN4absl12lts_202605268MakeSpanITpTnRiJEjEENS0_4SpanIT0_EEPS4_m:
  734|     16|                           size_t size) noexcept {
  735|     16|  return Span<T>(ptr, size);
  736|     16|}
_ZN4absl12lts_202605264SpanIKjEC2INS1_IjEEvS5_TnNSt3__19enable_ifIXsr6IsViewIT_EE5valueEiE4typeELi0EEERKS8_:
  269|     16|      : Span(span_internal::GetData(v), v.size()) {}
_ZNK4absl12lts_202605264SpanIjE5emptyEv:
  333|      2|  constexpr bool empty() const noexcept { return size() == 0; }

_ZN8fuzztest15internal_no_adl9ArbitraryINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEDav:
  281|      2|auto Arbitrary() {
  282|      2|  return internal::ArbitraryImpl<T>{};
  283|      2|}
_ZN8fuzztest15internal_no_adl9ArbitraryIbEEDav:
  281|      6|auto Arbitrary() {
  282|      6|  return internal::ArbitraryImpl<T>{};
  283|      6|}
_ZN8fuzztest15internal_no_adl20BitFlagCombinationOfIjEEDaSt16initializer_listIT_E:
  471|      2|auto BitFlagCombinationOf(std::initializer_list<T> flags) {
  472|      2|  return internal::BitFlagCombinationOfImpl<T>(
  473|      2|      absl::MakeSpan(flags.begin(), flags.end()));
  474|      2|}
_ZN8fuzztest15internal_no_adl7TupleOfITpTnRiJEJNS_8internal23SequenceContainerOfImplINSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS3_13ArbitraryImplIcvEEEENSC_IbvEESF_NS3_24BitFlagCombinationOfImplIjEESF_EEEDaDpT0_:
  594|      2|auto TupleOf(Inner... inner) {
  595|      2|  return internal::AggregateOfImpl<std::tuple<internal::value_type_t<Inner>...>,
  596|      2|                                   internal::RequireCustomCorpusType::kNo,
  597|      2|                                   Inner...>(std::in_place,
  598|      2|                                             std::move(inner)...);
  599|      2|}

main:
   20|      2|int main(int argc, char** argv) {
   21|      2|  absl::InitializeSymbolizer(argv[0]);
   22|      2|  absl::FailureSignalHandlerOptions options;
   23|      2|  options.call_previous_handler = true;
   24|      2|  absl::InstallFailureSignalHandler(options);
   25|      2|  testing::InitGoogleTest(&argc, argv);
   26|       |  // We call fuzztest::ParseAbslFlags rather than absl::ParseCommandLine
   27|       |  // since the latter would complain about any unknown flags that need
   28|       |  // to be passed to legacy fuzzing engines (e.g. libfuzzer).
   29|      2|  fuzztest::ParseAbslFlags(argc, argv);
   30|      2|  fuzztest::InitFuzzTest(&argc, &argv);
   31|      2|  return RUN_ALL_TESTS();
   32|      2|}

_ZN8fuzztest22ReadFilesFromDirectoryENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
   81|      2|    std::string_view dir) {
   82|      2|  return ReadFilesFromDirectory(dir, [](std::string_view) { return true; });
   83|      2|}
_ZN8fuzztest22ReadFilesFromDirectoryENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEENS0_8functionIFbS4_EEE:
   86|      2|    std::string_view dir, std::function<bool(std::string_view)> filter) {
   87|      2|  std::vector<std::tuple<std::string>> out;
   88|      2|  const std::filesystem::path fs_dir(dir);
   89|      4|  FUZZTEST_PRECONDITION(std::filesystem::is_directory(fs_dir))
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   90|      4|      << "Not a directory: " << fs_dir.string();
   91|      2|  for (const auto& entry :
  ------------------
  |  Branch (91:26): [True: 214, False: 2]
  ------------------
   92|    214|       std::filesystem::recursive_directory_iterator(fs_dir)) {
   93|    214|    if (std::filesystem::is_directory(entry)) continue;
  ------------------
  |  Branch (93:9): [True: 0, False: 214]
  ------------------
   94|    214|    if (!filter(entry.path().string())) continue;
  ------------------
  |  Branch (94:9): [True: 0, False: 214]
  ------------------
   95|       |
   96|    214|    std::ifstream stream(entry.path());
   97|    428|    FUZZTEST_PRECONDITION(stream.good())
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|    214|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|    214|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|    428|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|    428|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 214, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|    214|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 214]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|    428|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 214, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 214]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 214]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|    214|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|    214|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|    428|        << "Cannot read input file: " << entry.path().string();
   99|       |
  100|    214|    std::stringstream buffer;
  101|    214|    buffer << stream.rdbuf();
  102|    214|    out.emplace_back(std::move(buffer).str());
  103|    214|  }
  104|      2|  return out;
  105|      2|}
fuzztest_macros.cc:_ZZN8fuzztest22ReadFilesFromDirectoryENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEEENK3$_0clES4_:
   82|    214|  return ReadFilesFromDirectory(dir, [](std::string_view) { return true; });

_ZN8fuzztest19ListRegisteredTestsEv:
  258|      6|std::vector<std::string> ListRegisteredTests() {
  259|      6|  std::vector<std::string> result;
  260|      6|  internal::ForEachTest(
  261|      6|      [&](const auto& test) { result.push_back(test.full_name()); });
  262|      6|  return result;
  263|      6|}
_ZN8fuzztest25GetMatchingFuzzTestOrExitENSt3__117basic_string_viewIcNS0_11char_traitsIcEEEE:
  265|      2|std::string GetMatchingFuzzTestOrExit(std::string_view name) {
  266|      2|  const std::string partial_name(name);
  267|      2|  const std::vector<std::string> full_names = ListRegisteredTests();
  268|      2|  std::vector<const std::string*> matches;
  269|      2|  for (const std::string& full_name : full_names) {
  ------------------
  |  Branch (269:37): [True: 2, False: 0]
  ------------------
  270|      2|    if (absl::StrContains(full_name, partial_name)) {
  ------------------
  |  Branch (270:9): [True: 2, False: 0]
  ------------------
  271|      2|      if (full_name == partial_name) {
  ------------------
  |  Branch (271:11): [True: 2, False: 0]
  ------------------
  272|       |        // In case of an exact match, we end the search and use it. This is to
  273|       |        // handle the case when we want to select `MySuite.MyTest`, but the
  274|       |        // binary has both `MySuite.MyTest` and `MySuite.MyTestX`.
  275|      2|        return full_name;
  276|      2|      } else {
  277|      0|        matches.push_back(&full_name);
  278|      0|      }
  279|      2|    }
  280|      2|  }
  281|       |
  282|      0|  if (matches.empty()) {
  ------------------
  |  Branch (282:7): [True: 0, False: 0]
  ------------------
  283|      0|    absl::FPrintF(stderr, "\n\nNo FUZZ_TEST matches the name: %s\n\n",
  284|      0|                  partial_name);
  285|      0|    absl::FPrintF(stderr, "Valid tests:\n");
  286|      0|    for (const std::string& full_name : full_names) {
  ------------------
  |  Branch (286:39): [True: 0, False: 0]
  ------------------
  287|      0|      absl::FPrintF(stderr, " %s\n", full_name);
  288|      0|    }
  289|      0|    exit(1);
  290|      0|  } else if (matches.size() > 1) {
  ------------------
  |  Branch (290:14): [True: 0, False: 0]
  ------------------
  291|      0|    absl::FPrintF(stderr, "\n\nMultiple FUZZ_TESTs match the name: %s\n\n",
  292|      0|                  partial_name);
  293|      0|    absl::FPrintF(stderr, "Please select one. Matching tests:\n");
  294|      0|    for (const std::string* full_name : matches) {
  ------------------
  |  Branch (294:39): [True: 0, False: 0]
  ------------------
  295|      0|      absl::FPrintF(stderr, " %s\n", *full_name);
  296|      0|    }
  297|      0|    exit(1);
  298|      0|  }
  299|      0|  return *matches[0];
  300|      0|}
_ZN8fuzztest12InitFuzzTestEPiPPPcNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEE:
  403|      2|void InitFuzzTest(int* argc, char*** argv, std::string_view binary_id) {
  404|      2|  auto& runtime = internal::Runtime::instance();
  405|      2|  const bool is_listing = absl::GetFlag(FUZZTEST_FLAG(list_fuzz_tests));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  406|      2|  if (is_listing) {
  ------------------
  |  Branch (406:7): [True: 0, False: 2]
  ------------------
  407|      0|    for (const auto& name : ListRegisteredTests()) {
  ------------------
  |  Branch (407:27): [True: 0, False: 0]
  ------------------
  408|      0|      std::cout << "[*] Fuzz test: " << name << '\n';
  409|      0|    }
  410|      0|    std::cout << std::flush;
  411|      0|    std::exit(0);
  412|      0|  }
  413|      2|  std::optional<absl::Duration> fuzzing_time_limit = GetFuzzingTime();
  414|      2|  std::optional<absl::Duration> replay_corpus_time_limit =
  415|      2|      GetReplayCorpusTime();
  416|      4|  FUZZTEST_CHECK(!fuzzing_time_limit || !replay_corpus_time_limit)
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      8|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  417|      4|      << "Cannot run in fuzzing and corpus replay mode at the same time.";
  418|      2|  const auto test_to_fuzz = absl::GetFlag(FUZZTEST_FLAG(fuzz));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  419|      2|  const auto test_to_replay_corpus =
  420|      2|      absl::GetFlag(FUZZTEST_FLAG(replay_corpus));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  421|      2|  const auto specified_test = []() -> std::optional<std::string> {
  422|      2|    if (auto internal_selected_test =
  423|      2|            absl::GetFlag(FUZZTEST_FLAG(internal_override_fuzz_test));
  424|      2|        internal_selected_test.has_value()) {
  425|      2|      return internal_selected_test;
  426|      2|    }
  427|      2|    if (auto test_to_fuzz = absl::GetFlag(FUZZTEST_FLAG(fuzz));
  428|      2|        test_to_fuzz != kUnspecified) {
  429|      2|      return test_to_fuzz;
  430|      2|    }
  431|      2|    if (auto test_to_replay_corpus =
  432|      2|            absl::GetFlag(FUZZTEST_FLAG(replay_corpus));
  433|      2|        test_to_replay_corpus != kUnspecified) {
  434|      2|      return test_to_replay_corpus;
  435|      2|    }
  436|      2|    return std::nullopt;
  437|      2|  }();
  438|      2|  if (specified_test.has_value()) {
  ------------------
  |  Branch (438:7): [True: 2, False: 0]
  ------------------
  439|      2|    const std::string matching_fuzz_test =
  440|      2|        GetMatchingFuzzTestOrExit(*specified_test);
  441|       |    // Delegate the test to GoogleTest.
  442|      2|    GTEST_FLAG_SET(filter, matching_fuzz_test);
  443|      2|  }
  444|       |
  445|      2|  std::string derived_binary_id =
  446|      2|      binary_id.empty() ? std::string(internal::Basename(*argv[0]))
  ------------------
  |  Branch (446:7): [True: 2, False: 0]
  ------------------
  447|      2|                        : std::string(binary_id);
  448|      2|  std::optional<std::string> reproduction_command_template;
  449|      2|  internal::Configuration configuration =
  450|      2|      CreateConfigurationsFromFlags(derived_binary_id);
  451|      2|  configuration.reproduction_command_template = reproduction_command_template;
  452|      2|  internal::RegisterFuzzTestsAsGoogleTests(argc, argv, configuration);
  453|       |
  454|      2|  const bool is_fuzzing_or_replaying =
  455|      2|      (fuzzing_time_limit || replay_corpus_time_limit);
  ------------------
  |  Branch (455:8): [True: 2, False: 0]
  |  Branch (455:30): [True: 0, False: 0]
  ------------------
  456|      2|  if (is_fuzzing_or_replaying && !specified_test.has_value()) {
  ------------------
  |  Branch (456:7): [True: 2, False: 0]
  |  Branch (456:34): [True: 0, False: 2]
  ------------------
  457|      0|    absl::flat_hash_set<std::string> fuzz_tests = {
  458|      0|        configuration.fuzz_tests.begin(), configuration.fuzz_tests.end()};
  459|      0|    std::vector<std::string> non_fuzz_tests;
  460|      0|    for (const auto* test : internal::GetRegisteredTests()) {
  ------------------
  |  Branch (460:27): [True: 0, False: 0]
  ------------------
  461|      0|      const std::string test_name =
  462|      0|          absl::StrCat(test->test_suite_name(), ".", test->name());
  463|      0|      if (!fuzz_tests.contains(test_name)) {
  ------------------
  |  Branch (463:11): [True: 0, False: 0]
  ------------------
  464|      0|        non_fuzz_tests.push_back(test_name);
  465|      0|      }
  466|      0|    }
  467|      0|    if (!non_fuzz_tests.empty()) {
  ------------------
  |  Branch (467:9): [True: 0, False: 0]
  ------------------
  468|       |      // Run only the fuzz tests, and not the unit tests.
  469|       |      // TODO: b/340232436 -- This is needed because we currently rely on a fuzz
  470|       |      // test being the first test to run so that Centipede can get the
  471|       |      // serialized configuration from the binary.
  472|      0|      std::string filter = absl::StrCat(
  473|      0|          GTEST_FLAG_GET(filter),
  474|       |          // When the filter already includes the negative patterns, append to
  475|       |          // the negative patterns.
  476|      0|          absl::StrContains(GTEST_FLAG_GET(filter), '-') ? ":" : "-",
  ------------------
  |  Branch (476:11): [True: 0, False: 0]
  ------------------
  477|      0|          absl::StrJoin(non_fuzz_tests, ":"));
  478|      0|      GTEST_FLAG_SET(filter, filter);
  479|      0|    }
  480|      0|  }
  481|       |  // TODO(b/307513669): Use the Configuration class instead of Runtime.
  482|      2|  if (!absl::GetFlag(FUZZTEST_FLAG(unguided)) &&
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  |  Branch (482:7): [True: 2, False: 0]
  ------------------
  483|      2|      fuzzing_time_limit.has_value()) {
  ------------------
  |  Branch (483:7): [True: 2, False: 0]
  ------------------
  484|      2|    runtime.SetRunMode(RunMode::kFuzz);
  485|      2|  } else {
  486|      0|    runtime.SetRunMode(RunMode::kUnitTest);
  487|      0|  }
  488|      2|}
_ZN8fuzztest14ParseAbslFlagsEiPPc:
  490|      2|void ParseAbslFlags(int argc, char** argv) {
  491|      2|  std::vector<char*> positional_args;
  492|      2|  std::vector<absl::UnrecognizedFlag> unrecognized_flags;
  493|      2|  absl::ParseAbseilFlagsOnly(argc, argv, positional_args, unrecognized_flags);
  494|      2|}
init_fuzztest.cc:_ZNK3$_0clEv:
   47|      2|    .OnUpdate([]() {
   48|      2|      fuzztest::internal::SetFuzzTestListingModeValidatorForGoogleTest(
   49|      2|          absl::GetFlag(FUZZTEST_FLAG(list_fuzz_tests)));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
   50|      2|    });
init_fuzztest.cc:_ZNK3$_1clEv:
  216|      2|    .OnUpdate([] {
  217|      4|      FUZZTEST_PRECONDITION(
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      6|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|      4|          !absl::GetFlag(FUZZTEST_FLAG(internal_override_fuzz_test))
  219|      4|               .has_value() ||
  220|      4|          std::getenv("CENTIPEDE_RUNNER_FLAGS") != nullptr)
  221|      4|          << "must not set --" FUZZTEST_FLAG_PREFIX
  222|      4|             "internal_override_fuzz_test directly";
  223|      2|    });
init_fuzztest.cc:_ZNK3$_2clEv:
  232|      2|    .OnUpdate([] {
  233|      4|      FUZZTEST_PRECONDITION(
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      6|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  234|      4|          absl::GetFlag(FUZZTEST_FLAG(internal_override_total_time_limit)) ==
  235|      4|              absl::InfiniteDuration() ||
  236|      4|          std::getenv("CENTIPEDE_RUNNER_FLAGS") != nullptr)
  237|      4|          << "must not set --" FUZZTEST_FLAG_PREFIX
  238|      4|             "internal_override_total_time_limit directly";
  239|      2|    });
init_fuzztest.cc:_ZNK3$_3clEv:
  247|      2|    .OnUpdate([] {
  248|      4|      FUZZTEST_PRECONDITION(
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      6|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|      4|          !absl::GetFlag(FUZZTEST_FLAG(internal_crashing_input_to_reproduce))
  250|      4|               .has_value() ||
  251|      4|          std::getenv("CENTIPEDE_RUNNER_FLAGS") != nullptr)
  252|      4|          << "must not set --" FUZZTEST_FLAG_PREFIX
  253|      4|             "internal_crashing_input_to_reproduce directly";
  254|      2|    });
init_fuzztest.cc:_ZN8fuzztest12_GLOBAL__N_129CreateConfigurationsFromFlagsENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  331|      2|    absl::string_view binary_identifier) {
  332|      2|  const bool reproduce_findings_as_separate_tests =
  333|      2|      absl::GetFlag(FUZZTEST_FLAG(reproduce_findings_as_separate_tests));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  334|      2|  const std::optional<absl::Duration> fuzzing_time_limit = GetFuzzingTime();
  335|      2|  const std::optional<absl::Duration> replay_corpus_time_limit =
  336|      2|      GetReplayCorpusTime();
  337|      2|  const std::optional<std::string> override_fuzz_test =
  338|      2|      absl::GetFlag(FUZZTEST_FLAG(internal_override_fuzz_test));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  339|      2|  const bool replay_coverage_inputs =
  340|      2|      fuzzing_time_limit.has_value() || replay_corpus_time_limit.has_value();
  ------------------
  |  Branch (340:7): [True: 2, False: 0]
  |  Branch (340:41): [True: 0, False: 0]
  ------------------
  341|      2|  const absl::Duration time_limit =
  342|      2|      override_fuzz_test.has_value()
  ------------------
  |  Branch (342:7): [True: 0, False: 2]
  ------------------
  343|      2|          ? absl::GetFlag(FUZZTEST_FLAG(internal_override_total_time_limit))
  ------------------
  |  |   20|      0|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  344|      2|      : fuzzing_time_limit.has_value()       ? *fuzzing_time_limit
  ------------------
  |  Branch (344:9): [True: 2, False: 0]
  ------------------
  345|      2|      : replay_corpus_time_limit.has_value() ? *replay_corpus_time_limit
  ------------------
  |  Branch (345:9): [True: 0, False: 0]
  ------------------
  346|      0|                                             : absl::ZeroDuration();
  347|      2|  const internal::TimeBudgetType time_budget_type =
  348|      2|      override_fuzz_test.has_value()
  ------------------
  |  Branch (348:7): [True: 0, False: 2]
  ------------------
  349|      2|          ? internal::TimeBudgetType::kTotal
  350|      2|          : absl::GetFlag(FUZZTEST_FLAG(time_budget_type));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  351|      2|  const std::optional<size_t> jobs = absl::GetFlag(FUZZTEST_FLAG(jobs));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  352|      4|  FUZZTEST_CHECK(!jobs.has_value() || *jobs > 0)
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      6|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|      4|      << "If specified, --" << FUZZTEST_FLAG(jobs).Name()
  ------------------
  |  |   20|      0|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  354|      4|      << " must be positive.";
  355|      2|  std::string corpus_database = absl::GetFlag(FUZZTEST_FLAG(corpus_database));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  356|      2|  if (!corpus_database.empty() && corpus_database[0] != '/' &&
  ------------------
  |  Branch (356:7): [True: 2, False: 0]
  |  Branch (356:35): [True: 2, False: 0]
  ------------------
  357|      2|      std::getenv("TEST_SRCDIR")) {
  ------------------
  |  Branch (357:7): [True: 0, False: 2]
  ------------------
  358|      0|    corpus_database =
  359|      0|        absl::StrCat(std::getenv("TEST_SRCDIR"), "/", corpus_database);
  360|      0|  }
  361|      2|  return internal::Configuration{
  362|      2|      corpus_database,
  363|      2|      /*stats_root=*/"",
  364|      2|      /*workdir_root=*/"",
  365|      2|      std::string(binary_identifier),
  366|      2|      /*fuzz_tests=*/ListRegisteredTests(),
  367|      2|      /*fuzz_tests_in_current_shard=*/ListRegisteredTests(),
  368|       |      /*continue_after_crash=*/
  369|      2|      absl::GetFlag(FUZZTEST_FLAG(continue_after_crash)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  370|      2|      reproduce_findings_as_separate_tests,
  371|      2|      replay_coverage_inputs,
  372|       |      /*only_replay=*/
  373|      2|      replay_corpus_time_limit.has_value(),
  374|      2|      /*replay_in_single_process=*/false,
  375|      2|      absl::GetFlag(FUZZTEST_FLAG(execution_id)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  376|      2|      absl::GetFlag(FUZZTEST_FLAG(print_subprocess_log)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  377|      2|      absl::GetFlag(FUZZTEST_FLAG(subprocess_cleanup_timeout)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  378|      2|      /*stack_limit=*/absl::GetFlag(FUZZTEST_FLAG(stack_limit_kb)) * 1024,
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  379|      2|      /*rss_limit=*/absl::GetFlag(FUZZTEST_FLAG(rss_limit_mb)) * 1024 * 1024,
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  380|      2|      absl::GetFlag(FUZZTEST_FLAG(time_limit_per_input)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  381|      2|      time_limit,
  382|      2|      time_budget_type,
  383|      2|      jobs.value_or(0),
  384|      2|      absl::GetFlag(FUZZTEST_FLAG(internal_centipede_command)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  385|      2|      absl::GetFlag(FUZZTEST_FLAG(internal_crashing_input_to_reproduce)),
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  386|      2|  };
  387|      2|}
init_fuzztest.cc:_ZN8fuzztest12_GLOBAL__N_114GetFuzzingTimeEv:
  304|      4|std::optional<absl::Duration> GetFuzzingTime() {
  305|      4|  absl::Duration fuzz_time_limit = absl::GetFlag(FUZZTEST_FLAG(fuzz_for));
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  306|      4|  if (fuzz_time_limit <= absl::ZeroDuration()) {
  ------------------
  |  Branch (306:7): [True: 0, False: 4]
  ------------------
  307|      0|    fuzz_time_limit = absl::InfiniteDuration();
  308|      0|  }
  309|      4|  if (absl::GetFlag(FUZZTEST_FLAG(fuzz)) == kUnspecified &&
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  |  Branch (309:7): [True: 0, False: 4]
  |  Branch (309:7): [True: 0, False: 4]
  ------------------
  310|      0|      fuzz_time_limit == absl::InfiniteDuration()) {
  ------------------
  |  Branch (310:7): [True: 0, False: 0]
  ------------------
  311|      0|    return std::nullopt;
  312|      0|  }
  313|      4|  return fuzz_time_limit;
  314|      4|}
init_fuzztest.cc:_ZN8fuzztest12_GLOBAL__N_119GetReplayCorpusTimeEv:
  316|      4|std::optional<absl::Duration> GetReplayCorpusTime() {
  317|      4|  absl::Duration replay_corpus_time_limit =
  318|      4|      absl::GetFlag(FUZZTEST_FLAG(replay_corpus_for));
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  319|      4|  if (absl::GetFlag(FUZZTEST_FLAG(replay_corpus)) == kUnspecified &&
  ------------------
  |  |   20|      4|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  |  Branch (319:7): [True: 4, False: 0]
  |  Branch (319:7): [True: 4, False: 0]
  ------------------
  320|      4|      replay_corpus_time_limit <= absl::ZeroDuration()) {
  ------------------
  |  Branch (320:7): [True: 4, False: 0]
  ------------------
  321|      4|    return std::nullopt;
  322|      4|  }
  323|      0|  if (absl::GetFlag(FUZZTEST_FLAG(replay_corpus)) != kUnspecified &&
  ------------------
  |  |   20|      0|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  |  Branch (323:7): [True: 0, False: 0]
  |  Branch (323:7): [True: 0, False: 0]
  ------------------
  324|      0|      replay_corpus_time_limit <= absl::ZeroDuration()) {
  ------------------
  |  Branch (324:7): [True: 0, False: 0]
  ------------------
  325|      0|    replay_corpus_time_limit = absl::InfiniteDuration();
  326|      0|  }
  327|      0|  return replay_corpus_time_limit;
  328|      4|}
init_fuzztest.cc:_ZZN8fuzztest12InitFuzzTestEPiPPPcNSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEENK3$_0clEv:
  421|      2|  const auto specified_test = []() -> std::optional<std::string> {
  422|      2|    if (auto internal_selected_test =
  423|      2|            absl::GetFlag(FUZZTEST_FLAG(internal_override_fuzz_test));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  424|      2|        internal_selected_test.has_value()) {
  ------------------
  |  Branch (424:9): [True: 0, False: 2]
  ------------------
  425|      0|      return internal_selected_test;
  426|      0|    }
  427|      2|    if (auto test_to_fuzz = absl::GetFlag(FUZZTEST_FLAG(fuzz));
  ------------------
  |  |   20|      2|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  428|      2|        test_to_fuzz != kUnspecified) {
  ------------------
  |  Branch (428:9): [True: 2, False: 0]
  ------------------
  429|      2|      return test_to_fuzz;
  430|      2|    }
  431|      0|    if (auto test_to_replay_corpus =
  432|      0|            absl::GetFlag(FUZZTEST_FLAG(replay_corpus));
  ------------------
  |  |   20|      0|#define FUZZTEST_FLAG(name) FLAGS_##name
  ------------------
  433|      0|        test_to_replay_corpus != kUnspecified) {
  ------------------
  |  Branch (433:9): [True: 0, False: 0]
  ------------------
  434|      0|      return test_to_replay_corpus;
  435|      0|    }
  436|      0|    return std::nullopt;
  437|      0|  }();
init_fuzztest.cc:_ZZN8fuzztest19ListRegisteredTestsEvENK3$_0clINS_8internal8FuzzTestEEEDaRKT_:
  261|      6|      [&](const auto& test) { result.push_back(test.full_name()); });

_ZNK8fuzztest8internal7AnyBase9has_valueEv:
   47|   173k|  bool has_value() const {
   48|   346k|    FUZZTEST_CHECK((vtable_ == nullptr) == (value_ == nullptr))
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|   173k|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|   173k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|   346k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|   346k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 173k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|   173k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 173k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|   346k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 173k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 173k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 173k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|   173k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|   173k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   49|   346k|        << "Inconsistent state between value and vtable.";
   50|   173k|    return value_ != nullptr;
   51|   173k|  }
_ZN8fuzztest8internal7AnyBaseC2Ev:
   87|  13.3k|  AnyBase() : vtable_(nullptr), value_(nullptr) {}
_ZN8fuzztest8internal7AnyBaseC2EOS1_:
   90|  26.6k|      : vtable_(std::exchange(other.vtable_, nullptr)),
   91|  26.6k|        value_(std::exchange(other.value_, nullptr)) {}
_ZN8fuzztest8internal7AnyBaseD2Ev:
  101|  66.7k|  ~AnyBase() { Destroy(); }
_ZN8fuzztest8internal7AnyBase7DestroyEv:
  103|  66.7k|  void Destroy() {
  104|  66.7k|    if (has_value()) vtable_->destroy(value_);
  ------------------
  |  Branch (104:9): [True: 40.0k, False: 26.6k]
  ------------------
  105|  66.7k|  }
_ZN8fuzztest8internal7AnyBase8CopyFromERKS1_:
  107|  13.3k|  void CopyFrom(const AnyBase& other) {
  108|  26.6k|    FUZZTEST_CHECK(!has_value()) << "CopyFrom called on a full object";
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|  13.3k|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|  13.3k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  26.6k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  26.6k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 13.3k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  13.3k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  26.6k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 13.3k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|  13.3k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|  13.3k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|  13.3k|    if (other.has_value()) {
  ------------------
  |  Branch (109:9): [True: 13.3k, False: 0]
  ------------------
  110|  13.3k|      vtable_ = other.vtable_;
  111|  13.3k|      value_ = vtable_->copy(other.value_);
  112|  13.3k|    }
  113|  13.3k|  }
_ZN8fuzztest8internal11CopyableAnyC2ERKS1_:
  174|  13.3k|  CopyableAny(const CopyableAny& other) { CopyFrom(other); }
_ZN8fuzztest8internal11CopyableAnyC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEJSB_EEENS3_15in_place_type_tIT_EEDpOT0_:
  170|  13.3k|      : AnyBase(std::in_place, std::true_type{},
  171|  13.3k|                new T(std::forward<U>(args)...)) {}
_ZN8fuzztest8internal7AnyBaseC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS3_10in_place_tENS3_17integral_constantIbLb1EEEPT_:
   35|  13.3k|  explicit AnyBase(std::in_place_t, std::true_type, T* value) {
   36|  13.3k|    static constexpr VTable kVTable = {type_id<T>, DestroyImpl<T>, CopyImpl<T>};
   37|  13.3k|    vtable_ = &kVTable;
   38|  13.3k|    value_ = const_cast<void*>(static_cast<const void*>(value));
   39|  13.3k|  }
_ZN8fuzztest8internal7AnyBase11DestroyImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEEvPv:
  123|  40.0k|  static void DestroyImpl(void* p) {
  124|  40.0k|    delete static_cast<T*>(p);
  125|  40.0k|  }
_ZN8fuzztest8internal7AnyBase8CopyImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEEPvSC_:
  128|  13.3k|  static void* CopyImpl(void* p) {
  129|  13.3k|    return new T(*static_cast<T*>(p));
  130|  13.3k|  }
_ZNR8fuzztest8internal7AnyBase5GetAsINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEERT_v:
   59|  13.3k|  T& GetAs() & {
   60|  26.6k|    FUZZTEST_PRECONDITION(has_value()) << "Object is empty!";
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|  13.3k|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|  13.3k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  26.6k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  26.6k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 13.3k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  13.3k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  26.6k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 13.3k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|  13.3k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|  13.3k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   61|  26.6k|    FUZZTEST_PRECONDITION(Has<T>()) << "Wrong type!";
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|  13.3k|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|  13.3k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  26.6k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  26.6k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 13.3k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  13.3k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  26.6k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 13.3k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 13.3k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|  13.3k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|  13.3k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   62|  13.3k|    return *static_cast<T*>(value_);
   63|  13.3k|  }
_ZNK8fuzztest8internal7AnyBase3HasINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEEbv:
   54|  40.0k|  bool Has() const {
   55|  40.0k|    return has_value() && vtable_->type_id == type_id<T>;
  ------------------
  |  Branch (55:12): [True: 40.0k, False: 0]
  |  Branch (55:27): [True: 40.0k, False: 0]
  ------------------
   56|  40.0k|  }
_ZNKR8fuzztest8internal7AnyBase5GetAsINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEERKT_v:
   66|  26.6k|  const T& GetAs() const& {
   67|  53.3k|    FUZZTEST_PRECONDITION(has_value()) << "Object is empty!";
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|  26.6k|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|  26.6k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  53.3k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  53.3k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 26.6k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  26.6k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 26.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  53.3k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 26.6k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 26.6k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 26.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|  26.6k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|  26.6k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   68|  53.3k|    FUZZTEST_PRECONDITION(Has<T>()) << "Wrong type!";
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|  26.6k|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|  26.6k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|  53.3k|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|  53.3k|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 26.6k, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|  26.6k|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 26.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|  53.3k|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 26.6k, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 26.6k]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 26.6k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|  26.6k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|  26.6k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   69|  26.6k|    return *static_cast<T*>(value_);
   70|  26.6k|  }
_ZN8fuzztest8internal11CopyableAnyC2EOS1_:
  175|  26.6k|  CopyableAny(CopyableAny&& other) = default;
_ZN8fuzztest8internal11MoveOnlyAnyC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEJSB_EEENS3_15in_place_type_tIT_EEDpOT0_:
  151|  13.3k|      : AnyBase(std::in_place, std::false_type{},
  152|  13.3k|                new T(std::forward<U>(args)...)) {}
_ZN8fuzztest8internal7AnyBaseC2INSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS3_10in_place_tENS3_17integral_constantIbLb0EEEPT_:
   41|  13.3k|  explicit AnyBase(std::in_place_t, std::false_type, T* value) {
   42|  13.3k|    static constexpr VTable kVTable = {type_id<T>, DestroyImpl<T>, nullptr};
   43|  13.3k|    vtable_ = &kVTable;
   44|  13.3k|    value_ = const_cast<void*>(static_cast<const void*>(value));
   45|  13.3k|  }

_ZN8fuzztest8internal25SetExternalEngineCallbackEPNS0_22ExternalEngineCallbackE:
   33|      2|void SetExternalEngineCallback(ExternalEngineCallback* callback) {
   34|      2|  external_engine_callback = callback;
   35|      2|}
_ZN8fuzztest8internal25GetExternalEngineCallbackEv:
   37|  16.5k|ExternalEngineCallback* GetExternalEngineCallback() {
   38|  16.5k|  return external_engine_callback;
   39|  16.5k|}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptorC2ERKNS0_8FuzzTestENSt3__110unique_ptrINS0_20UntypedFixtureDriverENS5_14default_deleteIS7_EEEE:
   65|      2|    : test_(test), fixture_driver_staging_(std::move(fixture_driver)) {}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS0_13ConfigurationE:
   73|      2|    int* argc, char*** argv, const Configuration& configuration) {
   74|      4|  FUZZTEST_CHECK(&LLVMFuzzerRunDriver) << "LibFuzzer Driver API not defined.";
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      2|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, Folded]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   75|      4|  FUZZTEST_CHECK(GetExternalEngineCallback() == nullptr)
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   76|      4|      << "External engine callback is already set while running a fuzz test.";
   77|      2|  SetExternalEngineCallback(this);
   78|      2|  runtime_.SetRunMode(RunMode::kFuzz);
   79|      2|  auto& impl = GetFuzzerImpl();
   80|      2|  runtime_.SetCurrentTest(&impl.test_, &configuration);
   81|      2|  runtime_.EnableReporter(&impl.stats_, [] { return absl::Now(); });
   82|       |
   83|      4|  FUZZTEST_CHECK(impl.fixture_driver_ != nullptr) << "Invalid fixture driver!";
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|      2|  impl.fixture_driver_->RunFuzzTest([&] {
   85|      2|    static bool driver_started = false;
   86|      2|    FUZZTEST_CHECK(!driver_started) << "Driver started more than once!";
   87|      2|    driver_started = true;
   88|      2|    LLVMFuzzerRunDriver(
   89|      2|        argc, argv, [](const uint8_t* data, size_t size) -> int {
   90|      2|          GetExternalEngineCallback()->RunOneInputData(
   91|      2|              absl::string_view(reinterpret_cast<const char*>(data), size));
   92|      2|          return 0;
   93|      2|        });
   94|      2|  });
   95|       |
   96|      2|  return true;
   97|      2|}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptor15RunOneInputDataENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  109|  16.5k|void FuzzTestExternalEngineAdaptor::RunOneInputData(absl::string_view data) {
  110|  16.5k|  auto& impl = GetFuzzerImpl();
  111|  16.5k|  if (impl.ShouldStop()) {
  ------------------
  |  Branch (111:7): [True: 0, False: 16.5k]
  ------------------
  112|      0|    runtime_.PrintFinalStatsOnDefaultSink();
  113|       |    // Use _Exit instead of exit so libFuzzer does not treat it as a crash.
  114|      0|    std::_Exit(0);
  115|      0|  }
  116|  16.5k|  if (data.size() == 0) return;
  ------------------
  |  Branch (116:7): [True: 0, False: 16.5k]
  ------------------
  117|  16.5k|  auto input = impl.TryParse(data);
  118|  16.5k|  if (!input.ok()) return;
  ------------------
  |  Branch (118:7): [True: 3.25k, False: 13.3k]
  ------------------
  119|  13.3k|  impl.RunOneInput({*std::move(input)});
  120|  13.3k|}
_ZN8fuzztest8internal29FuzzTestExternalEngineAdaptor13GetFuzzerImplEv:
  151|  16.5k|FuzzTestExternalEngineAdaptor::GetFuzzerImpl() {
  152|       |  // Postpone the creation to override libFuzzer signal setup.
  153|  16.5k|  if (!fuzzer_impl_) {
  ------------------
  |  Branch (153:7): [True: 2, False: 16.5k]
  ------------------
  154|      2|    fuzzer_impl_ =
  155|      2|        std::make_unique<FuzzerImpl>(test_, std::move(fixture_driver_staging_));
  156|      2|    fixture_driver_staging_ = nullptr;
  157|      2|  }
  158|  16.5k|  return *fuzzer_impl_;
  159|  16.5k|}
compatibility_mode.cc:_ZZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS0_13ConfigurationEENK3$_1clEv:
   81|  13.3k|  runtime_.EnableReporter(&impl.stats_, [] { return absl::Now(); });
compatibility_mode.cc:_ZZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS0_13ConfigurationEENK3$_0clEv:
   84|      2|  impl.fixture_driver_->RunFuzzTest([&] {
   85|      2|    static bool driver_started = false;
   86|      4|    FUZZTEST_CHECK(!driver_started) << "Driver started more than once!";
  ------------------
  |  |   22|      0|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   87|      2|    driver_started = true;
   88|      2|    LLVMFuzzerRunDriver(
   89|      2|        argc, argv, [](const uint8_t* data, size_t size) -> int {
   90|      2|          GetExternalEngineCallback()->RunOneInputData(
   91|      2|              absl::string_view(reinterpret_cast<const char*>(data), size));
   92|      2|          return 0;
   93|      2|        });
   94|      2|  });
compatibility_mode.cc:_ZZZN8fuzztest8internal29FuzzTestExternalEngineAdaptor16RunInFuzzingModeEPiPPPcRKNS0_13ConfigurationEENK3$_0clEvENKUlPKhmE_clESB_m:
   89|  16.5k|        argc, argv, [](const uint8_t* data, size_t size) -> int {
   90|  16.5k|          GetExternalEngineCallback()->RunOneInputData(
   91|  16.5k|              absl::string_view(reinterpret_cast<const char*>(data), size));
   92|  16.5k|          return 0;
   93|  16.5k|        });

_ZNK8fuzztest8internal13Configuration19GetTimeLimitPerTestEv:
  318|      2|absl::Duration Configuration::GetTimeLimitPerTest() const {
  319|      2|  switch (time_budget_type) {
  320|      2|    case TimeBudgetType::kPerTest:
  ------------------
  |  Branch (320:5): [True: 2, False: 0]
  ------------------
  321|      2|      return time_limit;
  322|      0|    case TimeBudgetType::kTotal:
  ------------------
  |  Branch (322:5): [True: 0, False: 2]
  ------------------
  323|      0|      return time_limit / fuzz_tests_in_current_shard.size();
  324|      0|    default:
  ------------------
  |  Branch (324:5): [True: 0, False: 2]
  ------------------
  325|      0|      return absl::InfiniteDuration();
  326|      2|  }
  327|      2|}

_ZN8fuzztest8internal20GetExecutionCoverageEv:
   91|      2|ExecutionCoverage* GetExecutionCoverage() {
   92|      2|  return execution_coverage_instance;
   93|      2|}
_ZN8fuzztest8internal14CorpusCoverageC2Em:
  279|      2|CorpusCoverage::CorpusCoverage(size_t map_size) {
  280|      2|  size_t alignment = alignof(Vector);
  281|       |  // Round up to a multiple of alignment.
  282|      2|  map_size += alignment - 1;
  283|      2|  map_size -= map_size % alignment;
  284|       |  // And allocate an extra step to make sure the alignment logic has the
  285|       |  // necessary space.
  286|      2|  map_size += alignment;
  287|      2|  corpus_map_size_ = map_size;
  288|       |#if defined(_WIN32)
  289|       |  corpus_map_ = static_cast<uint8_t*>(_aligned_malloc(map_size, alignment));
  290|       |#else
  291|      2|  corpus_map_ = static_cast<uint8_t*>(std::aligned_alloc(alignment, map_size));
  292|      2|#endif
  293|      2|  std::fill(corpus_map_, corpus_map_ + corpus_map_size_, 0);
  294|      2|}

_ZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE19ValidateCorpusValueERKSA_:
  173|  13.3k|  absl::Status ValidateCorpusValue(const corpus_type& corpus_value) const {
  174|  13.3k|    absl::Status result = absl::OkStatus();
  175|  13.3k|    ApplyIndex<sizeof...(Inner)>([&](auto... I) {
  176|  13.3k|      (
  177|  13.3k|          [&] {
  178|  13.3k|            if (!result.ok()) return;
  179|  13.3k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  13.3k|                std::get<I>(corpus_value));
  181|  13.3k|            result = Prefix(s, "Invalid value in aggregate");
  182|  13.3k|          }(),
  183|  13.3k|          ...);
  184|  13.3k|    });
  185|  13.3k|    return result;
  186|  13.3k|  }
_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|  13.3k|    ApplyIndex<sizeof...(Inner)>([&](auto... I) {
  176|  13.3k|      (
  177|  13.3k|          [&] {
  178|  13.3k|            if (!result.ok()) return;
  179|  13.3k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  13.3k|                std::get<I>(corpus_value));
  181|  13.3k|            result = Prefix(s, "Invalid value in aggregate");
  182|  13.3k|          }(),
  183|  13.3k|          ...);
  184|  13.3k|    });
_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|  13.3k|          [&] {
  178|  13.3k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 13.3k]
  ------------------
  179|  13.3k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  13.3k|                std::get<I>(corpus_value));
  181|  13.3k|            result = Prefix(s, "Invalid value in aggregate");
  182|  13.3k|          }(),
_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|  13.3k|          [&] {
  178|  13.3k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 13.3k]
  ------------------
  179|  13.3k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  13.3k|                std::get<I>(corpus_value));
  181|  13.3k|            result = Prefix(s, "Invalid value in aggregate");
  182|  13.3k|          }(),
_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|  13.3k|          [&] {
  178|  13.3k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 13.3k]
  ------------------
  179|  13.3k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  13.3k|                std::get<I>(corpus_value));
  181|  13.3k|            result = Prefix(s, "Invalid value in aggregate");
  182|  13.3k|          }(),
_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|  13.3k|          [&] {
  178|  13.3k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 0, False: 13.3k]
  ------------------
  179|  13.3k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  13.3k|                std::get<I>(corpus_value));
  181|  13.3k|            result = Prefix(s, "Invalid value in aggregate");
  182|  13.3k|          }(),
_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|  13.3k|          [&] {
  178|  13.3k|            if (!result.ok()) return;
  ------------------
  |  Branch (178:17): [True: 21, False: 13.3k]
  ------------------
  179|  13.3k|            const absl::Status s = std::get<I>(inner_).ValidateCorpusValue(
  180|  13.3k|                std::get<I>(corpus_value));
  181|  13.3k|            result = Prefix(s, "Invalid value in aggregate");
  182|  13.3k|          }(),
_ZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE11ParseCorpusERKNS0_6no_adl8IRObjectE:
  157|  15.3k|  std::optional<corpus_type> ParseCorpus(const IRObject& obj) const {
  158|       |    if constexpr (has_custom_corpus_type) {
  159|       |      return ParseWithDomainTuple(inner_, obj);
  160|  15.3k|    } else {
  161|  15.3k|      return obj.ToCorpus<corpus_type>();
  162|  15.3k|    }
  163|  15.3k|  }
_ZNK8fuzztest8internal15AggregateOfImplINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplIS9_NS0_13ArbitraryImplIcvEEEENSD_IbvEESG_NS0_24BitFlagCombinationOfImplIjEESG_EE8GetValueERKSA_:
  115|  13.3k|  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|  13.3k|    } else {
  132|  13.3k|      return value;
  133|  13.3k|    }
  134|  13.3k|  }
_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:
  131|  40.0k|  absl::Status ValidateCorpusValue(const value_type&) const {
  132|  40.0k|    return absl::OkStatus();  // Nothing to validate.
  133|  40.0k|  }
_ZNK8fuzztest8internal13ArbitraryImplIcvE19ValidateCorpusValueERKc:
  209|  19.6M|  absl::Status ValidateCorpusValue(const value_type&) const {
  210|  19.6M|    return absl::OkStatus();  // Nothing to validate.
  211|  19.6M|  }

_ZNK8fuzztest8internal24BitFlagCombinationOfImplIjE19ValidateCorpusValueERKj:
   70|  13.3k|  absl::Status ValidateCorpusValue(const value_type& val) const {
   71|  13.3k|    if (BitOr(val, all_flags_combo_) != all_flags_combo_) {
  ------------------
  |  Branch (71:9): [True: 21, False: 13.3k]
  ------------------
   72|     21|      return absl::InvalidArgumentError("Invalid bit flag combination.");
   73|     21|    }
   74|  13.3k|    return absl::OkStatus();
   75|  13.3k|  }
_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|  13.3k|  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|  13.3k|    } else {
   96|  13.3k|      return static_cast<value_type>(a | b);
   97|  13.3k|    }
   98|  13.3k|  }
_ZN8fuzztest8internal24BitFlagCombinationOfImplIjEC2EN4absl12lts_202605264SpanIKjEE:
   38|      2|      : flags_(flags.begin(), flags.end()), all_flags_combo_{} {
   39|      4|    FUZZTEST_PRECONDITION(!flags.empty())
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   40|      4|        << "BitFlagCombinationOf requires a non empty list.";
   41|       |    // Make sure they are mutually exclusive metadata, only_shrink and none are
   42|       |    // empty.
   43|      8|    for (int i = 0; i < flags.size(); ++i) {
  ------------------
  |  Branch (43:21): [True: 6, False: 2]
  ------------------
   44|      6|      T v1 = flags[i];
   45|     12|      FUZZTEST_PRECONDITION(v1 != T{})
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      6|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      6|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     12|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     12|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      6|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     12|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 6]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      6|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      6|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   46|     12|          << "BitFlagCombinationOf requires non zero flags.";
   47|     12|      for (int j = i + 1; j < flags.size(); ++j) {
  ------------------
  |  Branch (47:27): [True: 6, False: 6]
  ------------------
   48|      6|        T v2 = flags[j];
   49|     12|        FUZZTEST_PRECONDITION(BitAnd(v1, v2) == T{})
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      6|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      6|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|     12|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|     12|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      6|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|     12|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 6]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 6]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      6|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      6|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   50|     12|            << "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_E9FromValueERKS9_:
  291|    138|  std::optional<corpus_type> FromValue(const value_type& value) const {
  292|    138|    if constexpr (!has_custom_corpus_type) {
  293|    138|      return value;
  294|       |    } else {
  295|       |      corpus_type copus_value;
  296|       |      for (const auto& elem : value) {
  297|       |        auto inner_value = inner_.FromValue(elem);
  298|       |        if (!inner_value) return std::nullopt;
  299|       |        copus_value.push_back(*std::move(inner_value));
  300|       |      }
  301|       |      return copus_value;
  302|       |    }
  303|    138|  }
_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E19ValidateCorpusValueERKS9_:
  339|  13.4k|  absl::Status ValidateCorpusValue(const corpus_type& corpus_value) const {
  340|       |    // Check size.
  341|  13.4k|    if (corpus_value.size() < min_size()) {
  ------------------
  |  Branch (341:9): [True: 0, False: 13.4k]
  ------------------
  342|      0|      return absl::InvalidArgumentError(absl::StrCat(
  343|      0|          "Invalid size: ", corpus_value.size(), ". Min size: ", min_size()));
  344|      0|    }
  345|  13.4k|    if (validate_max_size() && corpus_value.size() > max_size()) {
  ------------------
  |  Branch (345:9): [True: 13.4k, False: 0]
  |  Branch (345:32): [True: 0, False: 13.4k]
  ------------------
  346|      0|      return absl::InvalidArgumentError(absl::StrCat(
  347|      0|          "Invalid size: ", corpus_value.size(), ". Max size: ", max_size()));
  348|      0|    }
  349|       |    // Check elements.
  350|  13.4k|    int i = 0;
  351|  19.6M|    for (const auto& elem : corpus_value) {
  ------------------
  |  Branch (351:27): [True: 19.6M, False: 13.4k]
  ------------------
  352|  19.6M|      const absl::Status s = inner_.ValidateCorpusValue(elem);
  353|  19.6M|      if (!s.ok()) {
  ------------------
  |  Branch (353:11): [True: 0, False: 19.6M]
  ------------------
  354|      0|        return Prefix(s,
  355|      0|                      absl::StrCat("Invalid value in container at index ", i));
  356|      0|      }
  357|  19.6M|      i++;
  358|  19.6M|    }
  359|  13.4k|    return absl::OkStatus();
  360|  13.4k|  }
_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E8min_sizeEv:
  394|  13.4k|  size_t min_size() const { return min_size_; }
_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E17validate_max_sizeEv:
  398|  13.4k|  bool validate_max_size() const { return validate_max_size_; }
_ZNK8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E8max_sizeEv:
  395|  13.4k|  size_t max_size() const {
  396|  13.4k|    return max_size_.value_or(std::max(min_size_, kDefaultContainerMaxSize));
  397|  13.4k|  }
_ZN8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E4SelfEv:
  401|      2|  Derived& Self() { return static_cast<Derived&>(*this); }
_ZN8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_E11WithMaxSizeEm:
  236|      2|  Derived& WithMaxSize(size_t s) {
  237|      4|    FUZZTEST_PRECONDITION(min_size_ <= s)
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  238|      4|        << "Maximal size " << s << " cannot be smaller than minimal size "
  239|      4|        << min_size_;
  240|      2|    max_size_ = s;
  241|      2|    validate_max_size_ = true;
  242|      2|    return Self();
  243|      2|  }
_ZN8fuzztest8internal27SequenceContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_EC2Ev:
  572|      2|  SequenceContainerOfImplBase() = default;
_ZN8fuzztest8internal19ContainerOfImplBaseINS0_23SequenceContainerOfImplINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS0_13ArbitraryImplIcvEEEES9_SB_EC2Ev:
  110|      2|  ContainerOfImplBase() = default;

_ZNK8fuzztest13UntypedDomain8GetValueERKNS_8internal11CopyableAnyE:
  347|  13.3k|  value_type GetValue(const corpus_type& corpus_value) const {
  348|  13.3k|    return inner_->UntypedGetValue(corpus_value);
  349|  13.3k|  }
_ZNK8fuzztest13UntypedDomain11ParseCorpusERKNS_8internal6no_adl8IRObjectE:
  351|  15.3k|  std::optional<corpus_type> ParseCorpus(const internal::IRObject& obj) const {
  352|  15.3k|    return inner_->UntypedParseCorpus(obj);
  353|  15.3k|  }
_ZNK8fuzztest13UntypedDomain19ValidateCorpusValueERKNS_8internal11CopyableAnyE:
  359|  13.3k|  absl::Status ValidateCorpusValue(const corpus_type& corpus_value) const {
  360|  13.3k|    return inner_->UntypedValidateCorpusValue(corpus_value);
  361|  13.3k|  }
_ZN8fuzztest6DomainINSt3__15tupleIJNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEEC2INS_8internal15AggregateOfImplIS9_LNSC_23RequireCustomCorpusTypeE0EJNSC_23SequenceContainerOfImplIS8_NSC_13ArbitraryImplIcvEEEENSG_IbvEESJ_NSC_24BitFlagCombinationOfImplIjEESJ_EEES9_EEONS_18domain_implementor10DomainBaseIT_S9_T0_EE:
  112|      2|      : inner_(std::make_unique<internal::DomainModel<Inner>>(
  113|      2|            static_cast<Inner&&>(inner))) {}
_ZN8fuzztest6DomainINSt3__15tupleIJNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEEC2ERKSA_:
  115|     12|  Domain(const Domain& other) { *this = other; }
_ZN8fuzztest6DomainINSt3__15tupleIJNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEEaSERKSA_:
  116|     12|  Domain& operator=(const Domain& other) {
  117|     12|    inner_ = other.inner_->TypedClone();
  118|     12|    return *this;
  119|     12|  }
_ZN8fuzztest13UntypedDomainC2INSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEEERKNS_6DomainIT_EE:
  332|      2|      : inner_(domain.inner_->UntypedClone()) {}

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

_ZN8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEEC2EOSK_:
  132|      2|  explicit DomainModel(D&& domain) : domain_(std::forward<D>(domain)) {}
_ZN8fuzztest8internal20UntypedDomainConceptD2Ev:
   57|     10|  virtual ~UntypedDomainConcept() = default;
_ZNK8fuzztest8internal18TypedDomainConceptINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEE12UntypedCloneEv:
  110|      2|  std::unique_ptr<UntypedDomainConcept> UntypedClone() const final {
  111|      2|    return TypedClone();
  112|      2|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE18UntypedParseCorpusERKNS0_6no_adl8IRObjectE:
  180|  15.3k|      const IRObject& obj) const final {
  181|  15.3k|    if (auto res = domain_.ParseCorpus(obj)) {
  ------------------
  |  Branch (181:14): [True: 13.3k, False: 1.94k]
  ------------------
  182|  13.3k|      return GenericDomainCorpusType(std::in_place_type<CorpusType>,
  183|  13.3k|                                     *std::move(res));
  184|  13.3k|    } else {
  185|  1.94k|      return std::nullopt;
  186|  1.94k|    }
  187|  15.3k|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE26UntypedValidateCorpusValueERKNS0_11CopyableAnyE:
  195|  13.3k|      const GenericDomainCorpusType& corpus_value) const final {
  196|  13.3k|    return domain_.ValidateCorpusValue(corpus_value.GetAs<CorpusType>());
  197|  13.3k|  }
_ZNK8fuzztest8internal18TypedDomainConceptINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEE15UntypedGetValueERKNS0_11CopyableAnyE:
  115|  13.3k|      const GenericDomainCorpusType& v) const final {
  116|  13.3k|    return GenericDomainValueType(std::in_place_type<ValueType>,
  117|  13.3k|                                  TypedGetValue(v));
  118|  13.3k|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE10TypedCloneEv:
  134|     14|  std::unique_ptr<TypedDomainConcept<ValueType>> TypedClone() const final {
  135|     14|    return std::make_unique<DomainModel>(*this);
  136|     14|  }
_ZNK8fuzztest8internal11DomainModelINS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EEEE13TypedGetValueERKNS0_11CopyableAnyE:
  159|  13.3k|  ValueType TypedGetValue(const GenericDomainCorpusType& v) const final {
  160|  13.3k|    return domain_.GetValue(v.GetAs<CorpusType>());
  161|  13.3k|  }

_ZN8fuzztest8internal20UntypedFixtureDriver11RunFuzzTestEN4absl12lts_2026052612AnyInvocableIFvvOEEE:
   24|      2|void UntypedFixtureDriver::RunFuzzTest(absl::AnyInvocable<void() &&> run_test) {
   25|      2|  std::move(run_test)();
   26|      2|}
_ZN8fuzztest8internal20UntypedFixtureDriver20RunFuzzTestIterationEN4absl12lts_2026052612AnyInvocableIFvvOEEE:
   28|  13.3k|    absl::AnyInvocable<void() &&> run_iteration) {
   29|  13.3k|  std::move(run_iteration)();
   30|  13.3k|}

_ZN8fuzztest8internal13FixtureDriverINS_6DomainINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS0_9NoFixtureEPFvRKSA_bbjbEPvEC2ESH_SC_NS3_6vectorINS0_11CopyableAnyENS8_ISL_EEEERKSI_:
  317|      2|      : FixtureDriver::TypedFixtureDriver(std::move(domain), std::move(seeds),
  318|      2|                                          seed_provider),
  319|      2|        target_function_(target_function) {}
_ZN8fuzztest8internal18TypedFixtureDriverINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEPvEC2ENS_6DomainISA_EENS2_6vectorINS0_11CopyableAnyENS7_ISG_EEEERKSB_:
  135|      2|      : domain_(std::move(domain)),
  136|      2|        seeds_(std::move(seeds)),
  137|      2|        seed_provider_(seed_provider) {}
_ZNK8fuzztest8internal13FixtureDriverINS_6DomainINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS0_9NoFixtureEPFvRKSA_bbjbEPvE4TestEONS0_11MoveOnlyAnyE:
  321|  13.3k|  void Test(MoveOnlyAny&& args_untyped) const override {
  322|  13.3k|    std::apply(
  323|  13.3k|        [&](auto&&... args) {
  324|  13.3k|          target_function_(ForceVectorForStringView<Args>(std::move(args))...);
  325|  13.3k|        },
  326|  13.3k|        args_untyped.GetAs<value_type_t<DomainT>>());
  327|  13.3k|  }
_ZZNK8fuzztest8internal13FixtureDriverINS_6DomainINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEEEENS0_9NoFixtureEPFvRKSA_bbjbEPvE4TestEONS0_11MoveOnlyAnyEENKUlDpOT_E_clIJRSA_RbSS_RjSS_EEEDaSO_:
  323|  13.3k|        [&](auto&&... args) {
  324|  13.3k|          target_function_(ForceVectorForStringView<Args>(std::move(args))...);
  325|  13.3k|        },
_ZN8fuzztest8internal24ForceVectorForStringViewIRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_EEDcOT0_:
  212|  13.3k|decltype(auto) ForceVectorForStringView(Src&& src) {
  213|       |  // We only do this when Src is a std::string. If it's a string view it is
  214|       |  // handled by the string view domain itself.
  215|       |  if constexpr (std::is_same_v<void(std::decay_t<Dest>, std::decay_t<Src>),
  216|       |                               void(std::string_view, std::string)>) {
  217|       |    return ForceVector{std::vector<char>(src.begin(), src.end())};
  218|  13.3k|  } else {
  219|  13.3k|    return std::forward<Src>(src);
  220|  13.3k|  }
  221|  13.3k|}
_ZN8fuzztest8internal24ForceVectorForStringViewIbbEEDcOT0_:
  212|  40.0k|decltype(auto) ForceVectorForStringView(Src&& src) {
  213|       |  // We only do this when Src is a std::string. If it's a string view it is
  214|       |  // handled by the string view domain itself.
  215|       |  if constexpr (std::is_same_v<void(std::decay_t<Dest>, std::decay_t<Src>),
  216|       |                               void(std::string_view, std::string)>) {
  217|       |    return ForceVector{std::vector<char>(src.begin(), src.end())};
  218|  40.0k|  } else {
  219|  40.0k|    return std::forward<Src>(src);
  220|  40.0k|  }
  221|  40.0k|}
_ZN8fuzztest8internal24ForceVectorForStringViewIjjEEDcOT0_:
  212|  13.3k|decltype(auto) ForceVectorForStringView(Src&& src) {
  213|       |  // We only do this when Src is a std::string. If it's a string view it is
  214|       |  // handled by the string view domain itself.
  215|       |  if constexpr (std::is_same_v<void(std::decay_t<Dest>, std::decay_t<Src>),
  216|       |                               void(std::string_view, std::string)>) {
  217|       |    return ForceVector{std::vector<char>(src.begin(), src.end())};
  218|  13.3k|  } else {
  219|  13.3k|    return std::forward<Src>(src);
  220|  13.3k|  }
  221|  13.3k|}
_ZNK8fuzztest8internal18TypedFixtureDriverINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEEPvE10GetDomainsEv:
  151|      2|  UntypedDomain GetDomains() const final { return domain_; }

_ZNK8fuzztest8internal17GTest_TestAdaptor26GetFuzzTestsInCurrentShardEv:
   28|      2|std::vector<std::string> GTest_TestAdaptor::GetFuzzTestsInCurrentShard() const {
   29|      2|  std::vector<std::string> result;
   30|      2|  for (const auto* test : GetRegisteredTests()) {
  ------------------
  |  Branch (30:25): [True: 2, False: 2]
  ------------------
   31|      2|    if (!test->should_run()) continue;
  ------------------
  |  Branch (31:9): [True: 0, False: 2]
  ------------------
   32|      2|    if (test->is_in_another_shard()) continue;
  ------------------
  |  Branch (32:9): [True: 0, False: 2]
  ------------------
   33|      2|    for (const auto& fuzztest : configuration_.fuzz_tests) {
  ------------------
  |  Branch (33:31): [True: 2, False: 0]
  ------------------
   34|      2|      if (fuzztest ==
  ------------------
  |  Branch (34:11): [True: 2, False: 0]
  ------------------
   35|      2|          absl::StrCat(test->test_suite_name(), ".", test->name())) {
   36|      2|        result.push_back(fuzztest);
   37|      2|        break;
   38|      2|      }
   39|      2|    }
   40|      2|  }
   41|      2|  return result;
   42|      2|}
_ZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS0_13ConfigurationE:
  105|      2|                                    const Configuration& configuration) {
  106|      2|  ::fuzztest::internal::ForEachTest([&](auto& test) {
  107|      2|    if (test.uses_fixture()) {
  108|      2|      RegisterTests<::fuzztest::internal::GTest_TestAdaptor>(argc, argv, test,
  109|      2|                                                             configuration);
  110|      2|    } else {
  111|      2|      RegisterTests<::testing::Test>(argc, argv, test, configuration);
  112|      2|    }
  113|      2|  });
  114|       |
  115|      2|  ::testing::UnitTest::GetInstance()->listeners().Append(
  116|      2|      new ::fuzztest::internal::GTest_EventListener<
  117|      2|          ::testing::EmptyTestEventListener, ::testing::TestPartResult>());
  118|      2|}
_ZN8fuzztest8internal28FuzzTestListingModeValidator26RegisterGoogleTestListenerEv:
  174|      2|void FuzzTestListingModeValidator::RegisterGoogleTestListener() {
  175|      2|  testing::UnitTest::GetInstance()->listeners().Append(
  176|      2|      new ValidatorProxyListener(this));
  177|      2|}
_ZN8fuzztest8internal44SetFuzzTestListingModeValidatorForGoogleTestEb:
  179|      2|void SetFuzzTestListingModeValidatorForGoogleTest(bool listing_mode) {
  180|      2|  FuzzTestListingModeValidator::GetInstance().set_listing_mode(listing_mode);
  181|      2|}
_ZN8fuzztest8internal18GetRegisteredTestsEv:
  183|      2|std::vector<const testing::TestInfo*> GetRegisteredTests() {
  184|      2|  std::vector<const testing::TestInfo*> result;
  185|      2|  auto& unit_test = *testing::UnitTest::GetInstance();
  186|       |  // TODO(b/416466508): Remove this call once the bug is fixed. This function is
  187|       |  // internal to GoogleTest.
  188|      2|  unit_test.parameterized_test_registry().RegisterTests();
  189|      4|  for (int i = 0; i < unit_test.total_test_suite_count(); ++i) {
  ------------------
  |  Branch (189:19): [True: 2, False: 2]
  ------------------
  190|      4|    for (int j = 0; j < unit_test.GetTestSuite(i)->total_test_count(); ++j) {
  ------------------
  |  Branch (190:21): [True: 2, False: 2]
  ------------------
  191|      2|      result.push_back(unit_test.GetTestSuite(i)->GetTestInfo(j));
  192|      2|    }
  193|      2|  }
  194|      2|  return result;
  195|      2|}
_ZN8fuzztest8internal22ValidatorProxyListenerC2EPNS0_28FuzzTestListingModeValidatorE:
  169|      2|      : validator_(validator) {}
_ZN8fuzztest8internal22ValidatorProxyListener18OnTestProgramStartERKN7testing8UnitTestE:
  161|      2|  void OnTestProgramStart(const testing::UnitTest& unit_test) override {
  162|      2|    validator_->Run();
  163|      2|  }
_ZN8fuzztest8internal28FuzzTestListingModeValidator3RunEv:
  124|      2|  void Run() {
  125|      2|    if (listing_mode_) {
  ------------------
  |  Branch (125:9): [True: 0, False: 2]
  ------------------
  126|       |      // Since InitFuzzTest calls std::exit after listing the fuzz tests, we
  127|       |      // would not reach here if InitFuzzTest is called before.
  128|       |      absl::FPrintF(stderr,
  129|      0|                    "[!] --" FUZZTEST_FLAG_PREFIX
  130|      0|                    "list_fuzz_tests not handled by InitFuzzTest - fuzz tests "
  131|      0|                    "would not be listed even if defined.\n");
  132|      0|      std::exit(0);
  133|      0|    }
  134|      2|  }
_ZN8fuzztest8internal28FuzzTestListingModeValidator11GetInstanceEv:
  138|      2|  static FuzzTestListingModeValidator& GetInstance() {
  139|      2|    static auto* instance = [] {
  140|      2|      static_assert(
  141|      2|          std::is_trivially_destructible_v<FuzzTestListingModeValidator>);
  142|      2|      static FuzzTestListingModeValidator instance;
  143|      2|      instance.RegisterGoogleTestListener();
  144|      2|      return &instance;
  145|      2|    }();
  146|      2|    return *instance;
  147|      2|  }
_ZZN8fuzztest8internal28FuzzTestListingModeValidator11GetInstanceEvENKUlvE_clEv:
  139|      2|    static auto* instance = [] {
  140|      2|      static_assert(
  141|      2|          std::is_trivially_destructible_v<FuzzTestListingModeValidator>);
  142|      2|      static FuzzTestListingModeValidator instance;
  143|      2|      instance.RegisterGoogleTestListener();
  144|      2|      return &instance;
  145|      2|    }();
_ZN8fuzztest8internal28FuzzTestListingModeValidator16set_listing_modeEb:
  136|      2|  void set_listing_mode(bool listing_mode) { listing_mode_ = listing_mode; }
googletest_adaptor.cc:_ZZN8fuzztest8internal30RegisterFuzzTestsAsGoogleTestsEPiPPPcRKNS0_13ConfigurationEENK3$_0clINS0_8FuzzTestEEEDaRT_:
  106|      2|  ::fuzztest::internal::ForEachTest([&](auto& test) {
  107|      2|    if (test.uses_fixture()) {
  ------------------
  |  Branch (107:9): [True: 0, False: 2]
  ------------------
  108|      0|      RegisterTests<::fuzztest::internal::GTest_TestAdaptor>(argc, argv, test,
  109|      0|                                                             configuration);
  110|      2|    } else {
  111|      2|      RegisterTests<::testing::Test>(argc, argv, test, configuration);
  112|      2|    }
  113|      2|  });
googletest_adaptor.cc:_ZN8fuzztest8internal12_GLOBAL__N_113RegisterTestsIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationE:
   96|      2|                   const Configuration& configuration) {
   97|      2|  RegisterFuzzTestAsGTest<T>(argc, argv, test, configuration);
   98|      2|  RegisterSeparateRegressionTestForEachCrashingInput<T>(argc, argv, test,
   99|      2|                                                        configuration);
  100|      2|}
googletest_adaptor.cc:_ZN8fuzztest8internal12_GLOBAL__N_123RegisterFuzzTestAsGTestIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationENSt3__117basic_string_viewIcNSE_11char_traitsIcEEEE:
   48|      2|                             absl::string_view crashing_input_path = "") {
   49|      2|  auto fixture_factory = [argc, argv, &test,
   50|      2|                          configuration = configuration]() mutable -> T* {
   51|      2|    return new ::fuzztest::internal::GTest_TestAdaptor(
   52|      2|        test, argc, argv, std::move(configuration));
   53|      2|  };
   54|      2|  if (crashing_input_path.empty()) {
  ------------------
  |  Branch (54:7): [True: 2, False: 0]
  ------------------
   55|      2|    ::testing::RegisterTest(test.suite_name().c_str(), test.test_name().c_str(),
   56|      2|                            nullptr, nullptr, test.file().c_str(), test.line(),
   57|      2|                            std::move(fixture_factory));
   58|      2|    return;
   59|      2|  }
   60|      0|  const absl::StatusOr<std::string> regression_test_name =
   61|      0|      RegressionTestNameForCrashingInput(test.test_name(), crashing_input_path);
   62|      0|  if (!regression_test_name.ok()) {
  ------------------
  |  Branch (62:7): [True: 0, False: 0]
  ------------------
   63|      0|    FUZZTEST_LOG(WARNING)
  ------------------
  |  |   36|      0|#define FUZZTEST_LOG(severity) ABSL_LOG(severity)
  |  |  ------------------
  |  |  |  |   38|      0|#define ABSL_LOG(severity) ABSL_LOG_INTERNAL_LOG_IMPL(_##severity)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION##severity(STATELESS, true) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  174|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|      ABSL_LOG_INTERNAL_LOG##severity.InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|  ::absl::log_internal::LogMessage(   \
  |  |  |  |  |  |  |  |   61|      0|      __FILE__, __LINE__, ::absl::log_internal::LogMessage::WarningTag{})
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   64|      0|        << "Failed to get regression test name for crashing input "
   65|      0|        << crashing_input_path << ". Not registering a regression test for it. "
   66|      0|        << "Status: " << regression_test_name.status();
   67|      0|    return;
   68|      0|  }
   69|      0|  ::testing::RegisterTest(
   70|      0|      test.suite_name().c_str(), regression_test_name->c_str(), nullptr,
   71|      0|      nullptr, test.file().c_str(), test.line(), std::move(fixture_factory));
   72|      0|}
googletest_adaptor.cc:_ZZN8fuzztest8internal12_GLOBAL__N_123RegisterFuzzTestAsGTestIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationENSt3__117basic_string_viewIcNSE_11char_traitsIcEEEEENUlvE_clEv:
   50|      2|                          configuration = configuration]() mutable -> T* {
   51|      2|    return new ::fuzztest::internal::GTest_TestAdaptor(
   52|      2|        test, argc, argv, std::move(configuration));
   53|      2|  };
googletest_adaptor.cc:_ZN8fuzztest8internal12_GLOBAL__N_150RegisterSeparateRegressionTestForEachCrashingInputIN7testing4TestEEEvPiPPPcRNS0_8FuzzTestERKNS0_13ConfigurationE:
   77|      2|    const Configuration& configuration) {
   78|      2|  if (!configuration.reproduce_findings_as_separate_tests) return;
  ------------------
  |  Branch (78:7): [True: 2, False: 0]
  ------------------
   79|       |#ifdef FUZZTEST_USE_CENTIPEDE
   80|       |  const std::vector<std::string> crash_inputs =
   81|       |      ListCrashIdsUsingCentipede(configuration, test.full_name());
   82|       |#else
   83|      0|  CorpusDatabase corpus_database(configuration);
   84|      0|  const std::vector<std::string> crash_inputs =
   85|      0|      corpus_database.GetCrashingInputsIfAny(test.full_name());
   86|      0|#endif
   87|      0|  for (const std::string& input : crash_inputs) {
  ------------------
  |  Branch (87:33): [True: 0, False: 0]
  ------------------
   88|      0|    Configuration updated_configuration = configuration;
   89|      0|    updated_configuration.crashing_input_to_reproduce = input;
   90|      0|    RegisterFuzzTestAsGTest<T>(argc, argv, test, updated_configuration, input);
   91|      0|  }
   92|      0|}

_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|    RecordProperty("fuzz_test", "true");
   42|      2|    auto test = test_.make();
   43|      2|    configuration_.fuzz_tests_in_current_shard = GetFuzzTestsInCurrentShard();
   44|       |    // We replay a reproducer in the same process to help debugging when
   45|       |    // (1) we're replaying a single reproducer and (2) we're running locally.
   46|      2|    const bool running_locally =
   47|      2|        !std::getenv("FUZZTEST_RUNNING_UNDER_CI");
   48|      2|    configuration_.replay_in_single_process =
   49|      2|        configuration_.crashing_input_to_reproduce.has_value() &&
  ------------------
  |  Branch (49:9): [True: 0, False: 2]
  ------------------
   50|      0|        testing::UnitTest::GetInstance()->test_to_run_count() == 1 &&
  ------------------
  |  Branch (50:9): [True: 0, False: 0]
  ------------------
   51|      0|        running_locally;
  ------------------
  |  Branch (51:9): [True: 0, False: 0]
  ------------------
   52|      2|    if (Runtime::instance().run_mode() == RunMode::kUnitTest) {
  ------------------
  |  Branch (52:9): [True: 0, False: 2]
  ------------------
   53|       |      // In "bug reproduction" mode, sometimes we need to reproduce multiple
   54|       |      // bugs, i.e., run multiple tests that lead to a crash.
   55|      0|#if defined(GTEST_HAS_DEATH_TEST) && !defined(FUZZTEST_USE_CENTIPEDE)
   56|      0|      const bool needs_subprocess =
   57|      0|          configuration_.crashing_input_to_reproduce.has_value() &&
  ------------------
  |  Branch (57:11): [True: 0, False: 0]
  ------------------
   58|      0|          (!configuration_.replay_in_single_process ||
  ------------------
  |  Branch (58:12): [True: 0, False: 0]
  ------------------
   59|       |           // EXPECT_EXIT is required in the death-test subprocess, but in
   60|       |           // the subprocess there's only one test to run.
   61|      0|           testing::internal::InDeathTestChild());
  ------------------
  |  Branch (61:12): [True: 0, False: 0]
  ------------------
   62|       |#else
   63|       |      const bool needs_subprocess = false;
   64|       |#endif
   65|      0|      if (needs_subprocess) {
  ------------------
  |  Branch (65:11): [True: 0, False: 0]
  ------------------
   66|      0|        configuration_.preprocess_crash_reproducing = [] {
   67|       |          // EXPECT_EXIT disables event forwarding in gtest and as a result,
   68|       |          // EXPECT/ASSERT-s are disabled. Here, we overwrite this option.
   69|      0|          testing::UnitTest::GetInstance()->listeners().SuppressEventForwarding(
   70|      0|              false);
   71|      0|        };
   72|       |        // `RunInUnitTestMode` is supposed to fail and we wish to show the
   73|       |        // failure to the user. Directly running the test would terminate the
   74|       |        // process and using `EXPECT_DEATH` causes the test to pass. We use
   75|       |        // `EXPECT_EXIT` so that the test exit unsuccessfully, meaning that the
   76|       |        // test below fails without terminating the process.
   77|      0|#ifdef GTEST_HAS_DEATH_TEST
   78|      0|        EXPECT_EXIT(
  ------------------
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  |  Branch (78:9): [True: 0, False: 0]
  ------------------
   79|      0|            (test->RunInUnitTestMode(configuration_),
   80|      0|             void(
   81|      0|                 R"( FuzzTest failure! Please see 'actual message' below for the crash report. )"),
   82|      0|             std::exit(0)),
   83|      0|            ::testing::ExitedWithCode(0), "");
   84|       |#else
   85|       |        EXPECT_TRUE(false) << "Death test is not supported.";
   86|       |#endif
   87|      0|      } else {
   88|      0|        EXPECT_TRUE(test->RunInUnitTestMode(configuration_))
  ------------------
  |  Branch (88:9): [True: 0, False: 0]
  |  Branch (88:9): [True: 0, False: 0]
  |  Branch (88:9): [True: 0, False: 0]
  ------------------
   89|      0|            << "Failure(s) found in the unit-test mode - please see the test "
   90|      0|               "log for more details.";
   91|      0|      }
   92|      2|    } else {
   93|       |      // TODO(b/245753736): Consider using `tolerate_failure` when FuzzTest can
   94|       |      // tolerate crashes in fuzzing mode.
   95|      6|      EXPECT_TRUE(test->RunInFuzzingMode(argc_, argv_, configuration_))
  ------------------
  |  Branch (95:7): [True: 0, False: 2]
  |  Branch (95:7): [True: 0, False: 2]
  |  Branch (95:7): [True: 2, False: 0]
  ------------------
   96|      6|          << "Failure(s) found in the fuzzing mode - please see the test log "
   97|      6|             "for more details.";
   98|      2|    }
   99|      2|  }

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

_ZN8fuzztest8internal14GetStderrFdDupEv:
   79|      2|int GetStderrFdDup() {
   80|       |  static int fd = DupLocally(STDERR_FILENO);
   81|      2|  return fd;
   82|      2|}
_ZN8fuzztest8internal9GetStderrEv:
   84|      2|FILE* GetStderr() {
   85|      2|  absl::MutexLock lock(stderr_file_guard_);
   86|      2|  if (!stderr_file_) {
  ------------------
  |  Branch (86:7): [True: 2, False: 0]
  ------------------
   87|       |    stderr_file_ = stderr;
   88|      2|  }
   89|      2|  return stderr_file_;
   90|      2|}
logging.cc:_ZN8fuzztest8internal12_GLOBAL__N_110DupLocallyEi:
   45|      4|int DupLocally(int fd) {
   46|      4|  int dup_fd = dup(fd);
   47|       |  // Error conditions below are extremely unlikely, so we don't spend too much
   48|       |  // effort in handling/logging them.
   49|      4|  if (dup_fd == -1) {
  ------------------
  |  Branch (49:7): [True: 0, False: 4]
  ------------------
   50|      0|    constexpr char msg[] = "[!] dup() failed in DupLocally(), returning -1\n";
   51|      0|    (void)write(STDERR_FILENO, msg, sizeof(msg) - 1);
   52|      0|    return -1;
   53|      0|  }
   54|      4|  int flags = fcntl(dup_fd, F_GETFD);
   55|      4|  if (flags == -1) {
  ------------------
  |  Branch (55:7): [True: 0, False: 4]
  ------------------
   56|      0|    constexpr char msg[] =
   57|      0|        "[!] fcntl(F_GETFD) failed in DupLocally(), ignoring the "
   58|      0|        "error..\n";
   59|      0|    (void)write(STDERR_FILENO, msg, sizeof(msg) - 1);
   60|      0|    return dup_fd;
   61|      0|  }
   62|      4|  flags |= FD_CLOEXEC;
   63|      4|  if (fcntl(dup_fd, F_SETFD, flags) == -1) {
  ------------------
  |  Branch (63:7): [True: 0, False: 4]
  ------------------
   64|      0|    constexpr char msg[] =
   65|      0|        "[!] fcntl(F_SETFD) failed in DupLocally(), ignoring the "
   66|      0|        "error..\n";
   67|       |    (void)write(STDERR_FILENO, msg, sizeof(msg) - 1);
   68|      0|  }
   69|      4|  return dup_fd;
   70|      4|}
logging.cc:_ZN8fuzztest8internal12_GLOBAL__N_114GetStdoutFdDupEv:
   94|      2|int GetStdoutFdDup() {
   95|       |  static int fd = DupLocally(STDOUT_FILENO);
   96|      2|  return fd;
   97|      2|}

_ZN8fuzztest8internal11CheckIsSameIjjEEvv:
  839|      4|constexpr void CheckIsSame() {
  840|      4|  static_assert(std::is_same_v<T, U>);
  841|      4|}
_ZN8fuzztest8internal11CheckIsSameINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_EEvv:
  839|      4|constexpr void CheckIsSame() {
  840|      4|  static_assert(std::is_same_v<T, U>);
  841|      4|}
_ZN8fuzztest8internal11CheckIsSameIccEEvv:
  839|      4|constexpr void CheckIsSame() {
  840|      4|  static_assert(std::is_same_v<T, U>);
  841|      4|}
_ZN8fuzztest8internal11CheckIsSameIbbEEvv:
  839|     12|constexpr void CheckIsSame() {
  840|     12|  static_assert(std::is_same_v<T, U>);
  841|     12|}
_ZN8fuzztest8internal10ApplyIndexILm5EZNKS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EE19ValidateCorpusValueERKSB_EUlDpT_E_EEDaT0_:
   54|  13.3k|constexpr auto ApplyIndex(F f) {
   55|  13.3k|  return ApplyIndexImpl(f, std::make_index_sequence<N>{});
   56|  13.3k|}
_ZN8fuzztest8internal14ApplyIndexImplIJLm0ELm1ELm2ELm3ELm4EEZNKS0_15AggregateOfImplINSt3__15tupleIJNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbEEELNS0_23RequireCustomCorpusTypeE0EJNS0_23SequenceContainerOfImplISA_NS0_13ArbitraryImplIcvEEEENSE_IbvEESH_NS0_24BitFlagCombinationOfImplIjEESH_EE19ValidateCorpusValueERKSB_EUlDpT_E_EEDaT0_NS3_16integer_sequenceImJXspT_EEEE:
   39|  13.3k|constexpr auto ApplyIndexImpl(F f, std::index_sequence<I...>) {
   40|  13.3k|  return f(std::integral_constant<size_t, I>{}...);
   41|  13.3k|}
_ZN8fuzztest8internal10ApplyIndexILm5EZNKS0_6no_adl8IRObject8ToCorpusINSt3__15tupleIJNS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEbbjbEEEEENS5_8optionalIT_EEvEUlDpT_E_EEDaT0_:
   54|  13.4k|constexpr auto ApplyIndex(F f) {
   55|  13.4k|  return ApplyIndexImpl(f, std::make_index_sequence<N>{});
   56|  13.4k|}
_ZN8fuzztest8internal14ApplyIndexImplIJLm0ELm1ELm2ELm3ELm4EEZNKS0_6no_adl8IRObject8ToCorpusINSt3__15tupleIJNS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEbbjbEEEEENS5_8optionalIT_EEvEUlDpT_E_EEDaT0_NS5_16integer_sequenceImJXspT_EEEE:
   39|  13.4k|constexpr auto ApplyIndexImpl(F f, std::index_sequence<I...>) {
   40|  13.4k|  return f(std::integral_constant<size_t, I>{}...);
   41|  13.4k|}
_ZN8fuzztest8internal11CheckIsSameINSt3__15tupleIJNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEbbjbEEESA_EEvv:
  839|      4|constexpr void CheckIsSame() {
  840|      4|  static_assert(std::is_same_v<T, U>);
  841|      4|}

_ZN8fuzztest15GetRegistrationIPFvRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbjbEEEDaS7_S7_S7_iT_:
  338|      2|                     TargetFunction target_function) {
  339|      2|  return ::fuzztest::internal::Registration<::fuzztest::internal::NoFixture,
  340|      2|                                            TargetFunction>(
  341|      2|      ::fuzztest::internal::BasicTestInfo{std::move(suite_name),
  342|      2|                                          std::move(test_name), std::move(file),
  343|      2|                                          line, false},
  344|      2|      target_function);
  345|      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_:
  293|      2|      : Base(std::move(base)),
  294|      2|        test_info_(std::move(info)),
  295|      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:
  271|      2|  std::vector<GenericDomainCorpusType> seeds() const {
  272|       |    if constexpr (Base::kHasSeeds) {
  273|       |      return this->seeds_;
  274|      2|    } else {
  275|      2|      return {};
  276|      2|    }
  277|      2|  }
_ZN8fuzztest8internal12RegistrationINS0_9NoFixtureEPFvRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbjbENS0_27RegistrationWithDomainsBaseIJS9_bbjbEEEPvE13seed_providerEv:
  279|      2|  SeedProvider seed_provider() {
  280|       |    if constexpr (Base::kHasSeedProvider) {
  281|       |      return std::move(this->seed_provider_);
  282|      2|    } else {
  283|      2|      return {};
  284|      2|    }
  285|      2|  }

_ZN8fuzztest8internal11ForEachTestEN4absl12lts_2026052611FunctionRefIFvRNS0_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_2026052612AnyInvocableIKFNSt3__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_2026052612AnyInvocableIKFNS4_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_2026052612AnyInvocableIKFNS4_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:
  247|      2|Runtime::Runtime() {
  248|      2|  if (const char* crash_metadata_path =
  249|      2|          std::getenv("FUZZTEST_CRASH_METADATA_PATH");
  250|      2|      crash_metadata_path != nullptr) {
  ------------------
  |  Branch (250:7): [True: 0, False: 2]
  ------------------
  251|      0|    RegisterCrashMetadataListener(
  252|      0|        [=](absl::string_view crash_type,
  253|      0|            absl::Span<const std::string> /*stack_frames*/) {
  254|      0|          WriteFile(crash_metadata_path, crash_type);
  255|      0|        });
  256|      0|  }
  257|      2|}
_ZN8fuzztest8internal7Runtime8Spinlock4LockEv:
  434|  40.0k|void Runtime::Spinlock::Lock() {
  435|  40.0k|  while (locked_.test_and_set(std::memory_order_acq_rel)) {
  ------------------
  |  Branch (435:10): [True: 0, False: 40.0k]
  ------------------
  436|      0|    std::this_thread::yield();
  437|      0|  }
  438|  40.0k|}
_ZN8fuzztest8internal7Runtime8Spinlock6UnlockEv:
  440|  40.0k|void Runtime::Spinlock::Unlock() { locked_.clear(std::memory_order_release); }
_ZN8fuzztest8internal7Runtime19CheckWatchdogLimitsEv:
  453|  13.3k|void Runtime::CheckWatchdogLimits() {
  454|       |  // Centipede runner has its own watchdog.
  455|  13.3k|#ifndef FUZZTEST_USE_CENTIPEDE
  456|  13.3k|  watchdog_spinlock_.Lock();
  457|  13.3k|  if (current_configuration_ == nullptr || !test_iteration_started_ ||
  ------------------
  |  Branch (457:7): [True: 0, False: 13.3k]
  |  Branch (457:44): [True: 0, False: 13.3k]
  ------------------
  458|  13.3k|      watchdog_limit_exceeded_) {
  ------------------
  |  Branch (458:7): [True: 0, False: 13.3k]
  ------------------
  459|      0|    watchdog_spinlock_.Unlock();
  460|      0|    return;
  461|      0|  }
  462|  13.3k|  const absl::Duration run_duration =
  463|  13.3k|      clock_fn_() - current_iteration_start_time_;
  464|  13.3k|  if (current_configuration_->time_limit_per_input > absl::ZeroDuration() &&
  ------------------
  |  Branch (464:7): [True: 13.3k, False: 0]
  ------------------
  465|  13.3k|      run_duration > current_configuration_->time_limit_per_input) {
  ------------------
  |  Branch (465:7): [True: 0, False: 13.3k]
  ------------------
  466|      0|    absl::FPrintF(
  467|      0|        GetStderr(), "[!] Per-input timeout exceeded: %s > %s - aborting\n",
  468|      0|        absl::FormatDuration(run_duration),
  469|      0|        absl::FormatDuration(current_configuration_->time_limit_per_input));
  470|      0|    watchdog_limit_exceeded_ = true;
  471|      0|    watchdog_spinlock_.Unlock();
  472|      0|    std::abort();
  473|      0|  }
  474|  13.3k|  const size_t rss_usage = GetPeakRSSBytes();
  475|  13.3k|  if (current_configuration_->rss_limit > 0 &&
  ------------------
  |  Branch (475:7): [True: 0, False: 13.3k]
  ------------------
  476|      0|      rss_usage > current_configuration_->rss_limit) {
  ------------------
  |  Branch (476:7): [True: 0, False: 0]
  ------------------
  477|      0|    absl::FPrintF(GetStderr(),
  478|      0|                  "[!] RSS limit exceeded: %zu > %zu (bytes) - aborting\n",
  479|      0|                  rss_usage, current_configuration_->rss_limit);
  480|      0|    watchdog_limit_exceeded_ = true;
  481|      0|    watchdog_spinlock_.Unlock();
  482|      0|    std::abort();
  483|      0|  }
  484|  13.3k|  watchdog_spinlock_.Unlock();
  485|  13.3k|#endif  // FUZZTEST_USE_CENTIPEDE
  486|  13.3k|}
_ZN8fuzztest8internal7Runtime14SetCurrentTestEPKNS0_8FuzzTestEPKNS0_13ConfigurationE:
  489|      2|                             const Configuration* configuration) {
  490|      2|  FUZZTEST_CHECK((test != nullptr) == (configuration != nullptr));
  ------------------
  |  |   22|      2|#define FUZZTEST_CHECK(cond) ABSL_CHECK(cond)
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  491|      2|  current_test_ = test;
  492|      2|  current_configuration_ = configuration;
  493|      2|  if (configuration == nullptr) return;
  ------------------
  |  Branch (493:7): [True: 0, False: 2]
  ------------------
  494|      2|  if (const auto test_time_limit = configuration->GetTimeLimitPerTest();
  495|      2|      test_time_limit < absl::InfiniteDuration()) {
  ------------------
  |  Branch (495:7): [True: 0, False: 2]
  ------------------
  496|      0|    const absl::Status has_enough_time =
  497|      0|        fuzztest::internal::VerifyBazelHasEnoughTimeToRunTest(
  498|      0|            creation_time_, test_time_limit, test_counter_,
  499|      0|            configuration->fuzz_tests.size());
  500|      0|    FUZZTEST_PRECONDITION(has_enough_time.ok())
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  501|      0|        << "Not enough time for running the fuzz test " << test->full_name()
  502|      0|        << " for " << test_time_limit << ": " << has_enough_time;
  503|      0|  }
  504|      2|  ++test_counter_;
  505|      2|}
_ZN8fuzztest8internal7Runtime20OnTestIterationStartERKN4absl12lts_202605264TimeE:
  507|  13.3k|void Runtime::OnTestIterationStart(const absl::Time& start_time) {
  508|  13.3k|  watchdog_spinlock_.Lock();
  509|  13.3k|  current_iteration_start_time_ = start_time;
  510|  13.3k|  test_iteration_started_ = true;
  511|  13.3k|  watchdog_spinlock_.Unlock();
  512|  13.3k|}
_ZN8fuzztest8internal7Runtime18OnTestIterationEndEv:
  514|  13.3k|void Runtime::OnTestIterationEnd() {
  515|  13.3k|  CheckWatchdogLimits();
  516|  13.3k|  watchdog_spinlock_.Lock();
  517|  13.3k|  test_iteration_started_ = false;
  518|  13.3k|  watchdog_spinlock_.Unlock();
  519|  13.3k|}
_ZN8fuzztest8internal21InstallSignalHandlersEP8_IO_FILE:
  632|      2|void InstallSignalHandlers(FILE* out) {
  633|      2|  if (signal_out != nullptr) {
  ------------------
  |  Branch (633:7): [True: 0, False: 2]
  ------------------
  634|       |    // Already installed. Noop.
  635|      0|    return;
  636|      0|  }
  637|      2|  signal_out = out;
  638|       |
  639|       |#if defined(FUZZTEST_HAS_SANITIZER)
  640|       |  // An ASan failure might come without a signal.
  641|       |  // Eg a divide by zero is intercepted by ASan and it terminates the process
  642|       |  // after printing its output. This handler helps us print our output
  643|       |  // afterwards.
  644|       |  __sanitizer_set_death_callback(
  645|       |      [](auto...) { Runtime::instance().PrintReport(&signal_out_sink); });
  646|       |#endif
  647|       |
  648|     12|  for (OldSignalHandler& h : crash_handlers) {
  ------------------
  |  Branch (648:28): [True: 12, False: 2]
  ------------------
  649|     12|    SetNewSigAction(h.signum, &HandleCrash, &h.action);
  650|     12|  }
  651|       |
  652|      6|  for (OldSignalHandler& h : termination_handlers) {
  ------------------
  |  Branch (652:28): [True: 6, False: 2]
  ------------------
  653|      6|    SetNewSigAction(h.signum, &HandleTermination, nullptr);
  654|      6|  }
  655|      2|}
_ZN8fuzztest8internal28InstallUnexpectedExitHandlerEv:
  674|      2|void InstallUnexpectedExitHandler() {
  675|       |#ifndef FUZZTEST_COMPATIBILITY_MODE
  676|       |  // In compatibility mode we don't install the handler because libFuzzer
  677|       |  // always explicitly exits, so every run would finish with an unexpected
  678|       |  // exit.
  679|       |  // https://github.com/llvm/llvm-project/blob/fa511cde48ea218dadfa8b35658ac06368f34607/compiler-rt/lib/fuzzer/FuzzerDriver.cpp#L930
  680|       |  [[maybe_unused]] const bool installed = [] {
  681|       |    std::atexit([] { Runtime::instance().HandleUnexpectedExit(); });
  682|       |    return true;
  683|       |  }();
  684|       |#endif
  685|      2|}
_ZN8fuzztest8internal18FuzzTestFuzzerImplC2ERKNS0_8FuzzTestENSt3__110unique_ptrINS0_20UntypedFixtureDriverENS5_14default_deleteIS7_EEEE:
  697|      2|    : test_(test),
  698|      2|      fixture_driver_(std::move(fixture_driver)),
  699|      2|      params_domain_(fixture_driver_->GetDomains()),
  700|      2|      execution_coverage_(internal::GetExecutionCoverage()),
  701|      2|      corpus_coverage_(execution_coverage_ != nullptr
  ------------------
  |  Branch (701:24): [True: 0, False: 2]
  ------------------
  702|      2|                           ? execution_coverage_->GetCounterMap().size()
  703|      2|                           : 0) {
  704|      4|  FUZZTEST_PRECONDITION(fixture_driver_ != nullptr)
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      4|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      4|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      2|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      4|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 2]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      2|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      2|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  705|      4|      << "Invalid fixture driver!";
  706|      2|  stats_.start_time = absl::Now();
  707|      2|  const char* corpus_out_dir_chars = getenv("FUZZTEST_TESTSUITE_OUT_DIR");
  708|      2|  if (corpus_out_dir_chars) corpus_out_dir_ = corpus_out_dir_chars;
  ------------------
  |  Branch (708:7): [True: 0, False: 2]
  ------------------
  709|       |
  710|      2|  std::vector<double> weights = {100.};
  711|      2|  corpus_distribution_ =
  712|      2|      absl::discrete_distribution<>(weights.begin(), weights.end());
  713|      2|}
_ZN8fuzztest8internal18FuzzTestFuzzerImpl8TryParseENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  720|  16.5k|    absl::string_view data) {
  721|  16.5k|  auto ir_value = ParseIRObject(data);
  722|  16.5k|  if (!ir_value) {
  ------------------
  |  Branch (722:7): [True: 1.28k, False: 15.3k]
  ------------------
  723|  1.28k|    return absl::InvalidArgumentError("Unexpected file format");
  724|  1.28k|  }
  725|  15.3k|  auto corpus_value = params_domain_.ParseCorpus(*ir_value);
  726|  15.3k|  if (!corpus_value) {
  ------------------
  |  Branch (726:7): [True: 1.94k, False: 13.3k]
  ------------------
  727|  1.94k|    return absl::InvalidArgumentError("Unexpected intermediate representation");
  728|  1.94k|  }
  729|  13.3k|  absl::Status is_valid = params_domain_.ValidateCorpusValue(*corpus_value);
  730|  13.3k|  if (!is_valid.ok()) {
  ------------------
  |  Branch (730:7): [True: 21, False: 13.3k]
  ------------------
  731|     21|    return Prefix(is_valid, "Invalid corpus value");
  732|     21|  }
  733|  13.3k|  return *corpus_value;
  734|  13.3k|}
_ZN8fuzztest8internal18FuzzTestFuzzerImpl10ShouldStopEv:
 1010|  16.5k|bool FuzzTestFuzzerImpl::ShouldStop() {
 1011|  16.5k|  if (runs_limit_.has_value() && stats_.runs >= *runs_limit_) return true;
  ------------------
  |  Branch (1011:7): [True: 0, False: 16.5k]
  |  Branch (1011:34): [True: 0, False: 0]
  ------------------
 1012|  16.5k|  if (time_limit_ != absl::InfiniteFuture() && absl::Now() > time_limit_)
  ------------------
  |  Branch (1012:7): [True: 0, False: 16.5k]
  |  Branch (1012:48): [True: 0, False: 0]
  ------------------
 1013|      0|    return true;
 1014|  16.5k|  return runtime_.termination_requested();
 1015|  16.5k|}
_ZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS1_5InputE:
 1128|  13.3k|    const Input& input) {
 1129|  13.3k|  ++stats_.runs;
 1130|  13.3k|  auto untyped_args = params_domain_.GetValue(input.args);
 1131|  13.3k|  Runtime::Args debug_args{input.args, params_domain_};
 1132|  13.3k|  runtime_.SetCurrentArgs(&debug_args);
 1133|       |
 1134|       |  // Reset and observe the coverage map and start tracing in
 1135|       |  // the tightest scope possible. In particular, we can't include the call
 1136|       |  // to GetValue in the scope as it will run user code.
 1137|  13.3k|  if (execution_coverage_ != nullptr) {
  ------------------
  |  Branch (1137:7): [True: 0, False: 13.3k]
  ------------------
 1138|      0|    execution_coverage_->ResetState();
 1139|      0|  }
 1140|  13.3k|  absl::Time start = absl::Now();
 1141|  13.3k|  runtime_.OnTestIterationStart(start);
 1142|       |  // Set tracing after absl::Now(), otherwise it will make
 1143|       |  // FuzzingModeTest.MinimizesDuplicatedCorpustest flaky because
 1144|       |  // randomness in absl::Now() being traced by cmp coverage.
 1145|  13.3k|  if (execution_coverage_ != nullptr) {
  ------------------
  |  Branch (1145:7): [True: 0, False: 13.3k]
  ------------------
 1146|      0|    execution_coverage_->SetIsTracing(true);
 1147|      0|  }
 1148|       |
 1149|  13.3k|  runtime_.SetSkippingRequested(false);
 1150|  13.3k|  fixture_driver_->RunFuzzTestIteration([&] {
 1151|  13.3k|    if (!runtime_.skipping_requested()) {
 1152|  13.3k|      fixture_driver_->Test(std::move(untyped_args));
 1153|  13.3k|    }
 1154|  13.3k|  });
 1155|  13.3k|  if (execution_coverage_ != nullptr) {
  ------------------
  |  Branch (1155:7): [True: 0, False: 13.3k]
  ------------------
 1156|      0|    execution_coverage_->SetIsTracing(false);
 1157|      0|  }
 1158|  13.3k|  const absl::Duration run_time = absl::Now() - start;
 1159|       |
 1160|  13.3k|  bool new_coverage = false;
 1161|  13.3k|  if (execution_coverage_ != nullptr && !runtime_.skipping_requested()) {
  ------------------
  |  Branch (1161:7): [True: 0, False: 13.3k]
  |  Branch (1161:41): [True: 0, False: 0]
  ------------------
 1162|      0|    new_coverage = corpus_coverage_.Update(execution_coverage_);
 1163|      0|    stats_.max_stack_used =
 1164|      0|        std::max(stats_.max_stack_used, execution_coverage_->MaxStackUsed());
 1165|      0|  }
 1166|       |
 1167|  13.3k|  runtime_.OnTestIterationEnd();
 1168|  13.3k|  runtime_.UnsetCurrentArgs();
 1169|  13.3k|  return {new_coverage, run_time};
 1170|  13.3k|}
runtime.cc:_ZN8fuzztest8internalL15GetPeakRSSBytesEv:
  442|  13.3k|static size_t GetPeakRSSBytes() {
  443|       |#ifndef FUZZTEST_HAS_RUSAGE
  444|       |  return 0;
  445|       |#else
  446|  13.3k|  struct rusage usage = {};
  447|  13.3k|  if (getrusage(RUSAGE_SELF, &usage) != 0) return 0;
  ------------------
  |  Branch (447:7): [True: 0, False: 13.3k]
  ------------------
  448|       |  // On Linux, ru_maxrss is in KiB
  449|  13.3k|  return usage.ru_maxrss * 1024;
  450|  13.3k|#endif
  451|  13.3k|}
runtime.cc:_ZN8fuzztest8internalL15SetNewSigActionEiPFviP9siginfo_tPvEP9sigaction:
  615|     18|                            struct sigaction* old_sigact) {
  616|     18|  struct sigaction new_sigact = {};
  617|     18|  sigemptyset(&new_sigact.sa_mask);
  618|     18|  new_sigact.sa_sigaction = handler;
  619|       |
  620|       |  // We make use of the SA_ONSTACK flag so that signal handlers are executed on
  621|       |  // a separate stack. This is needed to properly handle cases where stack space
  622|       |  // is limited and the delivery of a signal needs to be properly handled.
  623|     18|  new_sigact.sa_flags = SA_SIGINFO | SA_ONSTACK;
  624|       |
  625|     18|  if (sigaction(signum, &new_sigact, old_sigact) == -1) {
  ------------------
  |  Branch (625:7): [True: 0, False: 18]
  ------------------
  626|      0|    fprintf(GetStderr(), "Error installing signal handler: %s\n",
  627|       |            strerror(errno));
  628|      0|    exit(1);
  629|      0|  }
  630|     18|}
runtime.cc:_ZZN8fuzztest8internal18FuzzTestFuzzerImpl11RunOneInputERKNS1_5InputEENK3$_0clEv:
 1150|  13.3k|  fixture_driver_->RunFuzzTestIteration([&] {
 1151|  13.3k|    if (!runtime_.skipping_requested()) {
  ------------------
  |  Branch (1151:9): [True: 13.3k, False: 0]
  ------------------
 1152|  13.3k|      fixture_driver_->Test(std::move(untyped_args));
 1153|  13.3k|    }
 1154|  13.3k|  });

_ZN8fuzztest8internal8FuzzTestC2ENS0_13BasicTestInfoEN4absl12lts_2026052612AnyInvocableIKFNSt3__110unique_ptrINS0_14FuzzTestFuzzerENS6_14default_deleteIS8_EEEERKS1_EEE:
   83|      2|      : test_info_(std::move(test_info)), make_(std::move(factory)) {}
_ZNK8fuzztest8internal8FuzzTest10suite_nameEv:
   85|      2|  const std::string& suite_name() const { return test_info_.suite_name; }
_ZNK8fuzztest8internal8FuzzTest9test_nameEv:
   86|      2|  const std::string& test_name() const { return test_info_.test_name; }
_ZNK8fuzztest8internal8FuzzTest9full_nameEv:
   87|      6|  std::string full_name() const {
   88|      6|    return absl::StrCat(test_info_.suite_name, ".", test_info_.test_name);
   89|      6|  }
_ZNK8fuzztest8internal8FuzzTest4fileEv:
   90|      2|  const std::string& file() const { return test_info_.file; }
_ZNK8fuzztest8internal8FuzzTest4lineEv:
   91|      2|  int line() const { return test_info_.line; }
_ZNK8fuzztest8internal8FuzzTest12uses_fixtureEv:
   92|      2|  bool uses_fixture() const { return test_info_.uses_fixture; }
_ZNK8fuzztest8internal8FuzzTest4makeEv:
   93|      2|  auto make() const { return make_(*this); }
_ZN8fuzztest8internal7Runtime8instanceEv:
  127|      8|  static Runtime& instance() {
  128|      8|    static auto* runtime = new Runtime();
  129|      8|    return *runtime;
  130|      8|  }
_ZN8fuzztest8internal7Runtime20SetSkippingRequestedEb:
  139|  13.3k|  void SetSkippingRequested(bool requested) {
  140|  13.3k|    skipping_requested_.store(requested, std::memory_order_relaxed);
  141|  13.3k|  }
_ZNK8fuzztest8internal7Runtime18skipping_requestedEv:
  143|  13.3k|  bool skipping_requested() const {
  144|  13.3k|    return skipping_requested_.load(std::memory_order_relaxed);
  145|  13.3k|  }
_ZNK8fuzztest8internal7Runtime21termination_requestedEv:
  159|  16.5k|  bool termination_requested() const {
  160|  16.5k|    return termination_requested_.load(std::memory_order_relaxed);
  161|  16.5k|  }
_ZN8fuzztest8internal7Runtime10SetRunModeENS_7RunModeE:
  163|      4|  void SetRunMode(RunMode run_mode) { run_mode_ = run_mode; }
_ZNK8fuzztest8internal7Runtime8run_modeEv:
  164|      2|  RunMode run_mode() const { return run_mode_; }
_ZN8fuzztest8internal7Runtime14EnableReporterEPKNS0_12RuntimeStatsEPFN4absl12lts_202605264TimeEvE:
  168|      2|  void EnableReporter(const RuntimeStats* stats, absl::Time (*clock_fn)()) {
  169|      2|    reporter_enabled_ = true;
  170|      2|    stats_ = stats;
  171|      2|    clock_fn_ = clock_fn;
  172|       |    // In case we have not installed them yet, do so now.
  173|      2|    InstallSignalHandlers(GetStderr());
  174|      2|    InstallUnexpectedExitHandler();
  175|      2|    ResetCrashType();
  176|      2|  }
_ZN8fuzztest8internal7Runtime14SetCurrentArgsEPNS1_4ArgsE:
  193|  13.3k|  void SetCurrentArgs(Args* args) { current_args_ = args; }
_ZN8fuzztest8internal7Runtime16UnsetCurrentArgsEv:
  194|  13.3k|  void UnsetCurrentArgs() { current_args_ = nullptr; }
_ZN8fuzztest8internal7Runtime14ResetCrashTypeEv:
  211|      2|  void ResetCrashType() { crash_type_ = std::nullopt; }
_ZN8fuzztest8internal7Runtime8SpinlockC2Ev:
  272|      2|    Spinlock() = default;

_ZN8fuzztest8internal23GetFromEnvOrMakeSeedSeqERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEENS1_17basic_string_viewIcS4_EE:
   64|      2|                                      absl::string_view env_var) {
   65|      2|  const std::vector<uint32_t> seed_material =
   66|      2|      GetFromEnvOrMakeSeedMaterial(env_var);
   67|      2|  const std::string encoded_seed_material = EncodeSeedMaterial(seed_material);
   68|      2|  out << env_var << "=" << encoded_seed_material << '\n';
   69|      2|  return std::seed_seq(seed_material.begin(), seed_material.end());
   70|      2|}
_ZN8fuzztest8internal18EncodeSeedMaterialEN4absl12lts_202605264SpanIKjEE:
   72|      2|std::string EncodeSeedMaterial(absl::Span<const uint32_t> seed_material) {
   73|      2|  return absl::WebSafeBase64Escape(
   74|      2|      absl::string_view(reinterpret_cast<const char*>(seed_material.data()),
   75|      2|                        seed_material.size() * sizeof(uint32_t)));
   76|      2|}
seed_seq.cc:_ZN8fuzztest8internal12_GLOBAL__N_128GetFromEnvOrMakeSeedMaterialENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   48|      2|std::vector<uint32_t> GetFromEnvOrMakeSeedMaterial(absl::string_view env_var) {
   49|      2|  const char* encoded_seed_material = std::getenv(env_var.data());
   50|      2|  if (encoded_seed_material == nullptr) {
  ------------------
  |  Branch (50:7): [True: 2, False: 0]
  ------------------
   51|      2|    return MakeSeedMaterial();
   52|      2|  }
   53|      0|  std::optional<std::vector<uint32_t>> seed_material =
   54|      0|      DecodeSeedMaterial(encoded_seed_material);
   55|      0|  FUZZTEST_PRECONDITION(seed_material.has_value())
  ------------------
  |  |   32|      0|  ABSL_CHECK(cond) << "[Failed precondition] Incorrect usage: "
  |  |  ------------------
  |  |  |  |   41|      0|  ABSL_LOG_INTERNAL_CHECK_IMPL((condition), #condition)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  180|      0|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   65|      0|  switch (0)                                             \
  |  |  |  |  |  |  |  |  |  |   66|      0|  case 0:                                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (66:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   67|      0|  default:                                               \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (67:3): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   68|      0|    !(condition) ? (void)0 : ::absl::log_internal::Voidify() &&
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [Folded, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (68:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   28|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   29|      0|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   84|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   56|      0|      << "Failed to decode seed material from the environment variable "
   57|      0|      << env_var;
   58|      0|  return *std::move(seed_material);
   59|      0|}
seed_seq.cc:_ZN8fuzztest8internal12_GLOBAL__N_116MakeSeedMaterialEv:
   38|      2|std::vector<uint32_t> MakeSeedMaterial() {
   39|      2|  absl::BitGen gen;
   40|      2|  static constexpr int kNumberOfEntropyBits = 256;
   41|      2|  std::vector<uint32_t> seed_material(kNumberOfEntropyBits /
   42|      2|                                      (8 * sizeof(uint32_t)));
   43|      2|  std::generate(seed_material.begin(), seed_material.end(),
   44|      2|                [&gen] { return absl::Uniform<uint32_t>(gen); });
   45|      2|  return seed_material;
   46|      2|}
seed_seq.cc:_ZZN8fuzztest8internal12_GLOBAL__N_116MakeSeedMaterialEvENK3$_0clEv:
   44|     16|                [&gen] { return absl::Uniform<uint32_t>(gen); });

_ZN8fuzztest8internal13ParseIRObjectENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
  328|  16.5k|std::optional<IRObject> ParseIRObject(absl::string_view str) {
  329|  16.5k|  IRObject object;
  330|  16.5k|  if (IsInBinaryFormat(str)) {
  ------------------
  |  Branch (330:7): [True: 13.4k, False: 3.16k]
  ------------------
  331|  13.4k|    BinaryParseBuf buf = {str.data(), str.size()};
  332|  13.4k|    buf.Advance(kBinaryHeader.size());
  333|  13.4k|    if (!BinaryParse(object, buf, /*recursion_depth=*/0) || !buf.empty())
  ------------------
  |  Branch (333:9): [True: 37, False: 13.3k]
  |  Branch (333:61): [True: 0, False: 13.3k]
  ------------------
  334|     37|      return std::nullopt;
  335|  13.4k|  } else {
  336|  3.16k|    if (ReadToken(str) != kHeader) return std::nullopt;
  ------------------
  |  Branch (336:9): [True: 81, False: 3.08k]
  ------------------
  337|  3.08k|    if (!ParseImpl(object, str, /*recursion_depth=*/0) ||
  ------------------
  |  Branch (337:9): [True: 1.02k, False: 2.05k]
  |  Branch (337:9): [True: 1.16k, False: 1.91k]
  ------------------
  338|  2.05k|        !ReadToken(str).empty())
  ------------------
  |  Branch (338:9): [True: 141, False: 1.91k]
  ------------------
  339|  1.16k|      return std::nullopt;
  340|  3.08k|  }
  341|  15.3k|  return object;
  342|  16.5k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_116IsInBinaryFormatENSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
  299|  16.5k|bool IsInBinaryFormat(absl::string_view str) {
  300|       |  // Not using absl::string_view or std::memcmp because they could be
  301|       |  // instrumented and using them could pollute coverage.
  302|  16.5k|  return str.size() >= kBinaryHeader.size() &&
  ------------------
  |  Branch (302:10): [True: 16.5k, False: 55]
  ------------------
  303|  16.5k|         __builtin_memcmp(str.data(), kBinaryHeader.data(),
  ------------------
  |  Branch (303:10): [True: 13.4k, False: 3.10k]
  ------------------
  304|  16.5k|                          kBinaryHeader.size()) == 0;
  305|  16.5k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_114BinaryParseBuf7AdvanceEm:
  239|   192k|  void Advance(size_t s) {
  240|   192k|    if (s > size) s = size;
  ------------------
  |  Branch (240:9): [True: 0, False: 192k]
  ------------------
  241|   192k|    str += s;
  242|   192k|    size -= s;
  243|   192k|  }
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_111BinaryParseERNS0_6no_adl8IRObjectERNS1_14BinaryParseBufEi:
  246|  84.2k|bool BinaryParse(IRObject& obj, BinaryParseBuf& buf, int recursion_depth) {
  247|  84.2k|  if (recursion_depth > kMaxParseRecursionDepth) return false;
  ------------------
  |  Branch (247:7): [True: 1, False: 84.2k]
  ------------------
  248|  84.2k|  if (buf.empty()) return false;
  ------------------
  |  Branch (248:7): [True: 7, False: 84.2k]
  ------------------
  249|  84.2k|  const auto h = static_cast<BinaryFormatHeader>(buf.str[0]);
  250|  84.2k|  buf.Advance(1);
  251|  84.2k|  switch (h) {
  ------------------
  |  Branch (251:11): [True: 84.2k, False: 16]
  ------------------
  252|  3.05k|    case BinaryFormatHeader::kEmpty: {
  ------------------
  |  Branch (252:5): [True: 3.05k, False: 81.1k]
  ------------------
  253|  3.05k|      return true;
  254|      0|    }
  255|  53.8k|    case BinaryFormatHeader::kUInt64: {
  ------------------
  |  Branch (255:5): [True: 53.8k, False: 30.4k]
  ------------------
  256|  53.8k|      if (buf.size < sizeof(uint64_t)) return false;
  ------------------
  |  Branch (256:11): [True: 0, False: 53.8k]
  ------------------
  257|  53.8k|      auto& t = obj.MutableScalar<uint64_t>();
  258|  53.8k|      std::memcpy(&t, buf.str, sizeof(uint64_t));
  259|  53.8k|      buf.Advance(sizeof(uint64_t));
  260|  53.8k|      return true;
  261|  53.8k|    }
  262|      2|    case BinaryFormatHeader::kDouble: {
  ------------------
  |  Branch (262:5): [True: 2, False: 84.2k]
  ------------------
  263|      2|      if (buf.size < sizeof(double)) return false;
  ------------------
  |  Branch (263:11): [True: 1, False: 1]
  ------------------
  264|      1|      auto& t = obj.MutableScalar<double>();
  265|      1|      std::memcpy(&t, buf.str, sizeof(t));
  266|      1|      buf.Advance(sizeof(double));
  267|      1|      return true;
  268|      2|    }
  269|  13.3k|    case BinaryFormatHeader::kString: {
  ------------------
  |  Branch (269:5): [True: 13.3k, False: 70.8k]
  ------------------
  270|  13.3k|      if (buf.size < sizeof(uint64_t)) return false;
  ------------------
  |  Branch (270:11): [True: 3, False: 13.3k]
  ------------------
  271|  13.3k|      uint64_t str_size;
  272|  13.3k|      std::memcpy(&str_size, buf.str, sizeof(str_size));
  273|  13.3k|      buf.Advance(sizeof(uint64_t));
  274|  13.3k|      if (buf.size < str_size) return false;
  ------------------
  |  Branch (274:11): [True: 3, False: 13.3k]
  ------------------
  275|  13.3k|      obj.MutableScalar<std::string>() = {buf.str,
  276|  13.3k|                                          static_cast<size_t>(str_size)};
  277|  13.3k|      buf.Advance(str_size);
  278|  13.3k|      return true;
  279|  13.3k|    }
  280|  13.9k|    case BinaryFormatHeader::kObject: {
  ------------------
  |  Branch (280:5): [True: 13.9k, False: 70.2k]
  ------------------
  281|  13.9k|      if (buf.size < sizeof(uint64_t)) return false;
  ------------------
  |  Branch (281:11): [True: 0, False: 13.9k]
  ------------------
  282|  13.9k|      uint64_t vec_size;
  283|  13.9k|      std::memcpy(&vec_size, buf.str, sizeof(vec_size));
  284|  13.9k|      buf.Advance(sizeof(vec_size));
  285|       |      // This could happen for malformed inputs.
  286|  13.9k|      if (vec_size > buf.size) return false;
  ------------------
  |  Branch (286:11): [True: 6, False: 13.9k]
  ------------------
  287|  13.9k|      auto& v = obj.MutableSubs();
  288|  13.9k|      v.reserve(vec_size);
  289|  84.4k|      for (uint64_t i = 0; i < vec_size; ++i) {
  ------------------
  |  Branch (289:28): [True: 70.8k, False: 13.6k]
  ------------------
  290|  70.8k|        if (!BinaryParse(v.emplace_back(), buf, recursion_depth + 1))
  ------------------
  |  Branch (290:13): [True: 273, False: 70.5k]
  ------------------
  291|    273|          return false;
  292|  70.8k|      }
  293|  13.6k|      return true;
  294|  13.9k|    }
  295|  84.2k|  }
  296|     16|  return false;
  297|  84.2k|}
serialization.cc:_ZNK8fuzztest8internal12_GLOBAL__N_114BinaryParseBuf5emptyEv:
  238|  97.6k|  bool empty() const { return size == 0; }
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_19ReadTokenERNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEE:
   76|   170k|absl::string_view ReadToken(absl::string_view& in) {
   77|   205k|  while (!in.empty() && std::isspace(in[0])) in.remove_prefix(1);
  ------------------
  |  Branch (77:10): [True: 203k, False: 2.57k]
  |  Branch (77:25): [True: 35.2k, False: 167k]
  ------------------
   78|   170k|  if (in.empty()) return in;
  ------------------
  |  Branch (78:7): [True: 2.57k, False: 167k]
  ------------------
   79|   167k|  size_t end = 1;
   80|   167k|  const auto is_literal = [](char c) {
   81|   167k|    return std::isalnum(c) != 0 || c == '+' || c == '-' || c == '.';
   82|   167k|  };
   83|   167k|  if (is_literal(in[0])) {
  ------------------
  |  Branch (83:7): [True: 85.7k, False: 82.0k]
  ------------------
   84|  2.50M|    while (end < in.size() && is_literal(in[end])) ++end;
  ------------------
  |  Branch (84:12): [True: 2.49M, False: 2.57k]
  |  Branch (84:31): [True: 2.41M, False: 83.1k]
  ------------------
   85|  85.7k|  } else if (in[0] == '"') {
  ------------------
  |  Branch (85:14): [True: 409, False: 81.6k]
  ------------------
   86|  22.0k|    while (end < in.size() && in[end] != '"') ++end;
  ------------------
  |  Branch (86:12): [True: 22.0k, False: 24]
  |  Branch (86:31): [True: 21.6k, False: 385]
  ------------------
   87|    409|    if (end < in.size()) ++end;
  ------------------
  |  Branch (87:9): [True: 385, False: 24]
  ------------------
   88|    409|  }
   89|   167k|  absl::string_view res = in.substr(0, end);
   90|   167k|  in.remove_prefix(end);
   91|   167k|  return res;
   92|   170k|}
serialization.cc:_ZZN8fuzztest8internal12_GLOBAL__N_19ReadTokenERNSt3__117basic_string_viewIcNS2_11char_traitsIcEEEEENK3$_0clEc:
   80|  2.66M|  const auto is_literal = [](char c) {
   81|  2.66M|    return std::isalnum(c) != 0 || c == '+' || c == '-' || c == '.';
  ------------------
  |  Branch (81:12): [True: 2.48M, False: 186k]
  |  Branch (81:36): [True: 2.66k, False: 183k]
  |  Branch (81:48): [True: 8.15k, False: 175k]
  |  Branch (81:60): [True: 10.1k, False: 165k]
  ------------------
   82|  2.66M|  };
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_19ParseImplERNS0_6no_adl8IRObjectERNSt3__117basic_string_viewIcNS5_11char_traitsIcEEEEi:
  134|  31.0k|bool ParseImpl(IRObject& obj, absl::string_view& str, int recursion_depth) {
  135|  31.0k|  if (recursion_depth > kMaxParseRecursionDepth) return false;
  ------------------
  |  Branch (135:7): [True: 0, False: 31.0k]
  ------------------
  136|  31.0k|  absl::string_view key = ReadToken(str);
  137|  31.0k|  if (key.empty() || key == "}") {
  ------------------
  |  Branch (137:7): [True: 31, False: 31.0k]
  |  Branch (137:22): [True: 635, False: 30.3k]
  ------------------
  138|       |    // The object is empty. Put the token back and return.
  139|    666|    str = absl::string_view(key.data(), str.data() + str.size() - key.data());
  140|    666|    return true;
  141|    666|  }
  142|       |
  143|  30.3k|  if (key == "sub") {
  ------------------
  |  Branch (143:7): [True: 2.96k, False: 27.4k]
  ------------------
  144|  2.96k|    auto& v = obj.MutableSubs();
  145|  28.0k|    do {
  146|  28.0k|      if (ReadToken(str) != "{") return false;
  ------------------
  |  Branch (146:11): [True: 63, False: 27.9k]
  ------------------
  147|  27.9k|      if (!ParseImpl(v.emplace_back(), str, recursion_depth + 1)) return false;
  ------------------
  |  Branch (147:11): [True: 2.03k, False: 25.9k]
  ------------------
  148|  25.9k|      if (ReadToken(str) != "}") return false;
  ------------------
  |  Branch (148:11): [True: 494, False: 25.4k]
  ------------------
  149|  25.4k|      key = ReadToken(str);
  150|  25.4k|    } while (key == "sub");
  ------------------
  |  Branch (150:14): [True: 25.0k, False: 367]
  ------------------
  151|       |    // We are done reading this repeated sub.
  152|       |    // Put the token back for the caller.
  153|    367|    str = absl::string_view(key.data(), str.data() + str.size() - key.data());
  154|    367|    return true;
  155|  27.4k|  } else {
  156|  27.4k|    if (ReadToken(str) != ":") return false;
  ------------------
  |  Branch (156:9): [True: 23, False: 27.3k]
  ------------------
  157|  27.3k|    auto value = ReadToken(str);
  158|  27.3k|    if (key == "i") {
  ------------------
  |  Branch (158:9): [True: 1.04k, False: 26.3k]
  ------------------
  159|  1.04k|      return ReadScalar(obj.MutableScalar<uint64_t>(), value);
  160|  26.3k|    } else if (key == "d") {
  ------------------
  |  Branch (160:16): [True: 25.9k, False: 392]
  ------------------
  161|  25.9k|      return ReadScalar(obj.MutableScalar<double>(), value);
  162|  25.9k|    } else if (key == "s") {
  ------------------
  |  Branch (162:16): [True: 392, False: 0]
  ------------------
  163|    392|      return ReadScalar(obj.MutableScalar<std::string>(), value);
  164|    392|    } else {
  165|       |      // Unrecognized key
  166|      0|      return false;
  167|      0|    }
  168|  27.3k|  }
  169|  30.3k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_110ReadScalarERmNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   94|  1.04k|bool ReadScalar(uint64_t& out, absl::string_view value) {
   95|  1.04k|  return absl::SimpleAtoi(value, &out);
   96|  1.04k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_110ReadScalarERdNSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   98|  25.9k|bool ReadScalar(double& out, absl::string_view value) {
   99|  25.9k|  return absl::SimpleAtod(value, &out);
  100|  25.9k|}
serialization.cc:_ZN8fuzztest8internal12_GLOBAL__N_110ReadScalarERNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS2_17basic_string_viewIcS5_EE:
  102|    392|bool ReadScalar(std::string& out, absl::string_view value) {
  103|    392|  if (value.empty() || value[0] != '"') return false;
  ------------------
  |  Branch (103:7): [True: 0, False: 392]
  |  Branch (103:24): [True: 1, False: 391]
  ------------------
  104|    391|  value.remove_prefix(1);
  105|       |
  106|    391|  if (value.empty() || value.back() != '"') return false;
  ------------------
  |  Branch (106:7): [True: 1, False: 390]
  |  Branch (106:24): [True: 5, False: 385]
  ------------------
  107|    385|  value.remove_suffix(1);
  108|       |
  109|  11.5k|  while (!value.empty()) {
  ------------------
  |  Branch (109:10): [True: 11.1k, False: 385]
  ------------------
  110|  11.1k|    if (value[0] != '\\') {
  ------------------
  |  Branch (110:9): [True: 7.88k, False: 3.31k]
  ------------------
  111|  7.88k|      out += value[0];
  112|  7.88k|      value.remove_prefix(1);
  113|  7.88k|    } else {
  114|  3.31k|      uint32_t v = 0;
  115|       |
  116|  3.31k|      if (value.size() < 4) return false;
  ------------------
  |  Branch (116:11): [True: 0, False: 3.31k]
  ------------------
  117|  13.2k|      for (int i = 1; i < 4; ++i) {
  ------------------
  |  Branch (117:23): [True: 9.93k, False: 3.31k]
  ------------------
  118|  9.93k|        if (value[i] < '0' || value[i] > '7') {
  ------------------
  |  Branch (118:13): [True: 0, False: 9.93k]
  |  Branch (118:31): [True: 0, False: 9.93k]
  ------------------
  119|      0|          return false;
  120|      0|        }
  121|  9.93k|        v = 8 * v + value[i] - '0';
  122|  9.93k|      }
  123|  3.31k|      if (v > 255) return false;
  ------------------
  |  Branch (123:11): [True: 0, False: 3.31k]
  ------------------
  124|       |
  125|  3.31k|      out += static_cast<char>(v);
  126|  3.31k|      value.remove_prefix(4);
  127|  3.31k|    }
  128|  11.1k|  }
  129|    385|  return true;
  130|    385|}

_ZNK8fuzztest8internal6no_adl8IRObject4SubsEv:
  152|  15.3k|  std::optional<absl::Span<const IRObject>> Subs() const {
  153|  15.3k|    if (const auto* i = std::get_if<std::vector<IRObject>>(&value_)) {
  ------------------
  |  Branch (153:21): [True: 13.5k, False: 1.75k]
  ------------------
  154|  13.5k|      return *i;
  155|  13.5k|    }
  156|       |    // The empty vector is serialized the same way as the monostate: nothing.
  157|       |    // Handle that case too.
  158|  1.75k|    if (std::holds_alternative<std::monostate>(value_)) {
  ------------------
  |  Branch (158:9): [True: 3, False: 1.75k]
  ------------------
  159|      3|      return absl::Span<const IRObject>{};
  160|      3|    }
  161|  1.75k|    return std::nullopt;
  162|  1.75k|  }
_ZN8fuzztest8internal6no_adl8IRObject11MutableSubsEv:
  167|  16.9k|  std::vector<IRObject>& MutableSubs() {
  168|  16.9k|    if (!std::holds_alternative<std::vector<IRObject>>(value_)) {
  ------------------
  |  Branch (168:9): [True: 16.9k, False: 0]
  ------------------
  169|  16.9k|      value_.emplace<std::vector<IRObject>>();
  170|  16.9k|    }
  171|  16.9k|    return std::get<std::vector<IRObject>>(value_);
  172|  16.9k|  }
_ZNK8fuzztest8internal6no_adl8IRObject9GetScalarINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEEDav:
   99|  13.4k|  auto GetScalar() const {
  100|       |    if constexpr (std::is_enum_v<T>) {
  101|       |      auto inner = GetScalar<std::underlying_type_t<T>>();
  102|       |      return inner ? std::optional(static_cast<T>(*inner)) : std::nullopt;
  103|       |    } else if constexpr (std::is_integral_v<T>) {
  104|       |      const uint64_t* i = std::get_if<uint64_t>(&value_);
  105|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  106|       |    } else if constexpr (std::is_same_v<float, T> ||
  107|       |                         std::is_same_v<double, T>) {
  108|       |      const double* i = std::get_if<double>(&value_);
  109|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  110|  13.4k|    } else if constexpr (std::is_same_v<std::string, T>) {
  111|  13.4k|      std::optional<absl::string_view> out;
  112|  13.4k|      if (const auto* s = std::get_if<std::string>(&value_)) {
  ------------------
  |  Branch (112:23): [True: 13.3k, False: 29]
  ------------------
  113|  13.3k|        out = *s;
  114|  13.3k|      }
  115|  13.4k|      return out;
  116|  13.4k|    }
  117|  13.4k|  }
_ZNK8fuzztest8internal6no_adl8IRObject8ToCorpusINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEENS4_8optionalIT_EEv:
  245|  13.4k|  std::optional<T> ToCorpus() const {
  246|       |    if constexpr (std::is_const_v<T>) {
  247|       |      return ToCorpus<std::remove_const_t<T>>();
  248|       |    } else if constexpr (is_monostate_v<T>) {
  249|       |      if (std::holds_alternative<std::monostate>(value_)) return T{};
  250|       |      return std::nullopt;
  251|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  252|       |      return *this;
  253|  13.4k|    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  254|  13.4k|      if (auto v = GetScalar<T>()) {
  ------------------
  |  Branch (254:16): [True: 13.3k, False: 29]
  ------------------
  255|  13.3k|        return static_cast<T>(*v);
  256|  13.3k|      }
  257|     29|      return std::nullopt;
  258|       |    } else if constexpr (is_variant_v<T>) {
  259|       |      auto elems = Subs();
  260|       |      if (!elems || elems->size() != 2) return std::nullopt;
  261|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  262|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  263|       |      return Switch<std::variant_size_v<T>>(
  264|       |          *index, [&](auto I) -> std::optional<T> {
  265|       |            auto inner =
  266|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  267|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  268|       |            return std::nullopt;
  269|       |          });
  270|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  271|       |                         std::is_same_v<T, absl::uint128>) {
  272|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  273|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  274|       |      }
  275|       |      return std::nullopt;
  276|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  277|       |      const std::string* v = std::get_if<std::string>(&value_);
  278|       |      T out;
  279|       |      if (v && out.ParseFromString(*v)) return out;
  280|       |      return std::nullopt;
  281|       |    } else if constexpr (is_dynamic_container_v<T>) {
  282|       |      if constexpr (is_bytevector_v<T>) {
  283|       |        const std::string* v = std::get_if<std::string>(&value_);
  284|       |        if (v) {
  285|       |          T out;
  286|       |          out.resize(v->size());
  287|       |          std::memcpy(out.data(), v->data(), v->size());
  288|       |          return out;
  289|       |        }
  290|       |      }
  291|       |
  292|       |      auto elems = Subs();
  293|       |      if (!elems) return std::nullopt;
  294|       |
  295|       |      T out;
  296|       |      for (const auto& elem : *elems) {
  297|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  298|       |          out.insert(out.end(), *std::move(inner));
  299|       |        } else {
  300|       |          return std::nullopt;
  301|       |        }
  302|       |      }
  303|       |      return out;
  304|       |    } else {
  305|       |      // Must be a tuple like object.
  306|       |      auto elems = Subs();
  307|       |      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  308|       |      auto it = elems->begin();
  309|       |      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  310|       |        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  311|       |      });
  312|       |      return std::apply(
  313|       |          [&](auto&... part) -> std::optional<T> {
  314|       |            if ((!part || ...)) return std::nullopt;
  315|       |            return T{*std::move(part)...};
  316|       |          },
  317|       |          parts);
  318|       |    }
  319|  13.4k|  }
_ZNK8fuzztest8internal6no_adl8IRObject9GetScalarIjEEDav:
   99|  13.4k|  auto GetScalar() const {
  100|       |    if constexpr (std::is_enum_v<T>) {
  101|       |      auto inner = GetScalar<std::underlying_type_t<T>>();
  102|       |      return inner ? std::optional(static_cast<T>(*inner)) : std::nullopt;
  103|  13.4k|    } else if constexpr (std::is_integral_v<T>) {
  104|  13.4k|      const uint64_t* i = std::get_if<uint64_t>(&value_);
  105|  13.4k|      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  ------------------
  |  Branch (105:14): [True: 13.3k, False: 26]
  ------------------
  106|       |    } else if constexpr (std::is_same_v<float, T> ||
  107|       |                         std::is_same_v<double, T>) {
  108|       |      const double* i = std::get_if<double>(&value_);
  109|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  110|       |    } else if constexpr (std::is_same_v<std::string, T>) {
  111|       |      std::optional<absl::string_view> out;
  112|       |      if (const auto* s = std::get_if<std::string>(&value_)) {
  113|       |        out = *s;
  114|       |      }
  115|       |      return out;
  116|       |    }
  117|  13.4k|  }
_ZNK8fuzztest8internal6no_adl8IRObject8ToCorpusIjEENSt3__18optionalIT_EEv:
  245|  13.4k|  std::optional<T> ToCorpus() const {
  246|       |    if constexpr (std::is_const_v<T>) {
  247|       |      return ToCorpus<std::remove_const_t<T>>();
  248|       |    } else if constexpr (is_monostate_v<T>) {
  249|       |      if (std::holds_alternative<std::monostate>(value_)) return T{};
  250|       |      return std::nullopt;
  251|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  252|       |      return *this;
  253|  13.4k|    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  254|  13.4k|      if (auto v = GetScalar<T>()) {
  ------------------
  |  Branch (254:16): [True: 13.3k, False: 26]
  ------------------
  255|  13.3k|        return static_cast<T>(*v);
  256|  13.3k|      }
  257|     26|      return std::nullopt;
  258|       |    } else if constexpr (is_variant_v<T>) {
  259|       |      auto elems = Subs();
  260|       |      if (!elems || elems->size() != 2) return std::nullopt;
  261|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  262|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  263|       |      return Switch<std::variant_size_v<T>>(
  264|       |          *index, [&](auto I) -> std::optional<T> {
  265|       |            auto inner =
  266|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  267|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  268|       |            return std::nullopt;
  269|       |          });
  270|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  271|       |                         std::is_same_v<T, absl::uint128>) {
  272|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  273|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  274|       |      }
  275|       |      return std::nullopt;
  276|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  277|       |      const std::string* v = std::get_if<std::string>(&value_);
  278|       |      T out;
  279|       |      if (v && out.ParseFromString(*v)) return out;
  280|       |      return std::nullopt;
  281|       |    } else if constexpr (is_dynamic_container_v<T>) {
  282|       |      if constexpr (is_bytevector_v<T>) {
  283|       |        const std::string* v = std::get_if<std::string>(&value_);
  284|       |        if (v) {
  285|       |          T out;
  286|       |          out.resize(v->size());
  287|       |          std::memcpy(out.data(), v->data(), v->size());
  288|       |          return out;
  289|       |        }
  290|       |      }
  291|       |
  292|       |      auto elems = Subs();
  293|       |      if (!elems) return std::nullopt;
  294|       |
  295|       |      T out;
  296|       |      for (const auto& elem : *elems) {
  297|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  298|       |          out.insert(out.end(), *std::move(inner));
  299|       |        } else {
  300|       |          return std::nullopt;
  301|       |        }
  302|       |      }
  303|       |      return out;
  304|       |    } else {
  305|       |      // Must be a tuple like object.
  306|       |      auto elems = Subs();
  307|       |      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  308|       |      auto it = elems->begin();
  309|       |      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  310|       |        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  311|       |      });
  312|       |      return std::apply(
  313|       |          [&](auto&... part) -> std::optional<T> {
  314|       |            if ((!part || ...)) return std::nullopt;
  315|       |            return T{*std::move(part)...};
  316|       |          },
  317|       |          parts);
  318|       |    }
  319|  13.4k|  }
_ZNK8fuzztest8internal6no_adl8IRObject9GetScalarIbEEDav:
   99|  40.2k|  auto GetScalar() const {
  100|       |    if constexpr (std::is_enum_v<T>) {
  101|       |      auto inner = GetScalar<std::underlying_type_t<T>>();
  102|       |      return inner ? std::optional(static_cast<T>(*inner)) : std::nullopt;
  103|  40.2k|    } else if constexpr (std::is_integral_v<T>) {
  104|  40.2k|      const uint64_t* i = std::get_if<uint64_t>(&value_);
  105|  40.2k|      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  ------------------
  |  Branch (105:14): [True: 40.1k, False: 85]
  ------------------
  106|       |    } else if constexpr (std::is_same_v<float, T> ||
  107|       |                         std::is_same_v<double, T>) {
  108|       |      const double* i = std::get_if<double>(&value_);
  109|       |      return i != nullptr ? std::optional(static_cast<T>(*i)) : std::nullopt;
  110|       |    } else if constexpr (std::is_same_v<std::string, T>) {
  111|       |      std::optional<absl::string_view> out;
  112|       |      if (const auto* s = std::get_if<std::string>(&value_)) {
  113|       |        out = *s;
  114|       |      }
  115|       |      return out;
  116|       |    }
  117|  40.2k|  }
_ZNK8fuzztest8internal6no_adl8IRObject8ToCorpusIbEENSt3__18optionalIT_EEv:
  245|  40.2k|  std::optional<T> ToCorpus() const {
  246|       |    if constexpr (std::is_const_v<T>) {
  247|       |      return ToCorpus<std::remove_const_t<T>>();
  248|       |    } else if constexpr (is_monostate_v<T>) {
  249|       |      if (std::holds_alternative<std::monostate>(value_)) return T{};
  250|       |      return std::nullopt;
  251|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  252|       |      return *this;
  253|  40.2k|    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  254|  40.2k|      if (auto v = GetScalar<T>()) {
  ------------------
  |  Branch (254:16): [True: 40.1k, False: 85]
  ------------------
  255|  40.1k|        return static_cast<T>(*v);
  256|  40.1k|      }
  257|     85|      return std::nullopt;
  258|       |    } else if constexpr (is_variant_v<T>) {
  259|       |      auto elems = Subs();
  260|       |      if (!elems || elems->size() != 2) return std::nullopt;
  261|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  262|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  263|       |      return Switch<std::variant_size_v<T>>(
  264|       |          *index, [&](auto I) -> std::optional<T> {
  265|       |            auto inner =
  266|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  267|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  268|       |            return std::nullopt;
  269|       |          });
  270|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  271|       |                         std::is_same_v<T, absl::uint128>) {
  272|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  273|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  274|       |      }
  275|       |      return std::nullopt;
  276|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  277|       |      const std::string* v = std::get_if<std::string>(&value_);
  278|       |      T out;
  279|       |      if (v && out.ParseFromString(*v)) return out;
  280|       |      return std::nullopt;
  281|       |    } else if constexpr (is_dynamic_container_v<T>) {
  282|       |      if constexpr (is_bytevector_v<T>) {
  283|       |        const std::string* v = std::get_if<std::string>(&value_);
  284|       |        if (v) {
  285|       |          T out;
  286|       |          out.resize(v->size());
  287|       |          std::memcpy(out.data(), v->data(), v->size());
  288|       |          return out;
  289|       |        }
  290|       |      }
  291|       |
  292|       |      auto elems = Subs();
  293|       |      if (!elems) return std::nullopt;
  294|       |
  295|       |      T out;
  296|       |      for (const auto& elem : *elems) {
  297|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  298|       |          out.insert(out.end(), *std::move(inner));
  299|       |        } else {
  300|       |          return std::nullopt;
  301|       |        }
  302|       |      }
  303|       |      return out;
  304|       |    } else {
  305|       |      // Must be a tuple like object.
  306|       |      auto elems = Subs();
  307|       |      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  308|       |      auto it = elems->begin();
  309|       |      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  310|       |        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  311|       |      });
  312|       |      return std::apply(
  313|       |          [&](auto&... part) -> std::optional<T> {
  314|       |            if ((!part || ...)) return std::nullopt;
  315|       |            return T{*std::move(part)...};
  316|       |          },
  317|       |          parts);
  318|       |    }
  319|  40.2k|  }
_ZNK8fuzztest8internal6no_adl8IRObject8ToCorpusINSt3__15tupleIJNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEEEENS4_8optionalIT_EEv:
  245|  15.3k|  std::optional<T> ToCorpus() const {
  246|       |    if constexpr (std::is_const_v<T>) {
  247|       |      return ToCorpus<std::remove_const_t<T>>();
  248|       |    } else if constexpr (is_monostate_v<T>) {
  249|       |      if (std::holds_alternative<std::monostate>(value_)) return T{};
  250|       |      return std::nullopt;
  251|       |    } else if constexpr (std::is_same_v<T, IRObject>) {
  252|       |      return *this;
  253|       |    } else if constexpr (std::is_constructible_v<IRObject, T>) {
  254|       |      if (auto v = GetScalar<T>()) {
  255|       |        return static_cast<T>(*v);
  256|       |      }
  257|       |      return std::nullopt;
  258|       |    } else if constexpr (is_variant_v<T>) {
  259|       |      auto elems = Subs();
  260|       |      if (!elems || elems->size() != 2) return std::nullopt;
  261|       |      auto index = (*elems)[0].ToCorpus<size_t>();
  262|       |      if (!index || *index >= std::variant_size_v<T>) return std::nullopt;
  263|       |      return Switch<std::variant_size_v<T>>(
  264|       |          *index, [&](auto I) -> std::optional<T> {
  265|       |            auto inner =
  266|       |                (*elems)[1].ToCorpus<std::variant_alternative_t<I, T>>();
  267|       |            if (inner) return T(std::in_place_index<I>, *std::move(inner));
  268|       |            return std::nullopt;
  269|       |          });
  270|       |    } else if constexpr (std::is_same_v<T, absl::int128> ||
  271|       |                         std::is_same_v<T, absl::uint128>) {
  272|       |      if (auto res = ToCorpus<std::pair<uint64_t, uint64_t>>()) {
  273|       |        return static_cast<T>(absl::MakeUint128(res->first, res->second));
  274|       |      }
  275|       |      return std::nullopt;
  276|       |    } else if constexpr (is_protocol_buffer_v<T>) {
  277|       |      const std::string* v = std::get_if<std::string>(&value_);
  278|       |      T out;
  279|       |      if (v && out.ParseFromString(*v)) return out;
  280|       |      return std::nullopt;
  281|       |    } else if constexpr (is_dynamic_container_v<T>) {
  282|       |      if constexpr (is_bytevector_v<T>) {
  283|       |        const std::string* v = std::get_if<std::string>(&value_);
  284|       |        if (v) {
  285|       |          T out;
  286|       |          out.resize(v->size());
  287|       |          std::memcpy(out.data(), v->data(), v->size());
  288|       |          return out;
  289|       |        }
  290|       |      }
  291|       |
  292|       |      auto elems = Subs();
  293|       |      if (!elems) return std::nullopt;
  294|       |
  295|       |      T out;
  296|       |      for (const auto& elem : *elems) {
  297|       |        if (auto inner = elem.ToCorpus<typename T::value_type>()) {
  298|       |          out.insert(out.end(), *std::move(inner));
  299|       |        } else {
  300|       |          return std::nullopt;
  301|       |        }
  302|       |      }
  303|       |      return out;
  304|  15.3k|    } else {
  305|       |      // Must be a tuple like object.
  306|  15.3k|      auto elems = Subs();
  307|  15.3k|      if (!elems || elems->size() != std::tuple_size_v<T>) return std::nullopt;
  ------------------
  |  Branch (307:11): [True: 1.75k, False: 13.5k]
  |  Branch (307:21): [True: 146, False: 13.4k]
  ------------------
  308|  13.4k|      auto it = elems->begin();
  309|  13.4k|      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  310|  13.4k|        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  311|  13.4k|      });
  312|  13.4k|      return std::apply(
  313|  13.4k|          [&](auto&... part) -> std::optional<T> {
  314|  13.4k|            if ((!part || ...)) return std::nullopt;
  315|  13.4k|            return T{*std::move(part)...};
  316|  13.4k|          },
  317|  13.4k|          parts);
  318|  15.3k|    }
  319|  15.3k|  }
_ZZNK8fuzztest8internal6no_adl8IRObject8ToCorpusINSt3__15tupleIJNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEEEENS4_8optionalIT_EEvENKUlDpT_E_clIJNS4_17integral_constantImLm0EEENSK_ImLm1EEENSK_ImLm2EEENSK_ImLm3EEENSK_ImLm4EEEEEEDaSH_:
  309|  13.4k|      auto parts = ApplyIndex<std::tuple_size_v<T>>([&](auto... I) {
  310|  13.4k|        return std::tuple{it++->ToCorpus<std::tuple_element_t<I, T>>()...};
  311|  13.4k|      });
_ZZNK8fuzztest8internal6no_adl8IRObject8ToCorpusINSt3__15tupleIJNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbjbEEEEENS4_8optionalIT_EEvENKUlDpRT_E_clIJNSD_ISB_EENSD_IbEESM_NSD_IjEESM_EEENSD_ISC_EESI_:
  313|  13.4k|          [&](auto&... part) -> std::optional<T> {
  314|   120k|            if ((!part || ...)) return std::nullopt;
  ------------------
  |  Branch (314:18): [True: 2, False: 13.3k]
  |  Branch (314:18): [True: 1, False: 13.3k]
  |  Branch (314:18): [True: 4, False: 13.3k]
  |  Branch (314:18): [True: 9, False: 13.3k]
  |  Branch (314:18): [True: 29, False: 13.3k]
  ------------------
  315|  13.3k|            return T{*std::move(part)...};
  316|  13.4k|          },
_ZN8fuzztest8internal6no_adl8IRObjectC2Ev:
   75|   115k|  IRObject() = default;
_ZN8fuzztest8internal6no_adl8IRObject13MutableScalarImEERDav:
  141|  54.8k|  auto& MutableScalar() {
  142|       |    if constexpr (is_monostate_v<T>) {
  143|       |      static_assert(always_false<T>, "Invalid type");
  144|       |    }
  145|  54.8k|    if (!std::holds_alternative<T>(value_)) {
  ------------------
  |  Branch (145:9): [True: 54.8k, False: 0]
  ------------------
  146|  54.8k|      value_.emplace<T>();
  147|  54.8k|    }
  148|  54.8k|    return std::get<T>(value_);
  149|  54.8k|  }
_ZN8fuzztest8internal6no_adl8IRObject13MutableScalarIdEERDav:
  141|  25.9k|  auto& MutableScalar() {
  142|       |    if constexpr (is_monostate_v<T>) {
  143|       |      static_assert(always_false<T>, "Invalid type");
  144|       |    }
  145|  25.9k|    if (!std::holds_alternative<T>(value_)) {
  ------------------
  |  Branch (145:9): [True: 25.9k, False: 0]
  ------------------
  146|  25.9k|      value_.emplace<T>();
  147|  25.9k|    }
  148|  25.9k|    return std::get<T>(value_);
  149|  25.9k|  }
_ZN8fuzztest8internal6no_adl8IRObject13MutableScalarINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEEERDav:
  141|  13.7k|  auto& MutableScalar() {
  142|       |    if constexpr (is_monostate_v<T>) {
  143|       |      static_assert(always_false<T>, "Invalid type");
  144|       |    }
  145|  13.7k|    if (!std::holds_alternative<T>(value_)) {
  ------------------
  |  Branch (145:9): [True: 13.7k, False: 0]
  ------------------
  146|  13.7k|      value_.emplace<T>();
  147|  13.7k|    }
  148|  13.7k|    return std::get<T>(value_);
  149|  13.7k|  }

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

_ZN7testing15AssertionResultC2IbEERKT_PNSt3__19enable_ifIXntsr3std14is_convertibleIS2_S0_EE5valueEvE4typeE:
  168|  1.02M|      : success_(success) {}

_ZN7testing7MessagelsIKcEERS0_RKPT_:
  181|     44|  inline Message& operator<<(T* const& pointer) {  // NOLINT
  182|     44|    if (pointer == nullptr) {
  ------------------
  |  Branch (182:9): [True: 0, False: 44]
  ------------------
  183|      0|      *ss_ << "(null)";
  184|     44|    } else {
  185|     44|      *ss_ << pointer;
  186|     44|    }
  187|     44|    return *this;
  188|     44|  }
_ZN7testing8internal18StreamableToStringIiEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKT_:
  242|      6|std::string StreamableToString(const T& streamable) {
  243|      6|  return (Message() << streamable).GetString();
  244|      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|     44|  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|     44|    using ::operator<<;
  148|     44|    *ss_ << val;
  149|     44|    return *this;
  150|     44|  }
_ZN7testing7MessagelsIcEERS0_RKT_:
  132|    884|  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|    884|    using ::operator<<;
  148|    884|    *ss_ << val;
  149|    884|    return *this;
  150|    884|  }
_ZN7testing8internal18StreamableToStringIPcEENSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKT_:
  242|     32|std::string StreamableToString(const T& streamable) {
  243|     32|  return (Message() << streamable).GetString();
  244|     32|}
_ZN7testing7MessagelsIcEERS0_RKPT_:
  181|     32|  inline Message& operator<<(T* const& pointer) {  // NOLINT
  182|     32|    if (pointer == nullptr) {
  ------------------
  |  Branch (182:9): [True: 0, False: 32]
  ------------------
  183|      0|      *ss_ << "(null)";
  184|     32|    } else {
  185|     32|      *ss_ << pointer;
  186|     32|    }
  187|     32|    return *this;
  188|     32|  }

_ZNK7testing8TestInfo15test_suite_nameEv:
  540|      2|  const char* test_suite_name() const { return test_suite_name_.c_str(); }
_ZNK7testing8TestInfo4nameEv:
  548|      6|  const char* name() const { return name_.c_str(); }
_ZN7testing8UnitTest4implEv:
 1280|     48|  internal::UnitTestImpl* impl() { return impl_; }
_ZNK7testing12TestProperty3keyEv:
  378|      4|  const char* key() const { return key_.c_str(); }
_ZNK7testing9TestSuite14test_info_listEv:
  761|      2|  const std::vector<TestInfo*>& test_info_list() const {
  762|      2|    return test_info_list_;
  763|      2|  }
_ZN7testing10TestResult19set_start_timestampEl:
  467|      2|  void set_start_timestamp(TimeInMillis start) { start_timestamp_ = start; }
_ZN7testing9TestSuite13ShouldRunTestEPKNS_8TestInfoE:
  838|      4|  static bool ShouldRunTest(const TestInfo* test_info) {
  839|      4|    return test_info->should_run();
  840|      4|  }
_ZN7testing9TestSuite17RunSetUpTestSuiteEv:
  792|      2|  void RunSetUpTestSuite() {
  793|      2|    if (set_up_tc_ != nullptr) {
  ------------------
  |  Branch (793:9): [True: 0, False: 2]
  ------------------
  794|      0|      (*set_up_tc_)();
  795|      0|    }
  796|      2|  }
_ZNK7testing9TestSuite18ad_hoc_test_resultEv:
  751|      4|  const TestResult& ad_hoc_test_result() const { return ad_hoc_test_result_; }
_ZN7testing8TestInfo15ClearTestResultEPS0_:
  638|      2|  static void ClearTestResult(TestInfo* test_info) {
  639|      2|    test_info->result_.Clear();
  640|      2|  }
_ZNK7testing9TestSuite4nameEv:
  694|      2|  const char* name() const { return name_.c_str(); }
_ZNK7testing9TestSuite10type_paramEv:
  698|      2|  const char* type_param() const {
  699|      2|    if (type_param_ != nullptr) return type_param_->c_str();
  ------------------
  |  Branch (699:9): [True: 0, False: 2]
  ------------------
  700|      2|    return nullptr;
  701|      2|  }
_ZNK7testing9TestSuite10should_runEv:
  704|      4|  bool should_run() const { return should_run_; }
_ZNK7testing8TestInfo10should_runEv:
  589|      4|  bool should_run() const { return should_run_; }
_ZNK7testing8TestInfo10type_paramEv:
  552|      2|  const char* type_param() const {
  553|      2|    if (type_param_ != nullptr) return type_param_->c_str();
  ------------------
  |  Branch (553:9): [True: 0, False: 2]
  ------------------
  554|      2|    return nullptr;
  555|      2|  }
_ZNK7testing8UnitTest4implEv:
 1281|     14|  const internal::UnitTestImpl* impl() const { return impl_; }
_ZN7testing12TestPropertyC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  375|      2|      : key_(a_key), value_(a_value) {}
_ZN7testing9TestSuite20ClearTestSuiteResultEPS0_:
  780|      2|  static void ClearTestSuiteResult(TestSuite* test_suite) {
  781|      2|    test_suite->ClearResult();
  782|      2|  }
_ZN7testing9TestSuite14set_should_runEb:
  770|      4|  void set_should_run(bool should) { should_run_ = should; }
_ZN7testing9TestSuite14test_info_listEv:
  758|      2|  std::vector<TestInfo*>& test_info_list() { return test_info_list_; }
_ZN7testing17TestEventListener16OnTestSuiteStartERKNS_9TestSuiteE:
  945|      2|  virtual void OnTestSuiteStart(const TestSuite& /*test_suite*/) {}

_ZN7testing8internal8FilePathC2ENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   76|      2|  explicit FilePath(std::string pathname) : pathname_(std::move(pathname)) {
   77|      2|    Normalize();
   78|      2|  }
_ZNK7testing8internal8FilePath7IsEmptyEv:
  124|      4|  bool IsEmpty() const { return pathname_.empty(); }
_ZN7testing8internal8FilePathC2Ev:
   72|      2|  FilePath() : pathname_("") {}
_ZN7testing8internal8FilePathaSEOS1_:
   84|      2|  FilePath& operator=(FilePath&& rhs) noexcept {
   85|      2|    pathname_ = std::move(rhs.pathname_);
   86|      2|    return *this;
   87|      2|  }

_ZN7testing8internal6RandomC2Ej:
  845|      2|  explicit Random(uint32_t seed) : state_(seed) {}
_ZN7testing8internal9GetTypeIdINS_4TestEEEPKvv:
  410|      2|TypeId GetTypeId() {
  411|       |  // The compiler is required to allocate a different
  412|       |  // TypeIdHelper<T>::dummy_ variable for each T used to instantiate
  413|       |  // the template.  Therefore, the address of dummy_ is guaranteed to
  414|       |  // be unique.
  415|      2|  return &(TypeIdHelper<T>::dummy_);
  416|      2|}

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

_ZN7testing8internal7ToUpperEc:
 1979|    884|inline char ToUpper(char ch) {
 1980|    884|  return static_cast<char>(toupper(static_cast<unsigned char>(ch)));
 1981|    884|}
_ZN7testing8internal5posix6GetEnvEPKc:
 2138|     64|inline const char* GetEnv(const char* name) {
 2139|       |#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
 2140|       |    defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) ||               \
 2141|       |    defined(GTEST_OS_QURT)
 2142|       |  // We are on an embedded platform, which has no environment variables.
 2143|       |  static_cast<void>(name);  // To prevent 'unused argument' warning.
 2144|       |  return nullptr;
 2145|       |#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
 2146|       |  // Environment variables which we programmatically clear will be set to the
 2147|       |  // empty string rather than unset (NULL).  Handle that case.
 2148|       |  const char* const env = getenv(name);
 2149|       |  return (env != nullptr && env[0] != '\0') ? env : nullptr;
 2150|       |#else
 2151|     64|  return getenv(name);
 2152|     64|#endif
 2153|     64|}
_ZN7testing8internal14GTestMutexLockC2EPNS0_9MutexBaseE:
 1732|      6|  explicit GTestMutexLock(MutexBase* mutex) : mutex_(mutex) { mutex_->Lock(); }
_ZN7testing8internal9MutexBase4LockEv:
 1657|      6|  void Lock() {
 1658|      6|    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
  ------------------
  |  | 1100|      6|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1100:17): [True: 0, False: 6]
  |  |  ------------------
  |  | 1101|      6|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1064|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1659|      6|    owner_ = pthread_self();
 1660|      6|    has_owner_ = true;
 1661|      6|  }
_ZN7testing8internal14GTestMutexLockD2Ev:
 1734|      6|  ~GTestMutexLock() { mutex_->Unlock(); }
_ZN7testing8internal9MutexBase6UnlockEv:
 1664|      6|  void Unlock() {
 1665|       |    // Since the lock is being released the owner_ field should no longer be
 1666|       |    // considered valid. We don't protect writing to has_owner_ here, as it's
 1667|       |    // the caller's responsibility to ensure that the current thread holds the
 1668|       |    // mutex when this is called.
 1669|      6|    has_owner_ = false;
 1670|      6|    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
  ------------------
  |  | 1100|      6|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1100:17): [True: 0, False: 6]
  |  |  ------------------
  |  | 1101|      6|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1064|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1671|      6|  }
_ZN7testing8internal5posix10StrCaseCmpEPKcS3_:
 2074|      2|inline int StrCaseCmp(const char* s1, const char* s2) {
 2075|      2|  return strcasecmp(s1, s2);
 2076|      2|}
_ZN7testing8internal5MutexC2Ev:
 1714|     10|  Mutex() {
 1715|     10|    GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));
  ------------------
  |  | 1100|     10|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1100:17): [True: 0, False: 10]
  |  |  ------------------
  |  | 1101|     10|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1064|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1716|     10|    has_owner_ = false;
 1717|     10|  }
_ZN7testing8internal5posix6IsATTYEi:
 2080|      2|inline int IsATTY(int fd) {
 2081|       |  // DoIsATTY might change errno (for example ENOTTY in case you redirect stdout
 2082|       |  // to a file on Linux), which is unexpected, so save the previous value, and
 2083|       |  // restore it after the call.
 2084|      2|  int savedErrno = errno;
 2085|      2|  int isAttyValue = DoIsATTY(fd);
 2086|      2|  errno = savedErrno;
 2087|       |
 2088|      2|  return isAttyValue;
 2089|      2|}
_ZN7testing8internal5posix8DoIsATTYEi:
 2073|      2|inline int DoIsATTY(int fd) { return isatty(fd); }
_ZN7testing8internal5posix6FileNoEP8_IO_FILE:
 2035|      2|inline int FileNo(FILE* file) { return fileno(file); }
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEEC2ERKS3_:
 1769|      2|      : key_(CreateKey()),
 1770|      2|        default_factory_(new InstanceValueHolderFactory(value)) {}
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv:
 1801|      2|  static pthread_key_t CreateKey() {
 1802|      2|    pthread_key_t key;
 1803|       |    // When a thread exits, DeleteThreadLocalValue() will be called on
 1804|       |    // the object managed for that thread.
 1805|      2|    GTEST_CHECK_POSIX_SUCCESS_(
  ------------------
  |  | 1100|      2|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1100:17): [True: 0, False: 2]
  |  |  ------------------
  |  | 1101|      2|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1064|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1806|      2|        pthread_key_create(&key, &DeleteThreadLocalValue));
 1807|      2|    return key;
 1808|      2|  }
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE26InstanceValueHolderFactoryC2ERKS3_:
 1847|      2|    explicit InstanceValueHolderFactory(const T& value) : value_(value) {}
_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE18ValueHolderFactoryC2Ev:
 1825|      2|    ValueHolderFactory() = default;
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEEC2Ev:
 1767|      2|      : key_(CreateKey()), default_factory_(new DefaultValueHolderFactory()) {}
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEE9CreateKeyEv:
 1801|      2|  static pthread_key_t CreateKey() {
 1802|      2|    pthread_key_t key;
 1803|       |    // When a thread exits, DeleteThreadLocalValue() will be called on
 1804|       |    // the object managed for that thread.
 1805|      2|    GTEST_CHECK_POSIX_SUCCESS_(
  ------------------
  |  | 1100|      2|  if (const int gtest_error = (posix_call))    \
  |  |  ------------------
  |  |  |  Branch (1100:17): [True: 0, False: 2]
  |  |  ------------------
  |  | 1101|      2|  GTEST_LOG_(FATAL) << #posix_call << "failed with error " << gtest_error
  |  |  ------------------
  |  |  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1064|      0|      .GetStream()
  |  |  ------------------
  ------------------
 1806|      2|        pthread_key_create(&key, &DeleteThreadLocalValue));
 1807|      2|    return key;
 1808|      2|  }
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEE25DefaultValueHolderFactoryC2Ev:
 1836|      2|    DefaultValueHolderFactory() = default;
_ZN7testing8internal11ThreadLocalINSt3__16vectorINS0_9TraceInfoENS2_9allocatorIS4_EEEEE18ValueHolderFactoryC2Ev:
 1825|      2|    ValueHolderFactory() = default;

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

_ZN7testing8internal29ParseInternalRunDeathTestFlagEv:
 1533|      2|InternalRunDeathTestFlag* ParseInternalRunDeathTestFlag() {
 1534|      2|  if (GTEST_FLAG_GET(internal_run_death_test).empty()) return nullptr;
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  |  Branch (1534:7): [True: 2, False: 0]
  ------------------
 1535|       |
 1536|       |  // GTEST_HAS_DEATH_TEST implies that we have ::std::string, so we
 1537|       |  // can use it here.
 1538|      0|  int line = -1;
 1539|      0|  int index = -1;
 1540|      0|  ::std::vector< ::std::string> fields;
 1541|      0|  SplitString(GTEST_FLAG_GET(internal_run_death_test), '|', &fields);
  ------------------
  |  | 2310|      0|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 1542|      0|  int write_fd = -1;
 1543|       |
 1544|       |#ifdef GTEST_OS_WINDOWS
 1545|       |
 1546|       |  unsigned int parent_process_id = 0;
 1547|       |  size_t write_handle_as_size_t = 0;
 1548|       |  size_t event_handle_as_size_t = 0;
 1549|       |
 1550|       |  if (fields.size() != 6 || !ParseNaturalNumber(fields[1], &line) ||
 1551|       |      !ParseNaturalNumber(fields[2], &index) ||
 1552|       |      !ParseNaturalNumber(fields[3], &parent_process_id) ||
 1553|       |      !ParseNaturalNumber(fields[4], &write_handle_as_size_t) ||
 1554|       |      !ParseNaturalNumber(fields[5], &event_handle_as_size_t)) {
 1555|       |    DeathTestAbort("Bad --gtest_internal_run_death_test flag: " +
 1556|       |                   GTEST_FLAG_GET(internal_run_death_test));
 1557|       |  }
 1558|       |  write_fd = GetStatusFileDescriptor(parent_process_id, write_handle_as_size_t,
 1559|       |                                     event_handle_as_size_t);
 1560|       |
 1561|       |#elif defined(GTEST_OS_FUCHSIA)
 1562|       |
 1563|       |  if (fields.size() != 3 || !ParseNaturalNumber(fields[1], &line) ||
 1564|       |      !ParseNaturalNumber(fields[2], &index)) {
 1565|       |    DeathTestAbort("Bad --gtest_internal_run_death_test flag: " +
 1566|       |                   GTEST_FLAG_GET(internal_run_death_test));
 1567|       |  }
 1568|       |
 1569|       |#else
 1570|       |
 1571|      0|  if (fields.size() != 4 || !ParseNaturalNumber(fields[1], &line) ||
  ------------------
  |  Branch (1571:7): [True: 0, False: 0]
  |  Branch (1571:29): [True: 0, False: 0]
  ------------------
 1572|      0|      !ParseNaturalNumber(fields[2], &index) ||
  ------------------
  |  Branch (1572:7): [True: 0, False: 0]
  ------------------
 1573|      0|      !ParseNaturalNumber(fields[3], &write_fd)) {
  ------------------
  |  Branch (1573:7): [True: 0, False: 0]
  ------------------
 1574|      0|    DeathTestAbort("Bad --gtest_internal_run_death_test flag: " +
 1575|      0|                   GTEST_FLAG_GET(internal_run_death_test));
  ------------------
  |  | 2310|      0|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 1576|      0|  }
 1577|       |
 1578|      0|#endif  // GTEST_OS_WINDOWS
 1579|       |
 1580|      0|  return new InternalRunDeathTestFlag(fields[0], line, index, write_fd);
 1581|      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:
  982|     30|inline UnitTestImpl* GetUnitTestImpl() {
  983|     30|  return UnitTest::GetInstance()->impl();
  984|     30|}
_ZN7testing8internal12UnitTestImpl17current_test_infoEv:
  757|      2|  TestInfo* current_test_info() { return current_test_info_; }
_ZN7testing8internal12UnitTestImpl9listenersEv:
  609|     12|  TestEventListeners* listeners() { return &listeners_; }
_ZN7testing8internal12UnitTestImpl33ignored_parameterized_test_suitesEv:
  704|      2|  std::set<std::string>* ignored_parameterized_test_suites() {
  705|      2|    return &ignored_parameterized_test_suites_;
  706|      2|  }
_ZN7testing8internal17TestPropertyKeyIsC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  348|      2|  explicit TestPropertyKeyIs(const std::string& key) : key_(key) {}
_ZN7testing8internal14GTestFlagSaverC2Ev:
  144|      2|  GTestFlagSaver() {
  145|      2|    also_run_disabled_tests_ = GTEST_FLAG_GET(also_run_disabled_tests);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  146|      2|    break_on_failure_ = GTEST_FLAG_GET(break_on_failure);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  147|      2|    catch_exceptions_ = GTEST_FLAG_GET(catch_exceptions);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  148|      2|    color_ = GTEST_FLAG_GET(color);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  149|      2|    death_test_style_ = GTEST_FLAG_GET(death_test_style);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  150|      2|    death_test_use_fork_ = GTEST_FLAG_GET(death_test_use_fork);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  151|      2|    fail_fast_ = GTEST_FLAG_GET(fail_fast);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  152|      2|    filter_ = GTEST_FLAG_GET(filter);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  153|      2|    internal_run_death_test_ = GTEST_FLAG_GET(internal_run_death_test);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  154|      2|    list_tests_ = GTEST_FLAG_GET(list_tests);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  155|      2|    output_ = GTEST_FLAG_GET(output);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  156|      2|    brief_ = GTEST_FLAG_GET(brief);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  157|      2|    print_time_ = GTEST_FLAG_GET(print_time);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  158|      2|    print_utf8_ = GTEST_FLAG_GET(print_utf8);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  159|      2|    random_seed_ = GTEST_FLAG_GET(random_seed);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  160|      2|    repeat_ = GTEST_FLAG_GET(repeat);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  161|      2|    recreate_environments_when_repeating_ =
  162|      2|        GTEST_FLAG_GET(recreate_environments_when_repeating);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  163|      2|    shuffle_ = GTEST_FLAG_GET(shuffle);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  164|      2|    stack_trace_depth_ = GTEST_FLAG_GET(stack_trace_depth);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  165|      2|    stream_result_to_ = GTEST_FLAG_GET(stream_result_to);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  166|      2|    throw_on_failure_ = GTEST_FLAG_GET(throw_on_failure);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  167|      2|  }
_ZNK7testing8internal12UnitTestImpl18current_test_suiteEv:
  756|      2|  const TestSuite* current_test_suite() const { return current_test_suite_; }
_ZN7testing8internal12UnitTestImpl11AddTestInfoEPFvvES3_PNS_8TestInfoE:
  677|      2|                   TestInfo* test_info) {
  678|      2|#if GTEST_HAS_FILE_SYSTEM
  679|       |    // In order to support thread-safe death tests, we need to
  680|       |    // remember the original working directory when the test program
  681|       |    // was first invoked.  We cannot do this in RUN_ALL_TESTS(), as
  682|       |    // the user may have changed the current directory before calling
  683|       |    // RUN_ALL_TESTS().  Therefore we capture the current directory in
  684|       |    // AddTestInfo(), which is called to register a TEST or TEST_F
  685|       |    // before main() is reached.
  686|      2|    if (original_working_dir_.IsEmpty()) {
  ------------------
  |  Branch (686:9): [True: 2, False: 0]
  ------------------
  687|      2|      original_working_dir_ = FilePath::GetCurrentDir();
  688|      4|      GTEST_CHECK_(!original_working_dir_.IsEmpty())
  ------------------
  |  | 1087|      2|  GTEST_AMBIGUOUS_ELSE_BLOCKER_               \
  |  |  ------------------
  |  |  |  |  728|      4|  switch (0)                          \
  |  |  |  |  729|      4|  case 0:                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (729:3): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  730|      2|  default:  // NOLINT
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (730:3): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1088|      2|  if (::testing::internal::IsTrue(condition)) \
  |  |  ------------------
  |  |  |  Branch (1088:7): [True: 2, False: 0]
  |  |  ------------------
  |  | 1089|      2|    ;                                         \
  |  | 1090|      2|  else                                        \
  |  | 1091|      2|    GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
  |  |  ------------------
  |  |  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1064|      0|      .GetStream()
  |  |  ------------------
  ------------------
  689|      4|          << "Failed to get the current working directory.";
  690|      2|    }
  691|      2|#endif  // GTEST_HAS_FILE_SYSTEM
  692|       |
  693|      2|    GetTestSuite(test_info->test_suite_name_, test_info->type_param(),
  694|      2|                 set_up_tc, tear_down_tc)
  695|      2|        ->AddTestInfo(test_info);
  696|      2|  }
_ZNK7testing8internal12UnitTestImpl12GetTestSuiteEi:
  591|      6|  const TestSuite* GetTestSuite(int i) const {
  592|      6|    const int index = GetElementOr(test_suite_indices_, i, -1);
  593|      6|    return index < 0 ? nullptr : test_suites_[static_cast<size_t>(i)];
  ------------------
  |  Branch (593:12): [True: 0, False: 6]
  ------------------
  594|      6|  }
_ZN7testing8internal12UnitTestImpl19GetMutableSuiteCaseEi:
  603|      2|  TestSuite* GetMutableSuiteCase(int i) {
  604|      2|    const int index = GetElementOr(test_suite_indices_, i, -1);
  605|      2|    return index < 0 ? nullptr : test_suites_[static_cast<size_t>(index)];
  ------------------
  |  Branch (605:12): [True: 0, False: 2]
  ------------------
  606|      2|  }
_ZN7testing8internal12UnitTestImpl22set_current_test_suiteEPNS_9TestSuiteE:
  846|      2|  void set_current_test_suite(TestSuite* a_current_test_suite) {
  847|      2|    current_test_suite_ = a_current_test_suite;
  848|      2|  }
_ZN7testing8internal12UnitTestImpl21set_current_test_infoEPNS_8TestInfoE:
  853|      2|  void set_current_test_info(TestInfo* a_current_test_info) {
  854|      2|    current_test_info_ = a_current_test_info;
  855|      2|  }
_ZN7testing8internal12UnitTestImpl20set_catch_exceptionsEb:
  843|      2|  void set_catch_exceptions(bool value) { catch_exceptions_ = value; }
_ZN7testing8internal12UnitTestImpl27parameterized_test_registryEv:
  700|      2|  internal::ParameterizedTestSuiteRegistry& parameterized_test_registry() {
  701|      2|    return parameterized_test_registry_;
  702|      2|  }
_ZN7testing8internal12UnitTestImpl34InitDeathTestSubprocessControlInfoEv:
  773|      2|  void InitDeathTestSubprocessControlInfo() {
  774|      2|    internal_run_death_test_flag_.reset(ParseInternalRunDeathTestFlag());
  775|      2|  }
_ZN7testing8internal21GetRandomSeedFromFlagEi:
  114|      2|inline int GetRandomSeedFromFlag(int32_t random_seed_flag) {
  115|      2|  const unsigned int raw_seed =
  116|      2|      (random_seed_flag == 0) ? static_cast<unsigned int>(GetTimeInMillis())
  ------------------
  |  Branch (116:7): [True: 2, False: 0]
  ------------------
  117|      2|                              : static_cast<unsigned int>(random_seed_flag);
  118|       |
  119|       |  // Normalizes the actual seed to range [1, kMaxRandomSeed] such that
  120|       |  // it's easy to type.
  121|      2|  const int normalized_seed =
  122|      2|      static_cast<int>((raw_seed - 1U) %
  123|      2|                       static_cast<unsigned int>(kMaxRandomSeed)) +
  124|      2|      1;
  125|      2|  return normalized_seed;
  126|      2|}
_ZN7testing8internal12UnitTestImpl23ClearNonAdHocTestResultEv:
  730|      2|  void ClearNonAdHocTestResult() {
  731|      2|    ForEach(test_suites_, TestSuite::ClearTestSuiteResult);
  732|      2|  }
_ZN7testing8internal18OsStackTraceGetterC2Ev:
  440|      2|  OsStackTraceGetter() = default;
_ZN7testing8internal27OsStackTraceGetterInterfaceC2Ev:
  411|      2|  OsStackTraceGetterInterface() = default;
_ZN7testing8internal12GetElementOrIiEET_RKNSt3__16vectorIS2_NS3_9allocatorIS2_EEEEiS2_:
  295|     12|inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
  296|     12|  return (i < 0 || i >= static_cast<int>(v.size())) ? default_value
  ------------------
  |  Branch (296:11): [True: 0, False: 12]
  |  Branch (296:20): [True: 0, False: 12]
  ------------------
  297|     12|                                                    : v[static_cast<size_t>(i)];
  298|     12|}
_ZN7testing8internal7ForEachINSt3__16vectorIPNS_9TestSuiteENS2_9allocatorIS5_EEEEPFvS5_EEEvRKT_T0_:
  288|      2|void ForEach(const Container& c, Functor functor) {
  289|      2|  std::for_each(c.begin(), c.end(), functor);
  290|      2|}
_ZN7testing8internal7CountIfINSt3__16vectorIPNS_9TestSuiteENS2_9allocatorIS5_EEEEPFbPKS4_EEEiRKT_T0_:
  276|      2|inline int CountIf(const Container& c, Predicate predicate) {
  277|       |  // Implemented as an explicit loop since std::count_if() in libCstd on
  278|       |  // Solaris has a non-standard signature.
  279|      2|  int count = 0;
  280|      4|  for (auto it = c.begin(); it != c.end(); ++it) {
  ------------------
  |  Branch (280:29): [True: 2, False: 2]
  ------------------
  281|      2|    if (predicate(*it)) ++count;
  ------------------
  |  Branch (281:9): [True: 2, False: 0]
  ------------------
  282|      2|  }
  283|      2|  return count;
  284|      2|}
_ZN7testing8internal7CountIfINSt3__16vectorINS_14TestPartResultENS2_9allocatorIS4_EEEEPFbRKS4_EEEiRKT_T0_:
  276|     14|inline int CountIf(const Container& c, Predicate predicate) {
  277|       |  // Implemented as an explicit loop since std::count_if() in libCstd on
  278|       |  // Solaris has a non-standard signature.
  279|     14|  int count = 0;
  280|     14|  for (auto it = c.begin(); it != c.end(); ++it) {
  ------------------
  |  Branch (280:29): [True: 0, False: 14]
  ------------------
  281|      0|    if (predicate(*it)) ++count;
  ------------------
  |  Branch (281:9): [True: 0, False: 0]
  ------------------
  282|      0|  }
  283|     14|  return count;
  284|     14|}
_ZNK7testing8internal12UnitTestImpl16catch_exceptionsEv:
  826|     10|  bool catch_exceptions() const { return catch_exceptions_; }
_ZN7testing8internal7CountIfINSt3__16vectorIPNS_8TestInfoENS2_9allocatorIS5_EEEEPFbPKS4_EEEiRKT_T0_:
  276|      4|inline int CountIf(const Container& c, Predicate predicate) {
  277|       |  // Implemented as an explicit loop since std::count_if() in libCstd on
  278|       |  // Solaris has a non-standard signature.
  279|      4|  int count = 0;
  280|      8|  for (auto it = c.begin(); it != c.end(); ++it) {
  ------------------
  |  Branch (280:29): [True: 4, False: 4]
  ------------------
  281|      4|    if (predicate(*it)) ++count;
  ------------------
  |  Branch (281:9): [True: 4, False: 0]
  ------------------
  282|      4|  }
  283|      4|  return count;
  284|      4|}
_ZN7testing8internal7ForEachINSt3__16vectorIPNS_8TestInfoENS2_9allocatorIS5_EEEEPFvS5_EEEvRKT_T0_:
  288|      2|void ForEach(const Container& c, Functor functor) {
  289|      2|  std::for_each(c.begin(), c.end(), functor);
  290|      2|}
_ZN7testing8internal7ForEachINSt3__16vectorIPNS_11EnvironmentENS2_9allocatorIS5_EEEEPFvS5_EEEvRKT_T0_:
  288|      2|void ForEach(const Container& c, Functor functor) {
  289|      2|  std::for_each(c.begin(), c.end(), functor);
  290|      2|}

_ZN7testing8internal16BoolFromGTestEnvEPKcb:
 1366|     26|bool BoolFromGTestEnv(const char* flag, bool default_value) {
 1367|       |#if defined(GTEST_GET_BOOL_FROM_ENV_)
 1368|       |  return GTEST_GET_BOOL_FROM_ENV_(flag, default_value);
 1369|       |#else
 1370|     26|  const std::string env_var = FlagToEnvVar(flag);
 1371|     26|  const char* const string_value = posix::GetEnv(env_var.c_str());
 1372|     26|  return string_value == nullptr ? default_value
  ------------------
  |  Branch (1372:10): [True: 26, False: 0]
  ------------------
 1373|     26|                                 : strcmp(string_value, "0") != 0;
 1374|     26|#endif  // defined(GTEST_GET_BOOL_FROM_ENV_)
 1375|     26|}
_ZN7testing8internal17Int32FromGTestEnvEPKci:
 1380|      6|int32_t Int32FromGTestEnv(const char* flag, int32_t default_value) {
 1381|       |#if defined(GTEST_GET_INT32_FROM_ENV_)
 1382|       |  return GTEST_GET_INT32_FROM_ENV_(flag, default_value);
 1383|       |#else
 1384|      6|  const std::string env_var = FlagToEnvVar(flag);
 1385|      6|  const char* const string_value = posix::GetEnv(env_var.c_str());
 1386|      6|  if (string_value == nullptr) {
  ------------------
  |  Branch (1386:7): [True: 6, False: 0]
  ------------------
 1387|       |    // The environment variable is not set.
 1388|      6|    return default_value;
 1389|      6|  }
 1390|       |
 1391|      0|  int32_t result = default_value;
 1392|      0|  if (!ParseInt32(Message() << "Environment variable " << env_var, string_value,
  ------------------
  |  Branch (1392:7): [True: 0, False: 0]
  ------------------
 1393|      0|                  &result)) {
 1394|      0|    printf("The default value %s is used.\n",
 1395|      0|           (Message() << default_value).GetString().c_str());
 1396|      0|    fflush(stdout);
 1397|      0|    return default_value;
 1398|      0|  }
 1399|       |
 1400|      0|  return result;
 1401|      0|#endif  // defined(GTEST_GET_INT32_FROM_ENV_)
 1402|      0|}
_ZN7testing8internal25OutputFlagAlsoCheckEnvVarEv:
 1412|      2|std::string OutputFlagAlsoCheckEnvVar() {
 1413|      2|  std::string default_value_for_output_flag = "";
 1414|      2|  const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE");
 1415|      2|  if (nullptr != xml_output_file_env) {
  ------------------
  |  Branch (1415:7): [True: 0, False: 2]
  ------------------
 1416|      0|    default_value_for_output_flag = std::string("xml:") + xml_output_file_env;
 1417|      0|  }
 1418|      2|  return default_value_for_output_flag;
 1419|      2|}
_ZN7testing8internal18StringFromGTestEnvEPKcS2_:
 1423|     12|const char* StringFromGTestEnv(const char* flag, const char* default_value) {
 1424|       |#if defined(GTEST_GET_STRING_FROM_ENV_)
 1425|       |  return GTEST_GET_STRING_FROM_ENV_(flag, default_value);
 1426|       |#else
 1427|     12|  const std::string env_var = FlagToEnvVar(flag);
 1428|     12|  const char* const value = posix::GetEnv(env_var.c_str());
 1429|     12|  return value == nullptr ? default_value : value;
  ------------------
  |  Branch (1429:10): [True: 12, False: 0]
  ------------------
 1430|     12|#endif  // defined(GTEST_GET_STRING_FROM_ENV_)
 1431|     12|}
gtest-all.cc:_ZN7testing8internalL12FlagToEnvVarEPKc:
 1309|     44|static std::string FlagToEnvVar(const char* flag) {
 1310|     44|  const std::string full_flag =
 1311|     44|      (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
  ------------------
  |  |  346|     44|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
 1312|       |
 1313|     44|  Message env_var;
 1314|    928|  for (size_t i = 0; i != full_flag.length(); i++) {
  ------------------
  |  Branch (1314:22): [True: 884, False: 44]
  ------------------
 1315|    884|    env_var << ToUpper(full_flag.c_str()[i]);
 1316|    884|  }
 1317|       |
 1318|     44|  return env_var.GetString();
 1319|     44|}

_ZN7testing8internal33GetIgnoredParameterizedTestSuitesEv:
  533|      2|std::set<std::string>* GetIgnoredParameterizedTestSuites() {
  534|      2|  return UnitTest::GetInstance()->impl()->ignored_parameterized_test_suites();
  535|      2|}
_ZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEv:
  617|      2|void TypeParameterizedTestSuiteRegistry::CheckForInstantiations() {
  618|      2|  const auto& ignored = *GetIgnoredParameterizedTestSuites();
  619|      2|  for (const auto& testcase : suites_) {
  ------------------
  |  Branch (619:29): [True: 0, False: 2]
  ------------------
  620|      0|    if (testcase.second.instantiated) continue;
  ------------------
  |  Branch (620:9): [True: 0, False: 0]
  ------------------
  621|      0|    if (ignored.find(testcase.first) != ignored.end()) continue;
  ------------------
  |  Branch (621:9): [True: 0, False: 0]
  ------------------
  622|       |
  623|      0|    std::string message =
  624|      0|        "Type parameterized test suite " + testcase.first +
  625|      0|        " is defined via REGISTER_TYPED_TEST_SUITE_P, but never instantiated "
  626|      0|        "via INSTANTIATE_TYPED_TEST_SUITE_P. None of the test cases will run."
  627|      0|        "\n\n"
  628|      0|        "Ideally, TYPED_TEST_P definitions should only ever be included as "
  629|      0|        "part of binaries that intend to use them. (As opposed to, for "
  630|      0|        "example, being placed in a library that may be linked in to get "
  631|      0|        "other "
  632|      0|        "utilities.)"
  633|      0|        "\n\n"
  634|      0|        "To suppress this error for this test suite, insert the following "
  635|      0|        "line "
  636|      0|        "(in a non-header) in the namespace it is defined in:"
  637|      0|        "\n\n"
  638|      0|        "GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(" +
  639|      0|        testcase.first + ");";
  640|       |
  641|      0|    std::string full_name =
  642|      0|        "UninstantiatedTypeParameterizedTestSuite<" + testcase.first + ">";
  643|      0|    RegisterTest(  //
  644|      0|        "GoogleTestVerification", full_name.c_str(),
  645|      0|        nullptr,  // No type parameter.
  646|      0|        nullptr,  // No value parameter.
  647|      0|        testcase.second.code_location.file.c_str(),
  648|      0|        testcase.second.code_location.line, [message, testcase] {
  649|      0|          return new FailureTest(testcase.second.code_location, message,
  650|      0|                                 kErrorOnUninstantiatedTypeParameterizedTest);
  651|      0|        });
  652|      0|  }
  653|      2|}
_ZN7testing8internal8GetArgvsEv:
  658|      4|::std::vector<std::string> GetArgvs() {
  659|       |#if defined(GTEST_CUSTOM_GET_ARGVS_)
  660|       |  // GTEST_CUSTOM_GET_ARGVS_() may return a container of std::string or
  661|       |  // ::string. This code converts it to the appropriate type.
  662|       |  const auto& custom = GTEST_CUSTOM_GET_ARGVS_();
  663|       |  return ::std::vector<std::string>(custom.begin(), custom.end());
  664|       |#else   // defined(GTEST_CUSTOM_GET_ARGVS_)
  665|      4|  return g_argvs;
  666|      4|#endif  // defined(GTEST_CUSTOM_GET_ARGVS_)
  667|      4|}
_ZN7testing8internal15UnitTestOptions15GetOutputFormatEv:
  691|      2|std::string UnitTestOptions::GetOutputFormat() {
  692|      2|  std::string s = GTEST_FLAG_GET(output);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  693|      2|  const char* const gtest_output_flag = s.c_str();
  694|      2|  const char* const colon = strchr(gtest_output_flag, ':');
  695|      2|  return (colon == nullptr)
  ------------------
  |  Branch (695:10): [True: 2, False: 0]
  ------------------
  696|      2|             ? std::string(gtest_output_flag)
  697|      2|             : std::string(gtest_output_flag,
  698|      0|                           static_cast<size_t>(colon - gtest_output_flag));
  699|      2|}
_ZN7testing8internal13GetTestTypeIdEv:
  999|      2|TypeId GetTestTypeId() { return GetTypeId<Test>(); }
_ZN7testing8internal35DefaultGlobalTestPartResultReporterC2EPNS0_12UnitTestImplE:
 1062|      2|    : unit_test_(unit_test) {}
_ZN7testing8internal38DefaultPerThreadTestPartResultReporterC2EPNS0_12UnitTestImplE:
 1072|      2|    : unit_test_(unit_test) {}
_ZNK7testing8internal12UnitTestImpl22total_test_suite_countEv:
 1116|      6|int UnitTestImpl::total_test_suite_count() const {
 1117|      6|  return static_cast<int>(test_suites_.size());
 1118|      6|}
_ZNK7testing8internal12UnitTestImpl23test_suite_to_run_countEv:
 1122|      2|int UnitTestImpl::test_suite_to_run_count() const {
 1123|      2|  return CountIf(test_suites_, ShouldRunTestSuite);
 1124|      2|}
_ZNK7testing8internal12UnitTestImpl16total_test_countEv:
 1158|      2|int UnitTestImpl::total_test_count() const {
 1159|      2|  return SumOverTestSuiteList(test_suites_, &TestSuite::total_test_count);
 1160|      2|}
_ZNK7testing8internal12UnitTestImpl17test_to_run_countEv:
 1163|      2|int UnitTestImpl::test_to_run_count() const {
 1164|      2|  return SumOverTestSuiteList(test_suites_, &TestSuite::test_to_run_count);
 1165|      2|}
_ZN7testing8internal15GetTimeInMillisEv:
 1211|      8|TimeInMillis GetTimeInMillis() {
 1212|      8|  return std::chrono::duration_cast<std::chrono::milliseconds>(
 1213|      8|             std::chrono::system_clock::now() -
 1214|      8|             std::chrono::system_clock::from_time_t(0))
 1215|      8|      .count();
 1216|      8|}
_ZN7testing8internal6String13CStringEqualsEPKcS3_:
 1261|      2|bool String::CStringEquals(const char* lhs, const char* rhs) {
 1262|      2|  if (lhs == nullptr) return rhs == nullptr;
  ------------------
  |  Branch (1262:7): [True: 0, False: 2]
  ------------------
 1263|       |
 1264|      2|  if (rhs == nullptr) return false;
  ------------------
  |  Branch (1264:7): [True: 0, False: 2]
  ------------------
 1265|       |
 1266|      2|  return strcmp(lhs, rhs) == 0;
 1267|      2|}
_ZN7testing8internal11SplitStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEcPNS1_6vectorIS7_NS5_IS7_EEEE:
 1289|      8|                 ::std::vector< ::std::string>* dest) {
 1290|      8|  ::std::vector< ::std::string> parsed;
 1291|      8|  ::std::string::size_type pos = 0;
 1292|     12|  while (::testing::internal::AlwaysTrue()) {
  ------------------
  |  Branch (1292:10): [True: 12, False: 0]
  ------------------
 1293|     12|    const ::std::string::size_type colon = str.find(delimiter, pos);
 1294|     12|    if (colon == ::std::string::npos) {
  ------------------
  |  Branch (1294:9): [True: 8, False: 4]
  ------------------
 1295|      8|      parsed.push_back(str.substr(pos));
 1296|      8|      break;
 1297|      8|    } else {
 1298|      4|      parsed.push_back(str.substr(pos, colon - pos));
 1299|      4|      pos = colon + 1;
 1300|      4|    }
 1301|     12|  }
 1302|      8|  dest->swap(parsed);
 1303|      8|}
_ZN7testing7MessageC2Ev:
 1312|    126|Message::Message() : ss_(new ::std::stringstream) {
 1313|       |  // By default, we want there to be enough precision when printing
 1314|       |  // a double to a Message.
 1315|    126|  *ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);
 1316|    126|}
_ZNK7testing7Message9GetStringEv:
 1338|    126|std::string Message::GetString() const {
 1339|    126|  return internal::StringStreamToString(ss_.get());
 1340|    126|}
_ZN7testing8internal6String28CaseInsensitiveCStringEqualsEPKcS3_:
 2183|      2|bool String::CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
 2184|      2|  if (lhs == nullptr) return rhs == nullptr;
  ------------------
  |  Branch (2184:7): [True: 0, False: 2]
  ------------------
 2185|      2|  if (rhs == nullptr) return false;
  ------------------
  |  Branch (2185:7): [True: 0, False: 2]
  ------------------
 2186|      2|  return posix::StrCaseCmp(lhs, rhs) == 0;
 2187|      2|}
_ZN7testing8internal20StringStreamToStringEPNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2268|    126|std::string StringStreamToString(::std::stringstream* ss) {
 2269|    126|  const ::std::string& str = ss->str();
 2270|    126|  const char* const start = str.c_str();
 2271|    126|  const char* const end = start + str.length();
 2272|       |
 2273|    126|  std::string result;
 2274|    126|  result.reserve(static_cast<size_t>(2 * (end - start)));
 2275|  3.14k|  for (const char* ch = start; ch != end; ++ch) {
  ------------------
  |  Branch (2275:32): [True: 3.02k, False: 126]
  ------------------
 2276|  3.02k|    if (*ch == '\0') {
  ------------------
  |  Branch (2276:9): [True: 0, False: 3.02k]
  ------------------
 2277|      0|      result += "\\0";  // Replaces NUL with "\\0";
 2278|  3.02k|    } else {
 2279|  3.02k|      result += *ch;
 2280|  3.02k|    }
 2281|  3.02k|  }
 2282|       |
 2283|    126|  return result;
 2284|    126|}
_ZN7testing10TestResultC2Ev:
 2306|      6|    : death_test_count_(0), start_timestamp_(0), elapsed_time_(0) {}
_ZN7testing10TestResult14RecordPropertyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_12TestPropertyE:
 2339|      2|                                const TestProperty& test_property) {
 2340|      2|  if (!ValidateTestProperty(xml_element, test_property)) {
  ------------------
  |  Branch (2340:7): [True: 0, False: 2]
  ------------------
 2341|      0|    return;
 2342|      0|  }
 2343|      2|  internal::MutexLock lock(&test_properties_mutex_);
 2344|      2|  const std::vector<TestProperty>::iterator property_with_matching_key =
 2345|      2|      std::find_if(test_properties_.begin(), test_properties_.end(),
 2346|      2|                   internal::TestPropertyKeyIs(test_property.key()));
 2347|      2|  if (property_with_matching_key == test_properties_.end()) {
  ------------------
  |  Branch (2347:7): [True: 2, False: 0]
  ------------------
 2348|      2|    test_properties_.push_back(test_property);
 2349|      2|    return;
 2350|      2|  }
 2351|      0|  property_with_matching_key->SetValue(test_property.value());
 2352|      0|}
_ZN7testing10TestResult20ValidateTestPropertyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_12TestPropertyE:
 2446|      2|                                      const TestProperty& test_property) {
 2447|      2|  return ValidateTestPropertyName(test_property.key(),
 2448|      2|                                  GetReservedAttributesForElement(xml_element));
 2449|      2|}
_ZN7testing10TestResult5ClearEv:
 2452|      4|void TestResult::Clear() {
 2453|      4|  test_part_results_.clear();
 2454|      4|  test_properties_.clear();
 2455|      4|  death_test_count_ = 0;
 2456|      4|  elapsed_time_ = 0;
 2457|      4|}
_ZNK7testing10TestResult7SkippedEv:
 2465|      8|bool TestResult::Skipped() const {
 2466|      8|  return !Failed() && CountIf(test_part_results_, TestPartSkipped) > 0;
  ------------------
  |  Branch (2466:10): [True: 8, False: 0]
  |  Branch (2466:23): [True: 0, False: 8]
  ------------------
 2467|      8|}
_ZNK7testing10TestResult6FailedEv:
 2470|     10|bool TestResult::Failed() const {
 2471|     10|  for (int i = 0; i < total_part_count(); ++i) {
  ------------------
  |  Branch (2471:19): [True: 0, False: 10]
  ------------------
 2472|      0|    if (GetTestPartResult(i).failed()) return true;
  ------------------
  |  Branch (2472:9): [True: 0, False: 0]
  ------------------
 2473|      0|  }
 2474|     10|  return false;
 2475|     10|}
_ZNK7testing10TestResult15HasFatalFailureEv:
 2483|      6|bool TestResult::HasFatalFailure() const {
 2484|      6|  return CountIf(test_part_results_, TestPartFatallyFailed) > 0;
 2485|      6|}
_ZNK7testing10TestResult16total_part_countEv:
 2499|     10|int TestResult::total_part_count() const {
 2500|     10|  return static_cast<int>(test_part_results_.size());
 2501|     10|}
_ZN7testing4TestC2Ev:
 2513|      2|Test::Test() : gtest_flag_saver_(new GTEST_FLAG_SAVER_) {}
  ------------------
  |  | 2308|      2|#define GTEST_FLAG_SAVER_ ::testing::internal::GTestFlagSaver
  ------------------
_ZN7testing4Test5SetUpEv:
 2523|      2|void Test::SetUp() {}
_ZN7testing4Test14RecordPropertyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
 2531|      2|void Test::RecordProperty(const std::string& key, const std::string& value) {
 2532|      2|  UnitTest::GetInstance()->RecordProperty(key, value);
 2533|      2|}
_ZN7testing4Test19HasSameFixtureClassEv:
 2556|      2|bool Test::HasSameFixtureClass() {
 2557|      2|  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
 2558|      2|  const TestSuite* const test_suite = impl->current_test_suite();
 2559|       |
 2560|       |  // Info about the first test in the current test suite.
 2561|      2|  const TestInfo* const first_test_info = test_suite->test_info_list()[0];
 2562|      2|  const internal::TypeId first_fixture_id = first_test_info->fixture_class_id_;
 2563|      2|  const char* const first_test_name = first_test_info->name();
 2564|       |
 2565|       |  // Info about the current test.
 2566|      2|  const TestInfo* const this_test_info = impl->current_test_info();
 2567|      2|  const internal::TypeId this_fixture_id = this_test_info->fixture_class_id_;
 2568|      2|  const char* const this_test_name = this_test_info->name();
 2569|       |
 2570|      2|  if (this_fixture_id != first_fixture_id) {
  ------------------
  |  Branch (2570:7): [True: 0, False: 2]
  ------------------
 2571|       |    // Is the first test defined using TEST?
 2572|      0|    const bool first_is_TEST = first_fixture_id == internal::GetTestTypeId();
 2573|       |    // Is this test defined using TEST?
 2574|      0|    const bool this_is_TEST = this_fixture_id == internal::GetTestTypeId();
 2575|       |
 2576|      0|    if (first_is_TEST || this_is_TEST) {
  ------------------
  |  Branch (2576:9): [True: 0, False: 0]
  |  Branch (2576:26): [True: 0, False: 0]
  ------------------
 2577|       |      // Both TEST and TEST_F appear in same test suite, which is incorrect.
 2578|       |      // Tell the user how to fix this.
 2579|       |
 2580|       |      // Gets the name of the TEST and the name of the TEST_F.  Note
 2581|       |      // that first_is_TEST and this_is_TEST cannot both be true, as
 2582|       |      // the fixture IDs are different for the two tests.
 2583|      0|      const char* const TEST_name =
 2584|      0|          first_is_TEST ? first_test_name : this_test_name;
  ------------------
  |  Branch (2584:11): [True: 0, False: 0]
  ------------------
 2585|      0|      const char* const TEST_F_name =
 2586|      0|          first_is_TEST ? this_test_name : first_test_name;
  ------------------
  |  Branch (2586:11): [True: 0, False: 0]
  ------------------
 2587|       |
 2588|      0|      ADD_FAILURE()
  ------------------
  |  | 1750|      0|#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
  |  |  ------------------
  |  |  |  | 1296|      0|  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1290|      0|  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1286|      0|  ::testing::internal::AssertHelper(result_type, file, line, message) = \
  |  |  |  |  |  |  |  | 1287|      0|      ::testing::Message()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2589|      0|          << "All tests in the same test suite must use the same test fixture\n"
 2590|      0|          << "class, so mixing TEST_F and TEST in the same test suite is\n"
 2591|      0|          << "illegal.  In test suite " << this_test_info->test_suite_name()
 2592|      0|          << ",\n"
 2593|      0|          << "test " << TEST_F_name << " is defined using TEST_F but\n"
 2594|      0|          << "test " << TEST_name << " is defined using TEST.  You probably\n"
 2595|      0|          << "want to change the TEST to TEST_F or move it to another test\n"
 2596|      0|          << "case.";
 2597|      0|    } else {
 2598|       |      // Two fixture classes with the same name appear in two different
 2599|       |      // namespaces, which is not allowed. Tell the user how to fix this.
 2600|      0|      ADD_FAILURE()
  ------------------
  |  | 1750|      0|#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
  |  |  ------------------
  |  |  |  | 1296|      0|  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1290|      0|  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1286|      0|  ::testing::internal::AssertHelper(result_type, file, line, message) = \
  |  |  |  |  |  |  |  | 1287|      0|      ::testing::Message()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2601|      0|          << "All tests in the same test suite must use the same test fixture\n"
 2602|      0|          << "class.  However, in test suite "
 2603|      0|          << this_test_info->test_suite_name() << ",\n"
 2604|      0|          << "you defined test " << first_test_name << " and test "
 2605|      0|          << this_test_name << "\n"
 2606|      0|          << "using two different test fixture classes.  This can happen if\n"
 2607|      0|          << "the two classes are from different namespaces or translation\n"
 2608|      0|          << "units and have the same name.  You should probably rename one\n"
 2609|      0|          << "of the classes to put the tests into different test suites.";
 2610|      0|    }
 2611|      0|    return false;
 2612|      0|  }
 2613|       |
 2614|      2|  return true;
 2615|      2|}
_ZN7testing4Test3RunEv:
 2729|      2|void Test::Run() {
 2730|      2|  if (!HasSameFixtureClass()) return;
  ------------------
  |  Branch (2730:7): [True: 0, False: 2]
  ------------------
 2731|       |
 2732|      2|  internal::UnitTestImpl* const impl = internal::GetUnitTestImpl();
 2733|      2|  impl->os_stack_trace_getter()->UponLeavingGTest();
 2734|      2|  internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()");
 2735|       |  // We will run the test only if SetUp() was successful and didn't call
 2736|       |  // GTEST_SKIP().
 2737|      2|  if (!HasFatalFailure() && !IsSkipped()) {
  ------------------
  |  Branch (2737:7): [True: 2, False: 0]
  |  Branch (2737:29): [True: 2, False: 0]
  ------------------
 2738|      2|    impl->os_stack_trace_getter()->UponLeavingGTest();
 2739|      2|    internal::HandleExceptionsInMethodIfSupported(this, &Test::TestBody,
 2740|      2|                                                  "the test body");
 2741|      2|  }
 2742|       |
 2743|       |  // However, we want to clean up as much as possible.  Hence we will
 2744|       |  // always call TearDown(), even if SetUp() or the test body has
 2745|       |  // failed.
 2746|      2|  impl->os_stack_trace_getter()->UponLeavingGTest();
 2747|      2|  internal::HandleExceptionsInMethodIfSupported(this, &Test::TearDown,
 2748|      2|                                                "TearDown()");
 2749|      2|}
_ZN7testing4Test15HasFatalFailureEv:
 2752|      6|bool Test::HasFatalFailure() {
 2753|      6|  return internal::GetUnitTestImpl()->current_test_result()->HasFatalFailure();
 2754|      6|}
_ZN7testing4Test9IsSkippedEv:
 2764|      6|bool Test::IsSkipped() {
 2765|      6|  return internal::GetUnitTestImpl()->current_test_result()->Skipped();
 2766|      6|}
_ZN7testing8TestInfoC2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_PKcS9_NS_8internal12CodeLocationEPKvPNSA_15TestFactoryBaseE:
 2777|      2|    : test_suite_name_(std::move(a_test_suite_name)),
 2778|      2|      name_(std::move(a_name)),
 2779|      2|      type_param_(a_type_param ? new std::string(a_type_param) : nullptr),
  ------------------
  |  Branch (2779:19): [True: 0, False: 2]
  ------------------
 2780|      2|      value_param_(a_value_param ? new std::string(a_value_param) : nullptr),
  ------------------
  |  Branch (2780:20): [True: 0, False: 2]
  ------------------
 2781|      2|      location_(std::move(a_code_location)),
 2782|      2|      fixture_class_id_(fixture_class_id),
 2783|      2|      should_run_(false),
 2784|      2|      is_disabled_(false),
 2785|      2|      matches_filter_(false),
 2786|      2|      is_in_another_shard_(false),
 2787|      2|      factory_(factory),
 2788|      2|      result_() {}
_ZN7testing8internal23MakeAndRegisterTestInfoENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKcS9_S9_NS0_12CodeLocationEPKvPFvvESE_PNS0_15TestFactoryBaseE:
 2817|      2|    TearDownTestSuiteFunc tear_down_tc, TestFactoryBase* factory) {
 2818|      2|  TestInfo* const test_info =
 2819|      2|      new TestInfo(std::move(test_suite_name), name, type_param, value_param,
 2820|      2|                   std::move(code_location), fixture_class_id, factory);
 2821|      2|  GetUnitTestImpl()->AddTestInfo(set_up_tc, tear_down_tc, test_info);
 2822|      2|  return test_info;
 2823|      2|}
_ZN7testing8internal12UnitTestImpl26RegisterParameterizedTestsEv:
 2846|      2|void UnitTestImpl::RegisterParameterizedTests() {
 2847|      2|  if (!parameterized_tests_registered_) {
  ------------------
  |  Branch (2847:7): [True: 2, False: 0]
  ------------------
 2848|      2|    parameterized_test_registry_.RegisterTests();
 2849|      2|    type_parameterized_test_registry_.CheckForInstantiations();
 2850|      2|    parameterized_tests_registered_ = true;
 2851|      2|  }
 2852|      2|}
_ZN7testing8TestInfo3RunEv:
 2858|      2|void TestInfo::Run() {
 2859|      2|  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
 2860|      2|  if (!should_run_) {
  ------------------
  |  Branch (2860:7): [True: 0, False: 2]
  ------------------
 2861|      0|    if (is_disabled_ && matches_filter_) repeater->OnTestDisabled(*this);
  ------------------
  |  Branch (2861:9): [True: 0, False: 0]
  |  Branch (2861:25): [True: 0, False: 0]
  ------------------
 2862|      0|    return;
 2863|      0|  }
 2864|       |
 2865|       |  // Tells UnitTest where to store test result.
 2866|      2|  UnitTest::GetInstance()->set_current_test_info(this);
 2867|       |
 2868|       |  // Notifies the unit test event listeners that a test is about to start.
 2869|      2|  repeater->OnTestStart(*this);
 2870|      2|  result_.set_start_timestamp(internal::GetTimeInMillis());
 2871|      2|  internal::Timer timer;
 2872|      2|  UnitTest::GetInstance()->UponLeavingGTest();
 2873|       |
 2874|       |  // Creates the test object.
 2875|      2|  Test* const test = internal::HandleExceptionsInMethodIfSupported(
 2876|      2|      factory_, &internal::TestFactoryBase::CreateTest,
 2877|      2|      "the test fixture's constructor");
 2878|       |
 2879|       |  // Runs the test if the constructor didn't generate a fatal failure or invoke
 2880|       |  // GTEST_SKIP().
 2881|       |  // Note that the object will not be null
 2882|      2|  if (!Test::HasFatalFailure() && !Test::IsSkipped()) {
  ------------------
  |  Branch (2882:7): [True: 2, False: 0]
  |  Branch (2882:35): [True: 2, False: 0]
  ------------------
 2883|       |    // This doesn't throw as all user code that can throw are wrapped into
 2884|       |    // exception handling code.
 2885|      2|    test->Run();
 2886|      2|  }
 2887|       |
 2888|      2|  if (test != nullptr) {
  ------------------
  |  Branch (2888:7): [True: 0, False: 2]
  ------------------
 2889|       |    // Deletes the test object.
 2890|      0|    UnitTest::GetInstance()->UponLeavingGTest();
 2891|      0|    internal::HandleExceptionsInMethodIfSupported(
 2892|      0|        test, &Test::DeleteSelf_, "the test fixture's destructor");
 2893|      0|  }
 2894|       |
 2895|      2|  result_.set_elapsed_time(timer.Elapsed());
 2896|       |
 2897|       |  // Notifies the unit test event listener that a test has just finished.
 2898|      2|  repeater->OnTestEnd(*this);
 2899|       |
 2900|       |  // Tells UnitTest to stop associating assertion results to this
 2901|       |  // test.
 2902|      2|  UnitTest::GetInstance()->set_current_test_info(nullptr);
 2903|      2|}
_ZNK7testing9TestSuite17test_to_run_countEv:
 2960|      4|int TestSuite::test_to_run_count() const {
 2961|      4|  return CountIf(test_info_list_, ShouldRunTest);
 2962|      4|}
_ZNK7testing9TestSuite16total_test_countEv:
 2965|      8|int TestSuite::total_test_count() const {
 2966|      8|  return static_cast<int>(test_info_list_.size());
 2967|      8|}
_ZN7testing9TestSuiteC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKcPFvvESD_:
 2981|      2|    : name_(a_name),
 2982|      2|      type_param_(a_type_param ? new std::string(a_type_param) : nullptr),
  ------------------
  |  Branch (2982:19): [True: 0, False: 2]
  ------------------
 2983|      2|      set_up_tc_(set_up_tc),
 2984|      2|      tear_down_tc_(tear_down_tc),
 2985|      2|      should_run_(false),
 2986|      2|      start_timestamp_(0),
 2987|      2|      elapsed_time_(0) {}
_ZNK7testing9TestSuite11GetTestInfoEi:
 2997|      2|const TestInfo* TestSuite::GetTestInfo(int i) const {
 2998|      2|  const int index = GetElementOr(test_indices_, i, -1);
 2999|      2|  return index < 0 ? nullptr : test_info_list_[static_cast<size_t>(index)];
  ------------------
  |  Branch (2999:10): [True: 0, False: 2]
  ------------------
 3000|      2|}
_ZN7testing9TestSuite18GetMutableTestInfoEi:
 3004|      2|TestInfo* TestSuite::GetMutableTestInfo(int i) {
 3005|      2|  const int index = GetElementOr(test_indices_, i, -1);
 3006|      2|  return index < 0 ? nullptr : test_info_list_[static_cast<size_t>(index)];
  ------------------
  |  Branch (3006:10): [True: 0, False: 2]
  ------------------
 3007|      2|}
_ZN7testing9TestSuite11AddTestInfoEPNS_8TestInfoE:
 3011|      2|void TestSuite::AddTestInfo(TestInfo* test_info) {
 3012|      2|  test_info_list_.push_back(test_info);
 3013|      2|  test_indices_.push_back(static_cast<int>(test_indices_.size()));
 3014|      2|}
_ZN7testing9TestSuite3RunEv:
 3017|      2|void TestSuite::Run() {
 3018|      2|  if (!should_run_) return;
  ------------------
  |  Branch (3018:7): [True: 0, False: 2]
  ------------------
 3019|       |
 3020|      2|  UnitTest::GetInstance()->set_current_test_suite(this);
 3021|       |
 3022|      2|  TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
 3023|       |
 3024|       |  // Ensure our tests are in a deterministic order.
 3025|       |  //
 3026|       |  // We do this by sorting lexicographically on (file, line number), providing
 3027|       |  // an order matching what the user can see in the source code.
 3028|       |  //
 3029|       |  // In the common case the line number comparison shouldn't be necessary,
 3030|       |  // because the registrations made by the TEST macro are executed in order
 3031|       |  // within a translation unit. But this is not true of the manual registration
 3032|       |  // API, and in more exotic scenarios a single file may be part of multiple
 3033|       |  // translation units.
 3034|      2|  std::stable_sort(test_info_list_.begin(), test_info_list_.end(),
 3035|      2|                   [](const TestInfo* const a, const TestInfo* const b) {
 3036|      2|                     if (const int result = std::strcmp(a->file(), b->file())) {
 3037|      2|                       return result < 0;
 3038|      2|                     }
 3039|       |
 3040|      2|                     return a->line() < b->line();
 3041|      2|                   });
 3042|       |
 3043|       |  // Call both legacy and the new API
 3044|      2|  repeater->OnTestSuiteStart(*this);
 3045|       |//  Legacy API is deprecated but still available
 3046|      2|#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 3047|      2|  repeater->OnTestCaseStart(*this);
 3048|      2|#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 3049|       |
 3050|      2|  UnitTest::GetInstance()->UponLeavingGTest();
 3051|      2|  internal::HandleExceptionsInMethodIfSupported(
 3052|      2|      this, &TestSuite::RunSetUpTestSuite, "SetUpTestSuite()");
 3053|       |
 3054|      2|  const bool skip_all =
 3055|      2|      ad_hoc_test_result().Failed() || ad_hoc_test_result().Skipped();
  ------------------
  |  Branch (3055:7): [True: 0, False: 2]
  |  Branch (3055:40): [True: 0, False: 2]
  ------------------
 3056|       |
 3057|      2|  start_timestamp_ = internal::GetTimeInMillis();
 3058|      2|  internal::Timer timer;
 3059|      4|  for (int i = 0; i < total_test_count(); i++) {
  ------------------
  |  Branch (3059:19): [True: 2, False: 2]
  ------------------
 3060|      2|    if (skip_all) {
  ------------------
  |  Branch (3060:9): [True: 0, False: 2]
  ------------------
 3061|      0|      GetMutableTestInfo(i)->Skip();
 3062|      2|    } else {
 3063|      2|      GetMutableTestInfo(i)->Run();
 3064|      2|    }
 3065|      2|    if (GTEST_FLAG_GET(fail_fast) &&
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3066|      0|        GetMutableTestInfo(i)->result()->Failed()) {
  ------------------
  |  Branch (3066:9): [True: 0, False: 0]
  ------------------
 3067|      0|      for (int j = i + 1; j < total_test_count(); j++) {
  ------------------
  |  Branch (3067:27): [True: 0, False: 0]
  ------------------
 3068|      0|        GetMutableTestInfo(j)->Skip();
 3069|      0|      }
 3070|      0|      break;
 3071|      0|    }
 3072|      2|  }
 3073|      2|  elapsed_time_ = timer.Elapsed();
 3074|       |
 3075|      2|  UnitTest::GetInstance()->UponLeavingGTest();
 3076|      2|  internal::HandleExceptionsInMethodIfSupported(
 3077|      2|      this, &TestSuite::RunTearDownTestSuite, "TearDownTestSuite()");
 3078|       |
 3079|       |  // Call both legacy and the new API
 3080|      2|  repeater->OnTestSuiteEnd(*this);
 3081|       |//  Legacy API is deprecated but still available
 3082|      2|#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 3083|      2|  repeater->OnTestCaseEnd(*this);
 3084|      2|#endif  //  GTEST_REMOVE_LEGACY_TEST_CASEAPI_
 3085|       |
 3086|      2|  UnitTest::GetInstance()->set_current_test_suite(nullptr);
 3087|      2|}
_ZN7testing9TestSuite11ClearResultEv:
 3119|      2|void TestSuite::ClearResult() {
 3120|      2|  ad_hoc_test_result_.Clear();
 3121|      2|  ForEach(test_info_list_, TestInfo::ClearTestResult);
 3122|      2|}
_ZN7testing8internal14ShouldUseColorEb:
 3286|      2|bool ShouldUseColor(bool stdout_is_tty) {
 3287|      2|  std::string c = GTEST_FLAG_GET(color);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 3288|      2|  const char* const gtest_color = c.c_str();
 3289|       |
 3290|      2|  if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
  ------------------
  |  Branch (3290:7): [True: 2, False: 0]
  ------------------
 3291|       |#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
 3292|       |    // On Windows the TERM variable is usually not set, but the
 3293|       |    // console there does support colors.
 3294|       |    return stdout_is_tty;
 3295|       |#else
 3296|       |    // On non-Windows platforms, we rely on the TERM variable.
 3297|      2|    const char* const term = posix::GetEnv("TERM");
 3298|      2|    const bool term_supports_color =
 3299|      2|        term != nullptr && (String::CStringEquals(term, "xterm") ||
  ------------------
  |  Branch (3299:9): [True: 0, False: 2]
  |  Branch (3299:29): [True: 0, False: 0]
  ------------------
 3300|      0|                            String::CStringEquals(term, "xterm-color") ||
  ------------------
  |  Branch (3300:29): [True: 0, False: 0]
  ------------------
 3301|      0|                            String::CStringEquals(term, "xterm-kitty") ||
  ------------------
  |  Branch (3301:29): [True: 0, False: 0]
  ------------------
 3302|      0|                            String::CStringEquals(term, "alacritty") ||
  ------------------
  |  Branch (3302:29): [True: 0, False: 0]
  ------------------
 3303|      0|                            String::CStringEquals(term, "screen") ||
  ------------------
  |  Branch (3303:29): [True: 0, False: 0]
  ------------------
 3304|      0|                            String::CStringEquals(term, "tmux") ||
  ------------------
  |  Branch (3304:29): [True: 0, False: 0]
  ------------------
 3305|      0|                            String::CStringEquals(term, "rxvt-unicode") ||
  ------------------
  |  Branch (3305:29): [True: 0, False: 0]
  ------------------
 3306|      0|                            String::CStringEquals(term, "linux") ||
  ------------------
  |  Branch (3306:29): [True: 0, False: 0]
  ------------------
 3307|      0|                            String::CStringEquals(term, "cygwin") ||
  ------------------
  |  Branch (3307:29): [True: 0, False: 0]
  ------------------
 3308|      0|                            String::EndsWithCaseInsensitive(term, "-256color"));
  ------------------
  |  Branch (3308:29): [True: 0, False: 0]
  ------------------
 3309|      2|    return stdout_is_tty && term_supports_color;
  ------------------
  |  Branch (3309:12): [True: 0, False: 2]
  |  Branch (3309:29): [True: 0, False: 0]
  ------------------
 3310|      2|#endif  // GTEST_OS_WINDOWS
 3311|      2|  }
 3312|       |
 3313|      0|  return String::CaseInsensitiveCStringEquals(gtest_color, "yes") ||
  ------------------
  |  Branch (3313:10): [True: 0, False: 0]
  ------------------
 3314|      0|         String::CaseInsensitiveCStringEquals(gtest_color, "true") ||
  ------------------
  |  Branch (3314:10): [True: 0, False: 0]
  ------------------
 3315|      0|         String::CaseInsensitiveCStringEquals(gtest_color, "t") ||
  ------------------
  |  Branch (3315:10): [True: 0, False: 0]
  ------------------
 3316|      0|         String::CStringEquals(gtest_color, "1");
  ------------------
  |  Branch (3316:10): [True: 0, False: 0]
  ------------------
 3317|       |  // We take "yes", "true", "t", and "1" as meaning "yes".  If the
 3318|       |  // value is neither one of these nor "auto", we treat it as "no" to
 3319|       |  // be conservative.
 3320|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter20OnTestIterationStartERKNS_8UnitTestEi:
 3441|      2|    const UnitTest& unit_test, int iteration) {
 3442|      2|  if (GTEST_FLAG_GET(repeat) != 1)
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  |  Branch (3442:7): [True: 0, False: 2]
  ------------------
 3443|      0|    printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
 3444|       |
 3445|      2|  std::string f = GTEST_FLAG_GET(filter);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 3446|      2|  const char* const filter = f.c_str();
 3447|       |
 3448|       |  // Prints the filter if it's not *.  This reminds the user that some
 3449|       |  // tests may be skipped.
 3450|      2|  if (!String::CStringEquals(filter, kUniversalFilter)) {
  ------------------
  |  Branch (3450:7): [True: 2, False: 0]
  ------------------
 3451|      2|    ColoredPrintf(GTestColor::kYellow, "Note: %s filter = %s\n", GTEST_NAME_,
  ------------------
  |  |  349|      2|#define GTEST_NAME_ "Google Test"
  ------------------
 3452|      2|                  filter);
 3453|      2|  }
 3454|       |
 3455|      2|  if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
  ------------------
  |  Branch (3455:7): [True: 0, False: 2]
  ------------------
 3456|      0|    const int32_t shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
 3457|      0|    ColoredPrintf(GTestColor::kYellow, "Note: This is test shard %d of %s.\n",
 3458|      0|                  static_cast<int>(shard_index) + 1,
 3459|      0|                  internal::posix::GetEnv(kTestTotalShards));
 3460|      0|  }
 3461|       |
 3462|      2|  if (GTEST_FLAG_GET(shuffle)) {
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 3463|      0|    ColoredPrintf(GTestColor::kYellow,
 3464|      0|                  "Note: Randomizing tests' orders with a seed of %d .\n",
 3465|      0|                  unit_test.random_seed());
 3466|      0|  }
 3467|       |
 3468|      2|  ColoredPrintf(GTestColor::kGreen, "[==========] ");
 3469|      2|  printf("Running %s from %s.\n",
 3470|      2|         FormatTestCount(unit_test.test_to_run_count()).c_str(),
 3471|      2|         FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());
 3472|       |  fflush(stdout);
 3473|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter24OnEnvironmentsSetUpStartERKNS_8UnitTestE:
 3476|      2|    const UnitTest& /*unit_test*/) {
 3477|      2|  ColoredPrintf(GTestColor::kGreen, "[----------] ");
 3478|      2|  printf("Global test environment set-up.\n");
 3479|       |  fflush(stdout);
 3480|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter15OnTestCaseStartERKNS_9TestSuiteE:
 3483|      2|void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
 3484|      2|  const std::string counts =
 3485|      2|      FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
 3486|      2|  ColoredPrintf(GTestColor::kGreen, "[----------] ");
 3487|      2|  printf("%s from %s", counts.c_str(), test_case.name());
 3488|      2|  if (test_case.type_param() == nullptr) {
  ------------------
  |  Branch (3488:7): [True: 2, False: 0]
  ------------------
 3489|      2|    printf("\n");
 3490|      2|  } else {
 3491|      0|    printf(", where %s = %s\n", kTypeParamLabel, test_case.type_param());
 3492|      0|  }
 3493|       |  fflush(stdout);
 3494|      2|}
_ZN7testing8internal27PrettyUnitTestResultPrinter11OnTestStartERKNS_8TestInfoE:
 3511|      2|void PrettyUnitTestResultPrinter::OnTestStart(const TestInfo& test_info) {
 3512|      2|  ColoredPrintf(GTestColor::kGreen, "[ RUN      ] ");
 3513|      2|  PrintTestName(test_info.test_suite_name(), test_info.name());
 3514|      2|  printf("\n");
 3515|       |  fflush(stdout);
 3516|      2|}
_ZN7testing8internal17TestEventRepeater6AppendEPNS_17TestEventListenerE:
 3862|      6|void TestEventRepeater::Append(TestEventListener* listener) {
 3863|      6|  listeners_.push_back(listener);
 3864|      6|}
_ZN7testing8internal17TestEventRepeater7ReleaseEPNS_17TestEventListenerE:
 3866|      2|TestEventListener* TestEventRepeater::Release(TestEventListener* listener) {
 3867|      2|  for (size_t i = 0; i < listeners_.size(); ++i) {
  ------------------
  |  Branch (3867:22): [True: 0, False: 2]
  ------------------
 3868|      0|    if (listeners_[i] == listener) {
  ------------------
  |  Branch (3868:9): [True: 0, False: 0]
  ------------------
 3869|      0|      listeners_.erase(listeners_.begin() + static_cast<int>(i));
 3870|      0|      return listener;
 3871|      0|    }
 3872|      0|  }
 3873|       |
 3874|      2|  return nullptr;
 3875|      2|}
_ZN7testing8internal17TestEventRepeater18OnTestProgramStartERKNS_8UnitTestE:
 3880|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3881|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3881:9): [True: 2, False: 0]
  ------------------
 3882|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3882:26): [True: 6, False: 2]
  ------------------
 3883|      6|        listeners_[i]->Name(parameter);                 \
 3884|      6|      }                                                 \
 3885|      2|    }                                                   \
 3886|      2|  }
_ZN7testing8internal17TestEventRepeater24OnEnvironmentsSetUpStartERKNS_8UnitTestE:
 3880|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3881|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3881:9): [True: 2, False: 0]
  ------------------
 3882|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3882:26): [True: 6, False: 2]
  ------------------
 3883|      6|        listeners_[i]->Name(parameter);                 \
 3884|      6|      }                                                 \
 3885|      2|    }                                                   \
 3886|      2|  }
_ZN7testing8internal17TestEventRepeater15OnTestCaseStartERKNS_9TestSuiteE:
 3880|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3881|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3881:9): [True: 2, False: 0]
  ------------------
 3882|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3882:26): [True: 6, False: 2]
  ------------------
 3883|      6|        listeners_[i]->Name(parameter);                 \
 3884|      6|      }                                                 \
 3885|      2|    }                                                   \
 3886|      2|  }
_ZN7testing8internal17TestEventRepeater16OnTestSuiteStartERKNS_9TestSuiteE:
 3880|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3881|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3881:9): [True: 2, False: 0]
  ------------------
 3882|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3882:26): [True: 6, False: 2]
  ------------------
 3883|      6|        listeners_[i]->Name(parameter);                 \
 3884|      6|      }                                                 \
 3885|      2|    }                                                   \
 3886|      2|  }
_ZN7testing8internal17TestEventRepeater11OnTestStartERKNS_8TestInfoE:
 3880|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3881|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3881:9): [True: 2, False: 0]
  ------------------
 3882|      8|      for (size_t i = 0; i < listeners_.size(); i++) {  \
  ------------------
  |  Branch (3882:26): [True: 6, False: 2]
  ------------------
 3883|      6|        listeners_[i]->Name(parameter);                 \
 3884|      6|      }                                                 \
 3885|      2|    }                                                   \
 3886|      2|  }
_ZN7testing8internal17TestEventRepeater22OnEnvironmentsSetUpEndERKNS_8UnitTestE:
 3890|      2|  void TestEventRepeater::Name(const Type& parameter) { \
 3891|      2|    if (forwarding_enabled_) {                          \
  ------------------
  |  Branch (3891:9): [True: 2, False: 0]
  ------------------
 3892|      8|      for (size_t i = listeners_.size(); i != 0; i--) { \
  ------------------
  |  Branch (3892:42): [True: 6, False: 2]
  ------------------
 3893|      6|        listeners_[i - 1]->Name(parameter);             \
 3894|      6|      }                                                 \
 3895|      2|    }                                                   \
 3896|      2|  }
_ZN7testing8internal17TestEventRepeater20OnTestIterationStartERKNS_8UnitTestEi:
 3923|      2|                                             int iteration) {
 3924|      2|  if (forwarding_enabled_) {
  ------------------
  |  Branch (3924:7): [True: 2, False: 0]
  ------------------
 3925|      8|    for (size_t i = 0; i < listeners_.size(); i++) {
  ------------------
  |  Branch (3925:24): [True: 6, False: 2]
  ------------------
 3926|      6|      listeners_[i]->OnTestIterationStart(unit_test, iteration);
 3927|      6|    }
 3928|      2|  }
 3929|      2|}
_ZN7testing8internal18OsStackTraceGetter16UponLeavingGTestEv:
 5115|      8|void OsStackTraceGetter::UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_) {
 5116|       |#ifdef GTEST_HAS_ABSL
 5117|       |  void* caller_frame = nullptr;
 5118|       |  if (absl::GetStackTrace(&caller_frame, 1, 3) <= 0) {
 5119|       |    caller_frame = nullptr;
 5120|       |  }
 5121|       |
 5122|       |  MutexLock lock(&mutex_);
 5123|       |  caller_frame_ = caller_frame;
 5124|       |#endif  // GTEST_HAS_ABSL
 5125|      8|}
_ZN7testing18TestEventListenersC2Ev:
 5172|      2|    : repeater_(new internal::TestEventRepeater()),
 5173|      2|      default_result_printer_(nullptr),
 5174|      2|      default_xml_generator_(nullptr) {}
_ZN7testing18TestEventListeners6AppendEPNS_17TestEventListenerE:
 5182|      6|void TestEventListeners::Append(TestEventListener* listener) {
 5183|      6|  repeater_->Append(listener);
 5184|      6|}
_ZN7testing18TestEventListeners7ReleaseEPNS_17TestEventListenerE:
 5189|      2|TestEventListener* TestEventListeners::Release(TestEventListener* listener) {
 5190|      2|  if (listener == default_result_printer_)
  ------------------
  |  Branch (5190:7): [True: 2, False: 0]
  ------------------
 5191|      2|    default_result_printer_ = nullptr;
 5192|      0|  else if (listener == default_xml_generator_)
  ------------------
  |  Branch (5192:12): [True: 0, False: 0]
  ------------------
 5193|      0|    default_xml_generator_ = nullptr;
 5194|      2|  return repeater_->Release(listener);
 5195|      2|}
_ZN7testing18TestEventListeners8repeaterEv:
 5199|      6|TestEventListener* TestEventListeners::repeater() { return repeater_; }
_ZN7testing18TestEventListeners23SetDefaultResultPrinterEPNS_17TestEventListenerE:
 5206|      2|void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) {
 5207|      2|  if (default_result_printer_ != listener) {
  ------------------
  |  Branch (5207:7): [True: 2, False: 0]
  ------------------
 5208|       |    // It is an error to pass this method a listener that is already in the
 5209|       |    // list.
 5210|      2|    delete Release(default_result_printer_);
 5211|      2|    default_result_printer_ = listener;
 5212|      2|    if (listener != nullptr) Append(listener);
  ------------------
  |  Branch (5212:9): [True: 2, False: 0]
  ------------------
 5213|      2|  }
 5214|      2|}
_ZN7testing8UnitTest11GetInstanceEv:
 5250|     54|UnitTest* UnitTest::GetInstance() {
 5251|       |  // CodeGear C++Builder insists on a public destructor for the
 5252|       |  // default implementation.  Use this implementation to keep good OO
 5253|       |  // design with private destructor.
 5254|       |
 5255|       |#if defined(__BORLANDC__)
 5256|       |  static UnitTest* const instance = new UnitTest;
 5257|       |  return instance;
 5258|       |#else
 5259|     54|  static UnitTest instance;
 5260|     54|  return &instance;
 5261|     54|#endif  // defined(__BORLANDC__)
 5262|     54|}
_ZNK7testing8UnitTest22total_test_suite_countEv:
 5275|      4|int UnitTest::total_test_suite_count() const {
 5276|      4|  return impl()->total_test_suite_count();
 5277|      4|}
_ZNK7testing8UnitTest23test_suite_to_run_countEv:
 5281|      2|int UnitTest::test_suite_to_run_count() const {
 5282|      2|  return impl()->test_suite_to_run_count();
 5283|      2|}
_ZNK7testing8UnitTest17test_to_run_countEv:
 5333|      2|int UnitTest::test_to_run_count() const { return impl()->test_to_run_count(); }
_ZNK7testing8UnitTest12GetTestSuiteEi:
 5356|      6|const TestSuite* UnitTest::GetTestSuite(int i) const {
 5357|      6|  return impl()->GetTestSuite(i);
 5358|      6|}
_ZN7testing8UnitTest16UponLeavingGTestEv:
 5379|      4|void UnitTest::UponLeavingGTest() {
 5380|      4|  impl()->os_stack_trace_getter()->UponLeavingGTest();
 5381|      4|}
_ZN7testing8UnitTest22set_current_test_suiteEPNS_9TestSuiteE:
 5384|      2|void UnitTest::set_current_test_suite(TestSuite* a_current_test_suite) {
 5385|      2|  internal::MutexLock lock(&mutex_);
 5386|      2|  impl_->set_current_test_suite(a_current_test_suite);
 5387|      2|}
_ZN7testing8UnitTest21set_current_test_infoEPNS_8TestInfoE:
 5390|      2|void UnitTest::set_current_test_info(TestInfo* a_current_test_info) {
 5391|      2|  internal::MutexLock lock(&mutex_);
 5392|      2|  impl_->set_current_test_info(a_current_test_info);
 5393|      2|}
_ZN7testing8UnitTest9listenersEv:
 5397|      8|TestEventListeners& UnitTest::listeners() { return *impl()->listeners(); }
_ZN7testing8UnitTest14RecordPropertyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
 5500|      2|                              const std::string& value) {
 5501|      2|  impl_->RecordProperty(TestProperty(key, value));
 5502|      2|}
_ZN7testing8UnitTest3RunEv:
 5509|      2|int UnitTest::Run() {
 5510|      2|#ifdef GTEST_HAS_DEATH_TEST
 5511|      2|  const bool in_death_test_child_process =
 5512|      2|      !GTEST_FLAG_GET(internal_run_death_test).empty();
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5513|       |
 5514|       |  // Google Test implements this protocol for catching that a test
 5515|       |  // program exits before returning control to Google Test:
 5516|       |  //
 5517|       |  //   1. Upon start, Google Test creates a file whose absolute path
 5518|       |  //      is specified by the environment variable
 5519|       |  //      TEST_PREMATURE_EXIT_FILE.
 5520|       |  //   2. When Google Test has finished its work, it deletes the file.
 5521|       |  //
 5522|       |  // This allows a test runner to set TEST_PREMATURE_EXIT_FILE before
 5523|       |  // running a Google-Test-based test program and check the existence
 5524|       |  // of the file at the end of the test execution to see if it has
 5525|       |  // exited prematurely.
 5526|       |
 5527|       |  // If we are in the child process of a death test, don't
 5528|       |  // create/delete the premature exit file, as doing so is unnecessary
 5529|       |  // and will confuse the parent process.  Otherwise, create/delete
 5530|       |  // the file upon entering/leaving this function.  If the program
 5531|       |  // somehow exits before this function has a chance to return, the
 5532|       |  // premature-exit file will be left undeleted, causing a test runner
 5533|       |  // that understands the premature-exit-file protocol to report the
 5534|       |  // test as having failed.
 5535|      2|  const internal::ScopedPrematureExitFile premature_exit_file(
 5536|      2|      in_death_test_child_process
  ------------------
  |  Branch (5536:7): [True: 0, False: 2]
  ------------------
 5537|      2|          ? nullptr
 5538|      2|          : internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE"));
 5539|       |#else
 5540|       |  const bool in_death_test_child_process = false;
 5541|       |#endif  // GTEST_HAS_DEATH_TEST
 5542|       |
 5543|       |  // Captures the value of GTEST_FLAG(catch_exceptions).  This value will be
 5544|       |  // used for the duration of the program.
 5545|      2|  impl()->set_catch_exceptions(GTEST_FLAG_GET(catch_exceptions));
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5546|       |
 5547|       |#ifdef GTEST_OS_WINDOWS
 5548|       |  // Either the user wants Google Test to catch exceptions thrown by the
 5549|       |  // tests or this is executing in the context of death test child
 5550|       |  // process. In either case the user does not want to see pop-up dialogs
 5551|       |  // about crashes - they are expected.
 5552|       |  if (impl()->catch_exceptions() || in_death_test_child_process) {
 5553|       |#if !defined(GTEST_OS_WINDOWS_MOBILE) && !defined(GTEST_OS_WINDOWS_PHONE) && \
 5554|       |    !defined(GTEST_OS_WINDOWS_RT) && !defined(GTEST_OS_WINDOWS_GAMES)
 5555|       |    // SetErrorMode doesn't exist on CE.
 5556|       |    SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |
 5557|       |                 SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
 5558|       |#endif  // !GTEST_OS_WINDOWS_MOBILE
 5559|       |
 5560|       |#if (defined(_MSC_VER) || defined(GTEST_OS_WINDOWS_MINGW)) && \
 5561|       |    !defined(GTEST_OS_WINDOWS_MOBILE)
 5562|       |    // Death test children can be terminated with _abort().  On Windows,
 5563|       |    // _abort() can show a dialog with a warning message.  This forces the
 5564|       |    // abort message to go to stderr instead.
 5565|       |    _set_error_mode(_OUT_TO_STDERR);
 5566|       |#endif
 5567|       |
 5568|       |#if defined(_MSC_VER) && !defined(GTEST_OS_WINDOWS_MOBILE)
 5569|       |    // In the debug version, Visual Studio pops up a separate dialog
 5570|       |    // offering a choice to debug the aborted program. We need to suppress
 5571|       |    // this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement
 5572|       |    // executed. Google Test will notify the user of any unexpected
 5573|       |    // failure via stderr.
 5574|       |    if (!GTEST_FLAG_GET(break_on_failure))
 5575|       |      _set_abort_behavior(
 5576|       |          0x0,                                    // Clear the following flags:
 5577|       |          _WRITE_ABORT_MSG | _CALL_REPORTFAULT);  // pop-up window, core dump.
 5578|       |
 5579|       |    // In debug mode, the Windows CRT can crash with an assertion over invalid
 5580|       |    // input (e.g. passing an invalid file descriptor).  The default handling
 5581|       |    // for these assertions is to pop up a dialog and wait for user input.
 5582|       |    // Instead ask the CRT to dump such assertions to stderr non-interactively.
 5583|       |    if (!IsDebuggerPresent()) {
 5584|       |      (void)_CrtSetReportMode(_CRT_ASSERT,
 5585|       |                              _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
 5586|       |      (void)_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
 5587|       |    }
 5588|       |#endif
 5589|       |  }
 5590|       |#else
 5591|      2|  (void)in_death_test_child_process;  // Needed inside the #if block above
 5592|      2|#endif  // GTEST_OS_WINDOWS
 5593|       |
 5594|      2|  return internal::HandleExceptionsInMethodIfSupported(
  ------------------
  |  Branch (5594:10): [True: 0, False: 2]
  ------------------
 5595|      2|             impl(), &internal::UnitTestImpl::RunAllTests,
 5596|      2|             "auxiliary test code (environments or event listeners)")
 5597|      2|             ? 0
 5598|      2|             : 1;
 5599|      2|}
_ZN7testing8UnitTest27parameterized_test_registryEv:
 5640|      2|UnitTest::parameterized_test_registry() GTEST_LOCK_EXCLUDED_(mutex_) {
 5641|      2|  return impl_->parameterized_test_registry();
 5642|      2|}
_ZN7testing8UnitTestC2Ev:
 5645|      2|UnitTest::UnitTest() { impl_ = new internal::UnitTestImpl(this); }
_ZN7testing8internal12UnitTestImplC2EPNS_8UnitTestE:
 5667|      2|    : parent_(parent),
 5668|       |      GTEST_DISABLE_MSC_WARNINGS_PUSH_(4355 /* using this in initializer */)
 5669|      2|          default_global_test_part_result_reporter_(this),
 5670|      2|      default_per_thread_test_part_result_reporter_(this),
 5671|       |      GTEST_DISABLE_MSC_WARNINGS_POP_() global_test_part_result_reporter_(
 5672|      2|          &default_global_test_part_result_reporter_),
 5673|      2|      per_thread_test_part_result_reporter_(
 5674|      2|          &default_per_thread_test_part_result_reporter_),
 5675|      2|      parameterized_test_registry_(),
 5676|      2|      parameterized_tests_registered_(false),
 5677|      2|      last_death_test_suite_(-1),
 5678|      2|      current_test_suite_(nullptr),
 5679|      2|      current_test_info_(nullptr),
 5680|      2|      ad_hoc_test_result_(),
 5681|      2|      os_stack_trace_getter_(nullptr),
 5682|      2|      post_flag_parse_init_performed_(false),
 5683|      2|      random_seed_(0),  // Will be overridden by the flag before first use.
 5684|      2|      random_(0),       // Will be reseeded before first use.
 5685|      2|      start_timestamp_(0),
 5686|      2|      elapsed_time_(0),
 5687|       |#ifdef GTEST_HAS_DEATH_TEST
 5688|      2|      death_test_factory_(new DefaultDeathTestFactory),
 5689|       |#endif
 5690|       |      // Will be overridden by the flag before first use.
 5691|      2|      catch_exceptions_(false) {
 5692|      2|  listeners()->SetDefaultResultPrinter(new PrettyUnitTestResultPrinter);
 5693|      2|}
_ZN7testing8internal12UnitTestImpl14RecordPropertyERKNS_12TestPropertyE:
 5710|      2|void UnitTestImpl::RecordProperty(const TestProperty& test_property) {
 5711|      2|  std::string xml_element;
 5712|      2|  TestResult* test_result;  // TestResult appropriate for property recording.
 5713|       |
 5714|      2|  if (current_test_info_ != nullptr) {
  ------------------
  |  Branch (5714:7): [True: 2, False: 0]
  ------------------
 5715|      2|    xml_element = "testcase";
 5716|      2|    test_result = &(current_test_info_->result_);
 5717|      2|  } else if (current_test_suite_ != nullptr) {
  ------------------
  |  Branch (5717:14): [True: 0, False: 0]
  ------------------
 5718|      0|    xml_element = "testsuite";
 5719|      0|    test_result = &(current_test_suite_->ad_hoc_test_result_);
 5720|      0|  } else {
 5721|      0|    xml_element = "testsuites";
 5722|      0|    test_result = &ad_hoc_test_result_;
 5723|      0|  }
 5724|      2|  test_result->RecordProperty(xml_element, test_property);
 5725|      2|}
_ZN7testing8internal12UnitTestImpl32SuppressTestEventsIfInSubprocessEv:
 5730|      2|void UnitTestImpl::SuppressTestEventsIfInSubprocess() {
 5731|      2|  if (internal_run_death_test_flag_ != nullptr)
  ------------------
  |  Branch (5731:7): [True: 0, False: 2]
  ------------------
 5732|      0|    listeners()->SuppressEventForwarding(true);
 5733|      2|}
_ZN7testing8internal12UnitTestImpl18ConfigureXmlOutputEv:
 5738|      2|void UnitTestImpl::ConfigureXmlOutput() {
 5739|      2|  const std::string& output_format = UnitTestOptions::GetOutputFormat();
 5740|      2|#if GTEST_HAS_FILE_SYSTEM
 5741|      2|  if (output_format == "xml") {
  ------------------
  |  Branch (5741:7): [True: 0, False: 2]
  ------------------
 5742|      0|    listeners()->SetDefaultXmlGenerator(new XmlUnitTestResultPrinter(
 5743|      0|        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
 5744|      2|  } else if (output_format == "json") {
  ------------------
  |  Branch (5744:14): [True: 0, False: 2]
  ------------------
 5745|      0|    listeners()->SetDefaultXmlGenerator(new JsonUnitTestResultPrinter(
 5746|      0|        UnitTestOptions::GetAbsolutePathToOutputFile().c_str()));
 5747|      2|  } else if (!output_format.empty()) {
  ------------------
  |  Branch (5747:14): [True: 0, False: 2]
  ------------------
 5748|      0|    GTEST_LOG_(WARNING) << "WARNING: unrecognized output format \""
  ------------------
  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  | 1064|      0|      .GetStream()
  ------------------
 5749|      0|                        << output_format << "\" ignored.";
 5750|      0|  }
 5751|       |#else
 5752|       |  if (!output_format.empty()) {
 5753|       |    GTEST_LOG_(ERROR) << "ERROR: alternative output formats require "
 5754|       |                      << "GTEST_HAS_FILE_SYSTEM to be enabled";
 5755|       |  }
 5756|       |#endif  // GTEST_HAS_FILE_SYSTEM
 5757|      2|}
_ZN7testing8internal12UnitTestImpl24ConfigureStreamingOutputEv:
 5762|      2|void UnitTestImpl::ConfigureStreamingOutput() {
 5763|      2|  const std::string& target = GTEST_FLAG_GET(stream_result_to);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5764|      2|  if (!target.empty()) {
  ------------------
  |  Branch (5764:7): [True: 0, False: 2]
  ------------------
 5765|      0|    const size_t pos = target.find(':');
 5766|      0|    if (pos != std::string::npos) {
  ------------------
  |  Branch (5766:9): [True: 0, False: 0]
  ------------------
 5767|      0|      listeners()->Append(
 5768|      0|          new StreamingListener(target.substr(0, pos), target.substr(pos + 1)));
 5769|      0|    } else {
 5770|      0|      GTEST_LOG_(WARNING) << "unrecognized streaming target \"" << target
  ------------------
  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  | 1064|      0|      .GetStream()
  ------------------
 5771|      0|                          << "\" ignored.";
 5772|      0|    }
 5773|      0|  }
 5774|      2|}
_ZN7testing8internal12UnitTestImpl19PostFlagParsingInitEv:
 5782|      4|void UnitTestImpl::PostFlagParsingInit() {
 5783|       |  // Ensures that this function does not execute more than once.
 5784|      4|  if (!post_flag_parse_init_performed_) {
  ------------------
  |  Branch (5784:7): [True: 2, False: 2]
  ------------------
 5785|      2|    post_flag_parse_init_performed_ = true;
 5786|       |
 5787|       |#if defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
 5788|       |    // Register to send notifications about key process state changes.
 5789|       |    listeners()->Append(new GTEST_CUSTOM_TEST_EVENT_LISTENER_());
 5790|       |#endif  // defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_)
 5791|       |
 5792|      2|#ifdef GTEST_HAS_DEATH_TEST
 5793|      2|    InitDeathTestSubprocessControlInfo();
 5794|      2|    SuppressTestEventsIfInSubprocess();
 5795|      2|#endif  // GTEST_HAS_DEATH_TEST
 5796|       |
 5797|       |    // Registers parameterized tests. This makes parameterized tests
 5798|       |    // available to the UnitTest reflection API without running
 5799|       |    // RUN_ALL_TESTS.
 5800|      2|    RegisterParameterizedTests();
 5801|       |
 5802|       |    // Configures listeners for XML output. This makes it possible for users
 5803|       |    // to shut down the default XML output before invoking RUN_ALL_TESTS.
 5804|      2|    ConfigureXmlOutput();
 5805|       |
 5806|      2|    if (GTEST_FLAG_GET(brief)) {
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 5807|      0|      listeners()->SetDefaultResultPrinter(new BriefUnitTestResultPrinter);
 5808|      0|    }
 5809|       |
 5810|      2|#if GTEST_CAN_STREAM_RESULTS_
 5811|       |    // Configures listeners for streaming test results to the specified server.
 5812|      2|    ConfigureStreamingOutput();
 5813|      2|#endif  // GTEST_CAN_STREAM_RESULTS_
 5814|       |
 5815|       |#ifdef GTEST_HAS_ABSL
 5816|       |    if (GTEST_FLAG_GET(install_failure_signal_handler)) {
 5817|       |      absl::FailureSignalHandlerOptions options;
 5818|       |      absl::InstallFailureSignalHandler(options);
 5819|       |    }
 5820|       |#endif  // GTEST_HAS_ABSL
 5821|      2|  }
 5822|      4|}
_ZN7testing8internal12UnitTestImpl12GetTestSuiteERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPKcPFvvESE_:
 5839|      2|    internal::TearDownTestSuiteFunc tear_down_tc) {
 5840|       |  // During initialization, all TestInfos for a given suite are added in
 5841|       |  // sequence. To optimize this case, see if the most recently added suite is
 5842|       |  // the one being requested now.
 5843|      2|  if (!test_suites_.empty() &&
  ------------------
  |  Branch (5843:7): [True: 0, False: 2]
  |  Branch (5843:7): [True: 0, False: 2]
  ------------------
 5844|      0|      (*test_suites_.rbegin())->name_ == test_suite_name) {
  ------------------
  |  Branch (5844:7): [True: 0, False: 0]
  ------------------
 5845|      0|    return *test_suites_.rbegin();
 5846|      0|  }
 5847|       |
 5848|       |  // Fall back to searching the collection.
 5849|      2|  auto item_it = test_suites_by_name_.find(test_suite_name);
 5850|      2|  if (item_it != test_suites_by_name_.end()) {
  ------------------
  |  Branch (5850:7): [True: 0, False: 2]
  ------------------
 5851|      0|    return item_it->second;
 5852|      0|  }
 5853|       |
 5854|       |  // Not found. Create a new instance.
 5855|      2|  auto* const new_test_suite =
 5856|      2|      new TestSuite(test_suite_name, type_param, set_up_tc, tear_down_tc);
 5857|      2|  test_suites_by_name_.emplace(test_suite_name, new_test_suite);
 5858|       |
 5859|      2|  const UnitTestFilter death_test_suite_filter(kDeathTestSuiteFilter);
 5860|       |  // Is this a death test suite?
 5861|      2|  if (death_test_suite_filter.MatchesName(test_suite_name)) {
  ------------------
  |  Branch (5861:7): [True: 0, False: 2]
  ------------------
 5862|       |    // Yes.  Inserts the test suite after the last death test suite
 5863|       |    // defined so far.  This only works when the test suites haven't
 5864|       |    // been shuffled.  Otherwise we may end up running a death test
 5865|       |    // after a non-death test.
 5866|      0|    ++last_death_test_suite_;
 5867|      0|    test_suites_.insert(test_suites_.begin() + last_death_test_suite_,
 5868|      0|                        new_test_suite);
 5869|      2|  } else {
 5870|       |    // No.  Appends to the end of the list.
 5871|      2|    test_suites_.push_back(new_test_suite);
 5872|      2|  }
 5873|       |
 5874|      2|  test_suite_indices_.push_back(static_cast<int>(test_suite_indices_.size()));
 5875|      2|  return new_test_suite;
 5876|      2|}
_ZN7testing8internal12UnitTestImpl11RunAllTestsEv:
 5909|      2|bool UnitTestImpl::RunAllTests() {
 5910|       |  // True if and only if Google Test is initialized before RUN_ALL_TESTS() is
 5911|       |  // called.
 5912|      2|  const bool gtest_is_initialized_before_run_all_tests = GTestIsInitialized();
 5913|       |
 5914|       |  // Do not run any test if the --help flag was specified.
 5915|      2|  if (g_help_flag) return true;
  ------------------
  |  Branch (5915:7): [True: 0, False: 2]
  ------------------
 5916|       |
 5917|       |  // Repeats the call to the post-flag parsing initialization in case the
 5918|       |  // user didn't call InitGoogleTest.
 5919|      2|  PostFlagParsingInit();
 5920|       |
 5921|       |  // Handle the case where the program has no tests linked.
 5922|       |  // Sometimes this is a programmer mistake, but sometimes it is intended.
 5923|      2|  if (total_test_count() == 0) {
  ------------------
  |  Branch (5923:7): [True: 0, False: 2]
  ------------------
 5924|      0|    constexpr char kNoTestLinkedMessage[] =
 5925|      0|        "This test program does NOT link in any test case.";
 5926|      0|    constexpr char kNoTestLinkedFatal[] =
 5927|      0|        "This is INVALID. Please make sure to link in at least one test case.";
 5928|      0|    constexpr char kNoTestLinkedWarning[] =
 5929|      0|        "Please make sure this is intended.";
 5930|      0|    const bool fail_if_no_test_linked = GTEST_FLAG_GET(fail_if_no_test_linked);
  ------------------
  |  | 2310|      0|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5931|      0|    ColoredPrintf(
 5932|      0|        GTestColor::kRed, "%s %s\n", kNoTestLinkedMessage,
 5933|      0|        fail_if_no_test_linked ? kNoTestLinkedFatal : kNoTestLinkedWarning);
  ------------------
  |  Branch (5933:9): [True: 0, False: 0]
  ------------------
 5934|      0|    if (fail_if_no_test_linked) {
  ------------------
  |  Branch (5934:9): [True: 0, False: 0]
  ------------------
 5935|      0|      return false;
 5936|      0|    }
 5937|      0|#if GTEST_HAS_FILE_SYSTEM
 5938|      0|    AppendToTestWarningsOutputFile(std::string(kNoTestLinkedMessage) + ' ' +
 5939|      0|                                   kNoTestLinkedWarning + '\n');
 5940|      0|#endif  // GTEST_HAS_FILE_SYSTEM
 5941|      0|  }
 5942|       |
 5943|      2|#if GTEST_HAS_FILE_SYSTEM
 5944|       |  // Even if sharding is not on, test runners may want to use the
 5945|       |  // GTEST_SHARD_STATUS_FILE to query whether the test supports the sharding
 5946|       |  // protocol.
 5947|      2|  internal::WriteToShardStatusFileIfNeeded();
 5948|      2|#endif  // GTEST_HAS_FILE_SYSTEM
 5949|       |
 5950|       |  // True if and only if we are in a subprocess for running a thread-safe-style
 5951|       |  // death test.
 5952|      2|  bool in_subprocess_for_death_test = false;
 5953|       |
 5954|      2|#ifdef GTEST_HAS_DEATH_TEST
 5955|      2|  in_subprocess_for_death_test = (internal_run_death_test_flag_ != nullptr);
 5956|       |#if defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)
 5957|       |  if (in_subprocess_for_death_test) {
 5958|       |    GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_();
 5959|       |  }
 5960|       |#endif  // defined(GTEST_EXTRA_DEATH_TEST_CHILD_SETUP_)
 5961|      2|#endif  // GTEST_HAS_DEATH_TEST
 5962|       |
 5963|      2|  const bool should_shard = ShouldShard(kTestTotalShards, kTestShardIndex,
 5964|      2|                                        in_subprocess_for_death_test);
 5965|       |
 5966|       |  // Compares the full test names with the filter to decide which
 5967|       |  // tests to run.
 5968|      2|  const bool has_tests_to_run =
 5969|      2|      FilterTests(should_shard ? HONOR_SHARDING_PROTOCOL
  ------------------
  |  Branch (5969:19): [True: 0, False: 2]
  ------------------
 5970|      2|                               : IGNORE_SHARDING_PROTOCOL) > 0;
 5971|       |
 5972|       |  // Lists the tests and exits if the --gtest_list_tests flag was specified.
 5973|      2|  if (GTEST_FLAG_GET(list_tests)) {
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 5974|       |    // This must be called *after* FilterTests() has been called.
 5975|      0|    ListTestsMatchingFilter();
 5976|      0|    return true;
 5977|      0|  }
 5978|       |
 5979|      2|  random_seed_ = GetRandomSeedFromFlag(GTEST_FLAG_GET(random_seed));
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 5980|       |
 5981|       |  // True if and only if at least one test has failed.
 5982|      2|  bool failed = false;
 5983|       |
 5984|      2|  TestEventListener* repeater = listeners()->repeater();
 5985|       |
 5986|      2|  start_timestamp_ = GetTimeInMillis();
 5987|      2|  repeater->OnTestProgramStart(*parent_);
 5988|       |
 5989|       |  // How many times to repeat the tests?  We don't want to repeat them
 5990|       |  // when we are inside the subprocess of a death test.
 5991|      2|  const int repeat = in_subprocess_for_death_test ? 1 : GTEST_FLAG_GET(repeat);
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
  |  Branch (5991:22): [True: 0, False: 2]
  ------------------
 5992|       |
 5993|       |  // Repeats forever if the repeat count is negative.
 5994|      2|  const bool gtest_repeat_forever = repeat < 0;
 5995|       |
 5996|       |  // Should test environments be set up and torn down for each repeat, or only
 5997|       |  // set up on the first and torn down on the last iteration? If there is no
 5998|       |  // "last" iteration because the tests will repeat forever, always recreate the
 5999|       |  // environments to avoid leaks in case one of the environments is using
 6000|       |  // resources that are external to this process. Without this check there would
 6001|       |  // be no way to clean up those external resources automatically.
 6002|      2|  const bool recreate_environments_when_repeating =
 6003|      2|      GTEST_FLAG_GET(recreate_environments_when_repeating) ||
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 6004|      2|      gtest_repeat_forever;
  ------------------
  |  Branch (6004:7): [True: 0, False: 2]
  ------------------
 6005|       |
 6006|      4|  for (int i = 0; gtest_repeat_forever || i != repeat; i++) {
  ------------------
  |  Branch (6006:19): [True: 2, False: 2]
  |  Branch (6006:43): [True: 2, False: 0]
  ------------------
 6007|       |    // We want to preserve failures generated by ad-hoc test
 6008|       |    // assertions executed before RUN_ALL_TESTS().
 6009|      2|    ClearNonAdHocTestResult();
 6010|       |
 6011|      2|    Timer timer;
 6012|       |
 6013|       |    // Shuffles test suites and tests if requested.
 6014|      2|    if (has_tests_to_run && GTEST_FLAG_GET(shuffle)) {
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (6014:9): [True: 2, False: 0]
  ------------------
 6015|      0|      random()->Reseed(static_cast<uint32_t>(random_seed_));
 6016|       |      // This should be done before calling OnTestIterationStart(),
 6017|       |      // such that a test event listener can see the actual test order
 6018|       |      // in the event.
 6019|      0|      ShuffleTests();
 6020|      0|    }
 6021|       |
 6022|       |    // Tells the unit test event listeners that the tests are about to start.
 6023|      2|    repeater->OnTestIterationStart(*parent_, i);
 6024|       |
 6025|       |    // Runs each test suite if there is at least one test to run.
 6026|      2|    if (has_tests_to_run) {
  ------------------
  |  Branch (6026:9): [True: 2, False: 0]
  ------------------
 6027|       |      // Sets up all environments beforehand. If test environments aren't
 6028|       |      // recreated for each iteration, only do so on the first iteration.
 6029|      2|      if (i == 0 || recreate_environments_when_repeating) {
  ------------------
  |  Branch (6029:11): [True: 2, False: 0]
  |  Branch (6029:21): [True: 0, False: 0]
  ------------------
 6030|      2|        repeater->OnEnvironmentsSetUpStart(*parent_);
 6031|      2|        ForEach(environments_, SetUpEnvironment);
 6032|      2|        repeater->OnEnvironmentsSetUpEnd(*parent_);
 6033|      2|      }
 6034|       |
 6035|       |      // Runs the tests only if there was no fatal failure or skip triggered
 6036|       |      // during global set-up.
 6037|      2|      if (Test::IsSkipped()) {
  ------------------
  |  Branch (6037:11): [True: 0, False: 2]
  ------------------
 6038|       |        // Emit diagnostics when global set-up calls skip, as it will not be
 6039|       |        // emitted by default.
 6040|      0|        TestResult& test_result =
 6041|      0|            *internal::GetUnitTestImpl()->current_test_result();
 6042|      0|        for (int j = 0; j < test_result.total_part_count(); ++j) {
  ------------------
  |  Branch (6042:25): [True: 0, False: 0]
  ------------------
 6043|      0|          const TestPartResult& test_part_result =
 6044|      0|              test_result.GetTestPartResult(j);
 6045|      0|          if (test_part_result.type() == TestPartResult::kSkip) {
  ------------------
  |  Branch (6045:15): [True: 0, False: 0]
  ------------------
 6046|      0|            const std::string& result = test_part_result.message();
 6047|      0|            printf("%s\n", result.c_str());
 6048|      0|          }
 6049|      0|        }
 6050|      0|        fflush(stdout);
 6051|      2|      } else if (!Test::HasFatalFailure()) {
  ------------------
  |  Branch (6051:18): [True: 2, False: 0]
  ------------------
 6052|      4|        for (int test_index = 0; test_index < total_test_suite_count();
  ------------------
  |  Branch (6052:34): [True: 2, False: 2]
  ------------------
 6053|      2|             test_index++) {
 6054|      2|          GetMutableSuiteCase(test_index)->Run();
 6055|      2|          if (GTEST_FLAG_GET(fail_fast) &&
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 6056|      0|              GetMutableSuiteCase(test_index)->Failed()) {
  ------------------
  |  Branch (6056:15): [True: 0, False: 0]
  ------------------
 6057|      0|            for (int j = test_index + 1; j < total_test_suite_count(); j++) {
  ------------------
  |  Branch (6057:42): [True: 0, False: 0]
  ------------------
 6058|      0|              GetMutableSuiteCase(j)->Skip();
 6059|      0|            }
 6060|      0|            break;
 6061|      0|          }
 6062|      2|        }
 6063|      2|      } else if (Test::HasFatalFailure()) {
  ------------------
  |  Branch (6063:18): [True: 0, False: 0]
  ------------------
 6064|       |        // If there was a fatal failure during the global setup then we know we
 6065|       |        // aren't going to run any tests. Explicitly mark all of the tests as
 6066|       |        // skipped to make this obvious in the output.
 6067|      0|        for (int test_index = 0; test_index < total_test_suite_count();
  ------------------
  |  Branch (6067:34): [True: 0, False: 0]
  ------------------
 6068|      0|             test_index++) {
 6069|      0|          GetMutableSuiteCase(test_index)->Skip();
 6070|      0|        }
 6071|      0|      }
 6072|       |
 6073|       |      // Tears down all environments in reverse order afterwards. If test
 6074|       |      // environments aren't recreated for each iteration, only do so on the
 6075|       |      // last iteration.
 6076|      2|      if (i == repeat - 1 || recreate_environments_when_repeating) {
  ------------------
  |  Branch (6076:11): [True: 2, False: 0]
  |  Branch (6076:30): [True: 0, False: 0]
  ------------------
 6077|      0|        repeater->OnEnvironmentsTearDownStart(*parent_);
 6078|      0|        std::for_each(environments_.rbegin(), environments_.rend(),
 6079|      0|                      TearDownEnvironment);
 6080|      0|        repeater->OnEnvironmentsTearDownEnd(*parent_);
 6081|      0|      }
 6082|      2|    }
 6083|       |
 6084|      2|    elapsed_time_ = timer.Elapsed();
 6085|       |
 6086|       |    // Tells the unit test event listener that the tests have just finished.
 6087|      2|    repeater->OnTestIterationEnd(*parent_, i);
 6088|       |
 6089|       |    // Gets the result and clears it.
 6090|      2|    if (!Passed()) {
  ------------------
  |  Branch (6090:9): [True: 0, False: 2]
  ------------------
 6091|      0|      failed = true;
 6092|      0|    }
 6093|       |
 6094|       |    // Restores the original test order after the iteration.  This
 6095|       |    // allows the user to quickly repro a failure that happens in the
 6096|       |    // N-th iteration without repeating the first (N - 1) iterations.
 6097|       |    // This is not enclosed in "if (GTEST_FLAG(shuffle)) { ... }", in
 6098|       |    // case the user somehow changes the value of the flag somewhere
 6099|       |    // (it's always safe to unshuffle the tests).
 6100|      2|    UnshuffleTests();
 6101|       |
 6102|      2|    if (GTEST_FLAG_GET(shuffle)) {
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
 6103|       |      // Picks a new random seed for each iteration.
 6104|      0|      random_seed_ = GetNextRandomSeed(random_seed_);
 6105|      0|    }
 6106|      2|  }
 6107|       |
 6108|      2|  repeater->OnTestProgramEnd(*parent_);
 6109|       |  // Destroy environments in normal code, not in static teardown.
 6110|      2|  bool delete_environment_on_teardown = true;
 6111|      2|  if (delete_environment_on_teardown) {
  ------------------
  |  Branch (6111:7): [True: 0, False: 2]
  ------------------
 6112|      0|    ForEach(environments_, internal::Delete<Environment>);
 6113|      0|    environments_.clear();
 6114|      0|  }
 6115|       |
 6116|       |  // Try to warn the user if no tests matched the test filter.
 6117|      2|  if (ShouldWarnIfNoTestsMatchFilter()) {
  ------------------
  |  Branch (6117:7): [True: 0, False: 2]
  ------------------
 6118|      0|    const std::string filter_warning =
 6119|      0|        std::string("filter \"") + GTEST_FLAG_GET(filter) +
  ------------------
  |  | 2310|      0|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 6120|      0|        "\" did not match any test; no tests were run\n";
 6121|      0|    ColoredPrintf(GTestColor::kRed, "WARNING: %s", filter_warning.c_str());
 6122|      0|#if GTEST_HAS_FILE_SYSTEM
 6123|      0|    AppendToTestWarningsOutputFile(filter_warning);
 6124|      0|#endif  // GTEST_HAS_FILE_SYSTEM
 6125|      0|  }
 6126|       |
 6127|      2|  if (!gtest_is_initialized_before_run_all_tests) {
  ------------------
  |  Branch (6127:7): [True: 0, False: 2]
  ------------------
 6128|      0|    ColoredPrintf(
 6129|      0|        GTestColor::kRed,
 6130|      0|        "\nIMPORTANT NOTICE - DO NOT IGNORE:\n"
 6131|      0|        "This test program did NOT call " GTEST_INIT_GOOGLE_TEST_NAME_
 6132|      0|        "() before calling RUN_ALL_TESTS(). This is INVALID. Soon " GTEST_NAME_
 6133|      0|        " will start to enforce the valid usage. "
 6134|      0|        "Please fix it ASAP, or IT WILL START TO FAIL.\n");  // NOLINT
 6135|      0|  }
 6136|       |
 6137|      2|  return !failed;
 6138|      2|}
_ZN7testing8internal30WriteToShardStatusFileIfNeededEv:
 6145|      2|void WriteToShardStatusFileIfNeeded() {
 6146|      2|  const char* const test_shard_file = posix::GetEnv(kTestShardStatusFile);
 6147|      2|  if (test_shard_file != nullptr) {
  ------------------
  |  Branch (6147:7): [True: 0, False: 2]
  ------------------
 6148|      0|    FILE* const file = posix::FOpen(test_shard_file, "w");
 6149|      0|    if (file == nullptr) {
  ------------------
  |  Branch (6149:9): [True: 0, False: 0]
  ------------------
 6150|      0|      ColoredPrintf(GTestColor::kRed,
 6151|      0|                    "Could not write to the test shard status file \"%s\" "
 6152|      0|                    "specified by the %s environment variable.\n",
 6153|      0|                    test_shard_file, kTestShardStatusFile);
 6154|      0|      fflush(stdout);
 6155|      0|      exit(EXIT_FAILURE);
 6156|      0|    }
 6157|      0|    fclose(file);
 6158|      0|  }
 6159|      2|}
_ZN7testing8internal11ShouldShardEPKcS2_b:
 6169|      4|                 bool in_subprocess_for_death_test) {
 6170|      4|  if (in_subprocess_for_death_test) {
  ------------------
  |  Branch (6170:7): [True: 0, False: 4]
  ------------------
 6171|      0|    return false;
 6172|      0|  }
 6173|       |
 6174|      4|  const int32_t total_shards = Int32FromEnvOrDie(total_shards_env, -1);
 6175|      4|  const int32_t shard_index = Int32FromEnvOrDie(shard_index_env, -1);
 6176|       |
 6177|      4|  if (total_shards == -1 && shard_index == -1) {
  ------------------
  |  Branch (6177:7): [True: 4, False: 0]
  |  Branch (6177:29): [True: 4, False: 0]
  ------------------
 6178|      4|    return false;
 6179|      4|  } else if (total_shards == -1 && shard_index != -1) {
  ------------------
  |  Branch (6179:14): [True: 0, False: 0]
  |  Branch (6179:36): [True: 0, False: 0]
  ------------------
 6180|      0|    const Message msg = Message() << "Invalid environment variables: you have "
 6181|      0|                                  << kTestShardIndex << " = " << shard_index
 6182|      0|                                  << ", but have left " << kTestTotalShards
 6183|      0|                                  << " unset.\n";
 6184|      0|    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
 6185|      0|    fflush(stdout);
 6186|      0|    exit(EXIT_FAILURE);
 6187|      0|  } else if (total_shards != -1 && shard_index == -1) {
  ------------------
  |  Branch (6187:14): [True: 0, False: 0]
  |  Branch (6187:36): [True: 0, False: 0]
  ------------------
 6188|      0|    const Message msg = Message()
 6189|      0|                        << "Invalid environment variables: you have "
 6190|      0|                        << kTestTotalShards << " = " << total_shards
 6191|      0|                        << ", but have left " << kTestShardIndex << " unset.\n";
 6192|      0|    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
 6193|      0|    fflush(stdout);
 6194|      0|    exit(EXIT_FAILURE);
 6195|      0|  } else if (shard_index < 0 || shard_index >= total_shards) {
  ------------------
  |  Branch (6195:14): [True: 0, False: 0]
  |  Branch (6195:33): [True: 0, False: 0]
  ------------------
 6196|      0|    const Message msg =
 6197|      0|        Message() << "Invalid environment variables: we require 0 <= "
 6198|      0|                  << kTestShardIndex << " < " << kTestTotalShards
 6199|      0|                  << ", but you have " << kTestShardIndex << "=" << shard_index
 6200|      0|                  << ", " << kTestTotalShards << "=" << total_shards << ".\n";
 6201|      0|    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
 6202|      0|    fflush(stdout);
 6203|      0|    exit(EXIT_FAILURE);
 6204|      0|  }
 6205|       |
 6206|      0|  return total_shards > 1;
 6207|      4|}
_ZN7testing8internal17Int32FromEnvOrDieEPKci:
 6212|      8|int32_t Int32FromEnvOrDie(const char* var, int32_t default_val) {
 6213|      8|  const char* str_val = posix::GetEnv(var);
 6214|      8|  if (str_val == nullptr) {
  ------------------
  |  Branch (6214:7): [True: 8, False: 0]
  ------------------
 6215|      8|    return default_val;
 6216|      8|  }
 6217|       |
 6218|      0|  int32_t result;
 6219|      0|  if (!ParseInt32(Message() << "The value of environment variable " << var,
  ------------------
  |  Branch (6219:7): [True: 0, False: 0]
  ------------------
 6220|      0|                  str_val, &result)) {
 6221|      0|    exit(EXIT_FAILURE);
 6222|      0|  }
 6223|      0|  return result;
 6224|      0|}
_ZN7testing8internal12UnitTestImpl11FilterTestsENS1_18ReactionToShardingE:
 6241|      2|int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
 6242|      2|  const int32_t total_shards = shard_tests == HONOR_SHARDING_PROTOCOL
  ------------------
  |  Branch (6242:32): [True: 0, False: 2]
  ------------------
 6243|      2|                                   ? Int32FromEnvOrDie(kTestTotalShards, -1)
 6244|      2|                                   : -1;
 6245|      2|  const int32_t shard_index = shard_tests == HONOR_SHARDING_PROTOCOL
  ------------------
  |  Branch (6245:31): [True: 0, False: 2]
  ------------------
 6246|      2|                                  ? Int32FromEnvOrDie(kTestShardIndex, -1)
 6247|      2|                                  : -1;
 6248|       |
 6249|      2|  const PositiveAndNegativeUnitTestFilter gtest_flag_filter(
 6250|      2|      GTEST_FLAG_GET(filter));
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 6251|      2|  const UnitTestFilter disable_test_filter(kDisableTestFilter);
 6252|       |  // num_runnable_tests are the number of tests that will
 6253|       |  // run across all shards (i.e., match filter and are not disabled).
 6254|       |  // num_selected_tests are the number of tests to be run on
 6255|       |  // this shard.
 6256|      2|  int num_runnable_tests = 0;
 6257|      2|  int num_selected_tests = 0;
 6258|      2|  for (auto* test_suite : test_suites_) {
  ------------------
  |  Branch (6258:25): [True: 2, False: 2]
  ------------------
 6259|      2|    const std::string& test_suite_name = test_suite->name_;
 6260|      2|    test_suite->set_should_run(false);
 6261|       |
 6262|      2|    for (TestInfo* test_info : test_suite->test_info_list()) {
  ------------------
  |  Branch (6262:30): [True: 2, False: 2]
  ------------------
 6263|      2|      const std::string& test_name = test_info->name_;
 6264|       |      // A test is disabled if test suite name or test name matches
 6265|       |      // kDisableTestFilter.
 6266|      2|      const bool is_disabled =
 6267|      2|          disable_test_filter.MatchesName(test_suite_name) ||
  ------------------
  |  Branch (6267:11): [True: 0, False: 2]
  ------------------
 6268|      2|          disable_test_filter.MatchesName(test_name);
  ------------------
  |  Branch (6268:11): [True: 0, False: 2]
  ------------------
 6269|      2|      test_info->is_disabled_ = is_disabled;
 6270|       |
 6271|      2|      const bool matches_filter =
 6272|      2|          gtest_flag_filter.MatchesTest(test_suite_name, test_name);
 6273|      2|      test_info->matches_filter_ = matches_filter;
 6274|       |
 6275|      2|      const bool is_runnable =
 6276|      2|          (GTEST_FLAG_GET(also_run_disabled_tests) || !is_disabled) &&
  ------------------
  |  | 2310|      2|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  ------------------
  |  |  |  | 2242|      2|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  |  |  |  Branch (2310:30): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (6276:55): [True: 2, False: 0]
  ------------------
 6277|      2|          matches_filter;
  ------------------
  |  Branch (6277:11): [True: 2, False: 0]
  ------------------
 6278|       |
 6279|      2|      const bool is_in_another_shard =
 6280|      2|          shard_tests != IGNORE_SHARDING_PROTOCOL &&
  ------------------
  |  Branch (6280:11): [True: 0, False: 2]
  ------------------
 6281|      0|          !ShouldRunTestOnShard(total_shards, shard_index, num_runnable_tests);
  ------------------
  |  Branch (6281:11): [True: 0, False: 0]
  ------------------
 6282|      2|      test_info->is_in_another_shard_ = is_in_another_shard;
 6283|      2|      const bool is_selected = is_runnable && !is_in_another_shard;
  ------------------
  |  Branch (6283:32): [True: 2, False: 0]
  |  Branch (6283:47): [True: 2, False: 0]
  ------------------
 6284|       |
 6285|      2|      num_runnable_tests += is_runnable;
 6286|      2|      num_selected_tests += is_selected;
 6287|       |
 6288|      2|      test_info->should_run_ = is_selected;
 6289|      2|      test_suite->set_should_run(test_suite->should_run() || is_selected);
  ------------------
  |  Branch (6289:34): [True: 0, False: 2]
  |  Branch (6289:62): [True: 2, False: 0]
  ------------------
 6290|      2|    }
 6291|      2|  }
 6292|      2|  return num_selected_tests;
 6293|      2|}
_ZN7testing8internal12UnitTestImpl21os_stack_trace_getterEv:
 6412|      8|OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
 6413|      8|  if (os_stack_trace_getter_ == nullptr) {
  ------------------
  |  Branch (6413:7): [True: 2, False: 6]
  ------------------
 6414|       |#ifdef GTEST_OS_STACK_TRACE_GETTER_
 6415|       |    os_stack_trace_getter_ = new GTEST_OS_STACK_TRACE_GETTER_;
 6416|       |#else
 6417|      2|    os_stack_trace_getter_ = new OsStackTraceGetter;
 6418|      2|#endif  // GTEST_OS_STACK_TRACE_GETTER_
 6419|      2|  }
 6420|       |
 6421|      8|  return os_stack_trace_getter_;
 6422|      8|}
_ZN7testing8internal12UnitTestImpl19current_test_resultEv:
 6425|     12|TestResult* UnitTestImpl::current_test_result() {
 6426|     12|  if (current_test_info_ != nullptr) {
  ------------------
  |  Branch (6426:7): [True: 8, False: 4]
  ------------------
 6427|      8|    return &current_test_info_->result_;
 6428|      8|  }
 6429|      4|  if (current_test_suite_ != nullptr) {
  ------------------
  |  Branch (6429:7): [True: 0, False: 4]
  ------------------
 6430|      0|    return &current_test_suite_->ad_hoc_test_result_;
 6431|      0|  }
 6432|      4|  return &ad_hoc_test_result_;
 6433|      4|}
_ZN7testing8internal6IsTrueEb:
 6484|     18|bool IsTrue(bool condition) { return condition; }
_ZN7testing8internal10AlwaysTrueEv:
 6486|     12|bool AlwaysTrue() {
 6487|     12|#if GTEST_HAS_EXCEPTIONS
 6488|       |  // This condition is always false so AlwaysTrue() never actually throws,
 6489|       |  // but it makes the compiler think that it may throw.
 6490|     12|  if (IsTrue(false)) throw ClassUniqueToAlwaysTrue();
  ------------------
  |  Branch (6490:7): [True: 0, False: 12]
  ------------------
 6491|     12|#endif  // GTEST_HAS_EXCEPTIONS
 6492|     12|  return true;
 6493|     12|}
_ZN7testing8internal10SkipPrefixEPKcPS2_:
 6498|     73|bool SkipPrefix(const char* prefix, const char** pstr) {
 6499|     73|  const size_t prefix_len = strlen(prefix);
 6500|     73|  if (strncmp(*pstr, prefix, prefix_len) == 0) {
  ------------------
  |  Branch (6500:7): [True: 15, False: 58]
  ------------------
 6501|     15|    *pstr += prefix_len;
 6502|     15|    return true;
 6503|     15|  }
 6504|     58|  return false;
 6505|     73|}
_ZN7testing8internal9ParseFlagEPKcS2_Pi:
 6566|     45|bool ParseFlag(const char* str, const char* flag_name, int32_t* value) {
 6567|       |  // Gets the value of the flag as a string.
 6568|     45|  const char* const value_str = ParseFlagValue(str, flag_name, false);
 6569|       |
 6570|       |  // Aborts if the parsing failed.
 6571|     45|  if (value_str == nullptr) return false;
  ------------------
  |  Branch (6571:7): [True: 45, False: 0]
  ------------------
 6572|       |
 6573|       |  // Sets *value to the value of the flag.
 6574|      0|  return ParseInt32(Message() << "The value of flag --" << flag_name, value_str,
 6575|      0|                    value);
 6576|     45|}
_ZN7testing8internal24ParseGoogleTestFlagsOnlyEPiPPc:
 6860|      2|void ParseGoogleTestFlagsOnly(int* argc, char** argv) {
 6861|       |#ifdef GTEST_HAS_ABSL_FLAGS
 6862|       |  if (*argc <= 0) return;
 6863|       |
 6864|       |  std::vector<char*> positional_args;
 6865|       |  std::vector<absl::UnrecognizedFlag> unrecognized_flags;
 6866|       |  absl::ParseAbseilFlagsOnly(*argc, argv, positional_args, unrecognized_flags);
 6867|       |  absl::flat_hash_set<absl::string_view> unrecognized;
 6868|       |  for (const auto& flag : unrecognized_flags) {
 6869|       |    unrecognized.insert(flag.flag_name);
 6870|       |  }
 6871|       |  absl::flat_hash_set<char*> positional;
 6872|       |  for (const auto& arg : positional_args) {
 6873|       |    positional.insert(arg);
 6874|       |  }
 6875|       |
 6876|       |  int out_pos = 1;
 6877|       |  int in_pos = 1;
 6878|       |  for (; in_pos < *argc; ++in_pos) {
 6879|       |    char* arg = argv[in_pos];
 6880|       |    absl::string_view arg_str(arg);
 6881|       |    if (absl::ConsumePrefix(&arg_str, "--")) {
 6882|       |      // Flag-like argument. If the flag was unrecognized, keep it.
 6883|       |      // If it was a GoogleTest flag, remove it.
 6884|       |      if (unrecognized.contains(arg_str)) {
 6885|       |        argv[out_pos++] = argv[in_pos];
 6886|       |        continue;
 6887|       |      }
 6888|       |    }
 6889|       |
 6890|       |    if (arg_str.empty()) {
 6891|       |      ++in_pos;
 6892|       |      break;  // '--' indicates that the rest of the arguments are positional
 6893|       |    }
 6894|       |
 6895|       |    // Probably a positional argument. If it is in fact positional, keep it.
 6896|       |    // If it was a value for the flag argument, remove it.
 6897|       |    if (positional.contains(arg)) {
 6898|       |      argv[out_pos++] = arg;
 6899|       |    }
 6900|       |  }
 6901|       |
 6902|       |  // The rest are positional args for sure.
 6903|       |  while (in_pos < *argc) {
 6904|       |    argv[out_pos++] = argv[in_pos++];
 6905|       |  }
 6906|       |
 6907|       |  *argc = out_pos;
 6908|       |  argv[out_pos] = nullptr;
 6909|       |#else
 6910|      2|  ParseGoogleTestFlagsOnlyImpl(argc, argv);
 6911|      2|#endif
 6912|       |
 6913|       |  // Fix the value of *_NSGetArgc() on macOS, but if and only if
 6914|       |  // *_NSGetArgv() == argv
 6915|       |  // Only applicable to char** version of argv
 6916|       |#ifdef GTEST_OS_MAC
 6917|       |#ifndef GTEST_OS_IOS
 6918|       |  if (*_NSGetArgv() == argv) {
 6919|       |    *_NSGetArgc() = *argc;
 6920|       |  }
 6921|       |#endif
 6922|       |#endif
 6923|      2|}
_ZN7testing14InitGoogleTestEPiPPc:
 6971|      2|void InitGoogleTest(int* argc, char** argv) {
 6972|       |#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
 6973|       |  GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);
 6974|       |#else   // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
 6975|      2|  internal::InitGoogleTestImpl(argc, argv);
 6976|      2|#endif  // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
 6977|      2|}
gtest-all.cc:_ZN7testingL18GetDefaultFailFastEv:
  249|      2|static bool GetDefaultFailFast() {
  250|      2|  const char* const testbridge_test_runner_fail_fast =
  251|      2|      internal::posix::GetEnv("TESTBRIDGE_TEST_RUNNER_FAIL_FAST");
  252|      2|  if (testbridge_test_runner_fail_fast != nullptr) {
  ------------------
  |  Branch (252:7): [True: 0, False: 2]
  ------------------
  253|      0|    return strcmp(testbridge_test_runner_fail_fast, "1") == 0;
  254|      0|  }
  255|      2|  return false;
  256|      2|}
gtest-all.cc:_ZN7testingL16GetDefaultFilterEv:
  238|      2|static const char* GetDefaultFilter() {
  239|      2|  const char* const testbridge_test_only =
  240|      2|      internal::posix::GetEnv("TESTBRIDGE_TEST_ONLY");
  241|      2|  if (testbridge_test_only != nullptr) {
  ------------------
  |  Branch (241:7): [True: 0, False: 2]
  ------------------
  242|      0|    return testbridge_test_only;
  243|      0|  }
  244|      2|  return kUniversalFilter;
  245|      2|}
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  799|      6|  explicit UnitTestFilter(const std::string& filter) {
  800|       |    // By design "" filter matches "" string.
  801|      6|    std::vector<std::string> all_patterns;
  802|      6|    SplitString(filter, ':', &all_patterns);
  803|      6|    const auto exact_match_patterns_begin = std::partition(
  804|      6|        all_patterns.begin(), all_patterns.end(), &IsGlobPattern);
  805|       |
  806|      6|    glob_patterns_.reserve(static_cast<size_t>(
  807|      6|        std::distance(all_patterns.begin(), exact_match_patterns_begin)));
  808|      6|    std::move(all_patterns.begin(), exact_match_patterns_begin,
  809|      6|              std::inserter(glob_patterns_, glob_patterns_.begin()));
  810|      6|    std::move(
  811|      6|        exact_match_patterns_begin, all_patterns.end(),
  812|      6|        std::inserter(exact_match_patterns_, exact_match_patterns_.begin()));
  813|      6|  }
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_113IsGlobPatternERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  789|     10|bool IsGlobPattern(const std::string& pattern) {
  790|     10|  return std::any_of(pattern.begin(), pattern.end(),
  791|     10|                     [](const char c) { return c == '?' || c == '*'; });
  792|     10|}
gtest-all.cc:_ZZN7testing8internal12_GLOBAL__N_113IsGlobPatternERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENK3$_0clEc:
  791|     84|                     [](const char c) { return c == '?' || c == '*'; });
  ------------------
  |  Branch (791:48): [True: 0, False: 84]
  |  Branch (791:60): [True: 8, False: 76]
  ------------------
gtest-all.cc:_ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  817|     10|  bool MatchesName(const std::string& name) const {
  818|     10|    return exact_match_patterns_.find(name) != exact_match_patterns_.end() ||
  ------------------
  |  Branch (818:12): [True: 2, False: 8]
  ------------------
  819|      8|           std::any_of(glob_patterns_.begin(), glob_patterns_.end(),
  ------------------
  |  Branch (819:12): [True: 0, False: 8]
  ------------------
  820|      8|                       [&name](const std::string& pattern) {
  821|      8|                         return PatternMatchesString(
  822|      8|                             name, pattern.c_str(),
  823|      8|                             pattern.c_str() + pattern.size());
  824|      8|                       });
  825|     10|  }
gtest-all.cc:_ZZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEENKUlSB_E_clESB_:
  820|     12|                       [&name](const std::string& pattern) {
  821|     12|                         return PatternMatchesString(
  822|     12|                             name, pattern.c_str(),
  823|     12|                             pattern.c_str() + pattern.size());
  824|     12|                       });
gtest-all.cc:_ZN7testing8internalL20PatternMatchesStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKcSB_:
  741|     12|                                 const char* pattern, const char* pattern_end) {
  742|     12|  const char* name = name_str.c_str();
  743|     12|  const char* const name_begin = name;
  744|     12|  const char* const name_end = name + name_str.size();
  745|       |
  746|     12|  const char* pattern_next = pattern;
  747|     12|  const char* name_next = name;
  748|       |
  749|    288|  while (pattern < pattern_end || name < name_end) {
  ------------------
  |  Branch (749:10): [True: 288, False: 0]
  |  Branch (749:35): [True: 0, False: 0]
  ------------------
  750|    288|    if (pattern < pattern_end) {
  ------------------
  |  Branch (750:9): [True: 288, False: 0]
  ------------------
  751|    288|      switch (*pattern) {
  752|    152|        default:  // Match an ordinary character.
  ------------------
  |  Branch (752:9): [True: 152, False: 136]
  ------------------
  753|    152|          if (name < name_end && *name == *pattern) {
  ------------------
  |  Branch (753:15): [True: 144, False: 8]
  |  Branch (753:34): [True: 12, False: 132]
  ------------------
  754|     12|            ++pattern;
  755|     12|            ++name;
  756|     12|            continue;
  757|     12|          }
  758|    140|          break;
  759|    140|        case '?':  // Match any single character.
  ------------------
  |  Branch (759:9): [True: 0, False: 288]
  ------------------
  760|      0|          if (name < name_end) {
  ------------------
  |  Branch (760:15): [True: 0, False: 0]
  ------------------
  761|      0|            ++pattern;
  762|      0|            ++name;
  763|      0|            continue;
  764|      0|          }
  765|      0|          break;
  766|    136|        case '*':
  ------------------
  |  Branch (766:9): [True: 136, False: 152]
  ------------------
  767|       |          // Match zero or more characters. Start by skipping over the wildcard
  768|       |          // and matching zero characters from name. If that fails, restart and
  769|       |          // match one more character than the last attempt.
  770|    136|          pattern_next = pattern;
  771|    136|          name_next = name + 1;
  772|    136|          ++pattern;
  773|    136|          continue;
  774|    288|      }
  775|    288|    }
  776|       |    // Failed to match a character. Restart if possible.
  777|    140|    if (name_begin < name_next && name_next <= name_end) {
  ------------------
  |  Branch (777:9): [True: 136, False: 4]
  |  Branch (777:35): [True: 128, False: 8]
  ------------------
  778|    128|      pattern = pattern_next;
  779|    128|      name = name_next;
  780|    128|      continue;
  781|    128|    }
  782|     12|    return false;
  783|    140|  }
  784|      0|  return true;
  785|     12|}
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  839|      2|  explicit PositiveAndNegativeUnitTestFilter(const std::string& filter) {
  840|      2|    std::vector<std::string> positive_and_negative_filters;
  841|       |
  842|       |    // NOTE: `SplitString` always returns a non-empty container.
  843|      2|    SplitString(filter, '-', &positive_and_negative_filters);
  844|      2|    const auto& positive_filter = positive_and_negative_filters.front();
  845|       |
  846|      2|    if (positive_and_negative_filters.size() > 1) {
  ------------------
  |  Branch (846:9): [True: 0, False: 2]
  ------------------
  847|      0|      positive_filter_ = UnitTestFilter(
  848|      0|          positive_filter.empty() ? kUniversalFilter : positive_filter);
  ------------------
  |  Branch (848:11): [True: 0, False: 0]
  ------------------
  849|       |
  850|       |      // TODO(b/214626361): Fail on multiple '-' characters
  851|       |      // For the moment to preserve old behavior we concatenate the rest of the
  852|       |      // string parts with `-` as separator to generate the negative filter.
  853|      0|      auto negative_filter_string = positive_and_negative_filters[1];
  854|      0|      for (std::size_t i = 2; i < positive_and_negative_filters.size(); i++)
  ------------------
  |  Branch (854:31): [True: 0, False: 0]
  ------------------
  855|      0|        negative_filter_string =
  856|      0|            negative_filter_string + '-' + positive_and_negative_filters[i];
  857|      0|      negative_filter_ = UnitTestFilter(negative_filter_string);
  858|      2|    } else {
  859|       |      // In case we don't have a negative filter and positive filter is ""
  860|       |      // we do not use kUniversalFilter by design as opposed to when we have a
  861|       |      // negative filter.
  862|      2|      positive_filter_ = UnitTestFilter(positive_filter);
  863|      2|    }
  864|      2|  }
gtest-all.cc:_ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2Ev:
  796|      4|  UnitTestFilter() = default;
gtest-all.cc:_ZNK7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilter11MatchesTestERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_:
  870|      2|                   const std::string& test_name) const {
  871|      2|    return MatchesName(test_suite_name + "." + test_name);
  872|      2|  }
gtest-all.cc:_ZNK7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilter11MatchesNameERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  876|      2|  bool MatchesName(const std::string& name) const {
  877|      2|    return positive_filter_.MatchesName(name) &&
  ------------------
  |  Branch (877:12): [True: 2, False: 0]
  ------------------
  878|      2|           !negative_filter_.MatchesName(name);
  ------------------
  |  Branch (878:12): [True: 2, False: 0]
  ------------------
  879|      2|  }
gtest-all.cc:_ZN7testing8internalL18ShouldRunTestSuiteEPKNS_9TestSuiteE:
  461|      2|static bool ShouldRunTestSuite(const TestSuite* test_suite) {
  462|      2|  return test_suite->should_run();
  463|      2|}
gtest-all.cc:_ZN7testing8internalL20SumOverTestSuiteListERKNSt3__16vectorIPNS_9TestSuiteENS1_9allocatorIS4_EEEEMS3_KFivE:
  441|      4|                                int (TestSuite::*method)() const) {
  442|      4|  int sum = 0;
  443|      8|  for (size_t i = 0; i < case_list.size(); i++) {
  ------------------
  |  Branch (443:22): [True: 4, False: 4]
  ------------------
  444|      4|    sum += (case_list[i]->*method)();
  445|      4|  }
  446|      4|  return sum;
  447|      4|}
gtest-all.cc:_ZN7testingL24ValidateTestPropertyNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS0_6vectorIS6_NS4_IS6_EEEE:
 2432|      2|    const std::vector<std::string>& reserved_names) {
 2433|      2|  if (std::find(reserved_names.begin(), reserved_names.end(), property_name) !=
  ------------------
  |  Branch (2433:7): [True: 0, False: 2]
  ------------------
 2434|      2|      reserved_names.end()) {
 2435|      0|    ADD_FAILURE() << "Reserved key used in RecordProperty(): " << property_name
  ------------------
  |  | 1750|      0|#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
  |  |  ------------------
  |  |  |  | 1296|      0|  GTEST_MESSAGE_(message, ::testing::TestPartResult::kNonFatalFailure)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1290|      0|  GTEST_MESSAGE_AT_(__FILE__, __LINE__, message, result_type)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 1286|      0|  ::testing::internal::AssertHelper(result_type, file, line, message) = \
  |  |  |  |  |  |  |  | 1287|      0|      ::testing::Message()
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2436|      0|                  << " (" << FormatWordList(reserved_names)
 2437|      0|                  << " are reserved by " << GTEST_NAME_ << ")";
  ------------------
  |  |  349|      0|#define GTEST_NAME_ "Google Test"
  ------------------
 2438|      0|    return false;
 2439|      0|  }
 2440|      2|  return true;
 2441|      2|}
gtest-all.cc:_ZN7testingL31GetReservedAttributesForElementERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 2383|      2|    const std::string& xml_element) {
 2384|      2|  if (xml_element == "testsuites") {
  ------------------
  |  Branch (2384:7): [True: 0, False: 2]
  ------------------
 2385|      0|    return ArrayAsVector(kReservedTestSuitesAttributes);
 2386|      2|  } else if (xml_element == "testsuite") {
  ------------------
  |  Branch (2386:14): [True: 0, False: 2]
  ------------------
 2387|      0|    return ArrayAsVector(kReservedTestSuiteAttributes);
 2388|      2|  } else if (xml_element == "testcase") {
  ------------------
  |  Branch (2388:14): [True: 2, False: 0]
  ------------------
 2389|      2|    return ArrayAsVector(kReservedTestCaseAttributes);
 2390|      2|  } else {
 2391|      0|    GTEST_CHECK_(false) << "Unrecognized xml_element provided: " << xml_element;
  ------------------
  |  | 1087|      0|  GTEST_AMBIGUOUS_ELSE_BLOCKER_               \
  |  |  ------------------
  |  |  |  |  728|      0|  switch (0)                          \
  |  |  |  |  729|      0|  case 0:                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (729:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  730|      0|  default:  // NOLINT
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (730:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1088|      0|  if (::testing::internal::IsTrue(condition)) \
  |  |  ------------------
  |  |  |  Branch (1088:7): [True: 0, False: 0]
  |  |  ------------------
  |  | 1089|      0|    ;                                         \
  |  | 1090|      0|  else                                        \
  |  | 1091|      0|    GTEST_LOG_(FATAL) << "Condition " #condition " failed. "
  |  |  ------------------
  |  |  |  | 1062|      0|  ::testing::internal::GTestLog(::testing::internal::GTEST_##severity, \
  |  |  |  | 1063|      0|                                __FILE__, __LINE__)                    \
  |  |  |  | 1064|      0|      .GetStream()
  |  |  ------------------
  ------------------
 2392|      0|  }
 2393|       |  // This code is unreachable but some compilers may not realizes that.
 2394|      0|  return std::vector<std::string>();
 2395|      2|}
_ZN7testing13ArrayAsVectorILm8EEENSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEERAT__KPKc:
 2378|      2|std::vector<std::string> ArrayAsVector(const char* const (&array)[kSize]) {
 2379|      2|  return std::vector<std::string>(array, array + kSize);
 2380|      2|}
_ZN7testing8internal5TimerC2Ev:
 1188|      6|  Timer() : start_(clock::now()) {}
gtest-all.cc:_ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz:
 3328|     10|static void ColoredPrintf(GTestColor color, const char* fmt, ...) {
 3329|     10|  va_list args;
 3330|     10|  va_start(args, fmt);
 3331|       |
 3332|     10|  static const bool in_color_mode =
 3333|       |      // We don't condition this on GTEST_HAS_FILE_SYSTEM because we still need
 3334|       |      // to be able to detect terminal I/O regardless.
 3335|     10|      ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);
 3336|       |
 3337|     10|  const bool use_color = in_color_mode && (color != GTestColor::kDefault);
  ------------------
  |  Branch (3337:26): [True: 0, False: 10]
  |  Branch (3337:43): [True: 0, False: 0]
  ------------------
 3338|       |
 3339|     10|  if (!use_color) {
  ------------------
  |  Branch (3339:7): [True: 10, False: 0]
  ------------------
 3340|     10|    vprintf(fmt, args);
 3341|     10|    va_end(args);
 3342|     10|    return;
 3343|     10|  }
 3344|       |
 3345|       |#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MOBILE) &&       \
 3346|       |    !defined(GTEST_OS_WINDOWS_GAMES) && !defined(GTEST_OS_WINDOWS_PHONE) && \
 3347|       |    !defined(GTEST_OS_WINDOWS_RT) && !defined(GTEST_OS_WINDOWS_MINGW)
 3348|       |  const HANDLE stdout_handle = GetStdHandle(STD_OUTPUT_HANDLE);
 3349|       |
 3350|       |  // Gets the current text color.
 3351|       |  CONSOLE_SCREEN_BUFFER_INFO buffer_info;
 3352|       |  GetConsoleScreenBufferInfo(stdout_handle, &buffer_info);
 3353|       |  const WORD old_color_attrs = buffer_info.wAttributes;
 3354|       |  const WORD new_color = GetNewColor(color, old_color_attrs);
 3355|       |
 3356|       |  // We need to flush the stream buffers into the console before each
 3357|       |  // SetConsoleTextAttribute call lest it affect the text that is already
 3358|       |  // printed but has not yet reached the console.
 3359|       |  fflush(stdout);
 3360|       |  SetConsoleTextAttribute(stdout_handle, new_color);
 3361|       |
 3362|       |  vprintf(fmt, args);
 3363|       |
 3364|       |  fflush(stdout);
 3365|       |  // Restores the text color.
 3366|       |  SetConsoleTextAttribute(stdout_handle, old_color_attrs);
 3367|       |#else
 3368|      0|  printf("\033[0;3%sm", GetAnsiColorCode(color));
 3369|      0|  vprintf(fmt, args);
 3370|      0|  printf("\033[m");  // Resets the terminal to default.
 3371|      0|#endif  // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE
 3372|       |  va_end(args);
 3373|      0|}
gtest-all.cc:_ZN7testingL15FormatTestCountEi:
 3148|      2|static std::string FormatTestCount(int test_count) {
 3149|      2|  return FormatCountableNoun(test_count, "test", "tests");
 3150|      2|}
gtest-all.cc:_ZN7testingL20FormatTestSuiteCountEi:
 3153|      2|static std::string FormatTestSuiteCount(int test_suite_count) {
 3154|      2|  return FormatCountableNoun(test_suite_count, "test suite", "test suites");
 3155|      2|}
gtest-all.cc:_ZN7testingL19FormatCountableNounEiPKcS1_:
 3142|      6|                                       const char* plural_form) {
 3143|      6|  return internal::StreamableToString(count) + " " +
 3144|      6|         (count == 1 ? singular_form : plural_form);
  ------------------
  |  Branch (3144:11): [True: 6, False: 0]
  ------------------
 3145|      6|}
_ZN7testing8internal27PrettyUnitTestResultPrinter13PrintTestNameEPKcS3_:
 3402|      2|  static void PrintTestName(const char* test_suite, const char* test) {
 3403|      2|    printf("%s.%s", test_suite, test);
 3404|      2|  }
_ZN7testing8internal17TestEventRepeaterC2Ev:
 3814|      2|  TestEventRepeater() : forwarding_enabled_(true) {}
_ZN7testing8internal23ScopedPrematureExitFileC2EPKc:
 5133|      2|      : premature_exit_filepath_(
 5134|      2|            premature_exit_filepath ? premature_exit_filepath : "") {
  ------------------
  |  Branch (5134:13): [True: 0, False: 2]
  ------------------
 5135|       |    // If a path to the premature-exit file is specified...
 5136|      2|    if (!premature_exit_filepath_.empty()) {
  ------------------
  |  Branch (5136:9): [True: 0, False: 2]
  ------------------
 5137|       |      // create the file with a single "0" character in it.  I/O
 5138|       |      // errors are ignored as there's nothing better we can do and we
 5139|       |      // don't want to fail the test because of this.
 5140|      0|      FILE* pfile = posix::FOpen(premature_exit_filepath_.c_str(), "w");
 5141|      0|      fwrite("0", 1, 1, pfile);
 5142|      0|      fclose(pfile);
 5143|      0|    }
 5144|      2|  }
_ZN7testing8internal27PrettyUnitTestResultPrinterC2Ev:
 3401|      2|  PrettyUnitTestResultPrinter() = default;
gtest-all.cc:_ZN7testing8internalL18GTestIsInitializedEv:
  435|      4|static bool GTestIsInitialized() { return !GetArgvs().empty(); }
gtest-all.cc:_ZN7testing8internalL14ParseFlagValueEPKcS2_b:
 6513|    345|                                  bool def_optional) {
 6514|       |  // str and flag must not be NULL.
 6515|    345|  if (str == nullptr || flag_name == nullptr) return nullptr;
  ------------------
  |  Branch (6515:7): [True: 0, False: 345]
  |  Branch (6515:25): [True: 0, False: 345]
  ------------------
 6516|       |
 6517|       |  // The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
 6518|    345|  const std::string flag_str =
 6519|    345|      std::string("--") + GTEST_FLAG_PREFIX_ + flag_name;
  ------------------
  |  |  346|    345|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
 6520|    345|  const size_t flag_len = flag_str.length();
 6521|    345|  if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;
  ------------------
  |  Branch (6521:7): [True: 345, False: 0]
  ------------------
 6522|       |
 6523|       |  // Skips the flag name.
 6524|      0|  const char* flag_end = str + flag_len;
 6525|       |
 6526|       |  // When def_optional is true, it's OK to not have a "=value" part.
 6527|      0|  if (def_optional && (flag_end[0] == '\0')) {
  ------------------
  |  Branch (6527:7): [True: 0, False: 0]
  |  Branch (6527:23): [True: 0, False: 0]
  ------------------
 6528|      0|    return flag_end;
 6529|      0|  }
 6530|       |
 6531|       |  // If def_optional is true and there are more characters after the
 6532|       |  // flag name, or if def_optional is false, there must be a '=' after
 6533|       |  // the flag name.
 6534|      0|  if (flag_end[0] != '=') return nullptr;
  ------------------
  |  Branch (6534:7): [True: 0, False: 0]
  ------------------
 6535|       |
 6536|       |  // Returns the string after "=".
 6537|      0|  return flag_end + 1;
 6538|      0|}
_ZN7testing8internal27PrettyUnitTestResultPrinter18OnTestProgramStartERKNS_8UnitTestE:
 3407|      2|  void OnTestProgramStart(const UnitTest& /*unit_test*/) override {}
_ZN7testing8internal27PrettyUnitTestResultPrinter22OnEnvironmentsSetUpEndERKNS_8UnitTestE:
 3410|      2|  void OnEnvironmentsSetUpEnd(const UnitTest& /*unit_test*/) override {}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc:
 2673|      4|                                           const char* location) {
 2674|       |  // NOTE: The user code can affect the way in which Google Test handles
 2675|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2676|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2677|       |  // after the exception is caught and either report or re-throw the
 2678|       |  // exception based on the flag's value:
 2679|       |  //
 2680|       |  // try {
 2681|       |  //   // Perform the test method.
 2682|       |  // } catch (...) {
 2683|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2684|       |  //     // Report the exception as failure.
 2685|       |  //   else
 2686|       |  //     throw;  // Re-throws the original exception.
 2687|       |  // }
 2688|       |  //
 2689|       |  // However, the purpose of this flag is to allow the program to drop into
 2690|       |  // the debugger when the exception is thrown. On most platforms, once the
 2691|       |  // control enters the catch block, the exception origin information is
 2692|       |  // lost and the debugger will stop the program at the point of the
 2693|       |  // re-throw in this function -- instead of at the point of the original
 2694|       |  // throw statement in the code under test.  For this reason, we perform
 2695|       |  // the check early, sacrificing the ability to affect Google Test's
 2696|       |  // exception handling in the method where the exception is thrown.
 2697|      4|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2697:7): [True: 4, False: 0]
  ------------------
 2698|      4|#if GTEST_HAS_EXCEPTIONS
 2699|      4|    try {
 2700|      4|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2701|      4|    } catch (const AssertionException&) {  // NOLINT
 2702|       |      // This failure was reported already.
 2703|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2704|       |      // This exception type can only be thrown by a failed Google
 2705|       |      // Test assertion with the intention of letting another testing
 2706|       |      // framework catch it.  Therefore we just re-throw it.
 2707|      0|      throw;
 2708|      0|    } catch (const std::exception& e) {  // NOLINT
 2709|      0|      internal::ReportFailureInUnknownLocation(
 2710|      0|          TestPartResult::kFatalFailure,
 2711|      0|          FormatCxxExceptionMessage(e.what(), location));
 2712|      0|    } catch (...) {  // NOLINT
 2713|      0|      internal::ReportFailureInUnknownLocation(
 2714|      0|          TestPartResult::kFatalFailure,
 2715|      0|          FormatCxxExceptionMessage(nullptr, location));
 2716|      0|    }
 2717|      0|    return static_cast<Result>(0);
 2718|       |#else
 2719|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2720|       |#endif  // GTEST_HAS_EXCEPTIONS
 2721|      4|  } else {
 2722|      0|    return (object->*method)();
 2723|      0|  }
 2724|      4|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc:
 2654|      4|                                              const char* location) {
 2655|       |#if GTEST_HAS_SEH
 2656|       |  __try {
 2657|       |    return (object->*method)();
 2658|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2659|       |      GetExceptionCode(), location)) {
 2660|       |    return static_cast<Result>(0);
 2661|       |  }
 2662|       |#else
 2663|      4|  (void)location;
 2664|      4|  return (object->*method)();
 2665|      4|#endif  // GTEST_HAS_SEH
 2666|      4|}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc:
 2673|      2|                                           const char* location) {
 2674|       |  // NOTE: The user code can affect the way in which Google Test handles
 2675|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2676|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2677|       |  // after the exception is caught and either report or re-throw the
 2678|       |  // exception based on the flag's value:
 2679|       |  //
 2680|       |  // try {
 2681|       |  //   // Perform the test method.
 2682|       |  // } catch (...) {
 2683|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2684|       |  //     // Report the exception as failure.
 2685|       |  //   else
 2686|       |  //     throw;  // Re-throws the original exception.
 2687|       |  // }
 2688|       |  //
 2689|       |  // However, the purpose of this flag is to allow the program to drop into
 2690|       |  // the debugger when the exception is thrown. On most platforms, once the
 2691|       |  // control enters the catch block, the exception origin information is
 2692|       |  // lost and the debugger will stop the program at the point of the
 2693|       |  // re-throw in this function -- instead of at the point of the original
 2694|       |  // throw statement in the code under test.  For this reason, we perform
 2695|       |  // the check early, sacrificing the ability to affect Google Test's
 2696|       |  // exception handling in the method where the exception is thrown.
 2697|      2|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2697:7): [True: 2, False: 0]
  ------------------
 2698|      2|#if GTEST_HAS_EXCEPTIONS
 2699|      2|    try {
 2700|      2|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2701|      2|    } catch (const AssertionException&) {  // NOLINT
 2702|       |      // This failure was reported already.
 2703|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2704|       |      // This exception type can only be thrown by a failed Google
 2705|       |      // Test assertion with the intention of letting another testing
 2706|       |      // framework catch it.  Therefore we just re-throw it.
 2707|      0|      throw;
 2708|      0|    } catch (const std::exception& e) {  // NOLINT
 2709|      0|      internal::ReportFailureInUnknownLocation(
 2710|      0|          TestPartResult::kFatalFailure,
 2711|      0|          FormatCxxExceptionMessage(e.what(), location));
 2712|      0|    } catch (...) {  // NOLINT
 2713|      0|      internal::ReportFailureInUnknownLocation(
 2714|      0|          TestPartResult::kFatalFailure,
 2715|      0|          FormatCxxExceptionMessage(nullptr, location));
 2716|      0|    }
 2717|      0|    return static_cast<Result>(0);
 2718|       |#else
 2719|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2720|       |#endif  // GTEST_HAS_EXCEPTIONS
 2721|      2|  } else {
 2722|      0|    return (object->*method)();
 2723|      0|  }
 2724|      2|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc:
 2654|      2|                                              const char* location) {
 2655|       |#if GTEST_HAS_SEH
 2656|       |  __try {
 2657|       |    return (object->*method)();
 2658|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2659|       |      GetExceptionCode(), location)) {
 2660|       |    return static_cast<Result>(0);
 2661|       |  }
 2662|       |#else
 2663|      2|  (void)location;
 2664|      2|  return (object->*method)();
 2665|      2|#endif  // GTEST_HAS_SEH
 2666|      2|}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc:
 2673|      2|                                           const char* location) {
 2674|       |  // NOTE: The user code can affect the way in which Google Test handles
 2675|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2676|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2677|       |  // after the exception is caught and either report or re-throw the
 2678|       |  // exception based on the flag's value:
 2679|       |  //
 2680|       |  // try {
 2681|       |  //   // Perform the test method.
 2682|       |  // } catch (...) {
 2683|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2684|       |  //     // Report the exception as failure.
 2685|       |  //   else
 2686|       |  //     throw;  // Re-throws the original exception.
 2687|       |  // }
 2688|       |  //
 2689|       |  // However, the purpose of this flag is to allow the program to drop into
 2690|       |  // the debugger when the exception is thrown. On most platforms, once the
 2691|       |  // control enters the catch block, the exception origin information is
 2692|       |  // lost and the debugger will stop the program at the point of the
 2693|       |  // re-throw in this function -- instead of at the point of the original
 2694|       |  // throw statement in the code under test.  For this reason, we perform
 2695|       |  // the check early, sacrificing the ability to affect Google Test's
 2696|       |  // exception handling in the method where the exception is thrown.
 2697|      2|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2697:7): [True: 2, False: 0]
  ------------------
 2698|      2|#if GTEST_HAS_EXCEPTIONS
 2699|      2|    try {
 2700|      2|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2701|      2|    } catch (const AssertionException&) {  // NOLINT
 2702|       |      // This failure was reported already.
 2703|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2704|       |      // This exception type can only be thrown by a failed Google
 2705|       |      // Test assertion with the intention of letting another testing
 2706|       |      // framework catch it.  Therefore we just re-throw it.
 2707|      0|      throw;
 2708|      0|    } catch (const std::exception& e) {  // NOLINT
 2709|      0|      internal::ReportFailureInUnknownLocation(
 2710|      0|          TestPartResult::kFatalFailure,
 2711|      0|          FormatCxxExceptionMessage(e.what(), location));
 2712|      0|    } catch (...) {  // NOLINT
 2713|      0|      internal::ReportFailureInUnknownLocation(
 2714|      0|          TestPartResult::kFatalFailure,
 2715|      0|          FormatCxxExceptionMessage(nullptr, location));
 2716|      0|    }
 2717|      0|    return static_cast<Result>(0);
 2718|       |#else
 2719|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2720|       |#endif  // GTEST_HAS_EXCEPTIONS
 2721|      2|  } else {
 2722|      0|    return (object->*method)();
 2723|      0|  }
 2724|      2|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc:
 2654|      2|                                              const char* location) {
 2655|       |#if GTEST_HAS_SEH
 2656|       |  __try {
 2657|       |    return (object->*method)();
 2658|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2659|       |      GetExceptionCode(), location)) {
 2660|       |    return static_cast<Result>(0);
 2661|       |  }
 2662|       |#else
 2663|      2|  (void)location;
 2664|      2|  return (object->*method)();
 2665|      2|#endif  // GTEST_HAS_SEH
 2666|      2|}
_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
 2673|      2|                                           const char* location) {
 2674|       |  // NOTE: The user code can affect the way in which Google Test handles
 2675|       |  // exceptions by setting GTEST_FLAG(catch_exceptions), but only before
 2676|       |  // RUN_ALL_TESTS() starts. It is technically possible to check the flag
 2677|       |  // after the exception is caught and either report or re-throw the
 2678|       |  // exception based on the flag's value:
 2679|       |  //
 2680|       |  // try {
 2681|       |  //   // Perform the test method.
 2682|       |  // } catch (...) {
 2683|       |  //   if (GTEST_FLAG_GET(catch_exceptions))
 2684|       |  //     // Report the exception as failure.
 2685|       |  //   else
 2686|       |  //     throw;  // Re-throws the original exception.
 2687|       |  // }
 2688|       |  //
 2689|       |  // However, the purpose of this flag is to allow the program to drop into
 2690|       |  // the debugger when the exception is thrown. On most platforms, once the
 2691|       |  // control enters the catch block, the exception origin information is
 2692|       |  // lost and the debugger will stop the program at the point of the
 2693|       |  // re-throw in this function -- instead of at the point of the original
 2694|       |  // throw statement in the code under test.  For this reason, we perform
 2695|       |  // the check early, sacrificing the ability to affect Google Test's
 2696|       |  // exception handling in the method where the exception is thrown.
 2697|      2|  if (internal::GetUnitTestImpl()->catch_exceptions()) {
  ------------------
  |  Branch (2697:7): [True: 2, False: 0]
  ------------------
 2698|      2|#if GTEST_HAS_EXCEPTIONS
 2699|      2|    try {
 2700|      2|      return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2701|      2|    } catch (const AssertionException&) {  // NOLINT
 2702|       |      // This failure was reported already.
 2703|      0|    } catch (const internal::GoogleTestFailureException&) {  // NOLINT
 2704|       |      // This exception type can only be thrown by a failed Google
 2705|       |      // Test assertion with the intention of letting another testing
 2706|       |      // framework catch it.  Therefore we just re-throw it.
 2707|      0|      throw;
 2708|      0|    } catch (const std::exception& e) {  // NOLINT
 2709|      0|      internal::ReportFailureInUnknownLocation(
 2710|      0|          TestPartResult::kFatalFailure,
 2711|      0|          FormatCxxExceptionMessage(e.what(), location));
 2712|      0|    } catch (...) {  // NOLINT
 2713|      0|      internal::ReportFailureInUnknownLocation(
 2714|      0|          TestPartResult::kFatalFailure,
 2715|      0|          FormatCxxExceptionMessage(nullptr, location));
 2716|      0|    }
 2717|      0|    return static_cast<Result>(0);
 2718|       |#else
 2719|       |    return HandleSehExceptionsInMethodIfSupported(object, method, location);
 2720|       |#endif  // GTEST_HAS_EXCEPTIONS
 2721|      2|  } else {
 2722|      0|    return (object->*method)();
 2723|      0|  }
 2724|      2|}
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
 2654|      2|                                              const char* location) {
 2655|       |#if GTEST_HAS_SEH
 2656|       |  __try {
 2657|       |    return (object->*method)();
 2658|       |  } __except (internal::UnitTestOptions::GTestProcessSEH(  // NOLINT
 2659|       |      GetExceptionCode(), location)) {
 2660|       |    return static_cast<Result>(0);
 2661|       |  }
 2662|       |#else
 2663|      2|  (void)location;
 2664|      2|  return (object->*method)();
 2665|      2|#endif  // GTEST_HAS_SEH
 2666|      2|}
_ZN7testing8internal28ParseGoogleTestFlagsOnlyImplIcEEvPiPPT_:
 6805|      2|void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
 6806|      2|  std::string flagfile_value;
 6807|     17|  for (int i = 1; i < *argc; i++) {
  ------------------
  |  Branch (6807:19): [True: 15, False: 2]
  ------------------
 6808|     15|    const std::string arg_string = StreamableToString(argv[i]);
 6809|     15|    const char* const arg = arg_string.c_str();
 6810|       |
 6811|     15|    using internal::ParseFlag;
 6812|       |
 6813|     15|    bool remove_flag = false;
 6814|     15|    if (ParseGoogleTestFlag(arg)) {
  ------------------
  |  Branch (6814:9): [True: 0, False: 15]
  ------------------
 6815|      0|      remove_flag = true;
 6816|      0|#if GTEST_USE_OWN_FLAGFILE_FLAG_ && GTEST_HAS_FILE_SYSTEM
 6817|     15|    } else if (ParseFlag(arg, "flagfile", &flagfile_value)) {
  ------------------
  |  Branch (6817:16): [True: 0, False: 15]
  ------------------
 6818|      0|      GTEST_FLAG_SET(flagfile, flagfile_value);
  ------------------
  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  ------------------
  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  ------------------
  ------------------
 6819|      0|      LoadFlagsFromFile(flagfile_value);
 6820|      0|      remove_flag = true;
 6821|      0|#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_ && GTEST_HAS_FILE_SYSTEM
 6822|     15|    } else if (arg_string == "--help" || HasGoogleTestFlagPrefix(arg)) {
  ------------------
  |  Branch (6822:16): [True: 0, False: 15]
  |  Branch (6822:42): [True: 0, False: 15]
  ------------------
 6823|       |      // Both help flag and unrecognized Google Test flags (excluding
 6824|       |      // internal ones) trigger help display.
 6825|      0|      g_help_flag = true;
 6826|      0|    }
 6827|       |
 6828|     15|    if (remove_flag) {
  ------------------
  |  Branch (6828:9): [True: 0, False: 15]
  ------------------
 6829|       |      // Shift the remainder of the argv list left by one.
 6830|      0|      for (int j = i + 1; j < *argc; ++j) {
  ------------------
  |  Branch (6830:27): [True: 0, False: 0]
  ------------------
 6831|      0|        argv[j - 1] = argv[j];
 6832|      0|      }
 6833|       |
 6834|       |      // Decrements the argument count.
 6835|      0|      (*argc)--;
 6836|       |
 6837|       |      // Terminate the array with nullptr.
 6838|      0|      argv[*argc] = nullptr;
 6839|       |
 6840|       |      // We also need to decrement the iterator as we just removed
 6841|       |      // an element.
 6842|      0|      i--;
 6843|      0|    }
 6844|     15|  }
 6845|       |
 6846|      2|  if (g_help_flag) {
  ------------------
  |  Branch (6846:7): [True: 0, False: 2]
  ------------------
 6847|       |    // We print the help here instead of in RUN_ALL_TESTS(), as the
 6848|       |    // latter may not be called at all if the user is using Google
 6849|       |    // Test with another testing framework.
 6850|      0|    PrintColorEncoded(kColorEncodedHelpMessage);
 6851|      0|  }
 6852|      2|}
gtest-all.cc:_ZN7testing8internalL19ParseGoogleTestFlagEPKc:
 6748|     15|static bool ParseGoogleTestFlag(const char* const arg) {
 6749|     15|#define GTEST_INTERNAL_PARSE_FLAG(flag_name)  \
 6750|     15|  do {                                        \
 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
 6753|     15|      GTEST_FLAG_SET(flag_name, value);       \
 6754|     15|      return true;                            \
 6755|     15|    }                                         \
 6756|     15|  } while (false)
 6757|       |
 6758|     15|  GTEST_INTERNAL_PARSE_FLAG(also_run_disabled_tests);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6759|     15|  GTEST_INTERNAL_PARSE_FLAG(break_on_failure);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6760|     15|  GTEST_INTERNAL_PARSE_FLAG(catch_exceptions);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6761|     15|  GTEST_INTERNAL_PARSE_FLAG(color);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6762|     15|  GTEST_INTERNAL_PARSE_FLAG(death_test_style);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6763|     15|  GTEST_INTERNAL_PARSE_FLAG(death_test_use_fork);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6764|     15|  GTEST_INTERNAL_PARSE_FLAG(fail_fast);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6765|     15|  GTEST_INTERNAL_PARSE_FLAG(fail_if_no_test_linked);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6766|     15|  GTEST_INTERNAL_PARSE_FLAG(filter);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6767|     15|  GTEST_INTERNAL_PARSE_FLAG(internal_run_death_test);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6768|     15|  GTEST_INTERNAL_PARSE_FLAG(list_tests);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6769|     15|  GTEST_INTERNAL_PARSE_FLAG(output);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6770|     15|  GTEST_INTERNAL_PARSE_FLAG(brief);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6771|     15|  GTEST_INTERNAL_PARSE_FLAG(print_time);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6772|     15|  GTEST_INTERNAL_PARSE_FLAG(print_utf8);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6773|     15|  GTEST_INTERNAL_PARSE_FLAG(random_seed);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6774|     15|  GTEST_INTERNAL_PARSE_FLAG(repeat);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6775|     15|  GTEST_INTERNAL_PARSE_FLAG(recreate_environments_when_repeating);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6776|     15|  GTEST_INTERNAL_PARSE_FLAG(shuffle);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6777|     15|  GTEST_INTERNAL_PARSE_FLAG(stack_trace_depth);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6778|     15|  GTEST_INTERNAL_PARSE_FLAG(stream_result_to);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6779|     15|  GTEST_INTERNAL_PARSE_FLAG(throw_on_failure);
  ------------------
  |  | 6750|     15|  do {                                        \
  |  | 6751|     15|    auto value = GTEST_FLAG_GET(flag_name);   \
  |  |  ------------------
  |  |  |  | 2310|     15|#define GTEST_FLAG_GET(name) ::testing::GTEST_FLAG(name)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|     15|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6752|     15|    if (ParseFlag(arg, #flag_name, &value)) { \
  |  |  ------------------
  |  |  |  Branch (6752:9): [True: 0, False: 15]
  |  |  ------------------
  |  | 6753|      0|      GTEST_FLAG_SET(flag_name, value);       \
  |  |  ------------------
  |  |  |  | 2311|      0|#define GTEST_FLAG_SET(name, value) (void)(::testing::GTEST_FLAG(name) = value)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2242|      0|#define GTEST_FLAG(name) FLAGS_gtest_##name
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 6754|      0|      return true;                            \
  |  | 6755|      0|    }                                         \
  |  | 6756|     15|  } while (false)
  |  |  ------------------
  |  |  |  Branch (6756:12): [Folded, False: 15]
  |  |  ------------------
  ------------------
 6780|     15|  return false;
 6781|     15|}
gtest-all.cc:_ZN7testing8internalL9ParseFlagEPKcS2_Pb:
 6550|    195|static bool ParseFlag(const char* str, const char* flag_name, bool* value) {
 6551|       |  // Gets the value of the flag as a string.
 6552|    195|  const char* const value_str = ParseFlagValue(str, flag_name, true);
 6553|       |
 6554|       |  // Aborts if the parsing failed.
 6555|    195|  if (value_str == nullptr) return false;
  ------------------
  |  Branch (6555:7): [True: 195, False: 0]
  ------------------
 6556|       |
 6557|       |  // Converts the string value to a bool.
 6558|      0|  *value = !(*value_str == '0' || *value_str == 'f' || *value_str == 'F');
  ------------------
  |  Branch (6558:14): [True: 0, False: 0]
  |  Branch (6558:35): [True: 0, False: 0]
  |  Branch (6558:56): [True: 0, False: 0]
  ------------------
 6559|      0|  return true;
 6560|    195|}
gtest-all.cc:_ZN7testing8internalL9ParseFlagINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEEbPKcSA_PT_:
 6583|    105|static bool ParseFlag(const char* str, const char* flag_name, String* value) {
 6584|       |  // Gets the value of the flag as a string.
 6585|    105|  const char* const value_str = ParseFlagValue(str, flag_name, false);
 6586|       |
 6587|       |  // Aborts if the parsing failed.
 6588|    105|  if (value_str == nullptr) return false;
  ------------------
  |  Branch (6588:7): [True: 105, False: 0]
  ------------------
 6589|       |
 6590|       |  // Sets *value to the value of the flag.
 6591|      0|  *value = value_str;
 6592|      0|  return true;
 6593|    105|}
gtest-all.cc:_ZN7testing8internalL23HasGoogleTestFlagPrefixEPKc:
 6601|     15|static bool HasGoogleTestFlagPrefix(const char* str) {
 6602|     15|  return (SkipPrefix("--", &str) || SkipPrefix("-", &str) ||
  ------------------
  |  Branch (6602:11): [True: 6, False: 9]
  |  Branch (6602:37): [True: 5, False: 4]
  ------------------
 6603|      4|          SkipPrefix("/", &str)) &&
  ------------------
  |  Branch (6603:11): [True: 4, False: 0]
  ------------------
 6604|     15|         !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) &&
  ------------------
  |  |  346|     15|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
  |  Branch (6604:10): [True: 15, False: 0]
  ------------------
 6605|     15|         (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||
  ------------------
  |  |  346|     15|#define GTEST_FLAG_PREFIX_ "gtest_"
  ------------------
  |  Branch (6605:11): [True: 0, False: 15]
  ------------------
 6606|     15|          SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));
  ------------------
  |  |  347|     15|#define GTEST_FLAG_PREFIX_DASH_ "gtest-"
  ------------------
  |  Branch (6606:11): [True: 0, False: 15]
  ------------------
 6607|     15|}
_ZN7testing8internal18InitGoogleTestImplIcEEvPiPPT_:
 6933|      2|void InitGoogleTestImpl(int* argc, CharType** argv) {
 6934|       |  // We don't want to run the initialization code twice.
 6935|      2|  if (GTestIsInitialized()) return;
  ------------------
  |  Branch (6935:7): [True: 0, False: 2]
  ------------------
 6936|       |
 6937|      2|  if (*argc <= 0) return;
  ------------------
  |  Branch (6937:7): [True: 0, False: 2]
  ------------------
 6938|       |
 6939|      2|  g_argvs.clear();
 6940|     19|  for (int i = 0; i != *argc; i++) {
  ------------------
  |  Branch (6940:19): [True: 17, False: 2]
  ------------------
 6941|     17|    g_argvs.push_back(StreamableToString(argv[i]));
 6942|     17|  }
 6943|       |
 6944|       |#ifdef GTEST_HAS_ABSL
 6945|       |  absl::InitializeSymbolizer(g_argvs[0].c_str());
 6946|       |
 6947|       |#ifdef GTEST_HAS_ABSL_FLAGS
 6948|       |  // When using the Abseil Flags library, set the program usage message to the
 6949|       |  // help message, but remove the color-encoding from the message first.
 6950|       |  absl::SetProgramUsageMessage(absl::StrReplaceAll(
 6951|       |      kColorEncodedHelpMessage,
 6952|       |      {{"@D", ""}, {"@R", ""}, {"@G", ""}, {"@Y", ""}, {"@@", "@"}}));
 6953|       |#endif  // GTEST_HAS_ABSL_FLAGS
 6954|       |#endif  // GTEST_HAS_ABSL
 6955|       |
 6956|      2|  ParseGoogleTestFlagsOnly(argc, argv);
 6957|      2|  GetUnitTestImpl()->PostFlagParsingInit();
 6958|      2|}

obu.c:clz:
  186|    782|static inline int clz(const unsigned int mask) {
  187|    782|    return __builtin_clz(mask);
  188|    782|}
decode.c:ctz:
  182|  3.28k|static inline int ctz(const unsigned int mask) {
  183|  3.28k|    return __builtin_ctz(mask);
  184|  3.28k|}
decode.c:clz:
  186|  5.50M|static inline int clz(const unsigned int mask) {
  187|  5.50M|    return __builtin_clz(mask);
  188|  5.50M|}
getbits.c:clz:
  186|  10.4k|static inline int clz(const unsigned int mask) {
  187|  10.4k|    return __builtin_clz(mask);
  188|  10.4k|}
lf_mask.c:clz:
  186|  6.57M|static inline int clz(const unsigned int mask) {
  187|  6.57M|    return __builtin_clz(mask);
  188|  6.57M|}
warpmv.c:clz:
  186|  7.39k|static inline int clz(const unsigned int mask) {
  187|  7.39k|    return __builtin_clz(mask);
  188|  7.39k|}
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|   574k|static inline int clz(const unsigned int mask) {
  187|   574k|    return __builtin_clz(mask);
  188|   574k|}
recon_tmpl.c:clz:
  186|  10.2M|static inline int clz(const unsigned int mask) {
  187|  10.2M|    return __builtin_clz(mask);
  188|  10.2M|}
cdef_apply_tmpl.c:clz:
  186|   148k|static inline int clz(const unsigned int mask) {
  187|   148k|    return __builtin_clz(mask);
  188|   148k|}
ipred_prepare_tmpl.c:clz:
  186|  5.20M|static inline int clz(const unsigned int mask) {
  187|  5.20M|    return __builtin_clz(mask);
  188|  5.20M|}

fg_apply_tmpl.c:PXSTRIDE:
   79|  19.7k|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  19.7k|    assert(!(x & 1));
  ------------------
  |  |  140|  19.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 19.7k]
  |  |  |  Branch (140:68): [Folded, False: 19.7k]
  |  |  ------------------
  ------------------
   81|  19.7k|    return x >> 1;
   82|  19.7k|}
itx_tmpl.c:PXSTRIDE:
   79|  2.25M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  2.25M|    assert(!(x & 1));
  ------------------
  |  |  140|  2.25M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 2.25M]
  |  |  |  Branch (140:68): [Folded, False: 2.25M]
  |  |  ------------------
  ------------------
   81|  2.25M|    return x >> 1;
   82|  2.25M|}
looprestoration_tmpl.c:PXSTRIDE:
   79|  1.33M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  1.33M|    assert(!(x & 1));
  ------------------
  |  |  140|  1.33M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.33M]
  |  |  |  Branch (140:68): [Folded, False: 1.33M]
  |  |  ------------------
  ------------------
   81|  1.33M|    return x >> 1;
   82|  1.33M|}
recon_tmpl.c:PXSTRIDE:
   79|  6.48M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  6.48M|    assert(!(x & 1));
  ------------------
  |  |  140|  6.48M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 6.48M]
  |  |  |  Branch (140:68): [Folded, False: 6.48M]
  |  |  ------------------
  ------------------
   81|  6.48M|    return x >> 1;
   82|  6.48M|}
cdef_apply_tmpl.c:PXSTRIDE:
   79|  4.94M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  4.94M|    assert(!(x & 1));
  ------------------
  |  |  140|  4.94M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.94M]
  |  |  |  Branch (140:68): [Folded, False: 4.94M]
  |  |  ------------------
  ------------------
   81|  4.94M|    return x >> 1;
   82|  4.94M|}
ipred_prepare_tmpl.c:PXSTRIDE:
   79|  63.0M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  63.0M|    assert(!(x & 1));
  ------------------
  |  |  140|  63.0M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 63.0M]
  |  |  |  Branch (140:68): [Folded, False: 63.0M]
  |  |  ------------------
  ------------------
   81|  63.0M|    return x >> 1;
   82|  63.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.8M|    for (int n = 0; n < num; n++)
  ------------------
  |  Branch (67:21): [True: 11.2M, False: 643k]
  ------------------
   68|  11.2M|        dst[n] = val;
   69|   643k|}
lf_apply_tmpl.c:PXSTRIDE:
   79|  3.17M|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|  3.17M|    assert(!(x & 1));
  ------------------
  |  |  140|  3.17M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.17M]
  |  |  |  Branch (140:68): [Folded, False: 3.17M]
  |  |  ------------------
  ------------------
   81|  3.17M|    return x >> 1;
   82|  3.17M|}
lr_apply_tmpl.c:PXSTRIDE:
   79|   390k|static inline ptrdiff_t PXSTRIDE(const ptrdiff_t x) {
   80|   390k|    assert(!(x & 1));
  ------------------
  |  |  140|   390k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 390k]
  |  |  |  Branch (140:68): [Folded, False: 390k]
  |  |  ------------------
  ------------------
   81|   390k|    return x >> 1;
   82|   390k|}

lib.c:umin:
   47|  14.0k|static inline unsigned umin(const unsigned a, const unsigned b) {
   48|  14.0k|    return a < b ? a : b;
  ------------------
  |  Branch (48:12): [True: 0, False: 14.0k]
  ------------------
   49|  14.0k|}
obu.c:ulog2:
   67|    782|static inline int ulog2(const unsigned v) {
   68|    782|    return 31 ^ clz(v);
   69|    782|}
obu.c:imin:
   39|  71.2k|static inline int imin(const int a, const int b) {
   40|  71.2k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 58.1k, False: 13.0k]
  ------------------
   41|  71.2k|}
obu.c:imax:
   35|  59.4k|static inline int imax(const int a, const int b) {
   36|  59.4k|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 7.69k, False: 51.7k]
  ------------------
   37|  59.4k|}
obu.c:iclip_u8:
   55|  67.4k|static inline int iclip_u8(const int v) {
   56|  67.4k|    return iclip(v, 0, 255);
   57|  67.4k|}
obu.c:iclip:
   51|  67.4k|static inline int iclip(const int v, const int min, const int max) {
   52|  67.4k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 7.07k, False: 60.3k]
  |  Branch (52:28): [True: 8.54k, False: 51.7k]
  ------------------
   53|  67.4k|}
refmvs.c:imin:
   39|  3.45M|static inline int imin(const int a, const int b) {
   40|  3.45M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 1.70M, False: 1.75M]
  ------------------
   41|  3.45M|}
refmvs.c:apply_sign:
   59|  64.0k|static inline int apply_sign(const int v, const int s) {
   60|  64.0k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (60:12): [True: 28.6k, False: 35.4k]
  ------------------
   61|  64.0k|}
refmvs.c:imax:
   35|  1.60M|static inline int imax(const int a, const int b) {
   36|  1.60M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 348k, False: 1.25M]
  ------------------
   37|  1.60M|}
refmvs.c:iclip:
   51|  1.72M|static inline int iclip(const int v, const int min, const int max) {
   52|  1.72M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 23.6k, False: 1.70M]
  |  Branch (52:28): [True: 11.1k, False: 1.69M]
  ------------------
   53|  1.72M|}
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|  10.9k|static inline int imin(const int a, const int b) {
   40|  10.9k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 963, False: 9.95k]
  ------------------
   41|  10.9k|}
cdf.c:imin:
   39|  25.1k|static inline int imin(const int a, const int b) {
   40|  25.1k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 6.27k, False: 18.8k]
  ------------------
   41|  25.1k|}
decode.c:iclip:
   51|   856k|static inline int iclip(const int v, const int min, const int max) {
   52|   856k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 42.6k, False: 813k]
  |  Branch (52:28): [True: 40.0k, False: 773k]
  ------------------
   53|   856k|}
decode.c:apply_sign:
   59|  12.4k|static inline int apply_sign(const int v, const int s) {
   60|  12.4k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (60:12): [True: 5.76k, False: 6.65k]
  ------------------
   61|  12.4k|}
decode.c:ulog2:
   67|  5.50M|static inline int ulog2(const unsigned v) {
   68|  5.50M|    return 31 ^ clz(v);
   69|  5.50M|}
decode.c:imax:
   35|  2.45M|static inline int imax(const int a, const int b) {
   36|  2.45M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 734k, False: 1.72M]
  ------------------
   37|  2.45M|}
decode.c:imin:
   39|  6.95M|static inline int imin(const int a, const int b) {
   40|  6.95M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 5.36M, False: 1.58M]
  ------------------
   41|  6.95M|}
decode.c:iclip_u8:
   55|   702k|static inline int iclip_u8(const int v) {
   56|   702k|    return iclip(v, 0, 255);
   57|   702k|}
getbits.c:ulog2:
   67|  10.4k|static inline int ulog2(const unsigned v) {
   68|  10.4k|    return 31 ^ clz(v);
   69|  10.4k|}
getbits.c:inv_recenter:
   75|  30.1k|static inline unsigned inv_recenter(const unsigned r, const unsigned v) {
   76|  30.1k|    if (v > (r << 1))
  ------------------
  |  Branch (76:9): [True: 46, False: 30.1k]
  ------------------
   77|     46|        return v;
   78|  30.1k|    else if ((v & 1) == 0)
  ------------------
  |  Branch (78:14): [True: 17.6k, False: 12.4k]
  ------------------
   79|  17.6k|        return (v >> 1) + r;
   80|  12.4k|    else
   81|  12.4k|        return r - ((v + 1) >> 1);
   82|  30.1k|}
lf_mask.c:imin:
   39|  34.9M|static inline int imin(const int a, const int b) {
   40|  34.9M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 2.89M, False: 32.0M]
  ------------------
   41|  34.9M|}
lf_mask.c:ulog2:
   67|  6.57M|static inline int ulog2(const unsigned v) {
   68|  6.57M|    return 31 ^ clz(v);
   69|  6.57M|}
lf_mask.c:imax:
   35|  1.03M|static inline int imax(const int a, const int b) {
   36|  1.03M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 978k, False: 61.1k]
  ------------------
   37|  1.03M|}
lf_mask.c:iclip:
   51|  3.03M|static inline int iclip(const int v, const int min, const int max) {
   52|  3.03M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 416k, False: 2.61M]
  |  Branch (52:28): [True: 314k, False: 2.30M]
  ------------------
   53|  3.03M|}
msac.c:inv_recenter:
   75|   104k|static inline unsigned inv_recenter(const unsigned r, const unsigned v) {
   76|   104k|    if (v > (r << 1))
  ------------------
  |  Branch (76:9): [True: 17.1k, False: 86.9k]
  ------------------
   77|  17.1k|        return v;
   78|  86.9k|    else if ((v & 1) == 0)
  ------------------
  |  Branch (78:14): [True: 43.9k, False: 42.9k]
  ------------------
   79|  43.9k|        return (v >> 1) + r;
   80|  42.9k|    else
   81|  42.9k|        return r - ((v + 1) >> 1);
   82|   104k|}
warpmv.c:apply_sign:
   59|  36.9k|static inline int apply_sign(const int v, const int s) {
   60|  36.9k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (60:12): [True: 11.3k, False: 25.6k]
  ------------------
   61|  36.9k|}
warpmv.c:ulog2:
   67|  7.39k|static inline int ulog2(const unsigned v) {
   68|  7.39k|    return 31 ^ clz(v);
   69|  7.39k|}
warpmv.c:apply_sign64:
   63|  29.9k|static inline int apply_sign64(const int v, const int64_t s) {
   64|  29.9k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (64:12): [True: 7.44k, False: 22.5k]
  ------------------
   65|  29.9k|}
warpmv.c:iclip:
   51|  47.7k|static inline int iclip(const int v, const int min, const int max) {
   52|  47.7k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 687, False: 47.0k]
  |  Branch (52:28): [True: 626, False: 46.4k]
  ------------------
   53|  47.7k|}
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|   137M|static inline int iclip(const int v, const int min, const int max) {
   52|   137M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 7.38M, False: 130M]
  |  Branch (52:28): [True: 5.51M, False: 124M]
  ------------------
   53|   137M|}
itx_tmpl.c:imin:
   39|  74.3k|static inline int imin(const int a, const int b) {
   40|  74.3k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 15.6k, False: 58.6k]
  ------------------
   41|  74.3k|}
looprestoration_tmpl.c:iclip:
   51|  19.0M|static inline int iclip(const int v, const int min, const int max) {
   52|  19.0M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 21.1k, False: 19.0M]
  |  Branch (52:28): [True: 19.5k, False: 19.0M]
  ------------------
   53|  19.0M|}
looprestoration_tmpl.c:imax:
   35|  26.4M|static inline int imax(const int a, const int b) {
   36|  26.4M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 6.61M, False: 19.7M]
  ------------------
   37|  26.4M|}
looprestoration_tmpl.c:umin:
   47|  26.4M|static inline unsigned umin(const unsigned a, const unsigned b) {
   48|  26.4M|    return a < b ? a : b;
  ------------------
  |  Branch (48:12): [True: 26.1M, False: 212k]
  ------------------
   49|  26.4M|}
recon_tmpl.c:ulog2:
   67|  10.2M|static inline int ulog2(const unsigned v) {
   68|  10.2M|    return 31 ^ clz(v);
   69|  10.2M|}
recon_tmpl.c:imin:
   39|  30.2M|static inline int imin(const int a, const int b) {
   40|  30.2M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 27.4M, False: 2.73M]
  ------------------
   41|  30.2M|}
recon_tmpl.c:imax:
   35|  1.95M|static inline int imax(const int a, const int b) {
   36|  1.95M|    return a > b ? a : b;
  ------------------
  |  Branch (36:12): [True: 1.16M, False: 785k]
  ------------------
   37|  1.95M|}
recon_tmpl.c:umin:
   47|  66.9M|static inline unsigned umin(const unsigned a, const unsigned b) {
   48|  66.9M|    return a < b ? a : b;
  ------------------
  |  Branch (48:12): [True: 38.5M, False: 28.4M]
  ------------------
   49|  66.9M|}
recon_tmpl.c:apply_sign64:
   63|   456k|static inline int apply_sign64(const int v, const int64_t s) {
   64|   456k|    return s < 0 ? -v : v;
  ------------------
  |  Branch (64:12): [True: 46.7k, False: 410k]
  ------------------
   65|   456k|}
recon_tmpl.c:iclip:
   51|  52.7k|static inline int iclip(const int v, const int min, const int max) {
   52|  52.7k|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 3.99k, False: 48.7k]
  |  Branch (52:28): [True: 669, False: 48.0k]
  ------------------
   53|  52.7k|}
itx_1d.c:iclip:
   51|   328M|static inline int iclip(const int v, const int min, const int max) {
   52|   328M|    return v < min ? min : v > max ? max : v;
  ------------------
  |  Branch (52:12): [True: 2.67M, False: 325M]
  |  Branch (52:28): [True: 2.61M, False: 322M]
  ------------------
   53|   328M|}
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|   911k|static inline int imin(const int a, const int b) {
   40|   911k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 529k, False: 381k]
  ------------------
   41|   911k|}
cdef_apply_tmpl.c:ulog2:
   67|   148k|static inline int ulog2(const unsigned v) {
   68|   148k|    return 31 ^ clz(v);
   69|   148k|}
ipred_prepare_tmpl.c:imin:
   39|  13.5M|static inline int imin(const int a, const int b) {
   40|  13.5M|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 12.5M, False: 1.05M]
  ------------------
   41|  13.5M|}
lf_apply_tmpl.c:imin:
   39|   549k|static inline int imin(const int a, const int b) {
   40|   549k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 242k, False: 307k]
  ------------------
   41|   549k|}
lr_apply_tmpl.c:imin:
   39|   114k|static inline int imin(const int a, const int b) {
   40|   114k|    return a < b ? a : b;
  ------------------
  |  Branch (40:12): [True: 34.0k, False: 80.9k]
  ------------------
   41|   114k|}

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: 20.0k, False: 2.98k]
  ------------------
  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|   152k|    for (int bit = 0, by = by_start; by < by_end; by += 2, edges |= CDEF_HAVE_TOP) {
  ------------------
  |  Branch (124:38): [True: 129k, False: 23.0k]
  ------------------
  125|   129k|        const int tf = tc->top_pre_cdef_toggle;
  126|   129k|        const int by_idx = (by & 30) >> 1;
  127|   129k|        if (by + 2 >= f->bh) edges &= ~CDEF_HAVE_BOTTOM;
  ------------------
  |  Branch (127:13): [True: 2.83k, False: 126k]
  ------------------
  128|       |
  129|   129k|        if ((!have_tt || sbrow_start || by + 2 < by_end) &&
  ------------------
  |  Branch (129:14): [True: 129k, False: 0]
  |  Branch (129:26): [True: 0, False: 0]
  |  Branch (129:41): [True: 0, False: 0]
  ------------------
  130|   129k|            edges & CDEF_HAVE_BOTTOM)
  ------------------
  |  Branch (130:13): [True: 126k, False: 2.83k]
  ------------------
  131|   126k|        {
  132|       |            // backup pre-filter data for next iteration
  133|   126k|            pixel *const cdef_top_bak[3] = {
  134|   126k|                f->lf.cdef_line[!tf][0] + have_tt * sby * 4 * y_stride,
  135|   126k|                f->lf.cdef_line[!tf][1] + have_tt * sby * 8 * uv_stride,
  136|   126k|                f->lf.cdef_line[!tf][2] + have_tt * sby * 8 * uv_stride
  137|   126k|            };
  138|   126k|            backup2lines(cdef_top_bak, ptrs, f->cur.stride, layout);
  139|   126k|        }
  140|       |
  141|   129k|        ALIGN_STK_16(pixel, lr_bak, 2 /* idx */, [3 /* plane */][8 /* y */][2 /* x */]);
  ------------------
  |  |  100|   129k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   129k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  142|   129k|        pixel *iptrs[3] = { ptrs[0], ptrs[1], ptrs[2] };
  143|   129k|        edges &= ~CDEF_HAVE_LEFT;
  144|   129k|        edges |= CDEF_HAVE_RIGHT;
  145|   129k|        enum Backup2x8Flags prev_flag = 0;
  146|   492k|        for (int sbx = 0; sbx < sb64w; sbx++, edges |= CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (146:27): [True: 362k, False: 129k]
  ------------------
  147|   362k|            const int sb128x = sbx >> 1;
  148|   362k|            const int sb64_idx = ((by & sbsz) >> 3) + (sbx & 1);
  149|   362k|            const int cdef_idx = lflvl[sb128x].cdef_idx[sb64_idx];
  150|   362k|            if (cdef_idx == -1 ||
  ------------------
  |  Branch (150:17): [True: 245k, False: 117k]
  ------------------
  151|   117k|                (!f->frame_hdr->cdef.y_strength[cdef_idx] &&
  ------------------
  |  Branch (151:18): [True: 55.7k, False: 61.8k]
  ------------------
  152|  55.7k|                 !f->frame_hdr->cdef.uv_strength[cdef_idx]))
  ------------------
  |  Branch (152:18): [True: 49.1k, False: 6.57k]
  ------------------
  153|   294k|            {
  154|   294k|                prev_flag = 0;
  155|   294k|                goto next_sb;
  156|   294k|            }
  157|       |
  158|       |            // Create a complete 32-bit mask for the sb row ahead of time.
  159|  68.4k|            const uint16_t (*noskip_row)[2] = &lflvl[sb128x].noskip_mask[by_idx];
  160|  68.4k|            const unsigned noskip_mask = (unsigned) noskip_row[0][1] << 16 |
  161|  68.4k|                                                    noskip_row[0][0];
  162|       |
  163|  68.4k|            const int y_lvl = f->frame_hdr->cdef.y_strength[cdef_idx];
  164|  68.4k|            const int uv_lvl = f->frame_hdr->cdef.uv_strength[cdef_idx];
  165|  68.4k|            const enum Backup2x8Flags flag = !!y_lvl + (!!uv_lvl << 1);
  166|       |
  167|  68.4k|            const int y_pri_lvl = (y_lvl >> 2) << bitdepth_min_8;
  168|  68.4k|            int y_sec_lvl = y_lvl & 3;
  169|  68.4k|            y_sec_lvl += y_sec_lvl == 3;
  170|  68.4k|            y_sec_lvl <<= bitdepth_min_8;
  171|       |
  172|  68.4k|            const int uv_pri_lvl = (uv_lvl >> 2) << bitdepth_min_8;
  173|  68.4k|            int uv_sec_lvl = uv_lvl & 3;
  174|  68.4k|            uv_sec_lvl += uv_sec_lvl == 3;
  175|  68.4k|            uv_sec_lvl <<= bitdepth_min_8;
  176|       |
  177|  68.4k|            pixel *bptrs[3] = { iptrs[0], iptrs[1], iptrs[2] };
  178|   293k|            for (int bx = sbx * sbsz; bx < imin((sbx + 1) * sbsz, f->bw);
  ------------------
  |  Branch (178:39): [True: 225k, False: 68.4k]
  ------------------
  179|   225k|                 bx += 2, edges |= CDEF_HAVE_LEFT)
  180|   225k|            {
  181|   225k|                if (bx + 2 >= f->bw) edges &= ~CDEF_HAVE_RIGHT;
  ------------------
  |  Branch (181:21): [True: 26.2k, False: 199k]
  ------------------
  182|       |
  183|       |                // check if this 8x8 block had any coded coefficients; if not,
  184|       |                // go to the next block
  185|   225k|                const uint32_t bx_mask = 3U << (bx & 30);
  186|   225k|                if (!(noskip_mask & bx_mask)) {
  ------------------
  |  Branch (186:21): [True: 22.3k, False: 203k]
  ------------------
  187|  22.3k|                    prev_flag = 0;
  188|  22.3k|                    goto next_b;
  189|  22.3k|                }
  190|   203k|                const enum Backup2x8Flags do_left = (prev_flag ^ flag) & flag;
  191|   203k|                prev_flag = flag;
  192|   203k|                if (do_left && edges & CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (192:21): [True: 26.0k, False: 177k]
  |  Branch (192:32): [True: 4.02k, False: 22.0k]
  ------------------
  193|       |                    // we didn't backup the prefilter data because it wasn't
  194|       |                    // there, so do it here instead
  195|  4.02k|                    backup2x8(lr_bak[bit], bptrs, f->cur.stride, 0, layout, do_left);
  196|  4.02k|                }
  197|   203k|                if (edges & CDEF_HAVE_RIGHT) {
  ------------------
  |  Branch (197:21): [True: 181k, False: 21.8k]
  ------------------
  198|       |                    // backup pre-filter data for next iteration
  199|   181k|                    backup2x8(lr_bak[!bit], bptrs, f->cur.stride, 8, layout, flag);
  200|   181k|                }
  201|       |
  202|   203k|                int dir;
  203|   203k|                unsigned variance;
  204|   203k|                if (y_pri_lvl || uv_pri_lvl)
  ------------------
  |  Branch (204:21): [True: 167k, False: 36.1k]
  |  Branch (204:34): [True: 12.8k, False: 23.2k]
  ------------------
  205|   179k|                    dir = dsp->cdef.dir(bptrs[0], f->cur.stride[0],
  206|   179k|                                        &variance HIGHBD_CALL_SUFFIX);
  207|       |
  208|   203k|                const pixel *top, *bot;
  209|   203k|                ptrdiff_t offset;
  210|       |
  211|   203k|                if (!have_tt) goto st_y;
  ------------------
  |  Branch (211:21): [True: 203k, 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|   203k|            st_y:;
  233|   203k|                    offset = sby * 4 * y_stride;
  234|   203k|                    top = &f->lf.cdef_line[tf][0][have_tt * offset + bx * 4];
  235|   203k|                    bot = bptrs[0] + 8 * y_stride;
  236|   203k|                }
  237|   203k|                if (y_pri_lvl) {
  ------------------
  |  Branch (237:21): [True: 167k, False: 36.1k]
  ------------------
  238|   167k|                    const int adj_y_pri_lvl = adjust_strength(y_pri_lvl, variance);
  239|   167k|                    if (adj_y_pri_lvl || y_sec_lvl)
  ------------------
  |  Branch (239:25): [True: 48.5k, False: 118k]
  |  Branch (239:42): [True: 71.1k, False: 47.2k]
  ------------------
  240|   119k|                        dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  241|   119k|                                        top, bot, adj_y_pri_lvl, y_sec_lvl,
  242|   119k|                                        dir, damping, edges HIGHBD_CALL_SUFFIX);
  243|   167k|                } else if (y_sec_lvl)
  ------------------
  |  Branch (243:28): [True: 16.2k, False: 19.8k]
  ------------------
  244|  16.2k|                    dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  245|  16.2k|                                    top, bot, 0, y_sec_lvl, 0, damping,
  246|  16.2k|                                    edges HIGHBD_CALL_SUFFIX);
  247|       |
  248|   203k|                if (!uv_lvl) goto skip_uv;
  ------------------
  |  Branch (248:21): [True: 79.7k, False: 123k]
  ------------------
  249|   123k|                assert(layout != DAV1D_PIXEL_LAYOUT_I400);
  ------------------
  |  |  140|   123k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 123k]
  |  |  |  Branch (140:68): [Folded, False: 123k]
  |  |  ------------------
  ------------------
  250|       |
  251|   123k|                const int uvdir = uv_pri_lvl ? uv_dir[dir] : 0;
  ------------------
  |  Branch (251:35): [True: 103k, False: 20.1k]
  ------------------
  252|   370k|                for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (252:34): [True: 246k, False: 123k]
  ------------------
  253|   246k|                    if (!have_tt) goto st_uv;
  ------------------
  |  Branch (253:25): [True: 246k, 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|   246k|                st_uv:;
  278|   246k|                        const ptrdiff_t offset = sby * 8 * uv_stride;
  279|   246k|                        top = &f->lf.cdef_line[tf][pl][have_tt * offset + (bx * 4 >> ss_hor)];
  280|   246k|                        bot = bptrs[pl] + (8 >> ss_ver) * uv_stride;
  281|   246k|                    }
  282|   246k|                    dsp->cdef.fb[uv_idx](bptrs[pl], f->cur.stride[1],
  283|   246k|                                         lr_bak[bit][pl], top, bot,
  284|   246k|                                         uv_pri_lvl, uv_sec_lvl, uvdir,
  285|   246k|                                         damping - 1, edges HIGHBD_CALL_SUFFIX);
  286|   246k|                }
  287|       |
  288|   203k|            skip_uv:
  289|   203k|                bit ^= 1;
  290|       |
  291|   225k|            next_b:
  292|   225k|                bptrs[0] += 8;
  293|   225k|                bptrs[1] += 8 >> ss_hor;
  294|   225k|                bptrs[2] += 8 >> ss_hor;
  295|   225k|            }
  296|       |
  297|   362k|        next_sb:
  298|   362k|            iptrs[0] += sbsz * 4;
  299|   362k|            iptrs[1] += sbsz * 4 >> ss_hor;
  300|   362k|            iptrs[2] += sbsz * 4 >> ss_hor;
  301|   362k|        }
  302|       |
  303|   129k|        ptrs[0] += 8 * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|   129k|#define PXSTRIDE(x) (x)
  ------------------
  304|   129k|        ptrs[1] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  ------------------
  |  |   53|   129k|#define PXSTRIDE(x) (x)
  ------------------
  305|   129k|        ptrs[2] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  ------------------
  |  |   53|   129k|#define PXSTRIDE(x) (x)
  ------------------
  306|   129k|        tc->top_pre_cdef_toggle ^= 1;
  307|   129k|    }
  308|  23.0k|}
cdef_apply_tmpl.c:backup2lines:
   44|   334k|{
   45|   334k|    const ptrdiff_t y_stride = PXSTRIDE(stride[0]);
  ------------------
  |  |   53|   334k|#define PXSTRIDE(x) (x)
  ------------------
   46|   334k|    if (y_stride < 0)
  ------------------
  |  Branch (46:9): [True: 0, False: 334k]
  ------------------
   47|      0|        pixel_copy(dst[0] + y_stride, src[0] + 7 * y_stride, -2 * y_stride);
  ------------------
  |  |   47|      0|#define pixel_copy memcpy
  ------------------
   48|   334k|    else
   49|   334k|        pixel_copy(dst[0], src[0] + 6 * y_stride, 2 * y_stride);
  ------------------
  |  |   47|   334k|#define pixel_copy memcpy
  ------------------
   50|       |
   51|   334k|    if (layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (51:9): [True: 212k, False: 122k]
  ------------------
   52|   212k|        const ptrdiff_t uv_stride = PXSTRIDE(stride[1]);
  ------------------
  |  |   53|   212k|#define PXSTRIDE(x) (x)
  ------------------
   53|   212k|        if (uv_stride < 0) {
  ------------------
  |  Branch (53:13): [True: 0, False: 212k]
  ------------------
   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|   212k|        } else {
   58|   212k|            const int uv_off = layout == DAV1D_PIXEL_LAYOUT_I420 ? 2 : 6;
  ------------------
  |  Branch (58:32): [True: 99.3k, False: 112k]
  ------------------
   59|   212k|            pixel_copy(dst[1], src[1] + uv_off * uv_stride, 2 * uv_stride);
  ------------------
  |  |   47|   212k|#define pixel_copy memcpy
  ------------------
   60|   212k|            pixel_copy(dst[2], src[2] + uv_off * uv_stride, 2 * uv_stride);
  ------------------
  |  |   47|   212k|#define pixel_copy memcpy
  ------------------
   61|   212k|        }
   62|   212k|    }
   63|   334k|}
cdef_apply_tmpl.c:backup2x8:
   70|   477k|{
   71|   477k|    ptrdiff_t y_off = 0;
   72|   477k|    if (flag & BACKUP_2X8_Y) {
  ------------------
  |  Branch (72:9): [True: 448k, False: 28.9k]
  ------------------
   73|  4.03M|        for (int y = 0; y < 8; y++, y_off += PXSTRIDE(src_stride[0]))
  ------------------
  |  |   53|  3.58M|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (73:25): [True: 3.58M, False: 448k]
  ------------------
   74|  3.58M|            pixel_copy(dst[0][y], &src[0][y_off + x_off - 2], 2);
  ------------------
  |  |   47|  3.58M|#define pixel_copy memcpy
  ------------------
   75|   448k|    }
   76|       |
   77|   477k|    if (layout == DAV1D_PIXEL_LAYOUT_I400 || !(flag & BACKUP_2X8_UV))
  ------------------
  |  Branch (77:9): [True: 80.3k, False: 396k]
  |  Branch (77:46): [True: 46.1k, False: 350k]
  ------------------
   78|   126k|        return;
   79|       |
   80|   350k|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
   81|   350k|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
   82|       |
   83|   350k|    x_off >>= ss_hor;
   84|   350k|    y_off = 0;
   85|  2.67M|    for (int y = 0; y < (8 >> ss_ver); y++, y_off += PXSTRIDE(src_stride[1])) {
  ------------------
  |  |   53|  2.32M|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (85:21): [True: 2.32M, False: 350k]
  ------------------
   86|  2.32M|        pixel_copy(dst[1][y], &src[1][y_off + x_off - 2], 2);
  ------------------
  |  |   47|  2.32M|#define pixel_copy memcpy
  ------------------
   87|  2.32M|        pixel_copy(dst[2][y], &src[2][y_off + x_off - 2], 2);
  ------------------
  |  |   47|  2.32M|#define pixel_copy memcpy
  ------------------
   88|  2.32M|    }
   89|   350k|}
cdef_apply_tmpl.c:adjust_strength:
   91|   460k|static int adjust_strength(const int strength, const unsigned var) {
   92|   460k|    if (!var) return 0;
  ------------------
  |  Branch (92:9): [True: 232k, False: 227k]
  ------------------
   93|   227k|    const int i = var >> 6 ? imin(ulog2(var >> 6), 12) : 0;
  ------------------
  |  Branch (93:19): [True: 148k, False: 79.4k]
  ------------------
   94|   227k|    return (strength * (4 + i) + 8) >> 4;
   95|   460k|}
dav1d_cdef_brow_16bpc:
  102|  39.6k|{
  103|  39.6k|    Dav1dFrameContext *const f = (Dav1dFrameContext *)tc->f;
  104|  39.6k|    const int bitdepth_min_8 = BITDEPTH == 8 ? 0 : f->cur.p.bpc - 8;
  ------------------
  |  Branch (104:32): [Folded, False: 39.6k]
  ------------------
  105|  39.6k|    const Dav1dDSPContext *const dsp = f->dsp;
  106|  39.6k|    enum CdefEdgeFlags edges = CDEF_HAVE_BOTTOM | (by_start > 0 ? CDEF_HAVE_TOP : 0);
  ------------------
  |  Branch (106:52): [True: 35.9k, False: 3.62k]
  ------------------
  107|  39.6k|    pixel *ptrs[3] = { p[0], p[1], p[2] };
  108|  39.6k|    const int sbsz = 16;
  109|  39.6k|    const int sb64w = f->sb128w << 1;
  110|  39.6k|    const int damping = f->frame_hdr->cdef.damping + bitdepth_min_8;
  111|  39.6k|    const enum Dav1dPixelLayout layout = f->cur.p.layout;
  112|  39.6k|    const int uv_idx = DAV1D_PIXEL_LAYOUT_I444 - layout;
  113|  39.6k|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
  114|  39.6k|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
  115|  39.6k|    static const uint8_t uv_dirs[2][8] = { { 0, 1, 2, 3, 4, 5, 6, 7 },
  116|  39.6k|                                           { 7, 0, 2, 4, 5, 6, 6, 6 } };
  117|  39.6k|    const uint8_t *uv_dir = uv_dirs[layout == DAV1D_PIXEL_LAYOUT_I422];
  118|  39.6k|    const int have_tt = f->c->n_tc > 1;
  119|  39.6k|    const int sb128 = f->seq_hdr->sb128;
  120|  39.6k|    const int resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
  121|  39.6k|    const ptrdiff_t y_stride = PXSTRIDE(f->cur.stride[0]);
  122|  39.6k|    const ptrdiff_t uv_stride = PXSTRIDE(f->cur.stride[1]);
  123|       |
  124|   250k|    for (int bit = 0, by = by_start; by < by_end; by += 2, edges |= CDEF_HAVE_TOP) {
  ------------------
  |  Branch (124:38): [True: 211k, False: 39.6k]
  ------------------
  125|   211k|        const int tf = tc->top_pre_cdef_toggle;
  126|   211k|        const int by_idx = (by & 30) >> 1;
  127|   211k|        if (by + 2 >= f->bh) edges &= ~CDEF_HAVE_BOTTOM;
  ------------------
  |  Branch (127:13): [True: 3.40k, False: 207k]
  ------------------
  128|       |
  129|   211k|        if ((!have_tt || sbrow_start || by + 2 < by_end) &&
  ------------------
  |  Branch (129:14): [True: 211k, False: 0]
  |  Branch (129:26): [True: 0, False: 0]
  |  Branch (129:41): [True: 0, False: 0]
  ------------------
  130|   211k|            edges & CDEF_HAVE_BOTTOM)
  ------------------
  |  Branch (130:13): [True: 207k, False: 3.40k]
  ------------------
  131|   207k|        {
  132|       |            // backup pre-filter data for next iteration
  133|   207k|            pixel *const cdef_top_bak[3] = {
  134|   207k|                f->lf.cdef_line[!tf][0] + have_tt * sby * 4 * y_stride,
  135|   207k|                f->lf.cdef_line[!tf][1] + have_tt * sby * 8 * uv_stride,
  136|   207k|                f->lf.cdef_line[!tf][2] + have_tt * sby * 8 * uv_stride
  137|   207k|            };
  138|   207k|            backup2lines(cdef_top_bak, ptrs, f->cur.stride, layout);
  139|   207k|        }
  140|       |
  141|   211k|        ALIGN_STK_16(pixel, lr_bak, 2 /* idx */, [3 /* plane */][8 /* y */][2 /* x */]);
  ------------------
  |  |  100|   211k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   211k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  142|   211k|        pixel *iptrs[3] = { ptrs[0], ptrs[1], ptrs[2] };
  143|   211k|        edges &= ~CDEF_HAVE_LEFT;
  144|   211k|        edges |= CDEF_HAVE_RIGHT;
  145|   211k|        enum Backup2x8Flags prev_flag = 0;
  146|   745k|        for (int sbx = 0; sbx < sb64w; sbx++, edges |= CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (146:27): [True: 534k, False: 211k]
  ------------------
  147|   534k|            const int sb128x = sbx >> 1;
  148|   534k|            const int sb64_idx = ((by & sbsz) >> 3) + (sbx & 1);
  149|   534k|            const int cdef_idx = lflvl[sb128x].cdef_idx[sb64_idx];
  150|   534k|            if (cdef_idx == -1 ||
  ------------------
  |  Branch (150:17): [True: 323k, False: 210k]
  ------------------
  151|   210k|                (!f->frame_hdr->cdef.y_strength[cdef_idx] &&
  ------------------
  |  Branch (151:18): [True: 106k, False: 103k]
  ------------------
  152|   106k|                 !f->frame_hdr->cdef.uv_strength[cdef_idx]))
  ------------------
  |  Branch (152:18): [True: 99.8k, False: 6.75k]
  ------------------
  153|   423k|            {
  154|   423k|                prev_flag = 0;
  155|   423k|                goto next_sb;
  156|   423k|            }
  157|       |
  158|       |            // Create a complete 32-bit mask for the sb row ahead of time.
  159|   110k|            const uint16_t (*noskip_row)[2] = &lflvl[sb128x].noskip_mask[by_idx];
  160|   110k|            const unsigned noskip_mask = (unsigned) noskip_row[0][1] << 16 |
  161|   110k|                                                    noskip_row[0][0];
  162|       |
  163|   110k|            const int y_lvl = f->frame_hdr->cdef.y_strength[cdef_idx];
  164|   110k|            const int uv_lvl = f->frame_hdr->cdef.uv_strength[cdef_idx];
  165|   110k|            const enum Backup2x8Flags flag = !!y_lvl + (!!uv_lvl << 1);
  166|       |
  167|   110k|            const int y_pri_lvl = (y_lvl >> 2) << bitdepth_min_8;
  168|   110k|            int y_sec_lvl = y_lvl & 3;
  169|   110k|            y_sec_lvl += y_sec_lvl == 3;
  170|   110k|            y_sec_lvl <<= bitdepth_min_8;
  171|       |
  172|   110k|            const int uv_pri_lvl = (uv_lvl >> 2) << bitdepth_min_8;
  173|   110k|            int uv_sec_lvl = uv_lvl & 3;
  174|   110k|            uv_sec_lvl += uv_sec_lvl == 3;
  175|   110k|            uv_sec_lvl <<= bitdepth_min_8;
  176|       |
  177|   110k|            pixel *bptrs[3] = { iptrs[0], iptrs[1], iptrs[2] };
  178|   469k|            for (int bx = sbx * sbsz; bx < imin((sbx + 1) * sbsz, f->bw);
  ------------------
  |  Branch (178:39): [True: 358k, False: 110k]
  ------------------
  179|   358k|                 bx += 2, edges |= CDEF_HAVE_LEFT)
  180|   358k|            {
  181|   358k|                if (bx + 2 >= f->bw) edges &= ~CDEF_HAVE_RIGHT;
  ------------------
  |  Branch (181:21): [True: 48.0k, False: 310k]
  ------------------
  182|       |
  183|       |                // check if this 8x8 block had any coded coefficients; if not,
  184|       |                // go to the next block
  185|   358k|                const uint32_t bx_mask = 3U << (bx & 30);
  186|   358k|                if (!(noskip_mask & bx_mask)) {
  ------------------
  |  Branch (186:21): [True: 31.5k, False: 327k]
  ------------------
  187|  31.5k|                    prev_flag = 0;
  188|  31.5k|                    goto next_b;
  189|  31.5k|                }
  190|   327k|                const enum Backup2x8Flags do_left = (prev_flag ^ flag) & flag;
  191|   327k|                prev_flag = flag;
  192|   327k|                if (do_left && edges & CDEF_HAVE_LEFT) {
  ------------------
  |  Branch (192:21): [True: 47.0k, False: 280k]
  |  Branch (192:32): [True: 4.82k, False: 42.2k]
  ------------------
  193|       |                    // we didn't backup the prefilter data because it wasn't
  194|       |                    // there, so do it here instead
  195|  4.82k|                    backup2x8(lr_bak[bit], bptrs, f->cur.stride, 0, layout, do_left);
  196|  4.82k|                }
  197|   327k|                if (edges & CDEF_HAVE_RIGHT) {
  ------------------
  |  Branch (197:21): [True: 286k, False: 40.3k]
  ------------------
  198|       |                    // backup pre-filter data for next iteration
  199|   286k|                    backup2x8(lr_bak[!bit], bptrs, f->cur.stride, 8, layout, flag);
  200|   286k|                }
  201|       |
  202|   327k|                int dir;
  203|   327k|                unsigned variance;
  204|   327k|                if (y_pri_lvl || uv_pri_lvl)
  ------------------
  |  Branch (204:21): [True: 293k, False: 33.8k]
  |  Branch (204:34): [True: 20.4k, False: 13.4k]
  ------------------
  205|   313k|                    dir = dsp->cdef.dir(bptrs[0], f->cur.stride[0],
  206|   313k|                                        &variance HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   313k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  207|       |
  208|   327k|                const pixel *top, *bot;
  209|   327k|                ptrdiff_t offset;
  210|       |
  211|   327k|                if (!have_tt) goto st_y;
  ------------------
  |  Branch (211:21): [True: 327k, 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|   327k|            st_y:;
  233|   327k|                    offset = sby * 4 * y_stride;
  234|   327k|                    top = &f->lf.cdef_line[tf][0][have_tt * offset + bx * 4];
  235|   327k|                    bot = bptrs[0] + 8 * y_stride;
  236|   327k|                }
  237|   327k|                if (y_pri_lvl) {
  ------------------
  |  Branch (237:21): [True: 293k, False: 33.8k]
  ------------------
  238|   293k|                    const int adj_y_pri_lvl = adjust_strength(y_pri_lvl, variance);
  239|   293k|                    if (adj_y_pri_lvl || y_sec_lvl)
  ------------------
  |  Branch (239:25): [True: 173k, False: 119k]
  |  Branch (239:42): [True: 86.3k, False: 33.2k]
  ------------------
  240|   260k|                        dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  241|   260k|                                        top, bot, adj_y_pri_lvl, y_sec_lvl,
  242|   260k|                                        dir, damping, edges HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   260k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  243|   293k|                } else if (y_sec_lvl)
  ------------------
  |  Branch (243:28): [True: 21.8k, False: 11.9k]
  ------------------
  244|  21.8k|                    dsp->cdef.fb[0](bptrs[0], f->cur.stride[0], lr_bak[bit][0],
  245|  21.8k|                                    top, bot, 0, y_sec_lvl, 0, damping,
  246|  21.8k|                                    edges HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  21.8k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  247|       |
  248|   327k|                if (!uv_lvl) goto skip_uv;
  ------------------
  |  Branch (248:21): [True: 70.6k, False: 256k]
  ------------------
  249|   256k|                assert(layout != DAV1D_PIXEL_LAYOUT_I400);
  ------------------
  |  |  140|   256k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 256k]
  |  |  |  Branch (140:68): [Folded, False: 256k]
  |  |  ------------------
  ------------------
  250|       |
  251|   256k|                const int uvdir = uv_pri_lvl ? uv_dir[dir] : 0;
  ------------------
  |  Branch (251:35): [True: 194k, False: 62.0k]
  ------------------
  252|   770k|                for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (252:34): [True: 513k, False: 256k]
  ------------------
  253|   513k|                    if (!have_tt) goto st_uv;
  ------------------
  |  Branch (253:25): [True: 513k, 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|   513k|                st_uv:;
  278|   513k|                        const ptrdiff_t offset = sby * 8 * uv_stride;
  279|   513k|                        top = &f->lf.cdef_line[tf][pl][have_tt * offset + (bx * 4 >> ss_hor)];
  280|   513k|                        bot = bptrs[pl] + (8 >> ss_ver) * uv_stride;
  281|   513k|                    }
  282|   513k|                    dsp->cdef.fb[uv_idx](bptrs[pl], f->cur.stride[1],
  283|   513k|                                         lr_bak[bit][pl], top, bot,
  284|   513k|                                         uv_pri_lvl, uv_sec_lvl, uvdir,
  285|   513k|                                         damping - 1, edges HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   513k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
  286|   513k|                }
  287|       |
  288|   327k|            skip_uv:
  289|   327k|                bit ^= 1;
  290|       |
  291|   358k|            next_b:
  292|   358k|                bptrs[0] += 8;
  293|   358k|                bptrs[1] += 8 >> ss_hor;
  294|   358k|                bptrs[2] += 8 >> ss_hor;
  295|   358k|            }
  296|       |
  297|   534k|        next_sb:
  298|   534k|            iptrs[0] += sbsz * 4;
  299|   534k|            iptrs[1] += sbsz * 4 >> ss_hor;
  300|   534k|            iptrs[2] += sbsz * 4 >> ss_hor;
  301|   534k|        }
  302|       |
  303|   211k|        ptrs[0] += 8 * PXSTRIDE(f->cur.stride[0]);
  304|   211k|        ptrs[1] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  305|   211k|        ptrs[2] += 8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver;
  306|   211k|        tc->top_pre_cdef_toggle ^= 1;
  307|   211k|    }
  308|  39.6k|}

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

dav1d_cdf_thread_update:
 3918|  2.09k|{
 3919|  2.09k|#define update_cdf_1d(n1d, name) \
 3920|  2.09k|    do { \
 3921|  2.09k|        dst->name[n1d] = 0; \
 3922|  2.09k|    } while (0)
 3923|  2.09k|#define update_cdf_2d(n1d, n2d, name) \
 3924|  2.09k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
 3925|  2.09k|#define update_cdf_3d(n1d, n2d, n3d, name) \
 3926|  2.09k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
 3927|  2.09k|#define update_cdf_4d(n1d, n2d, n3d, n4d, name) \
 3928|  2.09k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
 3929|       |
 3930|  2.09k|    memcpy(dst, src, offsetof(CdfContext, m.intrabc));
 3931|       |
 3932|  2.09k|    update_cdf_3d(2, 2, 4, coef.eob_bin_16);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  12.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.36k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3933|  2.09k|    update_cdf_3d(2, 2, 5, coef.eob_bin_32);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  12.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.36k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3934|  2.09k|    update_cdf_3d(2, 2, 6, coef.eob_bin_64);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  12.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.36k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3935|  2.09k|    update_cdf_3d(2, 2, 7, coef.eob_bin_128);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  12.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.36k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3936|  2.09k|    update_cdf_3d(2, 2, 8, coef.eob_bin_256);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  12.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.36k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3937|  2.09k|    update_cdf_2d(2, 9, coef.eob_bin_512);
  ------------------
  |  | 3924|  6.27k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.18k|    do { \
  |  |  |  | 3921|  4.18k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3938|  2.09k|    update_cdf_2d(2, 10, coef.eob_bin_1024);
  ------------------
  |  | 3924|  6.27k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.18k|    do { \
  |  |  |  | 3921|  4.18k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3939|  2.09k|    update_cdf_4d(N_TX_SIZES, 2, 4, 2, coef.eob_base_tok);
  ------------------
  |  | 3928|  12.5k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  31.3k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   104k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|  83.6k|    do { \
  |  |  |  |  |  |  |  | 3921|  83.6k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|  83.6k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 83.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 83.6k, False: 20.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 20.9k, False: 10.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 10.4k, False: 2.09k]
  |  |  ------------------
  ------------------
 3940|  2.09k|    update_cdf_4d(N_TX_SIZES, 2, 41 /*42*/, 3, coef.base_tok);
  ------------------
  |  | 3928|  12.5k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  31.3k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   878k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|   857k|    do { \
  |  |  |  |  |  |  |  | 3921|   857k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   857k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 857k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 857k, False: 20.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 20.9k, False: 10.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 10.4k, False: 2.09k]
  |  |  ------------------
  ------------------
 3941|  2.09k|    update_cdf_4d(4, 2, 21, 3, coef.br_tok);
  ------------------
  |  | 3928|  10.4k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  25.1k|    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|   351k|    do { \
  |  |  |  |  |  |  |  | 3921|   351k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   351k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 351k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 351k, False: 16.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 16.7k, False: 8.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 8.36k, False: 2.09k]
  |  |  ------------------
  ------------------
 3942|  2.09k|    update_cdf_4d(N_TX_SIZES, 2, 9, 1, coef.eob_hi_bit);
  ------------------
  |  | 3928|  12.5k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  31.3k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   209k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|   188k|    do { \
  |  |  |  |  |  |  |  | 3921|   188k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   188k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 188k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 188k, False: 20.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 20.9k, False: 10.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 10.4k, False: 2.09k]
  |  |  ------------------
  ------------------
 3943|  2.09k|    update_cdf_3d(N_TX_SIZES, 13, 1, coef.skip);
  ------------------
  |  | 3926|  12.5k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|   146k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|   135k|    do { \
  |  |  |  |  |  | 3921|   135k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|   135k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 135k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 135k, False: 10.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 10.4k, False: 2.09k]
  |  |  ------------------
  ------------------
 3944|  2.09k|    update_cdf_3d(2, 3, 1, coef.dc_sign);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  16.7k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  12.5k|    do { \
  |  |  |  |  |  | 3921|  12.5k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  12.5k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 12.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 12.5k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3945|       |
 3946|  2.09k|    update_cdf_3d(2, N_INTRA_PRED_MODES, N_UV_INTRA_PRED_MODES - 1 - !k, m.uv_mode);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  58.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  54.3k|    do { \
  |  |  |  |  |  | 3921|  54.3k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  54.3k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 54.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 54.3k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3947|  2.09k|    update_cdf_2d(4, N_PARTITIONS - 3, m.partition[BL_128X128]);
  ------------------
  |  | 3924|  10.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 8.36k, False: 2.09k]
  |  |  ------------------
  ------------------
 3948|  8.36k|    for (int k = BL_64X64; k < BL_8X8; k++)
  ------------------
  |  Branch (3948:28): [True: 6.27k, False: 2.09k]
  ------------------
 3949|  6.27k|        update_cdf_2d(4, N_PARTITIONS - 1, m.partition[k]);
  ------------------
  |  | 3924|  31.3k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  25.1k|    do { \
  |  |  |  | 3921|  25.1k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  25.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 25.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 25.1k, False: 6.27k]
  |  |  ------------------
  ------------------
 3950|  2.09k|    update_cdf_2d(4, N_SUB8X8_PARTITIONS - 1, m.partition[BL_8X8]);
  ------------------
  |  | 3924|  10.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 8.36k, False: 2.09k]
  |  |  ------------------
  ------------------
 3951|  2.09k|    update_cdf_2d(6, 15, m.cfl_alpha);
  ------------------
  |  | 3924|  14.6k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  12.5k|    do { \
  |  |  |  | 3921|  12.5k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  12.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 12.5k, False: 2.09k]
  |  |  ------------------
  ------------------
 3952|  2.09k|    update_cdf_2d(2, 15, m.txtp_inter1);
  ------------------
  |  | 3924|  6.27k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.18k|    do { \
  |  |  |  | 3921|  4.18k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3953|  2.09k|    update_cdf_1d(11, m.txtp_inter2);
  ------------------
  |  | 3920|  2.09k|    do { \
  |  | 3921|  2.09k|        dst->name[n1d] = 0; \
  |  | 3922|  2.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 3954|  2.09k|    update_cdf_3d(2, N_INTRA_PRED_MODES, 6, m.txtp_intra1);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  58.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  54.3k|    do { \
  |  |  |  |  |  | 3921|  54.3k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  54.3k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 54.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 54.3k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3955|  2.09k|    update_cdf_3d(3, N_INTRA_PRED_MODES, 4, m.txtp_intra2);
  ------------------
  |  | 3926|  8.36k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  87.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  81.5k|    do { \
  |  |  |  |  |  | 3921|  81.5k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  81.5k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 81.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 81.5k, False: 6.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 6.27k, False: 2.09k]
  |  |  ------------------
  ------------------
 3956|  2.09k|    update_cdf_1d(7, m.cfl_sign);
  ------------------
  |  | 3920|  2.09k|    do { \
  |  | 3921|  2.09k|        dst->name[n1d] = 0; \
  |  | 3922|  2.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 3957|  2.09k|    update_cdf_2d(8, 6, m.angle_delta);
  ------------------
  |  | 3924|  18.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  16.7k|    do { \
  |  |  |  | 3921|  16.7k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  16.7k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 16.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 16.7k, False: 2.09k]
  |  |  ------------------
  ------------------
 3958|  2.09k|    update_cdf_1d(4, m.filter_intra);
  ------------------
  |  | 3920|  2.09k|    do { \
  |  | 3921|  2.09k|        dst->name[n1d] = 0; \
  |  | 3922|  2.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 3959|  2.09k|    update_cdf_2d(3, DAV1D_MAX_SEGMENTS - 1, m.seg_id);
  ------------------
  |  | 3924|  8.36k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.27k|    do { \
  |  |  |  | 3921|  6.27k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  6.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 6.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 6.27k, False: 2.09k]
  |  |  ------------------
  ------------------
 3960|  2.09k|    update_cdf_3d(2, 7, 6, m.pal_sz);
  ------------------
  |  | 3926|  6.27k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  33.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  29.2k|    do { \
  |  |  |  |  |  | 3921|  29.2k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  29.2k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 29.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 29.2k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3961|  2.09k|    update_cdf_4d(2, 7, 5, k + 1, m.color_map);
  ------------------
  |  | 3928|  6.27k|    for (int l = 0; l < (n1d); l++) update_cdf_3d(n2d, n3d, n4d, name[l])
  |  |  ------------------
  |  |  |  | 3926|  33.4k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3924|   175k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 3920|   146k|    do { \
  |  |  |  |  |  |  |  | 3921|   146k|        dst->name[n1d] = 0; \
  |  |  |  |  |  |  |  | 3922|   146k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 146k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3924:21): [True: 146k, False: 29.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3926:21): [True: 29.2k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3928:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3962|  2.09k|    update_cdf_3d(N_TX_SIZES - 1, 3, imin(k + 1, 2), m.txsz);
  ------------------
  |  | 3926|  10.4k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  33.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  25.1k|    do { \
  |  |  |  |  |  | 3921|  25.1k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  25.1k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 25.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 25.1k, False: 8.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 8.36k, False: 2.09k]
  |  |  ------------------
  ------------------
 3963|  2.09k|    update_cdf_1d(3, m.delta_q);
  ------------------
  |  | 3920|  2.09k|    do { \
  |  | 3921|  2.09k|        dst->name[n1d] = 0; \
  |  | 3922|  2.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 3964|  2.09k|    update_cdf_2d(5, 3, m.delta_lf);
  ------------------
  |  | 3924|  12.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  10.4k|    do { \
  |  |  |  | 3921|  10.4k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  10.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 10.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 10.4k, False: 2.09k]
  |  |  ------------------
  ------------------
 3965|  2.09k|    update_cdf_1d(2, m.restore_switchable);
  ------------------
  |  | 3920|  2.09k|    do { \
  |  | 3921|  2.09k|        dst->name[n1d] = 0; \
  |  | 3922|  2.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 3966|  2.09k|    update_cdf_1d(1, m.restore_wiener);
  ------------------
  |  | 3920|  2.09k|    do { \
  |  | 3921|  2.09k|        dst->name[n1d] = 0; \
  |  | 3922|  2.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 3967|  2.09k|    update_cdf_1d(1, m.restore_sgrproj);
  ------------------
  |  | 3920|  2.09k|    do { \
  |  | 3921|  2.09k|        dst->name[n1d] = 0; \
  |  | 3922|  2.09k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 3968|  2.09k|    update_cdf_2d(4, 1, m.txtp_inter3);
  ------------------
  |  | 3924|  10.4k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  8.36k|    do { \
  |  |  |  | 3921|  8.36k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  8.36k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 8.36k, False: 2.09k]
  |  |  ------------------
  ------------------
 3969|  2.09k|    update_cdf_2d(N_BS_SIZES, 1, m.use_filter_intra);
  ------------------
  |  | 3924|  48.1k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  46.0k|    do { \
  |  |  |  | 3921|  46.0k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  46.0k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 46.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 46.0k, False: 2.09k]
  |  |  ------------------
  ------------------
 3970|  2.09k|    update_cdf_3d(7, 3, 1, m.txpart);
  ------------------
  |  | 3926|  16.7k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  58.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  43.9k|    do { \
  |  |  |  |  |  | 3921|  43.9k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  43.9k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 43.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 43.9k, False: 14.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 14.6k, False: 2.09k]
  |  |  ------------------
  ------------------
 3971|  2.09k|    update_cdf_2d(3, 1, m.skip);
  ------------------
  |  | 3924|  8.36k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.27k|    do { \
  |  |  |  | 3921|  6.27k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  6.27k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 6.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 6.27k, False: 2.09k]
  |  |  ------------------
  ------------------
 3972|  2.09k|    update_cdf_3d(7, 3, 1, m.pal_y);
  ------------------
  |  | 3926|  16.7k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  58.5k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  43.9k|    do { \
  |  |  |  |  |  | 3921|  43.9k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  43.9k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 43.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 43.9k, False: 14.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 14.6k, False: 2.09k]
  |  |  ------------------
  ------------------
 3973|  2.09k|    update_cdf_2d(2, 1, m.pal_uv);
  ------------------
  |  | 3924|  6.27k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.18k|    do { \
  |  |  |  | 3921|  4.18k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.18k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.18k, False: 2.09k]
  |  |  ------------------
  ------------------
 3974|       |
 3975|  2.09k|    if (IS_KEY_OR_INTRA(hdr))
  ------------------
  |  |   43|  2.09k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  2.09k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 1.18k, False: 907]
  |  |  ------------------
  ------------------
 3976|  1.18k|        return;
 3977|       |
 3978|    907|    memcpy(dst->m.y_mode, src->m.y_mode,
 3979|    907|           offsetof(CdfContext, kfym) - offsetof(CdfContext, m.y_mode));
 3980|       |
 3981|    907|    update_cdf_2d(4, N_INTRA_PRED_MODES - 1, m.y_mode);
  ------------------
  |  | 3924|  4.53k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.53k|    do { \
  |  |  |  | 3921|  3.62k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.62k, False: 907]
  |  |  ------------------
  ------------------
 3982|    907|    update_cdf_2d(9, 15, m.wedge_idx);
  ------------------
  |  | 3924|  9.07k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  9.07k|    do { \
  |  |  |  | 3921|  8.16k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  8.16k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 8.16k, False: 907]
  |  |  ------------------
  ------------------
 3983|    907|    update_cdf_2d(8, N_COMP_INTER_PRED_MODES - 1, m.comp_inter_mode);
  ------------------
  |  | 3924|  8.16k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  8.16k|    do { \
  |  |  |  | 3921|  7.25k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  7.25k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 7.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 7.25k, False: 907]
  |  |  ------------------
  ------------------
 3984|    907|    update_cdf_3d(2, 8, DAV1D_N_SWITCHABLE_FILTERS - 1, m.filter);
  ------------------
  |  | 3926|  2.72k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  16.3k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  15.4k|    do { \
  |  |  |  |  |  | 3921|  14.5k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  14.5k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 14.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 14.5k, False: 1.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 1.81k, False: 907]
  |  |  ------------------
  ------------------
 3985|    907|    update_cdf_2d(4, 3, m.interintra_mode);
  ------------------
  |  | 3924|  4.53k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.53k|    do { \
  |  |  |  | 3921|  3.62k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.62k, False: 907]
  |  |  ------------------
  ------------------
 3986|    907|    update_cdf_2d(N_BS_SIZES, 2, m.motion_mode);
  ------------------
  |  | 3924|  20.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  20.8k|    do { \
  |  |  |  | 3921|  19.9k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  19.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 19.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 19.9k, False: 907]
  |  |  ------------------
  ------------------
 3987|    907|    update_cdf_2d(3, 1, m.skip_mode);
  ------------------
  |  | 3924|  3.62k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.62k|    do { \
  |  |  |  | 3921|  2.72k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 2.72k, False: 907]
  |  |  ------------------
  ------------------
 3988|    907|    update_cdf_2d(6, 1, m.newmv_mode);
  ------------------
  |  | 3924|  6.34k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.34k|    do { \
  |  |  |  | 3921|  5.44k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.44k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.44k, False: 907]
  |  |  ------------------
  ------------------
 3989|    907|    update_cdf_2d(2, 1, m.globalmv_mode);
  ------------------
  |  | 3924|  2.72k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  2.72k|    do { \
  |  |  |  | 3921|  1.81k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  1.81k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 1.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 1.81k, False: 907]
  |  |  ------------------
  ------------------
 3990|    907|    update_cdf_2d(6, 1, m.refmv_mode);
  ------------------
  |  | 3924|  6.34k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.34k|    do { \
  |  |  |  | 3921|  5.44k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.44k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.44k, False: 907]
  |  |  ------------------
  ------------------
 3991|    907|    update_cdf_2d(3, 1, m.drl_bit);
  ------------------
  |  | 3924|  3.62k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.62k|    do { \
  |  |  |  | 3921|  2.72k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 2.72k, False: 907]
  |  |  ------------------
  ------------------
 3992|    907|    update_cdf_2d(4, 1, m.intra);
  ------------------
  |  | 3924|  4.53k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.53k|    do { \
  |  |  |  | 3921|  3.62k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.62k, False: 907]
  |  |  ------------------
  ------------------
 3993|    907|    update_cdf_2d(5, 1, m.comp);
  ------------------
  |  | 3924|  5.44k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  5.44k|    do { \
  |  |  |  | 3921|  4.53k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.53k, False: 907]
  |  |  ------------------
  ------------------
 3994|    907|    update_cdf_2d(5, 1, m.comp_dir);
  ------------------
  |  | 3924|  5.44k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  5.44k|    do { \
  |  |  |  | 3921|  4.53k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  4.53k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 4.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 4.53k, False: 907]
  |  |  ------------------
  ------------------
 3995|    907|    update_cdf_2d(6, 1, m.jnt_comp);
  ------------------
  |  | 3924|  6.34k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.34k|    do { \
  |  |  |  | 3921|  5.44k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.44k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.44k, False: 907]
  |  |  ------------------
  ------------------
 3996|    907|    update_cdf_2d(6, 1, m.mask_comp);
  ------------------
  |  | 3924|  6.34k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  6.34k|    do { \
  |  |  |  | 3921|  5.44k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  5.44k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 5.44k, False: 907]
  |  |  ------------------
  ------------------
 3997|    907|    update_cdf_2d(9, 1, m.wedge_comp);
  ------------------
  |  | 3924|  9.07k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  9.07k|    do { \
  |  |  |  | 3921|  8.16k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  8.16k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 8.16k, False: 907]
  |  |  ------------------
  ------------------
 3998|    907|    update_cdf_3d(6, 3, 1, m.ref);
  ------------------
  |  | 3926|  6.34k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  21.7k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  17.2k|    do { \
  |  |  |  |  |  | 3921|  16.3k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  16.3k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 16.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 16.3k, False: 5.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 5.44k, False: 907]
  |  |  ------------------
  ------------------
 3999|    907|    update_cdf_3d(3, 3, 1, m.comp_fwd_ref);
  ------------------
  |  | 3926|  3.62k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  10.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  9.07k|    do { \
  |  |  |  |  |  | 3921|  8.16k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.16k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.16k, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 2.72k, False: 907]
  |  |  ------------------
  ------------------
 4000|    907|    update_cdf_3d(2, 3, 1, m.comp_bwd_ref);
  ------------------
  |  | 3926|  2.72k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  7.25k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  6.34k|    do { \
  |  |  |  |  |  | 3921|  5.44k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  5.44k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 5.44k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 5.44k, False: 1.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 1.81k, False: 907]
  |  |  ------------------
  ------------------
 4001|    907|    update_cdf_3d(3, 3, 1, m.comp_uni_ref);
  ------------------
  |  | 3926|  3.62k|    for (int k = 0; k < (n1d); k++) update_cdf_2d(n2d, n3d, name[k])
  |  |  ------------------
  |  |  |  | 3924|  10.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  |  |  ------------------
  |  |  |  |  |  | 3920|  9.07k|    do { \
  |  |  |  |  |  | 3921|  8.16k|        dst->name[n1d] = 0; \
  |  |  |  |  |  | 3922|  8.16k|    } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (3922:14): [Folded, False: 8.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3924:21): [True: 8.16k, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3926:21): [True: 2.72k, False: 907]
  |  |  ------------------
  ------------------
 4002|    907|    update_cdf_2d(3, 1, m.seg_pred);
  ------------------
  |  | 3924|  3.62k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.62k|    do { \
  |  |  |  | 3921|  2.72k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  2.72k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 2.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 2.72k, False: 907]
  |  |  ------------------
  ------------------
 4003|    907|    update_cdf_2d(4, 1, m.interintra);
  ------------------
  |  | 3924|  4.53k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  4.53k|    do { \
  |  |  |  | 3921|  3.62k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.62k, False: 907]
  |  |  ------------------
  ------------------
 4004|    907|    update_cdf_2d(7, 1, m.interintra_wedge);
  ------------------
  |  | 3924|  7.25k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  7.25k|    do { \
  |  |  |  | 3921|  6.34k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  6.34k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 6.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 6.34k, False: 907]
  |  |  ------------------
  ------------------
 4005|    907|    update_cdf_2d(N_BS_SIZES, 1, m.obmc);
  ------------------
  |  | 3924|  20.8k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  20.8k|    do { \
  |  |  |  | 3921|  19.9k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  19.9k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 19.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 19.9k, False: 907]
  |  |  ------------------
  ------------------
 4006|       |
 4007|  2.72k|    for (int k = 0; k < 2; k++) {
  ------------------
  |  Branch (4007:21): [True: 1.81k, False: 907]
  ------------------
 4008|  1.81k|        update_cdf_1d(10, mv.comp[k].classes);
  ------------------
  |  | 3920|  1.81k|    do { \
  |  | 3921|  1.81k|        dst->name[n1d] = 0; \
  |  | 3922|  1.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
 4009|  1.81k|        update_cdf_1d(1, mv.comp[k].sign);
  ------------------
  |  | 3920|  1.81k|    do { \
  |  | 3921|  1.81k|        dst->name[n1d] = 0; \
  |  | 3922|  1.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
 4010|  1.81k|        update_cdf_1d(1, mv.comp[k].class0);
  ------------------
  |  | 3920|  1.81k|    do { \
  |  | 3921|  1.81k|        dst->name[n1d] = 0; \
  |  | 3922|  1.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
 4011|  1.81k|        update_cdf_2d(2, 3, mv.comp[k].class0_fp);
  ------------------
  |  | 3924|  5.44k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  3.62k|    do { \
  |  |  |  | 3921|  3.62k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  3.62k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 3.62k, False: 1.81k]
  |  |  ------------------
  ------------------
 4012|  1.81k|        update_cdf_1d(1, mv.comp[k].class0_hp);
  ------------------
  |  | 3920|  1.81k|    do { \
  |  | 3921|  1.81k|        dst->name[n1d] = 0; \
  |  | 3922|  1.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
 4013|  1.81k|        update_cdf_2d(10, 1, mv.comp[k].classN);
  ------------------
  |  | 3924|  19.9k|    for (int j = 0; j < (n1d); j++) update_cdf_1d(n2d, name[j])
  |  |  ------------------
  |  |  |  | 3920|  18.1k|    do { \
  |  |  |  | 3921|  18.1k|        dst->name[n1d] = 0; \
  |  |  |  | 3922|  18.1k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3922:14): [Folded, False: 18.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (3924:21): [True: 18.1k, False: 1.81k]
  |  |  ------------------
  ------------------
 4014|  1.81k|        update_cdf_1d(3, mv.comp[k].classN_fp);
  ------------------
  |  | 3920|  1.81k|    do { \
  |  | 3921|  1.81k|        dst->name[n1d] = 0; \
  |  | 3922|  1.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
 4015|  1.81k|        update_cdf_1d(1, mv.comp[k].classN_hp);
  ------------------
  |  | 3920|  1.81k|    do { \
  |  | 3921|  1.81k|        dst->name[n1d] = 0; \
  |  | 3922|  1.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 1.81k]
  |  |  ------------------
  ------------------
 4016|  1.81k|    }
 4017|    907|    update_cdf_1d(N_MV_JOINTS - 1, mv.joint);
  ------------------
  |  | 3920|    907|    do { \
  |  | 3921|    907|        dst->name[n1d] = 0; \
  |  | 3922|    907|    } while (0)
  |  |  ------------------
  |  |  |  Branch (3922:14): [Folded, False: 907]
  |  |  ------------------
  ------------------
 4018|    907|}
dav1d_cdf_thread_init_static:
 4023|  16.1k|void dav1d_cdf_thread_init_static(CdfThreadContext *const cdf, const unsigned qidx) {
 4024|       |    cdf->ref = NULL;
 4025|  16.1k|    cdf->data.qcat = (qidx > 20) + (qidx > 60) + (qidx > 120);
 4026|  16.1k|}
dav1d_cdf_thread_copy:
 4028|  24.5k|void dav1d_cdf_thread_copy(CdfContext *const dst, const CdfThreadContext *const src) {
 4029|  24.5k|    if (src->ref) {
  ------------------
  |  Branch (4029:9): [True: 1.24k, False: 23.2k]
  ------------------
 4030|  1.24k|        memcpy(dst, src->data.cdf, sizeof(*dst));
 4031|  23.2k|    } else {
 4032|  23.2k|        dst->coef = default_coef_cdf[src->data.qcat];
 4033|  23.2k|        memcpy(&dst->m, &default_cdf.m,
 4034|  23.2k|               offsetof(CdfDefaultContext, mv.joint));
 4035|  23.2k|        memcpy(&dst->mv.comp[1], &default_cdf.mv.comp,
 4036|       |               sizeof(default_cdf) - offsetof(CdfDefaultContext, mv.comp));
 4037|  23.2k|    }
 4038|  24.5k|}
dav1d_cdf_thread_alloc:
 4042|  3.20k|{
 4043|  3.20k|    cdf->ref = dav1d_ref_create_using_pool(c->cdf_pool,
 4044|  3.20k|                                           sizeof(CdfContext) + sizeof(atomic_uint));
 4045|  3.20k|    if (!cdf->ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (4045:9): [True: 0, False: 3.20k]
  ------------------
 4046|  3.20k|    cdf->data.cdf = cdf->ref->data;
 4047|  3.20k|    if (have_frame_mt) {
  ------------------
  |  Branch (4047:9): [True: 0, False: 3.20k]
  ------------------
 4048|      0|        cdf->progress = (atomic_uint *) &cdf->data.cdf[1];
 4049|       |        atomic_init(cdf->progress, 0);
 4050|      0|    }
 4051|  3.20k|    return 0;
 4052|  3.20k|}
dav1d_cdf_thread_ref:
 4056|   138k|{
 4057|   138k|    *dst = *src;
 4058|   138k|    if (src->ref)
  ------------------
  |  Branch (4058:9): [True: 18.9k, False: 119k]
  ------------------
 4059|  18.9k|        dav1d_ref_inc(src->ref);
 4060|   138k|}
dav1d_cdf_thread_unref:
 4062|   423k|void dav1d_cdf_thread_unref(CdfThreadContext *const cdf) {
 4063|       |    memset(&cdf->data, 0, sizeof(*cdf) - offsetof(CdfThreadContext, data));
 4064|   423k|    dav1d_ref_dec(&cdf->ref);
 4065|   423k|}

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|  14.0k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  14.0k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  14.0k|#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|  14.0k|    flags |= dav1d_get_default_cpu_flags();
  131|  14.0k|#endif
  132|       |
  133|  14.0k|    return flags;
  134|  14.0k|}
pal.c:dav1d_get_default_cpu_flags:
   58|  14.0k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  14.0k|    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|  14.0k|#endif
  119|  14.0k|#endif
  120|       |
  121|  14.0k|    return flags;
  122|  14.0k|}
refmvs.c:dav1d_get_cpu_flags:
  124|  14.0k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  14.0k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  14.0k|#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|  14.0k|    flags |= dav1d_get_default_cpu_flags();
  131|  14.0k|#endif
  132|       |
  133|  14.0k|    return flags;
  134|  14.0k|}
refmvs.c:dav1d_get_default_cpu_flags:
   58|  14.0k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  14.0k|    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|  14.0k|#endif
  119|  14.0k|#endif
  120|       |
  121|  14.0k|    return flags;
  122|  14.0k|}
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|  21.3k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  21.3k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  21.3k|#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|  21.3k|    flags |= dav1d_get_default_cpu_flags();
  131|  21.3k|#endif
  132|       |
  133|  21.3k|    return flags;
  134|  21.3k|}
msac.c:dav1d_get_default_cpu_flags:
   58|  21.3k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  21.3k|    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|  21.3k|#endif
  119|  21.3k|#endif
  120|       |
  121|  21.3k|    return flags;
  122|  21.3k|}
cdef_tmpl.c:dav1d_get_cpu_flags:
  124|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.8k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.8k|#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.8k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.8k|#endif
  132|       |
  133|  12.8k|    return flags;
  134|  12.8k|}
cdef_tmpl.c:dav1d_get_default_cpu_flags:
   58|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.8k|    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.8k|#endif
  119|  12.8k|#endif
  120|       |
  121|  12.8k|    return flags;
  122|  12.8k|}
filmgrain_tmpl.c:dav1d_get_cpu_flags:
  124|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.8k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.8k|#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.8k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.8k|#endif
  132|       |
  133|  12.8k|    return flags;
  134|  12.8k|}
filmgrain_tmpl.c:dav1d_get_default_cpu_flags:
   58|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.8k|    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.8k|#endif
  119|  12.8k|#endif
  120|       |
  121|  12.8k|    return flags;
  122|  12.8k|}
ipred_tmpl.c:dav1d_get_cpu_flags:
  124|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.8k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.8k|#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.8k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.8k|#endif
  132|       |
  133|  12.8k|    return flags;
  134|  12.8k|}
ipred_tmpl.c:dav1d_get_default_cpu_flags:
   58|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.8k|    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.8k|#endif
  119|  12.8k|#endif
  120|       |
  121|  12.8k|    return flags;
  122|  12.8k|}
itx_tmpl.c:dav1d_get_cpu_flags:
  124|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.8k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.8k|#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.8k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.8k|#endif
  132|       |
  133|  12.8k|    return flags;
  134|  12.8k|}
itx_tmpl.c:dav1d_get_default_cpu_flags:
   58|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.8k|    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.8k|#endif
  119|  12.8k|#endif
  120|       |
  121|  12.8k|    return flags;
  122|  12.8k|}
loopfilter_tmpl.c:dav1d_get_cpu_flags:
  124|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.8k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.8k|#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.8k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.8k|#endif
  132|       |
  133|  12.8k|    return flags;
  134|  12.8k|}
loopfilter_tmpl.c:dav1d_get_default_cpu_flags:
   58|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.8k|    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.8k|#endif
  119|  12.8k|#endif
  120|       |
  121|  12.8k|    return flags;
  122|  12.8k|}
looprestoration_tmpl.c:dav1d_get_cpu_flags:
  124|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.8k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.8k|#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.8k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.8k|#endif
  132|       |
  133|  12.8k|    return flags;
  134|  12.8k|}
looprestoration_tmpl.c:dav1d_get_default_cpu_flags:
   58|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.8k|    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.8k|#endif
  119|  12.8k|#endif
  120|       |
  121|  12.8k|    return flags;
  122|  12.8k|}
mc_tmpl.c:dav1d_get_cpu_flags:
  124|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_cpu_flags(void) {
  125|  12.8k|    unsigned flags = dav1d_cpu_flags & dav1d_cpu_flags_mask;
  126|       |
  127|  12.8k|#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.8k|    flags |= dav1d_get_default_cpu_flags();
  131|  12.8k|#endif
  132|       |
  133|  12.8k|    return flags;
  134|  12.8k|}
mc_tmpl.c:dav1d_get_default_cpu_flags:
   58|  12.8k|static ALWAYS_INLINE unsigned dav1d_get_default_cpu_flags(void) {
   59|  12.8k|    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.8k|#endif
  119|  12.8k|#endif
  120|       |
  121|  12.8k|    return flags;
  122|  12.8k|}

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

lf_mask.c:dav1d_memset_likely_pow2:
   44|  6.67M|static inline void dav1d_memset_likely_pow2(void *const ptr, const int value, const int n) {
   45|  6.67M|    assert(n >= 1 && n <= 32);
  ------------------
  |  |  140|  13.3M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 6.67M, False: 0]
  |  |  |  Branch (140:30): [True: 6.67M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 6.67M]
  |  |  ------------------
  ------------------
   46|  6.67M|    if ((n&(n-1)) == 0) {
  ------------------
  |  Branch (46:9): [True: 6.57M, False: 94.5k]
  ------------------
   47|  6.57M|        dav1d_memset_pow2[ulog2(n)](ptr, value);
   48|  6.57M|    } else {
   49|  94.5k|        memset(ptr, value, n);
   50|  94.5k|    }
   51|  6.67M|}
recon_tmpl.c:dav1d_memset_likely_pow2:
   44|  9.99M|static inline void dav1d_memset_likely_pow2(void *const ptr, const int value, const int n) {
   45|  9.99M|    assert(n >= 1 && n <= 32);
  ------------------
  |  |  140|  19.9M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 9.99M, False: 0]
  |  |  |  Branch (140:30): [True: 9.99M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 9.99M]
  |  |  ------------------
  ------------------
   46|  9.99M|    if ((n&(n-1)) == 0) {
  ------------------
  |  Branch (46:9): [True: 9.92M, False: 69.7k]
  ------------------
   47|  9.92M|        dav1d_memset_pow2[ulog2(n)](ptr, value);
   48|  9.92M|    } else {
   49|  69.7k|        memset(ptr, value, n);
   50|  69.7k|    }
   51|  9.99M|}

dav1d_data_wrap_internal:
   62|  16.0k|{
   63|  16.0k|    validate_input_or_ret(buf != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  16.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 16.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|  16.0k|    validate_input_or_ret(ptr != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  16.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 16.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|  16.0k|    validate_input_or_ret(free_callback != NULL, DAV1D_ERR(EINVAL));
  ------------------
  |  |   52|  16.0k|    if (!(x)) { \
  |  |  ------------------
  |  |  |  Branch (52:9): [True: 0, False: 16.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|  16.0k|    if (sz > SIZE_MAX / 2) return DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (67:9): [True: 0, False: 16.0k]
  ------------------
   68|  16.0k|    Dav1dRef *const ref = dav1d_malloc(ALLOC_DAV1DDATA, sizeof(Dav1dRef));
  ------------------
  |  |  132|  16.0k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
   69|  16.0k|    if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (69:9): [True: 0, False: 16.0k]
  ------------------
   70|       |
   71|  16.0k|    buf->ref = dav1d_ref_init(ref, ptr, free_callback, cookie, 1);
   72|  16.0k|    buf->data = ptr;
   73|  16.0k|    buf->sz = sz;
   74|  16.0k|    dav1d_data_props_set_defaults(&buf->m);
   75|  16.0k|    buf->m.size = sz;
   76|       |
   77|  16.0k|    return 0;
   78|  16.0k|}
dav1d_data_ref:
   98|  35.1k|void dav1d_data_ref(Dav1dData *const dst, const Dav1dData *const src) {
   99|  35.1k|    assert(dst != NULL);
  ------------------
  |  |  140|  35.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 35.1k]
  |  |  |  Branch (140:68): [Folded, False: 35.1k]
  |  |  ------------------
  ------------------
  100|  35.1k|    assert(dst->data == NULL);
  ------------------
  |  |  140|  35.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 35.1k]
  |  |  |  Branch (140:68): [Folded, False: 35.1k]
  |  |  ------------------
  ------------------
  101|  35.1k|    assert(src != NULL);
  ------------------
  |  |  140|  35.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 35.1k]
  |  |  |  Branch (140:68): [Folded, False: 35.1k]
  |  |  ------------------
  ------------------
  102|       |
  103|  35.1k|    if (src->ref) {
  ------------------
  |  Branch (103:9): [True: 35.1k, False: 0]
  ------------------
  104|  35.1k|        assert(src->data != NULL);
  ------------------
  |  |  140|  35.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 35.1k]
  |  |  |  Branch (140:68): [Folded, False: 35.1k]
  |  |  ------------------
  ------------------
  105|  35.1k|        dav1d_ref_inc(src->ref);
  106|  35.1k|    }
  107|  35.1k|    if (src->m.user_data.ref) dav1d_ref_inc(src->m.user_data.ref);
  ------------------
  |  Branch (107:9): [True: 0, False: 35.1k]
  ------------------
  108|  35.1k|    *dst = *src;
  109|  35.1k|}
dav1d_data_props_copy:
  113|  28.2k|{
  114|  28.2k|    assert(dst != NULL);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  115|  28.2k|    assert(src != NULL);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  116|       |
  117|  28.2k|    dav1d_ref_dec(&dst->user_data.ref);
  118|  28.2k|    *dst = *src;
  119|  28.2k|    if (dst->user_data.ref) dav1d_ref_inc(dst->user_data.ref);
  ------------------
  |  Branch (119:9): [True: 0, False: 28.2k]
  ------------------
  120|  28.2k|}
dav1d_data_props_set_defaults:
  122|   382k|void dav1d_data_props_set_defaults(Dav1dDataProps *const props) {
  123|   382k|    assert(props != NULL);
  ------------------
  |  |  140|   382k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 382k]
  |  |  |  Branch (140:68): [Folded, False: 382k]
  |  |  ------------------
  ------------------
  124|       |
  125|   382k|    memset(props, 0, sizeof(*props));
  126|       |    props->timestamp = INT64_MIN;
  127|   382k|    props->offset = -1;
  128|   382k|}
dav1d_data_props_unref_internal:
  130|  14.0k|void dav1d_data_props_unref_internal(Dav1dDataProps *const props) {
  131|  14.0k|    validate_input(props != NULL);
  ------------------
  |  |   59|  14.0k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|  14.0k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 14.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|    }
  |  |  ------------------
  ------------------
  132|       |
  133|  14.0k|    struct Dav1dRef *user_data_ref = props->user_data.ref;
  134|  14.0k|    dav1d_data_props_set_defaults(props);
  135|  14.0k|    dav1d_ref_dec(&user_data_ref);
  136|  14.0k|}
dav1d_data_unref_internal:
  138|  65.1k|void dav1d_data_unref_internal(Dav1dData *const buf) {
  139|  65.1k|    validate_input(buf != NULL);
  ------------------
  |  |   59|  65.1k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|  65.1k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 65.1k]
  |  |  |  |  ------------------
  |  |  |  |   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|  65.1k|    struct Dav1dRef *user_data_ref = buf->m.user_data.ref;
  142|  65.1k|    if (buf->ref) {
  ------------------
  |  Branch (142:9): [True: 51.1k, False: 14.0k]
  ------------------
  143|  51.1k|        validate_input(buf->data != NULL);
  ------------------
  |  |   59|  51.1k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|  51.1k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 51.1k]
  |  |  |  |  ------------------
  |  |  |  |   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|  51.1k|        dav1d_ref_dec(&buf->ref);
  145|  51.1k|    }
  146|  65.1k|    memset(buf, 0, sizeof(*buf));
  147|  65.1k|    dav1d_data_props_set_defaults(&buf->m);
  148|  65.1k|    dav1d_ref_dec(&user_data_ref);
  149|  65.1k|}

dav1d_decode_tile_sbrow:
 2597|  76.8k|int dav1d_decode_tile_sbrow(Dav1dTaskContext *const t) {
 2598|  76.8k|    const Dav1dFrameContext *const f = t->f;
 2599|  76.8k|    const enum BlockLevel root_bl = f->seq_hdr->sb128 ? BL_128X128 : BL_64X64;
  ------------------
  |  Branch (2599:37): [True: 31.7k, False: 45.0k]
  ------------------
 2600|  76.8k|    Dav1dTileState *const ts = t->ts;
 2601|  76.8k|    const Dav1dContext *const c = f->c;
 2602|  76.8k|    const int sb_step = f->sb_step;
 2603|  76.8k|    const int tile_row = ts->tiling.row, tile_col = ts->tiling.col;
 2604|  76.8k|    const int col_sb_start = f->frame_hdr->tiling.col_start_sb[tile_col];
 2605|  76.8k|    const int col_sb128_start = col_sb_start >> !f->seq_hdr->sb128;
 2606|       |
 2607|  76.8k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc) {
  ------------------
  |  |   36|   153k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 4.12k, False: 72.7k]
  |  |  ------------------
  ------------------
  |  Branch (2607:45): [True: 19.7k, False: 53.0k]
  ------------------
 2608|  23.8k|        dav1d_refmvs_tile_sbrow_init(&t->rt, &f->rf, ts->tiling.col_start,
 2609|  23.8k|                                     ts->tiling.col_end, ts->tiling.row_start,
 2610|  23.8k|                                     ts->tiling.row_end, t->by >> f->sb_shift,
 2611|  23.8k|                                     ts->tiling.row, t->frame_thread.pass);
 2612|  23.8k|    }
 2613|       |
 2614|  76.8k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) && c->n_fc > 1) {
  ------------------
  |  |   36|   153k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 4.12k, False: 72.7k]
  |  |  ------------------
  ------------------
  |  Branch (2614:45): [True: 0, False: 4.12k]
  ------------------
 2615|      0|        const int sby = (t->by - ts->tiling.row_start) >> f->sb_shift;
 2616|      0|        int (*const lowest_px)[2] = ts->lowest_pixel[sby];
 2617|      0|        for (int n = 0; n < 7; n++)
  ------------------
  |  Branch (2617:25): [True: 0, False: 0]
  ------------------
 2618|      0|            for (int m = 0; m < 2; m++)
  ------------------
  |  Branch (2618:29): [True: 0, False: 0]
  ------------------
 2619|      0|                lowest_px[n][m] = INT_MIN;
 2620|      0|    }
 2621|       |
 2622|  76.8k|    reset_context(&t->l, IS_KEY_OR_INTRA(f->frame_hdr), t->frame_thread.pass);
  ------------------
  |  |   43|  76.8k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  76.8k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  ------------------
 2623|  76.8k|    if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2623:9): [True: 0, False: 76.8k]
  ------------------
 2624|      0|        const int off_2pass = c->n_tc > 1 ? f->sb128w * f->frame_hdr->tiling.rows : 0;
  ------------------
  |  Branch (2624:31): [True: 0, False: 0]
  ------------------
 2625|      0|        for (t->bx = ts->tiling.col_start,
 2626|      0|             t->a = f->a + off_2pass + col_sb128_start + tile_row * f->sb128w;
 2627|      0|             t->bx < ts->tiling.col_end; t->bx += sb_step)
  ------------------
  |  Branch (2627:14): [True: 0, False: 0]
  ------------------
 2628|      0|        {
 2629|      0|            if (atomic_load_explicit(c->flush, memory_order_acquire))
  ------------------
  |  Branch (2629:17): [True: 0, False: 0]
  ------------------
 2630|      0|                return 1;
 2631|      0|            if (decode_sb(t, root_bl, dav1d_intra_edge_tree[root_bl]))
  ------------------
  |  Branch (2631:17): [True: 0, False: 0]
  ------------------
 2632|      0|                return 1;
 2633|      0|            if (t->bx & 16 || f->seq_hdr->sb128)
  ------------------
  |  Branch (2633:17): [True: 0, False: 0]
  |  Branch (2633:31): [True: 0, False: 0]
  ------------------
 2634|      0|                t->a++;
 2635|      0|        }
 2636|      0|        f->bd_fn.backup_ipred_edge(t);
 2637|      0|        return 0;
 2638|      0|    }
 2639|       |
 2640|  76.8k|    if (f->c->n_tc > 1 && f->frame_hdr->use_ref_frame_mvs) {
  ------------------
  |  Branch (2640:9): [True: 0, False: 76.8k]
  |  Branch (2640:27): [True: 0, False: 0]
  ------------------
 2641|      0|        f->c->refmvs_dsp.load_tmvs(&f->rf, ts->tiling.row,
 2642|      0|                                   ts->tiling.col_start >> 1, ts->tiling.col_end >> 1,
 2643|      0|                                   t->by >> 1, (t->by + sb_step) >> 1);
 2644|      0|    }
 2645|  76.8k|    memset(t->pal_sz_uv[1], 0, sizeof(*t->pal_sz_uv));
 2646|  76.8k|    const int sb128y = t->by >> 5;
 2647|  76.8k|    for (t->bx = ts->tiling.col_start, t->a = f->a + col_sb128_start + tile_row * f->sb128w,
 2648|  76.8k|         t->lf_mask = f->lf.mask + sb128y * f->sb128w + col_sb128_start;
 2649|   287k|         t->bx < ts->tiling.col_end; t->bx += sb_step)
  ------------------
  |  Branch (2649:10): [True: 210k, False: 76.7k]
  ------------------
 2650|   210k|    {
 2651|   210k|        if (atomic_load_explicit(c->flush, memory_order_acquire))
  ------------------
  |  Branch (2651:13): [True: 0, False: 210k]
  ------------------
 2652|      0|            return 1;
 2653|   210k|        if (root_bl == BL_128X128) {
  ------------------
  |  Branch (2653:13): [True: 71.1k, False: 139k]
  ------------------
 2654|  71.1k|            t->cur_sb_cdef_idx_ptr = t->lf_mask->cdef_idx;
 2655|  71.1k|            t->cur_sb_cdef_idx_ptr[0] = -1;
 2656|  71.1k|            t->cur_sb_cdef_idx_ptr[1] = -1;
 2657|  71.1k|            t->cur_sb_cdef_idx_ptr[2] = -1;
 2658|  71.1k|            t->cur_sb_cdef_idx_ptr[3] = -1;
 2659|   139k|        } else {
 2660|   139k|            t->cur_sb_cdef_idx_ptr =
 2661|   139k|                &t->lf_mask->cdef_idx[((t->bx & 16) >> 4) +
 2662|   139k|                                      ((t->by & 16) >> 3)];
 2663|   139k|            t->cur_sb_cdef_idx_ptr[0] = -1;
 2664|   139k|        }
 2665|       |        // Restoration filter
 2666|   842k|        for (int p = 0; p < 3; p++) {
  ------------------
  |  Branch (2666:25): [True: 632k, False: 210k]
  ------------------
 2667|   632k|            if (!((f->lf.restore_planes >> p) & 1U))
  ------------------
  |  Branch (2667:17): [True: 549k, False: 82.8k]
  ------------------
 2668|   549k|                continue;
 2669|       |
 2670|  82.8k|            const int ss_ver = p && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (2670:32): [True: 48.0k, False: 34.7k]
  |  Branch (2670:37): [True: 20.3k, False: 27.7k]
  ------------------
 2671|  82.8k|            const int ss_hor = p && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2671:32): [True: 48.0k, False: 34.7k]
  |  Branch (2671:37): [True: 21.4k, False: 26.6k]
  ------------------
 2672|  82.8k|            const int unit_size_log2 = f->frame_hdr->restoration.unit_size[!!p];
 2673|  82.8k|            const int y = t->by * 4 >> ss_ver;
 2674|  82.8k|            const int h = (f->cur.p.h + ss_ver) >> ss_ver;
 2675|       |
 2676|  82.8k|            const int unit_size = 1 << unit_size_log2;
 2677|  82.8k|            const unsigned mask = unit_size - 1;
 2678|  82.8k|            if (y & mask) continue;
  ------------------
  |  Branch (2678:17): [True: 17.2k, False: 65.6k]
  ------------------
 2679|  65.6k|            const int half_unit = unit_size >> 1;
 2680|       |            // Round half up at frame boundaries, if there's more than one
 2681|       |            // restoration unit
 2682|  65.6k|            if (y && y + half_unit > h) continue;
  ------------------
  |  Branch (2682:17): [True: 25.4k, False: 40.1k]
  |  Branch (2682:22): [True: 1.17k, False: 24.2k]
  ------------------
 2683|       |
 2684|  64.4k|            const enum Dav1dRestorationType frame_type = f->frame_hdr->restoration.type[p];
 2685|       |
 2686|  64.4k|            if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (2686:17): [True: 27.0k, False: 37.3k]
  ------------------
 2687|  27.0k|                const int w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 2688|  27.0k|                const int n_units = imax(1, (w + half_unit) >> unit_size_log2);
 2689|       |
 2690|  27.0k|                const int d = f->frame_hdr->super_res.width_scale_denominator;
 2691|  27.0k|                const int rnd = unit_size * 8 - 1, shift = unit_size_log2 + 3;
 2692|  27.0k|                const int x0 = ((4 *  t->bx            * d >> ss_hor) + rnd) >> shift;
 2693|  27.0k|                const int x1 = ((4 * (t->bx + sb_step) * d >> ss_hor) + rnd) >> shift;
 2694|       |
 2695|  63.4k|                for (int x = x0; x < imin(x1, n_units); x++) {
  ------------------
  |  Branch (2695:34): [True: 36.3k, False: 27.0k]
  ------------------
 2696|  36.3k|                    const int px_x = x << (unit_size_log2 + ss_hor);
 2697|  36.3k|                    const int sb_idx = (t->by >> 5) * f->sr_sb128w + (px_x >> 7);
 2698|  36.3k|                    const int unit_idx = ((t->by & 16) >> 3) + ((px_x & 64) >> 6);
 2699|  36.3k|                    Av1RestorationUnit *const lr = &f->lf.lr_mask[sb_idx].lr[p][unit_idx];
 2700|       |
 2701|  36.3k|                    read_restoration_info(t, lr, p, frame_type);
 2702|  36.3k|                }
 2703|  37.3k|            } else {
 2704|  37.3k|                const int x = 4 * t->bx >> ss_hor;
 2705|  37.3k|                if (x & mask) continue;
  ------------------
  |  Branch (2705:21): [True: 5.11k, False: 32.2k]
  ------------------
 2706|  32.2k|                const int w = (f->cur.p.w + ss_hor) >> ss_hor;
 2707|       |                // Round half up at frame boundaries, if there's more than one
 2708|       |                // restoration unit
 2709|  32.2k|                if (x && x + half_unit > w) continue;
  ------------------
  |  Branch (2709:21): [True: 13.9k, False: 18.2k]
  |  Branch (2709:26): [True: 640, False: 13.3k]
  ------------------
 2710|  31.6k|                const int sb_idx = (t->by >> 5) * f->sr_sb128w + (t->bx >> 5);
 2711|  31.6k|                const int unit_idx = ((t->by & 16) >> 3) + ((t->bx & 16) >> 4);
 2712|  31.6k|                Av1RestorationUnit *const lr = &f->lf.lr_mask[sb_idx].lr[p][unit_idx];
 2713|       |
 2714|  31.6k|                read_restoration_info(t, lr, p, frame_type);
 2715|  31.6k|            }
 2716|  64.4k|        }
 2717|   210k|        if (decode_sb(t, root_bl, dav1d_intra_edge_tree[root_bl]))
  ------------------
  |  Branch (2717:13): [True: 106, False: 210k]
  ------------------
 2718|    106|            return 1;
 2719|   210k|        if (t->bx & 16 || f->seq_hdr->sb128) {
  ------------------
  |  Branch (2719:13): [True: 53.8k, False: 156k]
  |  Branch (2719:27): [True: 71.1k, False: 85.6k]
  ------------------
 2720|   124k|            t->a++;
 2721|   124k|            t->lf_mask++;
 2722|   124k|        }
 2723|   210k|    }
 2724|       |
 2725|  76.7k|    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 (2725:9): [True: 6.47k, False: 70.3k]
  |  Branch (2725:38): [True: 0, False: 6.47k]
  ------------------
 2726|      0|        dav1d_refmvs_save_tmvs(&f->c->refmvs_dsp, &t->rt,
 2727|      0|                               ts->tiling.col_start >> 1, ts->tiling.col_end >> 1,
 2728|      0|                               t->by >> 1, (t->by + sb_step) >> 1);
 2729|      0|    }
 2730|       |
 2731|       |    // backup pre-loopfilter pixels for intra prediction of the next sbrow
 2732|  76.7k|    if (t->frame_thread.pass != 1)
  ------------------
  |  Branch (2732:9): [True: 76.7k, False: 0]
  ------------------
 2733|  76.7k|        f->bd_fn.backup_ipred_edge(t);
 2734|       |
 2735|       |    // backup t->a/l.tx_lpf_y/uv at tile boundaries to use them to "fix"
 2736|       |    // up the initial value in neighbour tiles when running the loopfilter
 2737|  76.7k|    int align_h = (f->bh + 31) & ~31;
 2738|  76.7k|    memcpy(&f->lf.tx_lpf_right_edge[0][align_h * tile_col + t->by],
 2739|  76.7k|           &t->l.tx_lpf_y[t->by & 16], sb_step);
 2740|  76.7k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2741|  76.7k|    align_h >>= ss_ver;
 2742|  76.7k|    memcpy(&f->lf.tx_lpf_right_edge[1][align_h * tile_col + (t->by >> ss_ver)],
 2743|  76.7k|           &t->l.tx_lpf_uv[(t->by & 16) >> ss_ver], sb_step >> ss_ver);
 2744|       |
 2745|       |    // error out on symbol decoder overread
 2746|  76.7k|    if (ts->msac.cnt <= -15) return 1;
  ------------------
  |  Branch (2746:9): [True: 4.21k, False: 72.5k]
  ------------------
 2747|       |
 2748|  72.5k|    return c->strict_std_compliance &&
  ------------------
  |  Branch (2748:12): [True: 0, False: 72.5k]
  ------------------
 2749|      0|           (t->by >> f->sb_shift) + 1 >= f->frame_hdr->tiling.row_start_sb[tile_row + 1] &&
  ------------------
  |  Branch (2749:12): [True: 0, False: 0]
  ------------------
 2750|      0|           check_trailing_bits_after_symbol_coder(&ts->msac);
  ------------------
  |  Branch (2750:12): [True: 0, False: 0]
  ------------------
 2751|  76.7k|}
dav1d_decode_frame_init:
 2753|  19.0k|int dav1d_decode_frame_init(Dav1dFrameContext *const f) {
 2754|  19.0k|    const Dav1dContext *const c = f->c;
 2755|  19.0k|    int retval = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|  19.0k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 2756|       |
 2757|  19.0k|    if (f->sbh > f->lf.start_of_tile_row_sz) {
  ------------------
  |  Branch (2757:9): [True: 13.0k, False: 5.94k]
  ------------------
 2758|  13.0k|        dav1d_free(f->lf.start_of_tile_row);
  ------------------
  |  |  135|  13.0k|#define dav1d_free(ptr) free(ptr)
  ------------------
 2759|  13.0k|        f->lf.start_of_tile_row = dav1d_malloc(ALLOC_TILE, f->sbh * sizeof(uint8_t));
  ------------------
  |  |  132|  13.0k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2760|  13.0k|        if (!f->lf.start_of_tile_row) {
  ------------------
  |  Branch (2760:13): [True: 0, False: 13.0k]
  ------------------
 2761|      0|            f->lf.start_of_tile_row_sz = 0;
 2762|      0|            goto error;
 2763|      0|        }
 2764|  13.0k|        f->lf.start_of_tile_row_sz = f->sbh;
 2765|  13.0k|    }
 2766|  19.0k|    int sby = 0;
 2767|  39.3k|    for (int tile_row = 0; tile_row < f->frame_hdr->tiling.rows; tile_row++) {
  ------------------
  |  Branch (2767:28): [True: 20.3k, False: 19.0k]
  ------------------
 2768|  20.3k|        f->lf.start_of_tile_row[sby++] = tile_row;
 2769|   145k|        while (sby < f->frame_hdr->tiling.row_start_sb[tile_row + 1])
  ------------------
  |  Branch (2769:16): [True: 125k, False: 20.3k]
  ------------------
 2770|   125k|            f->lf.start_of_tile_row[sby++] = 0;
 2771|  20.3k|    }
 2772|       |
 2773|  19.0k|    const int n_ts = f->frame_hdr->tiling.cols * f->frame_hdr->tiling.rows;
 2774|  19.0k|    if (n_ts != f->n_ts) {
  ------------------
  |  Branch (2774:9): [True: 13.0k, False: 5.94k]
  ------------------
 2775|  13.0k|        if (c->n_fc > 1) {
  ------------------
  |  Branch (2775:13): [True: 0, False: 13.0k]
  ------------------
 2776|      0|            dav1d_free(f->frame_thread.tile_start_off);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
 2777|      0|            f->frame_thread.tile_start_off =
 2778|      0|                dav1d_malloc(ALLOC_TILE, sizeof(*f->frame_thread.tile_start_off) * n_ts);
  ------------------
  |  |  132|      0|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2779|      0|            if (!f->frame_thread.tile_start_off) {
  ------------------
  |  Branch (2779:17): [True: 0, False: 0]
  ------------------
 2780|      0|                f->n_ts = 0;
 2781|      0|                goto error;
 2782|      0|            }
 2783|      0|        }
 2784|  13.0k|        dav1d_free_aligned(f->ts);
  ------------------
  |  |  136|  13.0k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2785|  13.0k|        f->ts = dav1d_alloc_aligned(ALLOC_TILE, sizeof(*f->ts) * n_ts, 32);
  ------------------
  |  |  134|  13.0k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2786|  13.0k|        if (!f->ts) goto error;
  ------------------
  |  Branch (2786:13): [True: 0, False: 13.0k]
  ------------------
 2787|  13.0k|        f->n_ts = n_ts;
 2788|  13.0k|    }
 2789|       |
 2790|  19.0k|    const int a_sz = f->sb128w * f->frame_hdr->tiling.rows * (1 + (c->n_fc > 1 && c->n_tc > 1));
  ------------------
  |  Branch (2790:68): [True: 0, False: 19.0k]
  |  Branch (2790:83): [True: 0, False: 0]
  ------------------
 2791|  19.0k|    if (a_sz != f->a_sz) {
  ------------------
  |  Branch (2791:9): [True: 13.2k, False: 5.78k]
  ------------------
 2792|  13.2k|        dav1d_free(f->a);
  ------------------
  |  |  135|  13.2k|#define dav1d_free(ptr) free(ptr)
  ------------------
 2793|  13.2k|        f->a = dav1d_malloc(ALLOC_TILE, sizeof(*f->a) * a_sz);
  ------------------
  |  |  132|  13.2k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2794|  13.2k|        if (!f->a) {
  ------------------
  |  Branch (2794:13): [True: 0, False: 13.2k]
  ------------------
 2795|      0|            f->a_sz = 0;
 2796|      0|            goto error;
 2797|      0|        }
 2798|  13.2k|        f->a_sz = a_sz;
 2799|  13.2k|    }
 2800|       |
 2801|  19.0k|    const int num_sb128 = f->sb128w * f->sb128h;
 2802|  19.0k|    const uint8_t *const size_mul = ss_size_mul[f->cur.p.layout];
 2803|  19.0k|    const int hbd = !!f->seq_hdr->hbd;
 2804|  19.0k|    if (c->n_fc > 1) {
  ------------------
  |  Branch (2804:9): [True: 0, False: 19.0k]
  ------------------
 2805|      0|        const unsigned sb_step4 = f->sb_step * 4;
 2806|      0|        int tile_idx = 0;
 2807|      0|        for (int tile_row = 0; tile_row < f->frame_hdr->tiling.rows; tile_row++) {
  ------------------
  |  Branch (2807:32): [True: 0, False: 0]
  ------------------
 2808|      0|            const unsigned row_off = f->frame_hdr->tiling.row_start_sb[tile_row] *
 2809|      0|                                     sb_step4 * f->sb128w * 128;
 2810|      0|            const unsigned b_diff = (f->frame_hdr->tiling.row_start_sb[tile_row + 1] -
 2811|      0|                                     f->frame_hdr->tiling.row_start_sb[tile_row]) * sb_step4;
 2812|      0|            for (int tile_col = 0; tile_col < f->frame_hdr->tiling.cols; tile_col++) {
  ------------------
  |  Branch (2812:36): [True: 0, False: 0]
  ------------------
 2813|      0|                f->frame_thread.tile_start_off[tile_idx++] = row_off + b_diff *
 2814|      0|                    f->frame_hdr->tiling.col_start_sb[tile_col] * sb_step4;
 2815|      0|            }
 2816|      0|        }
 2817|       |
 2818|      0|        const int lowest_pixel_mem_sz = f->frame_hdr->tiling.cols * f->sbh;
 2819|      0|        if (lowest_pixel_mem_sz != f->tile_thread.lowest_pixel_mem_sz) {
  ------------------
  |  Branch (2819:13): [True: 0, False: 0]
  ------------------
 2820|      0|            dav1d_free(f->tile_thread.lowest_pixel_mem);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
 2821|      0|            f->tile_thread.lowest_pixel_mem =
 2822|      0|                dav1d_malloc(ALLOC_TILE, lowest_pixel_mem_sz *
  ------------------
  |  |  132|      0|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 2823|      0|                             sizeof(*f->tile_thread.lowest_pixel_mem));
 2824|      0|            if (!f->tile_thread.lowest_pixel_mem) {
  ------------------
  |  Branch (2824:17): [True: 0, False: 0]
  ------------------
 2825|      0|                f->tile_thread.lowest_pixel_mem_sz = 0;
 2826|      0|                goto error;
 2827|      0|            }
 2828|      0|            f->tile_thread.lowest_pixel_mem_sz = lowest_pixel_mem_sz;
 2829|      0|        }
 2830|      0|        int (*lowest_pixel_ptr)[7][2] = f->tile_thread.lowest_pixel_mem;
 2831|      0|        for (int tile_row = 0, tile_row_base = 0; tile_row < f->frame_hdr->tiling.rows;
  ------------------
  |  Branch (2831:51): [True: 0, False: 0]
  ------------------
 2832|      0|             tile_row++, tile_row_base += f->frame_hdr->tiling.cols)
 2833|      0|        {
 2834|      0|            const int tile_row_sb_h = f->frame_hdr->tiling.row_start_sb[tile_row + 1] -
 2835|      0|                                      f->frame_hdr->tiling.row_start_sb[tile_row];
 2836|      0|            for (int tile_col = 0; tile_col < f->frame_hdr->tiling.cols; tile_col++) {
  ------------------
  |  Branch (2836:36): [True: 0, False: 0]
  ------------------
 2837|      0|                f->ts[tile_row_base + tile_col].lowest_pixel = lowest_pixel_ptr;
 2838|      0|                lowest_pixel_ptr += tile_row_sb_h;
 2839|      0|            }
 2840|      0|        }
 2841|       |
 2842|      0|        const int cbi_sz = num_sb128 * size_mul[0];
 2843|      0|        if (cbi_sz != f->frame_thread.cbi_sz) {
  ------------------
  |  Branch (2843:13): [True: 0, False: 0]
  ------------------
 2844|      0|            dav1d_free_aligned(f->frame_thread.cbi);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2845|      0|            f->frame_thread.cbi =
 2846|      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)
  ------------------
 2847|      0|                                    cbi_sz * 32 * 32 / 4, 64);
 2848|      0|            if (!f->frame_thread.cbi) {
  ------------------
  |  Branch (2848:17): [True: 0, False: 0]
  ------------------
 2849|      0|                f->frame_thread.cbi_sz = 0;
 2850|      0|                goto error;
 2851|      0|            }
 2852|      0|            f->frame_thread.cbi_sz = cbi_sz;
 2853|      0|        }
 2854|       |
 2855|      0|        const int cf_sz = (num_sb128 * size_mul[0]) << hbd;
 2856|      0|        if (cf_sz != f->frame_thread.cf_sz) {
  ------------------
  |  Branch (2856:13): [True: 0, False: 0]
  ------------------
 2857|      0|            dav1d_free_aligned(f->frame_thread.cf);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2858|      0|            f->frame_thread.cf =
 2859|      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)
  ------------------
 2860|      0|            if (!f->frame_thread.cf) {
  ------------------
  |  Branch (2860:17): [True: 0, False: 0]
  ------------------
 2861|      0|                f->frame_thread.cf_sz = 0;
 2862|      0|                goto error;
 2863|      0|            }
 2864|      0|            memset(f->frame_thread.cf, 0, (size_t)cf_sz * 128 * 128 / 2);
 2865|      0|            f->frame_thread.cf_sz = cf_sz;
 2866|      0|        }
 2867|       |
 2868|      0|        if (f->frame_hdr->allow_screen_content_tools) {
  ------------------
  |  Branch (2868:13): [True: 0, False: 0]
  ------------------
 2869|      0|            const int pal_sz = num_sb128 << hbd;
 2870|      0|            if (pal_sz != f->frame_thread.pal_sz) {
  ------------------
  |  Branch (2870:17): [True: 0, False: 0]
  ------------------
 2871|      0|                dav1d_free_aligned(f->frame_thread.pal);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2872|      0|                f->frame_thread.pal =
 2873|      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)
  ------------------
 2874|      0|                                        pal_sz * 16 * 16, 64);
 2875|      0|                if (!f->frame_thread.pal) {
  ------------------
  |  Branch (2875:21): [True: 0, False: 0]
  ------------------
 2876|      0|                    f->frame_thread.pal_sz = 0;
 2877|      0|                    goto error;
 2878|      0|                }
 2879|      0|                f->frame_thread.pal_sz = pal_sz;
 2880|      0|            }
 2881|       |
 2882|      0|            const int pal_idx_sz = num_sb128 * size_mul[1];
 2883|      0|            if (pal_idx_sz != f->frame_thread.pal_idx_sz) {
  ------------------
  |  Branch (2883:17): [True: 0, False: 0]
  ------------------
 2884|      0|                dav1d_free_aligned(f->frame_thread.pal_idx);
  ------------------
  |  |  136|      0|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2885|      0|                f->frame_thread.pal_idx =
 2886|      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)
  ------------------
 2887|      0|                                        pal_idx_sz * 128 * 128 / 8, 64);
 2888|      0|                if (!f->frame_thread.pal_idx) {
  ------------------
  |  Branch (2888:21): [True: 0, False: 0]
  ------------------
 2889|      0|                    f->frame_thread.pal_idx_sz = 0;
 2890|      0|                    goto error;
 2891|      0|                }
 2892|      0|                f->frame_thread.pal_idx_sz = pal_idx_sz;
 2893|      0|            }
 2894|      0|        } else if (f->frame_thread.pal) {
  ------------------
  |  Branch (2894:20): [True: 0, False: 0]
  ------------------
 2895|      0|            dav1d_freep_aligned(&f->frame_thread.pal);
 2896|      0|            dav1d_freep_aligned(&f->frame_thread.pal_idx);
 2897|      0|            f->frame_thread.pal_sz = f->frame_thread.pal_idx_sz = 0;
 2898|      0|        }
 2899|      0|    }
 2900|       |
 2901|       |    // update allocation of block contexts for above
 2902|  19.0k|    ptrdiff_t y_stride = f->cur.stride[0], uv_stride = f->cur.stride[1];
 2903|  19.0k|    const int has_resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
 2904|  19.0k|    const int need_cdef_lpf_copy = c->n_tc > 1 && has_resize;
  ------------------
  |  Branch (2904:36): [True: 0, False: 19.0k]
  |  Branch (2904:51): [True: 0, False: 0]
  ------------------
 2905|  19.0k|    if (y_stride * f->sbh * 4 != f->lf.cdef_buf_plane_sz[0] ||
  ------------------
  |  Branch (2905:9): [True: 13.3k, False: 5.70k]
  ------------------
 2906|  5.70k|        uv_stride * f->sbh * 8 != f->lf.cdef_buf_plane_sz[1] ||
  ------------------
  |  Branch (2906:9): [True: 98, False: 5.60k]
  ------------------
 2907|  5.60k|        need_cdef_lpf_copy != f->lf.need_cdef_lpf_copy ||
  ------------------
  |  Branch (2907:9): [True: 0, False: 5.60k]
  ------------------
 2908|  5.60k|        f->sbh != f->lf.cdef_buf_sbh)
  ------------------
  |  Branch (2908:9): [True: 4, False: 5.60k]
  ------------------
 2909|  13.4k|    {
 2910|  13.4k|        dav1d_free_aligned(f->lf.cdef_line_buf);
  ------------------
  |  |  136|  13.4k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2911|  13.4k|        size_t alloc_sz = 64;
 2912|  13.4k|        alloc_sz += (size_t)llabs(y_stride) * 4 * f->sbh << need_cdef_lpf_copy;
 2913|  13.4k|        alloc_sz += (size_t)llabs(uv_stride) * 8 * f->sbh << need_cdef_lpf_copy;
 2914|  13.4k|        uint8_t *ptr = f->lf.cdef_line_buf = dav1d_alloc_aligned(ALLOC_CDEF, alloc_sz, 32);
  ------------------
  |  |  134|  13.4k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2915|  13.4k|        if (!ptr) {
  ------------------
  |  Branch (2915:13): [True: 0, False: 13.4k]
  ------------------
 2916|      0|            f->lf.cdef_buf_plane_sz[0] = f->lf.cdef_buf_plane_sz[1] = 0;
 2917|      0|            goto error;
 2918|      0|        }
 2919|       |
 2920|  13.4k|        ptr += 32;
 2921|  13.4k|        if (y_stride < 0) {
  ------------------
  |  Branch (2921:13): [True: 0, False: 13.4k]
  ------------------
 2922|      0|            f->lf.cdef_line[0][0] = ptr - y_stride * (f->sbh * 4 - 1);
 2923|      0|            f->lf.cdef_line[1][0] = ptr - y_stride * (f->sbh * 4 - 3);
 2924|  13.4k|        } else {
 2925|  13.4k|            f->lf.cdef_line[0][0] = ptr + y_stride * 0;
 2926|  13.4k|            f->lf.cdef_line[1][0] = ptr + y_stride * 2;
 2927|  13.4k|        }
 2928|  13.4k|        ptr += llabs(y_stride) * f->sbh * 4;
 2929|  13.4k|        if (uv_stride < 0) {
  ------------------
  |  Branch (2929:13): [True: 0, False: 13.4k]
  ------------------
 2930|      0|            f->lf.cdef_line[0][1] = ptr - uv_stride * (f->sbh * 8 - 1);
 2931|      0|            f->lf.cdef_line[0][2] = ptr - uv_stride * (f->sbh * 8 - 3);
 2932|      0|            f->lf.cdef_line[1][1] = ptr - uv_stride * (f->sbh * 8 - 5);
 2933|      0|            f->lf.cdef_line[1][2] = ptr - uv_stride * (f->sbh * 8 - 7);
 2934|  13.4k|        } else {
 2935|  13.4k|            f->lf.cdef_line[0][1] = ptr + uv_stride * 0;
 2936|  13.4k|            f->lf.cdef_line[0][2] = ptr + uv_stride * 2;
 2937|  13.4k|            f->lf.cdef_line[1][1] = ptr + uv_stride * 4;
 2938|  13.4k|            f->lf.cdef_line[1][2] = ptr + uv_stride * 6;
 2939|  13.4k|        }
 2940|       |
 2941|  13.4k|        if (need_cdef_lpf_copy) {
  ------------------
  |  Branch (2941:13): [True: 0, False: 13.4k]
  ------------------
 2942|      0|            ptr += llabs(uv_stride) * f->sbh * 8;
 2943|      0|            if (y_stride < 0)
  ------------------
  |  Branch (2943:17): [True: 0, False: 0]
  ------------------
 2944|      0|                f->lf.cdef_lpf_line[0] = ptr - y_stride * (f->sbh * 4 - 1);
 2945|      0|            else
 2946|      0|                f->lf.cdef_lpf_line[0] = ptr;
 2947|      0|            ptr += llabs(y_stride) * f->sbh * 4;
 2948|      0|            if (uv_stride < 0) {
  ------------------
  |  Branch (2948:17): [True: 0, False: 0]
  ------------------
 2949|      0|                f->lf.cdef_lpf_line[1] = ptr - uv_stride * (f->sbh * 4 - 1);
 2950|      0|                f->lf.cdef_lpf_line[2] = ptr - uv_stride * (f->sbh * 8 - 1);
 2951|      0|            } else {
 2952|      0|                f->lf.cdef_lpf_line[1] = ptr;
 2953|      0|                f->lf.cdef_lpf_line[2] = ptr + uv_stride * f->sbh * 4;
 2954|      0|            }
 2955|      0|        }
 2956|       |
 2957|  13.4k|        f->lf.cdef_buf_plane_sz[0] = (int) y_stride * f->sbh * 4;
 2958|  13.4k|        f->lf.cdef_buf_plane_sz[1] = (int) uv_stride * f->sbh * 8;
 2959|  13.4k|        f->lf.need_cdef_lpf_copy = need_cdef_lpf_copy;
 2960|  13.4k|        f->lf.cdef_buf_sbh = f->sbh;
 2961|  13.4k|    }
 2962|       |
 2963|  19.0k|    const int sb128 = f->seq_hdr->sb128;
 2964|  19.0k|    const int num_lines = c->n_tc > 1 ? f->sbh * 4 << sb128 : 12;
  ------------------
  |  Branch (2964:27): [True: 0, False: 19.0k]
  ------------------
 2965|  19.0k|    y_stride = f->sr_cur.p.stride[0], uv_stride = f->sr_cur.p.stride[1];
 2966|  19.0k|    if (y_stride * num_lines != f->lf.lr_buf_plane_sz[0] ||
  ------------------
  |  Branch (2966:9): [True: 13.2k, False: 5.80k]
  ------------------
 2967|  5.80k|        uv_stride * num_lines * 2 != f->lf.lr_buf_plane_sz[1])
  ------------------
  |  Branch (2967:9): [True: 106, False: 5.69k]
  ------------------
 2968|  13.3k|    {
 2969|  13.3k|        dav1d_free_aligned(f->lf.lr_line_buf);
  ------------------
  |  |  136|  13.3k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 2970|       |        // lr simd may overread the input, so slightly over-allocate the lpf buffer
 2971|  13.3k|        size_t alloc_sz = 128;
 2972|  13.3k|        alloc_sz += (size_t)llabs(y_stride) * num_lines;
 2973|  13.3k|        alloc_sz += (size_t)llabs(uv_stride) * num_lines * 2;
 2974|  13.3k|        uint8_t *ptr = f->lf.lr_line_buf = dav1d_alloc_aligned(ALLOC_LR, alloc_sz, 64);
  ------------------
  |  |  134|  13.3k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 2975|  13.3k|        if (!ptr) {
  ------------------
  |  Branch (2975:13): [True: 0, False: 13.3k]
  ------------------
 2976|      0|            f->lf.lr_buf_plane_sz[0] = f->lf.lr_buf_plane_sz[1] = 0;
 2977|      0|            goto error;
 2978|      0|        }
 2979|       |
 2980|  13.3k|        ptr += 64;
 2981|  13.3k|        if (y_stride < 0)
  ------------------
  |  Branch (2981:13): [True: 0, False: 13.3k]
  ------------------
 2982|      0|            f->lf.lr_lpf_line[0] = ptr - y_stride * (num_lines - 1);
 2983|  13.3k|        else
 2984|  13.3k|            f->lf.lr_lpf_line[0] = ptr;
 2985|  13.3k|        ptr += llabs(y_stride) * num_lines;
 2986|  13.3k|        if (uv_stride < 0) {
  ------------------
  |  Branch (2986:13): [True: 0, False: 13.3k]
  ------------------
 2987|      0|            f->lf.lr_lpf_line[1] = ptr - uv_stride * (num_lines * 1 - 1);
 2988|      0|            f->lf.lr_lpf_line[2] = ptr - uv_stride * (num_lines * 2 - 1);
 2989|  13.3k|        } else {
 2990|  13.3k|            f->lf.lr_lpf_line[1] = ptr;
 2991|  13.3k|            f->lf.lr_lpf_line[2] = ptr + uv_stride * num_lines;
 2992|  13.3k|        }
 2993|       |
 2994|  13.3k|        f->lf.lr_buf_plane_sz[0] = (int) y_stride * num_lines;
 2995|  13.3k|        f->lf.lr_buf_plane_sz[1] = (int) uv_stride * num_lines * 2;
 2996|  13.3k|    }
 2997|       |
 2998|       |    // update allocation for loopfilter masks
 2999|  19.0k|    if (num_sb128 != f->lf.mask_sz) {
  ------------------
  |  Branch (2999:9): [True: 13.2k, False: 5.75k]
  ------------------
 3000|  13.2k|        dav1d_free(f->lf.mask);
  ------------------
  |  |  135|  13.2k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3001|  13.2k|        dav1d_free(f->lf.level);
  ------------------
  |  |  135|  13.2k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3002|  13.2k|        f->lf.mask = dav1d_malloc(ALLOC_LF, sizeof(*f->lf.mask) * num_sb128);
  ------------------
  |  |  132|  13.2k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3003|       |        // over-allocate by 3 bytes since some of the SIMD implementations
 3004|       |        // index this from the level type and can thus over-read by up to 3
 3005|  13.2k|        f->lf.level = dav1d_malloc(ALLOC_LF, sizeof(*f->lf.level) * num_sb128 * 32 * 32 + 3);
  ------------------
  |  |  132|  13.2k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3006|  13.2k|        if (!f->lf.mask || !f->lf.level) {
  ------------------
  |  Branch (3006:13): [True: 0, False: 13.2k]
  |  Branch (3006:28): [True: 0, False: 13.2k]
  ------------------
 3007|      0|            f->lf.mask_sz = 0;
 3008|      0|            goto error;
 3009|      0|        }
 3010|  13.2k|        if (c->n_fc > 1) {
  ------------------
  |  Branch (3010:13): [True: 0, False: 13.2k]
  ------------------
 3011|      0|            dav1d_free(f->frame_thread.b);
  ------------------
  |  |  135|      0|#define dav1d_free(ptr) free(ptr)
  ------------------
 3012|      0|            f->frame_thread.b = dav1d_malloc(ALLOC_BLOCK, sizeof(*f->frame_thread.b) *
  ------------------
  |  |  132|      0|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3013|      0|                                             num_sb128 * 32 * 32);
 3014|      0|            if (!f->frame_thread.b) {
  ------------------
  |  Branch (3014:17): [True: 0, False: 0]
  ------------------
 3015|      0|                f->lf.mask_sz = 0;
 3016|      0|                goto error;
 3017|      0|            }
 3018|      0|        }
 3019|  13.2k|        f->lf.mask_sz = num_sb128;
 3020|  13.2k|    }
 3021|       |
 3022|  19.0k|    f->sr_sb128w = (f->sr_cur.p.p.w + 127) >> 7;
 3023|  19.0k|    const int lr_mask_sz = f->sr_sb128w * f->sb128h;
 3024|  19.0k|    if (lr_mask_sz != f->lf.lr_mask_sz) {
  ------------------
  |  Branch (3024:9): [True: 13.2k, False: 5.78k]
  ------------------
 3025|  13.2k|        dav1d_free(f->lf.lr_mask);
  ------------------
  |  |  135|  13.2k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3026|  13.2k|        f->lf.lr_mask = dav1d_malloc(ALLOC_LR, sizeof(*f->lf.lr_mask) * lr_mask_sz);
  ------------------
  |  |  132|  13.2k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3027|  13.2k|        if (!f->lf.lr_mask) {
  ------------------
  |  Branch (3027:13): [True: 0, False: 13.2k]
  ------------------
 3028|      0|            f->lf.lr_mask_sz = 0;
 3029|      0|            goto error;
 3030|      0|        }
 3031|  13.2k|        f->lf.lr_mask_sz = lr_mask_sz;
 3032|  13.2k|    }
 3033|  19.0k|    f->lf.restore_planes =
 3034|  19.0k|        ((f->frame_hdr->restoration.type[0] != DAV1D_RESTORATION_NONE) << 0) +
 3035|  19.0k|        ((f->frame_hdr->restoration.type[1] != DAV1D_RESTORATION_NONE) << 1) +
 3036|  19.0k|        ((f->frame_hdr->restoration.type[2] != DAV1D_RESTORATION_NONE) << 2);
 3037|  19.0k|    if (f->frame_hdr->loopfilter.sharpness != f->lf.last_sharpness) {
  ------------------
  |  Branch (3037:9): [True: 16.2k, False: 2.76k]
  ------------------
 3038|  16.2k|        dav1d_calc_eih(&f->lf.lim_lut, f->frame_hdr->loopfilter.sharpness);
 3039|  16.2k|        f->lf.last_sharpness = f->frame_hdr->loopfilter.sharpness;
 3040|  16.2k|    }
 3041|  19.0k|    dav1d_calc_lf_values(f->lf.lvl, f->frame_hdr, (int8_t[4]) { 0, 0, 0, 0 });
 3042|  19.0k|    memset(f->lf.mask, 0, sizeof(*f->lf.mask) * num_sb128);
 3043|       |
 3044|  19.0k|    const int ipred_edge_sz = f->sbh * f->sb128w << hbd;
 3045|  19.0k|    if (ipred_edge_sz != f->ipred_edge_sz) {
  ------------------
  |  Branch (3045:9): [True: 13.3k, False: 5.70k]
  ------------------
 3046|  13.3k|        dav1d_free_aligned(f->ipred_edge[0]);
  ------------------
  |  |  136|  13.3k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
 3047|  13.3k|        uint8_t *ptr = f->ipred_edge[0] =
 3048|  13.3k|            dav1d_alloc_aligned(ALLOC_IPRED, ipred_edge_sz * 128 * 3, 64);
  ------------------
  |  |  134|  13.3k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
 3049|  13.3k|        if (!ptr) {
  ------------------
  |  Branch (3049:13): [True: 0, False: 13.3k]
  ------------------
 3050|      0|            f->ipred_edge_sz = 0;
 3051|      0|            goto error;
 3052|      0|        }
 3053|  13.3k|        f->ipred_edge[1] = ptr + ipred_edge_sz * 128 * 1;
 3054|  13.3k|        f->ipred_edge[2] = ptr + ipred_edge_sz * 128 * 2;
 3055|  13.3k|        f->ipred_edge_sz = ipred_edge_sz;
 3056|  13.3k|    }
 3057|       |
 3058|  19.0k|    const int re_sz = f->sb128h * f->frame_hdr->tiling.cols;
 3059|  19.0k|    if (re_sz != f->lf.re_sz) {
  ------------------
  |  Branch (3059:9): [True: 13.2k, False: 5.79k]
  ------------------
 3060|  13.2k|        dav1d_free(f->lf.tx_lpf_right_edge[0]);
  ------------------
  |  |  135|  13.2k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3061|  13.2k|        f->lf.tx_lpf_right_edge[0] = dav1d_malloc(ALLOC_LF, re_sz * 32 * 2);
  ------------------
  |  |  132|  13.2k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3062|  13.2k|        if (!f->lf.tx_lpf_right_edge[0]) {
  ------------------
  |  Branch (3062:13): [True: 0, False: 13.2k]
  ------------------
 3063|      0|            f->lf.re_sz = 0;
 3064|      0|            goto error;
 3065|      0|        }
 3066|  13.2k|        f->lf.tx_lpf_right_edge[1] = f->lf.tx_lpf_right_edge[0] + re_sz * 32;
 3067|  13.2k|        f->lf.re_sz = re_sz;
 3068|  13.2k|    }
 3069|       |
 3070|       |    // init ref mvs
 3071|  19.0k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc) {
  ------------------
  |  |   36|  38.0k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.34k, False: 15.6k]
  |  |  ------------------
  ------------------
  |  Branch (3071:45): [True: 3.29k, False: 12.3k]
  ------------------
 3072|  6.63k|        const int ret =
 3073|  6.63k|            dav1d_refmvs_init_frame(&f->rf, f->seq_hdr, f->frame_hdr,
 3074|  6.63k|                                    f->refpoc, f->mvs, f->refrefpoc, f->ref_mvs,
 3075|  6.63k|                                    f->c->n_tc, f->c->n_fc);
 3076|  6.63k|        if (ret < 0) goto error;
  ------------------
  |  Branch (3076:13): [True: 0, False: 6.63k]
  ------------------
 3077|  6.63k|    }
 3078|       |
 3079|       |    // setup dequant tables
 3080|  19.0k|    init_quant_tables(f->seq_hdr, f->frame_hdr, f->frame_hdr->quant.yac, f->dq);
 3081|  19.0k|    if (f->frame_hdr->quant.qm)
  ------------------
  |  Branch (3081:9): [True: 8.49k, False: 10.5k]
  ------------------
 3082|   169k|        for (int i = 0; i < N_RECT_TX_SIZES; i++) {
  ------------------
  |  Branch (3082:25): [True: 161k, False: 8.49k]
  ------------------
 3083|   161k|            f->qm[i][0] = dav1d_qm_tbl[f->frame_hdr->quant.qm_y][0][i];
 3084|   161k|            f->qm[i][1] = dav1d_qm_tbl[f->frame_hdr->quant.qm_u][1][i];
 3085|   161k|            f->qm[i][2] = dav1d_qm_tbl[f->frame_hdr->quant.qm_v][1][i];
 3086|   161k|        }
 3087|  10.5k|    else
 3088|  10.5k|        memset(f->qm, 0, sizeof(f->qm));
 3089|       |
 3090|       |    // setup jnt_comp weights
 3091|  19.0k|    if (f->frame_hdr->switchable_comp_refs) {
  ------------------
  |  Branch (3091:9): [True: 1.71k, False: 17.2k]
  ------------------
 3092|  13.7k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3092:25): [True: 12.0k, False: 1.71k]
  ------------------
 3093|  12.0k|            const unsigned ref0poc = f->refp[i].p.frame_hdr->frame_offset;
 3094|       |
 3095|  48.0k|            for (int j = i + 1; j < 7; j++) {
  ------------------
  |  Branch (3095:33): [True: 36.0k, False: 12.0k]
  ------------------
 3096|  36.0k|                const unsigned ref1poc = f->refp[j].p.frame_hdr->frame_offset;
 3097|       |
 3098|  36.0k|                const unsigned d1 =
 3099|  36.0k|                    imin(abs(get_poc_diff(f->seq_hdr->order_hint_n_bits, ref0poc,
 3100|  36.0k|                                          f->cur.frame_hdr->frame_offset)), 31);
 3101|  36.0k|                const unsigned d0 =
 3102|  36.0k|                    imin(abs(get_poc_diff(f->seq_hdr->order_hint_n_bits, ref1poc,
 3103|  36.0k|                                          f->cur.frame_hdr->frame_offset)), 31);
 3104|  36.0k|                const int order = d0 <= d1;
 3105|       |
 3106|  36.0k|                static const uint8_t quant_dist_weight[3][2] = {
 3107|  36.0k|                    { 2, 3 }, { 2, 5 }, { 2, 7 }
 3108|  36.0k|                };
 3109|  36.0k|                static const uint8_t quant_dist_lookup_table[4][2] = {
 3110|  36.0k|                    { 9, 7 }, { 11, 5 }, { 12, 4 }, { 13, 3 }
 3111|  36.0k|                };
 3112|       |
 3113|  36.0k|                int k;
 3114|  59.4k|                for (k = 0; k < 3; k++) {
  ------------------
  |  Branch (3114:29): [True: 52.1k, False: 7.28k]
  ------------------
 3115|  52.1k|                    const int c0 = quant_dist_weight[k][order];
 3116|  52.1k|                    const int c1 = quant_dist_weight[k][!order];
 3117|  52.1k|                    const int d0_c0 = d0 * c0;
 3118|  52.1k|                    const int d1_c1 = d1 * c1;
 3119|  52.1k|                    if ((d0 > d1 && d0_c0 < d1_c1) || (d0 <= d1 && d0_c0 > d1_c1)) break;
  ------------------
  |  Branch (3119:26): [True: 4.91k, False: 47.2k]
  |  Branch (3119:37): [True: 1.76k, False: 3.15k]
  |  Branch (3119:56): [True: 47.2k, False: 3.15k]
  |  Branch (3119:68): [True: 27.0k, False: 20.2k]
  ------------------
 3120|  52.1k|                }
 3121|       |
 3122|  36.0k|                f->jnt_weights[i][j] = quant_dist_lookup_table[k][order];
 3123|  36.0k|            }
 3124|  12.0k|        }
 3125|  1.71k|    }
 3126|       |
 3127|       |    /* Init loopfilter pointers. Increasing NULL pointers is technically UB,
 3128|       |     * so just point the chroma pointers in 4:0:0 to the luma plane here to
 3129|       |     * avoid having additional in-loop branches in various places. We never
 3130|       |     * dereference those pointers so it doesn't really matter what they
 3131|       |     * point at, as long as the pointers are valid. */
 3132|  19.0k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400;
 3133|  19.0k|    f->lf.p[0] = f->cur.data[0];
 3134|  19.0k|    f->lf.p[1] = f->cur.data[has_chroma ? 1 : 0];
  ------------------
  |  Branch (3134:30): [True: 13.7k, False: 5.30k]
  ------------------
 3135|  19.0k|    f->lf.p[2] = f->cur.data[has_chroma ? 2 : 0];
  ------------------
  |  Branch (3135:30): [True: 13.7k, False: 5.30k]
  ------------------
 3136|  19.0k|    f->lf.sr_p[0] = f->sr_cur.p.data[0];
 3137|  19.0k|    f->lf.sr_p[1] = f->sr_cur.p.data[has_chroma ? 1 : 0];
  ------------------
  |  Branch (3137:38): [True: 13.7k, False: 5.30k]
  ------------------
 3138|  19.0k|    f->lf.sr_p[2] = f->sr_cur.p.data[has_chroma ? 2 : 0];
  ------------------
  |  Branch (3138:38): [True: 13.7k, False: 5.30k]
  ------------------
 3139|       |
 3140|  19.0k|    retval = 0;
 3141|  19.0k|error:
 3142|  19.0k|    return retval;
 3143|  19.0k|}
dav1d_decode_frame_init_cdf:
 3145|  19.0k|int dav1d_decode_frame_init_cdf(Dav1dFrameContext *const f) {
 3146|  19.0k|    const Dav1dContext *const c = f->c;
 3147|  19.0k|    int retval = DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|  19.0k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3148|       |
 3149|  19.0k|    if (f->frame_hdr->refresh_context)
  ------------------
  |  Branch (3149:9): [True: 3.20k, False: 15.8k]
  ------------------
 3150|  3.20k|        dav1d_cdf_thread_copy(f->out_cdf.data.cdf, &f->in_cdf);
 3151|       |
 3152|       |    // parse individual tiles per tile group
 3153|  19.0k|    int tile_row = 0, tile_col = 0;
 3154|  19.0k|    f->task_thread.update_set = 0;
 3155|  37.9k|    for (int i = 0; i < f->n_tile_data; i++) {
  ------------------
  |  Branch (3155:21): [True: 19.0k, False: 18.9k]
  ------------------
 3156|  19.0k|        const uint8_t *data = f->tile[i].data.data;
 3157|  19.0k|        size_t size = f->tile[i].data.sz;
 3158|       |
 3159|  40.3k|        for (int j = f->tile[i].start; j <= f->tile[i].end; j++) {
  ------------------
  |  Branch (3159:40): [True: 21.4k, False: 18.9k]
  ------------------
 3160|  21.4k|            size_t tile_sz;
 3161|  21.4k|            if (j == f->tile[i].end) {
  ------------------
  |  Branch (3161:17): [True: 18.9k, False: 2.51k]
  ------------------
 3162|  18.9k|                tile_sz = size;
 3163|  18.9k|            } else {
 3164|  2.51k|                if (f->frame_hdr->tiling.n_bytes > size) goto error;
  ------------------
  |  Branch (3164:21): [True: 15, False: 2.50k]
  ------------------
 3165|  2.50k|                tile_sz = 0;
 3166|  5.26k|                for (unsigned k = 0; k < f->frame_hdr->tiling.n_bytes; k++)
  ------------------
  |  Branch (3166:38): [True: 2.76k, False: 2.50k]
  ------------------
 3167|  2.76k|                    tile_sz |= (unsigned)*data++ << (k * 8);
 3168|  2.50k|                tile_sz++;
 3169|  2.50k|                size -= f->frame_hdr->tiling.n_bytes;
 3170|  2.50k|                if (tile_sz > size) goto error;
  ------------------
  |  Branch (3170:21): [True: 92, False: 2.41k]
  ------------------
 3171|  2.50k|            }
 3172|       |
 3173|  21.3k|            setup_tile(&f->ts[j], f, data, tile_sz, tile_row, tile_col++,
 3174|  21.3k|                       c->n_fc > 1 ? f->frame_thread.tile_start_off[j] : 0);
  ------------------
  |  Branch (3174:24): [True: 0, False: 21.3k]
  ------------------
 3175|       |
 3176|  21.3k|            if (tile_col == f->frame_hdr->tiling.cols) {
  ------------------
  |  Branch (3176:17): [True: 19.8k, False: 1.51k]
  ------------------
 3177|  19.8k|                tile_col = 0;
 3178|  19.8k|                tile_row++;
 3179|  19.8k|            }
 3180|  21.3k|            if (j == f->frame_hdr->tiling.update && f->frame_hdr->refresh_context)
  ------------------
  |  Branch (3180:17): [True: 18.9k, False: 2.38k]
  |  Branch (3180:53): [True: 3.19k, False: 15.7k]
  ------------------
 3181|  3.19k|                f->task_thread.update_set = 1;
 3182|  21.3k|            data += tile_sz;
 3183|  21.3k|            size -= tile_sz;
 3184|  21.3k|        }
 3185|  19.0k|    }
 3186|       |
 3187|  18.9k|    if (c->n_tc > 1) {
  ------------------
  |  Branch (3187:9): [True: 0, False: 18.9k]
  ------------------
 3188|      0|        const int uses_2pass = c->n_fc > 1;
 3189|      0|        for (int n = 0; n < f->sb128w * f->frame_hdr->tiling.rows * (1 + uses_2pass); n++)
  ------------------
  |  Branch (3189:25): [True: 0, False: 0]
  ------------------
 3190|      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)
  |  |  ------------------
  ------------------
 3191|      0|                          uses_2pass ? 1 + (n >= f->sb128w * f->frame_hdr->tiling.rows) : 0);
  ------------------
  |  Branch (3191:27): [True: 0, False: 0]
  ------------------
 3192|      0|    }
 3193|       |
 3194|  18.9k|    retval = 0;
 3195|  19.0k|error:
 3196|  19.0k|    return retval;
 3197|  18.9k|}
dav1d_decode_frame_main:
 3199|  18.9k|int dav1d_decode_frame_main(Dav1dFrameContext *const f) {
 3200|  18.9k|    const Dav1dContext *const c = f->c;
 3201|  18.9k|    int retval = DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|  18.9k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3202|       |
 3203|  18.9k|    assert(f->c->n_tc == 1);
  ------------------
  |  |  140|  18.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 18.9k]
  |  |  |  Branch (140:68): [Folded, False: 18.9k]
  |  |  ------------------
  ------------------
 3204|       |
 3205|  18.9k|    Dav1dTaskContext *const t = &c->tc[f - c->fc];
 3206|  18.9k|    t->f = f;
 3207|  18.9k|    t->frame_thread.pass = 0;
 3208|       |
 3209|  89.4k|    for (int n = 0; n < f->sb128w * f->frame_hdr->tiling.rows; n++)
  ------------------
  |  Branch (3209:21): [True: 70.5k, False: 18.9k]
  ------------------
 3210|  70.5k|        reset_context(&f->a[n], IS_KEY_OR_INTRA(f->frame_hdr), 0);
  ------------------
  |  |   43|  70.5k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  70.5k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  ------------------
 3211|       |
 3212|       |    // no threading - we explicitly interleave tile/sbrow decoding
 3213|       |    // and post-filtering, so that the full process runs in-line
 3214|  34.1k|    for (int tile_row = 0; tile_row < f->frame_hdr->tiling.rows; tile_row++) {
  ------------------
  |  Branch (3214:28): [True: 19.5k, False: 14.5k]
  ------------------
 3215|  19.5k|        const int sbh_end =
 3216|  19.5k|            imin(f->frame_hdr->tiling.row_start_sb[tile_row + 1], f->sbh);
 3217|  19.5k|        for (int sby = f->frame_hdr->tiling.row_start_sb[tile_row];
 3218|  90.0k|             sby < sbh_end; sby++)
  ------------------
  |  Branch (3218:14): [True: 74.8k, False: 15.2k]
  ------------------
 3219|  74.8k|        {
 3220|  74.8k|            t->by = sby << (4 + f->seq_hdr->sb128);
 3221|  74.8k|            const int by_end = (t->by + f->sb_step) >> 1;
 3222|  74.8k|            if (f->frame_hdr->use_ref_frame_mvs) {
  ------------------
  |  Branch (3222:17): [True: 2.08k, False: 72.7k]
  ------------------
 3223|  2.08k|                f->c->refmvs_dsp.load_tmvs(&f->rf, tile_row,
 3224|  2.08k|                                           0, f->bw >> 1, t->by >> 1, by_end);
 3225|  2.08k|            }
 3226|   147k|            for (int tile_col = 0; tile_col < f->frame_hdr->tiling.cols; tile_col++) {
  ------------------
  |  Branch (3226:36): [True: 76.8k, False: 70.5k]
  ------------------
 3227|  76.8k|                t->ts = &f->ts[tile_row * f->frame_hdr->tiling.cols + tile_col];
 3228|  76.8k|                if (dav1d_decode_tile_sbrow(t)) goto error;
  ------------------
  |  Branch (3228:21): [True: 4.32k, False: 72.5k]
  ------------------
 3229|  76.8k|            }
 3230|  70.5k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|  70.5k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.59k, False: 67.9k]
  |  |  ------------------
  ------------------
 3231|  2.59k|                dav1d_refmvs_save_tmvs(&f->c->refmvs_dsp, &t->rt,
 3232|  2.59k|                                       0, f->bw >> 1, t->by >> 1, by_end);
 3233|  2.59k|            }
 3234|       |
 3235|       |            // loopfilter + cdef + restoration
 3236|  70.5k|            f->bd_fn.filter_sbrow(f, sby);
 3237|  70.5k|        }
 3238|  19.5k|    }
 3239|       |
 3240|  14.5k|    retval = 0;
 3241|  18.9k|error:
 3242|  18.9k|    return retval;
 3243|  14.5k|}
dav1d_decode_frame_exit:
 3245|  19.0k|void dav1d_decode_frame_exit(Dav1dFrameContext *const f, int retval) {
 3246|  19.0k|    const Dav1dContext *const c = f->c;
 3247|       |
 3248|  19.0k|    if (f->sr_cur.p.data[0])
  ------------------
  |  Branch (3248:9): [True: 19.0k, False: 0]
  ------------------
 3249|  19.0k|        atomic_init(&f->task_thread.error, 0);
 3250|       |
 3251|  19.0k|    if (c->n_fc > 1 && retval && f->frame_thread.cf) {
  ------------------
  |  Branch (3251:9): [True: 0, False: 19.0k]
  |  Branch (3251:24): [True: 0, False: 0]
  |  Branch (3251:34): [True: 0, False: 0]
  ------------------
 3252|      0|        memset(f->frame_thread.cf, 0,
 3253|      0|               (size_t)f->frame_thread.cf_sz * 128 * 128 / 2);
 3254|      0|    }
 3255|   152k|    for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3255:21): [True: 133k, False: 19.0k]
  ------------------
 3256|   133k|        if (f->refp[i].p.frame_hdr) {
  ------------------
  |  Branch (3256:13): [True: 23.4k, False: 109k]
  ------------------
 3257|  23.4k|            if (!retval && c->n_fc > 1 && c->strict_std_compliance &&
  ------------------
  |  Branch (3257:17): [True: 12.7k, False: 10.6k]
  |  Branch (3257:28): [True: 0, False: 12.7k]
  |  Branch (3257:43): [True: 0, False: 0]
  ------------------
 3258|  23.4k|                atomic_load(&f->refp[i].progress[1]) == FRAME_ERROR)
  ------------------
  |  |   35|      0|#define FRAME_ERROR (UINT_MAX - 1)
  ------------------
  |  Branch (3258:17): [True: 0, False: 0]
  ------------------
 3259|      0|            {
 3260|      0|                retval = DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3261|      0|                atomic_store(&f->task_thread.error, 1);
 3262|      0|                atomic_store(&f->sr_cur.progress[1], FRAME_ERROR);
 3263|      0|            }
 3264|  23.4k|            dav1d_thread_picture_unref(&f->refp[i]);
 3265|  23.4k|        }
 3266|   133k|        dav1d_ref_dec(&f->ref_mvs_ref[i]);
 3267|   133k|    }
 3268|       |
 3269|  19.0k|    dav1d_picture_unref_internal(&f->cur);
 3270|  19.0k|    dav1d_thread_picture_unref(&f->sr_cur);
 3271|  19.0k|    dav1d_cdf_thread_unref(&f->in_cdf);
 3272|  19.0k|    if (f->frame_hdr && f->frame_hdr->refresh_context) {
  ------------------
  |  Branch (3272:9): [True: 19.0k, False: 0]
  |  Branch (3272:25): [True: 3.20k, False: 15.8k]
  ------------------
 3273|  3.20k|        if (f->out_cdf.progress)
  ------------------
  |  Branch (3273:13): [True: 0, False: 3.20k]
  ------------------
 3274|  3.20k|            atomic_store(f->out_cdf.progress, retval == 0 ? 1 : TILE_ERROR);
  ------------------
  |  Branch (3274:13): [True: 0, False: 0]
  ------------------
 3275|  3.20k|        dav1d_cdf_thread_unref(&f->out_cdf);
 3276|  3.20k|    }
 3277|  19.0k|    dav1d_ref_dec(&f->cur_segmap_ref);
 3278|  19.0k|    dav1d_ref_dec(&f->prev_segmap_ref);
 3279|  19.0k|    dav1d_ref_dec(&f->mvs_ref);
 3280|  19.0k|    dav1d_ref_dec(&f->seq_hdr_ref);
 3281|  19.0k|    dav1d_ref_dec(&f->frame_hdr_ref);
 3282|       |
 3283|  38.0k|    for (int i = 0; i < f->n_tile_data; i++)
  ------------------
  |  Branch (3283:21): [True: 19.0k, False: 19.0k]
  ------------------
 3284|  19.0k|        dav1d_data_unref_internal(&f->tile[i].data);
 3285|  19.0k|    f->task_thread.retval = retval;
 3286|  19.0k|}
dav1d_decode_frame:
 3288|  19.0k|int dav1d_decode_frame(Dav1dFrameContext *const f) {
 3289|  19.0k|    assert(f->c->n_fc == 1);
  ------------------
  |  |  140|  19.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 19.0k]
  |  |  |  Branch (140:68): [Folded, False: 19.0k]
  |  |  ------------------
  ------------------
 3290|       |    // if n_tc > 1 (but n_fc == 1), we could run init/exit in the task
 3291|       |    // threads also. Not sure it makes a measurable difference.
 3292|  19.0k|    int res = dav1d_decode_frame_init(f);
 3293|  19.0k|    if (!res) res = dav1d_decode_frame_init_cdf(f);
  ------------------
  |  Branch (3293:9): [True: 19.0k, False: 0]
  ------------------
 3294|       |    // wait until all threads have completed
 3295|  19.0k|    if (!res) {
  ------------------
  |  Branch (3295:9): [True: 18.9k, False: 107]
  ------------------
 3296|  18.9k|        if (f->c->n_tc > 1) {
  ------------------
  |  Branch (3296:13): [True: 0, False: 18.9k]
  ------------------
 3297|      0|            res = dav1d_task_create_tile_sbrow(f, 0, 1);
 3298|      0|            pthread_mutex_lock(&f->task_thread.ttd->lock);
 3299|      0|            pthread_cond_signal(&f->task_thread.ttd->cond);
 3300|      0|            if (!res) {
  ------------------
  |  Branch (3300:17): [True: 0, False: 0]
  ------------------
 3301|      0|                while (!f->task_thread.done[0] ||
  ------------------
  |  Branch (3301:24): [True: 0, False: 0]
  ------------------
 3302|      0|                       atomic_load(&f->task_thread.task_counter) > 0)
  ------------------
  |  Branch (3302:24): [True: 0, False: 0]
  ------------------
 3303|      0|                {
 3304|      0|                    pthread_cond_wait(&f->task_thread.cond,
 3305|      0|                                      &f->task_thread.ttd->lock);
 3306|      0|                }
 3307|      0|            }
 3308|      0|            pthread_mutex_unlock(&f->task_thread.ttd->lock);
 3309|      0|            res = f->task_thread.retval;
 3310|  18.9k|        } else {
 3311|  18.9k|            res = dav1d_decode_frame_main(f);
 3312|  18.9k|            if (!res && f->frame_hdr->refresh_context && f->task_thread.update_set) {
  ------------------
  |  Branch (3312:17): [True: 14.5k, False: 4.32k]
  |  Branch (3312:25): [True: 2.09k, False: 12.4k]
  |  Branch (3312:58): [True: 2.09k, False: 0]
  ------------------
 3313|  2.09k|                dav1d_cdf_thread_update(f->frame_hdr, f->out_cdf.data.cdf,
 3314|  2.09k|                                        &f->ts[f->frame_hdr->tiling.update].cdf);
 3315|  2.09k|            }
 3316|  18.9k|        }
 3317|  18.9k|    }
 3318|  19.0k|    dav1d_decode_frame_exit(f, res);
 3319|  19.0k|    res = f->task_thread.retval;
 3320|  19.0k|    f->n_tile_data = 0;
 3321|  19.0k|    return res;
 3322|  19.0k|}
dav1d_submit_frame:
 3330|  19.0k|int dav1d_submit_frame(Dav1dContext *const c) {
 3331|  19.0k|    Dav1dFrameContext *f;
 3332|  19.0k|    int res = -1;
 3333|       |
 3334|       |    // wait for c->out_delayed[next] and move into c->out if visible
 3335|  19.0k|    Dav1dThreadPicture *out_delayed;
 3336|  19.0k|    if (c->n_fc > 1) {
  ------------------
  |  Branch (3336:9): [True: 0, False: 19.0k]
  ------------------
 3337|      0|        pthread_mutex_lock(&c->task_thread.lock);
 3338|      0|        const unsigned next = c->frame_thread.next++;
 3339|      0|        if (c->frame_thread.next == c->n_fc)
  ------------------
  |  Branch (3339:13): [True: 0, False: 0]
  ------------------
 3340|      0|            c->frame_thread.next = 0;
 3341|       |
 3342|      0|        f = &c->fc[next];
 3343|      0|        while (f->n_tile_data > 0)
  ------------------
  |  Branch (3343:16): [True: 0, False: 0]
  ------------------
 3344|      0|            pthread_cond_wait(&f->task_thread.cond,
 3345|      0|                              &c->task_thread.lock);
 3346|      0|        out_delayed = &c->frame_thread.out_delayed[next];
 3347|      0|        if (out_delayed->p.data[0] || atomic_load(&f->task_thread.error)) {
  ------------------
  |  Branch (3347:13): [True: 0, False: 0]
  |  Branch (3347:39): [True: 0, False: 0]
  ------------------
 3348|      0|            unsigned first = atomic_load(&c->task_thread.first);
 3349|      0|            if (first + 1U < c->n_fc)
  ------------------
  |  Branch (3349:17): [True: 0, False: 0]
  ------------------
 3350|      0|                atomic_fetch_add(&c->task_thread.first, 1U);
 3351|      0|            else
 3352|      0|                atomic_store(&c->task_thread.first, 0);
 3353|      0|            atomic_compare_exchange_strong(&c->task_thread.reset_task_cur,
 3354|      0|                                           &first, UINT_MAX);
 3355|      0|            if (c->task_thread.cur && c->task_thread.cur < c->n_fc)
  ------------------
  |  Branch (3355:17): [True: 0, False: 0]
  |  Branch (3355:39): [True: 0, False: 0]
  ------------------
 3356|      0|                c->task_thread.cur--;
 3357|      0|        }
 3358|      0|        const int error = f->task_thread.retval;
 3359|      0|        if (error) {
  ------------------
  |  Branch (3359:13): [True: 0, False: 0]
  ------------------
 3360|      0|            f->task_thread.retval = 0;
 3361|      0|            c->cached_error = error;
 3362|      0|            dav1d_data_props_copy(&c->cached_error_props, &out_delayed->p.m);
 3363|      0|            dav1d_thread_picture_unref(out_delayed);
 3364|      0|        } else if (out_delayed->p.data[0]) {
  ------------------
  |  Branch (3364:20): [True: 0, False: 0]
  ------------------
 3365|      0|            const unsigned progress = atomic_load_explicit(&out_delayed->progress[1],
 3366|      0|                                                           memory_order_relaxed);
 3367|      0|            if ((out_delayed->visible || c->output_invisible_frames) &&
  ------------------
  |  Branch (3367:18): [True: 0, False: 0]
  |  Branch (3367:42): [True: 0, False: 0]
  ------------------
 3368|      0|                progress != FRAME_ERROR)
  ------------------
  |  |   35|      0|#define FRAME_ERROR (UINT_MAX - 1)
  ------------------
  |  Branch (3368:17): [True: 0, False: 0]
  ------------------
 3369|      0|            {
 3370|      0|                dav1d_thread_picture_ref(&c->out, out_delayed);
 3371|      0|                c->event_flags |= dav1d_picture_get_event_flags(out_delayed);
 3372|      0|            }
 3373|      0|            dav1d_thread_picture_unref(out_delayed);
 3374|      0|        }
 3375|  19.0k|    } else {
 3376|  19.0k|        f = c->fc;
 3377|  19.0k|    }
 3378|       |
 3379|  19.0k|    f->seq_hdr = c->seq_hdr;
 3380|  19.0k|    f->seq_hdr_ref = c->seq_hdr_ref;
 3381|  19.0k|    dav1d_ref_inc(f->seq_hdr_ref);
 3382|  19.0k|    f->frame_hdr = c->frame_hdr;
 3383|  19.0k|    f->frame_hdr_ref = c->frame_hdr_ref;
 3384|  19.0k|    c->frame_hdr = NULL;
 3385|  19.0k|    c->frame_hdr_ref = NULL;
 3386|  19.0k|    f->dsp = &c->dsp[f->seq_hdr->hbd];
 3387|       |
 3388|  19.0k|    const int bpc = 8 + 2 * f->seq_hdr->hbd;
 3389|       |
 3390|  19.0k|    if (!f->dsp->ipred.intra_pred[DC_PRED]) {
  ------------------
  |  Branch (3390:9): [True: 12.8k, False: 6.15k]
  ------------------
 3391|  12.8k|        Dav1dDSPContext *const dsp = &c->dsp[f->seq_hdr->hbd];
 3392|       |
 3393|  12.8k|        switch (bpc) {
 3394|      0|#define assign_bitdepth_case(bd) \
 3395|      0|            dav1d_cdef_dsp_init_##bd##bpc(&dsp->cdef); \
 3396|      0|            dav1d_intra_pred_dsp_init_##bd##bpc(&dsp->ipred); \
 3397|      0|            dav1d_itx_dsp_init_##bd##bpc(&dsp->itx, bpc); \
 3398|      0|            dav1d_loop_filter_dsp_init_##bd##bpc(&dsp->lf); \
 3399|      0|            dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr, bpc); \
 3400|      0|            dav1d_mc_dsp_init_##bd##bpc(&dsp->mc); \
 3401|      0|            dav1d_film_grain_dsp_init_##bd##bpc(&dsp->fg); \
 3402|      0|            break
 3403|      0|#if CONFIG_8BPC
 3404|  5.05k|        case 8:
  ------------------
  |  Branch (3404:9): [True: 5.05k, False: 7.82k]
  ------------------
 3405|  5.05k|            assign_bitdepth_case(8);
  ------------------
  |  | 3395|  5.05k|            dav1d_cdef_dsp_init_##bd##bpc(&dsp->cdef); \
  |  | 3396|  5.05k|            dav1d_intra_pred_dsp_init_##bd##bpc(&dsp->ipred); \
  |  | 3397|  5.05k|            dav1d_itx_dsp_init_##bd##bpc(&dsp->itx, bpc); \
  |  | 3398|  5.05k|            dav1d_loop_filter_dsp_init_##bd##bpc(&dsp->lf); \
  |  | 3399|  5.05k|            dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr, bpc); \
  |  | 3400|  5.05k|            dav1d_mc_dsp_init_##bd##bpc(&dsp->mc); \
  |  | 3401|  5.05k|            dav1d_film_grain_dsp_init_##bd##bpc(&dsp->fg); \
  |  | 3402|  5.05k|            break
  ------------------
 3406|      0|#endif
 3407|      0|#if CONFIG_16BPC
 3408|  4.12k|        case 10:
  ------------------
  |  Branch (3408:9): [True: 4.12k, False: 8.76k]
  ------------------
 3409|  7.82k|        case 12:
  ------------------
  |  Branch (3409:9): [True: 3.70k, False: 9.17k]
  ------------------
 3410|  7.82k|            assign_bitdepth_case(16);
  ------------------
  |  | 3395|  7.82k|            dav1d_cdef_dsp_init_##bd##bpc(&dsp->cdef); \
  |  | 3396|  7.82k|            dav1d_intra_pred_dsp_init_##bd##bpc(&dsp->ipred); \
  |  | 3397|  7.82k|            dav1d_itx_dsp_init_##bd##bpc(&dsp->itx, bpc); \
  |  | 3398|  7.82k|            dav1d_loop_filter_dsp_init_##bd##bpc(&dsp->lf); \
  |  | 3399|  7.82k|            dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr, bpc); \
  |  | 3400|  7.82k|            dav1d_mc_dsp_init_##bd##bpc(&dsp->mc); \
  |  | 3401|  7.82k|            dav1d_film_grain_dsp_init_##bd##bpc(&dsp->fg); \
  |  | 3402|  7.82k|            break
  ------------------
 3411|      0|#endif
 3412|      0|#undef assign_bitdepth_case
 3413|      0|        default:
  ------------------
  |  Branch (3413:9): [True: 0, False: 12.8k]
  ------------------
 3414|      0|            dav1d_log(c, "Compiled without support for %d-bit decoding\n",
  ------------------
  |  |   39|      0|#define dav1d_log dav1d_log
  ------------------
 3415|      0|                    8 + 2 * f->seq_hdr->hbd);
 3416|      0|            res = DAV1D_ERR(ENOPROTOOPT);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3417|      0|            goto error;
 3418|  12.8k|        }
 3419|  12.8k|    }
 3420|       |
 3421|  19.0k|#define assign_bitdepth_case(bd) \
 3422|  19.0k|        f->bd_fn.recon_b_inter = dav1d_recon_b_inter_##bd##bpc; \
 3423|  19.0k|        f->bd_fn.recon_b_intra = dav1d_recon_b_intra_##bd##bpc; \
 3424|  19.0k|        f->bd_fn.filter_sbrow = dav1d_filter_sbrow_##bd##bpc; \
 3425|  19.0k|        f->bd_fn.filter_sbrow_deblock_cols = dav1d_filter_sbrow_deblock_cols_##bd##bpc; \
 3426|  19.0k|        f->bd_fn.filter_sbrow_deblock_rows = dav1d_filter_sbrow_deblock_rows_##bd##bpc; \
 3427|  19.0k|        f->bd_fn.filter_sbrow_cdef = dav1d_filter_sbrow_cdef_##bd##bpc; \
 3428|  19.0k|        f->bd_fn.filter_sbrow_resize = dav1d_filter_sbrow_resize_##bd##bpc; \
 3429|  19.0k|        f->bd_fn.filter_sbrow_lr = dav1d_filter_sbrow_lr_##bd##bpc; \
 3430|  19.0k|        f->bd_fn.backup_ipred_edge = dav1d_backup_ipred_edge_##bd##bpc; \
 3431|  19.0k|        f->bd_fn.read_coef_blocks = dav1d_read_coef_blocks_##bd##bpc; \
 3432|  19.0k|        f->bd_fn.copy_pal_block_y = dav1d_copy_pal_block_y_##bd##bpc; \
 3433|  19.0k|        f->bd_fn.copy_pal_block_uv = dav1d_copy_pal_block_uv_##bd##bpc; \
 3434|  19.0k|        f->bd_fn.read_pal_plane = dav1d_read_pal_plane_##bd##bpc; \
 3435|  19.0k|        f->bd_fn.read_pal_uv = dav1d_read_pal_uv_##bd##bpc
 3436|  19.0k|    if (!f->seq_hdr->hbd) {
  ------------------
  |  Branch (3436:9): [True: 8.29k, False: 10.7k]
  ------------------
 3437|  8.29k|#if CONFIG_8BPC
 3438|  8.29k|        assign_bitdepth_case(8);
  ------------------
  |  | 3422|  8.29k|        f->bd_fn.recon_b_inter = dav1d_recon_b_inter_##bd##bpc; \
  |  | 3423|  8.29k|        f->bd_fn.recon_b_intra = dav1d_recon_b_intra_##bd##bpc; \
  |  | 3424|  8.29k|        f->bd_fn.filter_sbrow = dav1d_filter_sbrow_##bd##bpc; \
  |  | 3425|  8.29k|        f->bd_fn.filter_sbrow_deblock_cols = dav1d_filter_sbrow_deblock_cols_##bd##bpc; \
  |  | 3426|  8.29k|        f->bd_fn.filter_sbrow_deblock_rows = dav1d_filter_sbrow_deblock_rows_##bd##bpc; \
  |  | 3427|  8.29k|        f->bd_fn.filter_sbrow_cdef = dav1d_filter_sbrow_cdef_##bd##bpc; \
  |  | 3428|  8.29k|        f->bd_fn.filter_sbrow_resize = dav1d_filter_sbrow_resize_##bd##bpc; \
  |  | 3429|  8.29k|        f->bd_fn.filter_sbrow_lr = dav1d_filter_sbrow_lr_##bd##bpc; \
  |  | 3430|  8.29k|        f->bd_fn.backup_ipred_edge = dav1d_backup_ipred_edge_##bd##bpc; \
  |  | 3431|  8.29k|        f->bd_fn.read_coef_blocks = dav1d_read_coef_blocks_##bd##bpc; \
  |  | 3432|  8.29k|        f->bd_fn.copy_pal_block_y = dav1d_copy_pal_block_y_##bd##bpc; \
  |  | 3433|  8.29k|        f->bd_fn.copy_pal_block_uv = dav1d_copy_pal_block_uv_##bd##bpc; \
  |  | 3434|  8.29k|        f->bd_fn.read_pal_plane = dav1d_read_pal_plane_##bd##bpc; \
  |  | 3435|  8.29k|        f->bd_fn.read_pal_uv = dav1d_read_pal_uv_##bd##bpc
  ------------------
 3439|  8.29k|#endif
 3440|  10.7k|    } else {
 3441|  10.7k|#if CONFIG_16BPC
 3442|  10.7k|        assign_bitdepth_case(16);
  ------------------
  |  | 3422|  10.7k|        f->bd_fn.recon_b_inter = dav1d_recon_b_inter_##bd##bpc; \
  |  | 3423|  10.7k|        f->bd_fn.recon_b_intra = dav1d_recon_b_intra_##bd##bpc; \
  |  | 3424|  10.7k|        f->bd_fn.filter_sbrow = dav1d_filter_sbrow_##bd##bpc; \
  |  | 3425|  10.7k|        f->bd_fn.filter_sbrow_deblock_cols = dav1d_filter_sbrow_deblock_cols_##bd##bpc; \
  |  | 3426|  10.7k|        f->bd_fn.filter_sbrow_deblock_rows = dav1d_filter_sbrow_deblock_rows_##bd##bpc; \
  |  | 3427|  10.7k|        f->bd_fn.filter_sbrow_cdef = dav1d_filter_sbrow_cdef_##bd##bpc; \
  |  | 3428|  10.7k|        f->bd_fn.filter_sbrow_resize = dav1d_filter_sbrow_resize_##bd##bpc; \
  |  | 3429|  10.7k|        f->bd_fn.filter_sbrow_lr = dav1d_filter_sbrow_lr_##bd##bpc; \
  |  | 3430|  10.7k|        f->bd_fn.backup_ipred_edge = dav1d_backup_ipred_edge_##bd##bpc; \
  |  | 3431|  10.7k|        f->bd_fn.read_coef_blocks = dav1d_read_coef_blocks_##bd##bpc; \
  |  | 3432|  10.7k|        f->bd_fn.copy_pal_block_y = dav1d_copy_pal_block_y_##bd##bpc; \
  |  | 3433|  10.7k|        f->bd_fn.copy_pal_block_uv = dav1d_copy_pal_block_uv_##bd##bpc; \
  |  | 3434|  10.7k|        f->bd_fn.read_pal_plane = dav1d_read_pal_plane_##bd##bpc; \
  |  | 3435|  10.7k|        f->bd_fn.read_pal_uv = dav1d_read_pal_uv_##bd##bpc
  ------------------
 3443|  10.7k|#endif
 3444|  10.7k|    }
 3445|  19.0k|#undef assign_bitdepth_case
 3446|       |
 3447|  19.0k|    int ref_coded_width[7];
 3448|  19.0k|    if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|  19.0k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.37k, False: 15.6k]
  |  |  ------------------
  ------------------
 3449|  3.37k|        if (f->frame_hdr->primary_ref_frame != DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  3.37k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (3449:13): [True: 2.83k, False: 532]
  ------------------
 3450|  2.83k|            const int pri_ref = f->frame_hdr->refidx[f->frame_hdr->primary_ref_frame];
 3451|  2.83k|            if (!c->refs[pri_ref].p.p.data[0]) {
  ------------------
  |  Branch (3451:17): [True: 1, False: 2.83k]
  ------------------
 3452|      1|                res = DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|      1|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3453|      1|                goto error;
 3454|      1|            }
 3455|  2.83k|        }
 3456|  26.8k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3456:25): [True: 23.4k, False: 3.34k]
  ------------------
 3457|  23.4k|            const int refidx = f->frame_hdr->refidx[i];
 3458|  23.4k|            if (!c->refs[refidx].p.p.data[0] ||
  ------------------
  |  Branch (3458:17): [True: 20, False: 23.4k]
  ------------------
 3459|  23.4k|                f->frame_hdr->width[0] * 2 < c->refs[refidx].p.p.p.w ||
  ------------------
  |  Branch (3459:17): [True: 2, False: 23.4k]
  ------------------
 3460|  23.4k|                f->frame_hdr->height * 2 < c->refs[refidx].p.p.p.h ||
  ------------------
  |  Branch (3460:17): [True: 1, False: 23.4k]
  ------------------
 3461|  23.4k|                f->frame_hdr->width[0] > c->refs[refidx].p.p.p.w * 16 ||
  ------------------
  |  Branch (3461:17): [True: 1, False: 23.4k]
  ------------------
 3462|  23.4k|                f->frame_hdr->height > c->refs[refidx].p.p.p.h * 16 ||
  ------------------
  |  Branch (3462:17): [True: 1, False: 23.4k]
  ------------------
 3463|  23.4k|                f->seq_hdr->layout != c->refs[refidx].p.p.p.layout ||
  ------------------
  |  Branch (3463:17): [True: 0, False: 23.4k]
  ------------------
 3464|  23.4k|                bpc != c->refs[refidx].p.p.p.bpc)
  ------------------
  |  Branch (3464:17): [True: 0, False: 23.4k]
  ------------------
 3465|     25|            {
 3466|     48|                for (int j = 0; j < i; j++)
  ------------------
  |  Branch (3466:33): [True: 23, False: 25]
  ------------------
 3467|     23|                    dav1d_thread_picture_unref(&f->refp[j]);
 3468|     25|                res = DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|     25|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3469|     25|                goto error;
 3470|     25|            }
 3471|  23.4k|            dav1d_thread_picture_ref(&f->refp[i], &c->refs[refidx].p);
 3472|  23.4k|            ref_coded_width[i] = c->refs[refidx].p.p.frame_hdr->width[0];
 3473|  23.4k|            if (f->frame_hdr->width[0] != c->refs[refidx].p.p.p.w ||
  ------------------
  |  Branch (3473:17): [True: 11.0k, False: 12.3k]
  ------------------
 3474|  12.3k|                f->frame_hdr->height != c->refs[refidx].p.p.p.h)
  ------------------
  |  Branch (3474:17): [True: 819, False: 11.5k]
  ------------------
 3475|  11.8k|            {
 3476|  11.8k|#define scale_fac(ref_sz, this_sz) \
 3477|  11.8k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
 3478|  11.8k|                f->svc[i][0].scale = scale_fac(c->refs[refidx].p.p.p.w,
  ------------------
  |  | 3477|  11.8k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3479|  11.8k|                                               f->frame_hdr->width[0]);
 3480|  11.8k|                f->svc[i][1].scale = scale_fac(c->refs[refidx].p.p.p.h,
  ------------------
  |  | 3477|  11.8k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3481|  11.8k|                                               f->frame_hdr->height);
 3482|  11.8k|                f->svc[i][0].step = (f->svc[i][0].scale + 8) >> 4;
 3483|  11.8k|                f->svc[i][1].step = (f->svc[i][1].scale + 8) >> 4;
 3484|  11.8k|            } else {
 3485|  11.5k|                f->svc[i][0].scale = f->svc[i][1].scale = 0;
 3486|  11.5k|            }
 3487|  23.4k|            f->gmv_warp_allowed[i] = f->frame_hdr->gmv[i].type > DAV1D_WM_TYPE_TRANSLATION &&
  ------------------
  |  Branch (3487:38): [True: 5.07k, False: 18.3k]
  ------------------
 3488|  5.07k|                                     !f->frame_hdr->force_integer_mv &&
  ------------------
  |  Branch (3488:38): [True: 4.36k, False: 711]
  ------------------
 3489|  4.36k|                                     !dav1d_get_shear_params(&f->frame_hdr->gmv[i]) &&
  ------------------
  |  Branch (3489:38): [True: 4.33k, False: 36]
  ------------------
 3490|  4.33k|                                     !f->svc[i][0].scale;
  ------------------
  |  Branch (3490:38): [True: 2.25k, False: 2.07k]
  ------------------
 3491|  23.4k|        }
 3492|  3.37k|    }
 3493|       |
 3494|       |    // setup entropy
 3495|  19.0k|    if (f->frame_hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  19.0k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (3495:9): [True: 16.1k, False: 2.82k]
  ------------------
 3496|  16.1k|        dav1d_cdf_thread_init_static(&f->in_cdf, f->frame_hdr->quant.yac);
 3497|  16.1k|    } else {
 3498|  2.82k|        const int pri_ref = f->frame_hdr->refidx[f->frame_hdr->primary_ref_frame];
 3499|  2.82k|        dav1d_cdf_thread_ref(&f->in_cdf, &c->cdf[pri_ref]);
 3500|  2.82k|    }
 3501|  19.0k|    if (f->frame_hdr->refresh_context) {
  ------------------
  |  Branch (3501:9): [True: 3.20k, False: 15.8k]
  ------------------
 3502|  3.20k|        res = dav1d_cdf_thread_alloc(c, &f->out_cdf, c->n_fc > 1);
 3503|  3.20k|        if (res < 0) goto error;
  ------------------
  |  Branch (3503:13): [True: 0, False: 3.20k]
  ------------------
 3504|  3.20k|    }
 3505|       |
 3506|       |    // FIXME qsort so tiles are in order (for frame threading)
 3507|  19.0k|    if (f->n_tile_data_alloc < c->n_tile_data) {
  ------------------
  |  Branch (3507:9): [True: 12.8k, False: 6.19k]
  ------------------
 3508|  12.8k|        dav1d_free(f->tile);
  ------------------
  |  |  135|  12.8k|#define dav1d_free(ptr) free(ptr)
  ------------------
 3509|  12.8k|        assert(c->n_tile_data < INT_MAX / (int)sizeof(*f->tile));
  ------------------
  |  |  140|  12.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 12.8k]
  |  |  |  Branch (140:68): [Folded, False: 12.8k]
  |  |  ------------------
  ------------------
 3510|  12.8k|        f->tile = dav1d_malloc(ALLOC_TILE, c->n_tile_data * sizeof(*f->tile));
  ------------------
  |  |  132|  12.8k|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 3511|  12.8k|        if (!f->tile) {
  ------------------
  |  Branch (3511:13): [True: 0, False: 12.8k]
  ------------------
 3512|      0|            f->n_tile_data_alloc = f->n_tile_data = 0;
 3513|      0|            res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3514|      0|            goto error;
 3515|      0|        }
 3516|  12.8k|        f->n_tile_data_alloc = c->n_tile_data;
 3517|  12.8k|    }
 3518|  19.0k|    memcpy(f->tile, c->tile, c->n_tile_data * sizeof(*f->tile));
 3519|  19.0k|    memset(c->tile, 0, c->n_tile_data * sizeof(*c->tile));
 3520|  19.0k|    f->n_tile_data = c->n_tile_data;
 3521|  19.0k|    c->n_tile_data = 0;
 3522|       |
 3523|       |    // allocate frame
 3524|  19.0k|    res = dav1d_thread_picture_alloc(c, f, bpc);
 3525|  19.0k|    if (res < 0) goto error;
  ------------------
  |  Branch (3525:9): [True: 0, False: 19.0k]
  ------------------
 3526|       |
 3527|  19.0k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (3527:9): [True: 2.76k, False: 16.2k]
  ------------------
 3528|  2.76k|        res = dav1d_picture_alloc_copy(c, &f->cur, f->frame_hdr->width[0], &f->sr_cur.p);
 3529|  2.76k|        if (res < 0) goto error;
  ------------------
  |  Branch (3529:13): [True: 0, False: 2.76k]
  ------------------
 3530|  16.2k|    } else {
 3531|  16.2k|        dav1d_picture_ref(&f->cur, &f->sr_cur.p);
 3532|  16.2k|    }
 3533|       |
 3534|  19.0k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (3534:9): [True: 2.76k, False: 16.2k]
  ------------------
 3535|  2.76k|        f->resize_step[0] = scale_fac(f->cur.p.w, f->sr_cur.p.p.w);
  ------------------
  |  | 3477|  2.76k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3536|  2.76k|        const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 3537|  2.76k|        const int in_cw = (f->cur.p.w + ss_hor) >> ss_hor;
 3538|  2.76k|        const int out_cw = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 3539|  2.76k|        f->resize_step[1] = scale_fac(in_cw, out_cw);
  ------------------
  |  | 3477|  2.76k|    ((((ref_sz) << 14) + ((this_sz) >> 1)) / (this_sz))
  ------------------
 3540|  2.76k|#undef scale_fac
 3541|  2.76k|        f->resize_start[0] = get_upscale_x0(f->cur.p.w, f->sr_cur.p.p.w, f->resize_step[0]);
 3542|  2.76k|        f->resize_start[1] = get_upscale_x0(in_cw, out_cw, f->resize_step[1]);
 3543|  2.76k|    }
 3544|       |
 3545|       |    // move f->cur into output queue
 3546|  19.0k|    if (c->n_fc == 1) {
  ------------------
  |  Branch (3546:9): [True: 19.0k, False: 0]
  ------------------
 3547|  19.0k|        if (f->frame_hdr->show_frame || c->output_invisible_frames) {
  ------------------
  |  Branch (3547:13): [True: 17.7k, False: 1.28k]
  |  Branch (3547:41): [True: 0, False: 1.28k]
  ------------------
 3548|  17.7k|            dav1d_thread_picture_ref(&c->out, &f->sr_cur);
 3549|  17.7k|            c->event_flags |= dav1d_picture_get_event_flags(&f->sr_cur);
 3550|  17.7k|        }
 3551|  19.0k|    } else {
 3552|      0|        dav1d_thread_picture_ref(out_delayed, &f->sr_cur);
 3553|      0|    }
 3554|       |
 3555|  19.0k|    f->w4 = (f->frame_hdr->width[0] + 3) >> 2;
 3556|  19.0k|    f->h4 = (f->frame_hdr->height + 3) >> 2;
 3557|  19.0k|    f->bw = ((f->frame_hdr->width[0] + 7) >> 3) << 1;
 3558|  19.0k|    f->bh = ((f->frame_hdr->height + 7) >> 3) << 1;
 3559|  19.0k|    f->sb128w = (f->bw + 31) >> 5;
 3560|  19.0k|    f->sb128h = (f->bh + 31) >> 5;
 3561|  19.0k|    f->sb_shift = 4 + f->seq_hdr->sb128;
 3562|  19.0k|    f->sb_step = 16 << f->seq_hdr->sb128;
 3563|  19.0k|    f->sbh = (f->bh + f->sb_step - 1) >> f->sb_shift;
 3564|  19.0k|    f->b4_stride = (f->bw + 31) & ~31;
 3565|  19.0k|    f->bitdepth_max = (1 << f->cur.p.bpc) - 1;
 3566|  19.0k|    atomic_init(&f->task_thread.error, 0);
 3567|  19.0k|    const int uses_2pass = c->n_fc > 1;
 3568|  19.0k|    const int cols = f->frame_hdr->tiling.cols;
 3569|  19.0k|    const int rows = f->frame_hdr->tiling.rows;
 3570|  19.0k|    atomic_store(&f->task_thread.task_counter,
 3571|  19.0k|                 (cols * rows + f->sbh) << uses_2pass);
 3572|       |
 3573|       |    // ref_mvs
 3574|  19.0k|    if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc) {
  ------------------
  |  |   36|  38.0k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.34k, False: 15.6k]
  |  |  ------------------
  ------------------
  |  Branch (3574:45): [True: 3.29k, False: 12.3k]
  ------------------
 3575|  6.63k|        f->mvs_ref = dav1d_ref_create_using_pool(c->refmvs_pool,
 3576|  6.63k|            sizeof(*f->mvs) * f->sb128h * 16 * (f->b4_stride >> 1));
 3577|  6.63k|        if (!f->mvs_ref) {
  ------------------
  |  Branch (3577:13): [True: 0, False: 6.63k]
  ------------------
 3578|      0|            res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3579|      0|            goto error;
 3580|      0|        }
 3581|  6.63k|        f->mvs = f->mvs_ref->data;
 3582|  6.63k|        if (!f->frame_hdr->allow_intrabc) {
  ------------------
  |  Branch (3582:13): [True: 3.34k, False: 3.29k]
  ------------------
 3583|  26.7k|            for (int i = 0; i < 7; i++)
  ------------------
  |  Branch (3583:29): [True: 23.4k, False: 3.34k]
  ------------------
 3584|  23.4k|                f->refpoc[i] = f->refp[i].p.frame_hdr->frame_offset;
 3585|  3.34k|        } else {
 3586|  3.29k|            memset(f->refpoc, 0, sizeof(f->refpoc));
 3587|  3.29k|        }
 3588|  6.63k|        if (f->frame_hdr->use_ref_frame_mvs) {
  ------------------
  |  Branch (3588:13): [True: 1.64k, False: 4.98k]
  ------------------
 3589|  13.1k|            for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3589:29): [True: 11.5k, False: 1.64k]
  ------------------
 3590|  11.5k|                const int refidx = f->frame_hdr->refidx[i];
 3591|  11.5k|                const int ref_w = ((ref_coded_width[i] + 7) >> 3) << 1;
 3592|  11.5k|                const int ref_h = ((f->refp[i].p.p.h + 7) >> 3) << 1;
 3593|  11.5k|                if (c->refs[refidx].refmvs != NULL &&
  ------------------
  |  Branch (3593:21): [True: 1.92k, False: 9.60k]
  ------------------
 3594|  1.92k|                    ref_w == f->bw && ref_h == f->bh)
  ------------------
  |  Branch (3594:21): [True: 1.71k, False: 212]
  |  Branch (3594:39): [True: 1.64k, False: 71]
  ------------------
 3595|  1.64k|                {
 3596|  1.64k|                    f->ref_mvs_ref[i] = c->refs[refidx].refmvs;
 3597|  1.64k|                    dav1d_ref_inc(f->ref_mvs_ref[i]);
 3598|  1.64k|                    f->ref_mvs[i] = c->refs[refidx].refmvs->data;
 3599|  9.89k|                } else {
 3600|  9.89k|                    f->ref_mvs[i] = NULL;
 3601|  9.89k|                    f->ref_mvs_ref[i] = NULL;
 3602|  9.89k|                }
 3603|  11.5k|                memcpy(f->refrefpoc[i], c->refs[refidx].refpoc,
 3604|  11.5k|                       sizeof(*f->refrefpoc));
 3605|  11.5k|            }
 3606|  4.98k|        } else {
 3607|  4.98k|            memset(f->ref_mvs_ref, 0, sizeof(f->ref_mvs_ref));
 3608|  4.98k|        }
 3609|  12.3k|    } else {
 3610|  12.3k|        f->mvs_ref = NULL;
 3611|  12.3k|        memset(f->ref_mvs_ref, 0, sizeof(f->ref_mvs_ref));
 3612|  12.3k|    }
 3613|       |
 3614|       |    // segmap
 3615|  19.0k|    if (f->frame_hdr->segmentation.enabled) {
  ------------------
  |  Branch (3615:9): [True: 8.02k, False: 10.9k]
  ------------------
 3616|       |        // By default, the previous segmentation map is not initialised.
 3617|  8.02k|        f->prev_segmap_ref = NULL;
 3618|  8.02k|        f->prev_segmap = NULL;
 3619|       |
 3620|       |        // We might need a previous frame's segmentation map. This
 3621|       |        // happens if there is either no update or a temporal update.
 3622|  8.02k|        if (f->frame_hdr->segmentation.temporal || !f->frame_hdr->segmentation.update_map) {
  ------------------
  |  Branch (3622:13): [True: 294, False: 7.73k]
  |  Branch (3622:52): [True: 577, False: 7.15k]
  ------------------
 3623|    871|            const int pri_ref = f->frame_hdr->primary_ref_frame;
 3624|    871|            assert(pri_ref != DAV1D_PRIMARY_REF_NONE);
  ------------------
  |  |  140|    871|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 871]
  |  |  |  Branch (140:68): [Folded, False: 871]
  |  |  ------------------
  ------------------
 3625|    871|            const int ref_w = ((ref_coded_width[pri_ref] + 7) >> 3) << 1;
 3626|    871|            const int ref_h = ((f->refp[pri_ref].p.p.h + 7) >> 3) << 1;
 3627|    871|            if (ref_w == f->bw && ref_h == f->bh) {
  ------------------
  |  Branch (3627:17): [True: 524, False: 347]
  |  Branch (3627:35): [True: 438, False: 86]
  ------------------
 3628|    438|                f->prev_segmap_ref = c->refs[f->frame_hdr->refidx[pri_ref]].segmap;
 3629|    438|                if (f->prev_segmap_ref) {
  ------------------
  |  Branch (3629:21): [True: 210, False: 228]
  ------------------
 3630|    210|                    dav1d_ref_inc(f->prev_segmap_ref);
 3631|    210|                    f->prev_segmap = f->prev_segmap_ref->data;
 3632|    210|                }
 3633|    438|            }
 3634|    871|        }
 3635|       |
 3636|  8.02k|        if (f->frame_hdr->segmentation.update_map) {
  ------------------
  |  Branch (3636:13): [True: 7.45k, False: 577]
  ------------------
 3637|       |            // We're updating an existing map, but need somewhere to
 3638|       |            // put the new values. Allocate them here (the data
 3639|       |            // actually gets set elsewhere)
 3640|  7.45k|            f->cur_segmap_ref = dav1d_ref_create_using_pool(c->segmap_pool,
 3641|  7.45k|                sizeof(*f->cur_segmap) * f->b4_stride * 32 * f->sb128h);
 3642|  7.45k|            if (!f->cur_segmap_ref) {
  ------------------
  |  Branch (3642:17): [True: 0, False: 7.45k]
  ------------------
 3643|      0|                dav1d_ref_dec(&f->prev_segmap_ref);
 3644|      0|                res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3645|      0|                goto error;
 3646|      0|            }
 3647|  7.45k|            f->cur_segmap = f->cur_segmap_ref->data;
 3648|  7.45k|        } else if (f->prev_segmap_ref) {
  ------------------
  |  Branch (3648:20): [True: 116, False: 461]
  ------------------
 3649|       |            // We're not updating an existing map, and we have a valid
 3650|       |            // reference. Use that.
 3651|    116|            f->cur_segmap_ref = f->prev_segmap_ref;
 3652|    116|            dav1d_ref_inc(f->cur_segmap_ref);
 3653|    116|            f->cur_segmap = f->prev_segmap_ref->data;
 3654|    461|        } else {
 3655|       |            // We need to make a new map. Allocate one here and zero it out.
 3656|    461|            const size_t segmap_size = sizeof(*f->cur_segmap) * f->b4_stride * 32 * f->sb128h;
 3657|    461|            f->cur_segmap_ref = dav1d_ref_create_using_pool(c->segmap_pool, segmap_size);
 3658|    461|            if (!f->cur_segmap_ref) {
  ------------------
  |  Branch (3658:17): [True: 0, False: 461]
  ------------------
 3659|      0|                res = DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 3660|      0|                goto error;
 3661|      0|            }
 3662|    461|            f->cur_segmap = f->cur_segmap_ref->data;
 3663|    461|            memset(f->cur_segmap, 0, segmap_size);
 3664|    461|        }
 3665|  10.9k|    } else {
 3666|  10.9k|        f->cur_segmap = NULL;
 3667|  10.9k|        f->cur_segmap_ref = NULL;
 3668|  10.9k|        f->prev_segmap_ref = NULL;
 3669|  10.9k|    }
 3670|       |
 3671|       |    // update references etc.
 3672|  19.0k|    const unsigned refresh_frame_flags = f->frame_hdr->refresh_frame_flags;
 3673|   171k|    for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (3673:21): [True: 152k, False: 19.0k]
  ------------------
 3674|   152k|        if (refresh_frame_flags & (1 << i)) {
  ------------------
  |  Branch (3674:13): [True: 134k, False: 17.2k]
  ------------------
 3675|   134k|            if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (3675:17): [True: 29.9k, False: 104k]
  ------------------
 3676|  29.9k|                dav1d_thread_picture_unref(&c->refs[i].p);
 3677|   134k|            dav1d_thread_picture_ref(&c->refs[i].p, &f->sr_cur);
 3678|       |
 3679|   134k|            dav1d_cdf_thread_unref(&c->cdf[i]);
 3680|   134k|            if (f->frame_hdr->refresh_context) {
  ------------------
  |  Branch (3680:17): [True: 17.1k, False: 117k]
  ------------------
 3681|  17.1k|                dav1d_cdf_thread_ref(&c->cdf[i], &f->out_cdf);
 3682|   117k|            } else {
 3683|   117k|                dav1d_cdf_thread_ref(&c->cdf[i], &f->in_cdf);
 3684|   117k|            }
 3685|       |
 3686|   134k|            dav1d_ref_dec(&c->refs[i].segmap);
 3687|   134k|            c->refs[i].segmap = f->cur_segmap_ref;
 3688|   134k|            if (f->cur_segmap_ref)
  ------------------
  |  Branch (3688:17): [True: 57.8k, False: 77.0k]
  ------------------
 3689|  57.8k|                dav1d_ref_inc(f->cur_segmap_ref);
 3690|   134k|            dav1d_ref_dec(&c->refs[i].refmvs);
 3691|   134k|            if (!f->frame_hdr->allow_intrabc) {
  ------------------
  |  Branch (3691:17): [True: 108k, False: 26.1k]
  ------------------
 3692|   108k|                c->refs[i].refmvs = f->mvs_ref;
 3693|   108k|                if (f->mvs_ref)
  ------------------
  |  Branch (3693:21): [True: 10.9k, False: 97.8k]
  ------------------
 3694|  10.9k|                    dav1d_ref_inc(f->mvs_ref);
 3695|   108k|            }
 3696|   134k|            memcpy(c->refs[i].refpoc, f->refpoc, sizeof(f->refpoc));
 3697|   134k|        }
 3698|   152k|    }
 3699|       |
 3700|  19.0k|    if (c->n_fc == 1) {
  ------------------
  |  Branch (3700:9): [True: 19.0k, False: 0]
  ------------------
 3701|  19.0k|        if ((res = dav1d_decode_frame(f)) < 0) {
  ------------------
  |  Branch (3701:13): [True: 4.42k, False: 14.5k]
  ------------------
 3702|  4.42k|            dav1d_thread_picture_unref(&c->out);
 3703|  39.8k|            for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (3703:29): [True: 35.4k, False: 4.42k]
  ------------------
 3704|  35.4k|                if (refresh_frame_flags & (1 << i)) {
  ------------------
  |  Branch (3704:21): [True: 27.7k, False: 7.72k]
  ------------------
 3705|  27.7k|                    if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (3705:25): [True: 27.7k, False: 0]
  ------------------
 3706|  27.7k|                        dav1d_thread_picture_unref(&c->refs[i].p);
 3707|  27.7k|                    dav1d_cdf_thread_unref(&c->cdf[i]);
 3708|  27.7k|                    dav1d_ref_dec(&c->refs[i].segmap);
 3709|  27.7k|                    dav1d_ref_dec(&c->refs[i].refmvs);
 3710|  27.7k|                }
 3711|  35.4k|            }
 3712|  4.42k|            goto error;
 3713|  4.42k|        }
 3714|  19.0k|    } else {
 3715|      0|        dav1d_task_frame_init(f);
 3716|      0|        pthread_mutex_unlock(&c->task_thread.lock);
 3717|      0|    }
 3718|       |
 3719|  14.5k|    return 0;
 3720|  4.45k|error:
 3721|  4.45k|    atomic_init(&f->task_thread.error, 1);
 3722|  4.45k|    dav1d_cdf_thread_unref(&f->in_cdf);
 3723|  4.45k|    if (f->frame_hdr->refresh_context)
  ------------------
  |  Branch (3723:9): [True: 1.12k, False: 3.32k]
  ------------------
 3724|  1.12k|        dav1d_cdf_thread_unref(&f->out_cdf);
 3725|  35.6k|    for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (3725:21): [True: 31.1k, False: 4.45k]
  ------------------
 3726|  31.1k|        if (f->refp[i].p.frame_hdr)
  ------------------
  |  Branch (3726:13): [True: 0, False: 31.1k]
  ------------------
 3727|      0|            dav1d_thread_picture_unref(&f->refp[i]);
 3728|  31.1k|        dav1d_ref_dec(&f->ref_mvs_ref[i]);
 3729|  31.1k|    }
 3730|  4.45k|    if (c->n_fc == 1)
  ------------------
  |  Branch (3730:9): [True: 4.45k, False: 0]
  ------------------
 3731|  4.45k|        dav1d_thread_picture_unref(&c->out);
 3732|      0|    else
 3733|      0|        dav1d_thread_picture_unref(out_delayed);
 3734|  4.45k|    dav1d_picture_unref_internal(&f->cur);
 3735|  4.45k|    dav1d_thread_picture_unref(&f->sr_cur);
 3736|  4.45k|    dav1d_ref_dec(&f->mvs_ref);
 3737|  4.45k|    dav1d_ref_dec(&f->seq_hdr_ref);
 3738|  4.45k|    dav1d_ref_dec(&f->frame_hdr_ref);
 3739|  4.45k|    dav1d_data_props_copy(&c->cached_error_props, &c->in.m);
 3740|       |
 3741|  4.45k|    for (int i = 0; i < f->n_tile_data; i++)
  ------------------
  |  Branch (3741:21): [True: 0, False: 4.45k]
  ------------------
 3742|      0|        dav1d_data_unref_internal(&f->tile[i].data);
 3743|  4.45k|    f->n_tile_data = 0;
 3744|       |
 3745|  4.45k|    if (c->n_fc > 1)
  ------------------
  |  Branch (3745:9): [True: 0, False: 4.45k]
  ------------------
 3746|      0|        pthread_mutex_unlock(&c->task_thread.lock);
 3747|       |
 3748|  4.45k|    return res;
 3749|  19.0k|}
decode.c:reset_context:
 2392|   147k|static void reset_context(BlockContext *const ctx, const int keyframe, const int pass) {
 2393|   147k|    memset(ctx->intra, keyframe, sizeof(ctx->intra));
 2394|   147k|    memset(ctx->uvmode, DC_PRED, sizeof(ctx->uvmode));
 2395|   147k|    if (keyframe)
  ------------------
  |  Branch (2395:9): [True: 138k, False: 8.81k]
  ------------------
 2396|   138k|        memset(ctx->mode, DC_PRED, sizeof(ctx->mode));
 2397|       |
 2398|   147k|    if (pass == 2) return;
  ------------------
  |  Branch (2398:9): [True: 0, False: 147k]
  ------------------
 2399|       |
 2400|   147k|    memset(ctx->partition, 0, sizeof(ctx->partition));
 2401|   147k|    memset(ctx->skip, 0, sizeof(ctx->skip));
 2402|   147k|    memset(ctx->skip_mode, 0, sizeof(ctx->skip_mode));
 2403|   147k|    memset(ctx->tx_lpf_y, 2, sizeof(ctx->tx_lpf_y));
 2404|   147k|    memset(ctx->tx_lpf_uv, 1, sizeof(ctx->tx_lpf_uv));
 2405|   147k|    memset(ctx->tx_intra, -1, sizeof(ctx->tx_intra));
 2406|   147k|    memset(ctx->tx, TX_64X64, sizeof(ctx->tx));
 2407|   147k|    if (!keyframe) {
  ------------------
  |  Branch (2407:9): [True: 8.81k, False: 138k]
  ------------------
 2408|  8.81k|        memset(ctx->ref, -1, sizeof(ctx->ref));
 2409|  8.81k|        memset(ctx->comp_type, 0, sizeof(ctx->comp_type));
 2410|  8.81k|        memset(ctx->mode, NEARESTMV, sizeof(ctx->mode));
 2411|  8.81k|    }
 2412|   147k|    memset(ctx->lcoef, 0x40, sizeof(ctx->lcoef));
 2413|   147k|    memset(ctx->ccoef, 0x40, sizeof(ctx->ccoef));
 2414|   147k|    memset(ctx->filter, DAV1D_N_SWITCHABLE_FILTERS, sizeof(ctx->filter));
 2415|   147k|    memset(ctx->seg_pred, 0, sizeof(ctx->seg_pred));
 2416|   147k|    memset(ctx->pal_sz, 0, sizeof(ctx->pal_sz));
 2417|   147k|}
decode.c:decode_sb:
 2121|  2.15M|{
 2122|  2.15M|    const Dav1dFrameContext *const f = t->f;
 2123|  2.15M|    Dav1dTileState *const ts = t->ts;
 2124|  2.15M|    const int hsz = 16 >> bl;
 2125|  2.15M|    const int have_h_split = f->bw > t->bx + hsz;
 2126|  2.15M|    const int have_v_split = f->bh > t->by + hsz;
 2127|       |
 2128|  2.15M|    if (!have_h_split && !have_v_split) {
  ------------------
  |  Branch (2128:9): [True: 145k, False: 2.01M]
  |  Branch (2128:26): [True: 15.1k, False: 129k]
  ------------------
 2129|  15.1k|        assert(bl < BL_8X8);
  ------------------
  |  |  140|  15.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 15.1k]
  |  |  |  Branch (140:68): [Folded, False: 15.1k]
  |  |  ------------------
  ------------------
 2130|  15.1k|        return decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0));
  ------------------
  |  |   51|  15.1k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
 2131|  15.1k|    }
 2132|       |
 2133|  2.14M|    uint16_t *pc;
 2134|  2.14M|    enum BlockPartition bp;
 2135|  2.14M|    int ctx, bx8, by8;
 2136|  2.14M|    if (t->frame_thread.pass != 2) {
  ------------------
  |  Branch (2136:9): [True: 2.14M, False: 0]
  ------------------
 2137|  2.14M|        if (0 && bl == BL_64X64)
  ------------------
  |  Branch (2137:13): [Folded, False: 2.14M]
  |  Branch (2137:18): [True: 0, False: 0]
  ------------------
 2138|      0|            printf("poc=%d,y=%d,x=%d,bl=%d,r=%d\n",
 2139|      0|                   f->frame_hdr->frame_offset, t->by, t->bx, bl, ts->msac.rng);
 2140|  2.14M|        bx8 = (t->bx & 31) >> 1;
 2141|  2.14M|        by8 = (t->by & 31) >> 1;
 2142|  2.14M|        ctx = get_partition_ctx(t->a, &t->l, bl, by8, bx8);
 2143|  2.14M|        pc = ts->cdf.m.partition[bl][ctx];
 2144|  2.14M|    }
 2145|       |
 2146|  2.14M|    if (have_h_split && have_v_split) {
  ------------------
  |  Branch (2146:9): [True: 2.01M, False: 129k]
  |  Branch (2146:25): [True: 1.77M, False: 236k]
  ------------------
 2147|  1.77M|        if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2147:13): [True: 0, False: 1.77M]
  ------------------
 2148|      0|            const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
 2149|      0|            bp = b->bl == bl ? b->bp : PARTITION_SPLIT;
  ------------------
  |  Branch (2149:18): [True: 0, False: 0]
  ------------------
 2150|  1.77M|        } else {
 2151|  1.77M|            bp = dav1d_msac_decode_symbol_adapt16(&ts->msac, pc,
  ------------------
  |  |   57|  1.77M|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 2152|  1.77M|                                                  dav1d_partition_type_count[bl]);
 2153|  1.77M|            if (f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I422 &&
  ------------------
  |  Branch (2153:17): [True: 2.16k, False: 1.77M]
  ------------------
 2154|  2.16k|                (bp == PARTITION_V || bp == PARTITION_V4 ||
  ------------------
  |  Branch (2154:18): [True: 19, False: 2.14k]
  |  Branch (2154:39): [True: 7, False: 2.14k]
  ------------------
 2155|  2.14k|                 bp == PARTITION_T_LEFT_SPLIT || bp == PARTITION_T_RIGHT_SPLIT))
  ------------------
  |  Branch (2155:18): [True: 4, False: 2.13k]
  |  Branch (2155:50): [True: 5, False: 2.13k]
  ------------------
 2156|     35|            {
 2157|     35|                return 1;
 2158|     35|            }
 2159|  1.77M|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.77M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.77M]
  |  |  ------------------
  |  |   35|  1.77M|        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.77M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2160|      0|                printf("poc=%d,y=%d,x=%d,bl=%d,ctx=%d,bp=%d: r=%d\n",
 2161|      0|                       f->frame_hdr->frame_offset, t->by, t->bx, bl, ctx, bp,
 2162|      0|                       ts->msac.rng);
 2163|  1.77M|        }
 2164|  1.77M|        const uint8_t *const b = dav1d_block_sizes[bl][bp];
 2165|       |
 2166|  1.77M|        switch (bp) {
 2167|   947k|        case PARTITION_NONE:
  ------------------
  |  Branch (2167:9): [True: 947k, False: 828k]
  ------------------
 2168|   947k|            if (decode_b(t, bl, b[0], PARTITION_NONE, node->o))
  ------------------
  |  Branch (2168:17): [True: 7, False: 947k]
  ------------------
 2169|      7|                return -1;
 2170|   947k|            break;
 2171|   947k|        case PARTITION_H:
  ------------------
  |  Branch (2171:9): [True: 127k, False: 1.64M]
  ------------------
 2172|   127k|            if (decode_b(t, bl, b[0], PARTITION_H, node->h[0]))
  ------------------
  |  Branch (2172:17): [True: 2, False: 127k]
  ------------------
 2173|      2|                return -1;
 2174|   127k|            t->by += hsz;
 2175|   127k|            if (decode_b(t, bl, b[0], PARTITION_H, node->h[1]))
  ------------------
  |  Branch (2175:17): [True: 4, False: 127k]
  ------------------
 2176|      4|                return -1;
 2177|   127k|            t->by -= hsz;
 2178|   127k|            break;
 2179|  89.3k|        case PARTITION_V:
  ------------------
  |  Branch (2179:9): [True: 89.3k, False: 1.68M]
  ------------------
 2180|  89.3k|            if (decode_b(t, bl, b[0], PARTITION_V, node->v[0]))
  ------------------
  |  Branch (2180:17): [True: 1, False: 89.3k]
  ------------------
 2181|      1|                return -1;
 2182|  89.3k|            t->bx += hsz;
 2183|  89.3k|            if (decode_b(t, bl, b[0], PARTITION_V, node->v[1]))
  ------------------
  |  Branch (2183:17): [True: 3, False: 89.3k]
  ------------------
 2184|      3|                return -1;
 2185|  89.3k|            t->bx -= hsz;
 2186|  89.3k|            break;
 2187|   463k|        case PARTITION_SPLIT:
  ------------------
  |  Branch (2187:9): [True: 463k, False: 1.31M]
  ------------------
 2188|   463k|            if (bl == BL_8X8) {
  ------------------
  |  Branch (2188:17): [True: 86.9k, False: 376k]
  ------------------
 2189|  86.9k|                const EdgeTip *const tip = (const EdgeTip *) node;
 2190|  86.9k|                assert(hsz == 1);
  ------------------
  |  |  140|  86.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 86.9k]
  |  |  |  Branch (140:68): [Folded, False: 86.9k]
  |  |  ------------------
  ------------------
 2191|  86.9k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, EDGE_ALL_TR_AND_BL))
  ------------------
  |  Branch (2191:21): [True: 1, False: 86.9k]
  ------------------
 2192|      1|                    return -1;
 2193|  86.9k|                const enum Filter2d tl_filter = t->tl_4x4_filter;
 2194|  86.9k|                t->bx++;
 2195|  86.9k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, tip->split[0]))
  ------------------
  |  Branch (2195:21): [True: 3, False: 86.9k]
  ------------------
 2196|      3|                    return -1;
 2197|  86.9k|                t->bx--;
 2198|  86.9k|                t->by++;
 2199|  86.9k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, tip->split[1]))
  ------------------
  |  Branch (2199:21): [True: 1, False: 86.9k]
  ------------------
 2200|      1|                    return -1;
 2201|  86.9k|                t->bx++;
 2202|  86.9k|                t->tl_4x4_filter = tl_filter;
 2203|  86.9k|                if (decode_b(t, bl, BS_4x4, PARTITION_SPLIT, tip->split[2]))
  ------------------
  |  Branch (2203:21): [True: 2, False: 86.9k]
  ------------------
 2204|      2|                    return -1;
 2205|  86.9k|                t->bx--;
 2206|  86.9k|                t->by--;
 2207|  86.9k|#if ARCH_X86_64
 2208|  86.9k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (2208:21): [True: 0, False: 86.9k]
  ------------------
 2209|       |                    /* In 8-bit mode with 2-pass decoding the coefficient buffer
 2210|       |                     * can end up misaligned due to skips here. Work around
 2211|       |                     * the issue by explicitly realigning the buffer. */
 2212|      0|                    const int p = t->frame_thread.pass & 1;
 2213|      0|                    ts->frame_thread[p].cf =
 2214|      0|                        (void*)(((uintptr_t)ts->frame_thread[p].cf + 63) & ~63);
 2215|      0|                }
 2216|  86.9k|#endif
 2217|   376k|            } else {
 2218|   376k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0)))
  ------------------
  |  |   51|   376k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2218:21): [True: 26, False: 376k]
  ------------------
 2219|     26|                    return 1;
 2220|   376k|                t->bx += hsz;
 2221|   376k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 1)))
  ------------------
  |  |   51|   376k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2221:21): [True: 33, False: 376k]
  ------------------
 2222|     33|                    return 1;
 2223|   376k|                t->bx -= hsz;
 2224|   376k|                t->by += hsz;
 2225|   376k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 2)))
  ------------------
  |  |   51|   376k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2225:21): [True: 15, False: 376k]
  ------------------
 2226|     15|                    return 1;
 2227|   376k|                t->bx += hsz;
 2228|   376k|                if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 3)))
  ------------------
  |  |   51|   376k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2228:21): [True: 20, False: 376k]
  ------------------
 2229|     20|                    return 1;
 2230|   376k|                t->bx -= hsz;
 2231|   376k|                t->by -= hsz;
 2232|   376k|            }
 2233|   463k|            break;
 2234|   463k|        case PARTITION_T_TOP_SPLIT: {
  ------------------
  |  Branch (2234:9): [True: 18.6k, False: 1.75M]
  ------------------
 2235|  18.6k|            if (decode_b(t, bl, b[0], PARTITION_T_TOP_SPLIT, EDGE_ALL_TR_AND_BL))
  ------------------
  |  Branch (2235:17): [True: 1, False: 18.6k]
  ------------------
 2236|      1|                return -1;
 2237|  18.6k|            t->bx += hsz;
 2238|  18.6k|            if (decode_b(t, bl, b[0], PARTITION_T_TOP_SPLIT, node->v[1]))
  ------------------
  |  Branch (2238:17): [True: 1, False: 18.6k]
  ------------------
 2239|      1|                return -1;
 2240|  18.6k|            t->bx -= hsz;
 2241|  18.6k|            t->by += hsz;
 2242|  18.6k|            if (decode_b(t, bl, b[1], PARTITION_T_TOP_SPLIT, node->h[1]))
  ------------------
  |  Branch (2242:17): [True: 1, False: 18.6k]
  ------------------
 2243|      1|                return -1;
 2244|  18.6k|            t->by -= hsz;
 2245|  18.6k|            break;
 2246|  18.6k|        }
 2247|  19.8k|        case PARTITION_T_BOTTOM_SPLIT: {
  ------------------
  |  Branch (2247:9): [True: 19.8k, False: 1.75M]
  ------------------
 2248|  19.8k|            if (decode_b(t, bl, b[0], PARTITION_T_BOTTOM_SPLIT, node->h[0]))
  ------------------
  |  Branch (2248:17): [True: 2, False: 19.8k]
  ------------------
 2249|      2|                return -1;
 2250|  19.8k|            t->by += hsz;
 2251|  19.8k|            if (decode_b(t, bl, b[1], PARTITION_T_BOTTOM_SPLIT, node->v[0]))
  ------------------
  |  Branch (2251:17): [True: 1, False: 19.8k]
  ------------------
 2252|      1|                return -1;
 2253|  19.8k|            t->bx += hsz;
 2254|  19.8k|            if (decode_b(t, bl, b[1], PARTITION_T_BOTTOM_SPLIT, 0))
  ------------------
  |  Branch (2254:17): [True: 1, False: 19.8k]
  ------------------
 2255|      1|                return -1;
 2256|  19.8k|            t->bx -= hsz;
 2257|  19.8k|            t->by -= hsz;
 2258|  19.8k|            break;
 2259|  19.8k|        }
 2260|  15.0k|        case PARTITION_T_LEFT_SPLIT: {
  ------------------
  |  Branch (2260:9): [True: 15.0k, False: 1.76M]
  ------------------
 2261|  15.0k|            if (decode_b(t, bl, b[0], PARTITION_T_LEFT_SPLIT, EDGE_ALL_TR_AND_BL))
  ------------------
  |  Branch (2261:17): [True: 1, False: 15.0k]
  ------------------
 2262|      1|                return -1;
 2263|  15.0k|            t->by += hsz;
 2264|  15.0k|            if (decode_b(t, bl, b[0], PARTITION_T_LEFT_SPLIT, node->h[1]))
  ------------------
  |  Branch (2264:17): [True: 1, False: 15.0k]
  ------------------
 2265|      1|                return -1;
 2266|  15.0k|            t->by -= hsz;
 2267|  15.0k|            t->bx += hsz;
 2268|  15.0k|            if (decode_b(t, bl, b[1], PARTITION_T_LEFT_SPLIT, node->v[1]))
  ------------------
  |  Branch (2268:17): [True: 1, False: 15.0k]
  ------------------
 2269|      1|                return -1;
 2270|  15.0k|            t->bx -= hsz;
 2271|  15.0k|            break;
 2272|  15.0k|        }
 2273|  18.2k|        case PARTITION_T_RIGHT_SPLIT: {
  ------------------
  |  Branch (2273:9): [True: 18.2k, False: 1.75M]
  ------------------
 2274|  18.2k|            if (decode_b(t, bl, b[0], PARTITION_T_RIGHT_SPLIT, node->v[0]))
  ------------------
  |  Branch (2274:17): [True: 1, False: 18.2k]
  ------------------
 2275|      1|                return -1;
 2276|  18.2k|            t->bx += hsz;
 2277|  18.2k|            if (decode_b(t, bl, b[1], PARTITION_T_RIGHT_SPLIT, node->h[0]))
  ------------------
  |  Branch (2277:17): [True: 1, False: 18.2k]
  ------------------
 2278|      1|                return -1;
 2279|  18.2k|            t->by += hsz;
 2280|  18.2k|            if (decode_b(t, bl, b[1], PARTITION_T_RIGHT_SPLIT, 0))
  ------------------
  |  Branch (2280:17): [True: 2, False: 18.2k]
  ------------------
 2281|      2|                return -1;
 2282|  18.2k|            t->by -= hsz;
 2283|  18.2k|            t->bx -= hsz;
 2284|  18.2k|            break;
 2285|  18.2k|        }
 2286|  40.2k|        case PARTITION_H4: {
  ------------------
  |  Branch (2286:9): [True: 40.2k, False: 1.73M]
  ------------------
 2287|  40.2k|            const EdgeBranch *const branch = (const EdgeBranch *) node;
 2288|  40.2k|            if (decode_b(t, bl, b[0], PARTITION_H4, node->h[0]))
  ------------------
  |  Branch (2288:17): [True: 1, False: 40.2k]
  ------------------
 2289|      1|                return -1;
 2290|  40.2k|            t->by += hsz >> 1;
 2291|  40.2k|            if (decode_b(t, bl, b[0], PARTITION_H4, branch->h4))
  ------------------
  |  Branch (2291:17): [True: 1, False: 40.2k]
  ------------------
 2292|      1|                return -1;
 2293|  40.2k|            t->by += hsz >> 1;
 2294|  40.2k|            if (decode_b(t, bl, b[0], PARTITION_H4, EDGE_ALL_LEFT_HAS_BOTTOM))
  ------------------
  |  Branch (2294:17): [True: 1, False: 40.2k]
  ------------------
 2295|      1|                return -1;
 2296|  40.2k|            t->by += hsz >> 1;
 2297|  40.2k|            if (t->by < f->bh)
  ------------------
  |  Branch (2297:17): [True: 39.2k, False: 916]
  ------------------
 2298|  39.2k|                if (decode_b(t, bl, b[0], PARTITION_H4, node->h[1]))
  ------------------
  |  Branch (2298:21): [True: 1, False: 39.2k]
  ------------------
 2299|      1|                    return -1;
 2300|  40.1k|            t->by -= hsz * 3 >> 1;
 2301|  40.1k|            break;
 2302|  40.2k|        }
 2303|  35.4k|        case PARTITION_V4: {
  ------------------
  |  Branch (2303:9): [True: 35.4k, False: 1.74M]
  ------------------
 2304|  35.4k|            const EdgeBranch *const branch = (const EdgeBranch *) node;
 2305|  35.4k|            if (decode_b(t, bl, b[0], PARTITION_V4, node->v[0]))
  ------------------
  |  Branch (2305:17): [True: 1, False: 35.4k]
  ------------------
 2306|      1|                return -1;
 2307|  35.4k|            t->bx += hsz >> 1;
 2308|  35.4k|            if (decode_b(t, bl, b[0], PARTITION_V4, branch->v4))
  ------------------
  |  Branch (2308:17): [True: 3, False: 35.3k]
  ------------------
 2309|      3|                return -1;
 2310|  35.3k|            t->bx += hsz >> 1;
 2311|  35.3k|            if (decode_b(t, bl, b[0], PARTITION_V4, EDGE_ALL_TOP_HAS_RIGHT))
  ------------------
  |  Branch (2311:17): [True: 1, False: 35.3k]
  ------------------
 2312|      1|                return -1;
 2313|  35.3k|            t->bx += hsz >> 1;
 2314|  35.3k|            if (t->bx < f->bw)
  ------------------
  |  Branch (2314:17): [True: 33.2k, False: 2.12k]
  ------------------
 2315|  33.2k|                if (decode_b(t, bl, b[0], PARTITION_V4, node->v[1]))
  ------------------
  |  Branch (2315:21): [True: 2, False: 33.2k]
  ------------------
 2316|      2|                    return -1;
 2317|  35.3k|            t->bx -= hsz * 3 >> 1;
 2318|  35.3k|            break;
 2319|  35.3k|        }
 2320|      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 (2320:9): [True: 0, False: 1.77M]
  ------------------
 2321|  1.77M|        }
 2322|  1.77M|    } else if (have_h_split) {
  ------------------
  |  Branch (2322:16): [True: 236k, False: 129k]
  ------------------
 2323|   236k|        unsigned is_split;
 2324|   236k|        if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2324:13): [True: 0, False: 236k]
  ------------------
 2325|      0|            const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
 2326|      0|            is_split = b->bl != bl;
 2327|   236k|        } else {
 2328|   236k|            is_split = dav1d_msac_decode_bool(&ts->msac,
  ------------------
  |  |   54|   236k|#define dav1d_msac_decode_bool           dav1d_msac_decode_bool_sse2
  ------------------
 2329|   236k|                           gather_top_partition_prob(pc, bl));
 2330|   236k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   236k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 236k]
  |  |  ------------------
  |  |   35|   236k|        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|   236k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2331|      0|                printf("poc=%d,y=%d,x=%d,bl=%d,ctx=%d,bp=%d: r=%d\n",
 2332|      0|                       f->frame_hdr->frame_offset, t->by, t->bx, bl, ctx,
 2333|      0|                       is_split ? PARTITION_SPLIT : PARTITION_H, ts->msac.rng);
  ------------------
  |  Branch (2333:24): [True: 0, False: 0]
  ------------------
 2334|   236k|        }
 2335|       |
 2336|   236k|        assert(bl < BL_8X8);
  ------------------
  |  |  140|   236k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 236k]
  |  |  |  Branch (140:68): [Folded, False: 236k]
  |  |  ------------------
  ------------------
 2337|   236k|        if (is_split) {
  ------------------
  |  Branch (2337:13): [True: 144k, False: 92.5k]
  ------------------
 2338|   144k|            bp = PARTITION_SPLIT;
 2339|   144k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0))) return 1;
  ------------------
  |  |   51|   144k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2339:17): [True: 37, False: 144k]
  ------------------
 2340|   144k|            t->bx += hsz;
 2341|   144k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 1))) return 1;
  ------------------
  |  |   51|   144k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2341:17): [True: 42, False: 144k]
  ------------------
 2342|   144k|            t->bx -= hsz;
 2343|   144k|        } else {
 2344|  92.5k|            bp = PARTITION_H;
 2345|  92.5k|            if (decode_b(t, bl, dav1d_block_sizes[bl][PARTITION_H][0],
  ------------------
  |  Branch (2345:17): [True: 2, False: 92.5k]
  ------------------
 2346|  92.5k|                         PARTITION_H, node->h[0]))
 2347|      2|                return -1;
 2348|  92.5k|        }
 2349|   236k|    } else {
 2350|   129k|        assert(have_v_split);
  ------------------
  |  |  140|   129k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 129k]
  |  |  |  Branch (140:68): [Folded, False: 129k]
  |  |  ------------------
  ------------------
 2351|   129k|        unsigned is_split;
 2352|   129k|        if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (2352:13): [True: 0, False: 129k]
  ------------------
 2353|      0|            const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
 2354|      0|            is_split = b->bl != bl;
 2355|   129k|        } else {
 2356|   129k|            is_split = dav1d_msac_decode_bool(&ts->msac,
  ------------------
  |  |   54|   129k|#define dav1d_msac_decode_bool           dav1d_msac_decode_bool_sse2
  ------------------
 2357|   129k|                           gather_left_partition_prob(pc, bl));
 2358|   129k|            if (f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I422 && !is_split)
  ------------------
  |  Branch (2358:17): [True: 127, False: 129k]
  |  Branch (2358:63): [True: 18, False: 109]
  ------------------
 2359|     18|                return 1;
 2360|   129k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   129k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 129k]
  |  |  ------------------
  |  |   35|   129k|        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|   129k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2361|      0|                printf("poc=%d,y=%d,x=%d,bl=%d,ctx=%d,bp=%d: r=%d\n",
 2362|      0|                       f->frame_hdr->frame_offset, t->by, t->bx, bl, ctx,
 2363|      0|                       is_split ? PARTITION_SPLIT : PARTITION_V, ts->msac.rng);
  ------------------
  |  Branch (2363:24): [True: 0, False: 0]
  ------------------
 2364|   129k|        }
 2365|       |
 2366|   129k|        assert(bl < BL_8X8);
  ------------------
  |  |  140|   129k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 129k]
  |  |  |  Branch (140:68): [Folded, False: 129k]
  |  |  ------------------
  ------------------
 2367|   129k|        if (is_split) {
  ------------------
  |  Branch (2367:13): [True: 68.3k, False: 61.5k]
  ------------------
 2368|  68.3k|            bp = PARTITION_SPLIT;
 2369|  68.3k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 0))) return 1;
  ------------------
  |  |   51|  68.3k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2369:17): [True: 31, False: 68.3k]
  ------------------
 2370|  68.3k|            t->by += hsz;
 2371|  68.3k|            if (decode_sb(t, bl + 1, INTRA_EDGE_SPLIT(node, 2))) return 1;
  ------------------
  |  |   51|  68.3k|    ((const EdgeNode*)((uintptr_t)(n) + ((const EdgeBranch*)(n))->split_offset[i]))
  ------------------
  |  Branch (2371:17): [True: 17, False: 68.3k]
  ------------------
 2372|  68.3k|            t->by -= hsz;
 2373|  68.3k|        } else {
 2374|  61.5k|            bp = PARTITION_V;
 2375|  61.5k|            if (decode_b(t, bl, dav1d_block_sizes[bl][PARTITION_V][0],
  ------------------
  |  Branch (2375:17): [True: 2, False: 61.5k]
  ------------------
 2376|  61.5k|                         PARTITION_V, node->v[0]))
 2377|      2|                return -1;
 2378|  61.5k|        }
 2379|   129k|    }
 2380|       |
 2381|  2.14M|    if (t->frame_thread.pass != 2 && (bp != PARTITION_SPLIT || bl == BL_8X8)) {
  ------------------
  |  Branch (2381:9): [True: 2.14M, False: 0]
  |  Branch (2381:39): [True: 1.46M, False: 676k]
  |  Branch (2381:64): [True: 86.9k, False: 589k]
  ------------------
 2382|  1.55M|#define set_ctx(rep_macro) \
 2383|  1.55M|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
 2384|  1.55M|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
 2385|  1.55M|        case_set_upto16(ulog2(hsz));
  ------------------
  |  |   80|  1.55M|    switch (var) { \
  |  |   81|   762k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 2383|   762k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|   762k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   762k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2384|   762k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|   762k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   762k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (81:5): [True: 762k, False: 790k]
  |  |  ------------------
  |  |   82|   463k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 2383|   463k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   463k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   463k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2384|   463k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   463k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   463k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 463k, False: 1.08M]
  |  |  ------------------
  |  |   83|   202k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 2383|   202k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|   202k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   202k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2384|   202k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|   202k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   202k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (83:5): [True: 202k, False: 1.35M]
  |  |  ------------------
  |  |   84|  86.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 2383|  86.5k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  86.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  86.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2384|  86.5k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  86.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  86.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (84:5): [True: 86.5k, False: 1.46M]
  |  |  ------------------
  |  |   85|  37.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 2383|  37.8k|        rep_macro(t->a->partition, bx8, dav1d_al_part_ctx[0][bl][bp]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  37.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  37.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  37.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  37.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 37.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 2384|  37.8k|        rep_macro(t->l.partition, by8, dav1d_al_part_ctx[1][bl][bp])
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  37.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  37.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  37.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  37.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 37.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (85:5): [True: 37.8k, False: 1.51M]
  |  |  ------------------
  |  |   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.55M]
  |  |  ------------------
  |  |   87|  1.55M|    }
  ------------------
 2386|  1.55M|#undef set_ctx
 2387|  1.55M|    }
 2388|       |
 2389|  2.14M|    return 0;
 2390|  2.14M|}
decode.c:decode_b:
  687|  2.39M|                    const enum EdgeFlags intra_edge_flags) {
  688|  2.39M|    Dav1dTileState *const ts = t->ts;
  689|  2.39M|    const Dav1dFrameContext *const f = t->f;
  690|  2.39M|    Av1Block b_mem, *const b = t->frame_thread.pass ?
  ------------------
  |  Branch (690:32): [True: 0, False: 2.39M]
  ------------------
  691|  2.39M|        &f->frame_thread.b[t->by * f->b4_stride + t->bx] : &b_mem;
  692|  2.39M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  693|  2.39M|    const int bx4 = t->bx & 31, by4 = t->by & 31;
  694|  2.39M|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  695|  2.39M|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  696|  2.39M|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
  697|  2.39M|    const int bw4 = b_dim[0], bh4 = b_dim[1];
  698|  2.39M|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
  699|  2.39M|    const int cbw4 = (bw4 + ss_hor) >> ss_hor, cbh4 = (bh4 + ss_ver) >> ss_ver;
  700|  2.39M|    const int have_left = t->bx > ts->tiling.col_start;
  701|  2.39M|    const int have_top = t->by > ts->tiling.row_start;
  702|  2.39M|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (702:28): [True: 2.02M, False: 370k]
  ------------------
  703|  2.02M|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (703:29): [True: 1.95M, False: 77.0k]
  |  Branch (703:45): [True: 38.5k, False: 38.5k]
  ------------------
  704|  1.98M|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (704:29): [True: 1.93M, False: 51.8k]
  |  Branch (704:45): [True: 25.9k, False: 25.9k]
  ------------------
  705|       |
  706|  2.39M|    if (t->frame_thread.pass == 2) {
  ------------------
  |  Branch (706:9): [True: 0, False: 2.39M]
  ------------------
  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|                const int ref1 = b->ref[0] + 1;
  787|      0|                const union mv mv1 = b->mv[0];
  788|      0|                for (int x = 0; x < bw4; x++) {
  ------------------
  |  Branch (788:33): [True: 0, False: 0]
  ------------------
  789|      0|                    r[x].ref.ref[0] = ref1;
  790|      0|                    r[x].mv.mv[0] = mv1;
  791|      0|                    r[x].bs = bs;
  792|      0|                }
  793|      0|                refmvs_block *const *rr = &t->rt.r[(t->by & 31) + 5];
  794|      0|                for (int y = 0; y < bh4 - 1; y++) {
  ------------------
  |  Branch (794:33): [True: 0, False: 0]
  ------------------
  795|      0|                    rr[y][t->bx + bw4 - 1].ref.ref[0] = ref1;
  796|      0|                    rr[y][t->bx + bw4 - 1].mv.mv[0] = mv1;
  797|      0|                    rr[y][t->bx + bw4 - 1].bs = bs;
  798|      0|                }
  799|      0|            }
  800|       |
  801|      0|            if (has_chroma) {
  ------------------
  |  Branch (801:17): [True: 0, False: 0]
  ------------------
  802|      0|                dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], DC_PRED);
  803|      0|                dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], DC_PRED);
  804|      0|            }
  805|      0|        }
  806|      0|        return 0;
  807|      0|    }
  808|       |
  809|  2.39M|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
  810|       |
  811|  2.39M|    b->bl = bl;
  812|  2.39M|    b->bp = bp;
  813|  2.39M|    b->bs = bs;
  814|       |
  815|  2.39M|    const Dav1dSegmentationData *seg = NULL;
  816|       |
  817|       |    // segment_id (if seg_feature for skip/ref/gmv is enabled)
  818|  2.39M|    int seg_pred = 0;
  819|  2.39M|    if (f->frame_hdr->segmentation.enabled) {
  ------------------
  |  Branch (819:9): [True: 638k, False: 1.76M]
  ------------------
  820|   638k|        if (!f->frame_hdr->segmentation.update_map) {
  ------------------
  |  Branch (820:13): [True: 22.9k, False: 615k]
  ------------------
  821|  22.9k|            if (f->prev_segmap) {
  ------------------
  |  Branch (821:17): [True: 2.81k, False: 20.1k]
  ------------------
  822|  2.81k|                unsigned seg_id = get_prev_frame_segid(f, t->by, t->bx, w4, h4,
  823|  2.81k|                                                       f->prev_segmap,
  824|  2.81k|                                                       f->b4_stride);
  825|  2.81k|                if (seg_id >= 8) return -1;
  ------------------
  |  Branch (825:21): [True: 0, False: 2.81k]
  ------------------
  826|  2.81k|                b->seg_id = seg_id;
  827|  20.1k|            } else {
  828|  20.1k|                b->seg_id = 0;
  829|  20.1k|            }
  830|  22.9k|            seg = &f->frame_hdr->segmentation.seg_data.d[b->seg_id];
  831|   615k|        } else if (f->frame_hdr->segmentation.seg_data.preskip) {
  ------------------
  |  Branch (831:20): [True: 566k, False: 49.4k]
  ------------------
  832|   566k|            if (f->frame_hdr->segmentation.temporal &&
  ------------------
  |  Branch (832:17): [True: 2.73k, False: 563k]
  ------------------
  833|  2.73k|                (seg_pred = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  2.73k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (833:17): [True: 1.46k, False: 1.27k]
  ------------------
  834|  2.73k|                                ts->cdf.m.seg_pred[t->a->seg_pred[bx4] +
  835|  2.73k|                                t->l.seg_pred[by4]])))
  836|  1.46k|            {
  837|       |                // temporal predicted seg_id
  838|  1.46k|                if (f->prev_segmap) {
  ------------------
  |  Branch (838:21): [True: 528, False: 934]
  ------------------
  839|    528|                    unsigned seg_id = get_prev_frame_segid(f, t->by, t->bx,
  840|    528|                                                           w4, h4,
  841|    528|                                                           f->prev_segmap,
  842|    528|                                                           f->b4_stride);
  843|    528|                    if (seg_id >= 8) return -1;
  ------------------
  |  Branch (843:25): [True: 0, False: 528]
  ------------------
  844|    528|                    b->seg_id = seg_id;
  845|    934|                } else {
  846|    934|                    b->seg_id = 0;
  847|    934|                }
  848|   564k|            } else {
  849|   564k|                int seg_ctx;
  850|   564k|                const unsigned pred_seg_id =
  851|   564k|                    get_cur_frame_segid(t->by, t->bx, have_top, have_left,
  852|   564k|                                        &seg_ctx, f->cur_segmap, f->b4_stride);
  853|   564k|                const unsigned diff = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   564k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  854|   564k|                                          ts->cdf.m.seg_id[seg_ctx],
  855|   564k|                                          DAV1D_MAX_SEGMENTS - 1);
  ------------------
  |  |   43|   564k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  856|   564k|                const unsigned last_active_seg_id =
  857|   564k|                    f->frame_hdr->segmentation.seg_data.last_active_segid;
  858|   564k|                b->seg_id = neg_deinterleave(diff, pred_seg_id,
  859|   564k|                                             last_active_seg_id + 1);
  860|   564k|                if (b->seg_id > last_active_seg_id) b->seg_id = 0; // error?
  ------------------
  |  Branch (860:21): [True: 15.4k, False: 549k]
  ------------------
  861|   564k|                if (b->seg_id >= DAV1D_MAX_SEGMENTS) b->seg_id = 0; // error?
  ------------------
  |  |   43|   564k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (861:21): [True: 0, False: 564k]
  ------------------
  862|   564k|            }
  863|       |
  864|   566k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   566k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 566k]
  |  |  ------------------
  |  |   35|   566k|        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|   566k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  865|      0|                printf("Post-segid[preskip;%d]: r=%d\n",
  866|      0|                       b->seg_id, ts->msac.rng);
  867|       |
  868|   566k|            seg = &f->frame_hdr->segmentation.seg_data.d[b->seg_id];
  869|   566k|        }
  870|  1.76M|    } else {
  871|  1.76M|        b->seg_id = 0;
  872|  1.76M|    }
  873|       |
  874|       |    // skip_mode
  875|  2.39M|    if ((!seg || (!seg->globalmv && seg->ref == -1 && !seg->skip)) &&
  ------------------
  |  Branch (875:10): [True: 1.80M, False: 589k]
  |  Branch (875:19): [True: 275k, False: 313k]
  |  Branch (875:37): [True: 151k, False: 123k]
  |  Branch (875:55): [True: 88.0k, False: 63.6k]
  ------------------
  876|  1.89M|        f->frame_hdr->skip_mode_enabled && imin(bw4, bh4) > 1)
  ------------------
  |  Branch (876:9): [True: 3.62k, False: 1.89M]
  |  Branch (876:44): [True: 2.30k, False: 1.31k]
  ------------------
  877|  2.30k|    {
  878|  2.30k|        const int smctx = t->a->skip_mode[bx4] + t->l.skip_mode[by4];
  879|  2.30k|        b->skip_mode = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  2.30k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  880|  2.30k|                           ts->cdf.m.skip_mode[smctx]);
  881|  2.30k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  2.30k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.30k]
  |  |  ------------------
  |  |   35|  2.30k|        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.30k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  882|      0|            printf("Post-skipmode[%d]: r=%d\n", b->skip_mode, ts->msac.rng);
  883|  2.39M|    } else {
  884|  2.39M|        b->skip_mode = 0;
  885|  2.39M|    }
  886|       |
  887|       |    // skip
  888|  2.39M|    if (b->skip_mode || (seg && seg->skip)) {
  ------------------
  |  Branch (888:9): [True: 317, False: 2.39M]
  |  Branch (888:26): [True: 589k, False: 1.80M]
  |  Branch (888:33): [True: 335k, False: 253k]
  ------------------
  889|   336k|        b->skip = 1;
  890|  2.06M|    } else {
  891|  2.06M|        const int sctx = t->a->skip[bx4] + t->l.skip[by4];
  892|  2.06M|        b->skip = dav1d_msac_decode_bool_adapt(&ts->msac, ts->cdf.m.skip[sctx]);
  ------------------
  |  |   52|  2.06M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  893|  2.06M|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  2.06M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.06M]
  |  |  ------------------
  |  |   35|  2.06M|        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.06M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  894|      0|            printf("Post-skip[%d]: r=%d\n", b->skip, ts->msac.rng);
  895|  2.06M|    }
  896|       |
  897|       |    // segment_id
  898|  2.39M|    if (f->frame_hdr->segmentation.enabled &&
  ------------------
  |  Branch (898:9): [True: 638k, False: 1.76M]
  ------------------
  899|   638k|        f->frame_hdr->segmentation.update_map &&
  ------------------
  |  Branch (899:9): [True: 615k, False: 22.9k]
  ------------------
  900|   615k|        !f->frame_hdr->segmentation.seg_data.preskip)
  ------------------
  |  Branch (900:9): [True: 49.4k, False: 566k]
  ------------------
  901|  49.4k|    {
  902|  49.4k|        if (!b->skip && f->frame_hdr->segmentation.temporal &&
  ------------------
  |  Branch (902:13): [True: 21.6k, False: 27.7k]
  |  Branch (902:25): [True: 3.36k, False: 18.3k]
  ------------------
  903|  3.36k|            (seg_pred = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  3.36k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (903:13): [True: 1.61k, False: 1.74k]
  ------------------
  904|  3.36k|                            ts->cdf.m.seg_pred[t->a->seg_pred[bx4] +
  905|  3.36k|                            t->l.seg_pred[by4]])))
  906|  1.61k|        {
  907|       |            // temporal predicted seg_id
  908|  1.61k|            if (f->prev_segmap) {
  ------------------
  |  Branch (908:17): [True: 412, False: 1.20k]
  ------------------
  909|    412|                unsigned seg_id = get_prev_frame_segid(f, t->by, t->bx, w4, h4,
  910|    412|                                                       f->prev_segmap,
  911|    412|                                                       f->b4_stride);
  912|    412|                if (seg_id >= 8) return -1;
  ------------------
  |  Branch (912:21): [True: 0, False: 412]
  ------------------
  913|    412|                b->seg_id = seg_id;
  914|  1.20k|            } else {
  915|  1.20k|                b->seg_id = 0;
  916|  1.20k|            }
  917|  47.7k|        } else {
  918|  47.7k|            int seg_ctx;
  919|  47.7k|            const unsigned pred_seg_id =
  920|  47.7k|                get_cur_frame_segid(t->by, t->bx, have_top, have_left,
  921|  47.7k|                                    &seg_ctx, f->cur_segmap, f->b4_stride);
  922|  47.7k|            if (b->skip) {
  ------------------
  |  Branch (922:17): [True: 27.7k, False: 20.0k]
  ------------------
  923|  27.7k|                b->seg_id = pred_seg_id;
  924|  27.7k|            } else {
  925|  20.0k|                const unsigned diff = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  20.0k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  926|  20.0k|                                          ts->cdf.m.seg_id[seg_ctx],
  927|  20.0k|                                          DAV1D_MAX_SEGMENTS - 1);
  ------------------
  |  |   43|  20.0k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  928|  20.0k|                const unsigned last_active_seg_id =
  929|  20.0k|                    f->frame_hdr->segmentation.seg_data.last_active_segid;
  930|  20.0k|                b->seg_id = neg_deinterleave(diff, pred_seg_id,
  931|  20.0k|                                             last_active_seg_id + 1);
  932|  20.0k|                if (b->seg_id > last_active_seg_id) b->seg_id = 0; // error?
  ------------------
  |  Branch (932:21): [True: 2.52k, False: 17.5k]
  ------------------
  933|  20.0k|            }
  934|  47.7k|            if (b->seg_id >= DAV1D_MAX_SEGMENTS) b->seg_id = 0; // error?
  ------------------
  |  |   43|  47.7k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (934:17): [True: 233, False: 47.5k]
  ------------------
  935|  47.7k|        }
  936|       |
  937|  49.4k|        seg = &f->frame_hdr->segmentation.seg_data.d[b->seg_id];
  938|       |
  939|  49.4k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  49.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 49.4k]
  |  |  ------------------
  |  |   35|  49.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|  49.4k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  940|      0|            printf("Post-segid[postskip;%d]: r=%d\n",
  941|      0|                   b->seg_id, ts->msac.rng);
  942|  49.4k|    }
  943|       |
  944|       |    // cdef index
  945|  2.39M|    if (!b->skip) {
  ------------------
  |  Branch (945:9): [True: 1.46M, False: 934k]
  ------------------
  946|  1.46M|        const int idx = f->seq_hdr->sb128 ? ((t->bx & 16) >> 4) +
  ------------------
  |  Branch (946:25): [True: 461k, False: 1.00M]
  ------------------
  947|  1.00M|                                           ((t->by & 16) >> 3) : 0;
  948|  1.46M|        if (t->cur_sb_cdef_idx_ptr[idx] == -1) {
  ------------------
  |  Branch (948:13): [True: 166k, False: 1.29M]
  ------------------
  949|   166k|            const int v = dav1d_msac_decode_bools(&ts->msac,
  950|   166k|                              f->frame_hdr->cdef.n_bits);
  951|   166k|            t->cur_sb_cdef_idx_ptr[idx] = v;
  952|   166k|            if (bw4 > 16) t->cur_sb_cdef_idx_ptr[idx + 1] = v;
  ------------------
  |  Branch (952:17): [True: 12.9k, False: 153k]
  ------------------
  953|   166k|            if (bh4 > 16) t->cur_sb_cdef_idx_ptr[idx + 2] = v;
  ------------------
  |  Branch (953:17): [True: 13.8k, False: 152k]
  ------------------
  954|   166k|            if (bw4 == 32 && bh4 == 32) t->cur_sb_cdef_idx_ptr[idx + 3] = v;
  ------------------
  |  Branch (954:17): [True: 12.9k, False: 153k]
  |  Branch (954:30): [True: 9.72k, False: 3.25k]
  ------------------
  955|       |
  956|   166k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   166k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 166k]
  |  |  ------------------
  |  |   35|   166k|        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|   166k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  957|      0|                printf("Post-cdef_idx[%d]: r=%d\n",
  958|      0|                        *t->cur_sb_cdef_idx_ptr, ts->msac.rng);
  959|   166k|        }
  960|  1.46M|    }
  961|       |
  962|       |    // delta-q/lf
  963|  2.39M|    if (!((t->bx | t->by) & (31 >> !f->seq_hdr->sb128))) {
  ------------------
  |  Branch (963:9): [True: 210k, False: 2.18M]
  ------------------
  964|   210k|        const int prev_qidx = ts->last_qidx;
  965|   210k|        const int have_delta_q = f->frame_hdr->delta.q.present &&
  ------------------
  |  Branch (965:34): [True: 69.5k, False: 141k]
  ------------------
  966|  69.5k|            (bs != (f->seq_hdr->sb128 ? BS_128x128 : BS_64x64) || !b->skip);
  ------------------
  |  Branch (966:14): [True: 54.8k, False: 14.7k]
  |  Branch (966:21): [True: 37.3k, False: 32.2k]
  |  Branch (966:67): [True: 5.89k, False: 8.85k]
  ------------------
  967|       |
  968|   210k|        uint32_t prev_delta_lf = ts->last_delta_lf.u32;
  969|       |
  970|   210k|        if (have_delta_q) {
  ------------------
  |  Branch (970:13): [True: 60.7k, False: 149k]
  ------------------
  971|  60.7k|            int delta_q = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  60.7k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  972|  60.7k|                                                          ts->cdf.m.delta_q, 3);
  973|  60.7k|            if (delta_q == 3) {
  ------------------
  |  Branch (973:17): [True: 3.59k, False: 57.1k]
  ------------------
  974|  3.59k|                const int n_bits = 1 + dav1d_msac_decode_bools(&ts->msac, 3);
  975|  3.59k|                delta_q = dav1d_msac_decode_bools(&ts->msac, n_bits) +
  976|  3.59k|                          1 + (1 << n_bits);
  977|  3.59k|            }
  978|  60.7k|            if (delta_q) {
  ------------------
  |  Branch (978:17): [True: 11.9k, False: 48.7k]
  ------------------
  979|  11.9k|                if (dav1d_msac_decode_bool_equi(&ts->msac)) delta_q = -delta_q;
  ------------------
  |  |   53|  11.9k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (979:21): [True: 7.10k, False: 4.88k]
  ------------------
  980|  11.9k|                delta_q *= 1 << f->frame_hdr->delta.q.res_log2;
  981|  11.9k|            }
  982|  60.7k|            ts->last_qidx = iclip(ts->last_qidx + delta_q, 1, 255);
  983|  60.7k|            if (have_delta_q && DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  60.7k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 60.7k]
  |  |  ------------------
  |  |   35|  60.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|  60.7k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (983:17): [True: 60.7k, False: 0]
  ------------------
  984|      0|                printf("Post-delta_q[%d->%d]: r=%d\n",
  985|      0|                       delta_q, ts->last_qidx, ts->msac.rng);
  986|       |
  987|  60.7k|            if (f->frame_hdr->delta.lf.present) {
  ------------------
  |  Branch (987:17): [True: 31.4k, False: 29.2k]
  ------------------
  988|  31.4k|                const int n_lfs = f->frame_hdr->delta.lf.multi ?
  ------------------
  |  Branch (988:35): [True: 22.9k, False: 8.53k]
  ------------------
  989|  22.9k|                    f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 ? 4 : 2 : 1;
  ------------------
  |  Branch (989:21): [True: 17.9k, False: 4.98k]
  ------------------
  990|       |
  991|   121k|                for (int i = 0; i < n_lfs; i++) {
  ------------------
  |  Branch (991:33): [True: 90.2k, False: 31.4k]
  ------------------
  992|  90.2k|                    int delta_lf = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  90.2k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  993|  90.2k|                        ts->cdf.m.delta_lf[i + f->frame_hdr->delta.lf.multi], 3);
  994|  90.2k|                    if (delta_lf == 3) {
  ------------------
  |  Branch (994:25): [True: 2.10k, False: 88.1k]
  ------------------
  995|  2.10k|                        const int n_bits = 1 + dav1d_msac_decode_bools(&ts->msac, 3);
  996|  2.10k|                        delta_lf = dav1d_msac_decode_bools(&ts->msac, n_bits) +
  997|  2.10k|                                   1 + (1 << n_bits);
  998|  2.10k|                    }
  999|  90.2k|                    if (delta_lf) {
  ------------------
  |  Branch (999:25): [True: 15.3k, False: 74.9k]
  ------------------
 1000|  15.3k|                        if (dav1d_msac_decode_bool_equi(&ts->msac))
  ------------------
  |  |   53|  15.3k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (1000:29): [True: 8.52k, False: 6.79k]
  ------------------
 1001|  8.52k|                            delta_lf = -delta_lf;
 1002|  15.3k|                        delta_lf *= 1 << f->frame_hdr->delta.lf.res_log2;
 1003|  15.3k|                    }
 1004|  90.2k|                    ts->last_delta_lf.i8[i] =
 1005|  90.2k|                        iclip(ts->last_delta_lf.i8[i] + delta_lf, -63, 63);
 1006|  90.2k|                    if (have_delta_q && DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  90.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 90.2k]
  |  |  ------------------
  |  |   35|  90.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|  90.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1006:25): [True: 90.2k, False: 0]
  ------------------
 1007|      0|                        printf("Post-delta_lf[%d:%d]: r=%d\n", i, delta_lf,
 1008|      0|                               ts->msac.rng);
 1009|  90.2k|                }
 1010|  31.4k|            }
 1011|  60.7k|        }
 1012|   210k|        if (ts->last_qidx == f->frame_hdr->quant.yac) {
  ------------------
  |  Branch (1012:13): [True: 168k, False: 41.6k]
  ------------------
 1013|       |            // assign frame-wide q values to this sb
 1014|   168k|            ts->dq = f->dq;
 1015|   168k|        } else if (ts->last_qidx != prev_qidx) {
  ------------------
  |  Branch (1015:20): [True: 8.07k, False: 33.5k]
  ------------------
 1016|       |            // find sb-specific quant parameters
 1017|  8.07k|            init_quant_tables(f->seq_hdr, f->frame_hdr, ts->last_qidx, ts->dqmem);
 1018|  8.07k|            ts->dq = ts->dqmem;
 1019|  8.07k|        }
 1020|   210k|        if (!ts->last_delta_lf.u32) {
  ------------------
  |  Branch (1020:13): [True: 182k, False: 28.0k]
  ------------------
 1021|       |            // assign frame-wide lf values to this sb
 1022|   182k|            ts->lflvl = f->lf.lvl;
 1023|   182k|        } else if (ts->last_delta_lf.u32 != prev_delta_lf) {
  ------------------
  |  Branch (1023:20): [True: 10.9k, False: 17.0k]
  ------------------
 1024|       |            // find sb-specific lf lvl parameters
 1025|  10.9k|            ts->lflvl = ts->lflvlmem;
 1026|  10.9k|            dav1d_calc_lf_values(ts->lflvlmem, f->frame_hdr, ts->last_delta_lf.i8);
 1027|  10.9k|        }
 1028|   210k|    }
 1029|       |
 1030|  2.39M|    if (b->skip_mode) {
  ------------------
  |  Branch (1030:9): [True: 317, False: 2.39M]
  ------------------
 1031|    317|        b->intra = 0;
 1032|  2.39M|    } else if (IS_INTER_OR_SWITCH(f->frame_hdr)) {
  ------------------
  |  |   36|  2.39M|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 112k, False: 2.28M]
  |  |  ------------------
  ------------------
 1033|   112k|        if (seg && (seg->ref >= 0 || seg->globalmv)) {
  ------------------
  |  Branch (1033:13): [True: 44.2k, False: 68.0k]
  |  Branch (1033:21): [True: 21.3k, False: 22.9k]
  |  Branch (1033:38): [True: 4.58k, False: 18.3k]
  ------------------
 1034|  25.9k|            b->intra = !seg->ref;
 1035|  86.3k|        } else {
 1036|  86.3k|            const int ictx = get_intra_ctx(t->a, &t->l, by4, bx4,
 1037|  86.3k|                                           have_top, have_left);
 1038|  86.3k|            b->intra = !dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  86.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1039|  86.3k|                            ts->cdf.m.intra[ictx]);
 1040|  86.3k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  86.3k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 86.3k]
  |  |  ------------------
  |  |   35|  86.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|  86.3k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1041|      0|                printf("Post-intra[%d]: r=%d\n", b->intra, ts->msac.rng);
 1042|  86.3k|        }
 1043|  2.28M|    } else if (f->frame_hdr->allow_intrabc) {
  ------------------
  |  Branch (1043:16): [True: 443k, False: 1.84M]
  ------------------
 1044|   443k|        b->intra = !dav1d_msac_decode_bool_adapt(&ts->msac, ts->cdf.m.intrabc);
  ------------------
  |  |   52|   443k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1045|   443k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   443k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 443k]
  |  |  ------------------
  |  |   35|   443k|        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|   443k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1046|      0|            printf("Post-intrabcflag[%d]: r=%d\n", b->intra, ts->msac.rng);
 1047|  1.84M|    } else {
 1048|  1.84M|        b->intra = 1;
 1049|  1.84M|    }
 1050|       |
 1051|       |    // intra/inter-specific stuff
 1052|  2.39M|    if (b->intra) {
  ------------------
  |  Branch (1052:9): [True: 2.08M, False: 309k]
  ------------------
 1053|  2.08M|        uint16_t *const ymode_cdf = IS_INTER_OR_SWITCH(f->frame_hdr) ?
  ------------------
  |  |   36|  2.08M|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 8.05k, False: 2.08M]
  |  |  ------------------
  ------------------
 1054|  8.05k|            ts->cdf.m.y_mode[dav1d_ymode_size_context[bs]] :
 1055|  2.08M|            ts->cdf.kfym[dav1d_intra_mode_context[t->a->mode[bx4]]]
 1056|  2.08M|                        [dav1d_intra_mode_context[t->l.mode[by4]]];
 1057|  2.08M|        b->y_mode = dav1d_msac_decode_symbol_adapt16(&ts->msac, ymode_cdf,
  ------------------
  |  |   57|  2.08M|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1058|  2.08M|                                                     N_INTRA_PRED_MODES - 1);
 1059|  2.08M|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  2.08M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.08M]
  |  |  ------------------
  |  |   35|  2.08M|        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.08M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1060|      0|            printf("Post-ymode[%d]: r=%d\n", b->y_mode, ts->msac.rng);
 1061|       |
 1062|       |        // angle delta
 1063|  2.08M|        if (b_dim[2] + b_dim[3] >= 2 && b->y_mode >= VERT_PRED &&
  ------------------
  |  Branch (1063:13): [True: 1.69M, False: 398k]
  |  Branch (1063:41): [True: 672k, False: 1.01M]
  ------------------
 1064|   672k|            b->y_mode <= VERT_LEFT_PRED)
  ------------------
  |  Branch (1064:13): [True: 415k, False: 256k]
  ------------------
 1065|   415k|        {
 1066|   415k|            uint16_t *const acdf = ts->cdf.m.angle_delta[b->y_mode - VERT_PRED];
 1067|   415k|            const int angle = dav1d_msac_decode_symbol_adapt8(&ts->msac, acdf, 6);
  ------------------
  |  |   48|   415k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1068|   415k|            b->y_angle = angle - 3;
 1069|  1.67M|        } else {
 1070|  1.67M|            b->y_angle = 0;
 1071|  1.67M|        }
 1072|       |
 1073|  2.08M|        if (has_chroma) {
  ------------------
  |  Branch (1073:13): [True: 1.76M, False: 324k]
  ------------------
 1074|  1.76M|            const int cfl_allowed = f->frame_hdr->segmentation.lossless[b->seg_id] ?
  ------------------
  |  Branch (1074:37): [True: 15.5k, False: 1.74M]
  ------------------
 1075|  1.74M|                cbw4 == 1 && cbh4 == 1 : !!(cfl_allowed_mask & (1 << bs));
  ------------------
  |  Branch (1075:17): [True: 7.89k, False: 7.65k]
  |  Branch (1075:30): [True: 6.71k, False: 1.18k]
  ------------------
 1076|  1.76M|            uint16_t *const uvmode_cdf = ts->cdf.m.uv_mode[cfl_allowed][b->y_mode];
 1077|  1.76M|            b->uv_mode = dav1d_msac_decode_symbol_adapt16(&ts->msac, uvmode_cdf,
  ------------------
  |  |   57|  1.76M|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1078|  1.76M|                             N_UV_INTRA_PRED_MODES - 1 - !cfl_allowed);
 1079|  1.76M|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.76M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.76M]
  |  |  ------------------
  |  |   35|  1.76M|        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.76M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1080|      0|                printf("Post-uvmode[%d]: r=%d\n", b->uv_mode, ts->msac.rng);
 1081|       |
 1082|  1.76M|            b->uv_angle = 0;
 1083|  1.76M|            if (b->uv_mode == CFL_PRED) {
  ------------------
  |  Branch (1083:17): [True: 248k, False: 1.51M]
  ------------------
 1084|   248k|#define SIGN(a) (!!(a) + ((a) > 0))
 1085|   248k|                const int sign = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   248k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1086|   248k|                                     ts->cdf.m.cfl_sign, 7) + 1;
 1087|   248k|                const int sign_u = sign * 0x56 >> 8, sign_v = sign - sign_u * 3;
 1088|   248k|                assert(sign_u == sign / 3);
  ------------------
  |  |  140|   248k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 248k]
  |  |  |  Branch (140:68): [Folded, False: 248k]
  |  |  ------------------
  ------------------
 1089|   248k|                if (sign_u) {
  ------------------
  |  Branch (1089:21): [True: 229k, False: 18.9k]
  ------------------
 1090|   229k|                    const int ctx = (sign_u == 2) * 3 + sign_v;
 1091|   229k|                    b->cfl_alpha[0] = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|   229k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1092|   229k|                                          ts->cdf.m.cfl_alpha[ctx], 15) + 1;
 1093|   229k|                    if (sign_u == 1) b->cfl_alpha[0] = -b->cfl_alpha[0];
  ------------------
  |  Branch (1093:25): [True: 173k, False: 56.6k]
  ------------------
 1094|   229k|                } else {
 1095|  18.9k|                    b->cfl_alpha[0] = 0;
 1096|  18.9k|                }
 1097|   248k|                if (sign_v) {
  ------------------
  |  Branch (1097:21): [True: 166k, False: 82.0k]
  ------------------
 1098|   166k|                    const int ctx = (sign_v == 2) * 3 + sign_u;
 1099|   166k|                    b->cfl_alpha[1] = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|   166k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1100|   166k|                                          ts->cdf.m.cfl_alpha[ctx], 15) + 1;
 1101|   166k|                    if (sign_v == 1) b->cfl_alpha[1] = -b->cfl_alpha[1];
  ------------------
  |  Branch (1101:25): [True: 77.4k, False: 89.2k]
  ------------------
 1102|   166k|                } else {
 1103|  82.0k|                    b->cfl_alpha[1] = 0;
 1104|  82.0k|                }
 1105|   248k|#undef SIGN
 1106|   248k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   248k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 248k]
  |  |  ------------------
  |  |   35|   248k|        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|   248k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1107|      0|                    printf("Post-uvalphas[%d/%d]: r=%d\n",
 1108|      0|                           b->cfl_alpha[0], b->cfl_alpha[1], ts->msac.rng);
 1109|  1.51M|            } else if (b_dim[2] + b_dim[3] >= 2 && b->uv_mode >= VERT_PRED &&
  ------------------
  |  Branch (1109:24): [True: 1.33M, False: 177k]
  |  Branch (1109:52): [True: 477k, False: 860k]
  ------------------
 1110|   477k|                       b->uv_mode <= VERT_LEFT_PRED)
  ------------------
  |  Branch (1110:24): [True: 261k, False: 216k]
  ------------------
 1111|   261k|            {
 1112|   261k|                uint16_t *const acdf = ts->cdf.m.angle_delta[b->uv_mode - VERT_PRED];
 1113|   261k|                const int angle = dav1d_msac_decode_symbol_adapt8(&ts->msac, acdf, 6);
  ------------------
  |  |   48|   261k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1114|   261k|                b->uv_angle = angle - 3;
 1115|   261k|            }
 1116|  1.76M|        }
 1117|       |
 1118|  2.08M|        b->pal_sz[0] = b->pal_sz[1] = 0;
 1119|  2.08M|        if (f->frame_hdr->allow_screen_content_tools &&
  ------------------
  |  Branch (1119:13): [True: 465k, False: 1.62M]
  ------------------
 1120|   465k|            imax(bw4, bh4) <= 16 && bw4 + bh4 >= 4)
  ------------------
  |  Branch (1120:13): [True: 448k, False: 16.4k]
  |  Branch (1120:37): [True: 351k, False: 97.2k]
  ------------------
 1121|   351k|        {
 1122|   351k|            const int sz_ctx = b_dim[2] + b_dim[3] - 2;
 1123|   351k|            if (b->y_mode == DC_PRED) {
  ------------------
  |  Branch (1123:17): [True: 147k, False: 204k]
  ------------------
 1124|   147k|                const int pal_ctx = (t->a->pal_sz[bx4] > 0) + (t->l.pal_sz[by4] > 0);
 1125|   147k|                const int use_y_pal = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|   147k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1126|   147k|                                          ts->cdf.m.pal_y[sz_ctx][pal_ctx]);
 1127|   147k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
 1128|      0|                    printf("Post-y_pal[%d]: r=%d\n", use_y_pal, ts->msac.rng);
 1129|   147k|                if (use_y_pal)
  ------------------
  |  Branch (1129:21): [True: 14.4k, False: 132k]
  ------------------
 1130|  14.4k|                    f->bd_fn.read_pal_plane(t, b, 0, sz_ctx, bx4, by4);
 1131|   147k|            }
 1132|       |
 1133|   351k|            if (has_chroma && b->uv_mode == DC_PRED) {
  ------------------
  |  Branch (1133:17): [True: 279k, False: 71.7k]
  |  Branch (1133:31): [True: 82.1k, False: 197k]
  ------------------
 1134|  82.1k|                const int pal_ctx = b->pal_sz[0] > 0;
 1135|  82.1k|                const int use_uv_pal = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  82.1k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1136|  82.1k|                                           ts->cdf.m.pal_uv[pal_ctx]);
 1137|  82.1k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  82.1k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 82.1k]
  |  |  ------------------
  |  |   35|  82.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|  82.1k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1138|      0|                    printf("Post-uv_pal[%d]: r=%d\n", use_uv_pal, ts->msac.rng);
 1139|  82.1k|                if (use_uv_pal) // see aomedia bug 2183 for why we use luma coordinates
  ------------------
  |  Branch (1139:21): [True: 5.65k, False: 76.5k]
  ------------------
 1140|  5.65k|                    f->bd_fn.read_pal_uv(t, b, sz_ctx, bx4, by4);
 1141|  82.1k|            }
 1142|   351k|        }
 1143|       |
 1144|  2.08M|        if (b->y_mode == DC_PRED && !b->pal_sz[0] &&
  ------------------
  |  Branch (1144:13): [True: 1.12M, False: 960k]
  |  Branch (1144:37): [True: 1.11M, False: 14.4k]
  ------------------
 1145|  1.11M|            imax(b_dim[2], b_dim[3]) <= 3 && f->seq_hdr->filter_intra)
  ------------------
  |  Branch (1145:13): [True: 1.04M, False: 66.4k]
  |  Branch (1145:46): [True: 742k, False: 305k]
  ------------------
 1146|   742k|        {
 1147|   742k|            const int is_filter = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|   742k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1148|   742k|                                      ts->cdf.m.use_filter_intra[bs]);
 1149|   742k|            if (is_filter) {
  ------------------
  |  Branch (1149:17): [True: 116k, False: 626k]
  ------------------
 1150|   116k|                b->y_mode = FILTER_PRED;
 1151|   116k|                b->y_angle = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   116k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1152|   116k|                                 ts->cdf.m.filter_intra, 4);
 1153|   116k|            }
 1154|   742k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   742k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 742k]
  |  |  ------------------
  |  |   35|   742k|        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|   742k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1155|      0|                printf("Post-filterintramode[%d/%d]: r=%d\n",
 1156|      0|                       b->y_mode, b->y_angle, ts->msac.rng);
 1157|   742k|        }
 1158|       |
 1159|  2.08M|        if (b->pal_sz[0]) {
  ------------------
  |  Branch (1159:13): [True: 14.4k, False: 2.07M]
  ------------------
 1160|  14.4k|            uint8_t *pal_idx;
 1161|  14.4k|            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1161:17): [True: 0, False: 14.4k]
  ------------------
 1162|      0|                const int p = t->frame_thread.pass & 1;
 1163|      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]
  |  |  ------------------
  ------------------
 1164|      0|                pal_idx = ts->frame_thread[p].pal_idx;
 1165|      0|                ts->frame_thread[p].pal_idx += bw4 * bh4 * 8;
 1166|      0|            } else
 1167|  14.4k|                pal_idx = t->scratch.pal_idx_y;
 1168|  14.4k|            read_pal_indices(t, pal_idx, b->pal_sz[0], 0, w4, h4, bw4, bh4);
 1169|  14.4k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  14.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 14.4k]
  |  |  ------------------
  |  |   35|  14.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|  14.4k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1170|      0|                printf("Post-y-pal-indices: r=%d\n", ts->msac.rng);
 1171|  14.4k|        }
 1172|       |
 1173|  2.08M|        if (has_chroma && b->pal_sz[1]) {
  ------------------
  |  Branch (1173:13): [True: 1.76M, False: 324k]
  |  Branch (1173:27): [True: 5.65k, False: 1.75M]
  ------------------
 1174|  5.65k|            uint8_t *pal_idx;
 1175|  5.65k|            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1175:17): [True: 0, False: 5.65k]
  ------------------
 1176|      0|                const int p = t->frame_thread.pass & 1;
 1177|      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]
  |  |  ------------------
  ------------------
 1178|      0|                pal_idx = ts->frame_thread[p].pal_idx;
 1179|      0|                ts->frame_thread[p].pal_idx += cbw4 * cbh4 * 8;
 1180|      0|            } else
 1181|  5.65k|                pal_idx = t->scratch.pal_idx_uv;
 1182|  5.65k|            read_pal_indices(t, pal_idx, b->pal_sz[1], 1, cw4, ch4, cbw4, cbh4);
 1183|  5.65k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  5.65k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 5.65k]
  |  |  ------------------
  |  |   35|  5.65k|        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|  5.65k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1184|      0|                printf("Post-uv-pal-indices: r=%d\n", ts->msac.rng);
 1185|  5.65k|        }
 1186|       |
 1187|  2.08M|        const TxfmInfo *t_dim;
 1188|  2.08M|        if (f->frame_hdr->segmentation.lossless[b->seg_id]) {
  ------------------
  |  Branch (1188:13): [True: 24.3k, False: 2.06M]
  ------------------
 1189|  24.3k|            b->tx = b->uvtx = (int) TX_4X4;
 1190|  24.3k|            t_dim = &dav1d_txfm_dimensions[TX_4X4];
 1191|  2.06M|        } else {
 1192|  2.06M|            b->tx = dav1d_max_txfm_size_for_bs[bs][0];
 1193|  2.06M|            b->uvtx = dav1d_max_txfm_size_for_bs[bs][f->cur.p.layout];
 1194|  2.06M|            t_dim = &dav1d_txfm_dimensions[b->tx];
 1195|  2.06M|            if (f->frame_hdr->txfm_mode == DAV1D_TX_SWITCHABLE && t_dim->max > TX_4X4) {
  ------------------
  |  Branch (1195:17): [True: 935k, False: 1.12M]
  |  Branch (1195:67): [True: 910k, False: 24.7k]
  ------------------
 1196|   910k|                const int tctx = get_tx_ctx(t->a, &t->l, t_dim, by4, bx4);
 1197|   910k|                uint16_t *const tx_cdf = ts->cdf.m.txsz[t_dim->max - 1][tctx];
 1198|   910k|                int depth = dav1d_msac_decode_symbol_adapt4(&ts->msac, tx_cdf,
  ------------------
  |  |   47|   910k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1199|   910k|                                imin(t_dim->max, 2));
 1200|       |
 1201|  1.15M|                while (depth--) {
  ------------------
  |  Branch (1201:24): [True: 239k, False: 910k]
  ------------------
 1202|   239k|                    b->tx = t_dim->sub;
 1203|   239k|                    t_dim = &dav1d_txfm_dimensions[b->tx];
 1204|   239k|                }
 1205|   910k|            }
 1206|  2.06M|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  2.06M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.06M]
  |  |  ------------------
  |  |   35|  2.06M|        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.06M|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1207|      0|                printf("Post-tx[%d]: r=%d\n", b->tx, ts->msac.rng);
 1208|  2.06M|        }
 1209|       |
 1210|       |        // reconstruction
 1211|  2.08M|        if (t->frame_thread.pass == 1) {
  ------------------
  |  Branch (1211:13): [True: 0, False: 2.08M]
  ------------------
 1212|      0|            f->bd_fn.read_coef_blocks(t, bs, b);
 1213|  2.08M|        } else {
 1214|  2.08M|            f->bd_fn.recon_b_intra(t, bs, intra_edge_flags, b);
 1215|  2.08M|        }
 1216|       |
 1217|  2.08M|        if (f->frame_hdr->loopfilter.level_y[0] ||
  ------------------
  |  Branch (1217:13): [True: 1.53M, False: 553k]
  ------------------
 1218|   553k|            f->frame_hdr->loopfilter.level_y[1])
  ------------------
  |  Branch (1218:13): [True: 263k, False: 290k]
  ------------------
 1219|  1.79M|        {
 1220|  1.79M|            dav1d_create_lf_mask_intra(t->lf_mask, f->lf.level, f->b4_stride,
 1221|  1.79M|                                       (const uint8_t (*)[8][2])
 1222|  1.79M|                                       &ts->lflvl[b->seg_id][0][0][0],
 1223|  1.79M|                                       t->bx, t->by, f->w4, f->h4, bs,
 1224|  1.79M|                                       b->tx, b->uvtx, f->cur.p.layout,
 1225|  1.79M|                                       &t->a->tx_lpf_y[bx4], &t->l.tx_lpf_y[by4],
 1226|  1.79M|                                       has_chroma ? &t->a->tx_lpf_uv[cbx4] : NULL,
  ------------------
  |  Branch (1226:40): [True: 1.55M, False: 244k]
  ------------------
 1227|  1.79M|                                       has_chroma ? &t->l.tx_lpf_uv[cby4] : NULL);
  ------------------
  |  Branch (1227:40): [True: 1.55M, False: 244k]
  ------------------
 1228|  1.79M|        }
 1229|       |        // update contexts
 1230|  2.08M|        const enum IntraPredMode y_mode_nofilt =
 1231|  2.08M|            b->y_mode == FILTER_PRED ? DC_PRED : b->y_mode;
  ------------------
  |  Branch (1231:13): [True: 116k, False: 1.97M]
  ------------------
 1232|  2.08M|        BlockContext *edge = t->a;
 1233|  6.26M|        for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (1233:36): [True: 4.17M, False: 2.08M]
  ------------------
 1234|  4.17M|            int t_lsz = ((uint8_t *) &t_dim->lw)[i]; // lw then lh
 1235|  4.17M|#define set_ctx(rep_macro) \
 1236|  4.17M|            rep_macro(edge->tx_intra, off, t_lsz); \
 1237|  4.17M|            rep_macro(edge->tx, off, t_lsz); \
 1238|  4.17M|            rep_macro(edge->mode, off, y_mode_nofilt); \
 1239|  4.17M|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
 1240|  4.17M|            rep_macro(edge->seg_pred, off, seg_pred); \
 1241|  4.17M|            rep_macro(edge->skip_mode, off, 0); \
 1242|  4.17M|            rep_macro(edge->intra, off, 1); \
 1243|  4.17M|            rep_macro(edge->skip, off, b->skip); \
 1244|       |            /* see aomedia bug 2183 for why we use luma coordinates here */ \
 1245|  4.17M|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
 1246|  4.17M|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
 1247|  4.17M|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
 1248|  4.17M|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
 1249|  4.17M|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
 1250|  4.17M|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
 1251|  4.17M|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
 1252|  4.17M|            }
 1253|  4.17M|            case_set(b_dim[2 + i]);
  ------------------
  |  |   70|  4.17M|    switch (var) { \
  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1236|   755k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   755k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   755k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   755k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   755k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   755k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   755k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1243|   755k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   755k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   755k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1245|   755k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   755k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  1.51M|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (56:43): [True: 456k, False: 299k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|   755k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   755k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 3.80k, False: 751k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  3.80k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.80k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  3.80k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  3.80k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.80k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  3.80k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  3.80k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.80k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  3.80k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  3.80k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.80k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  3.80k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1251|  3.80k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  3.80k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  3.80k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1252|  3.80k|            }
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 755k, False: 3.42M]
  |  |  ------------------
  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1236|  1.81M|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|  1.81M|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|  1.81M|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|  1.81M|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|  1.81M|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|  1.81M|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|  1.81M|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1243|  1.81M|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  1.81M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|  1.81M|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1245|  1.81M|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  1.81M|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  3.63M|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (58:45): [True: 1.68M, False: 134k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|  1.81M|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.81M|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 5.99k, False: 1.80M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  5.99k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  5.99k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  5.99k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  5.99k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  5.99k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  5.99k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  5.99k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  5.99k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  5.99k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  5.99k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  5.99k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  5.99k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1251|  5.99k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  5.99k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  5.99k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1252|  5.99k|            }
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 1.81M, False: 2.36M]
  |  |  ------------------
  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1236|   999k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   999k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   999k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   999k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   999k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   999k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   999k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1243|   999k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   999k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   999k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1245|   999k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   999k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  1.99M|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (60:45): [True: 887k, False: 111k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|   999k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   999k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 3.93k, False: 995k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  3.93k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  3.93k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  3.93k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  3.93k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  3.93k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  3.93k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  3.93k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  3.93k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  3.93k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  3.93k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  3.93k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  3.93k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1251|  3.93k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  3.93k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  3.93k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1252|  3.93k|            }
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 999k, False: 3.18M]
  |  |  ------------------
  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1236|   407k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   407k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   407k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   407k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   407k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   407k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   407k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1243|   407k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   407k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   407k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1245|   407k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   407k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   815k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (62:45): [True: 355k, False: 52.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|   407k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   407k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 1.57k, False: 406k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|  1.57k|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.57k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.57k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|  1.57k|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.57k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.57k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|  1.57k|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.57k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.57k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|  1.57k|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.57k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.57k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1251|  1.57k|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  1.57k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  1.57k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1252|  1.57k|            }
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 407k, False: 3.77M]
  |  |  ------------------
  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1236|   145k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|   145k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|   145k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|   145k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|   145k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|   145k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|   145k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1243|   145k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   145k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|   145k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1245|   145k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   145k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   145k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   291k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (64:29): [True: 109k, False: 35.6k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   65|   145k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 145k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|   145k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|   145k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 537, False: 145k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|    537|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    537|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    537|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    537|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    537|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 537]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|    537|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    537|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    537|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    537|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    537|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 537]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|    537|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    537|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    537|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    537|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    537|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 537]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|    537|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    537|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    537|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    537|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    537|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 537]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1251|    537|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|    537|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|    537|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|    537|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|    537|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 537]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1252|    537|            }
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 145k, False: 4.03M]
  |  |  ------------------
  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1236|  55.8k|            rep_macro(edge->tx_intra, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1237|  55.8k|            rep_macro(edge->tx, off, t_lsz); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1238|  55.8k|            rep_macro(edge->mode, off, y_mode_nofilt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1239|  55.8k|            rep_macro(edge->pal_sz, off, b->pal_sz[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1240|  55.8k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1241|  55.8k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1242|  55.8k|            rep_macro(edge->intra, off, 1); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1243|  55.8k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  55.8k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1244|  55.8k|            /* see aomedia bug 2183 for why we use luma coordinates here */ \
  |  |  |  | 1245|  55.8k|            rep_macro(t->pal_sz_uv[i], off, (has_chroma ? b->pal_sz[1] : 0)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  55.8k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  55.8k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|   111k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (67:29): [True: 38.9k, False: 16.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|  55.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 55.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1246|  55.8k|            if (IS_INTER_OR_SWITCH(f->frame_hdr)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  55.8k|    ((frame_header)->frame_type & 1)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (36:5): [True: 257, False: 55.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1247|    257|                rep_macro(edge->comp_type, off, COMP_INTER_NONE); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    257|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    257|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    257|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    257|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 257]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1248|    257|                rep_macro(edge->ref[0], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    257|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    257|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    257|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    257|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 257]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1249|    257|                rep_macro(edge->ref[1], off, ((uint8_t) -1)); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    257|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    257|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    257|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    257|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 257]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1250|    257|                rep_macro(edge->filter[0], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    257|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    257|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    257|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    257|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 257]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1251|    257|                rep_macro(edge->filter[1], off, DAV1D_N_SWITCHABLE_FILTERS); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|    257|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|    257|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|    257|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|    257|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 257]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1252|    257|            }
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 55.8k, False: 4.12M]
  |  |  ------------------
  |  |   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: 4.17M]
  |  |  ------------------
  |  |   78|  4.17M|    }
  ------------------
 1254|  4.17M|#undef set_ctx
 1255|  4.17M|        }
 1256|  2.08M|        if (b->pal_sz[0])
  ------------------
  |  Branch (1256:13): [True: 14.4k, False: 2.07M]
  ------------------
 1257|  14.4k|            f->bd_fn.copy_pal_block_y(t, bx4, by4, bw4, bh4);
 1258|  2.08M|        if (has_chroma) {
  ------------------
  |  Branch (1258:13): [True: 1.76M, False: 324k]
  ------------------
 1259|  1.76M|            uint8_t uv_mode = b->uv_mode;
 1260|  1.76M|            dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], uv_mode);
 1261|  1.76M|            dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], uv_mode);
 1262|  1.76M|            if (b->pal_sz[1])
  ------------------
  |  Branch (1262:17): [True: 5.65k, False: 1.75M]
  ------------------
 1263|  5.65k|                f->bd_fn.copy_pal_block_uv(t, bx4, by4, bw4, bh4);
 1264|  1.76M|        }
 1265|  2.08M|        if (IS_INTER_OR_SWITCH(f->frame_hdr) || f->frame_hdr->allow_intrabc)
  ------------------
  |  |   36|  4.17M|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 8.05k, False: 2.08M]
  |  |  ------------------
  ------------------
  |  Branch (1265:49): [True: 239k, False: 1.84M]
  ------------------
 1266|   247k|            splat_intraref(f->c, t, bs, bw4, bh4);
 1267|  2.08M|    } else if (IS_KEY_OR_INTRA(f->frame_hdr)) {
  ------------------
  |  |   43|   309k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|   309k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 204k, False: 104k]
  |  |  ------------------
  ------------------
 1268|       |        // intra block copy
 1269|   204k|        refmvs_candidate mvstack[8];
 1270|   204k|        int n_mvs, ctx;
 1271|   204k|        dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1272|   204k|                          (union refmvs_refpair) { .ref = { 0, -1 }},
 1273|   204k|                          bs, intra_edge_flags, t->by, t->bx);
 1274|       |
 1275|   204k|        if (mvstack[0].mv.mv[0].n)
  ------------------
  |  Branch (1275:13): [True: 190k, False: 14.2k]
  ------------------
 1276|   190k|            b->mv[0] = mvstack[0].mv.mv[0];
 1277|  14.2k|        else if (mvstack[1].mv.mv[0].n)
  ------------------
  |  Branch (1277:18): [True: 0, False: 14.2k]
  ------------------
 1278|      0|            b->mv[0] = mvstack[1].mv.mv[0];
 1279|  14.2k|        else {
 1280|  14.2k|            if (t->by - (16 << f->seq_hdr->sb128) < ts->tiling.row_start) {
  ------------------
  |  Branch (1280:17): [True: 10.0k, False: 4.21k]
  ------------------
 1281|  10.0k|                b->mv[0].y = 0;
 1282|  10.0k|                b->mv[0].x = -(512 << f->seq_hdr->sb128) - 2048;
 1283|  10.0k|            } else {
 1284|  4.21k|                b->mv[0].y = -(512 << f->seq_hdr->sb128);
 1285|  4.21k|                b->mv[0].x = 0;
 1286|  4.21k|            }
 1287|  14.2k|        }
 1288|       |
 1289|   204k|        const union mv ref = b->mv[0];
 1290|   204k|        read_mv_residual(ts, &b->mv[0], -1);
 1291|       |
 1292|       |        // clip intrabc motion vector to decoded parts of current tile
 1293|   204k|        int border_left = ts->tiling.col_start * 4;
 1294|   204k|        int border_top  = ts->tiling.row_start * 4;
 1295|   204k|        if (has_chroma) {
  ------------------
  |  Branch (1295:13): [True: 143k, False: 60.9k]
  ------------------
 1296|   143k|            if (bw4 < 2 &&  ss_hor)
  ------------------
  |  Branch (1296:17): [True: 98.0k, False: 45.4k]
  |  Branch (1296:29): [True: 9.93k, False: 88.1k]
  ------------------
 1297|  9.93k|                border_left += 4;
 1298|   143k|            if (bh4 < 2 &&  ss_ver)
  ------------------
  |  Branch (1298:17): [True: 92.4k, False: 51.0k]
  |  Branch (1298:29): [True: 9.35k, False: 83.0k]
  ------------------
 1299|  9.35k|                border_top  += 4;
 1300|   143k|        }
 1301|   204k|        int src_left   = t->bx * 4 + (b->mv[0].x >> 3);
 1302|   204k|        int src_top    = t->by * 4 + (b->mv[0].y >> 3);
 1303|   204k|        int src_right  = src_left + bw4 * 4;
 1304|   204k|        int src_bottom = src_top  + bh4 * 4;
 1305|   204k|        const int border_right = ((ts->tiling.col_end + (bw4 - 1)) & ~(bw4 - 1)) * 4;
 1306|       |
 1307|       |        // check against left or right tile boundary and adjust if necessary
 1308|   204k|        if (src_left < border_left) {
  ------------------
  |  Branch (1308:13): [True: 112k, False: 92.2k]
  ------------------
 1309|   112k|            src_right += border_left - src_left;
 1310|   112k|            src_left  += border_left - src_left;
 1311|   112k|        } else if (src_right > border_right) {
  ------------------
  |  Branch (1311:20): [True: 27.8k, False: 64.3k]
  ------------------
 1312|  27.8k|            src_left  -= src_right - border_right;
 1313|  27.8k|            src_right -= src_right - border_right;
 1314|  27.8k|        }
 1315|       |        // check against top tile boundary and adjust if necessary
 1316|   204k|        if (src_top < border_top) {
  ------------------
  |  Branch (1316:13): [True: 145k, False: 58.7k]
  ------------------
 1317|   145k|            src_bottom += border_top - src_top;
 1318|   145k|            src_top    += border_top - src_top;
 1319|   145k|        }
 1320|       |
 1321|   204k|        const int sbx = (t->bx >> (4 + f->seq_hdr->sb128)) << (6 + f->seq_hdr->sb128);
 1322|   204k|        const int sby = (t->by >> (4 + f->seq_hdr->sb128)) << (6 + f->seq_hdr->sb128);
 1323|   204k|        const int sb_size = 1 << (6 + f->seq_hdr->sb128);
 1324|       |        // check for overlap with current superblock
 1325|   204k|        if (src_bottom > sby && src_right > sbx) {
  ------------------
  |  Branch (1325:13): [True: 187k, False: 17.0k]
  |  Branch (1325:33): [True: 29.2k, False: 158k]
  ------------------
 1326|  29.2k|            if (src_top - border_top >= src_bottom - sby) {
  ------------------
  |  Branch (1326:17): [True: 4.07k, False: 25.1k]
  ------------------
 1327|       |                // if possible move src up into the previous suberblock row
 1328|  4.07k|                src_top    -= src_bottom - sby;
 1329|  4.07k|                src_bottom -= src_bottom - sby;
 1330|  25.1k|            } else if (src_left - border_left >= src_right - sbx) {
  ------------------
  |  Branch (1330:24): [True: 25.1k, False: 53]
  ------------------
 1331|       |                // if possible move src left into the previous suberblock
 1332|  25.1k|                src_left  -= src_right - sbx;
 1333|  25.1k|                src_right -= src_right - sbx;
 1334|  25.1k|            }
 1335|  29.2k|        }
 1336|       |        // move src up if it is below current superblock row
 1337|   204k|        if (src_bottom > sby + sb_size) {
  ------------------
  |  Branch (1337:13): [True: 3.04k, False: 201k]
  ------------------
 1338|  3.04k|            src_top    -= src_bottom - (sby + sb_size);
 1339|  3.04k|            src_bottom -= src_bottom - (sby + sb_size);
 1340|  3.04k|        }
 1341|       |        // error out if mv still overlaps with the current superblock
 1342|   204k|        if (src_bottom > sby && src_right > sbx)
  ------------------
  |  Branch (1342:13): [True: 183k, False: 21.1k]
  |  Branch (1342:33): [True: 53, False: 183k]
  ------------------
 1343|     53|            return -1;
 1344|       |
 1345|   204k|        b->mv[0].x = (src_left - t->bx * 4) * 8;
 1346|   204k|        b->mv[0].y = (src_top  - t->by * 4) * 8;
 1347|       |
 1348|   204k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   204k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 204k]
  |  |  ------------------
  |  |   35|   204k|        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|   204k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1349|      0|            printf("Post-dmv[%d/%d,ref=%d/%d|%d/%d]: r=%d\n",
 1350|      0|                   b->mv[0].y, b->mv[0].x, ref.y, ref.x,
 1351|      0|                   mvstack[0].mv.mv[0].y, mvstack[0].mv.mv[0].x, ts->msac.rng);
 1352|   204k|        read_vartx_tree(t, b, bs, bx4, by4);
 1353|       |
 1354|       |        // reconstruction
 1355|   204k|        if (t->frame_thread.pass == 1) {
  ------------------
  |  Branch (1355:13): [True: 0, False: 204k]
  ------------------
 1356|      0|            f->bd_fn.read_coef_blocks(t, bs, b);
 1357|      0|            b->filter2d = FILTER_2D_BILINEAR;
 1358|   204k|        } else {
 1359|   204k|            if (f->bd_fn.recon_b_inter(t, bs, b)) return -1;
  ------------------
  |  Branch (1359:17): [True: 0, False: 204k]
  ------------------
 1360|   204k|        }
 1361|       |
 1362|   204k|        splat_intrabc_mv(f->c, t, bs, b, bw4, bh4);
 1363|   204k|        BlockContext *edge = t->a;
 1364|   613k|        for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (1364:36): [True: 408k, False: 204k]
  ------------------
 1365|   408k|#define set_ctx(rep_macro) \
 1366|   408k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
 1367|   408k|            rep_macro(edge->mode, off, DC_PRED); \
 1368|   408k|            rep_macro(edge->pal_sz, off, 0); \
 1369|       |            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
 1370|   408k|            rep_macro(t->pal_sz_uv[i], off, 0); \
 1371|   408k|            rep_macro(edge->seg_pred, off, seg_pred); \
 1372|   408k|            rep_macro(edge->skip_mode, off, 0); \
 1373|   408k|            rep_macro(edge->intra, off, 0); \
 1374|   408k|            rep_macro(edge->skip, off, b->skip)
 1375|   408k|            case_set(b_dim[2 + i]);
  ------------------
  |  |   70|   408k|    switch (var) { \
  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1366|   271k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|   271k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1368|   271k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|   271k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1370|   271k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|   271k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|   271k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1373|   271k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|   271k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   271k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   271k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 271k, False: 137k]
  |  |  ------------------
  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1366|  44.9k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  44.9k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1368|  44.9k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  44.9k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1370|  44.9k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  44.9k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  44.9k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1373|  44.9k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|  44.9k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  44.9k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  44.9k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 44.9k, False: 363k]
  |  |  ------------------
  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1366|  47.8k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  47.8k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1368|  47.8k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  47.8k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1370|  47.8k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  47.8k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  47.8k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1373|  47.8k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|  47.8k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  47.8k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  47.8k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 47.8k, False: 361k]
  |  |  ------------------
  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1366|  20.5k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  20.5k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1368|  20.5k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  20.5k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1370|  20.5k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  20.5k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  20.5k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1373|  20.5k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|  20.5k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  20.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  20.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 20.5k, False: 388k]
  |  |  ------------------
  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1366|  20.3k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  20.3k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1368|  20.3k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  20.3k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1370|  20.3k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  20.3k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  20.3k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1373|  20.3k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|  20.3k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  20.3k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  20.3k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  20.3k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  20.3k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 20.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 20.3k, False: 388k]
  |  |  ------------------
  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1366|  4.05k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1367|  4.05k|            rep_macro(edge->mode, off, DC_PRED); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1368|  4.05k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1369|  4.05k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1370|  4.05k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1371|  4.05k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1372|  4.05k|            rep_macro(edge->skip_mode, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1373|  4.05k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1374|  4.05k|            rep_macro(edge->skip, off, b->skip)
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  4.05k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.05k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  4.05k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  4.05k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 4.05k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 4.05k, False: 404k]
  |  |  ------------------
  |  |   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: 408k]
  |  |  ------------------
  |  |   78|   408k|    }
  ------------------
 1376|   408k|#undef set_ctx
 1377|   408k|        }
 1378|   204k|        if (has_chroma) {
  ------------------
  |  Branch (1378:13): [True: 143k, False: 60.9k]
  ------------------
 1379|   143k|            dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], DC_PRED);
 1380|   143k|            dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], DC_PRED);
 1381|   143k|        }
 1382|   204k|    } else {
 1383|       |        // inter-specific mode/mv coding
 1384|   104k|        int is_comp, has_subpel_filter;
 1385|       |
 1386|   104k|        if (b->skip_mode) {
  ------------------
  |  Branch (1386:13): [True: 317, False: 104k]
  ------------------
 1387|    317|            is_comp = 1;
 1388|   104k|        } else if ((!seg || (seg->ref == -1 && !seg->globalmv && !seg->skip)) &&
  ------------------
  |  Branch (1388:21): [True: 62.3k, False: 41.8k]
  |  Branch (1388:30): [True: 21.8k, False: 20.0k]
  |  Branch (1388:48): [True: 17.2k, False: 4.58k]
  |  Branch (1388:66): [True: 13.8k, False: 3.34k]
  ------------------
 1389|  76.2k|                   f->frame_hdr->switchable_comp_refs && imin(bw4, bh4) > 1)
  ------------------
  |  Branch (1389:20): [True: 48.0k, False: 28.2k]
  |  Branch (1389:58): [True: 31.2k, False: 16.7k]
  ------------------
 1390|  31.2k|        {
 1391|  31.2k|            const int ctx = get_comp_ctx(t->a, &t->l, by4, bx4,
 1392|  31.2k|                                         have_top, have_left);
 1393|  31.2k|            is_comp = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  31.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1394|  31.2k|                          ts->cdf.m.comp[ctx]);
 1395|  31.2k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  31.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 31.2k]
  |  |  ------------------
  |  |   35|  31.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|  31.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1396|      0|                printf("Post-compflag[%d]: r=%d\n", is_comp, ts->msac.rng);
 1397|  72.9k|        } else {
 1398|  72.9k|            is_comp = 0;
 1399|  72.9k|        }
 1400|       |
 1401|   104k|        if (b->skip_mode) {
  ------------------
  |  Branch (1401:13): [True: 317, False: 104k]
  ------------------
 1402|    317|            b->ref[0] = f->frame_hdr->skip_mode_refs[0];
 1403|    317|            b->ref[1] = f->frame_hdr->skip_mode_refs[1];
 1404|    317|            b->comp_type = COMP_INTER_AVG;
 1405|    317|            b->inter_mode = NEARESTMV_NEARESTMV;
 1406|    317|            b->drl_idx = NEAREST_DRL;
 1407|    317|            has_subpel_filter = 0;
 1408|       |
 1409|    317|            refmvs_candidate mvstack[8];
 1410|    317|            int n_mvs, ctx;
 1411|    317|            dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1412|    317|                              (union refmvs_refpair) { .ref = {
 1413|    317|                                    b->ref[0] + 1, b->ref[1] + 1 }},
 1414|    317|                              bs, intra_edge_flags, t->by, t->bx);
 1415|       |
 1416|    317|            b->mv[0] = mvstack[0].mv.mv[0];
 1417|    317|            b->mv[1] = mvstack[0].mv.mv[1];
 1418|    317|            fix_mv_precision(f->frame_hdr, &b->mv[0]);
 1419|    317|            fix_mv_precision(f->frame_hdr, &b->mv[1]);
 1420|    317|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|    317|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 317]
  |  |  ------------------
  |  |   35|    317|        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|    317|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1421|      0|                printf("Post-skipmodeblock[mv=1:y=%d,x=%d,2:y=%d,x=%d,refs=%d+%d\n",
 1422|      0|                       b->mv[0].y, b->mv[0].x, b->mv[1].y, b->mv[1].x,
 1423|      0|                       b->ref[0], b->ref[1]);
 1424|   104k|        } else if (is_comp) {
  ------------------
  |  Branch (1424:20): [True: 19.5k, False: 84.7k]
  ------------------
 1425|  19.5k|            const int dir_ctx = get_comp_dir_ctx(t->a, &t->l, by4, bx4,
 1426|  19.5k|                                                 have_top, have_left);
 1427|  19.5k|            if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  19.5k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1427:17): [True: 15.7k, False: 3.74k]
  ------------------
 1428|  19.5k|                    ts->cdf.m.comp_dir[dir_ctx]))
 1429|  15.7k|            {
 1430|       |                // bidir - first reference (fw)
 1431|  15.7k|                const int ctx1 = av1_get_fwd_ref_ctx(t->a, &t->l, by4, bx4,
 1432|  15.7k|                                                     have_top, have_left);
 1433|  15.7k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  15.7k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1433:21): [True: 5.87k, False: 9.88k]
  ------------------
 1434|  15.7k|                        ts->cdf.m.comp_fwd_ref[0][ctx1]))
 1435|  5.87k|                {
 1436|  5.87k|                    const int ctx2 = av1_get_fwd_ref_2_ctx(t->a, &t->l, by4, bx4,
 1437|  5.87k|                                                           have_top, have_left);
 1438|  5.87k|                    b->ref[0] = 2 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  5.87k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1439|  5.87k|                                        ts->cdf.m.comp_fwd_ref[2][ctx2]);
 1440|  9.88k|                } else {
 1441|  9.88k|                    const int ctx2 = av1_get_fwd_ref_1_ctx(t->a, &t->l, by4, bx4,
 1442|  9.88k|                                                           have_top, have_left);
 1443|  9.88k|                    b->ref[0] = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  9.88k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1444|  9.88k|                                    ts->cdf.m.comp_fwd_ref[1][ctx2]);
 1445|  9.88k|                }
 1446|       |
 1447|       |                // second reference (bw)
 1448|  15.7k|                const int ctx3 = av1_get_bwd_ref_ctx(t->a, &t->l, by4, bx4,
 1449|  15.7k|                                                     have_top, have_left);
 1450|  15.7k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  15.7k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1450:21): [True: 8.51k, False: 7.24k]
  ------------------
 1451|  15.7k|                        ts->cdf.m.comp_bwd_ref[0][ctx3]))
 1452|  8.51k|                {
 1453|  8.51k|                    b->ref[1] = 6;
 1454|  8.51k|                } else {
 1455|  7.24k|                    const int ctx4 = av1_get_bwd_ref_1_ctx(t->a, &t->l, by4, bx4,
 1456|  7.24k|                                                           have_top, have_left);
 1457|  7.24k|                    b->ref[1] = 4 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  7.24k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1458|  7.24k|                                        ts->cdf.m.comp_bwd_ref[1][ctx4]);
 1459|  7.24k|                }
 1460|  15.7k|            } else {
 1461|       |                // unidir
 1462|  3.74k|                const int uctx_p = av1_get_uni_p_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  280|  3.74k|#define av1_get_uni_p_ctx av1_get_ref_ctx
  ------------------
 1463|  3.74k|                                                     have_top, have_left);
 1464|  3.74k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  3.74k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1464:21): [True: 1.02k, False: 2.71k]
  ------------------
 1465|  3.74k|                        ts->cdf.m.comp_uni_ref[0][uctx_p]))
 1466|  1.02k|                {
 1467|  1.02k|                    b->ref[0] = 4;
 1468|  1.02k|                    b->ref[1] = 6;
 1469|  2.71k|                } else {
 1470|  2.71k|                    const int uctx_p1 = av1_get_uni_p1_ctx(t->a, &t->l, by4, bx4,
 1471|  2.71k|                                                           have_top, have_left);
 1472|  2.71k|                    b->ref[0] = 0;
 1473|  2.71k|                    b->ref[1] = 1 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  2.71k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1474|  2.71k|                                        ts->cdf.m.comp_uni_ref[1][uctx_p1]);
 1475|  2.71k|                    if (b->ref[1] == 2) {
  ------------------
  |  Branch (1475:25): [True: 1.80k, False: 912]
  ------------------
 1476|  1.80k|                        const int uctx_p2 = av1_get_uni_p2_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  281|  1.80k|#define av1_get_uni_p2_ctx av1_get_fwd_ref_2_ctx
  ------------------
 1477|  1.80k|                                                               have_top, have_left);
 1478|  1.80k|                        b->ref[1] += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.80k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1479|  1.80k|                                         ts->cdf.m.comp_uni_ref[2][uctx_p2]);
 1480|  1.80k|                    }
 1481|  2.71k|                }
 1482|  3.74k|            }
 1483|  19.5k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  19.5k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 19.5k]
  |  |  ------------------
  |  |   35|  19.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|  19.5k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1484|      0|                printf("Post-refs[%d/%d]: r=%d\n",
 1485|      0|                       b->ref[0], b->ref[1], ts->msac.rng);
 1486|       |
 1487|  19.5k|            refmvs_candidate mvstack[8];
 1488|  19.5k|            int n_mvs, ctx;
 1489|  19.5k|            dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1490|  19.5k|                              (union refmvs_refpair) { .ref = {
 1491|  19.5k|                                    b->ref[0] + 1, b->ref[1] + 1 }},
 1492|  19.5k|                              bs, intra_edge_flags, t->by, t->bx);
 1493|       |
 1494|  19.5k|            b->inter_mode = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  19.5k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 1495|  19.5k|                                ts->cdf.m.comp_inter_mode[ctx],
 1496|  19.5k|                                N_COMP_INTER_PRED_MODES - 1);
 1497|  19.5k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  19.5k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 19.5k]
  |  |  ------------------
  |  |   35|  19.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|  19.5k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1498|      0|                printf("Post-compintermode[%d,ctx=%d,n_mvs=%d]: r=%d\n",
 1499|      0|                       b->inter_mode, ctx, n_mvs, ts->msac.rng);
 1500|       |
 1501|  19.5k|            const uint8_t *const im = dav1d_comp_inter_pred_modes[b->inter_mode];
 1502|  19.5k|            b->drl_idx = NEAREST_DRL;
 1503|  19.5k|            if (b->inter_mode == NEWMV_NEWMV) {
  ------------------
  |  Branch (1503:17): [True: 4.12k, False: 15.3k]
  ------------------
 1504|  4.12k|                if (n_mvs > 1) { // NEARER, NEAR or NEARISH
  ------------------
  |  Branch (1504:21): [True: 4.12k, False: 0]
  ------------------
 1505|  4.12k|                    const int drl_ctx_v1 = get_drl_context(mvstack, 0);
 1506|  4.12k|                    b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  4.12k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1507|  4.12k|                                      ts->cdf.m.drl_bit[drl_ctx_v1]);
 1508|  4.12k|                    if (b->drl_idx == NEARER_DRL && n_mvs > 2) {
  ------------------
  |  Branch (1508:25): [True: 2.66k, False: 1.46k]
  |  Branch (1508:53): [True: 910, False: 1.75k]
  ------------------
 1509|    910|                        const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1510|    910|                        b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|    910|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1511|    910|                                          ts->cdf.m.drl_bit[drl_ctx_v2]);
 1512|    910|                    }
 1513|  4.12k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  4.12k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 4.12k]
  |  |  ------------------
  |  |   35|  4.12k|        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.12k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1514|      0|                        printf("Post-drlidx[%d,n_mvs=%d]: r=%d\n",
 1515|      0|                               b->drl_idx, n_mvs, ts->msac.rng);
 1516|  4.12k|                }
 1517|  15.3k|            } else if (im[0] == NEARMV || im[1] == NEARMV) {
  ------------------
  |  Branch (1517:24): [True: 4.08k, False: 11.2k]
  |  Branch (1517:43): [True: 508, False: 10.7k]
  ------------------
 1518|  4.59k|                b->drl_idx = NEARER_DRL;
 1519|  4.59k|                if (n_mvs > 2) { // NEAR or NEARISH
  ------------------
  |  Branch (1519:21): [True: 570, False: 4.02k]
  ------------------
 1520|    570|                    const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1521|    570|                    b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|    570|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1522|    570|                                      ts->cdf.m.drl_bit[drl_ctx_v2]);
 1523|    570|                    if (b->drl_idx == NEAR_DRL && n_mvs > 3) {
  ------------------
  |  Branch (1523:25): [True: 219, False: 351]
  |  Branch (1523:51): [True: 72, False: 147]
  ------------------
 1524|     72|                        const int drl_ctx_v3 = get_drl_context(mvstack, 2);
 1525|     72|                        b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|     72|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1526|     72|                                          ts->cdf.m.drl_bit[drl_ctx_v3]);
 1527|     72|                    }
 1528|    570|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|    570|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 570]
  |  |  ------------------
  |  |   35|    570|        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|    570|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1529|      0|                        printf("Post-drlidx[%d,n_mvs=%d]: r=%d\n",
 1530|      0|                               b->drl_idx, n_mvs, ts->msac.rng);
 1531|    570|                }
 1532|  4.59k|            }
 1533|  19.5k|            assert(b->drl_idx >= NEAREST_DRL && b->drl_idx <= NEARISH_DRL);
  ------------------
  |  |  140|  39.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 19.5k, False: 0]
  |  |  |  Branch (140:30): [True: 19.5k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 19.5k]
  |  |  ------------------
  ------------------
 1534|       |
 1535|  19.5k|#define assign_comp_mv(idx) \
 1536|  19.5k|            switch (im[idx]) { \
 1537|  19.5k|            case NEARMV: \
 1538|  19.5k|            case NEARESTMV: \
 1539|  19.5k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
 1540|  19.5k|                fix_mv_precision(f->frame_hdr, &b->mv[idx]); \
 1541|  19.5k|                break; \
 1542|  19.5k|            case GLOBALMV: \
 1543|  19.5k|                has_subpel_filter |= \
 1544|  19.5k|                    f->frame_hdr->gmv[b->ref[idx]].type == DAV1D_WM_TYPE_TRANSLATION; \
 1545|  19.5k|                b->mv[idx] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[idx]], \
 1546|  19.5k|                                        t->bx, t->by, bw4, bh4, f->frame_hdr); \
 1547|  19.5k|                break; \
 1548|  19.5k|            case NEWMV: \
 1549|  19.5k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
 1550|  19.5k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv; \
 1551|  19.5k|                read_mv_residual(ts, &b->mv[idx], mv_prec); \
 1552|  19.5k|                break; \
 1553|  19.5k|            }
 1554|  19.5k|            has_subpel_filter = imin(bw4, bh4) == 1 ||
  ------------------
  |  Branch (1554:33): [True: 0, False: 19.5k]
  ------------------
 1555|  19.5k|                                b->inter_mode != GLOBALMV_GLOBALMV;
  ------------------
  |  Branch (1555:33): [True: 17.5k, False: 1.92k]
  ------------------
 1556|  19.5k|            assign_comp_mv(0);
  ------------------
  |  | 1536|  19.5k|            switch (im[idx]) { \
  |  |  ------------------
  |  |  |  Branch (1536:21): [True: 19.5k, False: 0]
  |  |  ------------------
  |  | 1537|  4.08k|            case NEARMV: \
  |  |  ------------------
  |  |  |  Branch (1537:13): [True: 4.08k, False: 15.4k]
  |  |  ------------------
  |  | 1538|  11.8k|            case NEARESTMV: \
  |  |  ------------------
  |  |  |  Branch (1538:13): [True: 7.80k, False: 11.6k]
  |  |  ------------------
  |  | 1539|  11.8k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1540|  11.8k|                fix_mv_precision(f->frame_hdr, &b->mv[idx]); \
  |  | 1541|  11.8k|                break; \
  |  | 1542|  4.08k|            case GLOBALMV: \
  |  |  ------------------
  |  |  |  Branch (1542:13): [True: 1.92k, False: 17.5k]
  |  |  ------------------
  |  | 1543|  1.92k|                has_subpel_filter |= \
  |  | 1544|  1.92k|                    f->frame_hdr->gmv[b->ref[idx]].type == DAV1D_WM_TYPE_TRANSLATION; \
  |  | 1545|  1.92k|                b->mv[idx] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[idx]], \
  |  | 1546|  1.92k|                                        t->bx, t->by, bw4, bh4, f->frame_hdr); \
  |  | 1547|  1.92k|                break; \
  |  | 1548|  5.68k|            case NEWMV: \
  |  |  ------------------
  |  |  |  Branch (1548:13): [True: 5.68k, False: 13.8k]
  |  |  ------------------
  |  | 1549|  5.68k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1550|  5.68k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv; \
  |  | 1551|  5.68k|                read_mv_residual(ts, &b->mv[idx], mv_prec); \
  |  | 1552|  5.68k|                break; \
  |  | 1553|  19.5k|            }
  ------------------
 1557|  19.5k|            assign_comp_mv(1);
  ------------------
  |  | 1536|  19.5k|            switch (im[idx]) { \
  |  |  ------------------
  |  |  |  Branch (1536:21): [True: 19.5k, False: 0]
  |  |  ------------------
  |  | 1537|  3.91k|            case NEARMV: \
  |  |  ------------------
  |  |  |  Branch (1537:13): [True: 3.91k, False: 15.5k]
  |  |  ------------------
  |  | 1538|  11.6k|            case NEARESTMV: \
  |  |  ------------------
  |  |  |  Branch (1538:13): [True: 7.74k, False: 11.7k]
  |  |  ------------------
  |  | 1539|  11.6k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1540|  11.6k|                fix_mv_precision(f->frame_hdr, &b->mv[idx]); \
  |  | 1541|  11.6k|                break; \
  |  | 1542|  3.91k|            case GLOBALMV: \
  |  |  ------------------
  |  |  |  Branch (1542:13): [True: 1.92k, False: 17.5k]
  |  |  ------------------
  |  | 1543|  1.92k|                has_subpel_filter |= \
  |  | 1544|  1.92k|                    f->frame_hdr->gmv[b->ref[idx]].type == DAV1D_WM_TYPE_TRANSLATION; \
  |  | 1545|  1.92k|                b->mv[idx] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[idx]], \
  |  | 1546|  1.92k|                                        t->bx, t->by, bw4, bh4, f->frame_hdr); \
  |  | 1547|  1.92k|                break; \
  |  | 1548|  5.92k|            case NEWMV: \
  |  |  ------------------
  |  |  |  Branch (1548:13): [True: 5.92k, False: 13.5k]
  |  |  ------------------
  |  | 1549|  5.92k|                b->mv[idx] = mvstack[b->drl_idx].mv.mv[idx]; \
  |  | 1550|  5.92k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv; \
  |  | 1551|  5.92k|                read_mv_residual(ts, &b->mv[idx], mv_prec); \
  |  | 1552|  5.92k|                break; \
  |  | 1553|  19.5k|            }
  ------------------
 1558|  19.5k|#undef assign_comp_mv
 1559|  19.5k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  19.5k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 19.5k]
  |  |  ------------------
  |  |   35|  19.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|  19.5k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1560|      0|                printf("Post-residual_mv[1:y=%d,x=%d,2:y=%d,x=%d]: r=%d\n",
 1561|      0|                       b->mv[0].y, b->mv[0].x, b->mv[1].y, b->mv[1].x,
 1562|      0|                       ts->msac.rng);
 1563|       |
 1564|       |            // jnt_comp vs. seg vs. wedge
 1565|  19.5k|            int is_segwedge = 0;
 1566|  19.5k|            if (f->seq_hdr->masked_compound) {
  ------------------
  |  Branch (1566:17): [True: 13.2k, False: 6.25k]
  ------------------
 1567|  13.2k|                const int mask_ctx = get_mask_comp_ctx(t->a, &t->l, by4, bx4);
 1568|       |
 1569|  13.2k|                is_segwedge = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  13.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1570|  13.2k|                                  ts->cdf.m.mask_comp[mask_ctx]);
 1571|  13.2k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  13.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 13.2k]
  |  |  ------------------
  |  |   35|  13.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|  13.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1572|      0|                    printf("Post-segwedge_vs_jntavg[%d,ctx=%d]: r=%d\n",
 1573|      0|                           is_segwedge, mask_ctx, ts->msac.rng);
 1574|  13.2k|            }
 1575|       |
 1576|  19.5k|            if (!is_segwedge) {
  ------------------
  |  Branch (1576:17): [True: 15.3k, False: 4.14k]
  ------------------
 1577|  15.3k|                if (f->seq_hdr->jnt_comp) {
  ------------------
  |  Branch (1577:21): [True: 8.17k, False: 7.18k]
  ------------------
 1578|  8.17k|                    const int jnt_ctx =
 1579|  8.17k|                        get_jnt_comp_ctx(f->seq_hdr->order_hint_n_bits,
 1580|  8.17k|                                         f->cur.frame_hdr->frame_offset,
 1581|  8.17k|                                         f->refp[b->ref[0]].p.frame_hdr->frame_offset,
 1582|  8.17k|                                         f->refp[b->ref[1]].p.frame_hdr->frame_offset,
 1583|  8.17k|                                         t->a, &t->l, by4, bx4);
 1584|  8.17k|                    b->comp_type = COMP_INTER_WEIGHTED_AVG +
 1585|  8.17k|                                   dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  8.17k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1586|  8.17k|                                       ts->cdf.m.jnt_comp[jnt_ctx]);
 1587|  8.17k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  8.17k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 8.17k]
  |  |  ------------------
  |  |   35|  8.17k|        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.17k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1588|      0|                        printf("Post-jnt_comp[%d,ctx=%d[ac:%d,ar:%d,lc:%d,lr:%d]]: r=%d\n",
 1589|      0|                               b->comp_type == COMP_INTER_AVG,
 1590|      0|                               jnt_ctx, t->a->comp_type[bx4], t->a->ref[0][bx4],
 1591|      0|                               t->l.comp_type[by4], t->l.ref[0][by4],
 1592|      0|                               ts->msac.rng);
 1593|  8.17k|                } else {
 1594|  7.18k|                    b->comp_type = COMP_INTER_AVG;
 1595|  7.18k|                }
 1596|  15.3k|            } else {
 1597|  4.14k|                if (wedge_allowed_mask & (1 << bs)) {
  ------------------
  |  Branch (1597:21): [True: 3.57k, False: 572]
  ------------------
 1598|  3.57k|                    const int ctx = dav1d_wedge_ctx_lut[bs];
 1599|  3.57k|                    b->comp_type = COMP_INTER_WEDGE -
 1600|  3.57k|                                   dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  3.57k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1601|  3.57k|                                       ts->cdf.m.wedge_comp[ctx]);
 1602|  3.57k|                    if (b->comp_type == COMP_INTER_WEDGE)
  ------------------
  |  Branch (1602:25): [True: 1.32k, False: 2.24k]
  ------------------
 1603|  1.32k|                        b->wedge_idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|  1.32k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1604|  3.57k|                                           ts->cdf.m.wedge_idx[ctx], 15);
 1605|  3.57k|                } else {
 1606|    572|                    b->comp_type = COMP_INTER_SEG;
 1607|    572|                }
 1608|  4.14k|                b->mask_sign = dav1d_msac_decode_bool_equi(&ts->msac);
  ------------------
  |  |   53|  4.14k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
 1609|  4.14k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  4.14k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 4.14k]
  |  |  ------------------
  |  |   35|  4.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|  4.14k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1610|      0|                    printf("Post-seg/wedge[%d,wedge_idx=%d,sign=%d]: r=%d\n",
 1611|      0|                           b->comp_type == COMP_INTER_WEDGE,
 1612|      0|                           b->wedge_idx, b->mask_sign, ts->msac.rng);
 1613|  4.14k|            }
 1614|  84.7k|        } else {
 1615|  84.7k|            b->comp_type = COMP_INTER_NONE;
 1616|       |
 1617|       |            // ref
 1618|  84.7k|            if (seg && seg->ref > 0) {
  ------------------
  |  Branch (1618:17): [True: 39.4k, False: 45.2k]
  |  Branch (1618:24): [True: 20.0k, False: 19.4k]
  ------------------
 1619|  20.0k|                b->ref[0] = seg->ref - 1;
 1620|  64.7k|            } else if (seg && (seg->globalmv || seg->skip)) {
  ------------------
  |  Branch (1620:24): [True: 19.4k, False: 45.2k]
  |  Branch (1620:32): [True: 4.58k, False: 14.8k]
  |  Branch (1620:49): [True: 3.34k, False: 11.5k]
  ------------------
 1621|  7.92k|                b->ref[0] = 0;
 1622|  56.7k|            } else {
 1623|  56.7k|                const int ctx1 = av1_get_ref_ctx(t->a, &t->l, by4, bx4,
 1624|  56.7k|                                                 have_top, have_left);
 1625|  56.7k|                if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  56.7k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1625:21): [True: 27.3k, False: 29.3k]
  ------------------
 1626|  56.7k|                                                 ts->cdf.m.ref[0][ctx1]))
 1627|  27.3k|                {
 1628|  27.3k|                    const int ctx2 = av1_get_ref_2_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  275|  27.3k|#define av1_get_ref_2_ctx av1_get_bwd_ref_ctx
  ------------------
 1629|  27.3k|                                                       have_top, have_left);
 1630|  27.3k|                    if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  27.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1630:25): [True: 17.0k, False: 10.3k]
  ------------------
 1631|  27.3k|                                                     ts->cdf.m.ref[1][ctx2]))
 1632|  17.0k|                    {
 1633|  17.0k|                        b->ref[0] = 6;
 1634|  17.0k|                    } else {
 1635|  10.3k|                        const int ctx3 = av1_get_ref_6_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  279|  10.3k|#define av1_get_ref_6_ctx av1_get_bwd_ref_1_ctx
  ------------------
 1636|  10.3k|                                                           have_top, have_left);
 1637|  10.3k|                        b->ref[0] = 4 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  10.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1638|  10.3k|                                            ts->cdf.m.ref[5][ctx3]);
 1639|  10.3k|                    }
 1640|  29.3k|                } else {
 1641|  29.3k|                    const int ctx2 = av1_get_ref_3_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  276|  29.3k|#define av1_get_ref_3_ctx av1_get_fwd_ref_ctx
  ------------------
 1642|  29.3k|                                                       have_top, have_left);
 1643|  29.3k|                    if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  29.3k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1643:25): [True: 9.42k, False: 19.9k]
  ------------------
 1644|  29.3k|                                                     ts->cdf.m.ref[2][ctx2]))
 1645|  9.42k|                    {
 1646|  9.42k|                        const int ctx3 = av1_get_ref_5_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  278|  9.42k|#define av1_get_ref_5_ctx av1_get_fwd_ref_2_ctx
  ------------------
 1647|  9.42k|                                                           have_top, have_left);
 1648|  9.42k|                        b->ref[0] = 2 + dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  9.42k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1649|  9.42k|                                            ts->cdf.m.ref[4][ctx3]);
 1650|  19.9k|                    } else {
 1651|  19.9k|                        const int ctx3 = av1_get_ref_4_ctx(t->a, &t->l, by4, bx4,
  ------------------
  |  |  277|  19.9k|#define av1_get_ref_4_ctx av1_get_fwd_ref_1_ctx
  ------------------
 1652|  19.9k|                                                           have_top, have_left);
 1653|  19.9k|                        b->ref[0] = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  19.9k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1654|  19.9k|                                        ts->cdf.m.ref[3][ctx3]);
 1655|  19.9k|                    }
 1656|  29.3k|                }
 1657|  56.7k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  56.7k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 56.7k]
  |  |  ------------------
  |  |   35|  56.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|  56.7k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1658|      0|                    printf("Post-ref[%d]: r=%d\n", b->ref[0], ts->msac.rng);
 1659|  56.7k|            }
 1660|  84.7k|            b->ref[1] = -1;
 1661|       |
 1662|  84.7k|            refmvs_candidate mvstack[8];
 1663|  84.7k|            int n_mvs, ctx;
 1664|  84.7k|            dav1d_refmvs_find(&t->rt, mvstack, &n_mvs, &ctx,
 1665|  84.7k|                              (union refmvs_refpair) { .ref = { b->ref[0] + 1, -1 }},
 1666|  84.7k|                              bs, intra_edge_flags, t->by, t->bx);
 1667|       |
 1668|       |            // mode parsing and mv derivation from ref_mvs
 1669|  84.7k|            if ((seg && (seg->skip || seg->globalmv)) ||
  ------------------
  |  Branch (1669:18): [True: 39.4k, False: 45.2k]
  |  Branch (1669:26): [True: 24.0k, False: 15.4k]
  |  Branch (1669:39): [True: 2.16k, False: 13.2k]
  ------------------
 1670|  58.5k|                dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  58.5k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1670:17): [True: 38.0k, False: 20.4k]
  ------------------
 1671|  58.5k|                                             ts->cdf.m.newmv_mode[ctx & 7]))
 1672|  64.2k|            {
 1673|  64.2k|                if ((seg && (seg->skip || seg->globalmv)) ||
  ------------------
  |  Branch (1673:22): [True: 34.6k, False: 29.6k]
  |  Branch (1673:30): [True: 24.0k, False: 10.5k]
  |  Branch (1673:43): [True: 2.16k, False: 8.39k]
  ------------------
 1674|  38.0k|                    !dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  38.0k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1674:21): [True: 1.84k, False: 36.2k]
  ------------------
 1675|  38.0k|                         ts->cdf.m.globalmv_mode[(ctx >> 3) & 1]))
 1676|  28.0k|                {
 1677|  28.0k|                    b->inter_mode = GLOBALMV;
 1678|  28.0k|                    b->mv[0] = get_gmv_2d(&f->frame_hdr->gmv[b->ref[0]],
 1679|  28.0k|                                          t->bx, t->by, bw4, bh4, f->frame_hdr);
 1680|  28.0k|                    has_subpel_filter = imin(bw4, bh4) == 1 ||
  ------------------
  |  Branch (1680:41): [True: 10.3k, False: 17.7k]
  ------------------
 1681|  17.7k|                        f->frame_hdr->gmv[b->ref[0]].type == DAV1D_WM_TYPE_TRANSLATION;
  ------------------
  |  Branch (1681:25): [True: 1.31k, False: 16.4k]
  ------------------
 1682|  36.2k|                } else {
 1683|  36.2k|                    has_subpel_filter = 1;
 1684|  36.2k|                    if (dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  36.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1684:25): [True: 15.1k, False: 21.0k]
  ------------------
 1685|  36.2k|                            ts->cdf.m.refmv_mode[(ctx >> 4) & 15]))
 1686|  15.1k|                    { // NEAREST, NEARER, NEAR or NEARISH
 1687|  15.1k|                        b->inter_mode = NEARMV;
 1688|  15.1k|                        b->drl_idx = NEARER_DRL;
 1689|  15.1k|                        if (n_mvs > 2) { // NEARER, NEAR or NEARISH
  ------------------
  |  Branch (1689:29): [True: 5.50k, False: 9.64k]
  ------------------
 1690|  5.50k|                            const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1691|  5.50k|                            b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  5.50k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1692|  5.50k|                                              ts->cdf.m.drl_bit[drl_ctx_v2]);
 1693|  5.50k|                            if (b->drl_idx == NEAR_DRL && n_mvs > 3) { // NEAR or NEARISH
  ------------------
  |  Branch (1693:33): [True: 3.84k, False: 1.66k]
  |  Branch (1693:59): [True: 1.64k, False: 2.19k]
  ------------------
 1694|  1.64k|                                const int drl_ctx_v3 =
 1695|  1.64k|                                    get_drl_context(mvstack, 2);
 1696|  1.64k|                                b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  1.64k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1697|  1.64k|                                                  ts->cdf.m.drl_bit[drl_ctx_v3]);
 1698|  1.64k|                            }
 1699|  5.50k|                        }
 1700|  21.0k|                    } else {
 1701|  21.0k|                        b->inter_mode = NEARESTMV;
 1702|  21.0k|                        b->drl_idx = NEAREST_DRL;
 1703|  21.0k|                    }
 1704|  36.2k|                    assert(b->drl_idx >= NEAREST_DRL && b->drl_idx <= NEARISH_DRL);
  ------------------
  |  |  140|  72.4k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 36.2k, False: 0]
  |  |  |  Branch (140:30): [True: 36.2k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 36.2k]
  |  |  ------------------
  ------------------
 1705|  36.2k|                    b->mv[0] = mvstack[b->drl_idx].mv.mv[0];
 1706|  36.2k|                    if (b->drl_idx < NEAR_DRL)
  ------------------
  |  Branch (1706:25): [True: 32.3k, False: 3.84k]
  ------------------
 1707|  32.3k|                        fix_mv_precision(f->frame_hdr, &b->mv[0]);
 1708|  36.2k|                }
 1709|       |
 1710|  64.2k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  64.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 64.2k]
  |  |  ------------------
  |  |   35|  64.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|  64.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1711|      0|                    printf("Post-intermode[%d,drl=%d,mv=y:%d,x:%d,n_mvs=%d]: r=%d\n",
 1712|      0|                           b->inter_mode, b->drl_idx, b->mv[0].y, b->mv[0].x, n_mvs,
 1713|      0|                           ts->msac.rng);
 1714|  64.2k|            } else {
 1715|  20.4k|                has_subpel_filter = 1;
 1716|  20.4k|                b->inter_mode = NEWMV;
 1717|  20.4k|                b->drl_idx = NEAREST_DRL;
 1718|  20.4k|                if (n_mvs > 1) { // NEARER, NEAR or NEARISH
  ------------------
  |  Branch (1718:21): [True: 14.2k, False: 6.24k]
  ------------------
 1719|  14.2k|                    const int drl_ctx_v1 = get_drl_context(mvstack, 0);
 1720|  14.2k|                    b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  14.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1721|  14.2k|                                      ts->cdf.m.drl_bit[drl_ctx_v1]);
 1722|  14.2k|                    if (b->drl_idx == NEARER_DRL && n_mvs > 2) { // NEAR or NEARISH
  ------------------
  |  Branch (1722:25): [True: 5.97k, False: 8.25k]
  |  Branch (1722:53): [True: 2.43k, False: 3.54k]
  ------------------
 1723|  2.43k|                        const int drl_ctx_v2 = get_drl_context(mvstack, 1);
 1724|  2.43k|                        b->drl_idx += dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  2.43k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1725|  2.43k|                                          ts->cdf.m.drl_bit[drl_ctx_v2]);
 1726|  2.43k|                    }
 1727|  14.2k|                }
 1728|  20.4k|                assert(b->drl_idx >= NEAREST_DRL && b->drl_idx <= NEARISH_DRL);
  ------------------
  |  |  140|  40.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 20.4k, False: 0]
  |  |  |  Branch (140:30): [True: 20.4k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 20.4k]
  |  |  ------------------
  ------------------
 1729|  20.4k|                if (n_mvs > 1) {
  ------------------
  |  Branch (1729:21): [True: 14.2k, False: 6.24k]
  ------------------
 1730|  14.2k|                    b->mv[0] = mvstack[b->drl_idx].mv.mv[0];
 1731|  14.2k|                } else {
 1732|  6.24k|                    assert(!b->drl_idx);
  ------------------
  |  |  140|  6.24k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 6.24k]
  |  |  |  Branch (140:68): [Folded, False: 6.24k]
  |  |  ------------------
  ------------------
 1733|  6.24k|                    b->mv[0] = mvstack[0].mv.mv[0];
 1734|  6.24k|                    fix_mv_precision(f->frame_hdr, &b->mv[0]);
 1735|  6.24k|                }
 1736|  20.4k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  20.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 20.4k]
  |  |  ------------------
  |  |   35|  20.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|  20.4k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1737|      0|                    printf("Post-intermode[%d,drl=%d]: r=%d\n",
 1738|      0|                           b->inter_mode, b->drl_idx, ts->msac.rng);
 1739|  20.4k|                const int mv_prec = f->frame_hdr->hp - f->frame_hdr->force_integer_mv;
 1740|  20.4k|                read_mv_residual(ts, &b->mv[0], mv_prec);
 1741|  20.4k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  20.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 20.4k]
  |  |  ------------------
  |  |   35|  20.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|  20.4k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1742|      0|                    printf("Post-residualmv[mv=y:%d,x:%d]: r=%d\n",
 1743|      0|                           b->mv[0].y, b->mv[0].x, ts->msac.rng);
 1744|  20.4k|            }
 1745|       |
 1746|       |            // interintra flags
 1747|  84.7k|            const int ii_sz_grp = dav1d_ymode_size_context[bs];
 1748|  84.7k|            if (f->seq_hdr->inter_intra &&
  ------------------
  |  Branch (1748:17): [True: 61.2k, False: 23.5k]
  ------------------
 1749|  61.2k|                interintra_allowed_mask & (1 << bs) &&
  ------------------
  |  Branch (1749:17): [True: 26.7k, False: 34.5k]
  ------------------
 1750|  26.7k|                dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  26.7k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  |  Branch (1750:17): [True: 4.67k, False: 22.0k]
  ------------------
 1751|  26.7k|                                             ts->cdf.m.interintra[ii_sz_grp]))
 1752|  4.67k|            {
 1753|  4.67k|                b->interintra_mode = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  4.67k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1754|  4.67k|                                         ts->cdf.m.interintra_mode[ii_sz_grp],
 1755|  4.67k|                                         N_INTER_INTRA_PRED_MODES - 1);
 1756|  4.67k|                const int wedge_ctx = dav1d_wedge_ctx_lut[bs];
 1757|  4.67k|                b->interintra_type = INTER_INTRA_BLEND +
 1758|  4.67k|                                     dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  4.67k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1759|  4.67k|                                         ts->cdf.m.interintra_wedge[wedge_ctx]);
 1760|  4.67k|                if (b->interintra_type == INTER_INTRA_WEDGE)
  ------------------
  |  Branch (1760:21): [True: 1.21k, False: 3.46k]
  ------------------
 1761|  1.21k|                    b->wedge_idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|  1.21k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
 1762|  4.67k|                                       ts->cdf.m.wedge_idx[wedge_ctx], 15);
 1763|  80.0k|            } else {
 1764|  80.0k|                b->interintra_type = INTER_INTRA_NONE;
 1765|  80.0k|            }
 1766|  84.7k|            if (DEBUG_BLOCK_INFO && f->seq_hdr->inter_intra &&
  ------------------
  |  |   34|  84.7k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 84.7k]
  |  |  ------------------
  |  |   35|  84.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|  84.7k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1766:37): [True: 0, False: 0]
  ------------------
 1767|      0|                interintra_allowed_mask & (1 << bs))
  ------------------
  |  Branch (1767:17): [True: 0, False: 0]
  ------------------
 1768|      0|            {
 1769|      0|                printf("Post-interintra[t=%d,m=%d,w=%d]: r=%d\n",
 1770|      0|                       b->interintra_type, b->interintra_mode,
 1771|      0|                       b->wedge_idx, ts->msac.rng);
 1772|      0|            }
 1773|       |
 1774|       |            // motion variation
 1775|  84.7k|            if (f->frame_hdr->switchable_motion_mode &&
  ------------------
  |  Branch (1775:17): [True: 57.5k, False: 27.2k]
  ------------------
 1776|  57.5k|                b->interintra_type == INTER_INTRA_NONE && imin(bw4, bh4) >= 2 &&
  ------------------
  |  Branch (1776:17): [True: 54.2k, False: 3.31k]
  |  Branch (1776:59): [True: 30.7k, False: 23.4k]
  ------------------
 1777|       |                // is not warped global motion
 1778|  30.7k|                !(!f->frame_hdr->force_integer_mv && b->inter_mode == GLOBALMV &&
  ------------------
  |  Branch (1778:19): [True: 28.9k, False: 1.84k]
  |  Branch (1778:54): [True: 11.8k, False: 17.1k]
  ------------------
 1779|  11.8k|                  f->frame_hdr->gmv[b->ref[0]].type > DAV1D_WM_TYPE_TRANSLATION) &&
  ------------------
  |  Branch (1779:19): [True: 1.61k, False: 10.2k]
  ------------------
 1780|       |                // has overlappable neighbours
 1781|  29.1k|                ((have_left && findoddzero(&t->l.intra[by4 + 1], h4 >> 1)) ||
  ------------------
  |  Branch (1781:19): [True: 24.4k, False: 4.72k]
  |  Branch (1781:32): [True: 23.7k, False: 715]
  ------------------
 1782|  5.43k|                 (have_top && findoddzero(&t->a->intra[bx4 + 1], w4 >> 1))))
  ------------------
  |  Branch (1782:19): [True: 3.88k, False: 1.55k]
  |  Branch (1782:31): [True: 3.65k, False: 228]
  ------------------
 1783|  27.3k|            {
 1784|       |                // reaching here means the block allows obmc - check warp by
 1785|       |                // finding matching-ref blocks in top/left edges
 1786|  27.3k|                uint64_t mask[2] = { 0, 0 };
 1787|  27.3k|                find_matching_ref(t, intra_edge_flags, bw4, bh4, w4, h4,
 1788|  27.3k|                                  have_left, have_top, b->ref[0], mask);
 1789|  27.3k|                const int allow_warp = !f->svc[b->ref[0]][0].scale &&
  ------------------
  |  Branch (1789:40): [True: 11.9k, False: 15.4k]
  ------------------
 1790|  11.9k|                    !f->frame_hdr->force_integer_mv &&
  ------------------
  |  Branch (1790:21): [True: 11.6k, False: 264]
  ------------------
 1791|  11.6k|                    f->frame_hdr->warp_motion && (mask[0] | mask[1]);
  ------------------
  |  Branch (1791:21): [True: 9.50k, False: 2.17k]
  |  Branch (1791:50): [True: 8.16k, False: 1.34k]
  ------------------
 1792|       |
 1793|  27.3k|                b->motion_mode = allow_warp ?
  ------------------
  |  Branch (1793:34): [True: 8.16k, False: 19.2k]
  ------------------
 1794|  8.16k|                    dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  8.16k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1795|  8.16k|                        ts->cdf.m.motion_mode[bs], 2) :
 1796|  27.3k|                    dav1d_msac_decode_bool_adapt(&ts->msac, ts->cdf.m.obmc[bs]);
  ------------------
  |  |   52|  19.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 1797|  27.3k|                if (b->motion_mode == MM_WARP) {
  ------------------
  |  Branch (1797:21): [True: 3.23k, False: 24.1k]
  ------------------
 1798|  3.23k|                    has_subpel_filter = 0;
 1799|  3.23k|                    derive_warpmv(t, bw4, bh4, mask, b->mv[0], &t->warpmv);
 1800|  3.23k|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
 1801|  3.23k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  3.23k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 3.23k]
  |  |  ------------------
  |  |   35|  3.23k|        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.23k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1802|      0|                        printf("[ %c%x %c%x %c%x\n  %c%x %c%x %c%x ]\n"
 1803|      0|                               "alpha=%c%x, beta=%c%x, gamma=%c%x, delta=%c%x, "
 1804|      0|                               "mv=y:%d,x:%d\n",
 1805|      0|                               signabs(t->warpmv.matrix[0]),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1806|      0|                               signabs(t->warpmv.matrix[1]),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1807|      0|                               signabs(t->warpmv.matrix[2]),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1808|      0|                               signabs(t->warpmv.matrix[3]),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1809|      0|                               signabs(t->warpmv.matrix[4]),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1810|      0|                               signabs(t->warpmv.matrix[5]),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1811|      0|                               signabs(t->warpmv.u.p.alpha),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1812|      0|                               signabs(t->warpmv.u.p.beta),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1813|      0|                               signabs(t->warpmv.u.p.gamma),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1814|      0|                               signabs(t->warpmv.u.p.delta),
  ------------------
  |  | 1800|      0|#define signabs(v) v < 0 ? '-' : ' ', abs(v)
  |  |  ------------------
  |  |  |  Branch (1800:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1815|      0|                               b->mv[0].y, b->mv[0].x);
 1816|  3.23k|#undef signabs
 1817|  3.23k|                    if (t->frame_thread.pass) {
  ------------------
  |  Branch (1817:25): [True: 0, False: 3.23k]
  ------------------
 1818|      0|                        if (t->warpmv.type == DAV1D_WM_TYPE_AFFINE) {
  ------------------
  |  Branch (1818:29): [True: 0, False: 0]
  ------------------
 1819|      0|                            b->matrix[0] = t->warpmv.matrix[2] - 0x10000;
 1820|      0|                            b->matrix[1] = t->warpmv.matrix[3];
 1821|      0|                            b->matrix[2] = t->warpmv.matrix[4];
 1822|      0|                            b->matrix[3] = t->warpmv.matrix[5] - 0x10000;
 1823|      0|                        } else {
 1824|      0|                            b->matrix[0] = INT16_MIN;
 1825|      0|                        }
 1826|      0|                    }
 1827|  3.23k|                }
 1828|       |
 1829|  27.3k|                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  27.3k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 27.3k]
  |  |  ------------------
  |  |   35|  27.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|  27.3k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1830|      0|                    printf("Post-motionmode[%d]: r=%d [mask: 0x%" PRIx64 "/0x%"
 1831|      0|                           PRIx64 "]\n", b->motion_mode, ts->msac.rng, mask[0],
 1832|      0|                            mask[1]);
 1833|  57.3k|            } else {
 1834|  57.3k|                b->motion_mode = MM_TRANSLATION;
 1835|  57.3k|            }
 1836|  84.7k|        }
 1837|       |
 1838|       |        // subpel filter
 1839|   104k|        enum Dav1dFilterMode filter[2];
 1840|   104k|        if (f->frame_hdr->subpel_filter_mode == DAV1D_FILTER_SWITCHABLE) {
  ------------------
  |  Branch (1840:13): [True: 35.7k, False: 68.7k]
  ------------------
 1841|  35.7k|            if (has_subpel_filter) {
  ------------------
  |  Branch (1841:17): [True: 28.5k, False: 7.21k]
  ------------------
 1842|  28.5k|                const int comp = b->comp_type != COMP_INTER_NONE;
 1843|  28.5k|                const int ctx1 = get_filter_ctx(t->a, &t->l, comp, 0, b->ref[0],
 1844|  28.5k|                                                by4, bx4);
 1845|  28.5k|                filter[0] = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  28.5k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1846|  28.5k|                               ts->cdf.m.filter[0][ctx1],
 1847|  28.5k|                               DAV1D_N_SWITCHABLE_FILTERS - 1);
 1848|  28.5k|                if (f->seq_hdr->dual_filter) {
  ------------------
  |  Branch (1848:21): [True: 23.2k, False: 5.35k]
  ------------------
 1849|  23.2k|                    const int ctx2 = get_filter_ctx(t->a, &t->l, comp, 1,
 1850|  23.2k|                                                    b->ref[0], by4, bx4);
 1851|  23.2k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  23.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 23.2k]
  |  |  ------------------
  |  |   35|  23.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|  23.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1852|      0|                        printf("Post-subpel_filter1[%d,ctx=%d]: r=%d\n",
 1853|      0|                               filter[0], ctx1, ts->msac.rng);
 1854|  23.2k|                    filter[1] = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  23.2k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 1855|  23.2k|                                    ts->cdf.m.filter[1][ctx2],
 1856|  23.2k|                                    DAV1D_N_SWITCHABLE_FILTERS - 1);
 1857|  23.2k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  23.2k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 23.2k]
  |  |  ------------------
  |  |   35|  23.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|  23.2k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1858|      0|                        printf("Post-subpel_filter2[%d,ctx=%d]: r=%d\n",
 1859|      0|                               filter[1], ctx2, ts->msac.rng);
 1860|  23.2k|                } else {
 1861|  5.35k|                    filter[1] = filter[0];
 1862|  5.35k|                    if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  5.35k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 5.35k]
  |  |  ------------------
  |  |   35|  5.35k|        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|  5.35k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1863|      0|                        printf("Post-subpel_filter[%d,ctx=%d]: r=%d\n",
 1864|      0|                               filter[0], ctx1, ts->msac.rng);
 1865|  5.35k|                }
 1866|  28.5k|            } else {
 1867|  7.21k|                filter[0] = filter[1] = DAV1D_FILTER_8TAP_REGULAR;
 1868|  7.21k|            }
 1869|  68.7k|        } else {
 1870|  68.7k|            filter[0] = filter[1] = f->frame_hdr->subpel_filter_mode;
 1871|  68.7k|        }
 1872|   104k|        b->filter2d = dav1d_filter_2d[filter[1]][filter[0]];
 1873|       |
 1874|   104k|        read_vartx_tree(t, b, bs, bx4, by4);
 1875|       |
 1876|       |        // reconstruction
 1877|   104k|        if (t->frame_thread.pass == 1) {
  ------------------
  |  Branch (1877:13): [True: 0, False: 104k]
  ------------------
 1878|      0|            f->bd_fn.read_coef_blocks(t, bs, b);
 1879|   104k|        } else {
 1880|   104k|            if (f->bd_fn.recon_b_inter(t, bs, b)) return -1;
  ------------------
  |  Branch (1880:17): [True: 0, False: 104k]
  ------------------
 1881|   104k|        }
 1882|       |
 1883|   104k|        if (f->frame_hdr->loopfilter.level_y[0] ||
  ------------------
  |  Branch (1883:13): [True: 102k, False: 2.06k]
  ------------------
 1884|  2.06k|            f->frame_hdr->loopfilter.level_y[1])
  ------------------
  |  Branch (1884:13): [True: 1.60k, False: 460]
  ------------------
 1885|   104k|        {
 1886|   104k|            const int is_globalmv =
 1887|   104k|                b->inter_mode == (is_comp ? GLOBALMV_GLOBALMV : GLOBALMV);
  ------------------
  |  Branch (1887:35): [True: 19.7k, False: 84.3k]
  ------------------
 1888|   104k|            const uint8_t (*const lf_lvls)[8][2] = (const uint8_t (*)[8][2])
 1889|   104k|                &ts->lflvl[b->seg_id][0][b->ref[0] + 1][!is_globalmv];
 1890|   104k|            const uint16_t tx_split[2] = { b->tx_split0, b->tx_split1 };
 1891|   104k|            enum RectTxfmSize ytx = b->max_ytx, uvtx = b->uvtx;
 1892|   104k|            if (f->frame_hdr->segmentation.lossless[b->seg_id]) {
  ------------------
  |  Branch (1892:17): [True: 1.19k, False: 102k]
  ------------------
 1893|  1.19k|                ytx  = (enum RectTxfmSize) TX_4X4;
 1894|  1.19k|                uvtx = (enum RectTxfmSize) TX_4X4;
 1895|  1.19k|            }
 1896|   104k|            dav1d_create_lf_mask_inter(t->lf_mask, f->lf.level, f->b4_stride, lf_lvls,
 1897|   104k|                                       t->bx, t->by, f->w4, f->h4, b->skip, bs,
 1898|   104k|                                       ytx, tx_split, uvtx, f->cur.p.layout,
 1899|   104k|                                       &t->a->tx_lpf_y[bx4], &t->l.tx_lpf_y[by4],
 1900|   104k|                                       has_chroma ? &t->a->tx_lpf_uv[cbx4] : NULL,
  ------------------
  |  Branch (1900:40): [True: 55.1k, False: 48.9k]
  ------------------
 1901|   104k|                                       has_chroma ? &t->l.tx_lpf_uv[cby4] : NULL);
  ------------------
  |  Branch (1901:40): [True: 55.1k, False: 48.9k]
  ------------------
 1902|   104k|        }
 1903|       |
 1904|       |        // context updates
 1905|   104k|        if (is_comp)
  ------------------
  |  Branch (1905:13): [True: 19.8k, False: 84.7k]
  ------------------
 1906|  19.8k|            splat_tworef_mv(f->c, t, bs, b, bw4, bh4);
 1907|  84.7k|        else
 1908|  84.7k|            splat_oneref_mv(f->c, t, bs, b, bw4, bh4);
 1909|   104k|        BlockContext *edge = t->a;
 1910|   313k|        for (int i = 0, off = bx4; i < 2; i++, off = by4, edge = &t->l) {
  ------------------
  |  Branch (1910:36): [True: 209k, False: 104k]
  ------------------
 1911|   209k|#define set_ctx(rep_macro) \
 1912|   209k|            rep_macro(edge->seg_pred, off, seg_pred); \
 1913|   209k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
 1914|   209k|            rep_macro(edge->intra, off, 0); \
 1915|   209k|            rep_macro(edge->skip, off, b->skip); \
 1916|   209k|            rep_macro(edge->pal_sz, off, 0); \
 1917|       |            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
 1918|   209k|            rep_macro(t->pal_sz_uv[i], off, 0); \
 1919|   209k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
 1920|   209k|            rep_macro(edge->comp_type, off, b->comp_type); \
 1921|   209k|            rep_macro(edge->filter[0], off, filter[0]); \
 1922|   209k|            rep_macro(edge->filter[1], off, filter[1]); \
 1923|   209k|            rep_macro(edge->mode, off, b->inter_mode); \
 1924|   209k|            rep_macro(edge->ref[0], off, b->ref[0]); \
 1925|   209k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
 1926|   209k|            case_set(b_dim[2 + i]);
  ------------------
  |  |   70|   209k|    switch (var) { \
  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1912|  48.9k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  48.9k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  48.9k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  48.9k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1916|  48.9k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  48.9k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1918|  48.9k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  48.9k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  48.9k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  48.9k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  48.9k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  48.9k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1924|  48.9k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1925|  48.9k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|  48.9k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  48.9k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 48.9k, False: 160k]
  |  |  ------------------
  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1912|  76.1k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  76.1k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  76.1k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  76.1k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1916|  76.1k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  76.1k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1918|  76.1k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  76.1k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  76.1k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  76.1k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  76.1k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  76.1k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1924|  76.1k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1925|  76.1k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|  76.1k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|  76.1k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 76.1k, False: 132k]
  |  |  ------------------
  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1912|  53.2k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  53.2k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  53.2k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  53.2k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1916|  53.2k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  53.2k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1918|  53.2k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  53.2k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  53.2k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  53.2k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  53.2k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  53.2k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1924|  53.2k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1925|  53.2k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|  53.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|  53.2k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 53.2k, False: 155k]
  |  |  ------------------
  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1912|  22.5k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  22.5k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  22.5k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  22.5k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1916|  22.5k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  22.5k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1918|  22.5k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  22.5k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  22.5k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  22.5k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  22.5k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  22.5k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1924|  22.5k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1925|  22.5k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|  22.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  22.5k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 22.5k, False: 186k]
  |  |  ------------------
  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1912|  6.15k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  6.15k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  6.15k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  6.15k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1916|  6.15k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  6.15k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1918|  6.15k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  6.15k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  6.15k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  6.15k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  6.15k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  6.15k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1924|  6.15k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1925|  6.15k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|  6.15k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  6.15k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  6.15k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  6.15k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 6.15k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 6.15k, False: 202k]
  |  |  ------------------
  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1912|  2.13k|            rep_macro(edge->seg_pred, off, seg_pred); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1913|  2.13k|            rep_macro(edge->skip_mode, off, b->skip_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1914|  2.13k|            rep_macro(edge->intra, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1915|  2.13k|            rep_macro(edge->skip, off, b->skip); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1916|  2.13k|            rep_macro(edge->pal_sz, off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1917|  2.13k|            /* see aomedia bug 2183 for why this is outside if (has_chroma) */ \
  |  |  |  | 1918|  2.13k|            rep_macro(t->pal_sz_uv[i], off, 0); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1919|  2.13k|            rep_macro(edge->tx_intra, off, b_dim[2 + i]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1920|  2.13k|            rep_macro(edge->comp_type, off, b->comp_type); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1921|  2.13k|            rep_macro(edge->filter[0], off, filter[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1922|  2.13k|            rep_macro(edge->filter[1], off, filter[1]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1923|  2.13k|            rep_macro(edge->mode, off, b->inter_mode); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1924|  2.13k|            rep_macro(edge->ref[0], off, b->ref[0]); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1925|  2.13k|            rep_macro(edge->ref[1], off, ((uint8_t) b->ref[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|  2.13k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  2.13k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|  2.13k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|  2.13k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 2.13k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 2.13k, False: 207k]
  |  |  ------------------
  |  |   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: 209k]
  |  |  ------------------
  |  |   78|   209k|    }
  ------------------
 1927|   209k|#undef set_ctx
 1928|   209k|        }
 1929|   104k|        if (has_chroma) {
  ------------------
  |  Branch (1929:13): [True: 55.4k, False: 49.1k]
  ------------------
 1930|  55.4k|            dav1d_memset_pow2[ulog2(cbw4)](&t->a->uvmode[cbx4], DC_PRED);
 1931|  55.4k|            dav1d_memset_pow2[ulog2(cbh4)](&t->l.uvmode[cby4], DC_PRED);
 1932|  55.4k|        }
 1933|   104k|    }
 1934|       |
 1935|       |    // update contexts
 1936|  2.39M|    if (f->frame_hdr->segmentation.enabled &&
  ------------------
  |  Branch (1936:9): [True: 638k, False: 1.76M]
  ------------------
 1937|   638k|        f->frame_hdr->segmentation.update_map)
  ------------------
  |  Branch (1937:9): [True: 615k, False: 22.9k]
  ------------------
 1938|   615k|    {
 1939|   615k|        uint8_t *seg_ptr = &f->cur_segmap[t->by * f->b4_stride + t->bx];
 1940|   615k|#define set_ctx(rep_macro) \
 1941|   615k|        for (int y = 0; y < bh4; y++) { \
 1942|   615k|            rep_macro(seg_ptr, 0, b->seg_id); \
 1943|   615k|            seg_ptr += f->b4_stride; \
 1944|   615k|        }
 1945|   615k|        case_set(b_dim[2]);
  ------------------
  |  |   70|   615k|    switch (var) { \
  |  |   71|   133k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  | 1941|   355k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1941:25): [True: 221k, False: 133k]
  |  |  |  |  ------------------
  |  |  |  | 1942|   221k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   71|   221k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|   221k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1943|   221k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1944|   221k|        }
  |  |  ------------------
  |  |  |  Branch (71:5): [True: 133k, False: 481k]
  |  |  ------------------
  |  |   72|   187k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  | 1941|   690k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1941:25): [True: 502k, False: 187k]
  |  |  |  |  ------------------
  |  |  |  | 1942|   502k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|   502k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   502k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1943|   502k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1944|   502k|        }
  |  |  ------------------
  |  |  |  Branch (72:5): [True: 187k, False: 427k]
  |  |  ------------------
  |  |   73|   160k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  | 1941|   768k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1941:25): [True: 608k, False: 160k]
  |  |  |  |  ------------------
  |  |  |  | 1942|   608k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|   608k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   608k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1943|   608k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1944|   608k|        }
  |  |  ------------------
  |  |  |  Branch (73:5): [True: 160k, False: 455k]
  |  |  ------------------
  |  |   74|  77.1k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  | 1941|   642k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1941:25): [True: 565k, False: 77.1k]
  |  |  |  |  ------------------
  |  |  |  | 1942|   565k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   74|   565k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|   565k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1943|   565k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1944|   565k|        }
  |  |  ------------------
  |  |  |  Branch (74:5): [True: 77.1k, False: 538k]
  |  |  ------------------
  |  |   75|  40.7k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  | 1941|   652k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1941:25): [True: 611k, False: 40.7k]
  |  |  |  |  ------------------
  |  |  |  | 1942|   611k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   75|   611k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   611k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   611k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   611k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 611k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1943|   611k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1944|   611k|        }
  |  |  ------------------
  |  |  |  Branch (75:5): [True: 40.7k, False: 574k]
  |  |  ------------------
  |  |   76|  15.6k|    case 5: set_ctx(set_ctx32); break; \
  |  |  ------------------
  |  |  |  | 1941|   490k|        for (int y = 0; y < bh4; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1941:25): [True: 474k, False: 15.6k]
  |  |  |  |  ------------------
  |  |  |  | 1942|   474k|            rep_macro(seg_ptr, 0, b->seg_id); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   76|   474k|    case 5: set_ctx(set_ctx32); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|   474k|#define set_ctx32(var, off, val) do { \
  |  |  |  |  |  |  |  |   67|   474k|        memset(&(var)[off], val, 32); \
  |  |  |  |  |  |  |  |   68|   474k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (68:14): [Folded, False: 474k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  | 1943|   474k|            seg_ptr += f->b4_stride; \
  |  |  |  | 1944|   474k|        }
  |  |  ------------------
  |  |  |  Branch (76:5): [True: 15.6k, False: 599k]
  |  |  ------------------
  |  |   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: 615k]
  |  |  ------------------
  |  |   78|   615k|    }
  ------------------
 1946|   615k|#undef set_ctx
 1947|   615k|    }
 1948|  2.39M|    if (!b->skip) {
  ------------------
  |  Branch (1948:9): [True: 1.46M, False: 934k]
  ------------------
 1949|  1.46M|        uint16_t (*noskip_mask)[2] = &t->lf_mask->noskip_mask[by4 >> 1];
 1950|  1.46M|        const unsigned mask = (~0U >> (32 - bw4)) << (bx4 & 15);
 1951|  1.46M|        const int bx_idx = (bx4 & 16) >> 4;
 1952|  4.10M|        for (int y = 0; y < bh4; y += 2, noskip_mask++) {
  ------------------
  |  Branch (1952:25): [True: 2.64M, False: 1.46M]
  ------------------
 1953|  2.64M|            (*noskip_mask)[bx_idx] |= mask;
 1954|  2.64M|            if (bw4 == 32) // this should be mask >> 16, but it's 0xffffffff anyway
  ------------------
  |  Branch (1954:17): [True: 181k, False: 2.46M]
  ------------------
 1955|   181k|                (*noskip_mask)[1] |= mask;
 1956|  2.64M|        }
 1957|  1.46M|    }
 1958|       |
 1959|  2.39M|    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 (1959:9): [True: 0, False: 2.39M]
  |  Branch (1959:38): [True: 0, False: 0]
  ------------------
 1960|      0|        const int sby = (t->by - ts->tiling.row_start) >> f->sb_shift;
 1961|      0|        int (*const lowest_px)[2] = ts->lowest_pixel[sby];
 1962|       |
 1963|       |        // keep track of motion vectors for each reference
 1964|      0|        if (b->comp_type == COMP_INTER_NONE) {
  ------------------
  |  Branch (1964:13): [True: 0, False: 0]
  ------------------
 1965|       |            // y
 1966|      0|            if (imin(bw4, bh4) > 1 &&
  ------------------
  |  Branch (1966:17): [True: 0, False: 0]
  ------------------
 1967|      0|                ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1967:19): [True: 0, False: 0]
  |  Branch (1967:48): [True: 0, False: 0]
  ------------------
 1968|      0|                 (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1968:19): [True: 0, False: 0]
  |  Branch (1968:48): [True: 0, False: 0]
  ------------------
 1969|      0|            {
 1970|      0|                affine_lowest_px_luma(t, &lowest_px[b->ref[0]][0], b_dim,
 1971|      0|                                      b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1971:39): [True: 0, False: 0]
  ------------------
 1972|      0|                                      &f->frame_hdr->gmv[b->ref[0]]);
 1973|      0|            } else {
 1974|      0|                mc_lowest_px(&lowest_px[b->ref[0]][0], t->by, bh4, b->mv[0].y,
 1975|      0|                             0, &f->svc[b->ref[0]][1]);
 1976|      0|                if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1976:21): [True: 0, False: 0]
  ------------------
 1977|      0|                    obmc_lowest_px(t, lowest_px, 0, b_dim, bx4, by4, w4, h4);
 1978|      0|                }
 1979|      0|            }
 1980|       |
 1981|       |            // uv
 1982|      0|            if (has_chroma) {
  ------------------
  |  Branch (1982:17): [True: 0, False: 0]
  ------------------
 1983|       |                // sub8x8 derivation
 1984|      0|                int is_sub8x8 = bw4 == ss_hor || bh4 == ss_ver;
  ------------------
  |  Branch (1984:33): [True: 0, False: 0]
  |  Branch (1984:50): [True: 0, False: 0]
  ------------------
 1985|      0|                refmvs_block *const *r;
 1986|      0|                if (is_sub8x8) {
  ------------------
  |  Branch (1986:21): [True: 0, False: 0]
  ------------------
 1987|      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]
  |  |  ------------------
  ------------------
 1988|      0|                    r = &t->rt.r[(t->by & 31) + 5];
 1989|      0|                    if (bw4 == 1) is_sub8x8 &= r[0][t->bx - 1].ref.ref[0] > 0;
  ------------------
  |  Branch (1989:25): [True: 0, False: 0]
  ------------------
 1990|      0|                    if (bh4 == ss_ver) is_sub8x8 &= r[-1][t->bx].ref.ref[0] > 0;
  ------------------
  |  Branch (1990:25): [True: 0, False: 0]
  ------------------
 1991|      0|                    if (bw4 == 1 && bh4 == ss_ver)
  ------------------
  |  Branch (1991:25): [True: 0, False: 0]
  |  Branch (1991:37): [True: 0, False: 0]
  ------------------
 1992|      0|                        is_sub8x8 &= r[-1][t->bx - 1].ref.ref[0] > 0;
 1993|      0|                }
 1994|       |
 1995|       |                // chroma prediction
 1996|      0|                if (is_sub8x8) {
  ------------------
  |  Branch (1996:21): [True: 0, False: 0]
  ------------------
 1997|      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]
  |  |  ------------------
  ------------------
 1998|      0|                    if (bw4 == 1 && bh4 == ss_ver) {
  ------------------
  |  Branch (1998:25): [True: 0, False: 0]
  |  Branch (1998:37): [True: 0, False: 0]
  ------------------
 1999|      0|                        const refmvs_block *const rr = &r[-1][t->bx - 1];
 2000|      0|                        mc_lowest_px(&lowest_px[rr->ref.ref[0] - 1][1],
 2001|      0|                                     t->by - 1, bh4, rr->mv.mv[0].y, ss_ver,
 2002|      0|                                     &f->svc[rr->ref.ref[0] - 1][1]);
 2003|      0|                    }
 2004|      0|                    if (bw4 == 1) {
  ------------------
  |  Branch (2004:25): [True: 0, False: 0]
  ------------------
 2005|      0|                        const refmvs_block *const rr = &r[0][t->bx - 1];
 2006|      0|                        mc_lowest_px(&lowest_px[rr->ref.ref[0] - 1][1],
 2007|      0|                                     t->by, bh4, rr->mv.mv[0].y, ss_ver,
 2008|      0|                                     &f->svc[rr->ref.ref[0] - 1][1]);
 2009|      0|                    }
 2010|      0|                    if (bh4 == ss_ver) {
  ------------------
  |  Branch (2010:25): [True: 0, False: 0]
  ------------------
 2011|      0|                        const refmvs_block *const rr = &r[-1][t->bx];
 2012|      0|                        mc_lowest_px(&lowest_px[rr->ref.ref[0] - 1][1],
 2013|      0|                                     t->by - 1, bh4, rr->mv.mv[0].y, ss_ver,
 2014|      0|                                     &f->svc[rr->ref.ref[0] - 1][1]);
 2015|      0|                    }
 2016|      0|                    mc_lowest_px(&lowest_px[b->ref[0]][1], t->by, bh4,
 2017|      0|                                 b->mv[0].y, ss_ver, &f->svc[b->ref[0]][1]);
 2018|      0|                } else {
 2019|      0|                    if (imin(cbw4, cbh4) > 1 &&
  ------------------
  |  Branch (2019:25): [True: 0, False: 0]
  ------------------
 2020|      0|                        ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (2020:27): [True: 0, False: 0]
  |  Branch (2020:56): [True: 0, False: 0]
  ------------------
 2021|      0|                         (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (2021:27): [True: 0, False: 0]
  |  Branch (2021:56): [True: 0, False: 0]
  ------------------
 2022|      0|                    {
 2023|      0|                        affine_lowest_px_chroma(t, &lowest_px[b->ref[0]][1], b_dim,
 2024|      0|                                                b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (2024:49): [True: 0, False: 0]
  ------------------
 2025|      0|                                                &f->frame_hdr->gmv[b->ref[0]]);
 2026|      0|                    } else {
 2027|      0|                        mc_lowest_px(&lowest_px[b->ref[0]][1],
 2028|      0|                                     t->by & ~ss_ver, bh4 << (bh4 == ss_ver),
 2029|      0|                                     b->mv[0].y, ss_ver, &f->svc[b->ref[0]][1]);
 2030|      0|                        if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (2030:29): [True: 0, False: 0]
  ------------------
 2031|      0|                            obmc_lowest_px(t, lowest_px, 1, b_dim, bx4, by4, w4, h4);
 2032|      0|                        }
 2033|      0|                    }
 2034|      0|                }
 2035|      0|            }
 2036|      0|        } else {
 2037|       |            // y
 2038|      0|            for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (2038:29): [True: 0, False: 0]
  ------------------
 2039|      0|                if (b->inter_mode == GLOBALMV_GLOBALMV && f->gmv_warp_allowed[b->ref[i]]) {
  ------------------
  |  Branch (2039:21): [True: 0, False: 0]
  |  Branch (2039:59): [True: 0, False: 0]
  ------------------
 2040|      0|                    affine_lowest_px_luma(t, &lowest_px[b->ref[i]][0], b_dim,
 2041|      0|                                          &f->frame_hdr->gmv[b->ref[i]]);
 2042|      0|                } else {
 2043|      0|                    mc_lowest_px(&lowest_px[b->ref[i]][0], t->by, bh4,
 2044|      0|                                 b->mv[i].y, 0, &f->svc[b->ref[i]][1]);
 2045|      0|                }
 2046|      0|            }
 2047|       |
 2048|       |            // uv
 2049|      0|            if (has_chroma) for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (2049:17): [True: 0, False: 0]
  |  Branch (2049:45): [True: 0, False: 0]
  ------------------
 2050|      0|                if (b->inter_mode == GLOBALMV_GLOBALMV &&
  ------------------
  |  Branch (2050:21): [True: 0, False: 0]
  ------------------
 2051|      0|                    imin(cbw4, cbh4) > 1 && f->gmv_warp_allowed[b->ref[i]])
  ------------------
  |  Branch (2051:21): [True: 0, False: 0]
  |  Branch (2051:45): [True: 0, False: 0]
  ------------------
 2052|      0|                {
 2053|      0|                    affine_lowest_px_chroma(t, &lowest_px[b->ref[i]][1], b_dim,
 2054|      0|                                            &f->frame_hdr->gmv[b->ref[i]]);
 2055|      0|                } else {
 2056|      0|                    mc_lowest_px(&lowest_px[b->ref[i]][1], t->by, bh4,
 2057|      0|                                 b->mv[i].y, ss_ver, &f->svc[b->ref[i]][1]);
 2058|      0|                }
 2059|      0|            }
 2060|      0|        }
 2061|      0|    }
 2062|       |
 2063|  2.39M|    return 0;
 2064|  2.39M|}
decode.c:get_prev_frame_segid:
  499|  3.75k|{
  500|  3.75k|    assert(f->frame_hdr->primary_ref_frame != DAV1D_PRIMARY_REF_NONE);
  ------------------
  |  |  140|  3.75k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.75k]
  |  |  |  Branch (140:68): [Folded, False: 3.75k]
  |  |  ------------------
  ------------------
  501|       |
  502|  3.75k|    unsigned seg_id = 8;
  503|  3.75k|    ref_seg_map += by * stride + bx;
  504|  7.27k|    do {
  505|  38.8k|        for (int x = 0; x < w4; x++)
  ------------------
  |  Branch (505:25): [True: 31.6k, False: 7.27k]
  ------------------
  506|  31.6k|            seg_id = imin(seg_id, ref_seg_map[x]);
  507|  7.27k|        ref_seg_map += stride;
  508|  7.27k|    } while (--h4 > 0 && seg_id);
  ------------------
  |  Branch (508:14): [True: 5.01k, False: 2.26k]
  |  Branch (508:26): [True: 3.52k, False: 1.49k]
  ------------------
  509|  3.75k|    assert(seg_id < 8);
  ------------------
  |  |  140|  3.75k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.75k]
  |  |  |  Branch (140:68): [Folded, False: 3.75k]
  |  |  ------------------
  ------------------
  510|       |
  511|  3.75k|    return seg_id;
  512|  3.75k|}
decode.c:neg_deinterleave:
  169|   584k|static int neg_deinterleave(int diff, int ref, int max) {
  170|   584k|    if (!ref) return diff;
  ------------------
  |  Branch (170:9): [True: 129k, False: 455k]
  ------------------
  171|   455k|    if (ref >= (max - 1)) return max - diff - 1;
  ------------------
  |  Branch (171:9): [True: 29.6k, False: 425k]
  ------------------
  172|   425k|    if (2 * ref < max) {
  ------------------
  |  Branch (172:9): [True: 246k, False: 178k]
  ------------------
  173|   246k|        if (diff <= 2 * ref) {
  ------------------
  |  Branch (173:13): [True: 207k, False: 39.7k]
  ------------------
  174|   207k|            if (diff & 1)
  ------------------
  |  Branch (174:17): [True: 31.2k, False: 175k]
  ------------------
  175|  31.2k|                return ref + ((diff + 1) >> 1);
  176|   175k|            else
  177|   175k|                return ref - (diff >> 1);
  178|   207k|        }
  179|  39.7k|        return diff;
  180|   246k|    } else {
  181|   178k|        if (diff <= 2 * (max - ref - 1)) {
  ------------------
  |  Branch (181:13): [True: 155k, False: 23.8k]
  ------------------
  182|   155k|            if (diff & 1)
  ------------------
  |  Branch (182:17): [True: 24.6k, False: 130k]
  ------------------
  183|  24.6k|                return ref + ((diff + 1) >> 1);
  184|   130k|            else
  185|   130k|                return ref - (diff >> 1);
  186|   155k|        }
  187|  23.8k|        return max - (diff + 1);
  188|   178k|    }
  189|   425k|}
decode.c:read_pal_indices:
  419|  20.0k|{
  420|  20.0k|    Dav1dTileState *const ts = t->ts;
  421|  20.0k|    const ptrdiff_t stride = bw4 * 4;
  422|  20.0k|    assert(pal_idx);
  ------------------
  |  |  140|  20.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 20.0k]
  |  |  |  Branch (140:68): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  423|  20.0k|    uint8_t *const pal_tmp = t->scratch.pal_idx_uv;
  424|  20.0k|    pal_tmp[0] = dav1d_msac_decode_uniform(&ts->msac, pal_sz);
  425|  20.0k|    uint16_t (*const color_map_cdf)[8] =
  426|  20.0k|        ts->cdf.m.color_map[pl][pal_sz - 2];
  427|  20.0k|    uint8_t (*const order)[8] = t->scratch.pal_order;
  428|  20.0k|    uint8_t *const ctx = t->scratch.pal_ctx;
  429|   532k|    for (int i = 1; i < 4 * (w4 + h4) - 1; i++) {
  ------------------
  |  Branch (429:21): [True: 511k, False: 20.0k]
  ------------------
  430|       |        // top/left-to-bottom/right diagonals ("wave-front")
  431|   511k|        const int first = imin(i, w4 * 4 - 1);
  432|   511k|        const int last = imax(0, i - h4 * 4 + 1);
  433|   511k|        order_palette(pal_tmp, stride, i, first, last, order, ctx);
  434|  4.80M|        for (int j = first, m = 0; j >= last; j--, m++) {
  ------------------
  |  Branch (434:36): [True: 4.29M, False: 511k]
  ------------------
  435|  4.29M|            const int color_idx = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  4.29M|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  436|  4.29M|                                      color_map_cdf[ctx[m]], pal_sz - 1);
  437|  4.29M|            pal_tmp[(i - j) * stride + j] = order[m][color_idx];
  438|  4.29M|        }
  439|   511k|    }
  440|       |
  441|  20.0k|    t->c->pal_dsp.pal_idx_finish(pal_idx, pal_tmp, bw4 * 4, bh4 * 4,
  442|  20.0k|                                 w4 * 4, h4 * 4);
  443|  20.0k|}
decode.c:order_palette:
  356|   511k|{
  357|   511k|    int have_top = i > first;
  358|       |
  359|   511k|    assert(pal_idx);
  ------------------
  |  |  140|   511k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 511k]
  |  |  |  Branch (140:68): [Folded, False: 511k]
  |  |  ------------------
  ------------------
  360|   511k|    pal_idx += first + (i - first) * stride;
  361|  4.80M|    for (int j = first, n = 0; j >= last; have_top = 1, j--, n++, pal_idx += stride - 1) {
  ------------------
  |  Branch (361:32): [True: 4.29M, False: 511k]
  ------------------
  362|  4.29M|        const int have_left = j > 0;
  363|       |
  364|  4.29M|        assert(have_left || have_top);
  ------------------
  |  |  140|  4.52M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 4.06M, False: 228k]
  |  |  |  Branch (140:30): [True: 228k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 4.29M]
  |  |  ------------------
  ------------------
  365|       |
  366|  4.29M|#define add(v_in) do { \
  367|  4.29M|        const int v = v_in; \
  368|  4.29M|        assert((unsigned)v < 8U); \
  369|  4.29M|        order[n][o_idx++] = v; \
  370|  4.29M|        mask |= 1 << v; \
  371|  4.29M|    } while (0)
  372|       |
  373|  4.29M|        unsigned mask = 0;
  374|  4.29M|        int o_idx = 0;
  375|  4.29M|        if (!have_left) {
  ------------------
  |  Branch (375:13): [True: 228k, False: 4.06M]
  ------------------
  376|   228k|            ctx[n] = 0;
  377|   228k|            add(pal_idx[-stride]);
  ------------------
  |  |  366|   228k|#define add(v_in) do { \
  |  |  367|   228k|        const int v = v_in; \
  |  |  368|   228k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   228k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 228k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 228k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   228k|        order[n][o_idx++] = v; \
  |  |  370|   228k|        mask |= 1 << v; \
  |  |  371|   228k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 228k]
  |  |  ------------------
  ------------------
  378|  4.06M|        } else if (!have_top) {
  ------------------
  |  Branch (378:20): [True: 283k, False: 3.78M]
  ------------------
  379|   283k|            ctx[n] = 0;
  380|   283k|            add(pal_idx[-1]);
  ------------------
  |  |  366|   283k|#define add(v_in) do { \
  |  |  367|   283k|        const int v = v_in; \
  |  |  368|   283k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   283k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 283k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 283k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   283k|        order[n][o_idx++] = v; \
  |  |  370|   283k|        mask |= 1 << v; \
  |  |  371|   283k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 283k]
  |  |  ------------------
  ------------------
  381|  3.78M|        } else {
  382|  3.78M|            const int l = pal_idx[-1], t = pal_idx[-stride], tl = pal_idx[-(stride + 1)];
  383|  3.78M|            const int same_t_l = t == l;
  384|  3.78M|            const int same_t_tl = t == tl;
  385|  3.78M|            const int same_l_tl = l == tl;
  386|  3.78M|            const int same_all = same_t_l & same_t_tl & same_l_tl;
  387|       |
  388|  3.78M|            if (same_all) {
  ------------------
  |  Branch (388:17): [True: 2.11M, False: 1.67M]
  ------------------
  389|  2.11M|                ctx[n] = 4;
  390|  2.11M|                add(t);
  ------------------
  |  |  366|  2.11M|#define add(v_in) do { \
  |  |  367|  2.11M|        const int v = v_in; \
  |  |  368|  2.11M|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|  2.11M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 2.11M]
  |  |  |  |  |  Branch (140:68): [Folded, False: 2.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|  2.11M|        order[n][o_idx++] = v; \
  |  |  370|  2.11M|        mask |= 1 << v; \
  |  |  371|  2.11M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 2.11M]
  |  |  ------------------
  ------------------
  391|  2.11M|            } else if (same_t_l) {
  ------------------
  |  Branch (391:24): [True: 122k, False: 1.54M]
  ------------------
  392|   122k|                ctx[n] = 3;
  393|   122k|                add(t);
  ------------------
  |  |  366|   122k|#define add(v_in) do { \
  |  |  367|   122k|        const int v = v_in; \
  |  |  368|   122k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   122k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 122k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 122k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   122k|        order[n][o_idx++] = v; \
  |  |  370|   122k|        mask |= 1 << v; \
  |  |  371|   122k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 122k]
  |  |  ------------------
  ------------------
  394|   122k|                add(tl);
  ------------------
  |  |  366|   122k|#define add(v_in) do { \
  |  |  367|   122k|        const int v = v_in; \
  |  |  368|   122k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   122k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 122k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 122k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   122k|        order[n][o_idx++] = v; \
  |  |  370|   122k|        mask |= 1 << v; \
  |  |  371|   122k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 122k]
  |  |  ------------------
  ------------------
  395|  1.54M|            } else if (same_t_tl | same_l_tl) {
  ------------------
  |  Branch (395:24): [True: 1.24M, False: 307k]
  ------------------
  396|  1.24M|                ctx[n] = 2;
  397|  1.24M|                add(tl);
  ------------------
  |  |  366|  1.24M|#define add(v_in) do { \
  |  |  367|  1.24M|        const int v = v_in; \
  |  |  368|  1.24M|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|  1.24M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 1.24M]
  |  |  |  |  |  Branch (140:68): [Folded, False: 1.24M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|  1.24M|        order[n][o_idx++] = v; \
  |  |  370|  1.24M|        mask |= 1 << v; \
  |  |  371|  1.24M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 1.24M]
  |  |  ------------------
  ------------------
  398|  1.24M|                add(same_t_tl ? l : t);
  ------------------
  |  |  366|  1.24M|#define add(v_in) do { \
  |  |  367|  2.48M|        const int v = v_in; \
  |  |  ------------------
  |  |  |  Branch (367:23): [True: 621k, False: 620k]
  |  |  ------------------
  |  |  368|  1.24M|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|  1.24M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 1.24M]
  |  |  |  |  |  Branch (140:68): [Folded, False: 1.24M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|  1.24M|        order[n][o_idx++] = v; \
  |  |  370|  1.24M|        mask |= 1 << v; \
  |  |  371|  1.24M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 1.24M]
  |  |  ------------------
  ------------------
  399|  1.24M|            } else {
  400|   307k|                ctx[n] = 1;
  401|   307k|                add(imin(t, l));
  ------------------
  |  |  366|   307k|#define add(v_in) do { \
  |  |  367|   307k|        const int v = v_in; \
  |  |  368|   307k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   307k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 307k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 307k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   307k|        order[n][o_idx++] = v; \
  |  |  370|   307k|        mask |= 1 << v; \
  |  |  371|   307k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 307k]
  |  |  ------------------
  ------------------
  402|   307k|                add(imax(t, l));
  ------------------
  |  |  366|   307k|#define add(v_in) do { \
  |  |  367|   307k|        const int v = v_in; \
  |  |  368|   307k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   307k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 307k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 307k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   307k|        order[n][o_idx++] = v; \
  |  |  370|   307k|        mask |= 1 << v; \
  |  |  371|   307k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 307k]
  |  |  ------------------
  ------------------
  403|   307k|                add(tl);
  ------------------
  |  |  366|   307k|#define add(v_in) do { \
  |  |  367|   307k|        const int v = v_in; \
  |  |  368|   307k|        assert((unsigned)v < 8U); \
  |  |  ------------------
  |  |  |  |  140|   307k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:28): [True: 0, False: 307k]
  |  |  |  |  |  Branch (140:68): [Folded, False: 307k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  369|   307k|        order[n][o_idx++] = v; \
  |  |  370|   307k|        mask |= 1 << v; \
  |  |  371|   307k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (371:14): [Folded, False: 307k]
  |  |  ------------------
  ------------------
  404|   307k|            }
  405|  3.78M|        }
  406|  38.6M|        for (unsigned m = 1, bit = 0; m < 0x100; m <<= 1, bit++)
  ------------------
  |  Branch (406:39): [True: 34.3M, False: 4.29M]
  ------------------
  407|  34.3M|            if (!(mask & m))
  ------------------
  |  Branch (407:17): [True: 28.1M, False: 6.27M]
  ------------------
  408|  28.1M|                order[n][o_idx++] = bit;
  409|  4.29M|        assert(o_idx == 8);
  ------------------
  |  |  140|  4.29M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.29M]
  |  |  |  Branch (140:68): [Folded, False: 4.29M]
  |  |  ------------------
  ------------------
  410|  4.29M|#undef add
  411|  4.29M|    }
  412|   511k|}
decode.c:splat_intraref:
  566|   247k|{
  567|   247k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  568|   247k|        .ref.ref = { 0, -1 },
  569|   247k|        .mv.mv[0].n = INVALID_MV,
  ------------------
  |  |   40|   247k|#define INVALID_MV 0x80008000
  ------------------
  570|   247k|        .bs = bs,
  571|   247k|        .mf = 0,
  572|   247k|    };
  573|   247k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  574|   247k|}
decode.c:read_mv_residual:
  109|   236k|{
  110|   236k|    MsacContext *const msac = &ts->msac;
  111|   236k|    const enum MVJoint mv_joint =
  112|   236k|        dav1d_msac_decode_symbol_adapt4(msac, ts->cdf.mv.joint, N_MV_JOINTS - 1);
  ------------------
  |  |   47|   236k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  113|   236k|    if (mv_joint & MV_JOINT_V)
  ------------------
  |  Branch (113:9): [True: 206k, False: 29.6k]
  ------------------
  114|   206k|        ref_mv->y += read_mv_component_diff(msac, &ts->cdf.mv.comp[0], mv_prec);
  115|   236k|    if (mv_joint & MV_JOINT_H)
  ------------------
  |  Branch (115:9): [True: 204k, False: 32.2k]
  ------------------
  116|   204k|        ref_mv->x += read_mv_component_diff(msac, &ts->cdf.mv.comp[1], mv_prec);
  117|   236k|}
decode.c:read_mv_component_diff:
   79|   411k|{
   80|   411k|    const int sign = dav1d_msac_decode_bool_adapt(msac, mv_comp->sign);
  ------------------
  |  |   52|   411k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   81|   411k|    const int cl = dav1d_msac_decode_symbol_adapt16(msac, mv_comp->classes, 10);
  ------------------
  |  |   57|   411k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
   82|   411k|    int up, fp = 3, hp = 1;
   83|       |
   84|   411k|    if (!cl) {
  ------------------
  |  Branch (84:9): [True: 94.2k, False: 317k]
  ------------------
   85|  94.2k|        up = dav1d_msac_decode_bool_adapt(msac, mv_comp->class0);
  ------------------
  |  |   52|  94.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   86|  94.2k|        if (mv_prec >= 0) {  // !force_integer_mv
  ------------------
  |  Branch (86:13): [True: 30.7k, False: 63.4k]
  ------------------
   87|  30.7k|            fp = dav1d_msac_decode_symbol_adapt4(msac, mv_comp->class0_fp[up], 3);
  ------------------
  |  |   47|  30.7k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
   88|  30.7k|            if (mv_prec > 0) // allow_high_precision_mv
  ------------------
  |  Branch (88:17): [True: 12.2k, False: 18.4k]
  ------------------
   89|  12.2k|                hp = dav1d_msac_decode_bool_adapt(msac, mv_comp->class0_hp);
  ------------------
  |  |   52|  12.2k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   90|  30.7k|        }
   91|   317k|    } else {
   92|   317k|        up = 1 << cl;
   93|  3.38M|        for (int n = 0; n < cl; n++)
  ------------------
  |  Branch (93:25): [True: 3.06M, False: 317k]
  ------------------
   94|  3.06M|            up |= dav1d_msac_decode_bool_adapt(msac, mv_comp->classN[n]) << n;
  ------------------
  |  |   52|  3.06M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   95|   317k|        if (mv_prec >= 0) {  // !force_integer_mv
  ------------------
  |  Branch (95:13): [True: 11.0k, False: 305k]
  ------------------
   96|  11.0k|            fp = dav1d_msac_decode_symbol_adapt4(msac, mv_comp->classN_fp, 3);
  ------------------
  |  |   47|  11.0k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
   97|  11.0k|            if (mv_prec > 0) // allow_high_precision_mv
  ------------------
  |  Branch (97:17): [True: 5.03k, False: 6.01k]
  ------------------
   98|  5.03k|                hp = dav1d_msac_decode_bool_adapt(msac, mv_comp->classN_hp);
  ------------------
  |  |   52|  5.03k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
   99|  11.0k|        }
  100|   317k|    }
  101|       |
  102|   411k|    const int diff = ((up << 3) | (fp << 1) | hp) + 1;
  103|       |
  104|   411k|    return sign ? -diff : diff;
  ------------------
  |  Branch (104:12): [True: 354k, False: 56.4k]
  ------------------
  105|   411k|}
decode.c:read_vartx_tree:
  448|   309k|{
  449|   309k|    const Dav1dFrameContext *const f = t->f;
  450|   309k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  451|   309k|    const int bw4 = b_dim[0], bh4 = b_dim[1];
  452|       |
  453|       |    // var-tx tree coding
  454|   309k|    uint16_t tx_split[2] = { 0 };
  455|   309k|    b->max_ytx = dav1d_max_txfm_size_for_bs[bs][0];
  456|   309k|    if (!b->skip && (f->frame_hdr->segmentation.lossless[b->seg_id] ||
  ------------------
  |  Branch (456:9): [True: 96.0k, False: 213k]
  |  Branch (456:22): [True: 1.30k, False: 94.7k]
  ------------------
  457|  94.7k|                     b->max_ytx == TX_4X4))
  ------------------
  |  Branch (457:22): [True: 6.51k, False: 88.1k]
  ------------------
  458|  7.81k|    {
  459|  7.81k|        b->max_ytx = b->uvtx = TX_4X4;
  460|  7.81k|        if (f->frame_hdr->txfm_mode == DAV1D_TX_SWITCHABLE) {
  ------------------
  |  Branch (460:13): [True: 2.79k, False: 5.01k]
  ------------------
  461|  2.79k|            dav1d_memset_pow2[b_dim[2]](&t->a->tx[bx4], TX_4X4);
  462|  2.79k|            dav1d_memset_pow2[b_dim[3]](&t->l.tx[by4], TX_4X4);
  463|  2.79k|        }
  464|   301k|    } else if (f->frame_hdr->txfm_mode != DAV1D_TX_SWITCHABLE || b->skip) {
  ------------------
  |  Branch (464:16): [True: 207k, False: 94.0k]
  |  Branch (464:66): [True: 61.1k, False: 32.8k]
  ------------------
  465|   268k|        if (f->frame_hdr->txfm_mode == DAV1D_TX_SWITCHABLE) {
  ------------------
  |  Branch (465:13): [True: 61.1k, False: 207k]
  ------------------
  466|  61.1k|            dav1d_memset_pow2[b_dim[2]](&t->a->tx[bx4], b_dim[2 + 0]);
  467|  61.1k|            dav1d_memset_pow2[b_dim[3]](&t->l.tx[by4], b_dim[2 + 1]);
  468|  61.1k|        }
  469|   268k|        b->uvtx = dav1d_max_txfm_size_for_bs[bs][f->cur.p.layout];
  470|   268k|    } else {
  471|  32.8k|        assert(bw4 <= 16 || bh4 <= 16 || b->max_ytx == TX_64X64);
  ------------------
  |  |  140|  66.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 32.5k, False: 307]
  |  |  |  Branch (140:30): [True: 89, False: 218]
  |  |  |  Branch (140:30): [True: 218, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 32.8k]
  |  |  ------------------
  ------------------
  472|  32.8k|        int y, x, y_off, x_off;
  473|  32.8k|        const TxfmInfo *const ytx = &dav1d_txfm_dimensions[b->max_ytx];
  474|  66.2k|        for (y = 0, y_off = 0; y < bh4; y += ytx->h, y_off++) {
  ------------------
  |  Branch (474:32): [True: 33.3k, False: 32.8k]
  ------------------
  475|  67.3k|            for (x = 0, x_off = 0; x < bw4; x += ytx->w, x_off++) {
  ------------------
  |  Branch (475:36): [True: 33.9k, False: 33.3k]
  ------------------
  476|  33.9k|                read_tx_tree(t, b->max_ytx, 0, tx_split, x_off, y_off);
  477|       |                // contexts are updated inside read_tx_tree()
  478|  33.9k|                t->bx += ytx->w;
  479|  33.9k|            }
  480|  33.3k|            t->bx -= x;
  481|  33.3k|            t->by += ytx->h;
  482|  33.3k|        }
  483|  32.8k|        t->by -= y;
  484|  32.8k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  32.8k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 32.8k]
  |  |  ------------------
  |  |   35|  32.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|  32.8k|        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|  32.8k|        b->uvtx = dav1d_max_txfm_size_for_bs[bs][f->cur.p.layout];
  488|  32.8k|    }
  489|   309k|    assert(!(tx_split[0] & ~0x33));
  ------------------
  |  |  140|   309k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 309k]
  |  |  |  Branch (140:68): [Folded, False: 309k]
  |  |  ------------------
  ------------------
  490|   309k|    b->tx_split0 = (uint8_t)tx_split[0];
  491|   309k|    b->tx_split1 = tx_split[1];
  492|   309k|}
decode.c:read_tx_tree:
  123|  68.3k|{
  124|  68.3k|    const Dav1dFrameContext *const f = t->f;
  125|  68.3k|    const int bx4 = t->bx & 31, by4 = t->by & 31;
  126|  68.3k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[from];
  127|  68.3k|    const int txw = t_dim->lw, txh = t_dim->lh;
  128|  68.3k|    int is_split;
  129|       |
  130|  68.3k|    if (depth < 2 && from > (int) TX_4X4) {
  ------------------
  |  Branch (130:9): [True: 56.5k, False: 11.8k]
  |  Branch (130:22): [True: 56.5k, False: 0]
  ------------------
  131|  56.5k|        const int cat = 2 * (TX_64X64 - t_dim->max) - depth;
  132|  56.5k|        const int a = t->a->tx[bx4] < txw;
  133|  56.5k|        const int l = t->l.tx[by4] < txh;
  134|       |
  135|  56.5k|        is_split = dav1d_msac_decode_bool_adapt(&t->ts->msac,
  ------------------
  |  |   52|  56.5k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  136|  56.5k|                       t->ts->cdf.m.txpart[cat][a + l]);
  137|  56.5k|        if (is_split)
  ------------------
  |  Branch (137:13): [True: 17.0k, False: 39.4k]
  ------------------
  138|  17.0k|            masks[depth] |= 1 << (y_off * 4 + x_off);
  139|  56.5k|    } else {
  140|  11.8k|        is_split = 0;
  141|  11.8k|    }
  142|       |
  143|  68.3k|    if (is_split && t_dim->max > TX_8X8) {
  ------------------
  |  Branch (143:9): [True: 17.0k, False: 51.3k]
  |  Branch (143:21): [True: 12.7k, False: 4.32k]
  ------------------
  144|  12.7k|        const enum RectTxfmSize sub = t_dim->sub;
  145|  12.7k|        const TxfmInfo *const sub_t_dim = &dav1d_txfm_dimensions[sub];
  146|  12.7k|        const int txsw = sub_t_dim->w, txsh = sub_t_dim->h;
  147|       |
  148|  12.7k|        read_tx_tree(t, sub, depth + 1, masks, x_off * 2 + 0, y_off * 2 + 0);
  149|  12.7k|        t->bx += txsw;
  150|  12.7k|        if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (150:13): [True: 9.85k, False: 2.86k]
  |  Branch (150:27): [True: 9.08k, False: 770]
  ------------------
  151|  9.08k|            read_tx_tree(t, sub, depth + 1, masks, x_off * 2 + 1, y_off * 2 + 0);
  152|  12.7k|        t->bx -= txsw;
  153|  12.7k|        t->by += txsh;
  154|  12.7k|        if (txh >= txw && t->by < f->bh) {
  ------------------
  |  Branch (154:13): [True: 8.61k, False: 4.10k]
  |  Branch (154:27): [True: 8.10k, False: 505]
  ------------------
  155|  8.10k|            read_tx_tree(t, sub, depth + 1, masks, x_off * 2 + 0, y_off * 2 + 1);
  156|  8.10k|            t->bx += txsw;
  157|  8.10k|            if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (157:17): [True: 5.27k, False: 2.83k]
  |  Branch (157:31): [True: 4.55k, False: 711]
  ------------------
  158|  4.55k|                read_tx_tree(t, sub, depth + 1, masks,
  159|  4.55k|                             x_off * 2 + 1, y_off * 2 + 1);
  160|  8.10k|            t->bx -= txsw;
  161|  8.10k|        }
  162|  12.7k|        t->by -= txsh;
  163|  55.6k|    } else {
  164|  55.6k|        dav1d_memset_pow2[t_dim->lw](&t->a->tx[bx4], is_split ? TX_4X4 : txw);
  ------------------
  |  Branch (164:54): [True: 4.32k, False: 51.3k]
  ------------------
  165|  55.6k|        dav1d_memset_pow2[t_dim->lh](&t->l.tx[by4], is_split ? TX_4X4 : txh);
  ------------------
  |  Branch (165:53): [True: 4.32k, False: 51.3k]
  ------------------
  166|  55.6k|    }
  167|  68.3k|}
decode.c:splat_intrabc_mv:
  535|   204k|{
  536|   204k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  537|   204k|        .ref.ref = { 0, -1 },
  538|   204k|        .mv.mv[0] = b->mv[0],
  539|   204k|        .bs = bs,
  540|   204k|        .mf = 0,
  541|   204k|    };
  542|   204k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  543|   204k|}
decode.c:findoddzero:
  339|  28.3k|static inline int findoddzero(const uint8_t *buf, int len) {
  340|  30.3k|    for (int n = 0; n < len; n++)
  ------------------
  |  Branch (340:21): [True: 29.4k, False: 943]
  ------------------
  341|  29.4k|        if (!buf[n * 2]) return 1;
  ------------------
  |  Branch (341:13): [True: 27.3k, False: 2.02k]
  ------------------
  342|    943|    return 0;
  343|  28.3k|}
decode.c:find_matching_ref:
  197|  27.3k|{
  198|  27.3k|    /*const*/ refmvs_block *const *r = &t->rt.r[(t->by & 31) + 5];
  199|  27.3k|    int count = 0;
  200|  27.3k|    int have_topleft = have_top && have_left;
  ------------------
  |  Branch (200:24): [True: 22.6k, False: 4.71k]
  |  Branch (200:36): [True: 19.4k, False: 3.21k]
  ------------------
  201|  27.3k|    int have_topright = imax(bw4, bh4) < 32 &&
  ------------------
  |  Branch (201:25): [True: 27.0k, False: 390]
  ------------------
  202|  27.0k|                        have_top && t->bx + bw4 < t->ts->tiling.col_end &&
  ------------------
  |  Branch (202:25): [True: 22.4k, False: 4.55k]
  |  Branch (202:37): [True: 19.4k, False: 3.01k]
  ------------------
  203|  19.4k|                        (intra_edge_flags & EDGE_I444_TOP_HAS_RIGHT);
  ------------------
  |  Branch (203:25): [True: 11.8k, False: 7.62k]
  ------------------
  204|       |
  205|  27.3k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  206|  27.3k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  207|       |
  208|  27.3k|    if (have_top) {
  ------------------
  |  Branch (208:9): [True: 22.6k, False: 4.71k]
  ------------------
  209|  22.6k|        const refmvs_block *r2 = &r[-1][t->bx];
  210|  22.6k|        if (matches(r2)) {
  ------------------
  |  |  206|  22.6k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 16.7k, False: 5.91k]
  |  |  |  Branch (206:53): [True: 15.2k, False: 1.48k]
  |  |  ------------------
  ------------------
  211|  15.2k|            masks[0] |= 1;
  212|  15.2k|            count = 1;
  213|  15.2k|        }
  214|  22.6k|        int aw4 = bs(r2)[0];
  ------------------
  |  |  205|  22.6k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  215|  22.6k|        if (aw4 >= bw4) {
  ------------------
  |  Branch (215:13): [True: 19.1k, False: 3.47k]
  ------------------
  216|  19.1k|            const int off = t->bx & (aw4 - 1);
  217|  19.1k|            if (off) have_topleft = 0;
  ------------------
  |  Branch (217:17): [True: 3.44k, False: 15.7k]
  ------------------
  218|  19.1k|            if (aw4 - off > bw4) have_topright = 0;
  ------------------
  |  Branch (218:17): [True: 3.90k, False: 15.2k]
  ------------------
  219|  19.1k|        } else {
  220|  3.47k|            unsigned mask = 1 << aw4;
  221|  7.84k|            for (int x = aw4; x < w4; x += aw4) {
  ------------------
  |  Branch (221:31): [True: 4.38k, False: 3.46k]
  ------------------
  222|  4.38k|                r2 += aw4;
  223|  4.38k|                if (matches(r2)) {
  ------------------
  |  |  206|  4.38k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 2.83k, False: 1.54k]
  |  |  |  Branch (206:53): [True: 2.64k, False: 188]
  |  |  ------------------
  ------------------
  224|  2.64k|                    masks[0] |= mask;
  225|  2.64k|                    if (++count >= 8) return;
  ------------------
  |  Branch (225:25): [True: 6, False: 2.64k]
  ------------------
  226|  2.64k|                }
  227|  4.37k|                aw4 = bs(r2)[0];
  ------------------
  |  |  205|  4.37k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  228|  4.37k|                mask <<= aw4;
  229|  4.37k|            }
  230|  3.47k|        }
  231|  22.6k|    }
  232|  27.3k|    if (have_left) {
  ------------------
  |  Branch (232:9): [True: 24.1k, False: 3.20k]
  ------------------
  233|  24.1k|        /*const*/ refmvs_block *const *r2 = r;
  234|  24.1k|        if (matches(&r2[0][t->bx - 1])) {
  ------------------
  |  |  206|  24.1k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 18.5k, False: 5.58k]
  |  |  |  Branch (206:53): [True: 17.0k, False: 1.58k]
  |  |  ------------------
  ------------------
  235|  17.0k|            masks[1] |= 1;
  236|  17.0k|            if (++count >= 8) return;
  ------------------
  |  Branch (236:17): [True: 5, False: 17.0k]
  ------------------
  237|  17.0k|        }
  238|  24.1k|        int lh4 = bs(&r2[0][t->bx - 1])[1];
  ------------------
  |  |  205|  24.1k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  239|  24.1k|        if (lh4 >= bh4) {
  ------------------
  |  Branch (239:13): [True: 20.3k, False: 3.80k]
  ------------------
  240|  20.3k|            if (t->by & (lh4 - 1)) have_topleft = 0;
  ------------------
  |  Branch (240:17): [True: 3.23k, False: 17.1k]
  ------------------
  241|  20.3k|        } else {
  242|  3.80k|            unsigned mask = 1 << lh4;
  243|  9.22k|            for (int y = lh4; y < h4; y += lh4) {
  ------------------
  |  Branch (243:31): [True: 5.44k, False: 3.78k]
  ------------------
  244|  5.44k|                r2 += lh4;
  245|  5.44k|                if (matches(&r2[0][t->bx - 1])) {
  ------------------
  |  |  206|  5.44k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 3.42k, False: 2.01k]
  |  |  |  Branch (206:53): [True: 3.19k, False: 226]
  |  |  ------------------
  ------------------
  246|  3.19k|                    masks[1] |= mask;
  247|  3.19k|                    if (++count >= 8) return;
  ------------------
  |  Branch (247:25): [True: 21, False: 3.17k]
  ------------------
  248|  3.19k|                }
  249|  5.42k|                lh4 = bs(&r2[0][t->bx - 1])[1];
  ------------------
  |  |  205|  5.42k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  250|  5.42k|                mask <<= lh4;
  251|  5.42k|            }
  252|  3.80k|        }
  253|  24.1k|    }
  254|  27.3k|    if (have_topleft && matches(&r[-1][t->bx - 1])) {
  ------------------
  |  |  206|  12.7k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 8.66k, False: 4.09k]
  |  |  |  Branch (206:53): [True: 7.86k, False: 797]
  |  |  ------------------
  ------------------
  |  Branch (254:9): [True: 12.7k, False: 14.6k]
  ------------------
  255|  7.86k|        masks[1] |= 1ULL << 32;
  256|  7.86k|        if (++count >= 8) return;
  ------------------
  |  Branch (256:13): [True: 24, False: 7.84k]
  ------------------
  257|  7.86k|    }
  258|  27.3k|    if (have_topright && matches(&r[-1][t->bx + bw4])) {
  ------------------
  |  |  206|  8.21k|#define matches(rp) ((rp)->ref.ref[0] == ref + 1 && (rp)->ref.ref[1] == -1)
  |  |  ------------------
  |  |  |  Branch (206:22): [True: 5.14k, False: 3.06k]
  |  |  |  Branch (206:53): [True: 4.67k, False: 471]
  |  |  ------------------
  ------------------
  |  Branch (258:9): [True: 8.21k, False: 19.1k]
  ------------------
  259|  4.67k|        masks[0] |= 1ULL << 32;
  260|  4.67k|    }
  261|  27.3k|#undef matches
  262|  27.3k|}
decode.c:derive_warpmv:
  268|  3.23k|{
  269|  3.23k|    int pts[8][2 /* in, out */][2 /* x, y */], np = 0;
  270|  3.23k|    /*const*/ refmvs_block *const *r = &t->rt.r[(t->by & 31) + 5];
  271|       |
  272|  3.23k|#define add_sample(dx, dy, sx, sy, rp) do { \
  273|  3.23k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  274|  3.23k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  275|  3.23k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  276|  3.23k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  277|  3.23k|    np++; \
  278|  3.23k|} while (0)
  279|       |
  280|       |    // use masks[] to find the projectable motion vectors in the edges
  281|  3.23k|    if ((unsigned) masks[0] == 1 && !(masks[1] >> 32)) {
  ------------------
  |  Branch (281:9): [True: 1.73k, False: 1.49k]
  |  Branch (281:37): [True: 859, False: 880]
  ------------------
  282|    859|        const int off = t->bx & (bs(&r[-1][t->bx])[0] - 1);
  ------------------
  |  |  205|    859|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  283|    859|        add_sample(-off, 0, 1, -1, &r[-1][t->bx]);
  ------------------
  |  |  272|    859|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|    859|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|    859|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|    859|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|    859|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|    859|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|    859|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|    859|    np++; \
  |  |  278|    859|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 859]
  |  |  ------------------
  ------------------
  284|  4.03k|    } else for (unsigned off = 0, xmask = (uint32_t) masks[0]; np < 8 && xmask;) { // top
  ------------------
  |  Branch (284:64): [True: 4.03k, False: 3]
  |  Branch (284:74): [True: 1.65k, False: 2.37k]
  ------------------
  285|  1.65k|        const int tz = ctz(xmask);
  286|  1.65k|        off += tz;
  287|  1.65k|        xmask >>= tz;
  288|  1.65k|        add_sample(off, 0, 1, -1, &r[-1][t->bx + off]);
  ------------------
  |  |  272|  1.65k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.65k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.65k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.65k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.65k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.65k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.65k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.65k|    np++; \
  |  |  278|  1.65k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.65k]
  |  |  ------------------
  ------------------
  289|  1.65k|        xmask &= ~1;
  290|  1.65k|    }
  291|  3.23k|    if (np < 8 && masks[1] == 1) {
  ------------------
  |  Branch (291:9): [True: 3.23k, False: 3]
  |  Branch (291:19): [True: 1.42k, False: 1.81k]
  ------------------
  292|  1.42k|        const int off = t->by & (bs(&r[0][t->bx - 1])[1] - 1);
  ------------------
  |  |  205|  1.42k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  ------------------
  293|  1.42k|        add_sample(0, -off, -1, 1, &r[-off][t->bx - 1]);
  ------------------
  |  |  272|  1.42k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.42k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.42k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.42k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.42k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.42k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.42k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.42k|    np++; \
  |  |  278|  1.42k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.42k]
  |  |  ------------------
  ------------------
  294|  3.43k|    } else for (unsigned off = 0, ymask = (uint32_t) masks[1]; np < 8 && ymask;) { // left
  ------------------
  |  Branch (294:64): [True: 3.43k, False: 8]
  |  Branch (294:74): [True: 1.62k, False: 1.80k]
  ------------------
  295|  1.62k|        const int tz = ctz(ymask);
  296|  1.62k|        off += tz;
  297|  1.62k|        ymask >>= tz;
  298|  1.62k|        add_sample(0, off, -1, 1, &r[off][t->bx - 1]);
  ------------------
  |  |  272|  1.62k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.62k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.62k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.62k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.62k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.62k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.62k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.62k|    np++; \
  |  |  278|  1.62k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.62k]
  |  |  ------------------
  ------------------
  299|  1.62k|        ymask &= ~1;
  300|  1.62k|    }
  301|  3.23k|    if (np < 8 && masks[1] >> 32) // top/left
  ------------------
  |  Branch (301:9): [True: 3.22k, False: 10]
  |  Branch (301:19): [True: 1.24k, False: 1.98k]
  ------------------
  302|  1.24k|        add_sample(0, 0, -1, -1, &r[-1][t->bx - 1]);
  ------------------
  |  |  272|  1.24k|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|  1.24k|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.24k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|  1.24k|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|  1.24k|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|  1.24k|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|  1.24k|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|  1.24k|    np++; \
  |  |  278|  1.24k|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 1.24k]
  |  |  ------------------
  ------------------
  303|  3.23k|    if (np < 8 && masks[0] >> 32) // top/right
  ------------------
  |  Branch (303:9): [True: 3.22k, False: 12]
  |  Branch (303:19): [True: 983, False: 2.24k]
  ------------------
  304|    983|        add_sample(bw4, 0, 1, -1, &r[-1][t->bx + bw4]);
  ------------------
  |  |  272|    983|#define add_sample(dx, dy, sx, sy, rp) do { \
  |  |  273|    983|    pts[np][0][0] = 16 * (2 * dx + sx * bs(rp)[0]) - 8; \
  |  |  ------------------
  |  |  |  |  205|    983|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  274|    983|    pts[np][0][1] = 16 * (2 * dy + sy * bs(rp)[1]) - 8; \
  |  |  ------------------
  |  |  |  |  205|    983|#define bs(rp) dav1d_block_dimensions[(rp)->bs]
  |  |  ------------------
  |  |  275|    983|    pts[np][1][0] = pts[np][0][0] + (rp)->mv.mv[0].x; \
  |  |  276|    983|    pts[np][1][1] = pts[np][0][1] + (rp)->mv.mv[0].y; \
  |  |  277|    983|    np++; \
  |  |  278|    983|} while (0)
  |  |  ------------------
  |  |  |  Branch (278:10): [Folded, False: 983]
  |  |  ------------------
  ------------------
  305|  3.23k|    assert(np > 0 && np <= 8);
  ------------------
  |  |  140|  6.47k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 3.23k, False: 0]
  |  |  |  Branch (140:30): [True: 3.23k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 3.23k]
  |  |  ------------------
  ------------------
  306|  3.23k|#undef bs
  307|       |
  308|       |    // select according to motion vector difference against a threshold
  309|  3.23k|    int mvd[8], ret = 0;
  310|  3.23k|    const int thresh = 4 * iclip(imax(bw4, bh4), 4, 28);
  311|  11.0k|    for (int i = 0; i < np; i++) {
  ------------------
  |  Branch (311:21): [True: 7.78k, False: 3.23k]
  ------------------
  312|  7.78k|        mvd[i] = abs(pts[i][1][0] - pts[i][0][0] - mv.x) +
  313|  7.78k|                 abs(pts[i][1][1] - pts[i][0][1] - mv.y);
  314|  7.78k|        if (mvd[i] > thresh)
  ------------------
  |  Branch (314:13): [True: 2.50k, False: 5.28k]
  ------------------
  315|  2.50k|            mvd[i] = -1;
  316|  5.28k|        else
  317|  5.28k|            ret++;
  318|  7.78k|    }
  319|  3.23k|    if (!ret) {
  ------------------
  |  Branch (319:9): [True: 684, False: 2.55k]
  ------------------
  320|    684|        ret = 1;
  321|  3.04k|    } else for (int i = 0, j = np - 1, k = 0; k < np - ret; k++, i++, j--) {
  ------------------
  |  Branch (321:47): [True: 950, False: 2.09k]
  ------------------
  322|  1.51k|        while (mvd[i] != -1) i++;
  ------------------
  |  Branch (322:16): [True: 565, False: 950]
  ------------------
  323|  1.68k|        while (mvd[j] == -1) j--;
  ------------------
  |  Branch (323:16): [True: 732, False: 950]
  ------------------
  324|    950|        assert(i != j);
  ------------------
  |  |  140|    950|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 950]
  |  |  |  Branch (140:68): [Folded, False: 950]
  |  |  ------------------
  ------------------
  325|    950|        if (i > j) break;
  ------------------
  |  Branch (325:13): [True: 455, False: 495]
  ------------------
  326|       |        // replace the discarded samples;
  327|    495|        mvd[i] = mvd[j];
  328|    495|        memcpy(pts[i], pts[j], sizeof(*pts));
  329|    495|    }
  330|       |
  331|  3.23k|    if (!dav1d_find_affine_int(pts, ret, bw4, bh4, mv, wmp, t->bx, t->by) &&
  ------------------
  |  Branch (331:9): [True: 3.03k, False: 207]
  ------------------
  332|  3.03k|        !dav1d_get_shear_params(wmp))
  ------------------
  |  Branch (332:9): [True: 2.81k, False: 221]
  ------------------
  333|  2.81k|    {
  334|  2.81k|        wmp->type = DAV1D_WM_TYPE_AFFINE;
  335|  2.81k|    } else
  336|    428|        wmp->type = DAV1D_WM_TYPE_IDENTITY;
  337|  3.23k|}
decode.c:splat_tworef_mv:
  550|  19.8k|{
  551|  19.8k|    assert(bw4 >= 2 && bh4 >= 2);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  552|  19.8k|    const enum CompInterPredMode mode = b->inter_mode;
  553|  19.8k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  554|  19.8k|        .ref.ref = { b->ref[0] + 1, b->ref[1] + 1 },
  555|  19.8k|        .mv.mv = { b->mv[0], b->mv[1] },
  556|  19.8k|        .bs = bs,
  557|  19.8k|        .mf = (mode == GLOBALMV_GLOBALMV) | !!((1 << mode) & (0xbc)) * 2,
  558|  19.8k|    };
  559|  19.8k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  560|  19.8k|}
decode.c:splat_oneref_mv:
  519|  84.7k|{
  520|  84.7k|    const enum InterPredMode mode = b->inter_mode;
  521|  84.7k|    const refmvs_block ALIGN(tmpl, 16) = (refmvs_block) {
  522|  84.7k|        .ref.ref = { b->ref[0] + 1, b->interintra_type ? 0 : -1 },
  ------------------
  |  Branch (522:37): [True: 4.67k, False: 80.0k]
  ------------------
  523|  84.7k|        .mv.mv[0] = b->mv[0],
  524|  84.7k|        .bs = bs,
  525|  84.7k|        .mf = (mode == GLOBALMV && imin(bw4, bh4) >= 2) | ((mode == NEWMV) * 2),
  ------------------
  |  Branch (525:16): [True: 28.0k, False: 56.6k]
  |  Branch (525:36): [True: 17.7k, False: 10.3k]
  ------------------
  526|  84.7k|    };
  527|  84.7k|    c->refmvs_dsp.splat_mv(&t->rt.r[(t->by & 31) + 5], &tmpl, t->bx, bw4, bh4);
  528|  84.7k|}
decode.c:read_restoration_info:
 2516|  68.0k|{
 2517|  68.0k|    const Dav1dFrameContext *const f = t->f;
 2518|  68.0k|    Dav1dTileState *const ts = t->ts;
 2519|  68.0k|    const Av1RestorationUnit *const lr_ref = ts->lr_ref[p];
 2520|       |
 2521|  68.0k|    if (frame_type == DAV1D_RESTORATION_SWITCHABLE) {
  ------------------
  |  Branch (2521:9): [True: 15.3k, False: 52.6k]
  ------------------
 2522|  15.3k|        const int filter = dav1d_msac_decode_symbol_adapt4(&ts->msac,
  ------------------
  |  |   47|  15.3k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
 2523|  15.3k|                               ts->cdf.m.restore_switchable, 2);
 2524|  15.3k|        lr->type = filter + !!filter; /* NONE/WIENER/SGRPROJ */
 2525|  52.6k|    } else {
 2526|  52.6k|        const unsigned type =
 2527|  52.6k|            dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  52.6k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
 2528|  52.6k|                frame_type == DAV1D_RESTORATION_WIENER ?
  ------------------
  |  Branch (2528:17): [True: 23.3k, False: 29.3k]
  ------------------
 2529|  29.3k|                ts->cdf.m.restore_wiener : ts->cdf.m.restore_sgrproj);
 2530|  52.6k|        lr->type = type ? frame_type : DAV1D_RESTORATION_NONE;
  ------------------
  |  Branch (2530:20): [True: 24.6k, False: 28.0k]
  ------------------
 2531|  52.6k|    }
 2532|       |
 2533|  68.0k|    if (lr->type == DAV1D_RESTORATION_WIENER) {
  ------------------
  |  Branch (2533:9): [True: 15.4k, False: 52.5k]
  ------------------
 2534|  15.4k|        lr->filter_v[0] = p ? 0 :
  ------------------
  |  Branch (2534:27): [True: 9.69k, False: 5.74k]
  ------------------
 2535|  15.4k|            dav1d_msac_decode_subexp(&ts->msac,
 2536|  5.74k|                lr_ref->filter_v[0] + 5, 16, 1) - 5;
 2537|  15.4k|        lr->filter_v[1] =
 2538|  15.4k|            dav1d_msac_decode_subexp(&ts->msac,
 2539|  15.4k|                lr_ref->filter_v[1] + 23, 32, 2) - 23;
 2540|  15.4k|        lr->filter_v[2] =
 2541|  15.4k|            dav1d_msac_decode_subexp(&ts->msac,
 2542|  15.4k|                lr_ref->filter_v[2] + 17, 64, 3) - 17;
 2543|       |
 2544|  15.4k|        lr->filter_h[0] = p ? 0 :
  ------------------
  |  Branch (2544:27): [True: 9.69k, False: 5.74k]
  ------------------
 2545|  15.4k|            dav1d_msac_decode_subexp(&ts->msac,
 2546|  5.74k|                lr_ref->filter_h[0] + 5, 16, 1) - 5;
 2547|  15.4k|        lr->filter_h[1] =
 2548|  15.4k|            dav1d_msac_decode_subexp(&ts->msac,
 2549|  15.4k|                lr_ref->filter_h[1] + 23, 32, 2) - 23;
 2550|  15.4k|        lr->filter_h[2] =
 2551|  15.4k|            dav1d_msac_decode_subexp(&ts->msac,
 2552|  15.4k|                lr_ref->filter_h[2] + 17, 64, 3) - 17;
 2553|  15.4k|        memcpy(lr->sgr_weights, lr_ref->sgr_weights, sizeof(lr->sgr_weights));
 2554|  15.4k|        ts->lr_ref[p] = lr;
 2555|  15.4k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  15.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 15.4k]
  |  |  ------------------
  |  |   35|  15.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|  15.4k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2556|      0|            printf("Post-lr_wiener[pl=%d,v[%d,%d,%d],h[%d,%d,%d]]: r=%d\n",
 2557|      0|                   p, lr->filter_v[0], lr->filter_v[1],
 2558|      0|                   lr->filter_v[2], lr->filter_h[0],
 2559|      0|                   lr->filter_h[1], lr->filter_h[2], ts->msac.rng);
 2560|  52.5k|    } else if (lr->type == DAV1D_RESTORATION_SGRPROJ) {
  ------------------
  |  Branch (2560:16): [True: 19.7k, False: 32.7k]
  ------------------
 2561|  19.7k|        const unsigned idx = dav1d_msac_decode_bools(&ts->msac, 4);
 2562|  19.7k|        const uint16_t *const sgr_params = dav1d_sgr_params[idx];
 2563|  19.7k|        lr->type += idx;
 2564|  19.7k|        lr->sgr_weights[0] = sgr_params[0] ? dav1d_msac_decode_subexp(&ts->msac,
  ------------------
  |  Branch (2564:30): [True: 15.2k, False: 4.52k]
  ------------------
 2565|  15.2k|            lr_ref->sgr_weights[0] + 96, 128, 4) - 96 : 0;
 2566|  19.7k|        lr->sgr_weights[1] = sgr_params[1] ? dav1d_msac_decode_subexp(&ts->msac,
  ------------------
  |  Branch (2566:30): [True: 15.6k, False: 4.18k]
  ------------------
 2567|  15.6k|            lr_ref->sgr_weights[1] + 32, 128, 4) - 32 : 95;
 2568|  19.7k|        memcpy(lr->filter_v, lr_ref->filter_v, sizeof(lr->filter_v));
 2569|  19.7k|        memcpy(lr->filter_h, lr_ref->filter_h, sizeof(lr->filter_h));
 2570|  19.7k|        ts->lr_ref[p] = lr;
 2571|  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]
  |  |  ------------------
  ------------------
 2572|      0|            printf("Post-lr_sgrproj[pl=%d,idx=%d,w[%d,%d]]: r=%d\n",
 2573|      0|                   p, idx, lr->sgr_weights[0],
 2574|      0|                   lr->sgr_weights[1], ts->msac.rng);
 2575|  19.7k|    }
 2576|  68.0k|}
decode.c:init_quant_tables:
   57|  27.0k|{
   58|   146k|    for (int i = 0; i < (frame_hdr->segmentation.enabled ? 8 : 1); i++) {
  ------------------
  |  Branch (58:21): [True: 119k, False: 27.0k]
  |  Branch (58:26): [True: 118k, False: 27.8k]
  ------------------
   59|   119k|        const int yac = frame_hdr->segmentation.enabled ?
  ------------------
  |  Branch (59:25): [True: 105k, False: 13.9k]
  ------------------
   60|   105k|            iclip_u8(qidx + frame_hdr->segmentation.seg_data.d[i].delta_q) : qidx;
   61|   119k|        const int ydc = iclip_u8(yac + frame_hdr->quant.ydc_delta);
   62|   119k|        const int uac = iclip_u8(yac + frame_hdr->quant.uac_delta);
   63|   119k|        const int udc = iclip_u8(yac + frame_hdr->quant.udc_delta);
   64|   119k|        const int vac = iclip_u8(yac + frame_hdr->quant.vac_delta);
   65|   119k|        const int vdc = iclip_u8(yac + frame_hdr->quant.vdc_delta);
   66|       |
   67|   119k|        dq[i][0][0] = dav1d_dq_tbl[seq_hdr->hbd][ydc][0];
   68|   119k|        dq[i][0][1] = dav1d_dq_tbl[seq_hdr->hbd][yac][1];
   69|   119k|        dq[i][1][0] = dav1d_dq_tbl[seq_hdr->hbd][udc][0];
   70|   119k|        dq[i][1][1] = dav1d_dq_tbl[seq_hdr->hbd][uac][1];
   71|   119k|        dq[i][2][0] = dav1d_dq_tbl[seq_hdr->hbd][vdc][0];
   72|   119k|        dq[i][2][1] = dav1d_dq_tbl[seq_hdr->hbd][vac][1];
   73|   119k|    }
   74|  27.0k|}
decode.c:setup_tile:
 2432|  21.3k|{
 2433|  21.3k|    const int col_sb_start = f->frame_hdr->tiling.col_start_sb[tile_col];
 2434|  21.3k|    const int col_sb128_start = col_sb_start >> !f->seq_hdr->sb128;
 2435|  21.3k|    const int col_sb_end = f->frame_hdr->tiling.col_start_sb[tile_col + 1];
 2436|  21.3k|    const int row_sb_start = f->frame_hdr->tiling.row_start_sb[tile_row];
 2437|  21.3k|    const int row_sb_end = f->frame_hdr->tiling.row_start_sb[tile_row + 1];
 2438|  21.3k|    const int sb_shift = f->sb_shift;
 2439|       |
 2440|  21.3k|    const uint8_t *const size_mul = ss_size_mul[f->cur.p.layout];
 2441|  63.9k|    for (int p = 0; p < 2; p++) {
  ------------------
  |  Branch (2441:21): [True: 42.6k, False: 21.3k]
  ------------------
 2442|  42.6k|        ts->frame_thread[p].pal_idx = f->frame_thread.pal_idx ?
  ------------------
  |  Branch (2442:39): [True: 0, False: 42.6k]
  ------------------
 2443|      0|            &f->frame_thread.pal_idx[(size_t)tile_start_off * size_mul[1] / 8] :
 2444|  42.6k|            NULL;
 2445|  42.6k|        ts->frame_thread[p].cbi = f->frame_thread.cbi ?
  ------------------
  |  Branch (2445:35): [True: 0, False: 42.6k]
  ------------------
 2446|      0|            &f->frame_thread.cbi[(size_t)tile_start_off * size_mul[0] / 64] :
 2447|  42.6k|            NULL;
 2448|  42.6k|        ts->frame_thread[p].cf = f->frame_thread.cf ?
  ------------------
  |  Branch (2448:34): [True: 0, False: 42.6k]
  ------------------
 2449|      0|            (uint8_t*)f->frame_thread.cf +
 2450|      0|                (((size_t)tile_start_off * size_mul[0]) >> !f->seq_hdr->hbd) :
 2451|  42.6k|            NULL;
 2452|  42.6k|    }
 2453|       |
 2454|  21.3k|    dav1d_cdf_thread_copy(&ts->cdf, &f->in_cdf);
 2455|  21.3k|    ts->last_qidx = f->frame_hdr->quant.yac;
 2456|  21.3k|    ts->last_delta_lf.u32 = 0;
 2457|       |
 2458|  21.3k|    dav1d_msac_init(&ts->msac, data, sz, f->frame_hdr->disable_cdf_update);
 2459|       |
 2460|  21.3k|    ts->tiling.row = tile_row;
 2461|  21.3k|    ts->tiling.col = tile_col;
 2462|  21.3k|    ts->tiling.col_start = col_sb_start << sb_shift;
 2463|  21.3k|    ts->tiling.col_end = imin(col_sb_end << sb_shift, f->bw);
 2464|  21.3k|    ts->tiling.row_start = row_sb_start << sb_shift;
 2465|  21.3k|    ts->tiling.row_end = imin(row_sb_end << sb_shift, f->bh);
 2466|       |
 2467|       |    // Reference Restoration Unit (used for exp coding)
 2468|  21.3k|    int sb_idx, unit_idx;
 2469|  21.3k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (2469:9): [True: 3.28k, False: 18.0k]
  ------------------
 2470|       |        // vertical components only
 2471|  3.28k|        sb_idx = (ts->tiling.row_start >> 5) * f->sr_sb128w;
 2472|  3.28k|        unit_idx = (ts->tiling.row_start & 16) >> 3;
 2473|  18.0k|    } else {
 2474|  18.0k|        sb_idx = (ts->tiling.row_start >> 5) * f->sb128w + col_sb128_start;
 2475|  18.0k|        unit_idx = ((ts->tiling.row_start & 16) >> 3) +
 2476|  18.0k|                   ((ts->tiling.col_start & 16) >> 4);
 2477|  18.0k|    }
 2478|  85.2k|    for (int p = 0; p < 3; p++) {
  ------------------
  |  Branch (2478:21): [True: 63.9k, False: 21.3k]
  ------------------
 2479|  63.9k|        if (!((f->lf.restore_planes >> p) & 1U))
  ------------------
  |  Branch (2479:13): [True: 51.1k, False: 12.7k]
  ------------------
 2480|  51.1k|            continue;
 2481|       |
 2482|  12.7k|        if (f->frame_hdr->width[0] != f->frame_hdr->width[1]) {
  ------------------
  |  Branch (2482:13): [True: 3.85k, False: 8.94k]
  ------------------
 2483|  3.85k|            const int ss_hor = p && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2483:32): [True: 2.37k, False: 1.48k]
  |  Branch (2483:37): [True: 1.16k, False: 1.20k]
  ------------------
 2484|  3.85k|            const int d = f->frame_hdr->super_res.width_scale_denominator;
 2485|  3.85k|            const int unit_size_log2 = f->frame_hdr->restoration.unit_size[!!p];
 2486|  3.85k|            const int rnd = (8 << unit_size_log2) - 1, shift = unit_size_log2 + 3;
 2487|  3.85k|            const int x = ((4 * ts->tiling.col_start * d >> ss_hor) + rnd) >> shift;
 2488|  3.85k|            const int px_x = x << (unit_size_log2 + ss_hor);
 2489|  3.85k|            const int u_idx = unit_idx + ((px_x & 64) >> 6);
 2490|  3.85k|            const int sb128x = px_x >> 7;
 2491|  3.85k|            if (sb128x >= f->sr_sb128w) continue;
  ------------------
  |  Branch (2491:17): [True: 161, False: 3.69k]
  ------------------
 2492|  3.69k|            ts->lr_ref[p] = &f->lf.lr_mask[sb_idx + sb128x].lr[p][u_idx];
 2493|  8.94k|        } else {
 2494|  8.94k|            ts->lr_ref[p] = &f->lf.lr_mask[sb_idx].lr[p][unit_idx];
 2495|  8.94k|        }
 2496|       |
 2497|  12.6k|        ts->lr_ref[p]->filter_v[0] = 3;
 2498|  12.6k|        ts->lr_ref[p]->filter_v[1] = -7;
 2499|  12.6k|        ts->lr_ref[p]->filter_v[2] = 15;
 2500|  12.6k|        ts->lr_ref[p]->filter_h[0] = 3;
 2501|  12.6k|        ts->lr_ref[p]->filter_h[1] = -7;
 2502|  12.6k|        ts->lr_ref[p]->filter_h[2] = 15;
 2503|  12.6k|        ts->lr_ref[p]->sgr_weights[0] = -32;
 2504|  12.6k|        ts->lr_ref[p]->sgr_weights[1] = 31;
 2505|  12.6k|    }
 2506|       |
 2507|  21.3k|    if (f->c->n_tc > 1) {
  ------------------
  |  Branch (2507:9): [True: 0, False: 21.3k]
  ------------------
 2508|      0|        for (int p = 0; p < 2; p++)
  ------------------
  |  Branch (2508:25): [True: 0, False: 0]
  ------------------
 2509|      0|            atomic_init(&ts->progress[p], row_sb_start);
 2510|      0|    }
 2511|  21.3k|}
decode.c:get_upscale_x0:
 3324|  5.53k|static int get_upscale_x0(const int in_w, const int out_w, const int step) {
 3325|  5.53k|    const int err = out_w * step - (in_w << 14);
 3326|  5.53k|    const int x0 = (-((out_w - in_w) << 13) + (out_w >> 1)) / out_w + 128 - (err / 2);
 3327|  5.53k|    return x0 & 0x3fff;
 3328|  5.53k|}

obu.c:get_poc_diff:
  239|  37.8k|{
  240|  37.8k|    if (!order_hint_n_bits) return 0;
  ------------------
  |  Branch (240:9): [True: 0, False: 37.8k]
  ------------------
  241|  37.8k|    const int mask = 1 << (order_hint_n_bits - 1);
  242|  37.8k|    const int diff = poc0 - poc1;
  243|  37.8k|    return (diff & (mask - 1)) - (diff & mask);
  244|  37.8k|}
refmvs.c:get_gmv_2d:
  482|   124k|{
  483|   124k|    switch (gmv->type) {
  484|  22.2k|    case DAV1D_WM_TYPE_ROT_ZOOM:
  ------------------
  |  Branch (484:5): [True: 22.2k, False: 102k]
  ------------------
  485|  22.2k|        assert(gmv->matrix[5] ==  gmv->matrix[2]);
  ------------------
  |  |  140|  22.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 22.2k]
  |  |  |  Branch (140:68): [Folded, False: 22.2k]
  |  |  ------------------
  ------------------
  486|  22.2k|        assert(gmv->matrix[4] == -gmv->matrix[3]);
  ------------------
  |  |  140|  22.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 22.2k]
  |  |  |  Branch (140:68): [Folded, False: 22.2k]
  |  |  ------------------
  ------------------
  487|       |        // fall-through
  488|  22.2k|    default:
  ------------------
  |  Branch (488:5): [True: 0, False: 124k]
  ------------------
  489|  32.0k|    case DAV1D_WM_TYPE_AFFINE: {
  ------------------
  |  Branch (489:5): [True: 9.74k, False: 114k]
  ------------------
  490|  32.0k|        const int x = bx4 * 4 + bw4 * 2 - 1;
  491|  32.0k|        const int y = by4 * 4 + bh4 * 2 - 1;
  492|  32.0k|        const int xc = (gmv->matrix[2] - (1 << 16)) * x +
  493|  32.0k|                       gmv->matrix[3] * y + gmv->matrix[0];
  494|  32.0k|        const int yc = (gmv->matrix[5] - (1 << 16)) * y +
  495|  32.0k|                       gmv->matrix[4] * x + gmv->matrix[1];
  496|  32.0k|        const int shift = 16 - (3 - !hdr->hp);
  497|  32.0k|        const int round = (1 << shift) >> 1;
  498|  32.0k|        mv res = (mv) {
  499|  32.0k|            .y = apply_sign(((abs(yc) + round) >> shift) << !hdr->hp, yc),
  500|  32.0k|            .x = apply_sign(((abs(xc) + round) >> shift) << !hdr->hp, xc),
  501|  32.0k|        };
  502|  32.0k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (502:13): [True: 1.67k, False: 30.3k]
  ------------------
  503|  1.67k|            fix_int_mv_precision(&res);
  504|  32.0k|        return res;
  505|  22.2k|    }
  506|  9.79k|    case DAV1D_WM_TYPE_TRANSLATION: {
  ------------------
  |  Branch (506:5): [True: 9.79k, False: 114k]
  ------------------
  507|  9.79k|        mv res = (mv) {
  508|  9.79k|            .y = gmv->matrix[0] >> 13,
  509|  9.79k|            .x = gmv->matrix[1] >> 13,
  510|  9.79k|        };
  511|  9.79k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (511:13): [True: 560, False: 9.23k]
  ------------------
  512|    560|            fix_int_mv_precision(&res);
  513|  9.79k|        return res;
  514|  22.2k|    }
  515|  82.5k|    case DAV1D_WM_TYPE_IDENTITY:
  ------------------
  |  Branch (515:5): [True: 82.5k, False: 41.8k]
  ------------------
  516|  82.5k|        return (mv) { .x = 0, .y = 0 };
  517|   124k|    }
  518|   124k|}
refmvs.c:fix_int_mv_precision:
  462|  5.15k|static inline void fix_int_mv_precision(mv *const mv) {
  463|  5.15k|    mv->x = (mv->x - (mv->x >> 15) + 3) & ~7U;
  464|  5.15k|    mv->y = (mv->y - (mv->y >> 15) + 3) & ~7U;
  465|  5.15k|}
refmvs.c:fix_mv_precision:
  469|  21.1k|{
  470|  21.1k|    if (hdr->force_integer_mv) {
  ------------------
  |  Branch (470:9): [True: 2.92k, False: 18.2k]
  ------------------
  471|  2.92k|        fix_int_mv_precision(mv);
  472|  18.2k|    } else if (!hdr->hp) {
  ------------------
  |  Branch (472:16): [True: 9.40k, False: 8.86k]
  ------------------
  473|  9.40k|        mv->x = (mv->x - (mv->x >> 15)) & ~1U;
  474|  9.40k|        mv->y = (mv->y - (mv->y >> 15)) & ~1U;
  475|  9.40k|    }
  476|  21.1k|}
refmvs.c:get_poc_diff:
  239|  98.3k|{
  240|  98.3k|    if (!order_hint_n_bits) return 0;
  ------------------
  |  Branch (240:9): [True: 47.7k, False: 50.5k]
  ------------------
  241|  50.5k|    const int mask = 1 << (order_hint_n_bits - 1);
  242|  50.5k|    const int diff = poc0 - poc1;
  243|  50.5k|    return (diff & (mask - 1)) - (diff & mask);
  244|  98.3k|}
decode.c:get_partition_ctx:
   87|  2.14M|{
   88|  2.14M|    return ((a->partition[xb8] >> (4 - bl)) & 1) +
   89|  2.14M|          (((l->partition[yb8] >> (4 - bl)) & 1) << 1);
   90|  2.14M|}
decode.c:get_cur_frame_segid:
  445|   612k|{
  446|   612k|    cur_seg_map += bx + by * stride;
  447|   612k|    if (have_left && have_top) {
  ------------------
  |  Branch (447:9): [True: 500k, False: 112k]
  |  Branch (447:22): [True: 412k, False: 88.1k]
  ------------------
  448|   412k|        const int l = cur_seg_map[-1];
  449|   412k|        const int a = cur_seg_map[-stride];
  450|   412k|        const int al = cur_seg_map[-(stride + 1)];
  451|       |
  452|   412k|        if (l == a && al == l) *seg_ctx = 2;
  ------------------
  |  Branch (452:13): [True: 149k, False: 262k]
  |  Branch (452:23): [True: 129k, False: 20.2k]
  ------------------
  453|   283k|        else if (l == a || al == l || a == al) *seg_ctx = 1;
  ------------------
  |  Branch (453:18): [True: 20.2k, False: 262k]
  |  Branch (453:28): [True: 95.9k, False: 166k]
  |  Branch (453:39): [True: 96.0k, False: 70.8k]
  ------------------
  454|  70.8k|        else *seg_ctx = 0;
  455|   412k|        return a == al ? a : l;
  ------------------
  |  Branch (455:16): [True: 225k, False: 187k]
  ------------------
  456|   412k|    } else {
  457|   200k|        *seg_ctx = 0;
  458|   200k|        return have_left ? cur_seg_map[-1] : have_top ? cur_seg_map[-stride] : 0;
  ------------------
  |  Branch (458:16): [True: 88.1k, False: 112k]
  |  Branch (458:46): [True: 103k, False: 8.31k]
  ------------------
  459|   200k|    }
  460|   612k|}
decode.c:get_intra_ctx:
   63|  86.3k|{
   64|  86.3k|    if (have_left) {
  ------------------
  |  Branch (64:9): [True: 78.3k, False: 7.99k]
  ------------------
   65|  78.3k|        if (have_top) {
  ------------------
  |  Branch (65:13): [True: 69.7k, False: 8.63k]
  ------------------
   66|  69.7k|            const int ctx = l->intra[yb4] + a->intra[xb4];
   67|  69.7k|            return ctx + (ctx == 2);
   68|  69.7k|        } else
   69|  8.63k|            return l->intra[yb4] * 2;
   70|  78.3k|    } else {
   71|  7.99k|        return have_top ? a->intra[xb4] * 2 : 0;
  ------------------
  |  Branch (71:16): [True: 5.33k, False: 2.66k]
  ------------------
   72|  7.99k|    }
   73|  86.3k|}
decode.c:get_tx_ctx:
   79|   910k|{
   80|   910k|    return (l->tx_intra[yb4] >= max_tx->lh) + (a->tx_intra[xb4] >= max_tx->lw);
   81|   910k|}
decode.c:get_comp_ctx:
  160|  31.2k|{
  161|  31.2k|    if (have_top) {
  ------------------
  |  Branch (161:9): [True: 26.0k, False: 5.20k]
  ------------------
  162|  26.0k|        if (have_left) {
  ------------------
  |  Branch (162:13): [True: 23.6k, False: 2.40k]
  ------------------
  163|  23.6k|            if (a->comp_type[xb4]) {
  ------------------
  |  Branch (163:17): [True: 12.8k, False: 10.8k]
  ------------------
  164|  12.8k|                if (l->comp_type[yb4]) {
  ------------------
  |  Branch (164:21): [True: 8.89k, False: 3.96k]
  ------------------
  165|  8.89k|                    return 4;
  166|  8.89k|                } else {
  167|       |                    // 4U means intra (-1) or bwd (>= 4)
  168|  3.96k|                    return 2 + ((unsigned)l->ref[0][yb4] >= 4U);
  169|  3.96k|                }
  170|  12.8k|            } else if (l->comp_type[yb4]) {
  ------------------
  |  Branch (170:24): [True: 4.32k, False: 6.48k]
  ------------------
  171|       |                // 4U means intra (-1) or bwd (>= 4)
  172|  4.32k|                return 2 + ((unsigned)a->ref[0][xb4] >= 4U);
  173|  6.48k|            } else {
  174|  6.48k|                return (l->ref[0][yb4] >= 4) ^ (a->ref[0][xb4] >= 4);
  175|  6.48k|            }
  176|  23.6k|        } else {
  177|  2.40k|            return a->comp_type[xb4] ? 3 : a->ref[0][xb4] >= 4;
  ------------------
  |  Branch (177:20): [True: 1.15k, False: 1.25k]
  ------------------
  178|  2.40k|        }
  179|  26.0k|    } else if (have_left) {
  ------------------
  |  Branch (179:16): [True: 3.90k, False: 1.29k]
  ------------------
  180|  3.90k|        return l->comp_type[yb4] ? 3 : l->ref[0][yb4] >= 4;
  ------------------
  |  Branch (180:16): [True: 1.82k, False: 2.08k]
  ------------------
  181|  3.90k|    } else {
  182|  1.29k|        return 1;
  183|  1.29k|    }
  184|  31.2k|}
decode.c:fix_mv_precision:
  469|  62.7k|{
  470|  62.7k|    if (hdr->force_integer_mv) {
  ------------------
  |  Branch (470:9): [True: 2.34k, False: 60.4k]
  ------------------
  471|  2.34k|        fix_int_mv_precision(mv);
  472|  60.4k|    } else if (!hdr->hp) {
  ------------------
  |  Branch (472:16): [True: 36.5k, False: 23.9k]
  ------------------
  473|  36.5k|        mv->x = (mv->x - (mv->x >> 15)) & ~1U;
  474|  36.5k|        mv->y = (mv->y - (mv->y >> 15)) & ~1U;
  475|  36.5k|    }
  476|  62.7k|}
decode.c:fix_int_mv_precision:
  462|  3.06k|static inline void fix_int_mv_precision(mv *const mv) {
  463|  3.06k|    mv->x = (mv->x - (mv->x >> 15) + 3) & ~7U;
  464|  3.06k|    mv->y = (mv->y - (mv->y >> 15) + 3) & ~7U;
  465|  3.06k|}
decode.c:get_comp_dir_ctx:
  190|  19.5k|{
  191|  19.5k|#define has_uni_comp(edge, off) \
  192|  19.5k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  193|       |
  194|  19.5k|    if (have_top && have_left) {
  ------------------
  |  Branch (194:9): [True: 16.9k, False: 2.52k]
  |  Branch (194:21): [True: 15.7k, False: 1.24k]
  ------------------
  195|  15.7k|        const int a_intra = a->intra[xb4], l_intra = l->intra[yb4];
  196|       |
  197|  15.7k|        if (a_intra && l_intra) return 2;
  ------------------
  |  Branch (197:13): [True: 399, False: 15.3k]
  |  Branch (197:24): [True: 59, False: 340]
  ------------------
  198|  15.6k|        if (a_intra || l_intra) {
  ------------------
  |  Branch (198:13): [True: 340, False: 15.3k]
  |  Branch (198:24): [True: 290, False: 15.0k]
  ------------------
  199|    630|            const BlockContext *const edge = a_intra ? l : a;
  ------------------
  |  Branch (199:46): [True: 340, False: 290]
  ------------------
  200|    630|            const int off = a_intra ? yb4 : xb4;
  ------------------
  |  Branch (200:29): [True: 340, False: 290]
  ------------------
  201|       |
  202|    630|            if (edge->comp_type[off] == COMP_INTER_NONE) return 2;
  ------------------
  |  Branch (202:17): [True: 169, False: 461]
  ------------------
  203|    461|            return 1 + 2 * has_uni_comp(edge, off);
  ------------------
  |  |  192|    461|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  204|    630|        }
  205|       |
  206|  15.0k|        const int a_comp = a->comp_type[xb4] != COMP_INTER_NONE;
  207|  15.0k|        const int l_comp = l->comp_type[yb4] != COMP_INTER_NONE;
  208|  15.0k|        const int a_ref0 = a->ref[0][xb4], l_ref0 = l->ref[0][yb4];
  209|       |
  210|  15.0k|        if (!a_comp && !l_comp) {
  ------------------
  |  Branch (210:13): [True: 4.10k, False: 10.9k]
  |  Branch (210:24): [True: 1.25k, False: 2.85k]
  ------------------
  211|  1.25k|            return 1 + 2 * ((a_ref0 >= 4) == (l_ref0 >= 4));
  212|  13.7k|        } else if (!a_comp || !l_comp) {
  ------------------
  |  Branch (212:20): [True: 2.85k, False: 10.9k]
  |  Branch (212:31): [True: 2.56k, False: 8.38k]
  ------------------
  213|  5.41k|            const BlockContext *const edge = a_comp ? a : l;
  ------------------
  |  Branch (213:46): [True: 2.56k, False: 2.85k]
  ------------------
  214|  5.41k|            const int off = a_comp ? xb4 : yb4;
  ------------------
  |  Branch (214:29): [True: 2.56k, False: 2.85k]
  ------------------
  215|       |
  216|  5.41k|            if (!has_uni_comp(edge, off)) return 1;
  ------------------
  |  |  192|  5.41k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  |  Branch (216:17): [True: 4.33k, False: 1.07k]
  ------------------
  217|  1.07k|            return 3 + ((a_ref0 >= 4) == (l_ref0 >= 4));
  218|  8.38k|        } else {
  219|  8.38k|            const int a_uni = has_uni_comp(a, xb4), l_uni = has_uni_comp(l, yb4);
  ------------------
  |  |  192|  8.38k|    ((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|  8.38k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  220|       |
  221|  8.38k|            if (!a_uni && !l_uni) return 0;
  ------------------
  |  Branch (221:17): [True: 6.75k, False: 1.63k]
  |  Branch (221:27): [True: 6.02k, False: 724]
  ------------------
  222|  2.35k|            if (!a_uni || !l_uni) return 2;
  ------------------
  |  Branch (222:17): [True: 724, False: 1.63k]
  |  Branch (222:27): [True: 801, False: 834]
  ------------------
  223|    834|            return 3 + ((a_ref0 == 4) == (l_ref0 == 4));
  224|  2.35k|        }
  225|  15.0k|    } else if (have_top || have_left) {
  ------------------
  |  Branch (225:16): [True: 1.24k, False: 2.52k]
  |  Branch (225:28): [True: 2.05k, False: 469]
  ------------------
  226|  3.29k|        const BlockContext *const edge = have_left ? l : a;
  ------------------
  |  Branch (226:42): [True: 2.05k, False: 1.24k]
  ------------------
  227|  3.29k|        const int off = have_left ? yb4 : xb4;
  ------------------
  |  Branch (227:25): [True: 2.05k, False: 1.24k]
  ------------------
  228|       |
  229|  3.29k|        if (edge->intra[off]) return 2;
  ------------------
  |  Branch (229:13): [True: 57, False: 3.23k]
  ------------------
  230|  3.23k|        if (edge->comp_type[off] == COMP_INTER_NONE) return 2;
  ------------------
  |  Branch (230:13): [True: 892, False: 2.34k]
  ------------------
  231|  2.34k|        return 4 * has_uni_comp(edge, off);
  ------------------
  |  |  192|  2.34k|    ((edge->ref[0][off] < 4) == (edge->ref[1][off] < 4))
  ------------------
  232|  3.23k|    } else {
  233|    469|        return 2;
  234|    469|    }
  235|  19.5k|}
decode.c:av1_get_fwd_ref_ctx:
  307|  45.1k|{
  308|  45.1k|    int cnt[4] = { 0 };
  309|       |
  310|  45.1k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (310:9): [True: 39.3k, False: 5.75k]
  |  Branch (310:21): [True: 38.0k, False: 1.30k]
  ------------------
  311|  38.0k|        if (a->ref[0][xb4] < 4) cnt[a->ref[0][xb4]]++;
  ------------------
  |  Branch (311:13): [True: 32.9k, False: 5.14k]
  ------------------
  312|  38.0k|        if (a->comp_type[xb4] && a->ref[1][xb4] < 4) cnt[a->ref[1][xb4]]++;
  ------------------
  |  Branch (312:13): [True: 12.8k, False: 25.2k]
  |  Branch (312:34): [True: 1.42k, False: 11.4k]
  ------------------
  313|  38.0k|    }
  314|       |
  315|  45.1k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (315:9): [True: 41.2k, False: 3.92k]
  |  Branch (315:22): [True: 39.8k, False: 1.39k]
  ------------------
  316|  39.8k|        if (l->ref[0][yb4] < 4) cnt[l->ref[0][yb4]]++;
  ------------------
  |  Branch (316:13): [True: 34.7k, False: 5.06k]
  ------------------
  317|  39.8k|        if (l->comp_type[yb4] && l->ref[1][yb4] < 4) cnt[l->ref[1][yb4]]++;
  ------------------
  |  Branch (317:13): [True: 14.4k, False: 25.4k]
  |  Branch (317:34): [True: 1.57k, False: 12.8k]
  ------------------
  318|  39.8k|    }
  319|       |
  320|  45.1k|    cnt[0] += cnt[1];
  321|  45.1k|    cnt[2] += cnt[3];
  322|       |
  323|  45.1k|    return cnt[0] == cnt[2] ? 1 : cnt[0] < cnt[2] ? 0 : 2;
  ------------------
  |  Branch (323:12): [True: 9.40k, False: 35.7k]
  |  Branch (323:35): [True: 11.2k, False: 24.5k]
  ------------------
  324|  45.1k|}
decode.c:av1_get_fwd_ref_2_ctx:
  350|  17.1k|{
  351|  17.1k|    int cnt[2] = { 0 };
  352|       |
  353|  17.1k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (353:9): [True: 14.4k, False: 2.67k]
  |  Branch (353:21): [True: 13.8k, False: 533]
  ------------------
  354|  13.8k|        if ((a->ref[0][xb4] ^ 2U) < 2) cnt[a->ref[0][xb4] - 2]++;
  ------------------
  |  Branch (354:13): [True: 8.41k, False: 5.47k]
  ------------------
  355|  13.8k|        if (a->comp_type[xb4] && (a->ref[1][xb4] ^ 2U) < 2) cnt[a->ref[1][xb4] - 2]++;
  ------------------
  |  Branch (355:13): [True: 5.22k, False: 8.67k]
  |  Branch (355:34): [True: 948, False: 4.27k]
  ------------------
  356|  13.8k|    }
  357|       |
  358|  17.1k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (358:9): [True: 15.4k, False: 1.69k]
  |  Branch (358:22): [True: 14.8k, False: 538]
  ------------------
  359|  14.8k|        if ((l->ref[0][yb4] ^ 2U) < 2) cnt[l->ref[0][yb4] - 2]++;
  ------------------
  |  Branch (359:13): [True: 9.49k, False: 5.37k]
  ------------------
  360|  14.8k|        if (l->comp_type[yb4] && (l->ref[1][yb4] ^ 2U) < 2) cnt[l->ref[1][yb4] - 2]++;
  ------------------
  |  Branch (360:13): [True: 6.22k, False: 8.64k]
  |  Branch (360:34): [True: 1.04k, False: 5.18k]
  ------------------
  361|  14.8k|    }
  362|       |
  363|  17.1k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (363:12): [True: 4.19k, False: 12.9k]
  |  Branch (363:35): [True: 9.70k, False: 3.20k]
  ------------------
  364|  17.1k|}
decode.c:av1_get_fwd_ref_1_ctx:
  330|  29.8k|{
  331|  29.8k|    int cnt[2] = { 0 };
  332|       |
  333|  29.8k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (333:9): [True: 26.4k, False: 3.39k]
  |  Branch (333:21): [True: 25.6k, False: 794]
  ------------------
  334|  25.6k|        if (a->ref[0][xb4] < 2) cnt[a->ref[0][xb4]]++;
  ------------------
  |  Branch (334:13): [True: 20.1k, False: 5.47k]
  ------------------
  335|  25.6k|        if (a->comp_type[xb4] && a->ref[1][xb4] < 2) cnt[a->ref[1][xb4]]++;
  ------------------
  |  Branch (335:13): [True: 8.72k, False: 16.9k]
  |  Branch (335:34): [True: 419, False: 8.30k]
  ------------------
  336|  25.6k|    }
  337|       |
  338|  29.8k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (338:9): [True: 27.3k, False: 2.47k]
  |  Branch (338:22): [True: 26.4k, False: 899]
  ------------------
  339|  26.4k|        if (l->ref[0][yb4] < 2) cnt[l->ref[0][yb4]]++;
  ------------------
  |  Branch (339:13): [True: 21.0k, False: 5.43k]
  ------------------
  340|  26.4k|        if (l->comp_type[yb4] && l->ref[1][yb4] < 2) cnt[l->ref[1][yb4]]++;
  ------------------
  |  Branch (340:13): [True: 9.32k, False: 17.1k]
  |  Branch (340:34): [True: 498, False: 8.82k]
  ------------------
  341|  26.4k|    }
  342|       |
  343|  29.8k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (343:12): [True: 5.66k, False: 24.1k]
  |  Branch (343:35): [True: 2.86k, False: 21.3k]
  ------------------
  344|  29.8k|}
decode.c:av1_get_bwd_ref_ctx:
  370|  43.1k|{
  371|  43.1k|    int cnt[3] = { 0 };
  372|       |
  373|  43.1k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (373:9): [True: 37.5k, False: 5.58k]
  |  Branch (373:21): [True: 36.4k, False: 1.13k]
  ------------------
  374|  36.4k|        if (a->ref[0][xb4] >= 4) cnt[a->ref[0][xb4] - 4]++;
  ------------------
  |  Branch (374:13): [True: 18.5k, False: 17.8k]
  ------------------
  375|  36.4k|        if (a->comp_type[xb4] && a->ref[1][xb4] >= 4) cnt[a->ref[1][xb4] - 4]++;
  ------------------
  |  Branch (375:13): [True: 12.6k, False: 23.8k]
  |  Branch (375:34): [True: 11.7k, False: 870]
  ------------------
  376|  36.4k|    }
  377|       |
  378|  43.1k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (378:9): [True: 39.4k, False: 3.66k]
  |  Branch (378:22): [True: 38.5k, False: 981]
  ------------------
  379|  38.5k|        if (l->ref[0][yb4] >= 4) cnt[l->ref[0][yb4] - 4]++;
  ------------------
  |  Branch (379:13): [True: 20.4k, False: 18.0k]
  ------------------
  380|  38.5k|        if (l->comp_type[yb4] && l->ref[1][yb4] >= 4) cnt[l->ref[1][yb4] - 4]++;
  ------------------
  |  Branch (380:13): [True: 13.3k, False: 25.1k]
  |  Branch (380:34): [True: 12.4k, False: 860]
  ------------------
  381|  38.5k|    }
  382|       |
  383|  43.1k|    cnt[1] += cnt[0];
  384|       |
  385|  43.1k|    return cnt[2] == cnt[1] ? 1 : cnt[1] < cnt[2] ? 0 : 2;
  ------------------
  |  Branch (385:12): [True: 8.81k, False: 34.3k]
  |  Branch (385:35): [True: 20.5k, False: 13.8k]
  ------------------
  386|  43.1k|}
decode.c:av1_get_bwd_ref_1_ctx:
  392|  17.5k|{
  393|  17.5k|    int cnt[3] = { 0 };
  394|       |
  395|  17.5k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (395:9): [True: 15.5k, False: 2.06k]
  |  Branch (395:21): [True: 15.0k, False: 464]
  ------------------
  396|  15.0k|        if (a->ref[0][xb4] >= 4) cnt[a->ref[0][xb4] - 4]++;
  ------------------
  |  Branch (396:13): [True: 7.00k, False: 8.05k]
  ------------------
  397|  15.0k|        if (a->comp_type[xb4] && a->ref[1][xb4] >= 4) cnt[a->ref[1][xb4] - 4]++;
  ------------------
  |  Branch (397:13): [True: 5.68k, False: 9.37k]
  |  Branch (397:34): [True: 5.25k, False: 422]
  ------------------
  398|  15.0k|    }
  399|       |
  400|  17.5k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (400:9): [True: 15.9k, False: 1.60k]
  |  Branch (400:22): [True: 15.4k, False: 489]
  ------------------
  401|  15.4k|        if (l->ref[0][yb4] >= 4) cnt[l->ref[0][yb4] - 4]++;
  ------------------
  |  Branch (401:13): [True: 7.25k, False: 8.23k]
  ------------------
  402|  15.4k|        if (l->comp_type[yb4] && l->ref[1][yb4] >= 4) cnt[l->ref[1][yb4] - 4]++;
  ------------------
  |  Branch (402:13): [True: 6.02k, False: 9.46k]
  |  Branch (402:34): [True: 5.58k, False: 438]
  ------------------
  403|  15.4k|    }
  404|       |
  405|  17.5k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (405:12): [True: 4.05k, False: 13.5k]
  |  Branch (405:35): [True: 6.19k, False: 7.33k]
  ------------------
  406|  17.5k|}
decode.c:av1_get_ref_ctx:
  287|  60.5k|{
  288|  60.5k|    int cnt[2] = { 0 };
  289|       |
  290|  60.5k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (290:9): [True: 52.2k, False: 8.25k]
  |  Branch (290:21): [True: 50.4k, False: 1.77k]
  ------------------
  291|  50.4k|        cnt[a->ref[0][xb4] >= 4]++;
  292|  50.4k|        if (a->comp_type[xb4]) cnt[a->ref[1][xb4] >= 4]++;
  ------------------
  |  Branch (292:13): [True: 7.84k, False: 42.6k]
  ------------------
  293|  50.4k|    }
  294|       |
  295|  60.5k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (295:9): [True: 54.7k, False: 5.77k]
  |  Branch (295:22): [True: 52.8k, False: 1.85k]
  ------------------
  296|  52.8k|        cnt[l->ref[0][yb4] >= 4]++;
  297|  52.8k|        if (l->comp_type[yb4]) cnt[l->ref[1][yb4] >= 4]++;
  ------------------
  |  Branch (297:13): [True: 8.62k, False: 44.2k]
  ------------------
  298|  52.8k|    }
  299|       |
  300|  60.5k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (300:12): [True: 12.2k, False: 48.2k]
  |  Branch (300:35): [True: 22.1k, False: 26.1k]
  ------------------
  301|  60.5k|}
decode.c:av1_get_uni_p1_ctx:
  412|  2.71k|{
  413|  2.71k|    int cnt[3] = { 0 };
  414|       |
  415|  2.71k|    if (have_top && !a->intra[xb4]) {
  ------------------
  |  Branch (415:9): [True: 2.27k, False: 438]
  |  Branch (415:21): [True: 2.23k, False: 40]
  ------------------
  416|  2.23k|        if (a->ref[0][xb4] - 1U < 3) cnt[a->ref[0][xb4] - 1]++;
  ------------------
  |  Branch (416:13): [True: 475, False: 1.76k]
  ------------------
  417|  2.23k|        if (a->comp_type[xb4] && a->ref[1][xb4] - 1U < 3) cnt[a->ref[1][xb4] - 1]++;
  ------------------
  |  Branch (417:13): [True: 1.60k, False: 633]
  |  Branch (417:34): [True: 1.03k, False: 568]
  ------------------
  418|  2.23k|    }
  419|       |
  420|  2.71k|    if (have_left && !l->intra[yb4]) {
  ------------------
  |  Branch (420:9): [True: 2.36k, False: 355]
  |  Branch (420:22): [True: 2.29k, False: 67]
  ------------------
  421|  2.29k|        if (l->ref[0][yb4] - 1U < 3) cnt[l->ref[0][yb4] - 1]++;
  ------------------
  |  Branch (421:13): [True: 457, False: 1.83k]
  ------------------
  422|  2.29k|        if (l->comp_type[yb4] && l->ref[1][yb4] - 1U < 3) cnt[l->ref[1][yb4] - 1]++;
  ------------------
  |  Branch (422:13): [True: 1.69k, False: 596]
  |  Branch (422:34): [True: 1.08k, False: 618]
  ------------------
  423|  2.29k|    }
  424|       |
  425|  2.71k|    cnt[1] += cnt[2];
  426|       |
  427|  2.71k|    return cnt[0] == cnt[1] ? 1 : cnt[0] < cnt[1] ? 0 : 2;
  ------------------
  |  Branch (427:12): [True: 837, False: 1.88k]
  |  Branch (427:35): [True: 1.34k, False: 535]
  ------------------
  428|  2.71k|}
decode.c:get_drl_context:
  432|  29.4k|{
  433|  29.4k|    if (ref_mv_stack[ref_idx].weight >= 640)
  ------------------
  |  Branch (433:9): [True: 22.6k, False: 6.87k]
  ------------------
  434|  22.6k|        return ref_mv_stack[ref_idx + 1].weight < 640;
  435|       |
  436|  6.87k|    return ref_mv_stack[ref_idx + 1].weight < 640 ? 2 : 0;
  ------------------
  |  Branch (436:12): [True: 6.87k, False: 0]
  ------------------
  437|  29.4k|}
decode.c:get_gmv_2d:
  482|  31.9k|{
  483|  31.9k|    switch (gmv->type) {
  484|  4.26k|    case DAV1D_WM_TYPE_ROT_ZOOM:
  ------------------
  |  Branch (484:5): [True: 4.26k, False: 27.6k]
  ------------------
  485|  4.26k|        assert(gmv->matrix[5] ==  gmv->matrix[2]);
  ------------------
  |  |  140|  4.26k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.26k]
  |  |  |  Branch (140:68): [Folded, False: 4.26k]
  |  |  ------------------
  ------------------
  486|  4.26k|        assert(gmv->matrix[4] == -gmv->matrix[3]);
  ------------------
  |  |  140|  4.26k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.26k]
  |  |  |  Branch (140:68): [Folded, False: 4.26k]
  |  |  ------------------
  ------------------
  487|       |        // fall-through
  488|  4.26k|    default:
  ------------------
  |  Branch (488:5): [True: 0, False: 31.9k]
  ------------------
  489|  6.20k|    case DAV1D_WM_TYPE_AFFINE: {
  ------------------
  |  Branch (489:5): [True: 1.94k, False: 29.9k]
  ------------------
  490|  6.20k|        const int x = bx4 * 4 + bw4 * 2 - 1;
  491|  6.20k|        const int y = by4 * 4 + bh4 * 2 - 1;
  492|  6.20k|        const int xc = (gmv->matrix[2] - (1 << 16)) * x +
  493|  6.20k|                       gmv->matrix[3] * y + gmv->matrix[0];
  494|  6.20k|        const int yc = (gmv->matrix[5] - (1 << 16)) * y +
  495|  6.20k|                       gmv->matrix[4] * x + gmv->matrix[1];
  496|  6.20k|        const int shift = 16 - (3 - !hdr->hp);
  497|  6.20k|        const int round = (1 << shift) >> 1;
  498|  6.20k|        mv res = (mv) {
  499|  6.20k|            .y = apply_sign(((abs(yc) + round) >> shift) << !hdr->hp, yc),
  500|  6.20k|            .x = apply_sign(((abs(xc) + round) >> shift) << !hdr->hp, xc),
  501|  6.20k|        };
  502|  6.20k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (502:13): [True: 469, False: 5.74k]
  ------------------
  503|    469|            fix_int_mv_precision(&res);
  504|  6.20k|        return res;
  505|  4.26k|    }
  506|  2.46k|    case DAV1D_WM_TYPE_TRANSLATION: {
  ------------------
  |  Branch (506:5): [True: 2.46k, False: 29.4k]
  ------------------
  507|  2.46k|        mv res = (mv) {
  508|  2.46k|            .y = gmv->matrix[0] >> 13,
  509|  2.46k|            .x = gmv->matrix[1] >> 13,
  510|  2.46k|        };
  511|  2.46k|        if (hdr->force_integer_mv)
  ------------------
  |  Branch (511:13): [True: 244, False: 2.21k]
  ------------------
  512|    244|            fix_int_mv_precision(&res);
  513|  2.46k|        return res;
  514|  4.26k|    }
  515|  23.2k|    case DAV1D_WM_TYPE_IDENTITY:
  ------------------
  |  Branch (515:5): [True: 23.2k, False: 8.67k]
  ------------------
  516|  23.2k|        return (mv) { .x = 0, .y = 0 };
  517|  31.9k|    }
  518|  31.9k|}
decode.c:get_mask_comp_ctx:
  266|  13.2k|{
  267|  13.2k|    const int a_ctx = a->comp_type[xb4] >= COMP_INTER_SEG ? 1 :
  ------------------
  |  Branch (267:23): [True: 2.27k, False: 10.9k]
  ------------------
  268|  13.2k|                      a->ref[0][xb4] == 6 ? 3 : 0;
  ------------------
  |  Branch (268:23): [True: 676, False: 10.2k]
  ------------------
  269|  13.2k|    const int l_ctx = l->comp_type[yb4] >= COMP_INTER_SEG ? 1 :
  ------------------
  |  Branch (269:23): [True: 2.93k, False: 10.3k]
  ------------------
  270|  13.2k|                      l->ref[0][yb4] == 6 ? 3 : 0;
  ------------------
  |  Branch (270:23): [True: 744, False: 9.56k]
  ------------------
  271|       |
  272|  13.2k|    return imin(a_ctx + l_ctx, 5);
  273|  13.2k|}
decode.c:get_jnt_comp_ctx:
  251|  8.17k|{
  252|  8.17k|    const int d0 = abs(get_poc_diff(order_hint_n_bits, ref0poc, poc));
  253|  8.17k|    const int d1 = abs(get_poc_diff(order_hint_n_bits, poc, ref1poc));
  254|  8.17k|    const int offset = d0 == d1;
  255|  8.17k|    const int a_ctx = a->comp_type[xb4] >= COMP_INTER_AVG ||
  ------------------
  |  Branch (255:23): [True: 3.45k, False: 4.72k]
  ------------------
  256|  4.72k|                      a->ref[0][xb4] == 6;
  ------------------
  |  Branch (256:23): [True: 469, False: 4.25k]
  ------------------
  257|  8.17k|    const int l_ctx = l->comp_type[yb4] >= COMP_INTER_AVG ||
  ------------------
  |  Branch (257:23): [True: 3.70k, False: 4.47k]
  ------------------
  258|  4.47k|                      l->ref[0][yb4] == 6;
  ------------------
  |  Branch (258:23): [True: 420, False: 4.05k]
  ------------------
  259|       |
  260|  8.17k|    return 3 * offset + a_ctx + l_ctx;
  261|  8.17k|}
decode.c:get_filter_ctx:
  139|  51.8k|{
  140|  51.8k|    const int a_filter = (a->ref[0][xb4] == ref || a->ref[1][xb4] == ref) ?
  ------------------
  |  Branch (140:27): [True: 28.6k, False: 23.1k]
  |  Branch (140:52): [True: 1.30k, False: 21.8k]
  ------------------
  141|  29.9k|                         a->filter[dir][xb4] : DAV1D_N_SWITCHABLE_FILTERS;
  142|  51.8k|    const int l_filter = (l->ref[0][yb4] == ref || l->ref[1][yb4] == ref) ?
  ------------------
  |  Branch (142:27): [True: 30.0k, False: 21.7k]
  |  Branch (142:52): [True: 1.11k, False: 20.6k]
  ------------------
  143|  31.1k|                         l->filter[dir][yb4] : DAV1D_N_SWITCHABLE_FILTERS;
  144|       |
  145|  51.8k|    if (a_filter == l_filter) {
  ------------------
  |  Branch (145:9): [True: 27.2k, False: 24.5k]
  ------------------
  146|  27.2k|        return comp * 4 + a_filter;
  147|  27.2k|    } else if (a_filter == DAV1D_N_SWITCHABLE_FILTERS) {
  ------------------
  |  Branch (147:16): [True: 11.7k, False: 12.7k]
  ------------------
  148|  11.7k|        return comp * 4 + l_filter;
  149|  12.7k|    } else if (l_filter == DAV1D_N_SWITCHABLE_FILTERS) {
  ------------------
  |  Branch (149:16): [True: 10.5k, False: 2.23k]
  ------------------
  150|  10.5k|        return comp * 4 + a_filter;
  151|  10.5k|    } else {
  152|  2.23k|        return comp * 4 + DAV1D_N_SWITCHABLE_FILTERS;
  153|  2.23k|    }
  154|  51.8k|}
decode.c:gather_top_partition_prob:
  106|   236k|{
  107|       |    // Exploit the fact that cdfs for PARTITION_V, PARTITION_SPLIT and
  108|       |    // PARTITION_T_TOP_SPLIT are neighbors.
  109|   236k|    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|   236k|    out += in[PARTITION_T_LEFT_SPLIT - 1];
  115|   236k|    if (bl != BL_128X128)
  ------------------
  |  Branch (115:9): [True: 225k, False: 11.4k]
  ------------------
  116|   225k|        out += in[PARTITION_V4 - 1] - in[PARTITION_T_RIGHT_SPLIT];
  117|   236k|    return out;
  118|   236k|}
decode.c:gather_left_partition_prob:
   94|   129k|{
   95|   129k|    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|   129k|    out += in[PARTITION_SPLIT - 1] - in[PARTITION_T_LEFT_SPLIT];
   99|   129k|    if (bl != BL_128X128)
  ------------------
  |  Branch (99:9): [True: 111k, False: 18.8k]
  ------------------
  100|   111k|        out += in[PARTITION_H4 - 1] - in[PARTITION_H4];
  101|   129k|    return out;
  102|   129k|}
decode.c:get_poc_diff:
  239|  88.4k|{
  240|  88.4k|    if (!order_hint_n_bits) return 0;
  ------------------
  |  Branch (240:9): [True: 8.98k, False: 79.4k]
  ------------------
  241|  79.4k|    const int mask = 1 << (order_hint_n_bits - 1);
  242|  79.4k|    const int diff = poc0 - poc1;
  243|  79.4k|    return (diff & (mask - 1)) - (diff & mask);
  244|  88.4k|}
recon_tmpl.c:get_uv_inter_txtp:
  122|  33.4k|{
  123|  33.4k|    if (uvt_dim->max == TX_32X32)
  ------------------
  |  Branch (123:9): [True: 6.61k, False: 26.8k]
  ------------------
  124|  6.61k|        return ytxtp == IDTX ? IDTX : DCT_DCT;
  ------------------
  |  Branch (124:16): [True: 229, False: 6.38k]
  ------------------
  125|  26.8k|    if (uvt_dim->min == TX_16X16 &&
  ------------------
  |  Branch (125:9): [True: 2.28k, False: 24.5k]
  ------------------
  126|  2.28k|        ((1 << ytxtp) & ((1 << H_FLIPADST) | (1 << V_FLIPADST) |
  ------------------
  |  Branch (126:9): [True: 77, False: 2.20k]
  ------------------
  127|  2.28k|                         (1 << H_ADST) | (1 << V_ADST))))
  128|     77|    {
  129|     77|        return DCT_DCT;
  130|     77|    }
  131|       |
  132|  26.7k|    return ytxtp;
  133|  26.8k|}

dav1d_prep_grain_8bpc:
  105|    372|{
  106|    372|    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|    372|    dsp->generate_grain_y(grain_lut[0], data HIGHBD_TAIL_SUFFIX); // always needed
  113|    372|    if (data->num_uv_points[0] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (113:9): [True: 76, False: 296]
  |  Branch (113:35): [True: 161, False: 135]
  ------------------
  114|    237|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[1], grain_lut[0],
  115|    237|                                                 data, 0 HIGHBD_TAIL_SUFFIX);
  116|    372|    if (data->num_uv_points[1] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (116:9): [True: 80, False: 292]
  |  Branch (116:35): [True: 161, False: 131]
  ------------------
  117|    241|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[2], grain_lut[0],
  118|    241|                                                 data, 1 HIGHBD_TAIL_SUFFIX);
  119|       |
  120|       |    // Generate scaling LUTs as needed
  121|    372|    if (data->num_y_points || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (121:9): [True: 251, False: 121]
  |  Branch (121:31): [True: 60, False: 61]
  ------------------
  122|    311|        generate_scaling(in->p.bpc, data->y_points, data->num_y_points, scaling[0]);
  123|    372|    if (data->num_uv_points[0])
  ------------------
  |  Branch (123:9): [True: 76, False: 296]
  ------------------
  124|     76|        generate_scaling(in->p.bpc, data->uv_points[0], data->num_uv_points[0], scaling[1]);
  125|    372|    if (data->num_uv_points[1])
  ------------------
  |  Branch (125:9): [True: 80, False: 292]
  ------------------
  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|    372|    assert(out->stride[0] == in->stride[0]);
  ------------------
  |  |  140|    372|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 372]
  |  |  |  Branch (140:68): [Folded, False: 372]
  |  |  ------------------
  ------------------
  130|    372|    if (!data->num_y_points) {
  ------------------
  |  Branch (130:9): [True: 121, False: 251]
  ------------------
  131|    121|        const ptrdiff_t stride = out->stride[0];
  132|    121|        const ptrdiff_t sz = out->p.h * stride;
  133|    121|        if (sz < 0)
  ------------------
  |  Branch (133:13): [True: 0, False: 121]
  ------------------
  134|      0|            memcpy((uint8_t*) out->data[0] + sz - stride,
  135|      0|                   (uint8_t*) in->data[0] + sz - stride, -sz);
  136|    121|        else
  137|    121|            memcpy(out->data[0], in->data[0], sz);
  138|    121|    }
  139|       |
  140|    372|    if (in->p.layout != DAV1D_PIXEL_LAYOUT_I400 && !data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (140:9): [True: 283, False: 89]
  |  Branch (140:52): [True: 122, False: 161]
  ------------------
  141|    122|        assert(out->stride[1] == in->stride[1]);
  ------------------
  |  |  140|    122|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 122]
  |  |  |  Branch (140:68): [Folded, False: 122]
  |  |  ------------------
  ------------------
  142|    122|        const int ss_ver = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  143|    122|        const ptrdiff_t stride = out->stride[1];
  144|    122|        const ptrdiff_t sz = ((out->p.h + ss_ver) >> ss_ver) * stride;
  145|    122|        if (sz < 0) {
  ------------------
  |  Branch (145:13): [True: 0, False: 122]
  ------------------
  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|    122|        } else {
  153|    122|            if (!data->num_uv_points[0])
  ------------------
  |  Branch (153:17): [True: 46, False: 76]
  ------------------
  154|     46|                memcpy(out->data[1], in->data[1], sz);
  155|    122|            if (!data->num_uv_points[1])
  ------------------
  |  Branch (155:17): [True: 42, False: 80]
  ------------------
  156|     42|                memcpy(out->data[2], in->data[2], sz);
  157|    122|        }
  158|    122|    }
  159|    372|}
dav1d_apply_grain_row_8bpc:
  167|  4.62k|{
  168|       |    // Synthesize grain for the affected planes
  169|  4.62k|    const Dav1dFilmGrainData *const data = &out->frame_hdr->film_grain.data;
  170|  4.62k|    const int ss_y = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  171|  4.62k|    const int ss_x = in->p.layout != DAV1D_PIXEL_LAYOUT_I444;
  172|  4.62k|    const int cpw = (out->p.w + ss_x) >> ss_x;
  173|  4.62k|    const int is_id = out->seq_hdr->mtrx == DAV1D_MC_IDENTITY;
  174|  4.62k|    pixel *const luma_src =
  175|  4.62k|        ((pixel *) in->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(in->stride[0]);
  ------------------
  |  |   37|  4.62k|#define FG_BLOCK_SIZE 32
  ------------------
                      ((pixel *) in->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(in->stride[0]);
  ------------------
  |  |   53|  4.62k|#define PXSTRIDE(x) (x)
  ------------------
  176|       |#if BITDEPTH != 8
  177|       |    const int bitdepth_max = (1 << out->p.bpc) - 1;
  178|       |#endif
  179|       |
  180|  4.62k|    if (data->num_y_points) {
  ------------------
  |  Branch (180:9): [True: 3.34k, False: 1.28k]
  ------------------
  181|  3.34k|        const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  3.34k|#define FG_BLOCK_SIZE 32
  ------------------
                      const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  3.34k|#define FG_BLOCK_SIZE 32
  ------------------
  182|  3.34k|        dsp->fgy_32x32xn(((pixel *) out->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[0]),
  ------------------
  |  |   37|  3.34k|#define FG_BLOCK_SIZE 32
  ------------------
                      dsp->fgy_32x32xn(((pixel *) out->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[0]),
  ------------------
  |  |   53|  3.34k|#define PXSTRIDE(x) (x)
  ------------------
  183|  3.34k|                         luma_src, out->stride[0], data,
  184|  3.34k|                         out->p.w, scaling[0], grain_lut[0], bh, row HIGHBD_TAIL_SUFFIX);
  185|  3.34k|    }
  186|       |
  187|  4.62k|    if (!data->num_uv_points[0] && !data->num_uv_points[1] &&
  ------------------
  |  Branch (187:9): [True: 4.10k, False: 517]
  |  Branch (187:36): [True: 3.65k, False: 452]
  ------------------
  188|  3.65k|        !data->chroma_scaling_from_luma)
  ------------------
  |  Branch (188:9): [True: 1.47k, False: 2.18k]
  ------------------
  189|  1.47k|    {
  190|  1.47k|        return;
  191|  1.47k|    }
  192|       |
  193|  3.15k|    const int bh = (imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE) + ss_y) >> ss_y;
  ------------------
  |  |   37|  3.15k|#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.15k|#define FG_BLOCK_SIZE 32
  ------------------
  194|       |
  195|       |    // extend padding pixels
  196|  3.15k|    if (out->p.w & ss_x) {
  ------------------
  |  Branch (196:9): [True: 632, False: 2.52k]
  ------------------
  197|    632|        pixel *ptr = luma_src;
  198|  12.3k|        for (int y = 0; y < bh; y++) {
  ------------------
  |  Branch (198:25): [True: 11.7k, False: 632]
  ------------------
  199|  11.7k|            ptr[out->p.w] = ptr[out->p.w - 1];
  200|  11.7k|            ptr += PXSTRIDE(in->stride[0]) << ss_y;
  ------------------
  |  |   53|  11.7k|#define PXSTRIDE(x) (x)
  ------------------
  201|  11.7k|        }
  202|    632|    }
  203|       |
  204|  3.15k|    const ptrdiff_t uv_off = row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[1]) >> ss_y;
  ------------------
  |  |   37|  3.15k|#define FG_BLOCK_SIZE 32
  ------------------
                  const ptrdiff_t uv_off = row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[1]) >> ss_y;
  ------------------
  |  |   53|  3.15k|#define PXSTRIDE(x) (x)
  ------------------
  205|  3.15k|    if (data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (205:9): [True: 2.18k, False: 969]
  ------------------
  206|  6.54k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (206:26): [True: 4.36k, False: 2.18k]
  ------------------
  207|  4.36k|            dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  208|  4.36k|                                                ((const pixel *) in->data[1 + pl]) + uv_off,
  209|  4.36k|                                                in->stride[1], data, cpw,
  210|  4.36k|                                                scaling[0], grain_lut[1 + pl],
  211|  4.36k|                                                bh, row, luma_src, in->stride[0],
  212|  4.36k|                                                pl, is_id HIGHBD_TAIL_SUFFIX);
  213|  2.18k|    } else {
  214|  2.90k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (214:26): [True: 1.93k, False: 969]
  ------------------
  215|  1.93k|            if (data->num_uv_points[pl])
  ------------------
  |  Branch (215:17): [True: 1.20k, False: 729]
  ------------------
  216|  1.20k|                dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  217|  1.20k|                                                    ((const pixel *) in->data[1 + pl]) + uv_off,
  218|  1.20k|                                                    in->stride[1], data, cpw,
  219|  1.20k|                                                    scaling[1 + pl], grain_lut[1 + pl],
  220|  1.20k|                                                    bh, row, luma_src, in->stride[0],
  221|  1.20k|                                                    pl, is_id HIGHBD_TAIL_SUFFIX);
  222|    969|    }
  223|  3.15k|}
dav1d_apply_grain_8bpc:
  228|    372|{
  229|    372|    ALIGN_STK_16(entry, grain_lut, 3,[GRAIN_HEIGHT + 1][GRAIN_WIDTH]);
  ------------------
  |  |  100|    372|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|    372|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  230|    372|#if ARCH_X86_64 && BITDEPTH == 8
  231|    372|    ALIGN_STK_64(uint8_t, scaling, 3,[SCALING_SIZE]);
  ------------------
  |  |   96|    372|    ALIGN(type var[sz1d]sznd, ALIGN_64_VAL)
  |  |  ------------------
  |  |  |  |   86|    372|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  232|       |#else
  233|       |    uint8_t scaling[3][SCALING_SIZE];
  234|       |#endif
  235|    372|    const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    372|#define FG_BLOCK_SIZE 32
  ------------------
                  const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    372|#define FG_BLOCK_SIZE 32
  ------------------
  236|       |
  237|    372|    bitfn(dav1d_prep_grain)(dsp, out, in, scaling, grain_lut);
  ------------------
  |  |   51|    372|#define bitfn(x) x##_8bpc
  ------------------
  238|  4.99k|    for (int row = 0; row < rows; row++)
  ------------------
  |  Branch (238:23): [True: 4.62k, False: 372]
  ------------------
  239|  4.62k|        bitfn(dav1d_apply_grain_row)(dsp, out, in, scaling, grain_lut, row);
  ------------------
  |  |   51|  4.62k|#define bitfn(x) x##_8bpc
  ------------------
  240|    372|}
fg_apply_tmpl.c:generate_scaling:
   44|    467|{
   45|    467|#if BITDEPTH == 8
   46|    467|    const int shift_x = 0;
   47|    467|    const int scaling_size = SCALING_SIZE;
  ------------------
  |  |   39|    467|#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|    467|    if (num == 0) {
  ------------------
  |  Branch (54:9): [True: 60, False: 407]
  ------------------
   55|     60|        memset(scaling, 0, scaling_size);
   56|     60|        return;
   57|     60|    }
   58|       |
   59|       |    // Fill up the preceding entries with the initial value
   60|    407|    memset(scaling, points[0][1], points[0][0] << shift_x);
   61|       |
   62|       |    // Linearly interpolate the values in the middle
   63|    707|    for (int i = 0; i < num - 1; i++) {
  ------------------
  |  Branch (63:21): [True: 300, False: 407]
  ------------------
   64|    300|        const int bx = points[i][0];
   65|    300|        const int by = points[i][1];
   66|    300|        const int ex = points[i+1][0];
   67|    300|        const int ey = points[i+1][1];
   68|    300|        const int dx = ex - bx;
   69|    300|        const int dy = ey - by;
   70|    300|        assert(dx > 0);
  ------------------
  |  |  140|    300|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 300]
  |  |  |  Branch (140:68): [Folded, False: 300]
  |  |  ------------------
  ------------------
   71|    300|        const int delta = dy * ((0x10000 + (dx >> 1)) / dx);
   72|  13.1k|        for (int x = 0, d = 0x8000; x < dx; x++) {
  ------------------
  |  Branch (72:37): [True: 12.8k, False: 300]
  ------------------
   73|  12.8k|            scaling[(bx + x) << shift_x] = by + (d >> 16);
   74|  12.8k|            d += delta;
   75|  12.8k|        }
   76|    300|    }
   77|       |
   78|       |    // Fill up the remaining entries with the final value
   79|    407|    const int n = points[num - 1][0] << shift_x;
   80|    407|    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|    407|}
dav1d_prep_grain_16bpc:
  105|    322|{
  106|    322|    const Dav1dFilmGrainData *const data = &out->frame_hdr->film_grain.data;
  107|    322|#if BITDEPTH != 8
  108|    322|    const int bitdepth_max = (1 << out->p.bpc) - 1;
  109|    322|#endif
  110|       |
  111|       |    // Generate grain LUTs as needed
  112|    322|    dsp->generate_grain_y(grain_lut[0], data HIGHBD_TAIL_SUFFIX); // always needed
  ------------------
  |  |   74|    322|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  113|    322|    if (data->num_uv_points[0] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (113:9): [True: 65, False: 257]
  |  Branch (113:35): [True: 124, False: 133]
  ------------------
  114|    189|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[1], grain_lut[0],
  115|    189|                                                 data, 0 HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|    189|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  116|    322|    if (data->num_uv_points[1] || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (116:9): [True: 57, False: 265]
  |  Branch (116:35): [True: 124, False: 141]
  ------------------
  117|    181|        dsp->generate_grain_uv[in->p.layout - 1](grain_lut[2], grain_lut[0],
  118|    181|                                                 data, 1 HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|    181|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  119|       |
  120|       |    // Generate scaling LUTs as needed
  121|    322|    if (data->num_y_points || data->chroma_scaling_from_luma)
  ------------------
  |  Branch (121:9): [True: 236, False: 86]
  |  Branch (121:31): [True: 56, False: 30]
  ------------------
  122|    292|        generate_scaling(in->p.bpc, data->y_points, data->num_y_points, scaling[0]);
  123|    322|    if (data->num_uv_points[0])
  ------------------
  |  Branch (123:9): [True: 65, False: 257]
  ------------------
  124|     65|        generate_scaling(in->p.bpc, data->uv_points[0], data->num_uv_points[0], scaling[1]);
  125|    322|    if (data->num_uv_points[1])
  ------------------
  |  Branch (125:9): [True: 57, False: 265]
  ------------------
  126|     57|        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|    322|    assert(out->stride[0] == in->stride[0]);
  ------------------
  |  |  140|    322|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 322]
  |  |  |  Branch (140:68): [Folded, False: 322]
  |  |  ------------------
  ------------------
  130|    322|    if (!data->num_y_points) {
  ------------------
  |  Branch (130:9): [True: 86, False: 236]
  ------------------
  131|     86|        const ptrdiff_t stride = out->stride[0];
  132|     86|        const ptrdiff_t sz = out->p.h * stride;
  133|     86|        if (sz < 0)
  ------------------
  |  Branch (133:13): [True: 0, False: 86]
  ------------------
  134|      0|            memcpy((uint8_t*) out->data[0] + sz - stride,
  135|      0|                   (uint8_t*) in->data[0] + sz - stride, -sz);
  136|     86|        else
  137|     86|            memcpy(out->data[0], in->data[0], sz);
  138|     86|    }
  139|       |
  140|    322|    if (in->p.layout != DAV1D_PIXEL_LAYOUT_I400 && !data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (140:9): [True: 210, False: 112]
  |  Branch (140:52): [True: 86, False: 124]
  ------------------
  141|     86|        assert(out->stride[1] == in->stride[1]);
  ------------------
  |  |  140|     86|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 86]
  |  |  |  Branch (140:68): [Folded, False: 86]
  |  |  ------------------
  ------------------
  142|     86|        const int ss_ver = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  143|     86|        const ptrdiff_t stride = out->stride[1];
  144|     86|        const ptrdiff_t sz = ((out->p.h + ss_ver) >> ss_ver) * stride;
  145|     86|        if (sz < 0) {
  ------------------
  |  Branch (145:13): [True: 0, False: 86]
  ------------------
  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|     86|        } else {
  153|     86|            if (!data->num_uv_points[0])
  ------------------
  |  Branch (153:17): [True: 21, False: 65]
  ------------------
  154|     21|                memcpy(out->data[1], in->data[1], sz);
  155|     86|            if (!data->num_uv_points[1])
  ------------------
  |  Branch (155:17): [True: 29, False: 57]
  ------------------
  156|     29|                memcpy(out->data[2], in->data[2], sz);
  157|     86|        }
  158|     86|    }
  159|    322|}
dav1d_apply_grain_row_16bpc:
  167|  3.14k|{
  168|       |    // Synthesize grain for the affected planes
  169|  3.14k|    const Dav1dFilmGrainData *const data = &out->frame_hdr->film_grain.data;
  170|  3.14k|    const int ss_y = in->p.layout == DAV1D_PIXEL_LAYOUT_I420;
  171|  3.14k|    const int ss_x = in->p.layout != DAV1D_PIXEL_LAYOUT_I444;
  172|  3.14k|    const int cpw = (out->p.w + ss_x) >> ss_x;
  173|  3.14k|    const int is_id = out->seq_hdr->mtrx == DAV1D_MC_IDENTITY;
  174|  3.14k|    pixel *const luma_src =
  175|  3.14k|        ((pixel *) in->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(in->stride[0]);
  ------------------
  |  |   37|  3.14k|#define FG_BLOCK_SIZE 32
  ------------------
  176|  3.14k|#if BITDEPTH != 8
  177|  3.14k|    const int bitdepth_max = (1 << out->p.bpc) - 1;
  178|  3.14k|#endif
  179|       |
  180|  3.14k|    if (data->num_y_points) {
  ------------------
  |  Branch (180:9): [True: 1.94k, False: 1.20k]
  ------------------
  181|  1.94k|        const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  1.94k|#define FG_BLOCK_SIZE 32
  ------------------
                      const int bh = imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE);
  ------------------
  |  |   37|  1.94k|#define FG_BLOCK_SIZE 32
  ------------------
  182|  1.94k|        dsp->fgy_32x32xn(((pixel *) out->data[0]) + row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[0]),
  ------------------
  |  |   37|  1.94k|#define FG_BLOCK_SIZE 32
  ------------------
  183|  1.94k|                         luma_src, out->stride[0], data,
  184|  1.94k|                         out->p.w, scaling[0], grain_lut[0], bh, row HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|  1.94k|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  185|  1.94k|    }
  186|       |
  187|  3.14k|    if (!data->num_uv_points[0] && !data->num_uv_points[1] &&
  ------------------
  |  Branch (187:9): [True: 2.74k, False: 394]
  |  Branch (187:36): [True: 2.36k, False: 381]
  ------------------
  188|  2.36k|        !data->chroma_scaling_from_luma)
  ------------------
  |  Branch (188:9): [True: 654, False: 1.71k]
  ------------------
  189|    654|    {
  190|    654|        return;
  191|    654|    }
  192|       |
  193|  2.48k|    const int bh = (imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE) + ss_y) >> ss_y;
  ------------------
  |  |   37|  2.48k|#define FG_BLOCK_SIZE 32
  ------------------
                  const int bh = (imin(out->p.h - row * FG_BLOCK_SIZE, FG_BLOCK_SIZE) + ss_y) >> ss_y;
  ------------------
  |  |   37|  2.48k|#define FG_BLOCK_SIZE 32
  ------------------
  194|       |
  195|       |    // extend padding pixels
  196|  2.48k|    if (out->p.w & ss_x) {
  ------------------
  |  Branch (196:9): [True: 759, False: 1.72k]
  ------------------
  197|    759|        pixel *ptr = luma_src;
  198|  12.9k|        for (int y = 0; y < bh; y++) {
  ------------------
  |  Branch (198:25): [True: 12.1k, False: 759]
  ------------------
  199|  12.1k|            ptr[out->p.w] = ptr[out->p.w - 1];
  200|  12.1k|            ptr += PXSTRIDE(in->stride[0]) << ss_y;
  201|  12.1k|        }
  202|    759|    }
  203|       |
  204|  2.48k|    const ptrdiff_t uv_off = row * FG_BLOCK_SIZE * PXSTRIDE(out->stride[1]) >> ss_y;
  ------------------
  |  |   37|  2.48k|#define FG_BLOCK_SIZE 32
  ------------------
  205|  2.48k|    if (data->chroma_scaling_from_luma) {
  ------------------
  |  Branch (205:9): [True: 1.71k, False: 775]
  ------------------
  206|  5.13k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (206:26): [True: 3.42k, False: 1.71k]
  ------------------
  207|  3.42k|            dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  208|  3.42k|                                                ((const pixel *) in->data[1 + pl]) + uv_off,
  209|  3.42k|                                                in->stride[1], data, cpw,
  210|  3.42k|                                                scaling[0], grain_lut[1 + pl],
  211|  3.42k|                                                bh, row, luma_src, in->stride[0],
  212|  3.42k|                                                pl, is_id HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|  3.42k|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  213|  1.71k|    } else {
  214|  2.32k|        for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (214:26): [True: 1.55k, False: 775]
  ------------------
  215|  1.55k|            if (data->num_uv_points[pl])
  ------------------
  |  Branch (215:17): [True: 871, False: 679]
  ------------------
  216|    871|                dsp->fguv_32x32xn[in->p.layout - 1](((pixel *) out->data[1 + pl]) + uv_off,
  217|    871|                                                    ((const pixel *) in->data[1 + pl]) + uv_off,
  218|    871|                                                    in->stride[1], data, cpw,
  219|    871|                                                    scaling[1 + pl], grain_lut[1 + pl],
  220|    871|                                                    bh, row, luma_src, in->stride[0],
  221|    871|                                                    pl, is_id HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |   74|    871|#define HIGHBD_TAIL_SUFFIX , bitdepth_max
  ------------------
  222|    775|    }
  223|  2.48k|}
dav1d_apply_grain_16bpc:
  228|    322|{
  229|    322|    ALIGN_STK_16(entry, grain_lut, 3,[GRAIN_HEIGHT + 1][GRAIN_WIDTH]);
  ------------------
  |  |  100|    322|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|    322|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  230|       |#if ARCH_X86_64 && BITDEPTH == 8
  231|       |    ALIGN_STK_64(uint8_t, scaling, 3,[SCALING_SIZE]);
  232|       |#else
  233|    322|    uint8_t scaling[3][SCALING_SIZE];
  234|    322|#endif
  235|    322|    const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    322|#define FG_BLOCK_SIZE 32
  ------------------
                  const int rows = (out->p.h + FG_BLOCK_SIZE - 1) / FG_BLOCK_SIZE;
  ------------------
  |  |   37|    322|#define FG_BLOCK_SIZE 32
  ------------------
  236|       |
  237|    322|    bitfn(dav1d_prep_grain)(dsp, out, in, scaling, grain_lut);
  ------------------
  |  |   77|    322|#define bitfn(x) x##_16bpc
  ------------------
  238|  3.46k|    for (int row = 0; row < rows; row++)
  ------------------
  |  Branch (238:23): [True: 3.14k, False: 322]
  ------------------
  239|  3.14k|        bitfn(dav1d_apply_grain_row)(dsp, out, in, scaling, grain_lut, row);
  ------------------
  |  |   77|  3.14k|#define bitfn(x) x##_16bpc
  ------------------
  240|    322|}

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

dav1d_init_get_bits:
   38|  49.0k|{
   39|  49.0k|    assert(sz);
  ------------------
  |  |  140|  49.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 49.0k]
  |  |  |  Branch (140:68): [Folded, False: 49.0k]
  |  |  ------------------
  ------------------
   40|  49.0k|    c->ptr = c->ptr_start = data;
   41|  49.0k|    c->ptr_end = &c->ptr_start[sz];
   42|  49.0k|    c->state = 0;
   43|  49.0k|    c->bits_left = 0;
   44|  49.0k|    c->error = 0;
   45|  49.0k|}
dav1d_get_bit:
   47|  1.50M|unsigned dav1d_get_bit(GetBits *const c) {
   48|  1.50M|    if (!c->bits_left) {
  ------------------
  |  Branch (48:9): [True: 215k, False: 1.29M]
  ------------------
   49|   215k|        if (c->ptr >= c->ptr_end) {
  ------------------
  |  Branch (49:13): [True: 210, False: 215k]
  ------------------
   50|    210|            c->error = 1;
   51|   215k|        } else {
   52|   215k|            const unsigned state = *c->ptr++;
   53|   215k|            c->bits_left = 7;
   54|   215k|            c->state = (uint64_t) state << 57;
   55|   215k|            return state >> 7;
   56|   215k|        }
   57|   215k|    }
   58|       |
   59|  1.29M|    const uint64_t state = c->state;
   60|  1.29M|    c->bits_left--;
   61|  1.29M|    c->state = state << 1;
   62|  1.29M|    return (unsigned) (state >> 63);
   63|  1.50M|}
dav1d_get_bits:
   81|   666k|type name(GetBits *const c, const int n) {      \
   82|   666k|    assert(n > 0 && n <= 32);                   \
  ------------------
  |  |  140|  1.33M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 666k, False: 0]
  |  |  |  Branch (140:30): [True: 666k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 666k]
  |  |  ------------------
  ------------------
   83|   666k|    /* Unsigned cast avoids refill after eob */ \
   84|   666k|    if ((unsigned) n > (unsigned) c->bits_left) \
  ------------------
  |  Branch (84:9): [True: 371k, False: 295k]
  ------------------
   85|   666k|        refill(c, n);                           \
   86|   666k|    const uint64_t state = c->state;            \
   87|   666k|    c->bits_left -= n;                          \
   88|   666k|    c->state = state << n;                      \
   89|   666k|    return (type) ((type64) state >> (64 - n)); \
   90|   666k|}
dav1d_get_sbits:
   81|   170k|type name(GetBits *const c, const int n) {      \
   82|   170k|    assert(n > 0 && n <= 32);                   \
  ------------------
  |  |  140|   341k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 170k, False: 0]
  |  |  |  Branch (140:30): [True: 170k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 170k]
  |  |  ------------------
  ------------------
   83|   170k|    /* Unsigned cast avoids refill after eob */ \
   84|   170k|    if ((unsigned) n > (unsigned) c->bits_left) \
  ------------------
  |  Branch (84:9): [True: 154k, False: 16.5k]
  ------------------
   85|   170k|        refill(c, n);                           \
   86|   170k|    const uint64_t state = c->state;            \
   87|   170k|    c->bits_left -= n;                          \
   88|   170k|    c->state = state << n;                      \
   89|   170k|    return (type) ((type64) state >> (64 - n)); \
   90|   170k|}
dav1d_get_uleb128:
   95|  37.2k|unsigned dav1d_get_uleb128(GetBits *const c) {
   96|  37.2k|    uint64_t val = 0;
   97|  37.2k|    unsigned i = 0, more;
   98|       |
   99|  40.5k|    do {
  100|  40.5k|        const int v = dav1d_get_bits(c, 8);
  101|  40.5k|        more = v & 0x80;
  102|  40.5k|        val |= ((uint64_t) (v & 0x7F)) << i;
  103|  40.5k|        i += 7;
  104|  40.5k|    } while (more && i < 56);
  ------------------
  |  Branch (104:14): [True: 3.32k, False: 37.2k]
  |  Branch (104:22): [True: 3.30k, False: 20]
  ------------------
  105|       |
  106|  37.2k|    if (val > UINT32_MAX || more) {
  ------------------
  |  Branch (106:9): [True: 73, False: 37.1k]
  |  Branch (106:29): [True: 1, False: 37.1k]
  ------------------
  107|     74|        c->error = 1;
  108|     74|        return 0;
  109|     74|    }
  110|       |
  111|  37.1k|    return (unsigned) val;
  112|  37.2k|}
dav1d_get_uniform:
  114|  10.4k|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|  10.4k|    assert(max > 1);
  ------------------
  |  |  140|  10.4k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 10.4k]
  |  |  |  Branch (140:68): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
  118|  10.4k|    const int l = ulog2(max) + 1;
  119|  10.4k|    assert(l > 1);
  ------------------
  |  |  140|  10.4k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 10.4k]
  |  |  |  Branch (140:68): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
  120|  10.4k|    const unsigned m = (1U << l) - max;
  121|  10.4k|    const unsigned v = dav1d_get_bits(c, l - 1);
  122|  10.4k|    return v < m ? v : (v << 1) - m + dav1d_get_bit(c);
  ------------------
  |  Branch (122:12): [True: 7.95k, False: 2.50k]
  ------------------
  123|  10.4k|}
dav1d_get_vlc:
  125|    278|unsigned dav1d_get_vlc(GetBits *const c) {
  126|    278|    if (dav1d_get_bit(c))
  ------------------
  |  Branch (126:9): [True: 94, False: 184]
  ------------------
  127|     94|        return 0;
  128|       |
  129|    184|    int n_bits = 0;
  130|  1.48k|    do {
  131|  1.48k|        if (++n_bits == 32)
  ------------------
  |  Branch (131:13): [True: 8, False: 1.47k]
  ------------------
  132|      8|            return UINT32_MAX;
  133|  1.48k|    } while (!dav1d_get_bit(c));
  ------------------
  |  Branch (133:14): [True: 1.29k, False: 176]
  ------------------
  134|       |
  135|    176|    return ((1U << n_bits) - 1) + dav1d_get_bits(c, n_bits);
  136|    184|}
dav1d_get_bits_subexp:
  162|  30.1k|int dav1d_get_bits_subexp(GetBits *const c, const int ref, const unsigned n) {
  163|  30.1k|    return (int) get_bits_subexp_u(c, ref + (1 << n), 2 << n) - (1 << n);
  164|  30.1k|}
getbits.c:refill:
   65|   525k|static inline void refill(GetBits *const c, const int n) {
   66|   525k|    assert(c->bits_left >= 0 && c->bits_left < 32);
  ------------------
  |  |  140|  1.05M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 525k, False: 0]
  |  |  |  Branch (140:30): [True: 525k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 525k]
  |  |  ------------------
  ------------------
   67|   525k|    unsigned state = 0;
   68|   559k|    do {
   69|   559k|        if (c->ptr >= c->ptr_end) {
  ------------------
  |  Branch (69:13): [True: 478, False: 559k]
  ------------------
   70|    478|            c->error = 1;
   71|    478|            if (state) break;
  ------------------
  |  Branch (71:17): [True: 87, False: 391]
  ------------------
   72|    391|            return;
   73|    478|        }
   74|   559k|        state = (state << 8) | *c->ptr++;
   75|   559k|        c->bits_left += 8;
   76|   559k|    } while (n > c->bits_left);
  ------------------
  |  Branch (76:14): [True: 33.9k, False: 525k]
  ------------------
   77|   525k|    c->state |= (uint64_t) state << (64 - c->bits_left);
   78|   525k|}
getbits.c:get_bits_subexp_u:
  140|  30.1k|{
  141|  30.1k|    unsigned v = 0;
  142|       |
  143|  55.7k|    for (int i = 0;; i++) {
  144|  55.7k|        const int b = i ? 3 + i - 1 : 3;
  ------------------
  |  Branch (144:23): [True: 25.5k, False: 30.1k]
  ------------------
  145|       |
  146|  55.7k|        if (n < v + 3 * (1 << b)) {
  ------------------
  |  Branch (146:13): [True: 346, False: 55.4k]
  ------------------
  147|    346|            v += dav1d_get_uniform(c, n - v + 1);
  148|    346|            break;
  149|    346|        }
  150|       |
  151|  55.4k|        if (!dav1d_get_bit(c)) {
  ------------------
  |  Branch (151:13): [True: 29.8k, False: 25.5k]
  ------------------
  152|  29.8k|            v += dav1d_get_bits(c, b);
  153|  29.8k|            break;
  154|  29.8k|        }
  155|       |
  156|  25.5k|        v += 1 << b;
  157|  25.5k|    }
  158|       |
  159|  30.1k|    return ref * 2 <= n ? inv_recenter(ref, v) : n - inv_recenter(n - ref, v);
  ------------------
  |  Branch (159:12): [True: 29.2k, False: 948]
  ------------------
  160|  30.1k|}

obu.c:dav1d_bytealign_get_bits:
   52|  38.2k|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|  38.2k|    assert(c->bits_left <= 7);
  ------------------
  |  |  140|  38.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 38.2k]
  |  |  |  Branch (140:68): [Folded, False: 38.2k]
  |  |  ------------------
  ------------------
   61|       |
   62|  38.2k|    c->bits_left = 0;
   63|  38.2k|    c->state = 0;
   64|  38.2k|}

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|  4.33M|static inline int sm_flag(const BlockContext *const b, const int idx) {
   96|  4.33M|    if (!b->intra[idx]) return 0;
  ------------------
  |  Branch (96:9): [True: 55.8k, False: 4.27M]
  ------------------
   97|  4.27M|    const enum IntraPredMode m = b->mode[idx];
   98|  4.27M|    return (m == SMOOTH_PRED || m == SMOOTH_H_PRED ||
  ------------------
  |  Branch (98:13): [True: 283k, False: 3.99M]
  |  Branch (98:33): [True: 95.6k, False: 3.89M]
  ------------------
   99|  3.89M|            m == SMOOTH_V_PRED) ? ANGLE_SMOOTH_EDGE_FLAG : 0;
  ------------------
  |  |   93|   441k|#define ANGLE_SMOOTH_EDGE_FLAG      512
  ------------------
  |  Branch (99:13): [True: 61.7k, False: 3.83M]
  ------------------
  100|  4.33M|}
recon_tmpl.c:sm_uv_flag:
  102|  3.63M|static inline int sm_uv_flag(const BlockContext *const b, const int idx) {
  103|  3.63M|    const enum IntraPredMode m = b->uvmode[idx];
  104|  3.63M|    return (m == SMOOTH_PRED || m == SMOOTH_H_PRED ||
  ------------------
  |  Branch (104:13): [True: 199k, False: 3.43M]
  |  Branch (104:33): [True: 86.7k, False: 3.35M]
  ------------------
  105|  3.35M|            m == SMOOTH_V_PRED) ? ANGLE_SMOOTH_EDGE_FLAG : 0;
  ------------------
  |  |   93|   348k|#define ANGLE_SMOOTH_EDGE_FLAG      512
  ------------------
  |  Branch (105:13): [True: 62.1k, False: 3.28M]
  ------------------
  106|  3.63M|}

dav1d_prepare_intra_edges_8bpc:
   86|  2.59M|{
   87|  2.59M|    const int bitdepth = bitdepth_from_max(bitdepth_max);
  ------------------
  |  |   58|  2.59M|#define bitdepth_from_max(x) 8
  ------------------
   88|  2.59M|    assert(y < h && x < w);
  ------------------
  |  |  140|  5.19M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 2.59M, False: 0]
  |  |  |  Branch (140:30): [True: 2.59M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 2.59M]
  |  |  ------------------
  ------------------
   89|       |
   90|  2.59M|    switch (mode) {
   91|   132k|    case VERT_PRED:
  ------------------
  |  Branch (91:5): [True: 132k, False: 2.46M]
  ------------------
   92|   358k|    case HOR_PRED:
  ------------------
  |  Branch (92:5): [True: 226k, False: 2.37M]
  ------------------
   93|   409k|    case DIAG_DOWN_LEFT_PRED:
  ------------------
  |  Branch (93:5): [True: 50.8k, False: 2.54M]
  ------------------
   94|   459k|    case DIAG_DOWN_RIGHT_PRED:
  ------------------
  |  Branch (94:5): [True: 50.1k, False: 2.54M]
  ------------------
   95|   498k|    case VERT_RIGHT_PRED:
  ------------------
  |  Branch (95:5): [True: 39.5k, False: 2.55M]
  ------------------
   96|   564k|    case HOR_DOWN_PRED:
  ------------------
  |  Branch (96:5): [True: 66.1k, False: 2.53M]
  ------------------
   97|   672k|    case HOR_UP_PRED:
  ------------------
  |  Branch (97:5): [True: 107k, False: 2.49M]
  ------------------
   98|   739k|    case VERT_LEFT_PRED: {
  ------------------
  |  Branch (98:5): [True: 66.6k, False: 2.53M]
  ------------------
   99|   739k|        *angle = av1_mode_to_angle_map[mode - VERT_PRED] + 3 * *angle;
  100|       |
  101|   739k|        if (*angle <= 90)
  ------------------
  |  Branch (101:13): [True: 217k, False: 521k]
  ------------------
  102|   217k|            mode = *angle < 90 && have_top ? Z1_PRED : VERT_PRED;
  ------------------
  |  Branch (102:20): [True: 143k, False: 73.9k]
  |  Branch (102:35): [True: 131k, False: 11.8k]
  ------------------
  103|   521k|        else if (*angle < 180)
  ------------------
  |  Branch (103:18): [True: 232k, False: 288k]
  ------------------
  104|   232k|            mode = Z2_PRED;
  105|   288k|        else
  106|   288k|            mode = *angle > 180 && have_left ? Z3_PRED : HOR_PRED;
  ------------------
  |  Branch (106:20): [True: 162k, False: 126k]
  |  Branch (106:36): [True: 151k, False: 11.3k]
  ------------------
  107|   739k|        break;
  108|   672k|    }
  109|  1.11M|    case DC_PRED:
  ------------------
  |  Branch (109:5): [True: 1.11M, False: 1.48M]
  ------------------
  110|  1.38M|    case PAETH_PRED:
  ------------------
  |  Branch (110:5): [True: 269k, False: 2.32M]
  ------------------
  111|  1.38M|        mode = av1_mode_conv[mode][have_left][have_top];
  112|  1.38M|        break;
  113|   471k|    default:
  ------------------
  |  Branch (113:5): [True: 471k, False: 2.12M]
  ------------------
  114|   471k|        break;
  115|  2.59M|    }
  116|       |
  117|  2.59M|    const pixel *dst_top;
  118|  2.59M|    if (have_top &&
  ------------------
  |  Branch (118:9): [True: 2.34M, False: 247k]
  ------------------
  119|  2.34M|        (av1_intra_prediction_edges[mode].needs_top ||
  ------------------
  |  Branch (119:10): [True: 2.08M, False: 263k]
  ------------------
  120|   263k|         av1_intra_prediction_edges[mode].needs_topleft ||
  ------------------
  |  Branch (120:10): [True: 137k, False: 126k]
  ------------------
  121|   126k|         (av1_intra_prediction_edges[mode].needs_left && !have_left)))
  ------------------
  |  Branch (121:11): [True: 126k, False: 0]
  |  Branch (121:58): [True: 16.6k, False: 110k]
  ------------------
  122|  2.23M|    {
  123|  2.23M|        if (prefilter_toplevel_sb_edge) {
  ------------------
  |  Branch (123:13): [True: 256k, False: 1.98M]
  ------------------
  124|   256k|            dst_top = &prefilter_toplevel_sb_edge[x * 4];
  125|  1.98M|        } else {
  126|  1.98M|            dst_top = &dst[-PXSTRIDE(stride)];
  ------------------
  |  |   53|  1.98M|#define PXSTRIDE(x) (x)
  ------------------
  127|  1.98M|        }
  128|  2.23M|    }
  129|       |
  130|  2.59M|    if (av1_intra_prediction_edges[mode].needs_left) {
  ------------------
  |  Branch (130:9): [True: 2.26M, False: 333k]
  ------------------
  131|  2.26M|        const int sz = th << 2;
  132|  2.26M|        pixel *const left = &topleft_out[-sz];
  133|       |
  134|  2.26M|        if (have_left) {
  ------------------
  |  Branch (134:13): [True: 2.19M, False: 69.4k]
  ------------------
  135|  2.19M|            const int px_have = imin(sz, (h - y) << 2);
  136|       |
  137|  26.7M|            for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (137:29): [True: 24.5M, False: 2.19M]
  ------------------
  138|  24.5M|                left[sz - 1 - i] = dst[PXSTRIDE(stride) * i - 1];
  ------------------
  |  |   53|  24.5M|#define PXSTRIDE(x) (x)
  ------------------
  139|  2.19M|            if (px_have < sz)
  ------------------
  |  Branch (139:17): [True: 43.5k, False: 2.15M]
  ------------------
  140|  43.5k|                pixel_set(left, left[sz - px_have], sz - px_have);
  ------------------
  |  |   48|  43.5k|#define pixel_set memset
  ------------------
  141|  2.19M|        } else {
  142|  69.4k|            pixel_set(left, have_top ? *dst_top : ((1 << bitdepth) >> 1) + 1, sz);
  ------------------
  |  |   48|  69.4k|#define pixel_set memset
  ------------------
  |  Branch (142:29): [True: 64.4k, False: 4.99k]
  ------------------
  143|  69.4k|        }
  144|       |
  145|  2.26M|        if (av1_intra_prediction_edges[mode].needs_bottomleft) {
  ------------------
  |  Branch (145:13): [True: 151k, False: 2.11M]
  ------------------
  146|   151k|            const int have_bottomleft = (!have_left || y + th >= h) ? 0 :
  ------------------
  |  Branch (146:42): [True: 0, False: 151k]
  |  Branch (146:56): [True: 12.7k, False: 138k]
  ------------------
  147|   151k|                                        (edge_flags & EDGE_I444_LEFT_HAS_BOTTOM);
  148|       |
  149|   151k|            if (have_bottomleft) {
  ------------------
  |  Branch (149:17): [True: 40.3k, False: 110k]
  ------------------
  150|  40.3k|                const int px_have = imin(sz, (h - y - th) << 2);
  151|       |
  152|   442k|                for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (152:33): [True: 402k, False: 40.3k]
  ------------------
  153|   402k|                    left[-(i + 1)] = dst[(sz + i) * PXSTRIDE(stride) - 1];
  ------------------
  |  |   53|   402k|#define PXSTRIDE(x) (x)
  ------------------
  154|  40.3k|                if (px_have < sz)
  ------------------
  |  Branch (154:21): [True: 612, False: 39.6k]
  ------------------
  155|    612|                    pixel_set(left - sz, left[-px_have], sz - px_have);
  ------------------
  |  |   48|    612|#define pixel_set memset
  ------------------
  156|   110k|            } else {
  157|   110k|                pixel_set(left - sz, left[0], sz);
  ------------------
  |  |   48|   110k|#define pixel_set memset
  ------------------
  158|   110k|            }
  159|   151k|        }
  160|  2.26M|    }
  161|       |
  162|  2.59M|    if (av1_intra_prediction_edges[mode].needs_top) {
  ------------------
  |  Branch (162:9): [True: 2.16M, False: 432k]
  ------------------
  163|  2.16M|        const int sz = tw << 2;
  164|  2.16M|        pixel *const top = &topleft_out[1];
  165|       |
  166|  2.16M|        if (have_top) {
  ------------------
  |  Branch (166:13): [True: 2.08M, False: 79.5k]
  ------------------
  167|  2.08M|            const int px_have = imin(sz, (w - x) << 2);
  168|  2.08M|            pixel_copy(top, dst_top, px_have);
  ------------------
  |  |   47|  2.08M|#define pixel_copy memcpy
  ------------------
  169|  2.08M|            if (px_have < sz)
  ------------------
  |  Branch (169:17): [True: 76.9k, False: 2.00M]
  ------------------
  170|  76.9k|                pixel_set(top + px_have, top[px_have - 1], sz - px_have);
  ------------------
  |  |   48|  76.9k|#define pixel_set memset
  ------------------
  171|  2.08M|        } else {
  172|  79.5k|            pixel_set(top, have_left ? dst[-1] : ((1 << bitdepth) >> 1) - 1, sz);
  ------------------
  |  |   48|  79.5k|#define pixel_set memset
  ------------------
  |  Branch (172:28): [True: 74.8k, False: 4.77k]
  ------------------
  173|  79.5k|        }
  174|       |
  175|  2.16M|        if (av1_intra_prediction_edges[mode].needs_topright) {
  ------------------
  |  Branch (175:13): [True: 131k, False: 2.03M]
  ------------------
  176|   131k|            const int have_topright = (!have_top || x + tw >= w) ? 0 :
  ------------------
  |  Branch (176:40): [True: 0, False: 131k]
  |  Branch (176:53): [True: 11.9k, False: 119k]
  ------------------
  177|   131k|                                      (edge_flags & EDGE_I444_TOP_HAS_RIGHT);
  178|       |
  179|   131k|            if (have_topright) {
  ------------------
  |  Branch (179:17): [True: 85.9k, False: 45.8k]
  ------------------
  180|  85.9k|                const int px_have = imin(sz, (w - x - tw) << 2);
  181|       |
  182|  85.9k|                pixel_copy(top + sz, &dst_top[sz], px_have);
  ------------------
  |  |   47|  85.9k|#define pixel_copy memcpy
  ------------------
  183|  85.9k|                if (px_have < sz)
  ------------------
  |  Branch (183:21): [True: 2.00k, False: 83.9k]
  ------------------
  184|  2.00k|                    pixel_set(top + sz + px_have, top[sz + px_have - 1],
  ------------------
  |  |   48|  2.00k|#define pixel_set memset
  ------------------
  185|  2.00k|                              sz - px_have);
  186|  85.9k|            } else {
  187|  45.8k|                pixel_set(top + sz, top[sz - 1], sz);
  ------------------
  |  |   48|  45.8k|#define pixel_set memset
  ------------------
  188|  45.8k|            }
  189|   131k|        }
  190|  2.16M|    }
  191|       |
  192|  2.59M|    if (av1_intra_prediction_edges[mode].needs_topleft) {
  ------------------
  |  Branch (192:9): [True: 861k, False: 1.73M]
  ------------------
  193|   861k|        if (have_left)
  ------------------
  |  Branch (193:13): [True: 828k, False: 32.8k]
  ------------------
  194|   828k|            *topleft_out = have_top ? dst_top[-1] : dst[-1];
  ------------------
  |  Branch (194:28): [True: 789k, False: 39.1k]
  ------------------
  195|  32.8k|        else
  196|  32.8k|            *topleft_out = have_top ? *dst_top : (1 << bitdepth) >> 1;
  ------------------
  |  Branch (196:28): [True: 31.5k, False: 1.27k]
  ------------------
  197|       |
  198|   861k|        if (mode == Z2_PRED && tw + th >= 6 && filter_edge)
  ------------------
  |  Branch (198:13): [True: 232k, False: 628k]
  |  Branch (198:32): [True: 88.0k, False: 144k]
  |  Branch (198:48): [True: 49.3k, False: 38.6k]
  ------------------
  199|  49.3k|            *topleft_out = ((topleft_out[-1] + topleft_out[1]) * 5 +
  200|  49.3k|                            topleft_out[0] * 6 + 8) >> 4;
  201|   861k|    }
  202|       |
  203|  2.59M|    return mode;
  204|  2.59M|}
dav1d_prepare_intra_edges_16bpc:
   86|  5.20M|{
   87|  5.20M|    const int bitdepth = bitdepth_from_max(bitdepth_max);
  ------------------
  |  |   75|  5.20M|#define bitdepth_from_max(bitdepth_max) (32 - clz(bitdepth_max))
  ------------------
   88|  5.20M|    assert(y < h && x < w);
  ------------------
  |  |  140|  10.4M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 5.20M, False: 0]
  |  |  |  Branch (140:30): [True: 5.20M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 5.20M]
  |  |  ------------------
  ------------------
   89|       |
   90|  5.20M|    switch (mode) {
   91|   206k|    case VERT_PRED:
  ------------------
  |  Branch (91:5): [True: 206k, False: 5.00M]
  ------------------
   92|   554k|    case HOR_PRED:
  ------------------
  |  Branch (92:5): [True: 347k, False: 4.86M]
  ------------------
   93|   618k|    case DIAG_DOWN_LEFT_PRED:
  ------------------
  |  Branch (93:5): [True: 64.3k, False: 5.14M]
  ------------------
   94|   693k|    case DIAG_DOWN_RIGHT_PRED:
  ------------------
  |  Branch (94:5): [True: 75.3k, False: 5.13M]
  ------------------
   95|   748k|    case VERT_RIGHT_PRED:
  ------------------
  |  Branch (95:5): [True: 54.8k, False: 5.15M]
  ------------------
   96|   834k|    case HOR_DOWN_PRED:
  ------------------
  |  Branch (96:5): [True: 85.9k, False: 5.12M]
  ------------------
   97|   980k|    case HOR_UP_PRED:
  ------------------
  |  Branch (97:5): [True: 145k, False: 5.06M]
  ------------------
   98|  1.06M|    case VERT_LEFT_PRED: {
  ------------------
  |  Branch (98:5): [True: 88.5k, False: 5.11M]
  ------------------
   99|  1.06M|        *angle = av1_mode_to_angle_map[mode - VERT_PRED] + 3 * *angle;
  100|       |
  101|  1.06M|        if (*angle <= 90)
  ------------------
  |  Branch (101:13): [True: 303k, False: 764k]
  ------------------
  102|   303k|            mode = *angle < 90 && have_top ? Z1_PRED : VERT_PRED;
  ------------------
  |  Branch (102:20): [True: 196k, False: 107k]
  |  Branch (102:35): [True: 177k, False: 18.6k]
  ------------------
  103|   764k|        else if (*angle < 180)
  ------------------
  |  Branch (103:18): [True: 351k, False: 413k]
  ------------------
  104|   351k|            mode = Z2_PRED;
  105|   413k|        else
  106|   413k|            mode = *angle > 180 && have_left ? Z3_PRED : HOR_PRED;
  ------------------
  |  Branch (106:20): [True: 220k, False: 192k]
  |  Branch (106:36): [True: 204k, False: 15.7k]
  ------------------
  107|  1.06M|        break;
  108|   980k|    }
  109|  3.19M|    case DC_PRED:
  ------------------
  |  Branch (109:5): [True: 3.19M, False: 2.01M]
  ------------------
  110|  3.50M|    case PAETH_PRED:
  ------------------
  |  Branch (110:5): [True: 311k, False: 4.89M]
  ------------------
  111|  3.50M|        mode = av1_mode_conv[mode][have_left][have_top];
  112|  3.50M|        break;
  113|   632k|    default:
  ------------------
  |  Branch (113:5): [True: 632k, False: 4.57M]
  ------------------
  114|   632k|        break;
  115|  5.20M|    }
  116|       |
  117|  5.20M|    const pixel *dst_top;
  118|  5.20M|    if (have_top &&
  ------------------
  |  Branch (118:9): [True: 4.74M, False: 459k]
  ------------------
  119|  4.74M|        (av1_intra_prediction_edges[mode].needs_top ||
  ------------------
  |  Branch (119:10): [True: 4.37M, False: 372k]
  ------------------
  120|   372k|         av1_intra_prediction_edges[mode].needs_topleft ||
  ------------------
  |  Branch (120:10): [True: 182k, False: 189k]
  ------------------
  121|   189k|         (av1_intra_prediction_edges[mode].needs_left && !have_left)))
  ------------------
  |  Branch (121:11): [True: 189k, False: 0]
  |  Branch (121:58): [True: 25.1k, False: 164k]
  ------------------
  122|  4.58M|    {
  123|  4.58M|        if (prefilter_toplevel_sb_edge) {
  ------------------
  |  Branch (123:13): [True: 605k, False: 3.97M]
  ------------------
  124|   605k|            dst_top = &prefilter_toplevel_sb_edge[x * 4];
  125|  3.97M|        } else {
  126|  3.97M|            dst_top = &dst[-PXSTRIDE(stride)];
  127|  3.97M|        }
  128|  4.58M|    }
  129|       |
  130|  5.20M|    if (av1_intra_prediction_edges[mode].needs_left) {
  ------------------
  |  Branch (130:9): [True: 4.71M, False: 495k]
  ------------------
  131|  4.71M|        const int sz = th << 2;
  132|  4.71M|        pixel *const left = &topleft_out[-sz];
  133|       |
  134|  4.71M|        if (have_left) {
  ------------------
  |  Branch (134:13): [True: 4.60M, False: 110k]
  ------------------
  135|  4.60M|            const int px_have = imin(sz, (h - y) << 2);
  136|       |
  137|  62.8M|            for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (137:29): [True: 58.2M, False: 4.60M]
  ------------------
  138|  58.2M|                left[sz - 1 - i] = dst[PXSTRIDE(stride) * i - 1];
  139|  4.60M|            if (px_have < sz)
  ------------------
  |  Branch (139:17): [True: 93.3k, False: 4.50M]
  ------------------
  140|  93.3k|                pixel_set(left, left[sz - px_have], sz - px_have);
  141|  4.60M|        } else {
  142|   110k|            pixel_set(left, have_top ? *dst_top : ((1 << bitdepth) >> 1) + 1, sz);
  ------------------
  |  Branch (142:29): [True: 103k, False: 6.46k]
  ------------------
  143|   110k|        }
  144|       |
  145|  4.71M|        if (av1_intra_prediction_edges[mode].needs_bottomleft) {
  ------------------
  |  Branch (145:13): [True: 204k, False: 4.50M]
  ------------------
  146|   204k|            const int have_bottomleft = (!have_left || y + th >= h) ? 0 :
  ------------------
  |  Branch (146:42): [True: 0, False: 204k]
  |  Branch (146:56): [True: 20.7k, False: 183k]
  ------------------
  147|   204k|                                        (edge_flags & EDGE_I444_LEFT_HAS_BOTTOM);
  148|       |
  149|   204k|            if (have_bottomleft) {
  ------------------
  |  Branch (149:17): [True: 69.7k, False: 134k]
  ------------------
  150|  69.7k|                const int px_have = imin(sz, (h - y - th) << 2);
  151|       |
  152|   895k|                for (int i = 0; i < px_have; i++)
  ------------------
  |  Branch (152:33): [True: 825k, False: 69.7k]
  ------------------
  153|   825k|                    left[-(i + 1)] = dst[(sz + i) * PXSTRIDE(stride) - 1];
  154|  69.7k|                if (px_have < sz)
  ------------------
  |  Branch (154:21): [True: 920, False: 68.8k]
  ------------------
  155|    920|                    pixel_set(left - sz, left[-px_have], sz - px_have);
  156|   134k|            } else {
  157|   134k|                pixel_set(left - sz, left[0], sz);
  158|   134k|            }
  159|   204k|        }
  160|  4.71M|    }
  161|       |
  162|  5.20M|    if (av1_intra_prediction_edges[mode].needs_top) {
  ------------------
  |  Branch (162:9): [True: 4.50M, False: 703k]
  ------------------
  163|  4.50M|        const int sz = tw << 2;
  164|  4.50M|        pixel *const top = &topleft_out[1];
  165|       |
  166|  4.50M|        if (have_top) {
  ------------------
  |  Branch (166:13): [True: 4.37M, False: 128k]
  ------------------
  167|  4.37M|            const int px_have = imin(sz, (w - x) << 2);
  168|  4.37M|            pixel_copy(top, dst_top, px_have);
  ------------------
  |  |   65|  4.37M|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
  169|  4.37M|            if (px_have < sz)
  ------------------
  |  Branch (169:17): [True: 99.5k, False: 4.27M]
  ------------------
  170|  99.5k|                pixel_set(top + px_have, top[px_have - 1], sz - px_have);
  171|  4.37M|        } else {
  172|   128k|            pixel_set(top, have_left ? dst[-1] : ((1 << bitdepth) >> 1) - 1, sz);
  ------------------
  |  Branch (172:28): [True: 123k, False: 5.68k]
  ------------------
  173|   128k|        }
  174|       |
  175|  4.50M|        if (av1_intra_prediction_edges[mode].needs_topright) {
  ------------------
  |  Branch (175:13): [True: 177k, False: 4.32M]
  ------------------
  176|   177k|            const int have_topright = (!have_top || x + tw >= w) ? 0 :
  ------------------
  |  Branch (176:40): [True: 0, False: 177k]
  |  Branch (176:53): [True: 16.0k, False: 161k]
  ------------------
  177|   177k|                                      (edge_flags & EDGE_I444_TOP_HAS_RIGHT);
  178|       |
  179|   177k|            if (have_topright) {
  ------------------
  |  Branch (179:17): [True: 103k, False: 74.2k]
  ------------------
  180|   103k|                const int px_have = imin(sz, (w - x - tw) << 2);
  181|       |
  182|   103k|                pixel_copy(top + sz, &dst_top[sz], px_have);
  ------------------
  |  |   65|   103k|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
  183|   103k|                if (px_have < sz)
  ------------------
  |  Branch (183:21): [True: 1.69k, False: 101k]
  ------------------
  184|  1.69k|                    pixel_set(top + sz + px_have, top[sz + px_have - 1],
  185|  1.69k|                              sz - px_have);
  186|   103k|            } else {
  187|  74.2k|                pixel_set(top + sz, top[sz - 1], sz);
  188|  74.2k|            }
  189|   177k|        }
  190|  4.50M|    }
  191|       |
  192|  5.20M|    if (av1_intra_prediction_edges[mode].needs_topleft) {
  ------------------
  |  Branch (192:9): [True: 1.00M, False: 4.20M]
  ------------------
  193|  1.00M|        if (have_left)
  ------------------
  |  Branch (193:13): [True: 956k, False: 51.2k]
  ------------------
  194|   956k|            *topleft_out = have_top ? dst_top[-1] : dst[-1];
  ------------------
  |  Branch (194:28): [True: 892k, False: 63.3k]
  ------------------
  195|  51.2k|        else
  196|  51.2k|            *topleft_out = have_top ? *dst_top : (1 << bitdepth) >> 1;
  ------------------
  |  Branch (196:28): [True: 49.6k, False: 1.56k]
  ------------------
  197|       |
  198|  1.00M|        if (mode == Z2_PRED && tw + th >= 6 && filter_edge)
  ------------------
  |  Branch (198:13): [True: 351k, False: 655k]
  |  Branch (198:32): [True: 181k, False: 169k]
  |  Branch (198:48): [True: 48.1k, False: 133k]
  ------------------
  199|  48.1k|            *topleft_out = ((topleft_out[-1] + topleft_out[1]) * 5 +
  200|  48.1k|                            topleft_out[0] * 6 + 8) >> 4;
  201|  1.00M|    }
  202|       |
  203|  5.20M|    return mode;
  204|  5.20M|}

dav1d_intra_pred_dsp_init_8bpc:
  744|  5.05k|COLD void bitfn(dav1d_intra_pred_dsp_init)(Dav1dIntraPredDSPContext *const c) {
  745|  5.05k|    c->intra_pred[DC_PRED      ] = ipred_dc_c;
  746|  5.05k|    c->intra_pred[DC_128_PRED  ] = ipred_dc_128_c;
  747|  5.05k|    c->intra_pred[TOP_DC_PRED  ] = ipred_dc_top_c;
  748|  5.05k|    c->intra_pred[LEFT_DC_PRED ] = ipred_dc_left_c;
  749|  5.05k|    c->intra_pred[HOR_PRED     ] = ipred_h_c;
  750|  5.05k|    c->intra_pred[VERT_PRED    ] = ipred_v_c;
  751|  5.05k|    c->intra_pred[PAETH_PRED   ] = ipred_paeth_c;
  752|  5.05k|    c->intra_pred[SMOOTH_PRED  ] = ipred_smooth_c;
  753|  5.05k|    c->intra_pred[SMOOTH_V_PRED] = ipred_smooth_v_c;
  754|  5.05k|    c->intra_pred[SMOOTH_H_PRED] = ipred_smooth_h_c;
  755|  5.05k|    c->intra_pred[Z1_PRED      ] = ipred_z1_c;
  756|  5.05k|    c->intra_pred[Z2_PRED      ] = ipred_z2_c;
  757|  5.05k|    c->intra_pred[Z3_PRED      ] = ipred_z3_c;
  758|  5.05k|    c->intra_pred[FILTER_PRED  ] = ipred_filter_c;
  759|       |
  760|  5.05k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I420 - 1] = cfl_ac_420_c;
  761|  5.05k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I422 - 1] = cfl_ac_422_c;
  762|  5.05k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I444 - 1] = cfl_ac_444_c;
  763|       |
  764|  5.05k|    c->cfl_pred[DC_PRED     ] = ipred_cfl_c;
  765|  5.05k|    c->cfl_pred[DC_128_PRED ] = ipred_cfl_128_c;
  766|  5.05k|    c->cfl_pred[TOP_DC_PRED ] = ipred_cfl_top_c;
  767|  5.05k|    c->cfl_pred[LEFT_DC_PRED] = ipred_cfl_left_c;
  768|       |
  769|  5.05k|    c->pal_pred = pal_pred_c;
  770|       |
  771|  5.05k|#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|  5.05k|#endif
  782|  5.05k|}
dav1d_intra_pred_dsp_init_16bpc:
  744|  7.82k|COLD void bitfn(dav1d_intra_pred_dsp_init)(Dav1dIntraPredDSPContext *const c) {
  745|  7.82k|    c->intra_pred[DC_PRED      ] = ipred_dc_c;
  746|  7.82k|    c->intra_pred[DC_128_PRED  ] = ipred_dc_128_c;
  747|  7.82k|    c->intra_pred[TOP_DC_PRED  ] = ipred_dc_top_c;
  748|  7.82k|    c->intra_pred[LEFT_DC_PRED ] = ipred_dc_left_c;
  749|  7.82k|    c->intra_pred[HOR_PRED     ] = ipred_h_c;
  750|  7.82k|    c->intra_pred[VERT_PRED    ] = ipred_v_c;
  751|  7.82k|    c->intra_pred[PAETH_PRED   ] = ipred_paeth_c;
  752|  7.82k|    c->intra_pred[SMOOTH_PRED  ] = ipred_smooth_c;
  753|  7.82k|    c->intra_pred[SMOOTH_V_PRED] = ipred_smooth_v_c;
  754|  7.82k|    c->intra_pred[SMOOTH_H_PRED] = ipred_smooth_h_c;
  755|  7.82k|    c->intra_pred[Z1_PRED      ] = ipred_z1_c;
  756|  7.82k|    c->intra_pred[Z2_PRED      ] = ipred_z2_c;
  757|  7.82k|    c->intra_pred[Z3_PRED      ] = ipred_z3_c;
  758|  7.82k|    c->intra_pred[FILTER_PRED  ] = ipred_filter_c;
  759|       |
  760|  7.82k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I420 - 1] = cfl_ac_420_c;
  761|  7.82k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I422 - 1] = cfl_ac_422_c;
  762|  7.82k|    c->cfl_ac[DAV1D_PIXEL_LAYOUT_I444 - 1] = cfl_ac_444_c;
  763|       |
  764|  7.82k|    c->cfl_pred[DC_PRED     ] = ipred_cfl_c;
  765|  7.82k|    c->cfl_pred[DC_128_PRED ] = ipred_cfl_128_c;
  766|  7.82k|    c->cfl_pred[TOP_DC_PRED ] = ipred_cfl_top_c;
  767|  7.82k|    c->cfl_pred[LEFT_DC_PRED] = ipred_cfl_left_c;
  768|       |
  769|  7.82k|    c->pal_pred = pal_pred_c;
  770|       |
  771|  7.82k|#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|  7.82k|#endif
  782|  7.82k|}

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

dav1d_itx_dsp_init_8bpc:
  220|  5.05k|COLD void bitfn(dav1d_itx_dsp_init)(Dav1dInvTxfmDSPContext *const c, int bpc) {
  221|  5.05k|#define assign_itx_all_fn64(w, h, pfx) \
  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  224|       |
  225|  5.05k|#define assign_itx_all_fn32(w, h, pfx) \
  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  229|       |
  230|  5.05k|#define assign_itx_all_fn16(w, h, pfx) \
  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  252|       |
  253|  5.05k|#define assign_itx_all_fn84(w, h, pfx) \
  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  263|  5.05k|
  264|  5.05k|#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ( \
  265|  5.05k|  ARCH_AARCH64 || \
  266|  5.05k|  (ARCH_ARM && (defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32))) \
  267|  5.05k|))
  268|  5.05k|    c->itxfm_add[TX_4X4][WHT_WHT] = inv_txfm_add_wht_wht_4x4_c;
  269|  5.05k|#endif
  270|  5.05k|    assign_itx_all_fn84( 4,  4, );
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  271|  5.05k|    assign_itx_all_fn84( 4,  8, R);
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  272|  5.05k|    assign_itx_all_fn84( 4, 16, R);
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  273|  5.05k|    assign_itx_all_fn84( 8,  4, R);
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  274|  5.05k|    assign_itx_all_fn84( 8,  8, );
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  275|  5.05k|    assign_itx_all_fn84( 8, 16, R);
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  276|  5.05k|    assign_itx_all_fn32( 8, 32, R);
  ------------------
  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  277|  5.05k|    assign_itx_all_fn84(16,  4, R);
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  278|  5.05k|    assign_itx_all_fn84(16,  8, R);
  ------------------
  |  |  254|  5.05k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  5.05k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  5.05k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  5.05k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  5.05k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  279|  5.05k|    assign_itx_all_fn16(16, 16, );
  ------------------
  |  |  231|  5.05k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  ------------------
  |  |  232|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  233|  5.05k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  234|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  235|  5.05k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  236|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  237|  5.05k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  238|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  239|  5.05k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  240|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  241|  5.05k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  242|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  243|  5.05k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  244|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  245|  5.05k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  246|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  247|  5.05k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  248|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  249|  5.05k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  250|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  251|  5.05k|        inv_txfm_add_identity_dct_##w##x##h##_c
  ------------------
  280|  5.05k|    assign_itx_all_fn32(16, 32, R);
  ------------------
  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  281|  5.05k|    assign_itx_all_fn64(16, 64, R);
  ------------------
  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  282|  5.05k|    assign_itx_all_fn32(32,  8, R);
  ------------------
  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  283|  5.05k|    assign_itx_all_fn32(32, 16, R);
  ------------------
  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  284|  5.05k|    assign_itx_all_fn32(32, 32, );
  ------------------
  |  |  226|  5.05k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  5.05k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  285|  5.05k|    assign_itx_all_fn64(32, 64, R);
  ------------------
  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  286|  5.05k|    assign_itx_all_fn64(64, 16, R);
  ------------------
  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  287|  5.05k|    assign_itx_all_fn64(64, 32, R);
  ------------------
  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  288|  5.05k|    assign_itx_all_fn64(64, 64, );
  ------------------
  |  |  222|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  5.05k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  289|       |
  290|  5.05k|    int all_simd = 0;
  291|  5.05k|#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|  5.05k|#if ARCH_X86
  305|  5.05k|    itx_dsp_init_x86(c, bpc, &all_simd);
  306|  5.05k|#endif
  307|  5.05k|#endif
  308|       |
  309|  5.05k|    if (!all_simd)
  ------------------
  |  Branch (309:9): [True: 0, False: 5.05k]
  ------------------
  310|      0|        dav1d_init_last_nonzero_col_from_eob_tables();
  311|  5.05k|}
itx_tmpl.c:inv_txfm_add_c:
   47|  68.5k|{
   48|  68.5k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
   49|  68.5k|    const int w = 4 * t_dim->w, h = 4 * t_dim->h;
   50|  68.5k|    const int has_dconly = txtp == DCT_DCT;
   51|  68.5k|    assert(w >= 4 && w <= 64);
  ------------------
  |  |  140|   137k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 68.5k, False: 0]
  |  |  |  Branch (140:30): [True: 68.5k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 68.5k]
  |  |  ------------------
  ------------------
   52|  68.5k|    assert(h >= 4 && h <= 64);
  ------------------
  |  |  140|   137k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 68.5k, False: 0]
  |  |  |  Branch (140:30): [True: 68.5k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 68.5k]
  |  |  ------------------
  ------------------
   53|  68.5k|    assert(eob >= 0);
  ------------------
  |  |  140|  68.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 68.5k]
  |  |  |  Branch (140:68): [Folded, False: 68.5k]
  |  |  ------------------
  ------------------
   54|       |
   55|  68.5k|    const int is_rect2 = w * 2 == h || h * 2 == w;
  ------------------
  |  Branch (55:26): [True: 5.43k, False: 63.1k]
  |  Branch (55:40): [True: 23.5k, False: 39.6k]
  ------------------
   56|  68.5k|    const int rnd = (1 << shift) >> 1;
   57|       |
   58|  68.5k|    if (eob < has_dconly) {
  ------------------
  |  Branch (58:9): [True: 31.4k, False: 37.1k]
  ------------------
   59|  31.4k|        int dc = coeff[0];
   60|  31.4k|        coeff[0] = 0;
   61|  31.4k|        if (is_rect2)
  ------------------
  |  Branch (61:13): [True: 7.56k, False: 23.8k]
  ------------------
   62|  7.56k|            dc = (dc * 181 + 128) >> 8;
   63|  31.4k|        dc = (dc * 181 + 128) >> 8;
   64|  31.4k|        dc = (dc + rnd) >> shift;
   65|  31.4k|        dc = (dc * 181 + 128 + 2048) >> 12;
   66|  1.02M|        for (int y = 0; y < h; y++, dst += PXSTRIDE(stride))
  ------------------
  |  |   53|   998k|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (66:25): [True: 998k, False: 31.4k]
  ------------------
   67|  36.8M|            for (int x = 0; x < w; x++)
  ------------------
  |  Branch (67:29): [True: 35.8M, False: 998k]
  ------------------
   68|  35.8M|                dst[x] = iclip_pixel(dst[x] + dc);
  ------------------
  |  |   49|  35.8M|#define iclip_pixel iclip_u8
  ------------------
   69|  31.4k|        return;
   70|  31.4k|    }
   71|       |
   72|  37.1k|    const uint8_t *const txtps = dav1d_tx1d_types[txtp];
   73|  37.1k|    const itx_1d_fn first_1d_fn = dav1d_tx1d_fns[t_dim->lw][txtps[0]];
   74|  37.1k|    const itx_1d_fn second_1d_fn = dav1d_tx1d_fns[t_dim->lh][txtps[1]];
   75|  37.1k|    const int sh = imin(h, 32), sw = imin(w, 32);
   76|  37.1k|#if BITDEPTH == 8
   77|  37.1k|    const int row_clip_min = INT16_MIN;
   78|  37.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|  37.1k|    const int row_clip_max = ~row_clip_min;
   84|  37.1k|    const int col_clip_max = ~col_clip_min;
   85|       |
   86|  37.1k|    int32_t tmp[64 * 64], *c = tmp;
   87|  37.1k|    int last_nonzero_col; // in first 1d itx
   88|  37.1k|    if (txtps[1] == IDENTITY && txtps[0] != IDENTITY) {
  ------------------
  |  Branch (88:9): [True: 0, False: 37.1k]
  |  Branch (88:33): [True: 0, False: 0]
  ------------------
   89|      0|        last_nonzero_col = imin(sh - 1, eob);
   90|  37.1k|    } else if (txtps[0] == IDENTITY && txtps[1] != IDENTITY) {
  ------------------
  |  Branch (90:16): [True: 0, False: 37.1k]
  |  Branch (90:40): [True: 0, False: 0]
  ------------------
   91|      0|        last_nonzero_col = eob >> (t_dim->lw + 2);
   92|  37.1k|    } else {
   93|  37.1k|        last_nonzero_col = dav1d_last_nonzero_col_from_eob[tx][eob];
   94|  37.1k|    }
   95|  37.1k|    assert(last_nonzero_col < sh);
  ------------------
  |  |  140|  37.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 37.1k]
  |  |  |  Branch (140:68): [Folded, False: 37.1k]
  |  |  ------------------
  ------------------
   96|   375k|    for (int y = 0; y <= last_nonzero_col; y++, c += w) {
  ------------------
  |  Branch (96:21): [True: 338k, False: 37.1k]
  ------------------
   97|   338k|        if (is_rect2)
  ------------------
  |  Branch (97:13): [True: 179k, False: 158k]
  ------------------
   98|  5.62M|            for (int x = 0; x < sw; x++)
  ------------------
  |  Branch (98:29): [True: 5.44M, False: 179k]
  ------------------
   99|  5.44M|                c[x] = (coeff[y + x * sh] * 181 + 128) >> 8;
  100|   158k|        else
  101|  5.17M|            for (int x = 0; x < sw; x++)
  ------------------
  |  Branch (101:29): [True: 5.01M, False: 158k]
  ------------------
  102|  5.01M|                c[x] = coeff[y + x * sh];
  103|   338k|        first_1d_fn(c, 1, row_clip_min, row_clip_max);
  104|   338k|    }
  105|  37.1k|    if (last_nonzero_col + 1 < sh)
  ------------------
  |  Branch (105:9): [True: 33.0k, False: 4.15k]
  ------------------
  106|  33.0k|        memset(c, 0, sizeof(*c) * (sh - last_nonzero_col - 1) * w);
  107|       |
  108|  37.1k|    memset(coeff, 0, sizeof(*coeff) * sw * sh);
  109|  43.5M|    for (int i = 0; i < w * sh; i++)
  ------------------
  |  Branch (109:21): [True: 43.4M, False: 37.1k]
  ------------------
  110|  43.4M|        tmp[i] = iclip((tmp[i] + rnd) >> shift, col_clip_min, col_clip_max);
  111|       |
  112|  1.60M|    for (int x = 0; x < w; x++)
  ------------------
  |  Branch (112:21): [True: 1.56M, False: 37.1k]
  ------------------
  113|  1.56M|        second_1d_fn(&tmp[x], w, col_clip_min, col_clip_max);
  114|       |
  115|  37.1k|    c = tmp;
  116|  1.29M|    for (int y = 0; y < h; y++, dst += PXSTRIDE(stride))
  ------------------
  |  |   53|  1.25M|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (116:21): [True: 1.25M, False: 37.1k]
  ------------------
  117|  59.5M|        for (int x = 0; x < w; x++)
  ------------------
  |  Branch (117:25): [True: 58.3M, False: 1.25M]
  ------------------
  118|  58.3M|            dst[x] = iclip_pixel(dst[x] + ((*c++ + 8) >> 4));
  ------------------
  |  |   49|  58.3M|#define iclip_pixel iclip_u8
  ------------------
  119|  37.1k|}
itx_tmpl.c:inv_txfm_add_dct_dct_16x32_c:
  127|  4.03k|                                               HIGHBD_DECL_SUFFIX) \
  128|  4.03k|{ \
  129|  4.03k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  4.03k|                   HIGHBD_TAIL_SUFFIX); \
  131|  4.03k|}
itx_tmpl.c:inv_txfm_add_dct_dct_16x64_c:
  127|    808|                                               HIGHBD_DECL_SUFFIX) \
  128|    808|{ \
  129|    808|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|    808|                   HIGHBD_TAIL_SUFFIX); \
  131|    808|}
itx_tmpl.c:inv_txfm_add_dct_dct_32x16_c:
  127|  16.0k|                                               HIGHBD_DECL_SUFFIX) \
  128|  16.0k|{ \
  129|  16.0k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  16.0k|                   HIGHBD_TAIL_SUFFIX); \
  131|  16.0k|}
itx_tmpl.c:inv_txfm_add_dct_dct_32x32_c:
  127|  29.7k|                                               HIGHBD_DECL_SUFFIX) \
  128|  29.7k|{ \
  129|  29.7k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  29.7k|                   HIGHBD_TAIL_SUFFIX); \
  131|  29.7k|}
itx_tmpl.c:inv_txfm_add_dct_dct_32x64_c:
  127|  1.40k|                                               HIGHBD_DECL_SUFFIX) \
  128|  1.40k|{ \
  129|  1.40k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  1.40k|                   HIGHBD_TAIL_SUFFIX); \
  131|  1.40k|}
itx_tmpl.c:inv_txfm_add_dct_dct_64x16_c:
  127|    970|                                               HIGHBD_DECL_SUFFIX) \
  128|    970|{ \
  129|    970|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|    970|                   HIGHBD_TAIL_SUFFIX); \
  131|    970|}
itx_tmpl.c:inv_txfm_add_dct_dct_64x32_c:
  127|  7.49k|                                               HIGHBD_DECL_SUFFIX) \
  128|  7.49k|{ \
  129|  7.49k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  7.49k|                   HIGHBD_TAIL_SUFFIX); \
  131|  7.49k|}
itx_tmpl.c:inv_txfm_add_dct_dct_64x64_c:
  127|  8.16k|                                               HIGHBD_DECL_SUFFIX) \
  128|  8.16k|{ \
  129|  8.16k|    inv_txfm_add_c(dst, stride, coeff, eob, pfx##TX_##w##X##h, shift, type \
  130|  8.16k|                   HIGHBD_TAIL_SUFFIX); \
  131|  8.16k|}
dav1d_itx_dsp_init_16bpc:
  220|  7.82k|COLD void bitfn(dav1d_itx_dsp_init)(Dav1dInvTxfmDSPContext *const c, int bpc) {
  221|  7.82k|#define assign_itx_all_fn64(w, h, pfx) \
  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  224|       |
  225|  7.82k|#define assign_itx_all_fn32(w, h, pfx) \
  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  229|       |
  230|  7.82k|#define assign_itx_all_fn16(w, h, pfx) \
  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  252|       |
  253|  7.82k|#define assign_itx_all_fn84(w, h, pfx) \
  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  263|  7.82k|
  264|  7.82k|#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ( \
  265|  7.82k|  ARCH_AARCH64 || \
  266|  7.82k|  (ARCH_ARM && (defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32))) \
  267|  7.82k|))
  268|  7.82k|    c->itxfm_add[TX_4X4][WHT_WHT] = inv_txfm_add_wht_wht_4x4_c;
  269|  7.82k|#endif
  270|  7.82k|    assign_itx_all_fn84( 4,  4, );
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  271|  7.82k|    assign_itx_all_fn84( 4,  8, R);
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  272|  7.82k|    assign_itx_all_fn84( 4, 16, R);
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  273|  7.82k|    assign_itx_all_fn84( 8,  4, R);
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  274|  7.82k|    assign_itx_all_fn84( 8,  8, );
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  275|  7.82k|    assign_itx_all_fn84( 8, 16, R);
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  276|  7.82k|    assign_itx_all_fn32( 8, 32, R);
  ------------------
  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  277|  7.82k|    assign_itx_all_fn84(16,  4, R);
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  278|  7.82k|    assign_itx_all_fn84(16,  8, R);
  ------------------
  |  |  254|  7.82k|    assign_itx_all_fn16(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  |  |  ------------------
  |  |  255|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_FLIPADST] = \
  |  |  256|  7.82k|        inv_txfm_add_flipadst_identity_##w##x##h##_c; \
  |  |  257|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_FLIPADST] = \
  |  |  258|  7.82k|        inv_txfm_add_identity_flipadst_##w##x##h##_c; \
  |  |  259|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_ADST] = \
  |  |  260|  7.82k|        inv_txfm_add_adst_identity_##w##x##h##_c; \
  |  |  261|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
  |  |  262|  7.82k|        inv_txfm_add_identity_adst_##w##x##h##_c; \
  ------------------
  279|  7.82k|    assign_itx_all_fn16(16, 16, );
  ------------------
  |  |  231|  7.82k|    assign_itx_all_fn32(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  |  |  ------------------
  |  |  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  |  |  ------------------
  |  |  232|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_ADST ] = \
  |  |  233|  7.82k|        inv_txfm_add_adst_dct_##w##x##h##_c; \
  |  |  234|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_DCT ] = \
  |  |  235|  7.82k|        inv_txfm_add_dct_adst_##w##x##h##_c; \
  |  |  236|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_ADST] = \
  |  |  237|  7.82k|        inv_txfm_add_adst_adst_##w##x##h##_c; \
  |  |  238|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][ADST_FLIPADST] = \
  |  |  239|  7.82k|        inv_txfm_add_flipadst_adst_##w##x##h##_c; \
  |  |  240|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_ADST] = \
  |  |  241|  7.82k|        inv_txfm_add_adst_flipadst_##w##x##h##_c; \
  |  |  242|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_FLIPADST] = \
  |  |  243|  7.82k|        inv_txfm_add_flipadst_dct_##w##x##h##_c; \
  |  |  244|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_DCT] = \
  |  |  245|  7.82k|        inv_txfm_add_dct_flipadst_##w##x##h##_c; \
  |  |  246|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][FLIPADST_FLIPADST] = \
  |  |  247|  7.82k|        inv_txfm_add_flipadst_flipadst_##w##x##h##_c; \
  |  |  248|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][H_DCT] = \
  |  |  249|  7.82k|        inv_txfm_add_dct_identity_##w##x##h##_c; \
  |  |  250|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][V_DCT] = \
  |  |  251|  7.82k|        inv_txfm_add_identity_dct_##w##x##h##_c
  ------------------
  280|  7.82k|    assign_itx_all_fn32(16, 32, R);
  ------------------
  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  281|  7.82k|    assign_itx_all_fn64(16, 64, R);
  ------------------
  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  282|  7.82k|    assign_itx_all_fn32(32,  8, R);
  ------------------
  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  283|  7.82k|    assign_itx_all_fn32(32, 16, R);
  ------------------
  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  284|  7.82k|    assign_itx_all_fn32(32, 32, );
  ------------------
  |  |  226|  7.82k|    assign_itx_all_fn64(w, h, pfx); \
  |  |  ------------------
  |  |  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  |  |  ------------------
  |  |  227|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][IDTX] = \
  |  |  228|  7.82k|        inv_txfm_add_identity_identity_##w##x##h##_c
  ------------------
  285|  7.82k|    assign_itx_all_fn64(32, 64, R);
  ------------------
  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  286|  7.82k|    assign_itx_all_fn64(64, 16, R);
  ------------------
  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  287|  7.82k|    assign_itx_all_fn64(64, 32, R);
  ------------------
  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  288|  7.82k|    assign_itx_all_fn64(64, 64, );
  ------------------
  |  |  222|  7.82k|    c->itxfm_add[pfx##TX_##w##X##h][DCT_DCT  ] = \
  |  |  223|  7.82k|        inv_txfm_add_dct_dct_##w##x##h##_c
  ------------------
  289|       |
  290|  7.82k|    int all_simd = 0;
  291|  7.82k|#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|  7.82k|#if ARCH_X86
  305|  7.82k|    itx_dsp_init_x86(c, bpc, &all_simd);
  306|  7.82k|#endif
  307|  7.82k|#endif
  308|       |
  309|  7.82k|    if (!all_simd)
  ------------------
  |  Branch (309:9): [True: 3.70k, False: 4.12k]
  ------------------
  310|  3.70k|        dav1d_init_last_nonzero_col_from_eob_tables();
  311|  7.82k|}

dav1d_copy_lpf_8bpc:
  106|  19.9k|{
  107|  19.9k|    const int have_tt = f->c->n_tc > 1;
  108|  19.9k|    const int resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
  109|  19.9k|    const int offset = 8 * !!sby;
  110|  19.9k|    const ptrdiff_t *const src_stride = f->cur.stride;
  111|  19.9k|    const ptrdiff_t *const lr_stride = f->sr_cur.p.stride;
  112|  19.9k|    const int tt_off = have_tt * sby * (4 << f->seq_hdr->sb128);
  113|  19.9k|    pixel *const dst[3] = {
  114|  19.9k|        f->lf.lr_lpf_line[0] + tt_off * PXSTRIDE(lr_stride[0]),
  ------------------
  |  |   53|  19.9k|#define PXSTRIDE(x) (x)
  ------------------
  115|  19.9k|        f->lf.lr_lpf_line[1] + tt_off * PXSTRIDE(lr_stride[1]),
  ------------------
  |  |   53|  19.9k|#define PXSTRIDE(x) (x)
  ------------------
  116|  19.9k|        f->lf.lr_lpf_line[2] + tt_off * PXSTRIDE(lr_stride[1])
  ------------------
  |  |   53|  19.9k|#define PXSTRIDE(x) (x)
  ------------------
  117|  19.9k|    };
  118|       |
  119|       |    // TODO Also check block level restore type to reduce copying.
  120|  19.9k|    const int restore_planes = f->lf.restore_planes;
  121|       |
  122|  19.9k|    if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (122:9): [True: 13.0k, False: 6.98k]
  |  Branch (122:29): [True: 5.35k, False: 1.62k]
  ------------------
  123|  18.3k|        const int h = f->cur.p.h;
  124|  18.3k|        const int w = f->bw << 2;
  125|  18.3k|        const int row_h = imin((sby + 1) << (6 + f->seq_hdr->sb128), h - 1);
  126|  18.3k|        const int y_stripe = (sby << (6 + f->seq_hdr->sb128)) - offset;
  127|  18.3k|        if (restore_planes & LR_RESTORE_Y || !resize)
  ------------------
  |  Branch (127:13): [True: 8.55k, False: 9.81k]
  |  Branch (127:46): [True: 7.86k, False: 1.95k]
  ------------------
  128|  16.4k|            backup_lpf(f, dst[0], lr_stride[0],
  129|  16.4k|                       src[0] - offset * PXSTRIDE(src_stride[0]), src_stride[0],
  ------------------
  |  |   53|  16.4k|#define PXSTRIDE(x) (x)
  ------------------
  130|  16.4k|                       0, f->seq_hdr->sb128, y_stripe, row_h, w, h, 0, 1);
  131|  18.3k|        if (have_tt && resize) {
  ------------------
  |  Branch (131:13): [True: 0, False: 18.3k]
  |  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|  18.3k|    }
  138|  19.9k|    if ((f->seq_hdr->cdef || restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) &&
  ------------------
  |  Branch (138:10): [True: 13.0k, False: 6.98k]
  |  Branch (138:30): [True: 4.19k, False: 2.78k]
  ------------------
  139|  17.2k|        f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400)
  ------------------
  |  Branch (139:9): [True: 12.0k, False: 5.11k]
  ------------------
  140|  12.0k|    {
  141|  12.0k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  142|  12.0k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  143|  12.0k|        const int h = (f->cur.p.h + ss_ver) >> ss_ver;
  144|  12.0k|        const int w = f->bw << (2 - ss_hor);
  145|  12.0k|        const int row_h = imin((sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128), h - 1);
  146|  12.0k|        const int offset_uv = offset >> ss_ver;
  147|  12.0k|        const int y_stripe = (sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
  148|  12.0k|        const ptrdiff_t cdef_off_uv = sby * 4 * PXSTRIDE(src_stride[1]);
  ------------------
  |  |   53|  12.0k|#define PXSTRIDE(x) (x)
  ------------------
  149|  12.0k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_U) {
  ------------------
  |  Branch (149:13): [True: 7.89k, False: 4.19k]
  |  Branch (149:33): [True: 3.67k, False: 524]
  ------------------
  150|  11.5k|            if (restore_planes & LR_RESTORE_U || !resize)
  ------------------
  |  Branch (150:17): [True: 5.47k, False: 6.09k]
  |  Branch (150:50): [True: 4.09k, False: 2.00k]
  ------------------
  151|  9.56k|                backup_lpf(f, dst[1], lr_stride[1],
  152|  9.56k|                           src[1] - offset_uv * PXSTRIDE(src_stride[1]),
  ------------------
  |  |   53|  9.56k|#define PXSTRIDE(x) (x)
  ------------------
  153|  9.56k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  154|  9.56k|                           row_h, w, h, ss_hor, 1);
  155|  11.5k|            if (have_tt && resize)
  ------------------
  |  Branch (155:17): [True: 0, False: 11.5k]
  |  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|  11.5k|        }
  161|  12.0k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_V) {
  ------------------
  |  Branch (161:13): [True: 7.89k, False: 4.19k]
  |  Branch (161:33): [True: 1.84k, False: 2.34k]
  ------------------
  162|  9.74k|            if (restore_planes & LR_RESTORE_V || !resize)
  ------------------
  |  Branch (162:17): [True: 3.85k, False: 5.89k]
  |  Branch (162:50): [True: 3.90k, False: 1.99k]
  ------------------
  163|  7.75k|                backup_lpf(f, dst[2], lr_stride[1],
  164|  7.75k|                           src[2] - offset_uv * PXSTRIDE(src_stride[1]),
  ------------------
  |  |   53|  7.75k|#define PXSTRIDE(x) (x)
  ------------------
  165|  7.75k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  166|  7.75k|                           row_h, w, h, ss_hor, 1);
  167|  9.74k|            if (have_tt && resize)
  ------------------
  |  Branch (167:17): [True: 0, False: 9.74k]
  |  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|  9.74k|        }
  173|  12.0k|    }
  174|  19.9k|}
dav1d_loopfilter_sbrow_cols_8bpc:
  316|  20.4k|{
  317|  20.4k|    int x, have_left;
  318|       |    // Don't filter outside the frame
  319|  20.4k|    const int is_sb64 = !f->seq_hdr->sb128;
  320|  20.4k|    const int starty4 = (sby & is_sb64) << 4;
  321|  20.4k|    const int sbsz = 32 >> is_sb64;
  322|  20.4k|    const int sbl2 = 5 - is_sb64;
  323|  20.4k|    const int halign = (f->bh + 31) & ~31;
  324|  20.4k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  325|  20.4k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  326|  20.4k|    const int vmask = 16 >> ss_ver, hmask = 16 >> ss_hor;
  327|  20.4k|    const unsigned vmax = 1U << vmask, hmax = 1U << hmask;
  328|  20.4k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  329|  20.4k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  330|       |
  331|       |    // fix lpf strength at tile col boundaries
  332|  20.4k|    const uint8_t *lpf_y = &f->lf.tx_lpf_right_edge[0][sby << sbl2];
  333|  20.4k|    const uint8_t *lpf_uv = &f->lf.tx_lpf_right_edge[1][sby << (sbl2 - ss_ver)];
  334|  21.3k|    for (int tile_col = 1;; tile_col++) {
  335|  21.3k|        x = f->frame_hdr->tiling.col_start_sb[tile_col];
  336|  21.3k|        if ((x << sbl2) >= f->bw) break;
  ------------------
  |  Branch (336:13): [True: 20.4k, False: 894]
  ------------------
  337|    894|        const int bx4 = x & is_sb64 ? 16 : 0, cbx4 = bx4 >> ss_hor;
  ------------------
  |  Branch (337:25): [True: 702, False: 192]
  ------------------
  338|    894|        x >>= is_sb64;
  339|       |
  340|    894|        uint16_t (*const y_hmask)[2] = lflvl[x].filter_y[0][bx4];
  341|  14.8k|        for (unsigned y = starty4, mask = 1 << y; y < endy4; y++, mask <<= 1) {
  ------------------
  |  Branch (341:51): [True: 13.9k, False: 894]
  ------------------
  342|  13.9k|            const int sidx = mask >= 0x10000U;
  343|  13.9k|            const unsigned smask = mask >> (sidx << 4);
  344|  13.9k|            const int idx = 2 * !!(y_hmask[2][sidx] & smask) +
  345|  13.9k|                                !!(y_hmask[1][sidx] & smask);
  346|  13.9k|            y_hmask[2][sidx] &= ~smask;
  347|  13.9k|            y_hmask[1][sidx] &= ~smask;
  348|  13.9k|            y_hmask[0][sidx] &= ~smask;
  349|  13.9k|            y_hmask[imin(idx, lpf_y[y - starty4])][sidx] |= smask;
  350|  13.9k|        }
  351|       |
  352|    894|        if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (352:13): [True: 274, False: 620]
  ------------------
  353|    274|            uint16_t (*const uv_hmask)[2] = lflvl[x].filter_uv[0][cbx4];
  354|  2.99k|            for (unsigned y = starty4 >> ss_ver, uv_mask = 1 << y; y < uv_endy4;
  ------------------
  |  Branch (354:68): [True: 2.71k, False: 274]
  ------------------
  355|  2.71k|                 y++, uv_mask <<= 1)
  356|  2.71k|            {
  357|  2.71k|                const int sidx = uv_mask >= vmax;
  358|  2.71k|                const unsigned smask = uv_mask >> (sidx << (4 - ss_ver));
  359|  2.71k|                const int idx = !!(uv_hmask[1][sidx] & smask);
  360|  2.71k|                uv_hmask[1][sidx] &= ~smask;
  361|  2.71k|                uv_hmask[0][sidx] &= ~smask;
  362|  2.71k|                uv_hmask[imin(idx, lpf_uv[y - (starty4 >> ss_ver)])][sidx] |= smask;
  363|  2.71k|            }
  364|    274|        }
  365|    894|        lpf_y  += halign;
  366|    894|        lpf_uv += halign >> ss_ver;
  367|    894|    }
  368|       |
  369|       |    // fix lpf strength at tile row boundaries
  370|  20.4k|    if (start_of_tile_row) {
  ------------------
  |  Branch (370:9): [True: 304, False: 20.1k]
  ------------------
  371|    304|        const BlockContext *a;
  372|    304|        for (x = 0, a = &f->a[f->sb128w * (start_of_tile_row - 1)];
  373|    810|             x < f->sb128w; x++, a++)
  ------------------
  |  Branch (373:14): [True: 506, False: 304]
  ------------------
  374|    506|        {
  375|    506|            uint16_t (*const y_vmask)[2] = lflvl[x].filter_y[1][starty4];
  376|    506|            const unsigned w = imin(32, f->w4 - (x << 5));
  377|  11.6k|            for (unsigned mask = 1, i = 0; i < w; mask <<= 1, i++) {
  ------------------
  |  Branch (377:44): [True: 11.1k, False: 506]
  ------------------
  378|  11.1k|                const int sidx = mask >= 0x10000U;
  379|  11.1k|                const unsigned smask = mask >> (sidx << 4);
  380|  11.1k|                const int idx = 2 * !!(y_vmask[2][sidx] & smask) +
  381|  11.1k|                                    !!(y_vmask[1][sidx] & smask);
  382|  11.1k|                y_vmask[2][sidx] &= ~smask;
  383|  11.1k|                y_vmask[1][sidx] &= ~smask;
  384|  11.1k|                y_vmask[0][sidx] &= ~smask;
  385|  11.1k|                y_vmask[imin(idx, a->tx_lpf_y[i])][sidx] |= smask;
  386|  11.1k|            }
  387|       |
  388|    506|            if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (388:17): [True: 322, False: 184]
  ------------------
  389|    322|                const unsigned cw = (w + ss_hor) >> ss_hor;
  390|    322|                uint16_t (*const uv_vmask)[2] = lflvl[x].filter_uv[1][starty4 >> ss_ver];
  391|  5.78k|                for (unsigned uv_mask = 1, i = 0; i < cw; uv_mask <<= 1, i++) {
  ------------------
  |  Branch (391:51): [True: 5.46k, False: 322]
  ------------------
  392|  5.46k|                    const int sidx = uv_mask >= hmax;
  393|  5.46k|                    const unsigned smask = uv_mask >> (sidx << (4 - ss_hor));
  394|  5.46k|                    const int idx = !!(uv_vmask[1][sidx] & smask);
  395|  5.46k|                    uv_vmask[1][sidx] &= ~smask;
  396|  5.46k|                    uv_vmask[0][sidx] &= ~smask;
  397|  5.46k|                    uv_vmask[imin(idx, a->tx_lpf_uv[i])][sidx] |= smask;
  398|  5.46k|                }
  399|    322|            }
  400|    506|        }
  401|    304|    }
  402|       |
  403|  20.4k|    pixel *ptr;
  404|  20.4k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  405|  52.5k|    for (ptr = p[0], have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (405:44): [True: 32.0k, False: 20.4k]
  ------------------
  406|  32.0k|         x++, have_left = 1, ptr += 128, level_ptr += 32)
  407|  32.0k|    {
  408|  32.0k|        filter_plane_cols_y(f, have_left, level_ptr, f->b4_stride,
  409|  32.0k|                            lflvl[x].filter_y[0], ptr, f->cur.stride[0],
  410|  32.0k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  411|  32.0k|    }
  412|       |
  413|  20.4k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (413:9): [True: 9.61k, False: 10.8k]
  |  Branch (413:46): [True: 8.40k, False: 1.21k]
  ------------------
  414|  8.40k|        return;
  415|       |
  416|  12.0k|    ptrdiff_t uv_off;
  417|  12.0k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  418|  32.0k|    for (uv_off = 0, have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (418:44): [True: 20.0k, False: 12.0k]
  ------------------
  419|  20.0k|         x++, have_left = 1, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  420|  20.0k|    {
  421|  20.0k|        filter_plane_cols_uv(f, have_left, level_ptr, f->b4_stride,
  422|  20.0k|                             lflvl[x].filter_uv[0],
  423|  20.0k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  424|  20.0k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  425|  20.0k|                             starty4 >> ss_ver, uv_endy4, ss_ver);
  426|  20.0k|    }
  427|  12.0k|}
dav1d_loopfilter_sbrow_rows_8bpc:
  432|  20.4k|{
  433|  20.4k|    int x;
  434|       |    // Don't filter outside the frame
  435|  20.4k|    const int have_top = sby > 0;
  436|  20.4k|    const int is_sb64 = !f->seq_hdr->sb128;
  437|  20.4k|    const int starty4 = (sby & is_sb64) << 4;
  438|  20.4k|    const int sbsz = 32 >> is_sb64;
  439|  20.4k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  440|  20.4k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  441|  20.4k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  442|  20.4k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  443|       |
  444|  20.4k|    pixel *ptr;
  445|  20.4k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  446|  52.5k|    for (ptr = p[0], x = 0; x < f->sb128w; x++, ptr += 128, level_ptr += 32) {
  ------------------
  |  Branch (446:29): [True: 32.0k, False: 20.4k]
  ------------------
  447|  32.0k|        filter_plane_rows_y(f, have_top, level_ptr, f->b4_stride,
  448|  32.0k|                            lflvl[x].filter_y[1], ptr, f->cur.stride[0],
  449|  32.0k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  450|  32.0k|    }
  451|       |
  452|  20.4k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (452:9): [True: 9.61k, False: 10.8k]
  |  Branch (452:46): [True: 8.40k, False: 1.21k]
  ------------------
  453|  8.40k|        return;
  454|       |
  455|  12.0k|    ptrdiff_t uv_off;
  456|  12.0k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  457|  32.0k|    for (uv_off = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (457:29): [True: 20.0k, False: 12.0k]
  ------------------
  458|  20.0k|         x++, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  459|  20.0k|    {
  460|  20.0k|        filter_plane_rows_uv(f, have_top, level_ptr, f->b4_stride,
  461|  20.0k|                             lflvl[x].filter_uv[1],
  462|  20.0k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  463|  20.0k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  464|  20.0k|                             starty4 >> ss_ver, uv_endy4, ss_hor);
  465|  20.0k|    }
  466|  12.0k|}
lf_apply_tmpl.c:backup_lpf:
   47|  88.1k|{
   48|  88.1k|    const int cdef_backup = !lr_backup;
   49|  88.1k|    const int dst_w = f->frame_hdr->super_res.enabled ?
  ------------------
  |  Branch (49:23): [True: 23.7k, False: 64.3k]
  ------------------
   50|  64.3k|                      (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|  88.1k|    int stripe_h = ((64 << (cdef_backup & sb128)) - 8 * !row) >> ss_ver;
   54|  88.1k|    src += (stripe_h - 2) * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  88.1k|#define PXSTRIDE(x) (x)
  ------------------
   55|       |
   56|  88.1k|    if (f->c->n_tc == 1) {
  ------------------
  |  Branch (56:9): [True: 88.1k, False: 0]
  ------------------
   57|  88.1k|        if (row) {
  ------------------
  |  Branch (57:13): [True: 68.8k, False: 19.3k]
  ------------------
   58|  68.8k|            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|  68.8k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  0],
  ------------------
  |  |   47|  68.8k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  0],
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   62|  68.8k|                       &dst[PXSTRIDE(dst_stride) *  top],      dst_w);
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   63|  68.8k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  1],
  ------------------
  |  |   47|  68.8k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  1],
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   64|  68.8k|                       &dst[PXSTRIDE(dst_stride) * (top + 1)], dst_w);
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   65|  68.8k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  2],
  ------------------
  |  |   47|  68.8k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  2],
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   66|  68.8k|                       &dst[PXSTRIDE(dst_stride) * (top + 2)], dst_w);
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   67|  68.8k|            pixel_copy(&dst[PXSTRIDE(dst_stride) *  3],
  ------------------
  |  |   47|  68.8k|#define pixel_copy memcpy
  ------------------
                          pixel_copy(&dst[PXSTRIDE(dst_stride) *  3],
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   68|  68.8k|                       &dst[PXSTRIDE(dst_stride) * (top + 3)], dst_w);
  ------------------
  |  |   53|  68.8k|#define PXSTRIDE(x) (x)
  ------------------
   69|  68.8k|        }
   70|  88.1k|        dst += 4 * PXSTRIDE(dst_stride);
  ------------------
  |  |   53|  88.1k|#define PXSTRIDE(x) (x)
  ------------------
   71|  88.1k|    }
   72|       |
   73|  88.1k|    if (lr_backup && (f->frame_hdr->width[0] != f->frame_hdr->width[1])) {
  ------------------
  |  Branch (73:9): [True: 88.1k, False: 0]
  |  Branch (73:22): [True: 11.0k, False: 77.0k]
  ------------------
   74|  24.9k|        while (row + stripe_h <= row_h) {
  ------------------
  |  Branch (74:16): [True: 13.8k, False: 11.0k]
  ------------------
   75|  13.8k|            const int n_lines = 4 - (row + stripe_h + 1 == h);
   76|  13.8k|            f->dsp->mc.resize(dst, dst_stride, src, src_stride,
   77|  13.8k|                              dst_w, n_lines, src_w, f->resize_step[ss_hor],
   78|  13.8k|                              f->resize_start[ss_hor] HIGHBD_CALL_SUFFIX);
   79|  13.8k|            row += stripe_h; // unmodified stripe_h for the 1st stripe
   80|  13.8k|            stripe_h = 64 >> ss_ver;
   81|  13.8k|            src += stripe_h * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  13.8k|#define PXSTRIDE(x) (x)
  ------------------
   82|  13.8k|            dst += n_lines * PXSTRIDE(dst_stride);
  ------------------
  |  |   53|  13.8k|#define PXSTRIDE(x) (x)
  ------------------
   83|  13.8k|            if (n_lines == 3) {
  ------------------
  |  Branch (83:17): [True: 288, False: 13.5k]
  ------------------
   84|    288|                pixel_copy(dst, &dst[-PXSTRIDE(dst_stride)], dst_w);
  ------------------
  |  |   47|    288|#define pixel_copy memcpy
  ------------------
                              pixel_copy(dst, &dst[-PXSTRIDE(dst_stride)], dst_w);
  ------------------
  |  |   53|    288|#define PXSTRIDE(x) (x)
  ------------------
   85|    288|                dst += PXSTRIDE(dst_stride);
  ------------------
  |  |   53|    288|#define PXSTRIDE(x) (x)
  ------------------
   86|    288|            }
   87|  13.8k|        }
   88|  77.0k|    } else {
   89|   160k|        while (row + stripe_h <= row_h) {
  ------------------
  |  Branch (89:16): [True: 83.5k, False: 77.0k]
  ------------------
   90|  83.5k|            const int n_lines = 4 - (row + stripe_h + 1 == h);
   91|   417k|            for (int i = 0; i < 4; i++) {
  ------------------
  |  Branch (91:29): [True: 334k, False: 83.5k]
  ------------------
   92|   334k|                pixel_copy(dst, i == n_lines ? &dst[-PXSTRIDE(dst_stride)] :
  ------------------
  |  |   47|   334k|#define pixel_copy memcpy
  ------------------
                              pixel_copy(dst, i == n_lines ? &dst[-PXSTRIDE(dst_stride)] :
  ------------------
  |  |   53|  1.47k|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (92:33): [True: 1.47k, False: 332k]
  ------------------
   93|   334k|                                               src, src_w);
   94|   334k|                dst += PXSTRIDE(dst_stride);
  ------------------
  |  |   53|   334k|#define PXSTRIDE(x) (x)
  ------------------
   95|   334k|                src += PXSTRIDE(src_stride);
  ------------------
  |  |   53|   334k|#define PXSTRIDE(x) (x)
  ------------------
   96|   334k|            }
   97|  83.5k|            row += stripe_h; // unmodified stripe_h for the 1st stripe
   98|  83.5k|            stripe_h = 64 >> ss_ver;
   99|  83.5k|            src += (stripe_h - 4) * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  83.5k|#define PXSTRIDE(x) (x)
  ------------------
  100|  83.5k|        }
  101|  77.0k|    }
  102|  88.1k|}
lf_apply_tmpl.c:filter_plane_cols_y:
  184|  89.5k|{
  185|  89.5k|    const Dav1dDSPContext *const dsp = f->dsp;
  186|       |
  187|       |    // filter edges between columns (e.g. block1 | block2)
  188|  2.02M|    for (int x = 0; x < w; x++) {
  ------------------
  |  Branch (188:21): [True: 1.93M, False: 89.5k]
  ------------------
  189|  1.93M|        if (!have_left && !x) continue;
  ------------------
  |  Branch (189:13): [True: 680k, False: 1.25M]
  |  Branch (189:27): [True: 46.9k, False: 633k]
  ------------------
  190|  1.89M|        uint32_t hmask[4];
  191|  1.89M|        if (!starty4) {
  ------------------
  |  Branch (191:13): [True: 1.48M, False: 408k]
  ------------------
  192|  1.48M|            hmask[0] = mask[x][0][0];
  193|  1.48M|            hmask[1] = mask[x][1][0];
  194|  1.48M|            hmask[2] = mask[x][2][0];
  195|  1.48M|            if (endy4 > 16) {
  ------------------
  |  Branch (195:17): [True: 720k, False: 763k]
  ------------------
  196|   720k|                hmask[0] |= (unsigned) mask[x][0][1] << 16;
  197|   720k|                hmask[1] |= (unsigned) mask[x][1][1] << 16;
  198|   720k|                hmask[2] |= (unsigned) mask[x][2][1] << 16;
  199|   720k|            }
  200|  1.48M|        } else {
  201|   408k|            hmask[0] = mask[x][0][1];
  202|   408k|            hmask[1] = mask[x][1][1];
  203|   408k|            hmask[2] = mask[x][2][1];
  204|   408k|        }
  205|  1.89M|        hmask[3] = 0;
  206|  1.89M|        dsp->lf.loop_filter_sb[0][0](&dst[x * 4], ls, hmask,
  207|  1.89M|                                     (const uint8_t(*)[4]) &lvl[x][0], b4_stride,
  208|  1.89M|                                     &f->lf.lim_lut, endy4 - starty4 HIGHBD_CALL_SUFFIX);
  209|  1.89M|    }
  210|  89.5k|}
lf_apply_tmpl.c:filter_plane_cols_uv:
  251|  66.2k|{
  252|  66.2k|    const Dav1dDSPContext *const dsp = f->dsp;
  253|       |
  254|       |    // filter edges between columns (e.g. block1 | block2)
  255|  1.50M|    for (int x = 0; x < w; x++) {
  ------------------
  |  Branch (255:21): [True: 1.43M, False: 66.2k]
  ------------------
  256|  1.43M|        if (!have_left && !x) continue;
  ------------------
  |  Branch (256:13): [True: 447k, False: 988k]
  |  Branch (256:27): [True: 30.8k, False: 416k]
  ------------------
  257|  1.40M|        uint32_t hmask[3];
  258|  1.40M|        if (!starty4) {
  ------------------
  |  Branch (258:13): [True: 1.06M, False: 339k]
  ------------------
  259|  1.06M|            hmask[0] = mask[x][0][0];
  260|  1.06M|            hmask[1] = mask[x][1][0];
  261|  1.06M|            if (endy4 > (16 >> ss_ver)) {
  ------------------
  |  Branch (261:17): [True: 503k, False: 562k]
  ------------------
  262|   503k|                hmask[0] |= (unsigned) mask[x][0][1] << (16 >> ss_ver);
  263|   503k|                hmask[1] |= (unsigned) mask[x][1][1] << (16 >> ss_ver);
  264|   503k|            }
  265|  1.06M|        } else {
  266|   339k|            hmask[0] = mask[x][0][1];
  267|   339k|            hmask[1] = mask[x][1][1];
  268|   339k|        }
  269|  1.40M|        hmask[2] = 0;
  270|  1.40M|        dsp->lf.loop_filter_sb[1][0](&u[x * 4], ls, hmask,
  271|  1.40M|                                     (const uint8_t(*)[4]) &lvl[x][2], b4_stride,
  272|  1.40M|                                     &f->lf.lim_lut, endy4 - starty4 HIGHBD_CALL_SUFFIX);
  273|  1.40M|        dsp->lf.loop_filter_sb[1][0](&v[x * 4], ls, hmask,
  274|  1.40M|                                     (const uint8_t(*)[4]) &lvl[x][3], b4_stride,
  275|  1.40M|                                     &f->lf.lim_lut, endy4 - starty4 HIGHBD_CALL_SUFFIX);
  276|  1.40M|    }
  277|  66.2k|}
lf_apply_tmpl.c:filter_plane_rows_y:
  220|  89.5k|{
  221|  89.5k|    const Dav1dDSPContext *const dsp = f->dsp;
  222|       |
  223|       |    //                                 block1
  224|       |    // filter edges between rows (e.g. ------)
  225|       |    //                                 block2
  226|  1.87M|    for (int y = starty4; y < endy4;
  ------------------
  |  Branch (226:27): [True: 1.78M, False: 89.5k]
  ------------------
  227|  1.78M|         y++, dst += 4 * PXSTRIDE(ls), lvl += b4_stride)
  ------------------
  |  |   53|  1.78M|#define PXSTRIDE(x) (x)
  ------------------
  228|  1.78M|    {
  229|  1.78M|        if (!have_top && !y) continue;
  ------------------
  |  Branch (229:13): [True: 297k, False: 1.48M]
  |  Branch (229:26): [True: 22.3k, False: 274k]
  ------------------
  230|  1.76M|        const uint32_t vmask[4] = {
  231|  1.76M|            mask[y][0][0] | ((unsigned) mask[y][0][1] << 16),
  232|  1.76M|            mask[y][1][0] | ((unsigned) mask[y][1][1] << 16),
  233|  1.76M|            mask[y][2][0] | ((unsigned) mask[y][2][1] << 16),
  234|  1.76M|            0,
  235|  1.76M|        };
  236|  1.76M|        dsp->lf.loop_filter_sb[0][1](dst, ls, vmask,
  237|  1.76M|                                     (const uint8_t(*)[4]) &lvl[0][1], b4_stride,
  238|  1.76M|                                     &f->lf.lim_lut, w HIGHBD_CALL_SUFFIX);
  239|  1.76M|    }
  240|  89.5k|}
lf_apply_tmpl.c:filter_plane_rows_uv:
  288|  66.2k|{
  289|  66.2k|    const Dav1dDSPContext *const dsp = f->dsp;
  290|  66.2k|    ptrdiff_t off_l = 0;
  291|       |
  292|       |    //                                 block1
  293|       |    // filter edges between rows (e.g. ------)
  294|       |    //                                 block2
  295|  1.23M|    for (int y = starty4; y < endy4;
  ------------------
  |  Branch (295:27): [True: 1.16M, False: 66.2k]
  ------------------
  296|  1.16M|         y++, off_l += 4 * PXSTRIDE(ls), lvl += b4_stride)
  ------------------
  |  |   53|  1.16M|#define PXSTRIDE(x) (x)
  ------------------
  297|  1.16M|    {
  298|  1.16M|        if (!have_top && !y) continue;
  ------------------
  |  Branch (298:13): [True: 174k, False: 994k]
  |  Branch (298:26): [True: 15.9k, False: 158k]
  ------------------
  299|  1.15M|        const uint32_t vmask[3] = {
  300|  1.15M|            mask[y][0][0] | ((unsigned) mask[y][0][1] << (16 >> ss_hor)),
  301|  1.15M|            mask[y][1][0] | ((unsigned) mask[y][1][1] << (16 >> ss_hor)),
  302|  1.15M|            0,
  303|  1.15M|        };
  304|  1.15M|        dsp->lf.loop_filter_sb[1][1](&u[off_l], ls, vmask,
  305|  1.15M|                                     (const uint8_t(*)[4]) &lvl[0][2], b4_stride,
  306|  1.15M|                                     &f->lf.lim_lut, w HIGHBD_CALL_SUFFIX);
  307|  1.15M|        dsp->lf.loop_filter_sb[1][1](&v[off_l], ls, vmask,
  308|  1.15M|                                     (const uint8_t(*)[4]) &lvl[0][3], b4_stride,
  309|  1.15M|                                     &f->lf.lim_lut, w HIGHBD_CALL_SUFFIX);
  310|  1.15M|    }
  311|  66.2k|}
dav1d_copy_lpf_16bpc:
  106|  24.9k|{
  107|  24.9k|    const int have_tt = f->c->n_tc > 1;
  108|  24.9k|    const int resize = f->frame_hdr->width[0] != f->frame_hdr->width[1];
  109|  24.9k|    const int offset = 8 * !!sby;
  110|  24.9k|    const ptrdiff_t *const src_stride = f->cur.stride;
  111|  24.9k|    const ptrdiff_t *const lr_stride = f->sr_cur.p.stride;
  112|  24.9k|    const int tt_off = have_tt * sby * (4 << f->seq_hdr->sb128);
  113|  24.9k|    pixel *const dst[3] = {
  114|  24.9k|        f->lf.lr_lpf_line[0] + tt_off * PXSTRIDE(lr_stride[0]),
  115|  24.9k|        f->lf.lr_lpf_line[1] + tt_off * PXSTRIDE(lr_stride[1]),
  116|  24.9k|        f->lf.lr_lpf_line[2] + tt_off * PXSTRIDE(lr_stride[1])
  117|  24.9k|    };
  118|       |
  119|       |    // TODO Also check block level restore type to reduce copying.
  120|  24.9k|    const int restore_planes = f->lf.restore_planes;
  121|       |
  122|  24.9k|    if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (122:9): [True: 21.6k, False: 3.34k]
  |  Branch (122:29): [True: 2.77k, False: 572]
  ------------------
  123|  24.3k|        const int h = f->cur.p.h;
  124|  24.3k|        const int w = f->bw << 2;
  125|  24.3k|        const int row_h = imin((sby + 1) << (6 + f->seq_hdr->sb128), h - 1);
  126|  24.3k|        const int y_stripe = (sby << (6 + f->seq_hdr->sb128)) - offset;
  127|  24.3k|        if (restore_planes & LR_RESTORE_Y || !resize)
  ------------------
  |  Branch (127:13): [True: 7.74k, False: 16.6k]
  |  Branch (127:46): [True: 14.8k, False: 1.84k]
  ------------------
  128|  22.5k|            backup_lpf(f, dst[0], lr_stride[0],
  129|  22.5k|                       src[0] - offset * PXSTRIDE(src_stride[0]), src_stride[0],
  130|  22.5k|                       0, f->seq_hdr->sb128, y_stripe, row_h, w, h, 0, 1);
  131|  24.3k|        if (have_tt && resize) {
  ------------------
  |  Branch (131:13): [True: 0, False: 24.3k]
  |  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|  24.3k|    }
  138|  24.9k|    if ((f->seq_hdr->cdef || restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) &&
  ------------------
  |  Branch (138:10): [True: 21.6k, False: 3.34k]
  |  Branch (138:30): [True: 2.81k, False: 532]
  ------------------
  139|  24.4k|        f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400)
  ------------------
  |  Branch (139:9): [True: 18.2k, False: 6.16k]
  ------------------
  140|  18.2k|    {
  141|  18.2k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  142|  18.2k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  143|  18.2k|        const int h = (f->cur.p.h + ss_ver) >> ss_ver;
  144|  18.2k|        const int w = f->bw << (2 - ss_hor);
  145|  18.2k|        const int row_h = imin((sby + 1) << ((6 - ss_ver) + f->seq_hdr->sb128), h - 1);
  146|  18.2k|        const int offset_uv = offset >> ss_ver;
  147|  18.2k|        const int y_stripe = (sby << ((6 - ss_ver) + f->seq_hdr->sb128)) - offset_uv;
  148|  18.2k|        const ptrdiff_t cdef_off_uv = sby * 4 * PXSTRIDE(src_stride[1]);
  149|  18.2k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_U) {
  ------------------
  |  Branch (149:13): [True: 15.4k, False: 2.81k]
  |  Branch (149:33): [True: 2.24k, False: 572]
  ------------------
  150|  17.6k|            if (restore_planes & LR_RESTORE_U || !resize)
  ------------------
  |  Branch (150:17): [True: 5.91k, False: 11.7k]
  |  Branch (150:50): [True: 10.0k, False: 1.72k]
  ------------------
  151|  15.9k|                backup_lpf(f, dst[1], lr_stride[1],
  152|  15.9k|                           src[1] - offset_uv * PXSTRIDE(src_stride[1]),
  153|  15.9k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  154|  15.9k|                           row_h, w, h, ss_hor, 1);
  155|  17.6k|            if (have_tt && resize)
  ------------------
  |  Branch (155:17): [True: 0, False: 17.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]),
  158|      0|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  159|      0|                           row_h, w, h, ss_hor, 0);
  160|  17.6k|        }
  161|  18.2k|        if (f->seq_hdr->cdef || restore_planes & LR_RESTORE_V) {
  ------------------
  |  Branch (161:13): [True: 15.4k, False: 2.81k]
  |  Branch (161:33): [True: 2.05k, False: 764]
  ------------------
  162|  17.5k|            if (restore_planes & LR_RESTORE_V || !resize)
  ------------------
  |  Branch (162:17): [True: 5.94k, False: 11.5k]
  |  Branch (162:50): [True: 9.97k, False: 1.59k]
  ------------------
  163|  15.9k|                backup_lpf(f, dst[2], lr_stride[1],
  164|  15.9k|                           src[2] - offset_uv * PXSTRIDE(src_stride[1]),
  165|  15.9k|                           src_stride[1], ss_ver, f->seq_hdr->sb128, y_stripe,
  166|  15.9k|                           row_h, w, h, ss_hor, 1);
  167|  17.5k|            if (have_tt && resize)
  ------------------
  |  Branch (167:17): [True: 0, False: 17.5k]
  |  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|  17.5k|        }
  173|  18.2k|    }
  174|  24.9k|}
dav1d_loopfilter_sbrow_cols_16bpc:
  316|  26.4k|{
  317|  26.4k|    int x, have_left;
  318|       |    // Don't filter outside the frame
  319|  26.4k|    const int is_sb64 = !f->seq_hdr->sb128;
  320|  26.4k|    const int starty4 = (sby & is_sb64) << 4;
  321|  26.4k|    const int sbsz = 32 >> is_sb64;
  322|  26.4k|    const int sbl2 = 5 - is_sb64;
  323|  26.4k|    const int halign = (f->bh + 31) & ~31;
  324|  26.4k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  325|  26.4k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  326|  26.4k|    const int vmask = 16 >> ss_ver, hmask = 16 >> ss_hor;
  327|  26.4k|    const unsigned vmax = 1U << vmask, hmax = 1U << hmask;
  328|  26.4k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  329|  26.4k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  330|       |
  331|       |    // fix lpf strength at tile col boundaries
  332|  26.4k|    const uint8_t *lpf_y = &f->lf.tx_lpf_right_edge[0][sby << sbl2];
  333|  26.4k|    const uint8_t *lpf_uv = &f->lf.tx_lpf_right_edge[1][sby << (sbl2 - ss_ver)];
  334|  27.3k|    for (int tile_col = 1;; tile_col++) {
  335|  27.3k|        x = f->frame_hdr->tiling.col_start_sb[tile_col];
  336|  27.3k|        if ((x << sbl2) >= f->bw) break;
  ------------------
  |  Branch (336:13): [True: 26.4k, False: 881]
  ------------------
  337|    881|        const int bx4 = x & is_sb64 ? 16 : 0, cbx4 = bx4 >> ss_hor;
  ------------------
  |  Branch (337:25): [True: 274, False: 607]
  ------------------
  338|    881|        x >>= is_sb64;
  339|       |
  340|    881|        uint16_t (*const y_hmask)[2] = lflvl[x].filter_y[0][bx4];
  341|  15.1k|        for (unsigned y = starty4, mask = 1 << y; y < endy4; y++, mask <<= 1) {
  ------------------
  |  Branch (341:51): [True: 14.2k, False: 881]
  ------------------
  342|  14.2k|            const int sidx = mask >= 0x10000U;
  343|  14.2k|            const unsigned smask = mask >> (sidx << 4);
  344|  14.2k|            const int idx = 2 * !!(y_hmask[2][sidx] & smask) +
  345|  14.2k|                                !!(y_hmask[1][sidx] & smask);
  346|  14.2k|            y_hmask[2][sidx] &= ~smask;
  347|  14.2k|            y_hmask[1][sidx] &= ~smask;
  348|  14.2k|            y_hmask[0][sidx] &= ~smask;
  349|  14.2k|            y_hmask[imin(idx, lpf_y[y - starty4])][sidx] |= smask;
  350|  14.2k|        }
  351|       |
  352|    881|        if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (352:13): [True: 501, False: 380]
  ------------------
  353|    501|            uint16_t (*const uv_hmask)[2] = lflvl[x].filter_uv[0][cbx4];
  354|  7.28k|            for (unsigned y = starty4 >> ss_ver, uv_mask = 1 << y; y < uv_endy4;
  ------------------
  |  Branch (354:68): [True: 6.77k, False: 501]
  ------------------
  355|  6.77k|                 y++, uv_mask <<= 1)
  356|  6.77k|            {
  357|  6.77k|                const int sidx = uv_mask >= vmax;
  358|  6.77k|                const unsigned smask = uv_mask >> (sidx << (4 - ss_ver));
  359|  6.77k|                const int idx = !!(uv_hmask[1][sidx] & smask);
  360|  6.77k|                uv_hmask[1][sidx] &= ~smask;
  361|  6.77k|                uv_hmask[0][sidx] &= ~smask;
  362|  6.77k|                uv_hmask[imin(idx, lpf_uv[y - (starty4 >> ss_ver)])][sidx] |= smask;
  363|  6.77k|            }
  364|    501|        }
  365|    881|        lpf_y  += halign;
  366|    881|        lpf_uv += halign >> ss_ver;
  367|    881|    }
  368|       |
  369|       |    // fix lpf strength at tile row boundaries
  370|  26.4k|    if (start_of_tile_row) {
  ------------------
  |  Branch (370:9): [True: 297, False: 26.2k]
  ------------------
  371|    297|        const BlockContext *a;
  372|    297|        for (x = 0, a = &f->a[f->sb128w * (start_of_tile_row - 1)];
  373|    795|             x < f->sb128w; x++, a++)
  ------------------
  |  Branch (373:14): [True: 498, False: 297]
  ------------------
  374|    498|        {
  375|    498|            uint16_t (*const y_vmask)[2] = lflvl[x].filter_y[1][starty4];
  376|    498|            const unsigned w = imin(32, f->w4 - (x << 5));
  377|  10.9k|            for (unsigned mask = 1, i = 0; i < w; mask <<= 1, i++) {
  ------------------
  |  Branch (377:44): [True: 10.4k, False: 498]
  ------------------
  378|  10.4k|                const int sidx = mask >= 0x10000U;
  379|  10.4k|                const unsigned smask = mask >> (sidx << 4);
  380|  10.4k|                const int idx = 2 * !!(y_vmask[2][sidx] & smask) +
  381|  10.4k|                                    !!(y_vmask[1][sidx] & smask);
  382|  10.4k|                y_vmask[2][sidx] &= ~smask;
  383|  10.4k|                y_vmask[1][sidx] &= ~smask;
  384|  10.4k|                y_vmask[0][sidx] &= ~smask;
  385|  10.4k|                y_vmask[imin(idx, a->tx_lpf_y[i])][sidx] |= smask;
  386|  10.4k|            }
  387|       |
  388|    498|            if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (388:17): [True: 307, False: 191]
  ------------------
  389|    307|                const unsigned cw = (w + ss_hor) >> ss_hor;
  390|    307|                uint16_t (*const uv_vmask)[2] = lflvl[x].filter_uv[1][starty4 >> ss_ver];
  391|  5.37k|                for (unsigned uv_mask = 1, i = 0; i < cw; uv_mask <<= 1, i++) {
  ------------------
  |  Branch (391:51): [True: 5.06k, False: 307]
  ------------------
  392|  5.06k|                    const int sidx = uv_mask >= hmax;
  393|  5.06k|                    const unsigned smask = uv_mask >> (sidx << (4 - ss_hor));
  394|  5.06k|                    const int idx = !!(uv_vmask[1][sidx] & smask);
  395|  5.06k|                    uv_vmask[1][sidx] &= ~smask;
  396|  5.06k|                    uv_vmask[0][sidx] &= ~smask;
  397|  5.06k|                    uv_vmask[imin(idx, a->tx_lpf_uv[i])][sidx] |= smask;
  398|  5.06k|                }
  399|    307|            }
  400|    498|        }
  401|    297|    }
  402|       |
  403|  26.4k|    pixel *ptr;
  404|  26.4k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  405|  83.9k|    for (ptr = p[0], have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (405:44): [True: 57.5k, False: 26.4k]
  ------------------
  406|  57.5k|         x++, have_left = 1, ptr += 128, level_ptr += 32)
  407|  57.5k|    {
  408|  57.5k|        filter_plane_cols_y(f, have_left, level_ptr, f->b4_stride,
  409|  57.5k|                            lflvl[x].filter_y[0], ptr, f->cur.stride[0],
  410|  57.5k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  411|  57.5k|    }
  412|       |
  413|  26.4k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (413:9): [True: 8.84k, False: 17.6k]
  |  Branch (413:46): [True: 7.76k, False: 1.07k]
  ------------------
  414|  7.76k|        return;
  415|       |
  416|  18.7k|    ptrdiff_t uv_off;
  417|  18.7k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  418|  64.9k|    for (uv_off = 0, have_left = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (418:44): [True: 46.2k, False: 18.7k]
  ------------------
  419|  46.2k|         x++, have_left = 1, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  420|  46.2k|    {
  421|  46.2k|        filter_plane_cols_uv(f, have_left, level_ptr, f->b4_stride,
  422|  46.2k|                             lflvl[x].filter_uv[0],
  423|  46.2k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  424|  46.2k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  425|  46.2k|                             starty4 >> ss_ver, uv_endy4, ss_ver);
  426|  46.2k|    }
  427|  18.7k|}
dav1d_loopfilter_sbrow_rows_16bpc:
  432|  26.4k|{
  433|  26.4k|    int x;
  434|       |    // Don't filter outside the frame
  435|  26.4k|    const int have_top = sby > 0;
  436|  26.4k|    const int is_sb64 = !f->seq_hdr->sb128;
  437|  26.4k|    const int starty4 = (sby & is_sb64) << 4;
  438|  26.4k|    const int sbsz = 32 >> is_sb64;
  439|  26.4k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  440|  26.4k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  441|  26.4k|    const unsigned endy4 = starty4 + imin(f->h4 - sby * sbsz, sbsz);
  442|  26.4k|    const unsigned uv_endy4 = (endy4 + ss_ver) >> ss_ver;
  443|       |
  444|  26.4k|    pixel *ptr;
  445|  26.4k|    uint8_t (*level_ptr)[4] = f->lf.level + f->b4_stride * sby * sbsz;
  446|  83.9k|    for (ptr = p[0], x = 0; x < f->sb128w; x++, ptr += 128, level_ptr += 32) {
  ------------------
  |  Branch (446:29): [True: 57.5k, False: 26.4k]
  ------------------
  447|  57.5k|        filter_plane_rows_y(f, have_top, level_ptr, f->b4_stride,
  448|  57.5k|                            lflvl[x].filter_y[1], ptr, f->cur.stride[0],
  449|  57.5k|                            imin(32, f->w4 - x * 32), starty4, endy4);
  450|  57.5k|    }
  451|       |
  452|  26.4k|    if (!f->frame_hdr->loopfilter.level_u && !f->frame_hdr->loopfilter.level_v)
  ------------------
  |  Branch (452:9): [True: 8.84k, False: 17.6k]
  |  Branch (452:46): [True: 7.76k, False: 1.07k]
  ------------------
  453|  7.76k|        return;
  454|       |
  455|  18.7k|    ptrdiff_t uv_off;
  456|  18.7k|    level_ptr = f->lf.level + f->b4_stride * (sby * sbsz >> ss_ver);
  457|  64.9k|    for (uv_off = 0, x = 0; x < f->sb128w;
  ------------------
  |  Branch (457:29): [True: 46.2k, False: 18.7k]
  ------------------
  458|  46.2k|         x++, uv_off += 128 >> ss_hor, level_ptr += 32 >> ss_hor)
  459|  46.2k|    {
  460|  46.2k|        filter_plane_rows_uv(f, have_top, level_ptr, f->b4_stride,
  461|  46.2k|                             lflvl[x].filter_uv[1],
  462|  46.2k|                             &p[1][uv_off], &p[2][uv_off], f->cur.stride[1],
  463|  46.2k|                             (imin(32, f->w4 - x * 32) + ss_hor) >> ss_hor,
  464|  46.2k|                             starty4 >> ss_ver, uv_endy4, ss_hor);
  465|  46.2k|    }
  466|  18.7k|}

dav1d_create_lf_mask_intra:
  271|  1.79M|{
  272|  1.79M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  273|  1.79M|    const int bw4 = imin(iw - bx, b_dim[0]);
  274|  1.79M|    const int bh4 = imin(ih - by, b_dim[1]);
  275|  1.79M|    const int bx4 = bx & 31;
  276|  1.79M|    const int by4 = by & 31;
  277|  1.79M|    assert(bw4 >= 0 && bh4 >= 0);
  ------------------
  |  |  140|  3.59M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 1.79M, False: 0]
  |  |  |  Branch (140:30): [True: 1.79M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 1.79M]
  |  |  ------------------
  ------------------
  278|       |
  279|  1.79M|    if (bw4 && bh4) {
  ------------------
  |  Branch (279:9): [True: 1.79M, False: 4.94k]
  |  Branch (279:16): [True: 1.73M, False: 61.0k]
  ------------------
  280|  1.73M|        uint8_t (*level_cache_ptr)[4] = level_cache + by * b4_stride + bx;
  281|  7.80M|        for (int y = 0; y < bh4; y++) {
  ------------------
  |  Branch (281:25): [True: 6.07M, False: 1.73M]
  ------------------
  282|  46.8M|            for (int x = 0; x < bw4; x++) {
  ------------------
  |  Branch (282:29): [True: 40.8M, False: 6.07M]
  ------------------
  283|  40.8M|                level_cache_ptr[x][0] = filter_level[0][0][0];
  284|  40.8M|                level_cache_ptr[x][1] = filter_level[1][0][0];
  285|  40.8M|            }
  286|  6.07M|            level_cache_ptr += b4_stride;
  287|  6.07M|        }
  288|       |
  289|  1.73M|        mask_edges_intra(lflvl->filter_y, by4, bx4, bw4, bh4, ytx, ay, ly);
  290|  1.73M|    }
  291|       |
  292|  1.79M|    if (!auv) return;
  ------------------
  |  Branch (292:9): [True: 244k, False: 1.55M]
  ------------------
  293|       |
  294|  1.55M|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
  295|  1.55M|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
  296|  1.55M|    const int cbw4 = imin(((iw + ss_hor) >> ss_hor) - (bx >> ss_hor),
  297|  1.55M|                          (b_dim[0] + ss_hor) >> ss_hor);
  298|  1.55M|    const int cbh4 = imin(((ih + ss_ver) >> ss_ver) - (by >> ss_ver),
  299|  1.55M|                          (b_dim[1] + ss_ver) >> ss_ver);
  300|  1.55M|    assert(cbw4 >= 0 && cbh4 >= 0);
  ------------------
  |  |  140|  3.10M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 1.55M, False: 0]
  |  |  |  Branch (140:30): [True: 1.55M, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 1.55M]
  |  |  ------------------
  ------------------
  301|       |
  302|  1.55M|    if (!cbw4 || !cbh4) return;
  ------------------
  |  Branch (302:9): [True: 2.51k, False: 1.55M]
  |  Branch (302:18): [True: 4.86k, False: 1.54M]
  ------------------
  303|       |
  304|  1.54M|    const int cbx4 = bx4 >> ss_hor;
  305|  1.54M|    const int cby4 = by4 >> ss_ver;
  306|       |
  307|  1.54M|    uint8_t (*level_cache_ptr)[4] =
  308|  1.54M|        level_cache + (by >> ss_ver) * b4_stride + (bx >> ss_hor);
  309|  6.69M|    for (int y = 0; y < cbh4; y++) {
  ------------------
  |  Branch (309:21): [True: 5.14M, False: 1.54M]
  ------------------
  310|  34.7M|        for (int x = 0; x < cbw4; x++) {
  ------------------
  |  Branch (310:25): [True: 29.5M, False: 5.14M]
  ------------------
  311|  29.5M|            level_cache_ptr[x][2] = filter_level[2][0][0];
  312|  29.5M|            level_cache_ptr[x][3] = filter_level[3][0][0];
  313|  29.5M|        }
  314|  5.14M|        level_cache_ptr += b4_stride;
  315|  5.14M|    }
  316|       |
  317|  1.54M|    mask_edges_chroma(lflvl->filter_uv, cby4, cbx4, cbw4, cbh4, 0, uvtx,
  318|  1.54M|                      auv, luv, ss_hor, ss_ver);
  319|  1.54M|}
dav1d_create_lf_mask_inter:
  334|   104k|{
  335|   104k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  336|   104k|    const int bw4 = imin(iw - bx, b_dim[0]);
  337|   104k|    const int bh4 = imin(ih - by, b_dim[1]);
  338|   104k|    const int bx4 = bx & 31;
  339|   104k|    const int by4 = by & 31;
  340|   104k|    assert(bw4 >= 0 && bh4 >= 0);
  ------------------
  |  |  140|   208k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 104k, False: 0]
  |  |  |  Branch (140:30): [True: 104k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 104k]
  |  |  ------------------
  ------------------
  341|       |
  342|   104k|    if (bw4 && bh4) {
  ------------------
  |  Branch (342:9): [True: 102k, False: 1.66k]
  |  Branch (342:16): [True: 100k, False: 2.33k]
  ------------------
  343|   100k|        uint8_t (*level_cache_ptr)[4] = level_cache + by * b4_stride + bx;
  344|   452k|        for (int y = 0; y < bh4; y++) {
  ------------------
  |  Branch (344:25): [True: 352k, False: 100k]
  ------------------
  345|  2.31M|            for (int x = 0; x < bw4; x++) {
  ------------------
  |  Branch (345:29): [True: 1.95M, False: 352k]
  ------------------
  346|  1.95M|                level_cache_ptr[x][0] = filter_level[0][0][0];
  347|  1.95M|                level_cache_ptr[x][1] = filter_level[1][0][0];
  348|  1.95M|            }
  349|   352k|            level_cache_ptr += b4_stride;
  350|   352k|        }
  351|       |
  352|   100k|        mask_edges_inter(lflvl->filter_y, by4, bx4, bw4, bh4, skip,
  353|   100k|                         max_ytx, tx_masks, ay, ly);
  354|   100k|    }
  355|       |
  356|   104k|    if (!auv) return;
  ------------------
  |  Branch (356:9): [True: 48.9k, False: 55.1k]
  ------------------
  357|       |
  358|  55.1k|    const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
  359|  55.1k|    const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
  360|  55.1k|    const int cbw4 = imin(((iw + ss_hor) >> ss_hor) - (bx >> ss_hor),
  361|  55.1k|                          (b_dim[0] + ss_hor) >> ss_hor);
  362|  55.1k|    const int cbh4 = imin(((ih + ss_ver) >> ss_ver) - (by >> ss_ver),
  363|  55.1k|                          (b_dim[1] + ss_ver) >> ss_ver);
  364|  55.1k|    assert(cbw4 >= 0 && cbh4 >= 0);
  ------------------
  |  |  140|   110k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 55.1k, False: 0]
  |  |  |  Branch (140:30): [True: 55.1k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 55.1k]
  |  |  ------------------
  ------------------
  365|       |
  366|  55.1k|    if (!cbw4 || !cbh4) return;
  ------------------
  |  Branch (366:9): [True: 93, False: 55.0k]
  |  Branch (366:18): [True: 410, False: 54.6k]
  ------------------
  367|       |
  368|  54.6k|    const int cbx4 = bx4 >> ss_hor;
  369|  54.6k|    const int cby4 = by4 >> ss_ver;
  370|       |
  371|  54.6k|    uint8_t (*level_cache_ptr)[4] =
  372|  54.6k|        level_cache + (by >> ss_ver) * b4_stride + (bx >> ss_hor);
  373|   171k|    for (int y = 0; y < cbh4; y++) {
  ------------------
  |  Branch (373:21): [True: 116k, False: 54.6k]
  ------------------
  374|   466k|        for (int x = 0; x < cbw4; x++) {
  ------------------
  |  Branch (374:25): [True: 349k, False: 116k]
  ------------------
  375|   349k|            level_cache_ptr[x][2] = filter_level[2][0][0];
  376|   349k|            level_cache_ptr[x][3] = filter_level[3][0][0];
  377|   349k|        }
  378|   116k|        level_cache_ptr += b4_stride;
  379|   116k|    }
  380|       |
  381|  54.6k|    mask_edges_chroma(lflvl->filter_uv, cby4, cbx4, cbw4, cbh4, skip, uvtx,
  382|  54.6k|                      auv, luv, ss_hor, ss_ver);
  383|  54.6k|}
dav1d_calc_eih:
  385|  16.2k|void dav1d_calc_eih(Av1FilterLUT *const lim_lut, const int filter_sharpness) {
  386|       |    // set E/I/H values from loopfilter level
  387|  16.2k|    const int sharp = filter_sharpness;
  388|  1.05M|    for (int level = 0; level < 64; level++) {
  ------------------
  |  Branch (388:25): [True: 1.03M, False: 16.2k]
  ------------------
  389|  1.03M|        int limit = level;
  390|       |
  391|  1.03M|        if (sharp > 0) {
  ------------------
  |  Branch (391:13): [True: 524k, False: 515k]
  ------------------
  392|   524k|            limit >>= (sharp + 3) >> 2;
  393|   524k|            limit = imin(limit, 9 - sharp);
  394|   524k|        }
  395|  1.03M|        limit = imax(limit, 1);
  396|       |
  397|  1.03M|        lim_lut->i[level] = limit;
  398|  1.03M|        lim_lut->e[level] = 2 * (level + 2) + limit;
  399|  1.03M|    }
  400|  16.2k|    lim_lut->sharp[0] = (sharp + 3) >> 2;
  401|  16.2k|    lim_lut->sharp[1] = sharp ? 9 - sharp : 0xff;
  ------------------
  |  Branch (401:25): [True: 8.19k, False: 8.05k]
  ------------------
  402|  16.2k|}
dav1d_calc_lf_values:
  441|  30.0k|{
  442|  30.0k|    const int n_seg = hdr->segmentation.enabled ? 8 : 1;
  ------------------
  |  Branch (442:23): [True: 13.8k, False: 16.1k]
  ------------------
  443|       |
  444|  30.0k|    if (!hdr->loopfilter.level_y[0] && !hdr->loopfilter.level_y[1]) {
  ------------------
  |  Branch (444:9): [True: 7.18k, False: 22.8k]
  |  Branch (444:40): [True: 5.47k, False: 1.71k]
  ------------------
  445|  5.47k|        memset(lflvl_values, 0, sizeof(*lflvl_values) * n_seg);
  446|  5.47k|        return;
  447|  5.47k|    }
  448|       |
  449|  24.5k|    const Dav1dLoopfilterModeRefDeltas *const mr_deltas =
  450|  24.5k|        hdr->loopfilter.mode_ref_delta_enabled ?
  ------------------
  |  Branch (450:9): [True: 9.39k, False: 15.1k]
  ------------------
  451|  24.5k|        &hdr->loopfilter.mode_ref_deltas : NULL;
  452|   131k|    for (int s = 0; s < n_seg; s++) {
  ------------------
  |  Branch (452:21): [True: 107k, False: 24.5k]
  ------------------
  453|   107k|        const Dav1dSegmentationData *const segd =
  454|   107k|            hdr->segmentation.enabled ? &hdr->segmentation.seg_data.d[s] : NULL;
  ------------------
  |  Branch (454:13): [True: 94.6k, False: 12.7k]
  ------------------
  455|       |
  456|   107k|        calc_lf_value(lflvl_values[s][0], hdr->loopfilter.level_y[0],
  457|   107k|                      lf_delta[0], segd ? segd->delta_lf_y_v : 0, mr_deltas);
  ------------------
  |  Branch (457:36): [True: 94.6k, False: 12.7k]
  ------------------
  458|   107k|        calc_lf_value(lflvl_values[s][1], hdr->loopfilter.level_y[1],
  459|   107k|                      lf_delta[hdr->delta.lf.multi ? 1 : 0],
  ------------------
  |  Branch (459:32): [True: 50.3k, False: 56.9k]
  ------------------
  460|   107k|                      segd ? segd->delta_lf_y_h : 0, mr_deltas);
  ------------------
  |  Branch (460:23): [True: 94.6k, False: 12.7k]
  ------------------
  461|   107k|        calc_lf_value_chroma(lflvl_values[s][2], hdr->loopfilter.level_u,
  462|   107k|                             lf_delta[hdr->delta.lf.multi ? 2 : 0],
  ------------------
  |  Branch (462:39): [True: 50.3k, False: 56.9k]
  ------------------
  463|   107k|                             segd ? segd->delta_lf_u : 0, mr_deltas);
  ------------------
  |  Branch (463:30): [True: 94.6k, False: 12.7k]
  ------------------
  464|   107k|        calc_lf_value_chroma(lflvl_values[s][3], hdr->loopfilter.level_v,
  465|   107k|                             lf_delta[hdr->delta.lf.multi ? 3 : 0],
  ------------------
  |  Branch (465:39): [True: 50.3k, False: 56.9k]
  ------------------
  466|   107k|                             segd ? segd->delta_lf_v : 0, mr_deltas);
  ------------------
  |  Branch (466:30): [True: 94.6k, False: 12.7k]
  ------------------
  467|   107k|    }
  468|  24.5k|}
lf_mask.c:mask_edges_intra:
  152|  1.73M|{
  153|  1.73M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
  154|  1.73M|    const int twl4 = t_dim->lw, thl4 = t_dim->lh;
  155|  1.73M|    const int twl4c = imin(2, twl4), thl4c = imin(2, thl4);
  156|  1.73M|    int y, x;
  157|       |
  158|       |    // left block edge
  159|  1.73M|    unsigned mask = 1U << by4;
  160|  7.80M|    for (y = 0; y < h4; y++, mask <<= 1) {
  ------------------
  |  Branch (160:17): [True: 6.07M, False: 1.73M]
  ------------------
  161|  6.07M|        const int sidx = mask >= 0x10000;
  162|  6.07M|        const unsigned smask = mask >> (sidx << 4);
  163|  6.07M|        masks[0][bx4][imin(twl4c, l[y])][sidx] |= smask;
  164|  6.07M|    }
  165|       |
  166|       |    // top block edge
  167|  7.94M|    for (x = 0, mask = 1U << bx4; x < w4; x++, mask <<= 1) {
  ------------------
  |  Branch (167:35): [True: 6.21M, False: 1.73M]
  ------------------
  168|  6.21M|        const int sidx = mask >= 0x10000;
  169|  6.21M|        const unsigned smask = mask >> (sidx << 4);
  170|  6.21M|        masks[1][by4][imin(thl4c, a[x])][sidx] |= smask;
  171|  6.21M|    }
  172|       |
  173|       |    // inner (tx) left|right edges
  174|  1.73M|    const int hstep = t_dim->w;
  175|  1.73M|    unsigned t = 1U << by4;
  176|  1.73M|    unsigned inner = (unsigned) ((((uint64_t) t) << h4) - t);
  177|  1.73M|    unsigned inner1 = inner & 0xffff, inner2 = inner >> 16;
  178|  1.93M|    for (x = hstep; x < w4; x += hstep) {
  ------------------
  |  Branch (178:21): [True: 199k, False: 1.73M]
  ------------------
  179|   199k|        if (inner1) masks[0][bx4 + x][twl4c][0] |= inner1;
  ------------------
  |  Branch (179:13): [True: 132k, False: 67.0k]
  ------------------
  180|   199k|        if (inner2) masks[0][bx4 + x][twl4c][1] |= inner2;
  ------------------
  |  Branch (180:13): [True: 91.4k, False: 107k]
  ------------------
  181|   199k|    }
  182|       |
  183|       |    //            top
  184|       |    // inner (tx) --- edges
  185|       |    //           bottom
  186|  1.73M|    const int vstep = t_dim->h;
  187|  1.73M|    t = 1U << bx4;
  188|  1.73M|    inner = (unsigned) ((((uint64_t) t) << w4) - t);
  189|  1.73M|    inner1 = inner & 0xffff;
  190|  1.73M|    inner2 = inner >> 16;
  191|  1.94M|    for (y = vstep; y < h4; y += vstep) {
  ------------------
  |  Branch (191:21): [True: 206k, False: 1.73M]
  ------------------
  192|   206k|        if (inner1) masks[1][by4 + y][thl4c][0] |= inner1;
  ------------------
  |  Branch (192:13): [True: 140k, False: 66.1k]
  ------------------
  193|   206k|        if (inner2) masks[1][by4 + y][thl4c][1] |= inner2;
  ------------------
  |  Branch (193:13): [True: 89.5k, False: 117k]
  ------------------
  194|   206k|    }
  195|       |
  196|  1.73M|    dav1d_memset_likely_pow2(a, thl4c, w4);
  197|  1.73M|    dav1d_memset_likely_pow2(l, twl4c, h4);
  198|  1.73M|}
lf_mask.c:mask_edges_chroma:
  207|  1.60M|{
  208|  1.60M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
  209|  1.60M|    const int twl4 = t_dim->lw, thl4 = t_dim->lh;
  210|  1.60M|    const int twl4c = !!twl4, thl4c = !!thl4;
  211|  1.60M|    int y, x;
  212|  1.60M|    const int vbits = 4 - ss_ver, hbits = 4 - ss_hor;
  213|  1.60M|    const int vmask = 16 >> ss_ver, hmask = 16 >> ss_hor;
  214|  1.60M|    const unsigned vmax = 1 << vmask, hmax = 1 << hmask;
  215|       |
  216|       |    // left block edge
  217|  1.60M|    unsigned mask = 1U << cby4;
  218|  6.86M|    for (y = 0; y < ch4; y++, mask <<= 1) {
  ------------------
  |  Branch (218:17): [True: 5.26M, False: 1.60M]
  ------------------
  219|  5.26M|        const int sidx = mask >= vmax;
  220|  5.26M|        const unsigned smask = mask >> (sidx << vbits);
  221|  5.26M|        masks[0][cbx4][imin(twl4c, l[y])][sidx] |= smask;
  222|  5.26M|    }
  223|       |
  224|       |    // top block edge
  225|  6.94M|    for (x = 0, mask = 1U << cbx4; x < cw4; x++, mask <<= 1) {
  ------------------
  |  Branch (225:36): [True: 5.34M, False: 1.60M]
  ------------------
  226|  5.34M|        const int sidx = mask >= hmax;
  227|  5.34M|        const unsigned smask = mask >> (sidx << hbits);
  228|  5.34M|        masks[1][cby4][imin(thl4c, a[x])][sidx] |= smask;
  229|  5.34M|    }
  230|       |
  231|  1.60M|    if (!skip_inter) {
  ------------------
  |  Branch (231:9): [True: 1.57M, False: 25.8k]
  ------------------
  232|       |        // inner (tx) left|right edges
  233|  1.57M|        const int hstep = t_dim->w;
  234|  1.57M|        unsigned t = 1U << cby4;
  235|  1.57M|        unsigned inner = (unsigned) ((((uint64_t) t) << ch4) - t);
  236|  1.57M|        unsigned inner1 = inner & ((1 << vmask) - 1), inner2 = inner >> vmask;
  237|  1.64M|        for (x = hstep; x < cw4; x += hstep) {
  ------------------
  |  Branch (237:25): [True: 68.5k, False: 1.57M]
  ------------------
  238|  68.5k|            if (inner1) masks[0][cbx4 + x][twl4c][0] |= inner1;
  ------------------
  |  Branch (238:17): [True: 54.4k, False: 14.1k]
  ------------------
  239|  68.5k|            if (inner2) masks[0][cbx4 + x][twl4c][1] |= inner2;
  ------------------
  |  Branch (239:17): [True: 42.8k, False: 25.7k]
  ------------------
  240|  68.5k|        }
  241|       |
  242|       |        //            top
  243|       |        // inner (tx) --- edges
  244|       |        //           bottom
  245|  1.57M|        const int vstep = t_dim->h;
  246|  1.57M|        t = 1U << cbx4;
  247|  1.57M|        inner = (unsigned) ((((uint64_t) t) << cw4) - t);
  248|  1.57M|        inner1 = inner & ((1 << hmask) - 1), inner2 = inner >> hmask;
  249|  1.66M|        for (y = vstep; y < ch4; y += vstep) {
  ------------------
  |  Branch (249:25): [True: 85.1k, False: 1.57M]
  ------------------
  250|  85.1k|            if (inner1) masks[1][cby4 + y][thl4c][0] |= inner1;
  ------------------
  |  Branch (250:17): [True: 68.8k, False: 16.3k]
  ------------------
  251|  85.1k|            if (inner2) masks[1][cby4 + y][thl4c][1] |= inner2;
  ------------------
  |  Branch (251:17): [True: 45.3k, False: 39.8k]
  ------------------
  252|  85.1k|        }
  253|  1.57M|    }
  254|       |
  255|  1.60M|    dav1d_memset_likely_pow2(a, thl4c, cw4);
  256|  1.60M|    dav1d_memset_likely_pow2(l, twl4c, ch4);
  257|  1.60M|}
lf_mask.c:mask_edges_inter:
   85|   100k|{
   86|   100k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[max_tx];
   87|   100k|    int y, x;
   88|       |
   89|   100k|    ALIGN_STK_16(uint8_t, txa, 2 /* edge */, [2 /* txsz, step */][32 /* y */][32 /* x */]);
  ------------------
  |  |  100|   100k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   100k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
   90|   204k|    for (int y_off = 0, y = 0; y < h4; y += t_dim->h, y_off++)
  ------------------
  |  Branch (90:32): [True: 103k, False: 100k]
  ------------------
   91|   221k|        for (int x_off = 0, x = 0; x < w4; x += t_dim->w, x_off++)
  ------------------
  |  Branch (91:36): [True: 117k, False: 103k]
  ------------------
   92|   117k|            decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][y][x],
   93|   117k|                      max_tx, 0, y_off, x_off, tx_masks);
   94|       |
   95|       |    // left block edge
   96|   100k|    unsigned mask = 1U << by4;
   97|   452k|    for (y = 0; y < h4; y++, mask <<= 1) {
  ------------------
  |  Branch (97:17): [True: 352k, False: 100k]
  ------------------
   98|   352k|        const int sidx = mask >= 0x10000;
   99|   352k|        const unsigned smask = mask >> (sidx << 4);
  100|   352k|        masks[0][bx4][imin(txa[0][0][y][0], l[y])][sidx] |= smask;
  101|   352k|    }
  102|       |
  103|       |    // top block edge
  104|   441k|    for (x = 0, mask = 1U << bx4; x < w4; x++, mask <<= 1) {
  ------------------
  |  Branch (104:35): [True: 341k, False: 100k]
  ------------------
  105|   341k|        const int sidx = mask >= 0x10000;
  106|   341k|        const unsigned smask = mask >> (sidx << 4);
  107|   341k|        masks[1][by4][imin(txa[1][0][0][x], a[x])][sidx] |= smask;
  108|   341k|    }
  109|       |
  110|   100k|    if (!skip) {
  ------------------
  |  Branch (110:9): [True: 57.8k, False: 42.2k]
  ------------------
  111|       |        // inner (tx) left|right edges
  112|   255k|        for (y = 0, mask = 1U << by4; y < h4; y++, mask <<= 1) {
  ------------------
  |  Branch (112:39): [True: 197k, False: 57.8k]
  ------------------
  113|   197k|            const int sidx = mask >= 0x10000U;
  114|   197k|            const unsigned smask = mask >> (sidx << 4);
  115|   197k|            int ltx = txa[0][0][y][0];
  116|   197k|            int step = txa[0][1][y][0];
  117|   233k|            for (x = step; x < w4; x += step) {
  ------------------
  |  Branch (117:28): [True: 35.6k, False: 197k]
  ------------------
  118|  35.6k|                const int rtx = txa[0][0][y][x];
  119|  35.6k|                masks[0][bx4 + x][imin(rtx, ltx)][sidx] |= smask;
  120|  35.6k|                ltx = rtx;
  121|  35.6k|                step = txa[0][1][y][x];
  122|  35.6k|            }
  123|   197k|        }
  124|       |
  125|       |        //            top
  126|       |        // inner (tx) --- edges
  127|       |        //           bottom
  128|   264k|        for (x = 0, mask = 1U << bx4; x < w4; x++, mask <<= 1) {
  ------------------
  |  Branch (128:39): [True: 207k, False: 57.8k]
  ------------------
  129|   207k|            const int sidx = mask >= 0x10000U;
  130|   207k|            const unsigned smask = mask >> (sidx << 4);
  131|   207k|            int ttx = txa[1][0][0][x];
  132|   207k|            int step = txa[1][1][0][x];
  133|   243k|            for (y = step; y < h4; y += step) {
  ------------------
  |  Branch (133:28): [True: 35.9k, False: 207k]
  ------------------
  134|  35.9k|                const int btx = txa[1][0][y][x];
  135|  35.9k|                masks[1][by4 + y][imin(ttx, btx)][sidx] |= smask;
  136|  35.9k|                ttx = btx;
  137|  35.9k|                step = txa[1][1][y][x];
  138|  35.9k|            }
  139|   207k|        }
  140|  57.8k|    }
  141|       |
  142|   452k|    for (y = 0; y < h4; y++)
  ------------------
  |  Branch (142:17): [True: 352k, False: 100k]
  ------------------
  143|   352k|        l[y] = txa[0][0][y][w4 - 1];
  144|   100k|    memcpy(a, txa[1][0][h4 - 1], w4);
  145|   100k|}
lf_mask.c:decomp_tx:
   44|   144k|{
   45|   144k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[from];
   46|   144k|    const int is_split = (from == (int) TX_4X4 || depth > 1) ? 0 :
  ------------------
  |  Branch (46:27): [True: 33.5k, False: 110k]
  |  Branch (46:51): [True: 5.77k, False: 105k]
  ------------------
   47|   144k|        (tx_masks[depth] >> (y_off * 4 + x_off)) & 1;
   48|       |
   49|   144k|    if (is_split) {
  ------------------
  |  Branch (49:9): [True: 8.79k, False: 135k]
  ------------------
   50|  8.79k|        const enum RectTxfmSize sub = t_dim->sub;
   51|  8.79k|        const int htw4 = t_dim->w >> 1, hth4 = t_dim->h >> 1;
   52|       |
   53|  8.79k|        decomp_tx(txa, sub, depth + 1, y_off * 2 + 0, x_off * 2 + 0, tx_masks);
   54|  8.79k|        if (t_dim->w >= t_dim->h)
  ------------------
  |  Branch (54:13): [True: 7.04k, False: 1.74k]
  ------------------
   55|  7.04k|            decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][0][htw4],
   56|  7.04k|                      sub, depth + 1, y_off * 2 + 0, x_off * 2 + 1, tx_masks);
   57|  8.79k|        if (t_dim->h >= t_dim->w) {
  ------------------
  |  Branch (57:13): [True: 6.22k, False: 2.56k]
  ------------------
   58|  6.22k|            decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][hth4][0],
   59|  6.22k|                      sub, depth + 1, y_off * 2 + 1, x_off * 2 + 0, tx_masks);
   60|  6.22k|            if (t_dim->w >= t_dim->h)
  ------------------
  |  Branch (60:17): [True: 4.47k, False: 1.74k]
  ------------------
   61|  4.47k|                decomp_tx((uint8_t(*)[2][32][32]) &txa[0][0][hth4][htw4],
   62|  4.47k|                          sub, depth + 1, y_off * 2 + 1, x_off * 2 + 1, tx_masks);
   63|  6.22k|        }
   64|   135k|    } else {
   65|   135k|        const int lw = imin(2, t_dim->lw), lh = imin(2, t_dim->lh);
   66|       |
   67|   135k|#define set_ctx(rep_macro) \
   68|   135k|        for (int y = 0; y < t_dim->h; y++) { \
   69|   135k|            rep_macro(txa[0][0][y], 0, lw); \
   70|   135k|            rep_macro(txa[1][0][y], 0, lh); \
   71|   135k|            txa[0][1][y][0] = t_dim->w; \
   72|   135k|        }
   73|   135k|        case_set_upto16(t_dim->lw);
  ------------------
  |  |   80|   135k|    switch (var) { \
  |  |   81|  43.0k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  |   68|   103k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 60.4k, False: 43.0k]
  |  |  |  |  ------------------
  |  |  |  |   69|  60.4k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  60.4k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  60.4k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  60.4k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  60.4k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  60.4k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  60.4k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  60.4k|        }
  |  |  ------------------
  |  |  |  Branch (81:5): [True: 43.0k, False: 92.5k]
  |  |  ------------------
  |  |   82|  45.6k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  |   68|   170k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 124k, False: 45.6k]
  |  |  |  |  ------------------
  |  |  |  |   69|   124k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   124k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   124k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|   124k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   124k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   124k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   124k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|   124k|        }
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 45.6k, False: 89.9k]
  |  |  ------------------
  |  |   83|  31.6k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  |   68|   147k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 115k, False: 31.6k]
  |  |  |  |  ------------------
  |  |  |  |   69|   115k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|   115k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   115k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|   115k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|   115k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   115k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|   115k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|   115k|        }
  |  |  ------------------
  |  |  |  Branch (83:5): [True: 31.6k, False: 103k]
  |  |  ------------------
  |  |   84|  9.14k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  |   68|  60.2k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 51.1k, False: 9.14k]
  |  |  |  |  ------------------
  |  |  |  |   69|  51.1k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  51.1k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  51.1k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  51.1k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  51.1k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  51.1k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  51.1k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  51.1k|        }
  |  |  ------------------
  |  |  |  Branch (84:5): [True: 9.14k, False: 126k]
  |  |  ------------------
  |  |   85|  6.10k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  |   68|  89.9k|        for (int y = 0; y < t_dim->h; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (68:25): [True: 83.8k, False: 6.10k]
  |  |  |  |  ------------------
  |  |  |  |   69|  83.8k|            rep_macro(txa[0][0][y], 0, lw); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  83.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  83.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  83.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  83.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 83.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   70|  83.8k|            rep_macro(txa[1][0][y], 0, lh); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  83.8k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|  83.8k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|  83.8k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|  83.8k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 83.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   71|  83.8k|            txa[0][1][y][0] = t_dim->w; \
  |  |  |  |   72|  83.8k|        }
  |  |  ------------------
  |  |  |  Branch (85:5): [True: 6.10k, False: 129k]
  |  |  ------------------
  |  |   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: 135k]
  |  |  ------------------
  |  |   87|   135k|    }
  ------------------
   74|   135k|#undef set_ctx
   75|   135k|        dav1d_memset_pow2[t_dim->lw](txa[1][1][0], t_dim->h);
   76|   135k|    }
   77|   144k|}
lf_mask.c:calc_lf_value:
  408|   362k|{
  409|   362k|    const int base = iclip(iclip(base_lvl + lf_delta, 0, 63) + seg_delta, 0, 63);
  410|       |
  411|   362k|    if (!mr_delta) {
  ------------------
  |  Branch (411:9): [True: 208k, False: 153k]
  ------------------
  412|   208k|        memset(lflvl_values, base, sizeof(*lflvl_values) * 8);
  413|   208k|    } else {
  414|   153k|        const int sh = base >= 32;
  415|   153k|        lflvl_values[0][0] = lflvl_values[0][1] =
  416|   153k|            iclip(base + (mr_delta->ref_delta[0] * (1 << sh)), 0, 63);
  417|  1.23M|        for (int r = 1; r < 8; r++) {
  ------------------
  |  Branch (417:25): [True: 1.07M, False: 153k]
  ------------------
  418|  3.23M|            for (int m = 0; m < 2; m++) {
  ------------------
  |  Branch (418:29): [True: 2.15M, False: 1.07M]
  ------------------
  419|  2.15M|                const int delta =
  420|  2.15M|                    mr_delta->mode_delta[m] + mr_delta->ref_delta[r];
  421|  2.15M|                lflvl_values[r][m] = iclip(base + (delta * (1 << sh)), 0, 63);
  422|  2.15M|            }
  423|  1.07M|        }
  424|   153k|    }
  425|   362k|}
lf_mask.c:calc_lf_value_chroma:
  431|   214k|{
  432|   214k|    if (!base_lvl)
  ------------------
  |  Branch (432:9): [True: 66.8k, False: 147k]
  ------------------
  433|  66.8k|        memset(lflvl_values, 0, sizeof(*lflvl_values) * 8);
  434|   147k|    else
  435|   147k|        calc_lf_value(lflvl_values, base_lvl, lf_delta, seg_delta, mr_delta);
  436|   214k|}

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

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

dav1d_loop_filter_dsp_init_8bpc:
  259|  5.05k|COLD void bitfn(dav1d_loop_filter_dsp_init)(Dav1dLoopFilterDSPContext *const c) {
  260|  5.05k|    c->loop_filter_sb[0][0] = loop_filter_h_sb128y_c;
  261|  5.05k|    c->loop_filter_sb[0][1] = loop_filter_v_sb128y_c;
  262|  5.05k|    c->loop_filter_sb[1][0] = loop_filter_h_sb128uv_c;
  263|  5.05k|    c->loop_filter_sb[1][1] = loop_filter_v_sb128uv_c;
  264|       |
  265|  5.05k|#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|  5.05k|#endif
  275|  5.05k|#endif
  276|  5.05k|}
dav1d_loop_filter_dsp_init_16bpc:
  259|  7.82k|COLD void bitfn(dav1d_loop_filter_dsp_init)(Dav1dLoopFilterDSPContext *const c) {
  260|  7.82k|    c->loop_filter_sb[0][0] = loop_filter_h_sb128y_c;
  261|  7.82k|    c->loop_filter_sb[0][1] = loop_filter_v_sb128y_c;
  262|  7.82k|    c->loop_filter_sb[1][0] = loop_filter_h_sb128uv_c;
  263|  7.82k|    c->loop_filter_sb[1][1] = loop_filter_v_sb128uv_c;
  264|       |
  265|  7.82k|#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|  7.82k|#endif
  275|  7.82k|#endif
  276|  7.82k|}

dav1d_loop_restoration_dsp_init_8bpc:
 1367|  5.05k|{
 1368|  5.05k|    c->wiener[0] = c->wiener[1] = wiener_c;
 1369|  5.05k|    c->sgr[0] = sgr_5x5_c;
 1370|  5.05k|    c->sgr[1] = sgr_3x3_c;
 1371|  5.05k|    c->sgr[2] = sgr_mix_c;
 1372|       |
 1373|  5.05k|#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|  5.05k|#endif
 1383|  5.05k|#endif
 1384|  5.05k|}
looprestoration_tmpl.c:sgr_5x5_c:
  830|  2.52k|{
  831|  2.52k|    ALIGN_STK_16(int32_t, sumsq_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  2.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  832|  2.52k|    ALIGN_STK_16(coef, sum_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  2.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  833|  2.52k|    int32_t *sumsq_ptrs[5], *sumsq_rows[5];
  834|  2.52k|    coef *sum_ptrs[5], *sum_rows[5];
  835|  15.1k|    for (int i = 0; i < 5; i++) {
  ------------------
  |  Branch (835:21): [True: 12.6k, False: 2.52k]
  ------------------
  836|  12.6k|        sumsq_rows[i] = &sumsq_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  12.6k|#define BUF_STRIDE (384 + 16)
  ------------------
  837|  12.6k|        sum_rows[i] = &sum_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  12.6k|#define BUF_STRIDE (384 + 16)
  ------------------
  838|  12.6k|    }
  839|       |
  840|  2.52k|    ALIGN_STK_16(int32_t, A_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  2.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  841|  2.52k|    ALIGN_STK_16(coef, B_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  2.52k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  2.52k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  842|  2.52k|    int32_t *A_ptrs[2];
  843|  2.52k|    coef *B_ptrs[2];
  844|  7.57k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (844:21): [True: 5.04k, False: 2.52k]
  ------------------
  845|  5.04k|        A_ptrs[i] = &A_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  5.04k|#define BUF_STRIDE (384 + 16)
  ------------------
  846|  5.04k|        B_ptrs[i] = &B_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  5.04k|#define BUF_STRIDE (384 + 16)
  ------------------
  847|  5.04k|    }
  848|  2.52k|    const pixel *src = dst;
  849|  2.52k|    const pixel *lpf_bottom = lpf + 6*PXSTRIDE(stride);
  ------------------
  |  |   53|  2.52k|#define PXSTRIDE(x) (x)
  ------------------
  850|       |
  851|  2.52k|    if (edges & LR_HAVE_TOP) {
  ------------------
  |  Branch (851:9): [True: 1.04k, False: 1.48k]
  ------------------
  852|  1.04k|        sumsq_ptrs[0] = sumsq_rows[0];
  853|  1.04k|        sumsq_ptrs[1] = sumsq_rows[0];
  854|  1.04k|        sumsq_ptrs[2] = sumsq_rows[1];
  855|  1.04k|        sumsq_ptrs[3] = sumsq_rows[2];
  856|  1.04k|        sumsq_ptrs[4] = sumsq_rows[3];
  857|  1.04k|        sum_ptrs[0] = sum_rows[0];
  858|  1.04k|        sum_ptrs[1] = sum_rows[0];
  859|  1.04k|        sum_ptrs[2] = sum_rows[1];
  860|  1.04k|        sum_ptrs[3] = sum_rows[2];
  861|  1.04k|        sum_ptrs[4] = sum_rows[3];
  862|       |
  863|  1.04k|        sgr_box5_row_h(sumsq_rows[0], sum_rows[0], NULL, lpf, w, edges);
  864|  1.04k|        lpf += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.04k|#define PXSTRIDE(x) (x)
  ------------------
  865|  1.04k|        sgr_box5_row_h(sumsq_rows[1], sum_rows[1], NULL, lpf, w, edges);
  866|       |
  867|  1.04k|        sgr_box5_row_h(sumsq_rows[2], sum_rows[2], left, src, w, edges);
  868|  1.04k|        left++;
  869|  1.04k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.04k|#define PXSTRIDE(x) (x)
  ------------------
  870|       |
  871|  1.04k|        if (--h <= 0)
  ------------------
  |  Branch (871:13): [True: 210, False: 832]
  ------------------
  872|    210|            goto vert_1;
  873|       |
  874|    832|        sgr_box5_row_h(sumsq_rows[3], sum_rows[3], left, src, w, edges);
  875|    832|        left++;
  876|    832|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|    832|#define PXSTRIDE(x) (x)
  ------------------
  877|    832|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  878|    832|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    832|#define BITDEPTH_MAX 0xff
  ------------------
  879|    832|        rotate(A_ptrs, B_ptrs, 2);
  880|       |
  881|    832|        if (--h <= 0)
  ------------------
  |  Branch (881:13): [True: 72, False: 760]
  ------------------
  882|     72|            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|    760|        sumsq_ptrs[3] = sumsq_rows[4];
  887|    760|        sum_ptrs[3] = sum_rows[4];
  888|  1.48k|    } else {
  889|  1.48k|        sumsq_ptrs[0] = sumsq_rows[0];
  890|  1.48k|        sumsq_ptrs[1] = sumsq_rows[0];
  891|  1.48k|        sumsq_ptrs[2] = sumsq_rows[0];
  892|  1.48k|        sumsq_ptrs[3] = sumsq_rows[0];
  893|  1.48k|        sumsq_ptrs[4] = sumsq_rows[0];
  894|  1.48k|        sum_ptrs[0] = sum_rows[0];
  895|  1.48k|        sum_ptrs[1] = sum_rows[0];
  896|  1.48k|        sum_ptrs[2] = sum_rows[0];
  897|  1.48k|        sum_ptrs[3] = sum_rows[0];
  898|  1.48k|        sum_ptrs[4] = sum_rows[0];
  899|       |
  900|  1.48k|        sgr_box5_row_h(sumsq_rows[0], sum_rows[0], left, src, w, edges);
  901|  1.48k|        left++;
  902|  1.48k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.48k|#define PXSTRIDE(x) (x)
  ------------------
  903|       |
  904|  1.48k|        if (--h <= 0)
  ------------------
  |  Branch (904:13): [True: 131, False: 1.35k]
  ------------------
  905|    131|            goto vert_1;
  906|       |
  907|  1.35k|        sumsq_ptrs[4] = sumsq_rows[1];
  908|  1.35k|        sum_ptrs[4] = sum_rows[1];
  909|       |
  910|  1.35k|        sgr_box5_row_h(sumsq_rows[1], sum_rows[1], left, src, w, edges);
  911|  1.35k|        left++;
  912|  1.35k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.35k|#define PXSTRIDE(x) (x)
  ------------------
  913|       |
  914|  1.35k|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  915|  1.35k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.35k|#define BITDEPTH_MAX 0xff
  ------------------
  916|  1.35k|        rotate(A_ptrs, B_ptrs, 2);
  917|       |
  918|  1.35k|        if (--h <= 0)
  ------------------
  |  Branch (918:13): [True: 166, False: 1.18k]
  ------------------
  919|    166|            goto vert_2;
  920|       |
  921|  1.18k|        sumsq_ptrs[3] = sumsq_rows[2];
  922|  1.18k|        sumsq_ptrs[4] = sumsq_rows[3];
  923|  1.18k|        sum_ptrs[3] = sum_rows[2];
  924|  1.18k|        sum_ptrs[4] = sum_rows[3];
  925|       |
  926|  1.18k|        sgr_box5_row_h(sumsq_rows[2], sum_rows[2], left, src, w, edges);
  927|  1.18k|        left++;
  928|  1.18k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.18k|#define PXSTRIDE(x) (x)
  ------------------
  929|       |
  930|  1.18k|        if (--h <= 0)
  ------------------
  |  Branch (930:13): [True: 147, False: 1.03k]
  ------------------
  931|    147|            goto odd;
  932|       |
  933|  1.03k|        sgr_box5_row_h(sumsq_rows[3], sum_rows[3], left, src, w, edges);
  934|  1.03k|        left++;
  935|  1.03k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.03k|#define PXSTRIDE(x) (x)
  ------------------
  936|       |
  937|  1.03k|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  938|  1.03k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.03k|#define BITDEPTH_MAX 0xff
  ------------------
  939|  1.03k|        sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  940|  1.03k|                    w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
  941|       |
  942|  1.03k|        if (--h <= 0)
  ------------------
  |  Branch (942:13): [True: 105, False: 933]
  ------------------
  943|    105|            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|    933|        sumsq_ptrs[3] = sumsq_rows[4];
  948|    933|        sum_ptrs[3] = sum_rows[4];
  949|    933|    }
  950|       |
  951|  31.9k|    do {
  952|  31.9k|        sgr_box5_row_h(sumsq_ptrs[3], sum_ptrs[3], left, src, w, edges);
  953|  31.9k|        left++;
  954|  31.9k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  31.9k|#define PXSTRIDE(x) (x)
  ------------------
  955|       |
  956|  31.9k|        if (--h <= 0)
  ------------------
  |  Branch (956:13): [True: 221, False: 31.7k]
  ------------------
  957|    221|            goto odd;
  958|       |
  959|  31.7k|        sgr_box5_row_h(sumsq_ptrs[4], sum_ptrs[4], left, src, w, edges);
  960|  31.7k|        left++;
  961|  31.7k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  31.7k|#define PXSTRIDE(x) (x)
  ------------------
  962|       |
  963|  31.7k|        sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  964|  31.7k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  31.7k|#define BITDEPTH_MAX 0xff
  ------------------
  965|  31.7k|        sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  966|  31.7k|                    w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
  967|  31.7k|    } while (--h > 0);
  ------------------
  |  Branch (967:14): [True: 30.2k, False: 1.47k]
  ------------------
  968|       |
  969|  1.47k|    if (!(edges & LR_HAVE_BOTTOM))
  ------------------
  |  Branch (969:9): [True: 236, False: 1.23k]
  ------------------
  970|    236|        goto vert_2;
  971|       |
  972|  1.23k|    sgr_box5_row_h(sumsq_ptrs[3], sum_ptrs[3], NULL, lpf_bottom, w, edges);
  973|  1.23k|    lpf_bottom += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.23k|#define PXSTRIDE(x) (x)
  ------------------
  974|  1.23k|    sgr_box5_row_h(sumsq_ptrs[4], sum_ptrs[4], NULL, lpf_bottom, w, edges);
  975|       |
  976|  1.81k|output_2:
  977|  1.81k|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  978|  1.81k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.81k|#define BITDEPTH_MAX 0xff
  ------------------
  979|  1.81k|    sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  980|  1.81k|                w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
  981|  1.81k|    return;
  982|       |
  983|    579|vert_2:
  984|       |    // Duplicate the last row twice more
  985|    579|    sumsq_ptrs[3] = sumsq_ptrs[2];
  986|    579|    sumsq_ptrs[4] = sumsq_ptrs[2];
  987|    579|    sum_ptrs[3] = sum_ptrs[2];
  988|    579|    sum_ptrs[4] = sum_ptrs[2];
  989|    579|    goto output_2;
  990|       |
  991|    368|odd:
  992|       |    // Copy the last row as padding once
  993|    368|    sumsq_ptrs[4] = sumsq_ptrs[3];
  994|    368|    sum_ptrs[4] = sum_ptrs[3];
  995|       |
  996|    368|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
  997|    368|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    368|#define BITDEPTH_MAX 0xff
  ------------------
  998|    368|    sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
  999|    368|                w, 2, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
 1000|       |
 1001|    709|output_1:
 1002|       |    // Duplicate the last row twice more
 1003|    709|    sumsq_ptrs[3] = sumsq_ptrs[2];
 1004|    709|    sumsq_ptrs[4] = sumsq_ptrs[2];
 1005|    709|    sum_ptrs[3] = sum_ptrs[2];
 1006|    709|    sum_ptrs[4] = sum_ptrs[2];
 1007|       |
 1008|    709|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
 1009|    709|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    709|#define BITDEPTH_MAX 0xff
  ------------------
 1010|       |    // Output only one row
 1011|    709|    sgr_finish2(&dst, stride, A_ptrs, B_ptrs,
 1012|    709|                w, 1, params->sgr.w0 HIGHBD_TAIL_SUFFIX);
 1013|    709|    return;
 1014|       |
 1015|    341|vert_1:
 1016|       |    // Copy the last row as padding once
 1017|    341|    sumsq_ptrs[4] = sumsq_ptrs[3];
 1018|    341|    sum_ptrs[4] = sum_ptrs[3];
 1019|       |
 1020|    341|    sgr_box5_vert(sumsq_ptrs, sum_ptrs, A_ptrs[1], B_ptrs[1],
 1021|    341|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|    341|#define BITDEPTH_MAX 0xff
  ------------------
 1022|    341|    rotate(A_ptrs, B_ptrs, 2);
 1023|       |
 1024|    341|    goto output_1;
 1025|    368|}
looprestoration_tmpl.c:sgr_box5_row_h:
  441|   354k|{
  442|   354k|    sumsq++;
  443|   354k|    sum++;
  444|   354k|    int a = edges & LR_HAVE_LEFT ? (left ? left[0][1] : src[-3]) : src[0];
  ------------------
  |  Branch (444:13): [True: 125k, False: 228k]
  |  Branch (444:37): [True: 118k, False: 7.23k]
  ------------------
  445|   354k|    int b = edges & LR_HAVE_LEFT ? (left ? left[0][2] : src[-2]) : src[0];
  ------------------
  |  Branch (445:13): [True: 125k, False: 228k]
  |  Branch (445:37): [True: 118k, False: 7.23k]
  ------------------
  446|   354k|    int c = edges & LR_HAVE_LEFT ? (left ? left[0][3] : src[-1]) : src[0];
  ------------------
  |  Branch (446:13): [True: 125k, False: 228k]
  |  Branch (446:37): [True: 118k, False: 7.23k]
  ------------------
  447|   354k|    int d = src[0];
  448|  16.8M|    for (int x = -1; x < w + 1; x++) {
  ------------------
  |  Branch (448:22): [True: 16.5M, False: 354k]
  ------------------
  449|  16.5M|        int e = (x + 2 < w || (edges & LR_HAVE_RIGHT)) ? src[x + 2] : src[w - 1];
  ------------------
  |  Branch (449:18): [True: 15.4M, False: 1.06M]
  |  Branch (449:31): [True: 365k, False: 696k]
  ------------------
  450|  16.5M|        sum[x] = a + b + c + d + e;
  451|  16.5M|        sumsq[x] = a * a + b * b + c * c + d * d + e * e;
  452|  16.5M|        a = b;
  453|  16.5M|        b = c;
  454|  16.5M|        c = d;
  455|  16.5M|        d = e;
  456|  16.5M|    }
  457|   354k|}
looprestoration_tmpl.c:sgr_box5_vert:
  537|   179k|{
  538|   179k|    sgr_box5_row_v(sumsq, sum, sumsq_out, sum_out, w);
  539|   179k|    sgr_calc_row_ab(sumsq_out, sum_out, w, s, bitdepth_max, 25, 164);
  540|   179k|    rotate5_x2(sumsq, sum);
  541|   179k|}
looprestoration_tmpl.c:sgr_box5_row_v:
  488|   179k|{
  489|  8.74M|    for (int x = 0; x < w + 2; x++) {
  ------------------
  |  Branch (489:21): [True: 8.56M, False: 179k]
  ------------------
  490|  8.56M|        int sq_a = sumsq[0][x];
  491|  8.56M|        int sq_b = sumsq[1][x];
  492|  8.56M|        int sq_c = sumsq[2][x];
  493|  8.56M|        int sq_d = sumsq[3][x];
  494|  8.56M|        int sq_e = sumsq[4][x];
  495|  8.56M|        int s_a = sum[0][x];
  496|  8.56M|        int s_b = sum[1][x];
  497|  8.56M|        int s_c = sum[2][x];
  498|  8.56M|        int s_d = sum[3][x];
  499|  8.56M|        int s_e = sum[4][x];
  500|  8.56M|        sumsq_out[x] = sq_a + sq_b + sq_c + sq_d + sq_e;
  501|  8.56M|        sum_out[x] = s_a + s_b + s_c + s_d + s_e;
  502|  8.56M|    }
  503|   179k|}
looprestoration_tmpl.c:sgr_calc_row_ab:
  507|   574k|{
  508|   574k|    const int bitdepth_min_8 = bitdepth_from_max(bitdepth_max) - 8;
  ------------------
  |  |   58|   574k|#define bitdepth_from_max(x) 8
  ------------------
  509|  26.9M|    for (int i = 0; i < w + 2; i++) {
  ------------------
  |  Branch (509:21): [True: 26.4M, False: 574k]
  ------------------
  510|  26.4M|        const int a =
  511|  26.4M|            (AA[i] + ((1 << (2 * bitdepth_min_8)) >> 1)) >> (2 * bitdepth_min_8);
  512|  26.4M|        const int b =
  513|  26.4M|            (BB[i] + ((1 << bitdepth_min_8) >> 1)) >> bitdepth_min_8;
  514|       |
  515|  26.4M|        const unsigned p = imax(a * n - b * b, 0);
  516|  26.4M|        const unsigned z = (p * s + (1 << 19)) >> 20;
  517|  26.4M|        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|  26.4M|        AA[i] = (x * BB[i] * sgr_one_by_x + (1 << 11)) >> 12;
  521|  26.4M|        BB[i] = x;
  522|  26.4M|    }
  523|   574k|}
looprestoration_tmpl.c:rotate5_x2:
  402|   179k|{
  403|   179k|    int32_t *tmp32[2];
  404|   179k|    coef *tmpc[2];
  405|   539k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (405:21): [True: 359k, False: 179k]
  ------------------
  406|   359k|        tmp32[i] = sumsq_ptrs[i];
  407|   359k|        tmpc[i] = sum_ptrs[i];
  408|   359k|    }
  409|   719k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (409:21): [True: 539k, False: 179k]
  ------------------
  410|   539k|        sumsq_ptrs[i] = sumsq_ptrs[i + 2];
  411|   539k|        sum_ptrs[i] = sum_ptrs[i + 2];
  412|   539k|    }
  413|   539k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (413:21): [True: 359k, False: 179k]
  ------------------
  414|   359k|        sumsq_ptrs[3 + i] = tmp32[i];
  415|   359k|        sum_ptrs[3 + i] = tmpc[i];
  416|   359k|    }
  417|   179k|}
looprestoration_tmpl.c:rotate:
  390|   972k|{
  391|   972k|    int32_t *tmp32 = sumsq_ptrs[0];
  392|   972k|    coef *tmpc = sum_ptrs[0];
  393|  3.02M|    for (int i = 0; i < n - 1; i++) {
  ------------------
  |  Branch (393:21): [True: 2.04M, False: 972k]
  ------------------
  394|  2.04M|        sumsq_ptrs[i] = sumsq_ptrs[i + 1];
  395|  2.04M|        sum_ptrs[i] = sum_ptrs[i + 1];
  396|  2.04M|    }
  397|   972k|    sumsq_ptrs[n - 1] = tmp32;
  398|   972k|    sum_ptrs[n - 1] = tmpc;
  399|   972k|}
looprestoration_tmpl.c:sgr_finish2:
  645|  35.6k|{
  646|  35.6k|    ALIGN_STK_16(coef, tmp, 2*FILTER_OUT_STRIDE,);
  ------------------
  |  |  100|  35.6k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  35.6k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  647|       |
  648|  35.6k|    sgr_finish_filter2(tmp, *dst, stride, A_ptrs, B_ptrs, w, h);
  649|  35.6k|    sgr_weighted_row1(*dst, tmp, w, w1 HIGHBD_TAIL_SUFFIX);
  650|  35.6k|    *dst += PXSTRIDE(stride);
  ------------------
  |  |   53|  35.6k|#define PXSTRIDE(x) (x)
  ------------------
  651|  35.6k|    if (h > 1) {
  ------------------
  |  Branch (651:9): [True: 34.9k, False: 709]
  ------------------
  652|  34.9k|        sgr_weighted_row1(*dst, tmp + FILTER_OUT_STRIDE, w, w1 HIGHBD_TAIL_SUFFIX);
  ------------------
  |  |  572|  34.9k|#define FILTER_OUT_STRIDE (384)
  ------------------
  653|  34.9k|        *dst += PXSTRIDE(stride);
  ------------------
  |  |   53|  34.9k|#define PXSTRIDE(x) (x)
  ------------------
  654|  34.9k|    }
  655|  35.6k|    rotate(A_ptrs, B_ptrs, 2);
  656|  35.6k|}
looprestoration_tmpl.c:sgr_finish_filter2:
  579|   168k|{
  580|   168k|#define SIX_NEIGHBORS(P, i)\
  581|   168k|    ((P[0][i]     + P[1][i]) * 6 +   \
  582|   168k|     (P[0][i - 1] + P[1][i - 1] +    \
  583|   168k|      P[0][i + 1] + P[1][i + 1]) * 5)
  584|  7.75M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (584:21): [True: 7.58M, False: 168k]
  ------------------
  585|  7.58M|        const int a = SIX_NEIGHBORS(B_ptrs, i + 1);
  ------------------
  |  |  581|  7.58M|    ((P[0][i]     + P[1][i]) * 6 +   \
  |  |  582|  7.58M|     (P[0][i - 1] + P[1][i - 1] +    \
  |  |  583|  7.58M|      P[0][i + 1] + P[1][i + 1]) * 5)
  ------------------
  586|  7.58M|        const int b = SIX_NEIGHBORS(A_ptrs, i + 1);
  ------------------
  |  |  581|  7.58M|    ((P[0][i]     + P[1][i]) * 6 +   \
  |  |  582|  7.58M|     (P[0][i - 1] + P[1][i - 1] +    \
  |  |  583|  7.58M|      P[0][i + 1] + P[1][i + 1]) * 5)
  ------------------
  587|  7.58M|        tmp[i] = (b - a * src[i] + (1 << 8)) >> 9;
  588|  7.58M|    }
  589|   168k|    if (h <= 1)
  ------------------
  |  Branch (589:9): [True: 3.38k, False: 164k]
  ------------------
  590|  3.38k|        return;
  591|   164k|    tmp += FILTER_OUT_STRIDE;
  ------------------
  |  |  572|   164k|#define FILTER_OUT_STRIDE (384)
  ------------------
  592|   164k|    src += PXSTRIDE(src_stride);
  ------------------
  |  |   53|   164k|#define PXSTRIDE(x) (x)
  ------------------
  593|   164k|    const int32_t *A = &A_ptrs[1][1];
  594|   164k|    const coef *B = &B_ptrs[1][1];
  595|  7.53M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (595:21): [True: 7.37M, False: 164k]
  ------------------
  596|  7.37M|        const int a = B[i] * 6 + (B[i - 1] + B[i + 1]) * 5;
  597|  7.37M|        const int b = A[i] * 6 + (A[i - 1] + A[i + 1]) * 5;
  598|  7.37M|        tmp[i] = (b - a * src[i] + (1 << 7)) >> 8;
  599|  7.37M|    }
  600|   164k|#undef SIX_NEIGHBORS
  601|   164k|}
looprestoration_tmpl.c:sgr_weighted_row1:
  605|   178k|{
  606|  7.67M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (606:21): [True: 7.49M, False: 178k]
  ------------------
  607|  7.49M|        const int v = w1 * t1[i];
  608|  7.49M|        dst[i] = iclip_pixel(dst[i] + ((v + (1 << 10)) >> 11));
  ------------------
  |  |   49|  7.49M|#define iclip_pixel iclip_u8
  ------------------
  609|  7.49M|    }
  610|   178k|}
looprestoration_tmpl.c:sgr_3x3_c:
  684|  3.64k|{
  685|  3.64k|#define BUF_STRIDE (384 + 16)
  686|  3.64k|    ALIGN_STK_16(int32_t, sumsq_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.64k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.64k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  687|  3.64k|    ALIGN_STK_16(coef, sum_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.64k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.64k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  688|  3.64k|    int32_t *sumsq_ptrs[3], *sumsq_rows[3];
  689|  3.64k|    coef *sum_ptrs[3], *sum_rows[3];
  690|  14.5k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (690:21): [True: 10.9k, False: 3.64k]
  ------------------
  691|  10.9k|        sumsq_rows[i] = &sumsq_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  10.9k|#define BUF_STRIDE (384 + 16)
  ------------------
  692|  10.9k|        sum_rows[i] = &sum_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  10.9k|#define BUF_STRIDE (384 + 16)
  ------------------
  693|  10.9k|    }
  694|       |
  695|  3.64k|    ALIGN_STK_16(int32_t, A_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.64k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.64k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  696|  3.64k|    ALIGN_STK_16(coef, B_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  3.64k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  3.64k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  697|  3.64k|    int32_t *A_ptrs[3];
  698|  3.64k|    coef *B_ptrs[3];
  699|  14.5k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (699:21): [True: 10.9k, False: 3.64k]
  ------------------
  700|  10.9k|        A_ptrs[i] = &A_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  10.9k|#define BUF_STRIDE (384 + 16)
  ------------------
  701|  10.9k|        B_ptrs[i] = &B_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  10.9k|#define BUF_STRIDE (384 + 16)
  ------------------
  702|  10.9k|    }
  703|  3.64k|    const pixel *src = dst;
  704|  3.64k|    const pixel *lpf_bottom = lpf + 6*PXSTRIDE(stride);
  ------------------
  |  |   53|  3.64k|#define PXSTRIDE(x) (x)
  ------------------
  705|       |
  706|  3.64k|    if (edges & LR_HAVE_TOP) {
  ------------------
  |  Branch (706:9): [True: 1.97k, False: 1.67k]
  ------------------
  707|  1.97k|        sumsq_ptrs[0] = sumsq_rows[0];
  708|  1.97k|        sumsq_ptrs[1] = sumsq_rows[1];
  709|  1.97k|        sumsq_ptrs[2] = sumsq_rows[2];
  710|  1.97k|        sum_ptrs[0] = sum_rows[0];
  711|  1.97k|        sum_ptrs[1] = sum_rows[1];
  712|  1.97k|        sum_ptrs[2] = sum_rows[2];
  713|       |
  714|  1.97k|        sgr_box3_row_h(sumsq_rows[0], sum_rows[0], NULL, lpf, w, edges);
  715|  1.97k|        lpf += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.97k|#define PXSTRIDE(x) (x)
  ------------------
  716|  1.97k|        sgr_box3_row_h(sumsq_rows[1], sum_rows[1], NULL, lpf, w, edges);
  717|       |
  718|  1.97k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  719|  1.97k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.97k|#define BITDEPTH_MAX 0xff
  ------------------
  720|  1.97k|        left++;
  721|  1.97k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.97k|#define PXSTRIDE(x) (x)
  ------------------
  722|  1.97k|        rotate(A_ptrs, B_ptrs, 3);
  723|       |
  724|  1.97k|        if (--h <= 0)
  ------------------
  |  Branch (724:13): [True: 314, False: 1.65k]
  ------------------
  725|    314|            goto vert_1;
  726|       |
  727|  1.65k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  728|  1.65k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.65k|#define BITDEPTH_MAX 0xff
  ------------------
  729|  1.65k|        left++;
  730|  1.65k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.65k|#define PXSTRIDE(x) (x)
  ------------------
  731|  1.65k|        rotate(A_ptrs, B_ptrs, 3);
  732|       |
  733|  1.65k|        if (--h <= 0)
  ------------------
  |  Branch (733:13): [True: 125, False: 1.53k]
  ------------------
  734|    125|            goto vert_2;
  735|  1.67k|    } else {
  736|  1.67k|        sumsq_ptrs[0] = sumsq_rows[0];
  737|  1.67k|        sumsq_ptrs[1] = sumsq_rows[0];
  738|  1.67k|        sumsq_ptrs[2] = sumsq_rows[0];
  739|  1.67k|        sum_ptrs[0] = sum_rows[0];
  740|  1.67k|        sum_ptrs[1] = sum_rows[0];
  741|  1.67k|        sum_ptrs[2] = sum_rows[0];
  742|       |
  743|  1.67k|        sgr_box3_row_h(sumsq_rows[0], sum_rows[0], left, src, w, edges);
  744|  1.67k|        left++;
  745|  1.67k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.67k|#define PXSTRIDE(x) (x)
  ------------------
  746|       |
  747|  1.67k|        sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  748|  1.67k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.67k|#define BITDEPTH_MAX 0xff
  ------------------
  749|  1.67k|        rotate(A_ptrs, B_ptrs, 3);
  750|       |
  751|  1.67k|        if (--h <= 0)
  ------------------
  |  Branch (751:13): [True: 224, False: 1.45k]
  ------------------
  752|    224|            goto vert_1;
  753|       |
  754|  1.45k|        sumsq_ptrs[2] = sumsq_rows[1];
  755|  1.45k|        sum_ptrs[2] = sum_rows[1];
  756|       |
  757|  1.45k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  758|  1.45k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.45k|#define BITDEPTH_MAX 0xff
  ------------------
  759|  1.45k|        left++;
  760|  1.45k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.45k|#define PXSTRIDE(x) (x)
  ------------------
  761|  1.45k|        rotate(A_ptrs, B_ptrs, 3);
  762|       |
  763|  1.45k|        if (--h <= 0)
  ------------------
  |  Branch (763:13): [True: 272, False: 1.18k]
  ------------------
  764|    272|            goto vert_2;
  765|       |
  766|  1.18k|        sumsq_ptrs[2] = sumsq_rows[2];
  767|  1.18k|        sum_ptrs[2] = sum_rows[2];
  768|  1.18k|    }
  769|       |
  770|   100k|    do {
  771|   100k|        sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  772|   100k|                    left, src, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|   100k|#define BITDEPTH_MAX 0xff
  ------------------
  773|   100k|        left++;
  774|   100k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|   100k|#define PXSTRIDE(x) (x)
  ------------------
  775|       |
  776|   100k|        sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  777|   100k|                    w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  778|   100k|    } while (--h > 0);
  ------------------
  |  Branch (778:14): [True: 97.8k, False: 2.71k]
  ------------------
  779|       |
  780|  2.71k|    if (!(edges & LR_HAVE_BOTTOM))
  ------------------
  |  Branch (780:9): [True: 898, False: 1.81k]
  ------------------
  781|    898|        goto vert_2;
  782|       |
  783|  1.81k|    sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  784|  1.81k|                NULL, lpf_bottom, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.81k|#define BITDEPTH_MAX 0xff
  ------------------
  785|  1.81k|    lpf_bottom += PXSTRIDE(stride);
  ------------------
  |  |   53|  1.81k|#define PXSTRIDE(x) (x)
  ------------------
  786|       |
  787|  1.81k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  788|  1.81k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  789|       |
  790|  1.81k|    sgr_box3_hv(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  791|  1.81k|                NULL, lpf_bottom, w, params->sgr.s1, edges, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.81k|#define BITDEPTH_MAX 0xff
  ------------------
  792|       |
  793|  1.81k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  794|  1.81k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  795|  1.81k|    return;
  796|       |
  797|  1.29k|vert_2:
  798|  1.29k|    sumsq_ptrs[2] = sumsq_ptrs[1];
  799|  1.29k|    sum_ptrs[2] = sum_ptrs[1];
  800|  1.29k|    sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  801|  1.29k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.29k|#define BITDEPTH_MAX 0xff
  ------------------
  802|       |
  803|  1.29k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  804|  1.29k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  805|       |
  806|  1.83k|output_1:
  807|  1.83k|    sumsq_ptrs[2] = sumsq_ptrs[1];
  808|  1.83k|    sum_ptrs[2] = sum_ptrs[1];
  809|  1.83k|    sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  810|  1.83k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.83k|#define BITDEPTH_MAX 0xff
  ------------------
  811|       |
  812|  1.83k|    sgr_finish1(&dst, stride, A_ptrs, B_ptrs,
  813|  1.83k|                w, params->sgr.w1 HIGHBD_TAIL_SUFFIX);
  814|  1.83k|    return;
  815|       |
  816|    538|vert_1:
  817|    538|    sumsq_ptrs[2] = sumsq_ptrs[1];
  818|    538|    sum_ptrs[2] = sum_ptrs[1];
  819|    538|    sgr_box3_vert(sumsq_ptrs, sum_ptrs, A_ptrs[2], B_ptrs[2],
  820|    538|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|    538|#define BITDEPTH_MAX 0xff
  ------------------
  821|    538|    rotate(A_ptrs, B_ptrs, 3);
  822|    538|    goto output_1;
  823|  1.29k|}
looprestoration_tmpl.c:sgr_box3_row_h:
  423|   393k|{
  424|   393k|    sumsq++;
  425|   393k|    sum++;
  426|   393k|    int a = edges & LR_HAVE_LEFT ? (left ? left[0][2] : src[-2]) : src[0];
  ------------------
  |  Branch (426:13): [True: 138k, False: 255k]
  |  Branch (426:37): [True: 129k, False: 8.40k]
  ------------------
  427|   393k|    int b = edges & LR_HAVE_LEFT ? (left ? left[0][3] : src[-1]) : src[0];
  ------------------
  |  Branch (427:13): [True: 138k, False: 255k]
  |  Branch (427:37): [True: 129k, False: 8.40k]
  ------------------
  428|  17.8M|    for (int x = -1; x < w + 1; x++) {
  ------------------
  |  Branch (428:22): [True: 17.4M, False: 393k]
  ------------------
  429|  17.4M|        int c = (x + 1 < w || (edges & LR_HAVE_RIGHT)) ? src[x + 1] : src[w - 1];
  ------------------
  |  Branch (429:18): [True: 16.6M, False: 787k]
  |  Branch (429:31): [True: 264k, False: 522k]
  ------------------
  430|  17.4M|        sum[x] = a + b + c;
  431|  17.4M|        sumsq[x] = a * a + b * b + c * c;
  432|  17.4M|        a = b;
  433|  17.4M|        b = c;
  434|  17.4M|    }
  435|   393k|}
looprestoration_tmpl.c:sgr_box3_hv:
  550|   109k|{
  551|   109k|    sgr_box3_row_h(sumsq[2], sum[2], left, src, w, edges);
  552|   109k|    sgr_box3_vert(sumsq, sum, AA, BB, w, s, bitdepth_max);
  553|   109k|}
looprestoration_tmpl.c:sgr_box3_vert:
  528|   395k|{
  529|   395k|    sgr_box3_row_v(sumsq, sum, sumsq_out, sum_out, w);
  530|   395k|    sgr_calc_row_ab(sumsq_out, sum_out, w, s, bitdepth_max, 9, 455);
  531|   395k|    rotate(sumsq, sum, 3);
  532|   395k|}
looprestoration_tmpl.c:sgr_box3_row_v:
  472|   395k|{
  473|  18.2M|    for (int x = 0; x < w + 2; x++) {
  ------------------
  |  Branch (473:21): [True: 17.8M, False: 395k]
  ------------------
  474|  17.8M|        int sq_a = sumsq[0][x];
  475|  17.8M|        int sq_b = sumsq[1][x];
  476|  17.8M|        int sq_c = sumsq[2][x];
  477|  17.8M|        int s_a = sum[0][x];
  478|  17.8M|        int s_b = sum[1][x];
  479|  17.8M|        int s_c = sum[2][x];
  480|  17.8M|        sumsq_out[x] = sq_a + sq_b + sq_c;
  481|  17.8M|        sum_out[x] = s_a + s_b + s_c;
  482|  17.8M|    }
  483|   395k|}
looprestoration_tmpl.c:sgr_finish1:
  631|   107k|{
  632|       |    // Only one single row, no stride needed
  633|   107k|    ALIGN_STK_16(coef, tmp, 384,);
  ------------------
  |  |  100|   107k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   107k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  634|       |
  635|   107k|    sgr_finish_filter_row1(tmp, *dst, A_ptrs, B_ptrs, w);
  636|   107k|    sgr_weighted_row1(*dst, tmp, w, w1 HIGHBD_TAIL_SUFFIX);
  637|   107k|    *dst += PXSTRIDE(stride);
  ------------------
  |  |   53|   107k|#define PXSTRIDE(x) (x)
  ------------------
  638|   107k|    rotate(A_ptrs, B_ptrs, 3);
  639|   107k|}
looprestoration_tmpl.c:sgr_finish_filter_row1:
  559|   369k|{
  560|   369k|#define EIGHT_NEIGHBORS(P, i)\
  561|   369k|    ((P[1][i] + P[1][i - 1] + P[1][i + 1] + P[0][i] + P[2][i]) * 4 + \
  562|   369k|     (P[0][i - 1] + P[2][i - 1] +                           \
  563|   369k|      P[0][i + 1] + P[2][i + 1]) * 3)
  564|  16.1M|    for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (564:21): [True: 15.7M, False: 369k]
  ------------------
  565|  15.7M|        const int a = EIGHT_NEIGHBORS(B_ptrs, i + 1);
  ------------------
  |  |  561|  15.7M|    ((P[1][i] + P[1][i - 1] + P[1][i + 1] + P[0][i] + P[2][i]) * 4 + \
  |  |  562|  15.7M|     (P[0][i - 1] + P[2][i - 1] +                           \
  |  |  563|  15.7M|      P[0][i + 1] + P[2][i + 1]) * 3)
  ------------------
  566|  15.7M|        const int b = EIGHT_NEIGHBORS(A_ptrs, i + 1);
  ------------------
  |  |  561|  15.7M|    ((P[1][i] + P[1][i - 1] + P[1][i + 1] + P[0][i] + P[2][i]) * 4 + \
  |  |  562|  15.7M|     (P[0][i - 1] + P[2][i - 1] +                           \
  |  |  563|  15.7M|      P[0][i + 1] + P[2][i + 1]) * 3)
  ------------------
  567|  15.7M|        tmp[i] = (b - a * src[i] + (1 << 8)) >> 9;
  568|  15.7M|    }
  569|   369k|#undef EIGHT_NEIGHBORS
  570|   369k|}
looprestoration_tmpl.c:sgr_mix_c:
 1032|  9.10k|{
 1033|  9.10k|    ALIGN_STK_16(int32_t, sumsq5_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1034|  9.10k|    ALIGN_STK_16(coef, sum5_buf, BUF_STRIDE * 5 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1035|  9.10k|    int32_t *sumsq5_ptrs[5], *sumsq5_rows[5];
 1036|  9.10k|    coef *sum5_ptrs[5], *sum5_rows[5];
 1037|  54.6k|    for (int i = 0; i < 5; i++) {
  ------------------
  |  Branch (1037:21): [True: 45.5k, False: 9.10k]
  ------------------
 1038|  45.5k|        sumsq5_rows[i] = &sumsq5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  45.5k|#define BUF_STRIDE (384 + 16)
  ------------------
 1039|  45.5k|        sum5_rows[i] = &sum5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  45.5k|#define BUF_STRIDE (384 + 16)
  ------------------
 1040|  45.5k|    }
 1041|  9.10k|    ALIGN_STK_16(int32_t, sumsq3_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1042|  9.10k|    ALIGN_STK_16(coef, sum3_buf, BUF_STRIDE * 3 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1043|  9.10k|    int32_t *sumsq3_ptrs[3], *sumsq3_rows[3];
 1044|  9.10k|    coef *sum3_ptrs[3], *sum3_rows[3];
 1045|  36.4k|    for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1045:21): [True: 27.3k, False: 9.10k]
  ------------------
 1046|  27.3k|        sumsq3_rows[i] = &sumsq3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  27.3k|#define BUF_STRIDE (384 + 16)
  ------------------
 1047|  27.3k|        sum3_rows[i] = &sum3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  27.3k|#define BUF_STRIDE (384 + 16)
  ------------------
 1048|  27.3k|    }
 1049|       |
 1050|  9.10k|    ALIGN_STK_16(int32_t, A5_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1051|  9.10k|    ALIGN_STK_16(coef, B5_buf, BUF_STRIDE * 2 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1052|  9.10k|    int32_t *A5_ptrs[2];
 1053|  9.10k|    coef *B5_ptrs[2];
 1054|  27.3k|    for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1054:21): [True: 18.2k, False: 9.10k]
  ------------------
 1055|  18.2k|        A5_ptrs[i] = &A5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  18.2k|#define BUF_STRIDE (384 + 16)
  ------------------
 1056|  18.2k|        B5_ptrs[i] = &B5_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  18.2k|#define BUF_STRIDE (384 + 16)
  ------------------
 1057|  18.2k|    }
 1058|  9.10k|    ALIGN_STK_16(int32_t, A3_buf, BUF_STRIDE * 4 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1059|  9.10k|    ALIGN_STK_16(coef, B3_buf, BUF_STRIDE * 4 + 16,);
  ------------------
  |  |  100|  9.10k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  9.10k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
 1060|  9.10k|    int32_t *A3_ptrs[4];
 1061|  9.10k|    coef *B3_ptrs[4];
 1062|  45.5k|    for (int i = 0; i < 4; i++) {
  ------------------
  |  Branch (1062:21): [True: 36.4k, False: 9.10k]
  ------------------
 1063|  36.4k|        A3_ptrs[i] = &A3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  36.4k|#define BUF_STRIDE (384 + 16)
  ------------------
 1064|  36.4k|        B3_ptrs[i] = &B3_buf[i * BUF_STRIDE];
  ------------------
  |  |  685|  36.4k|#define BUF_STRIDE (384 + 16)
  ------------------
 1065|  36.4k|    }
 1066|  9.10k|    const pixel *src = dst;
 1067|  9.10k|    const pixel *lpf_bottom = lpf + 6*PXSTRIDE(stride);
  ------------------
  |  |   53|  9.10k|#define PXSTRIDE(x) (x)
  ------------------
 1068|       |
 1069|  9.10k|    if (edges & LR_HAVE_TOP) {
  ------------------
  |  Branch (1069:9): [True: 3.98k, False: 5.12k]
  ------------------
 1070|  3.98k|        sumsq5_ptrs[0] = sumsq5_rows[0];
 1071|  3.98k|        sumsq5_ptrs[1] = sumsq5_rows[0];
 1072|  3.98k|        sumsq5_ptrs[2] = sumsq5_rows[1];
 1073|  3.98k|        sumsq5_ptrs[3] = sumsq5_rows[2];
 1074|  3.98k|        sumsq5_ptrs[4] = sumsq5_rows[3];
 1075|  3.98k|        sum5_ptrs[0] = sum5_rows[0];
 1076|  3.98k|        sum5_ptrs[1] = sum5_rows[0];
 1077|  3.98k|        sum5_ptrs[2] = sum5_rows[1];
 1078|  3.98k|        sum5_ptrs[3] = sum5_rows[2];
 1079|  3.98k|        sum5_ptrs[4] = sum5_rows[3];
 1080|       |
 1081|  3.98k|        sumsq3_ptrs[0] = sumsq3_rows[0];
 1082|  3.98k|        sumsq3_ptrs[1] = sumsq3_rows[1];
 1083|  3.98k|        sumsq3_ptrs[2] = sumsq3_rows[2];
 1084|  3.98k|        sum3_ptrs[0] = sum3_rows[0];
 1085|  3.98k|        sum3_ptrs[1] = sum3_rows[1];
 1086|  3.98k|        sum3_ptrs[2] = sum3_rows[2];
 1087|       |
 1088|  3.98k|        sgr_box35_row_h(sumsq3_rows[0], sum3_rows[0],
 1089|  3.98k|                        sumsq5_rows[0], sum5_rows[0],
 1090|  3.98k|                        NULL, lpf, w, edges);
 1091|  3.98k|        lpf += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.98k|#define PXSTRIDE(x) (x)
  ------------------
 1092|  3.98k|        sgr_box35_row_h(sumsq3_rows[1], sum3_rows[1],
 1093|  3.98k|                        sumsq5_rows[1], sum5_rows[1],
 1094|  3.98k|                        NULL, lpf, w, edges);
 1095|       |
 1096|  3.98k|        sgr_box35_row_h(sumsq3_rows[2], sum3_rows[2],
 1097|  3.98k|                        sumsq5_rows[2], sum5_rows[2],
 1098|  3.98k|                        left, src, w, edges);
 1099|  3.98k|        left++;
 1100|  3.98k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.98k|#define PXSTRIDE(x) (x)
  ------------------
 1101|       |
 1102|  3.98k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1103|  3.98k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.98k|#define BITDEPTH_MAX 0xff
  ------------------
 1104|  3.98k|        rotate(A3_ptrs, B3_ptrs, 4);
 1105|       |
 1106|  3.98k|        if (--h <= 0)
  ------------------
  |  Branch (1106:13): [True: 806, False: 3.17k]
  ------------------
 1107|    806|            goto vert_1;
 1108|       |
 1109|  3.17k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1110|  3.17k|                        sumsq5_rows[3], sum5_rows[3],
 1111|  3.17k|                        left, src, w, edges);
 1112|  3.17k|        left++;
 1113|  3.17k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.17k|#define PXSTRIDE(x) (x)
  ------------------
 1114|  3.17k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1115|  3.17k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.17k|#define BITDEPTH_MAX 0xff
  ------------------
 1116|  3.17k|        rotate(A5_ptrs, B5_ptrs, 2);
 1117|  3.17k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1118|  3.17k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.17k|#define BITDEPTH_MAX 0xff
  ------------------
 1119|  3.17k|        rotate(A3_ptrs, B3_ptrs, 4);
 1120|       |
 1121|  3.17k|        if (--h <= 0)
  ------------------
  |  Branch (1121:13): [True: 244, False: 2.93k]
  ------------------
 1122|    244|            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|  2.93k|        sumsq5_ptrs[3] = sumsq5_rows[4];
 1127|  2.93k|        sum5_ptrs[3] = sum5_rows[4];
 1128|  5.12k|    } else {
 1129|  5.12k|        sumsq5_ptrs[0] = sumsq5_rows[0];
 1130|  5.12k|        sumsq5_ptrs[1] = sumsq5_rows[0];
 1131|  5.12k|        sumsq5_ptrs[2] = sumsq5_rows[0];
 1132|  5.12k|        sumsq5_ptrs[3] = sumsq5_rows[0];
 1133|  5.12k|        sumsq5_ptrs[4] = sumsq5_rows[0];
 1134|  5.12k|        sum5_ptrs[0] = sum5_rows[0];
 1135|  5.12k|        sum5_ptrs[1] = sum5_rows[0];
 1136|  5.12k|        sum5_ptrs[2] = sum5_rows[0];
 1137|  5.12k|        sum5_ptrs[3] = sum5_rows[0];
 1138|  5.12k|        sum5_ptrs[4] = sum5_rows[0];
 1139|       |
 1140|  5.12k|        sumsq3_ptrs[0] = sumsq3_rows[0];
 1141|  5.12k|        sumsq3_ptrs[1] = sumsq3_rows[0];
 1142|  5.12k|        sumsq3_ptrs[2] = sumsq3_rows[0];
 1143|  5.12k|        sum3_ptrs[0] = sum3_rows[0];
 1144|  5.12k|        sum3_ptrs[1] = sum3_rows[0];
 1145|  5.12k|        sum3_ptrs[2] = sum3_rows[0];
 1146|       |
 1147|  5.12k|        sgr_box35_row_h(sumsq3_rows[0], sum3_rows[0],
 1148|  5.12k|                        sumsq5_rows[0], sum5_rows[0],
 1149|  5.12k|                        left, src, w, edges);
 1150|  5.12k|        left++;
 1151|  5.12k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  5.12k|#define PXSTRIDE(x) (x)
  ------------------
 1152|       |
 1153|  5.12k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1154|  5.12k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  5.12k|#define BITDEPTH_MAX 0xff
  ------------------
 1155|  5.12k|        rotate(A3_ptrs, B3_ptrs, 4);
 1156|       |
 1157|  5.12k|        if (--h <= 0)
  ------------------
  |  Branch (1157:13): [True: 483, False: 4.63k]
  ------------------
 1158|    483|            goto vert_1;
 1159|       |
 1160|  4.63k|        sumsq5_ptrs[4] = sumsq5_rows[1];
 1161|  4.63k|        sum5_ptrs[4] = sum5_rows[1];
 1162|       |
 1163|  4.63k|        sumsq3_ptrs[2] = sumsq3_rows[1];
 1164|  4.63k|        sum3_ptrs[2] = sum3_rows[1];
 1165|       |
 1166|  4.63k|        sgr_box35_row_h(sumsq3_rows[1], sum3_rows[1],
 1167|  4.63k|                        sumsq5_rows[1], sum5_rows[1],
 1168|  4.63k|                        left, src, w, edges);
 1169|  4.63k|        left++;
 1170|  4.63k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  4.63k|#define PXSTRIDE(x) (x)
  ------------------
 1171|       |
 1172|  4.63k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1173|  4.63k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  4.63k|#define BITDEPTH_MAX 0xff
  ------------------
 1174|  4.63k|        rotate(A5_ptrs, B5_ptrs, 2);
 1175|  4.63k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1176|  4.63k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  4.63k|#define BITDEPTH_MAX 0xff
  ------------------
 1177|  4.63k|        rotate(A3_ptrs, B3_ptrs, 4);
 1178|       |
 1179|  4.63k|        if (--h <= 0)
  ------------------
  |  Branch (1179:13): [True: 611, False: 4.02k]
  ------------------
 1180|    611|            goto vert_2;
 1181|       |
 1182|  4.02k|        sumsq5_ptrs[3] = sumsq5_rows[2];
 1183|  4.02k|        sumsq5_ptrs[4] = sumsq5_rows[3];
 1184|  4.02k|        sum5_ptrs[3] = sum5_rows[2];
 1185|  4.02k|        sum5_ptrs[4] = sum5_rows[3];
 1186|       |
 1187|  4.02k|        sumsq3_ptrs[2] = sumsq3_rows[2];
 1188|  4.02k|        sum3_ptrs[2] = sum3_rows[2];
 1189|       |
 1190|  4.02k|        sgr_box35_row_h(sumsq3_rows[2], sum3_rows[2],
 1191|  4.02k|                        sumsq5_rows[2], sum5_rows[2],
 1192|  4.02k|                        left, src, w, edges);
 1193|  4.02k|        left++;
 1194|  4.02k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  4.02k|#define PXSTRIDE(x) (x)
  ------------------
 1195|       |
 1196|  4.02k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1197|  4.02k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  4.02k|#define BITDEPTH_MAX 0xff
  ------------------
 1198|  4.02k|        rotate(A3_ptrs, B3_ptrs, 4);
 1199|       |
 1200|  4.02k|        if (--h <= 0)
  ------------------
  |  Branch (1200:13): [True: 544, False: 3.48k]
  ------------------
 1201|    544|            goto odd;
 1202|       |
 1203|  3.48k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1204|  3.48k|                        sumsq5_rows[3], sum5_rows[3],
 1205|  3.48k|                        left, src, w, edges);
 1206|  3.48k|        left++;
 1207|  3.48k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|  3.48k|#define PXSTRIDE(x) (x)
  ------------------
 1208|       |
 1209|  3.48k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1210|  3.48k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.48k|#define BITDEPTH_MAX 0xff
  ------------------
 1211|  3.48k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1212|  3.48k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  3.48k|#define BITDEPTH_MAX 0xff
  ------------------
 1213|  3.48k|        sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1214|  3.48k|                       w, 2, params->sgr.w0, params->sgr.w1
 1215|  3.48k|                       HIGHBD_TAIL_SUFFIX);
 1216|       |
 1217|  3.48k|        if (--h <= 0)
  ------------------
  |  Branch (1217:13): [True: 384, False: 3.10k]
  ------------------
 1218|    384|            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|  3.10k|        sumsq5_ptrs[3] = sumsq5_rows[4];
 1223|  3.10k|        sum5_ptrs[3] = sum5_rows[4];
 1224|  3.10k|    }
 1225|       |
 1226|   119k|    do {
 1227|   119k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1228|   119k|                        sumsq5_ptrs[3], sum5_ptrs[3],
 1229|   119k|                        left, src, w, edges);
 1230|   119k|        left++;
 1231|   119k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|   119k|#define PXSTRIDE(x) (x)
  ------------------
 1232|       |
 1233|   119k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1234|   119k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|   119k|#define BITDEPTH_MAX 0xff
  ------------------
 1235|   119k|        rotate(A3_ptrs, B3_ptrs, 4);
 1236|       |
 1237|   119k|        if (--h <= 0)
  ------------------
  |  Branch (1237:13): [True: 840, False: 118k]
  ------------------
 1238|    840|            goto odd;
 1239|       |
 1240|   118k|        sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1241|   118k|                        sumsq5_ptrs[4], sum5_ptrs[4],
 1242|   118k|                        left, src, w, edges);
 1243|   118k|        left++;
 1244|   118k|        src += PXSTRIDE(stride);
  ------------------
  |  |   53|   118k|#define PXSTRIDE(x) (x)
  ------------------
 1245|       |
 1246|   118k|        sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1247|   118k|                      w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|   118k|#define BITDEPTH_MAX 0xff
  ------------------
 1248|   118k|        sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1249|   118k|                      w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|   118k|#define BITDEPTH_MAX 0xff
  ------------------
 1250|   118k|        sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1251|   118k|                       w, 2, params->sgr.w0, params->sgr.w1
 1252|   118k|                       HIGHBD_TAIL_SUFFIX);
 1253|   118k|    } while (--h > 0);
  ------------------
  |  Branch (1253:14): [True: 113k, False: 5.19k]
  ------------------
 1254|       |
 1255|  5.19k|    if (!(edges & LR_HAVE_BOTTOM))
  ------------------
  |  Branch (1255:9): [True: 783, False: 4.40k]
  ------------------
 1256|    783|        goto vert_2;
 1257|       |
 1258|  4.40k|    sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1259|  4.40k|                    sumsq5_ptrs[3], sum5_ptrs[3],
 1260|  4.40k|                    NULL, lpf_bottom, w, edges);
 1261|  4.40k|    lpf_bottom += PXSTRIDE(stride);
  ------------------
  |  |   53|  4.40k|#define PXSTRIDE(x) (x)
  ------------------
 1262|  4.40k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1263|  4.40k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  4.40k|#define BITDEPTH_MAX 0xff
  ------------------
 1264|  4.40k|    rotate(A3_ptrs, B3_ptrs, 4);
 1265|       |
 1266|  4.40k|    sgr_box35_row_h(sumsq3_ptrs[2], sum3_ptrs[2],
 1267|  4.40k|                    sumsq5_ptrs[4], sum5_ptrs[4],
 1268|  4.40k|                    NULL, lpf_bottom, w, edges);
 1269|       |
 1270|  6.43k|output_2:
 1271|  6.43k|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1272|  6.43k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  6.43k|#define BITDEPTH_MAX 0xff
  ------------------
 1273|  6.43k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1274|  6.43k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  6.43k|#define BITDEPTH_MAX 0xff
  ------------------
 1275|  6.43k|    sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1276|  6.43k|                   w, 2, params->sgr.w0, params->sgr.w1
 1277|  6.43k|                   HIGHBD_TAIL_SUFFIX);
 1278|  6.43k|    return;
 1279|       |
 1280|  2.02k|vert_2:
 1281|       |    // Duplicate the last row twice more
 1282|  2.02k|    sumsq5_ptrs[3] = sumsq5_ptrs[2];
 1283|  2.02k|    sumsq5_ptrs[4] = sumsq5_ptrs[2];
 1284|  2.02k|    sum5_ptrs[3] = sum5_ptrs[2];
 1285|  2.02k|    sum5_ptrs[4] = sum5_ptrs[2];
 1286|       |
 1287|  2.02k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1288|  2.02k|    sum3_ptrs[2] = sum3_ptrs[1];
 1289|  2.02k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1290|  2.02k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  2.02k|#define BITDEPTH_MAX 0xff
  ------------------
 1291|  2.02k|    rotate(A3_ptrs, B3_ptrs, 4);
 1292|       |
 1293|  2.02k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1294|  2.02k|    sum3_ptrs[2] = sum3_ptrs[1];
 1295|       |
 1296|  2.02k|    goto output_2;
 1297|       |
 1298|  1.38k|odd:
 1299|       |    // Copy the last row as padding once
 1300|  1.38k|    sumsq5_ptrs[4] = sumsq5_ptrs[3];
 1301|  1.38k|    sum5_ptrs[4] = sum5_ptrs[3];
 1302|       |
 1303|  1.38k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1304|  1.38k|    sum3_ptrs[2] = sum3_ptrs[1];
 1305|       |
 1306|  1.38k|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1307|  1.38k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.38k|#define BITDEPTH_MAX 0xff
  ------------------
 1308|  1.38k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1309|  1.38k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.38k|#define BITDEPTH_MAX 0xff
  ------------------
 1310|  1.38k|    sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1311|  1.38k|                   w, 2, params->sgr.w0, params->sgr.w1
 1312|  1.38k|                   HIGHBD_TAIL_SUFFIX);
 1313|       |
 1314|  2.67k|output_1:
 1315|       |    // Duplicate the last row twice more
 1316|  2.67k|    sumsq5_ptrs[3] = sumsq5_ptrs[2];
 1317|  2.67k|    sumsq5_ptrs[4] = sumsq5_ptrs[2];
 1318|  2.67k|    sum5_ptrs[3] = sum5_ptrs[2];
 1319|  2.67k|    sum5_ptrs[4] = sum5_ptrs[2];
 1320|       |
 1321|  2.67k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1322|  2.67k|    sum3_ptrs[2] = sum3_ptrs[1];
 1323|       |
 1324|  2.67k|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1325|  2.67k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  2.67k|#define BITDEPTH_MAX 0xff
  ------------------
 1326|  2.67k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1327|  2.67k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  2.67k|#define BITDEPTH_MAX 0xff
  ------------------
 1328|  2.67k|    rotate(A3_ptrs, B3_ptrs, 4);
 1329|       |    // Output only one row
 1330|  2.67k|    sgr_finish_mix(&dst, stride, A5_ptrs, B5_ptrs, A3_ptrs, B3_ptrs,
 1331|  2.67k|                   w, 1, params->sgr.w0, params->sgr.w1
 1332|  2.67k|                   HIGHBD_TAIL_SUFFIX);
 1333|  2.67k|    return;
 1334|       |
 1335|  1.28k|vert_1:
 1336|       |    // Copy the last row as padding once
 1337|  1.28k|    sumsq5_ptrs[4] = sumsq5_ptrs[3];
 1338|  1.28k|    sum5_ptrs[4] = sum5_ptrs[3];
 1339|       |
 1340|  1.28k|    sumsq3_ptrs[2] = sumsq3_ptrs[1];
 1341|  1.28k|    sum3_ptrs[2] = sum3_ptrs[1];
 1342|       |
 1343|  1.28k|    sgr_box5_vert(sumsq5_ptrs, sum5_ptrs, A5_ptrs[1], B5_ptrs[1],
 1344|  1.28k|                  w, params->sgr.s0, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.28k|#define BITDEPTH_MAX 0xff
  ------------------
 1345|  1.28k|    rotate(A5_ptrs, B5_ptrs, 2);
 1346|  1.28k|    sgr_box3_vert(sumsq3_ptrs, sum3_ptrs, A3_ptrs[3], B3_ptrs[3],
 1347|  1.28k|                  w, params->sgr.s1, BITDEPTH_MAX);
  ------------------
  |  |   59|  1.28k|#define BITDEPTH_MAX 0xff
  ------------------
 1348|  1.28k|    rotate(A3_ptrs, B3_ptrs, 4);
 1349|       |
 1350|  1.28k|    goto output_1;
 1351|  1.38k|}
looprestoration_tmpl.c:sgr_box35_row_h:
  464|   279k|{
  465|   279k|    sgr_box3_row_h(sumsq3, sum3, left, src, w, edges);
  466|   279k|    sgr_box5_row_h(sumsq5, sum5, left, src, w, edges);
  467|   279k|}
looprestoration_tmpl.c:sgr_finish_mix:
  663|   132k|{
  664|   132k|    ALIGN_STK_16(coef, tmp5, 2*FILTER_OUT_STRIDE,);
  ------------------
  |  |  100|   132k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   132k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  665|   132k|    ALIGN_STK_16(coef, tmp3, 2*FILTER_OUT_STRIDE,);
  ------------------
  |  |  100|   132k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|   132k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  666|       |
  667|   132k|    sgr_finish_filter2(tmp5, *dst, stride, A5_ptrs, B5_ptrs, w, h);
  668|   132k|    sgr_finish_filter_row1(tmp3, *dst, A3_ptrs, B3_ptrs, w);
  669|   132k|    if (h > 1)
  ------------------
  |  Branch (669:9): [True: 129k, False: 2.67k]
  ------------------
  670|   129k|        sgr_finish_filter_row1(tmp3 + FILTER_OUT_STRIDE, *dst + PXSTRIDE(stride),
  ------------------
  |  |  572|   129k|#define FILTER_OUT_STRIDE (384)
  ------------------
                      sgr_finish_filter_row1(tmp3 + FILTER_OUT_STRIDE, *dst + PXSTRIDE(stride),
  ------------------
  |  |   53|   129k|#define PXSTRIDE(x) (x)
  ------------------
  671|   129k|                               &A3_ptrs[1], &B3_ptrs[1], w);
  672|   132k|    sgr_weighted2(*dst, stride, tmp5, tmp3, w, h, w0, w1 HIGHBD_TAIL_SUFFIX);
  673|   132k|    *dst += h*PXSTRIDE(stride);
  ------------------
  |  |   53|   132k|#define PXSTRIDE(x) (x)
  ------------------
  674|   132k|    rotate(A5_ptrs, B5_ptrs, 2);
  675|   132k|    rotate(A3_ptrs, B3_ptrs, 4);
  676|   132k|}
looprestoration_tmpl.c:sgr_weighted2:
  616|   132k|{
  617|   394k|    for (int j = 0; j < h; j++) {
  ------------------
  |  Branch (617:21): [True: 262k, False: 132k]
  ------------------
  618|  11.8M|        for (int i = 0; i < w; i++) {
  ------------------
  |  Branch (618:25): [True: 11.5M, False: 262k]
  ------------------
  619|  11.5M|            const int v = w0 * t1[i] + w1 * t2[i];
  620|  11.5M|            dst[i] = iclip_pixel(dst[i] + ((v + (1 << 10)) >> 11));
  ------------------
  |  |   49|  11.5M|#define iclip_pixel iclip_u8
  ------------------
  621|  11.5M|        }
  622|   262k|        dst += PXSTRIDE(dst_stride);
  ------------------
  |  |   53|   262k|#define PXSTRIDE(x) (x)
  ------------------
  623|   262k|        t1 += FILTER_OUT_STRIDE;
  ------------------
  |  |  572|   262k|#define FILTER_OUT_STRIDE (384)
  ------------------
  624|   262k|        t2 += FILTER_OUT_STRIDE;
  ------------------
  |  |  572|   262k|#define FILTER_OUT_STRIDE (384)
  ------------------
  625|   262k|    }
  626|   132k|}
dav1d_loop_restoration_dsp_init_16bpc:
 1367|  7.82k|{
 1368|  7.82k|    c->wiener[0] = c->wiener[1] = wiener_c;
 1369|  7.82k|    c->sgr[0] = sgr_5x5_c;
 1370|  7.82k|    c->sgr[1] = sgr_3x3_c;
 1371|  7.82k|    c->sgr[2] = sgr_mix_c;
 1372|       |
 1373|  7.82k|#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|  7.82k|#endif
 1383|  7.82k|#endif
 1384|  7.82k|}

dav1d_lr_sbrow_8bpc:
  171|  10.7k|{
  172|  10.7k|    const int offset_y = 8 * !!sby;
  173|  10.7k|    const ptrdiff_t *const dst_stride = f->sr_cur.p.stride;
  174|  10.7k|    const int restore_planes = f->lf.restore_planes;
  175|  10.7k|    const int sb128 = f->seq_hdr->sb128;
  176|  10.7k|    const int not_last = sby + 1 < f->sbh;
  177|       |
  178|  10.7k|    if (restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (178:9): [True: 8.55k, False: 2.21k]
  ------------------
  179|  8.55k|        const int h = f->sr_cur.p.p.h;
  180|  8.55k|        const int w = f->sr_cur.p.p.w;
  181|  8.55k|        const int next_row_y = (sby + 1) << (6 + sb128);
  182|  8.55k|        const int row_h = imin(next_row_y - 8 * not_last, h);
  183|  8.55k|        const int y_stripe = (sby << (6 + sb128)) - offset_y;
  184|  8.55k|        lr_sbrow(f, dst[0] - offset_y * PXSTRIDE(dst_stride[0]), y_stripe, w,
  ------------------
  |  |   53|  8.55k|#define PXSTRIDE(x) (x)
  ------------------
  185|  8.55k|                 h, row_h, 0);
  186|  8.55k|    }
  187|  10.7k|    if (restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) {
  ------------------
  |  Branch (187:9): [True: 6.57k, False: 4.19k]
  ------------------
  188|  6.57k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  189|  6.57k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  190|  6.57k|        const int h = (f->sr_cur.p.p.h + ss_ver) >> ss_ver;
  191|  6.57k|        const int w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
  192|  6.57k|        const int next_row_y = (sby + 1) << ((6 - ss_ver) + sb128);
  193|  6.57k|        const int row_h = imin(next_row_y - (8 >> ss_ver) * not_last, h);
  194|  6.57k|        const int offset_uv = offset_y >> ss_ver;
  195|  6.57k|        const int y_stripe = (sby << ((6 - ss_ver) + sb128)) - offset_uv;
  196|  6.57k|        if (restore_planes & LR_RESTORE_U)
  ------------------
  |  Branch (196:13): [True: 5.47k, False: 1.09k]
  ------------------
  197|  5.47k|            lr_sbrow(f, dst[1] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  ------------------
  |  |   53|  5.47k|#define PXSTRIDE(x) (x)
  ------------------
  198|  5.47k|                     w, h, row_h, 1);
  199|       |
  200|  6.57k|        if (restore_planes & LR_RESTORE_V)
  ------------------
  |  Branch (200:13): [True: 3.85k, False: 2.71k]
  ------------------
  201|  3.85k|            lr_sbrow(f, dst[2] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  ------------------
  |  |   53|  3.85k|#define PXSTRIDE(x) (x)
  ------------------
  202|  3.85k|                     w, h, row_h, 2);
  203|  6.57k|    }
  204|  10.7k|}
lr_apply_tmpl.c:lr_sbrow:
  109|  37.4k|{
  110|  37.4k|    const int chroma = !!plane;
  111|  37.4k|    const int ss_ver = chroma & (f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420);
  112|  37.4k|    const int ss_hor = chroma & (f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444);
  113|  37.4k|    const ptrdiff_t p_stride = f->sr_cur.p.stride[chroma];
  114|       |
  115|  37.4k|    const int unit_size_log2 = f->frame_hdr->restoration.unit_size[!!plane];
  116|  37.4k|    const int unit_size = 1 << unit_size_log2;
  117|  37.4k|    const int half_unit_size = unit_size >> 1;
  118|  37.4k|    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|  37.4k|    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|  37.4k|    const int shift_hor = 7 - ss_hor;
  131|       |
  132|       |    /* maximum sbrow height is 128 + 8 rows offset */
  133|  37.4k|    ALIGN_STK_16(pixel, pre_lr_border, 2, [128 + 8][4]);
  ------------------
  |  |  100|  37.4k|    ALIGN(type var[sz1d]sznd, ALIGN_16_VAL)
  |  |  ------------------
  |  |  |  |   86|  37.4k|    line __attribute__((aligned(align)))
  |  |  ------------------
  ------------------
  134|  37.4k|    const Av1RestorationUnit *lr[2];
  135|       |
  136|  37.4k|    enum LrEdgeFlags edges = (y > 0 ? LR_HAVE_TOP : 0) | LR_HAVE_RIGHT;
  ------------------
  |  Branch (136:31): [True: 27.1k, False: 10.3k]
  ------------------
  137|       |
  138|  37.4k|    int aligned_unit_pos = row_y & ~(unit_size - 1);
  139|  37.4k|    if (aligned_unit_pos && aligned_unit_pos + half_unit_size > h)
  ------------------
  |  Branch (139:9): [True: 25.1k, False: 12.3k]
  |  Branch (139:29): [True: 758, False: 24.3k]
  ------------------
  140|    758|        aligned_unit_pos -= unit_size;
  141|  37.4k|    aligned_unit_pos <<= ss_ver;
  142|  37.4k|    const int sb_idx = (aligned_unit_pos >> 7) * f->sr_sb128w;
  143|  37.4k|    const int unit_idx = ((aligned_unit_pos >> 6) & 1) << 1;
  144|  37.4k|    lr[0] = &f->lf.lr_mask[sb_idx].lr[plane][unit_idx];
  145|  37.4k|    int restore = lr[0]->type != DAV1D_RESTORATION_NONE;
  146|  37.4k|    int x = 0, bit = 0;
  147|  37.4k|    const int backup_h = row_h - y;
  148|  73.9k|    for (; x + max_unit_size <= w; p += unit_size, edges |= LR_HAVE_LEFT, bit ^= 1) {
  ------------------
  |  Branch (148:12): [True: 36.4k, False: 37.4k]
  ------------------
  149|  36.4k|        const int next_x = x + unit_size;
  150|  36.4k|        const int next_u_idx = unit_idx + ((next_x >> (shift_hor - 1)) & 1);
  151|  36.4k|        lr[!bit] =
  152|  36.4k|            &f->lf.lr_mask[sb_idx + (next_x >> shift_hor)].lr[plane][next_u_idx];
  153|  36.4k|        const int restore_next = lr[!bit]->type != DAV1D_RESTORATION_NONE;
  154|  36.4k|        if (restore_next)
  ------------------
  |  Branch (154:13): [True: 16.8k, False: 19.6k]
  ------------------
  155|  16.8k|            backup4xU(pre_lr_border[bit], p + unit_size - 4, p_stride, backup_h);
  156|  36.4k|        if (restore)
  ------------------
  |  Branch (156:13): [True: 16.4k, False: 20.0k]
  ------------------
  157|  16.4k|            lr_stripe(f, p, pre_lr_border[!bit], x, y, plane, unit_size, row_h,
  158|  16.4k|                      lr[bit], edges);
  159|  36.4k|        x = next_x;
  160|  36.4k|        restore = restore_next;
  161|  36.4k|    }
  162|  37.4k|    if (restore) {
  ------------------
  |  Branch (162:9): [True: 20.2k, False: 17.2k]
  ------------------
  163|  20.2k|        edges &= ~LR_HAVE_RIGHT;
  164|  20.2k|        const int unit_w = w - x;
  165|  20.2k|        lr_stripe(f, p, pre_lr_border[!bit], x, y, plane, unit_w, row_h, lr[bit], edges);
  166|  20.2k|    }
  167|  37.4k|}
lr_apply_tmpl.c:backup4xU:
  102|  16.8k|{
  103|   469k|    for (; u > 0; u--, dst++, src += PXSTRIDE(src_stride))
  ------------------
  |  |   53|   452k|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (103:12): [True: 452k, False: 16.8k]
  ------------------
  104|   452k|        pixel_copy(dst, src, 4);
  ------------------
  |  |   47|   452k|#define pixel_copy memcpy
  ------------------
  105|  16.8k|}
lr_apply_tmpl.c:lr_stripe:
   40|  36.6k|{
   41|  36.6k|    const Dav1dDSPContext *const dsp = f->dsp;
   42|  36.6k|    const int chroma = !!plane;
   43|  36.6k|    const int ss_ver = chroma & (f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420);
   44|  36.6k|    const ptrdiff_t stride = f->sr_cur.p.stride[chroma];
   45|  36.6k|    const int sby = (y + (y ? 8 << ss_ver : 0)) >> (6 - ss_ver + f->seq_hdr->sb128);
  ------------------
  |  Branch (45:27): [True: 16.1k, False: 20.5k]
  ------------------
   46|  36.6k|    const int have_tt = f->c->n_tc > 1;
   47|  36.6k|    const pixel *lpf = f->lf.lr_lpf_line[plane] +
   48|  36.6k|        have_tt * (sby * (4 << f->seq_hdr->sb128) - 4) * PXSTRIDE(stride) + x;
  ------------------
  |  |   53|  36.6k|#define PXSTRIDE(x) (x)
  ------------------
   49|       |
   50|       |    // The first stripe of the frame is shorter by 8 luma pixel rows.
   51|  36.6k|    int stripe_h = imin((64 - 8 * !y) >> ss_ver, row_h - y);
   52|       |
   53|  36.6k|    looprestorationfilter_fn lr_fn;
   54|  36.6k|    LooprestorationParams params;
   55|  36.6k|    if (lr->type == DAV1D_RESTORATION_WIENER) {
  ------------------
  |  Branch (55:9): [True: 16.6k, False: 20.0k]
  ------------------
   56|  16.6k|        int16_t (*const filter)[8] = params.filter;
   57|  16.6k|        filter[0][0] = filter[0][6] = lr->filter_h[0];
   58|  16.6k|        filter[0][1] = filter[0][5] = lr->filter_h[1];
   59|  16.6k|        filter[0][2] = filter[0][4] = lr->filter_h[2];
   60|  16.6k|        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|  16.6k|        filter[1][0] = filter[1][6] = lr->filter_v[0];
   68|  16.6k|        filter[1][1] = filter[1][5] = lr->filter_v[1];
   69|  16.6k|        filter[1][2] = filter[1][4] = lr->filter_v[2];
   70|  16.6k|        filter[1][3] = 128 - (filter[1][0] + filter[1][1] + filter[1][2]) * 2;
   71|       |
   72|  16.6k|        lr_fn = dsp->lr.wiener[!(filter[0][0] | filter[1][0])];
   73|  20.0k|    } else {
   74|  20.0k|        assert(lr->type >= DAV1D_RESTORATION_SGRPROJ);
  ------------------
  |  |  140|  20.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 20.0k]
  |  |  |  Branch (140:68): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
   75|  20.0k|        const int sgr_idx = lr->type - DAV1D_RESTORATION_SGRPROJ;
   76|  20.0k|        const uint16_t *const sgr_params = dav1d_sgr_params[sgr_idx];
   77|  20.0k|        params.sgr.s0 = sgr_params[0];
   78|  20.0k|        params.sgr.s1 = sgr_params[1];
   79|  20.0k|        params.sgr.w0 = lr->sgr_weights[0];
   80|  20.0k|        params.sgr.w1 = 128 - (lr->sgr_weights[0] + lr->sgr_weights[1]);
   81|       |
   82|  20.0k|        lr_fn = dsp->lr.sgr[!!sgr_params[0] + !!sgr_params[1] * 2 - 1];
   83|  20.0k|    }
   84|       |
   85|  47.8k|    while (y + stripe_h <= row_h) {
  ------------------
  |  Branch (85:12): [True: 47.8k, False: 0]
  ------------------
   86|       |        // Change the HAVE_BOTTOM bit in edges to (sby + 1 != f->sbh || y + stripe_h != row_h)
   87|  47.8k|        edges ^= (-(sby + 1 != f->sbh || y + stripe_h != row_h) ^ edges) & LR_HAVE_BOTTOM;
  ------------------
  |  Branch (87:21): [True: 22.2k, False: 25.6k]
  |  Branch (87:42): [True: 5.76k, False: 19.8k]
  ------------------
   88|  47.8k|        lr_fn(p, stride, left, lpf, unit_w, stripe_h, &params, edges HIGHBD_CALL_SUFFIX);
   89|       |
   90|  47.8k|        left += stripe_h;
   91|  47.8k|        y += stripe_h;
   92|  47.8k|        p += stripe_h * PXSTRIDE(stride);
  ------------------
  |  |   53|  47.8k|#define PXSTRIDE(x) (x)
  ------------------
   93|  47.8k|        edges |= LR_HAVE_TOP;
   94|  47.8k|        stripe_h = imin(64 >> ss_ver, row_h - y);
   95|  47.8k|        if (stripe_h == 0) break;
  ------------------
  |  Branch (95:13): [True: 36.6k, False: 11.2k]
  ------------------
   96|  11.2k|        lpf += 4 * PXSTRIDE(stride);
  ------------------
  |  |   53|  11.2k|#define PXSTRIDE(x) (x)
  ------------------
   97|  11.2k|    }
   98|  36.6k|}
dav1d_lr_sbrow_16bpc:
  171|  9.61k|{
  172|  9.61k|    const int offset_y = 8 * !!sby;
  173|  9.61k|    const ptrdiff_t *const dst_stride = f->sr_cur.p.stride;
  174|  9.61k|    const int restore_planes = f->lf.restore_planes;
  175|  9.61k|    const int sb128 = f->seq_hdr->sb128;
  176|  9.61k|    const int not_last = sby + 1 < f->sbh;
  177|       |
  178|  9.61k|    if (restore_planes & LR_RESTORE_Y) {
  ------------------
  |  Branch (178:9): [True: 7.74k, False: 1.87k]
  ------------------
  179|  7.74k|        const int h = f->sr_cur.p.p.h;
  180|  7.74k|        const int w = f->sr_cur.p.p.w;
  181|  7.74k|        const int next_row_y = (sby + 1) << (6 + sb128);
  182|  7.74k|        const int row_h = imin(next_row_y - 8 * not_last, h);
  183|  7.74k|        const int y_stripe = (sby << (6 + sb128)) - offset_y;
  184|  7.74k|        lr_sbrow(f, dst[0] - offset_y * PXSTRIDE(dst_stride[0]), y_stripe, w,
  185|  7.74k|                 h, row_h, 0);
  186|  7.74k|    }
  187|  9.61k|    if (restore_planes & (LR_RESTORE_U | LR_RESTORE_V)) {
  ------------------
  |  Branch (187:9): [True: 7.54k, False: 2.07k]
  ------------------
  188|  7.54k|        const int ss_ver = f->sr_cur.p.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  189|  7.54k|        const int ss_hor = f->sr_cur.p.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  190|  7.54k|        const int h = (f->sr_cur.p.p.h + ss_ver) >> ss_ver;
  191|  7.54k|        const int w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
  192|  7.54k|        const int next_row_y = (sby + 1) << ((6 - ss_ver) + sb128);
  193|  7.54k|        const int row_h = imin(next_row_y - (8 >> ss_ver) * not_last, h);
  194|  7.54k|        const int offset_uv = offset_y >> ss_ver;
  195|  7.54k|        const int y_stripe = (sby << ((6 - ss_ver) + sb128)) - offset_uv;
  196|  7.54k|        if (restore_planes & LR_RESTORE_U)
  ------------------
  |  Branch (196:13): [True: 5.91k, False: 1.63k]
  ------------------
  197|  5.91k|            lr_sbrow(f, dst[1] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  198|  5.91k|                     w, h, row_h, 1);
  199|       |
  200|  7.54k|        if (restore_planes & LR_RESTORE_V)
  ------------------
  |  Branch (200:13): [True: 5.94k, False: 1.60k]
  ------------------
  201|  5.94k|            lr_sbrow(f, dst[2] - offset_uv * PXSTRIDE(dst_stride[1]), y_stripe,
  202|  5.94k|                     w, h, row_h, 2);
  203|  7.54k|    }
  204|  9.61k|}

dav1d_mc_dsp_init_8bpc:
  960|  5.05k|COLD void bitfn(dav1d_mc_dsp_init)(Dav1dMCDSPContext *const c) {
  961|  5.05k|#define init_mc_fns(type, name) do { \
  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  966|  5.05k|} while (0)
  967|       |
  968|  5.05k|    init_mc_fns(FILTER_2D_8TAP_REGULAR,        8tap_regular);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  969|  5.05k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  970|  5.05k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  971|  5.05k|    init_mc_fns(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  972|  5.05k|    init_mc_fns(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  973|  5.05k|    init_mc_fns(FILTER_2D_8TAP_SHARP,          8tap_sharp);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  974|  5.05k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  975|  5.05k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH,         8tap_smooth);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  976|  5.05k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  977|  5.05k|    init_mc_fns(FILTER_2D_BILINEAR,            bilin);
  ------------------
  |  |  961|  5.05k|#define init_mc_fns(type, name) do { \
  |  |  962|  5.05k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  5.05k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  5.05k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  5.05k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  5.05k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 5.05k]
  |  |  ------------------
  ------------------
  978|       |
  979|  5.05k|    c->avg      = avg_c;
  980|  5.05k|    c->w_avg    = w_avg_c;
  981|  5.05k|    c->mask     = mask_c;
  982|  5.05k|    c->blend    = blend_c;
  983|  5.05k|    c->blend_v  = blend_v_c;
  984|  5.05k|    c->blend_h  = blend_h_c;
  985|  5.05k|    c->w_mask[0] = w_mask_444_c;
  986|  5.05k|    c->w_mask[1] = w_mask_422_c;
  987|  5.05k|    c->w_mask[2] = w_mask_420_c;
  988|  5.05k|    c->warp8x8  = warp_affine_8x8_c;
  989|  5.05k|    c->warp8x8t = warp_affine_8x8t_c;
  990|  5.05k|    c->emu_edge = emu_edge_c;
  991|  5.05k|    c->resize   = resize_c;
  992|       |
  993|  5.05k|#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|  5.05k|#endif
 1005|  5.05k|#endif
 1006|  5.05k|}
dav1d_mc_dsp_init_16bpc:
  960|  7.82k|COLD void bitfn(dav1d_mc_dsp_init)(Dav1dMCDSPContext *const c) {
  961|  7.82k|#define init_mc_fns(type, name) do { \
  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  966|  7.82k|} while (0)
  967|       |
  968|  7.82k|    init_mc_fns(FILTER_2D_8TAP_REGULAR,        8tap_regular);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  969|  7.82k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  970|  7.82k|    init_mc_fns(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  971|  7.82k|    init_mc_fns(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  972|  7.82k|    init_mc_fns(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  973|  7.82k|    init_mc_fns(FILTER_2D_8TAP_SHARP,          8tap_sharp);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  974|  7.82k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  975|  7.82k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH,         8tap_smooth);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  976|  7.82k|    init_mc_fns(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  977|  7.82k|    init_mc_fns(FILTER_2D_BILINEAR,            bilin);
  ------------------
  |  |  961|  7.82k|#define init_mc_fns(type, name) do { \
  |  |  962|  7.82k|    c->mc        [type] = put_##name##_c; \
  |  |  963|  7.82k|    c->mc_scaled [type] = put_##name##_scaled_c; \
  |  |  964|  7.82k|    c->mct       [type] = prep_##name##_c; \
  |  |  965|  7.82k|    c->mct_scaled[type] = prep_##name##_scaled_c; \
  |  |  966|  7.82k|} while (0)
  |  |  ------------------
  |  |  |  Branch (966:10): [Folded, False: 7.82k]
  |  |  ------------------
  ------------------
  978|       |
  979|  7.82k|    c->avg      = avg_c;
  980|  7.82k|    c->w_avg    = w_avg_c;
  981|  7.82k|    c->mask     = mask_c;
  982|  7.82k|    c->blend    = blend_c;
  983|  7.82k|    c->blend_v  = blend_v_c;
  984|  7.82k|    c->blend_h  = blend_h_c;
  985|  7.82k|    c->w_mask[0] = w_mask_444_c;
  986|  7.82k|    c->w_mask[1] = w_mask_422_c;
  987|  7.82k|    c->w_mask[2] = w_mask_420_c;
  988|  7.82k|    c->warp8x8  = warp_affine_8x8_c;
  989|  7.82k|    c->warp8x8t = warp_affine_8x8t_c;
  990|  7.82k|    c->emu_edge = emu_edge_c;
  991|  7.82k|    c->resize   = resize_c;
  992|       |
  993|  7.82k|#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|  7.82k|#endif
 1005|  7.82k|#endif
 1006|  7.82k|}

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

lib.c:dav1d_alloc_aligned_internal:
   89|  42.0k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  42.0k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  42.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 42.0k]
  |  |  |  Branch (140:68): [Folded, False: 42.0k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  42.0k|    void *ptr;
   95|  42.0k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 42.0k]
  ------------------
   96|  42.0k|    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|  42.0k|}
lib.c:dav1d_free_aligned_internal:
  113|   112k|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|   112k|}
lib.c:dav1d_freep_aligned:
  144|  14.0k|static inline void dav1d_freep_aligned(void *ptr) {
  145|  14.0k|    void **mem = (void **) ptr;
  146|  14.0k|    if (*mem) {
  ------------------
  |  Branch (146:9): [True: 14.0k, False: 0]
  ------------------
  147|  14.0k|        dav1d_free_aligned(*mem);
  ------------------
  |  |  136|  14.0k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  148|       |        *mem = NULL;
  149|  14.0k|    }
  150|  14.0k|}
mem.c:dav1d_free_aligned_internal:
  113|  87.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|  87.3k|}
mem.c:dav1d_alloc_aligned_internal:
   89|  87.3k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  87.3k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  87.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 87.3k]
  |  |  |  Branch (140:68): [Folded, False: 87.3k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  87.3k|    void *ptr;
   95|  87.3k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 87.3k]
  ------------------
   96|  87.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|  87.3k|}
ref.c:dav1d_alloc_aligned_internal:
   89|    134|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|    134|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|    134|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 134]
  |  |  |  Branch (140:68): [Folded, False: 134]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|    134|    void *ptr;
   95|    134|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 134]
  ------------------
   96|    134|    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|    134|}
ref.c:dav1d_free_aligned_internal:
  113|    134|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|    134|}
refmvs.c:dav1d_free_aligned_internal:
  113|  5.22k|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|  5.22k|}
refmvs.c:dav1d_alloc_aligned_internal:
   89|  5.22k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  5.22k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  5.22k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 5.22k]
  |  |  |  Branch (140:68): [Folded, False: 5.22k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  5.22k|    void *ptr;
   95|  5.22k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 5.22k]
  ------------------
   96|  5.22k|    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|  5.22k|}
decode.c:dav1d_free_aligned_internal:
  113|  53.0k|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|  53.0k|}
decode.c:dav1d_alloc_aligned_internal:
   89|  53.0k|static inline void *dav1d_alloc_aligned_internal(const size_t sz, const size_t align) {
   90|  53.0k|    assert(!(align & (align - 1)));
  ------------------
  |  |  140|  53.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 53.0k]
  |  |  |  Branch (140:68): [Folded, False: 53.0k]
  |  |  ------------------
  ------------------
   91|       |#ifdef _WIN32
   92|       |    return _aligned_malloc(sz, align);
   93|       |#elif HAVE_POSIX_MEMALIGN
   94|  53.0k|    void *ptr;
   95|  53.0k|    if (posix_memalign(&ptr, align, sz)) return NULL;
  ------------------
  |  Branch (95:9): [True: 0, False: 53.0k]
  ------------------
   96|  53.0k|    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|  53.0k|}

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

decode.c:dav1d_msac_decode_bools:
   94|   217k|static inline unsigned dav1d_msac_decode_bools(MsacContext *const s, unsigned n) {
   95|   217k|    unsigned v = 0;
   96|   408k|    while (n--)
  ------------------
  |  Branch (96:12): [True: 191k, False: 217k]
  ------------------
   97|   191k|        v = (v << 1) | dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|   191k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
   98|   217k|    return v;
   99|   217k|}
decode.c:dav1d_msac_decode_uniform:
  101|  20.0k|static inline int dav1d_msac_decode_uniform(MsacContext *const s, const unsigned n) {
  102|  20.0k|    assert(n > 0);
  ------------------
  |  |  140|  20.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 20.0k]
  |  |  |  Branch (140:68): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  103|  20.0k|    const int l = ulog2(n) + 1;
  104|  20.0k|    assert(l > 1);
  ------------------
  |  |  140|  20.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 20.0k]
  |  |  |  Branch (140:68): [Folded, False: 20.0k]
  |  |  ------------------
  ------------------
  105|  20.0k|    const unsigned m = (1 << l) - n;
  106|  20.0k|    const unsigned v = dav1d_msac_decode_bools(s, l - 1);
  107|  20.0k|    return v < m ? v : (v << 1) - m + dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|  4.72k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (107:12): [True: 15.3k, False: 4.72k]
  ------------------
  108|  20.0k|}
msac.c:dav1d_msac_decode_bools:
   94|   104k|static inline unsigned dav1d_msac_decode_bools(MsacContext *const s, unsigned n) {
   95|   104k|    unsigned v = 0;
   96|   437k|    while (n--)
  ------------------
  |  Branch (96:12): [True: 333k, False: 104k]
  ------------------
   97|   333k|        v = (v << 1) | dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|   333k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
   98|   104k|    return v;
   99|   104k|}
recon_tmpl.c:dav1d_msac_decode_bools:
   94|  1.17M|static inline unsigned dav1d_msac_decode_bools(MsacContext *const s, unsigned n) {
   95|  1.17M|    unsigned v = 0;
   96|  4.19M|    while (n--)
  ------------------
  |  Branch (96:12): [True: 3.02M, False: 1.17M]
  ------------------
   97|  3.02M|        v = (v << 1) | dav1d_msac_decode_bool_equi(s);
  ------------------
  |  |   53|  3.02M|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
   98|  1.17M|    return v;
   99|  1.17M|}

dav1d_parse_obus:
 1169|  49.0k|ptrdiff_t dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
 1170|  49.0k|    GetBits gb;
 1171|  49.0k|    int res;
 1172|       |
 1173|  49.0k|    dav1d_init_get_bits(&gb, in->data, in->sz);
 1174|       |
 1175|       |    // obu header
 1176|  49.0k|    const int obu_forbidden_bit = dav1d_get_bit(&gb);
 1177|  49.0k|    if (c->strict_std_compliance && obu_forbidden_bit) goto error;
  ------------------
  |  Branch (1177:9): [True: 0, False: 49.0k]
  |  Branch (1177:37): [True: 0, False: 0]
  ------------------
 1178|  49.0k|    const enum Dav1dObuType type = dav1d_get_bits(&gb, 4);
 1179|  49.0k|    const int has_extension = dav1d_get_bit(&gb);
 1180|  49.0k|    const int has_length_field = dav1d_get_bit(&gb);
 1181|  49.0k|    dav1d_get_bit(&gb); // reserved
 1182|       |
 1183|  49.0k|    int temporal_id = 0, spatial_id = 0;
 1184|  49.0k|    if (has_extension) {
  ------------------
  |  Branch (1184:9): [True: 14.6k, False: 34.4k]
  ------------------
 1185|  14.6k|        temporal_id = dav1d_get_bits(&gb, 3);
 1186|  14.6k|        spatial_id = dav1d_get_bits(&gb, 2);
 1187|  14.6k|        dav1d_get_bits(&gb, 3); // reserved
 1188|  14.6k|    }
 1189|       |
 1190|  49.0k|    if (has_length_field) {
  ------------------
  |  Branch (1190:9): [True: 36.6k, False: 12.3k]
  ------------------
 1191|  36.6k|        const size_t len = dav1d_get_uleb128(&gb);
 1192|  36.6k|        if (len > (size_t)(gb.ptr_end - gb.ptr)) goto error;
  ------------------
  |  Branch (1192:13): [True: 173, False: 36.4k]
  ------------------
 1193|  36.4k|        gb.ptr_end = gb.ptr + len;
 1194|  36.4k|    }
 1195|  48.8k|    if (gb.error) goto error;
  ------------------
  |  Branch (1195:9): [True: 91, False: 48.7k]
  ------------------
 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|  48.7k|    assert(gb.bits_left == 0);
  ------------------
  |  |  140|  48.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 48.7k]
  |  |  |  Branch (140:68): [Folded, False: 48.7k]
  |  |  ------------------
  ------------------
 1201|       |
 1202|       |    // skip obu not belonging to the selected temporal/spatial layer
 1203|  48.7k|    if (type != DAV1D_OBU_SEQ_HDR && type != DAV1D_OBU_TD &&
  ------------------
  |  Branch (1203:9): [True: 32.4k, False: 16.2k]
  |  Branch (1203:38): [True: 28.5k, False: 3.90k]
  ------------------
 1204|  28.5k|        has_extension && c->operating_point_idc != 0)
  ------------------
  |  Branch (1204:9): [True: 12.1k, False: 16.4k]
  |  Branch (1204:26): [True: 1.01k, False: 11.1k]
  ------------------
 1205|  1.01k|    {
 1206|  1.01k|        const int in_temporal_layer = (c->operating_point_idc >> temporal_id) & 1;
 1207|  1.01k|        const int in_spatial_layer = (c->operating_point_idc >> (spatial_id + 8)) & 1;
 1208|  1.01k|        if (!in_temporal_layer || !in_spatial_layer)
  ------------------
  |  Branch (1208:13): [True: 294, False: 717]
  |  Branch (1208:35): [True: 329, False: 388]
  ------------------
 1209|    623|            return gb.ptr_end - gb.ptr_start;
 1210|  1.01k|    }
 1211|       |
 1212|  48.1k|    switch (type) {
 1213|  16.2k|    case DAV1D_OBU_SEQ_HDR: {
  ------------------
  |  Branch (1213:5): [True: 16.2k, False: 31.8k]
  ------------------
 1214|  16.2k|        Dav1dRef *ref = dav1d_ref_create_using_pool(c->seq_hdr_pool,
 1215|  16.2k|                                                    sizeof(Dav1dSequenceHeader));
 1216|  16.2k|        if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1216:13): [True: 0, False: 16.2k]
  ------------------
 1217|  16.2k|        Dav1dSequenceHeader *seq_hdr = ref->data;
 1218|  16.2k|        if ((res = parse_seq_hdr(seq_hdr, &gb, c->strict_std_compliance)) < 0) {
  ------------------
  |  Branch (1218:13): [True: 628, False: 15.6k]
  ------------------
 1219|    628|            dav1d_log(c, "Error parsing sequence header\n");
  ------------------
  |  |   39|    628|#define dav1d_log dav1d_log
  ------------------
 1220|    628|            dav1d_ref_dec(&ref);
 1221|    628|            goto error;
 1222|    628|        }
 1223|       |
 1224|  15.6k|        const int op_idx =
 1225|  15.6k|            c->operating_point < seq_hdr->num_operating_points ? c->operating_point : 0;
  ------------------
  |  Branch (1225:13): [True: 15.6k, False: 0]
  ------------------
 1226|  15.6k|        c->operating_point_idc = seq_hdr->operating_points[op_idx].idc;
 1227|  15.6k|        const unsigned spatial_mask = c->operating_point_idc >> 8;
 1228|  15.6k|        c->max_spatial_id = spatial_mask ? ulog2(spatial_mask) : 0;
  ------------------
  |  Branch (1228:29): [True: 782, False: 14.8k]
  ------------------
 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|  15.6k|        if (!c->seq_hdr) {
  ------------------
  |  Branch (1234:13): [True: 13.1k, False: 2.50k]
  ------------------
 1235|  13.1k|            c->frame_hdr = NULL;
 1236|  13.1k|            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|  13.1k|        } else if (memcmp(seq_hdr, c->seq_hdr, offsetof(Dav1dSequenceHeader, operating_parameter_info))) {
  ------------------
  |  Branch (1239:20): [True: 969, False: 1.53k]
  ------------------
 1240|    969|            c->frame_hdr = NULL;
 1241|    969|            c->mastering_display = NULL;
 1242|    969|            c->content_light = NULL;
 1243|    969|            dav1d_ref_dec(&c->mastering_display_ref);
 1244|    969|            dav1d_ref_dec(&c->content_light_ref);
 1245|  8.72k|            for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (1245:29): [True: 7.75k, False: 969]
  ------------------
 1246|  7.75k|                if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (1246:21): [True: 4.47k, False: 3.28k]
  ------------------
 1247|  4.47k|                    dav1d_thread_picture_unref(&c->refs[i].p);
 1248|  7.75k|                dav1d_ref_dec(&c->refs[i].segmap);
 1249|  7.75k|                dav1d_ref_dec(&c->refs[i].refmvs);
 1250|  7.75k|                dav1d_cdf_thread_unref(&c->cdf[i]);
 1251|  7.75k|            }
 1252|    969|            c->frame_flags |= PICTURE_FLAG_NEW_SEQUENCE;
 1253|       |        // If operating_parameter_info changed, signal it
 1254|  1.53k|        } else if (memcmp(seq_hdr->operating_parameter_info, c->seq_hdr->operating_parameter_info,
  ------------------
  |  Branch (1254:20): [True: 0, False: 1.53k]
  ------------------
 1255|  1.53k|                          sizeof(seq_hdr->operating_parameter_info)))
 1256|      0|        {
 1257|      0|            c->frame_flags |= PICTURE_FLAG_NEW_OP_PARAMS_INFO;
 1258|      0|        }
 1259|  15.6k|        dav1d_ref_dec(&c->seq_hdr_ref);
 1260|  15.6k|        c->seq_hdr_ref = ref;
 1261|  15.6k|        c->seq_hdr = seq_hdr;
 1262|  15.6k|        break;
 1263|  16.2k|    }
 1264|    664|    case DAV1D_OBU_REDUNDANT_FRAME_HDR:
  ------------------
  |  Branch (1264:5): [True: 664, False: 47.4k]
  ------------------
 1265|    664|        if (c->frame_hdr) break;
  ------------------
  |  Branch (1265:13): [True: 142, False: 522]
  ------------------
 1266|       |        // fall-through
 1267|  19.7k|    case DAV1D_OBU_FRAME:
  ------------------
  |  Branch (1267:5): [True: 19.1k, False: 28.9k]
  ------------------
 1268|  21.8k|    case DAV1D_OBU_FRAME_HDR:
  ------------------
  |  Branch (1268:5): [True: 2.16k, False: 45.9k]
  ------------------
 1269|  21.8k|        if (!c->seq_hdr) goto error;
  ------------------
  |  Branch (1269:13): [True: 35, False: 21.8k]
  ------------------
 1270|  21.8k|        if (!c->frame_hdr_ref) {
  ------------------
  |  Branch (1270:13): [True: 19.7k, False: 2.08k]
  ------------------
 1271|  19.7k|            c->frame_hdr_ref = dav1d_ref_create_using_pool(c->frame_hdr_pool,
 1272|  19.7k|                                                           sizeof(Dav1dFrameHeader));
 1273|  19.7k|            if (!c->frame_hdr_ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1273:17): [True: 0, False: 19.7k]
  ------------------
 1274|  19.7k|        }
 1275|       |#ifndef NDEBUG
 1276|       |        // ensure that the reference is writable
 1277|       |        assert(dav1d_ref_is_writable(c->frame_hdr_ref));
 1278|       |#endif
 1279|  21.8k|        c->frame_hdr = c->frame_hdr_ref->data;
 1280|  21.8k|        memset(c->frame_hdr, 0, sizeof(*c->frame_hdr));
 1281|  21.8k|        c->frame_hdr->temporal_id = temporal_id;
 1282|  21.8k|        c->frame_hdr->spatial_id = spatial_id;
 1283|  21.8k|        if ((res = parse_frame_hdr(c, &gb)) < 0) {
  ------------------
  |  Branch (1283:13): [True: 104, False: 21.7k]
  ------------------
 1284|    104|            c->frame_hdr = NULL;
 1285|    104|            goto error;
 1286|    104|        }
 1287|  21.7k|        for (int n = 0; n < c->n_tile_data; n++)
  ------------------
  |  Branch (1287:25): [True: 37, False: 21.7k]
  ------------------
 1288|     37|            dav1d_data_unref_internal(&c->tile[n].data);
 1289|  21.7k|        c->n_tile_data = 0;
 1290|  21.7k|        c->n_tiles = 0;
 1291|  21.7k|        if (type != DAV1D_OBU_FRAME) {
  ------------------
  |  Branch (1291:13): [True: 2.64k, False: 19.1k]
  ------------------
 1292|       |            // This is actually a frame header OBU so read the
 1293|       |            // trailing bit and check for overrun.
 1294|  2.64k|            if (check_trailing_bits(&gb, c->strict_std_compliance) < 0) {
  ------------------
  |  Branch (1294:17): [True: 57, False: 2.58k]
  ------------------
 1295|     57|                c->frame_hdr = NULL;
 1296|     57|                goto error;
 1297|     57|            }
 1298|  2.64k|        }
 1299|       |
 1300|  21.6k|        if (c->frame_size_limit && (int64_t)c->frame_hdr->width[1] *
  ------------------
  |  Branch (1300:13): [True: 21.6k, False: 0]
  |  Branch (1300:36): [True: 12, False: 21.6k]
  ------------------
 1301|  21.6k|            c->frame_hdr->height > c->frame_size_limit)
 1302|     12|        {
 1303|     12|            dav1d_log(c, "Frame size %dx%d exceeds limit %u\n", c->frame_hdr->width[1],
  ------------------
  |  |   39|     12|#define dav1d_log dav1d_log
  ------------------
 1304|     12|                      c->frame_hdr->height, c->frame_size_limit);
 1305|     12|            c->frame_hdr = NULL;
 1306|     12|            return DAV1D_ERR(ERANGE);
  ------------------
  |  |   58|     12|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 1307|     12|        }
 1308|       |
 1309|  21.6k|        if (type != DAV1D_OBU_FRAME)
  ------------------
  |  Branch (1309:13): [True: 2.58k, False: 19.0k]
  ------------------
 1310|  2.58k|            break;
 1311|       |        // OBU_FRAMEs shouldn't be signaled with show_existing_frame
 1312|  19.0k|        if (c->frame_hdr->show_existing_frame) {
  ------------------
  |  Branch (1312:13): [True: 3, False: 19.0k]
  ------------------
 1313|      3|            c->frame_hdr = NULL;
 1314|      3|            goto error;
 1315|      3|        }
 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|  19.0k|        dav1d_bytealign_get_bits(&gb);
 1321|       |        // fall-through
 1322|  19.2k|    case DAV1D_OBU_TILE_GRP: {
  ------------------
  |  Branch (1322:5): [True: 136, False: 48.0k]
  ------------------
 1323|  19.2k|        if (!c->frame_hdr) goto error;
  ------------------
  |  Branch (1323:13): [True: 18, False: 19.2k]
  ------------------
 1324|  19.2k|        if (c->n_tile_data_alloc < c->n_tile_data + 1) {
  ------------------
  |  Branch (1324:13): [True: 12.9k, False: 6.28k]
  ------------------
 1325|  12.9k|            if ((c->n_tile_data + 1) > INT_MAX / (int)sizeof(*c->tile)) goto error;
  ------------------
  |  Branch (1325:17): [True: 0, False: 12.9k]
  ------------------
 1326|  12.9k|            struct Dav1dTileGroup *tile = dav1d_realloc(ALLOC_TILE, c->tile,
  ------------------
  |  |  133|  12.9k|#define dav1d_realloc(type, ptr, sz) realloc(ptr, sz)
  ------------------
 1327|  12.9k|                                                        (c->n_tile_data + 1) * sizeof(*c->tile));
 1328|  12.9k|            if (!tile) goto error;
  ------------------
  |  Branch (1328:17): [True: 0, False: 12.9k]
  ------------------
 1329|  12.9k|            c->tile = tile;
 1330|  12.9k|            memset(c->tile + c->n_tile_data, 0, sizeof(*c->tile));
 1331|  12.9k|            c->n_tile_data_alloc = c->n_tile_data + 1;
 1332|  12.9k|        }
 1333|  19.2k|        parse_tile_hdr(c, &gb);
 1334|       |        // Align to the next byte boundary and check for overrun.
 1335|  19.2k|        dav1d_bytealign_get_bits(&gb);
 1336|  19.2k|        if (gb.error) goto error;
  ------------------
  |  Branch (1336:13): [True: 89, False: 19.1k]
  ------------------
 1337|       |
 1338|  19.1k|        dav1d_data_ref(&c->tile[c->n_tile_data].data, in);
 1339|  19.1k|        c->tile[c->n_tile_data].data.data = gb.ptr;
 1340|  19.1k|        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|  19.1k|        if (c->tile[c->n_tile_data].start > c->tile[c->n_tile_data].end ||
  ------------------
  |  Branch (1342:13): [True: 4, False: 19.1k]
  ------------------
 1343|  19.1k|            c->tile[c->n_tile_data].start != c->n_tiles)
  ------------------
  |  Branch (1343:13): [True: 6, False: 19.1k]
  ------------------
 1344|     10|        {
 1345|     23|            for (int i = 0; i <= c->n_tile_data; i++)
  ------------------
  |  Branch (1345:29): [True: 13, False: 10]
  ------------------
 1346|     13|                dav1d_data_unref_internal(&c->tile[i].data);
 1347|     10|            c->n_tile_data = 0;
 1348|     10|            c->n_tiles = 0;
 1349|     10|            goto error;
 1350|     10|        }
 1351|  19.1k|        c->n_tiles += 1 + c->tile[c->n_tile_data].end -
 1352|  19.1k|                          c->tile[c->n_tile_data].start;
 1353|  19.1k|        c->n_tile_data++;
 1354|  19.1k|        break;
 1355|  19.1k|    }
 1356|    577|    case DAV1D_OBU_METADATA: {
  ------------------
  |  Branch (1356:5): [True: 577, False: 47.5k]
  ------------------
 1357|    577|#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|    577|        const enum ObuMetaType meta_type = dav1d_get_uleb128(&gb);
 1363|    577|        if (gb.error) goto error;
  ------------------
  |  Branch (1363:13): [True: 7, False: 570]
  ------------------
 1364|       |
 1365|    570|        switch (meta_type) {
 1366|     69|        case OBU_META_HDR_CLL: {
  ------------------
  |  Branch (1366:9): [True: 69, False: 501]
  ------------------
 1367|     69|            Dav1dRef *ref = dav1d_ref_create(ALLOC_OBU_META,
  ------------------
  |  |   49|     69|#define dav1d_ref_create(type, size) dav1d_ref_create(size)
  ------------------
 1368|     69|                                             sizeof(Dav1dContentLightLevel));
 1369|     69|            if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1369:17): [True: 0, False: 69]
  ------------------
 1370|     69|            Dav1dContentLightLevel *const content_light = ref->data;
 1371|       |
 1372|     69|            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|     69|            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|     69|            if (check_trailing_bits(&gb, c->strict_std_compliance) < 0) {
  ------------------
  |  Branch (1385:17): [True: 1, False: 68]
  ------------------
 1386|      1|                dav1d_ref_dec(&ref);
 1387|      1|                goto error;
 1388|      1|            }
 1389|       |
 1390|     68|            dav1d_ref_dec(&c->content_light_ref);
 1391|     68|            c->content_light = content_light;
 1392|     68|            c->content_light_ref = ref;
 1393|     68|            break;
 1394|     69|        }
 1395|     65|        case OBU_META_HDR_MDCV: {
  ------------------
  |  Branch (1395:9): [True: 65, False: 505]
  ------------------
 1396|     65|            Dav1dRef *ref = dav1d_ref_create(ALLOC_OBU_META,
  ------------------
  |  |   49|     65|#define dav1d_ref_create(type, size) dav1d_ref_create(size)
  ------------------
 1397|     65|                                             sizeof(Dav1dMasteringDisplay));
 1398|     65|            if (!ref) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (1398:17): [True: 0, False: 65]
  ------------------
 1399|     65|            Dav1dMasteringDisplay *const mastering_display = ref->data;
 1400|       |
 1401|    260|            for (int i = 0; i < 3; i++) {
  ------------------
  |  Branch (1401:29): [True: 195, False: 65]
  ------------------
 1402|    195|                mastering_display->primaries[i][0] = dav1d_get_bits(&gb, 16);
 1403|    195|                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|    195|            }
 1411|     65|            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|     65|            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|     65|            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|     65|            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|     65|            if (check_trailing_bits(&gb, c->strict_std_compliance) < 0) {
  ------------------
  |  Branch (1435:17): [True: 1, False: 64]
  ------------------
 1436|      1|                dav1d_ref_dec(&ref);
 1437|      1|                goto error;
 1438|      1|            }
 1439|       |
 1440|     64|            dav1d_ref_dec(&c->mastering_display_ref);
 1441|     64|            c->mastering_display = mastering_display;
 1442|     64|            c->mastering_display_ref = ref;
 1443|     64|            break;
 1444|     65|        }
 1445|    119|        case OBU_META_ITUT_T35: {
  ------------------
  |  Branch (1445:9): [True: 119, False: 451]
  ------------------
 1446|    119|            ptrdiff_t payload_size = gb.ptr_end - gb.ptr;
 1447|       |            // Don't take into account all the trailing bits for payload_size
 1448|    411|            while (payload_size > 0 && !gb.ptr[payload_size - 1])
  ------------------
  |  Branch (1448:20): [True: 389, False: 22]
  |  Branch (1448:40): [True: 292, False: 97]
  ------------------
 1449|    292|                payload_size--; // trailing_zero_bit x 8
 1450|    119|            payload_size--; // trailing_one_bit + trailing_zero_bit x 7
 1451|       |
 1452|    119|            int country_code_extension_byte = 0;
 1453|    119|            const int country_code = dav1d_get_bits(&gb, 8);
 1454|    119|            payload_size--;
 1455|    119|            if (country_code == 0xFF) {
  ------------------
  |  Branch (1455:17): [True: 3, False: 116]
  ------------------
 1456|      3|                country_code_extension_byte = dav1d_get_bits(&gb, 8);
 1457|      3|                payload_size--;
 1458|      3|            }
 1459|       |
 1460|    119|            if (payload_size <= 0 || gb.ptr[payload_size] != 0x80) {
  ------------------
  |  Branch (1460:17): [True: 26, False: 93]
  |  Branch (1460:38): [True: 34, False: 59]
  ------------------
 1461|     60|                dav1d_log(c, "Malformed ITU-T T.35 metadata message format\n");
  ------------------
  |  |   39|     60|#define dav1d_log dav1d_log
  ------------------
 1462|     60|                break;
 1463|     60|            }
 1464|       |
 1465|     59|            if ((c->n_itut_t35 + 1) > INT_MAX / (int)sizeof(*c->itut_t35)) goto error;
  ------------------
  |  Branch (1465:17): [True: 0, False: 59]
  ------------------
 1466|     59|            struct Dav1dITUTT35 *itut_t35 = dav1d_realloc(ALLOC_OBU_META, c->itut_t35,
  ------------------
  |  |  133|     59|#define dav1d_realloc(type, ptr, sz) realloc(ptr, sz)
  ------------------
 1467|     59|                                                          (c->n_itut_t35 + 1) * sizeof(*c->itut_t35));
 1468|     59|            if (!itut_t35) goto error;
  ------------------
  |  Branch (1468:17): [True: 0, False: 59]
  ------------------
 1469|     59|            c->itut_t35 = itut_t35;
 1470|     59|            memset(c->itut_t35 + c->n_itut_t35, 0, sizeof(*c->itut_t35));
 1471|       |
 1472|     59|            struct itut_t35_ctx_context *itut_t35_ctx;
 1473|     59|            if (!c->n_itut_t35) {
  ------------------
  |  Branch (1473:17): [True: 59, False: 0]
  ------------------
 1474|     59|                assert(!c->itut_t35_ref);
  ------------------
  |  |  140|     59|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 59]
  |  |  |  Branch (140:68): [Folded, False: 59]
  |  |  ------------------
  ------------------
 1475|     59|                itut_t35_ctx = dav1d_malloc(ALLOC_OBU_META, sizeof(struct itut_t35_ctx_context));
  ------------------
  |  |  132|     59|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 1476|     59|                if (!itut_t35_ctx) goto error;
  ------------------
  |  Branch (1476:21): [True: 0, False: 59]
  ------------------
 1477|     59|                c->itut_t35_ref = dav1d_ref_init(&itut_t35_ctx->ref, c->itut_t35,
 1478|     59|                                                 dav1d_picture_free_itut_t35, itut_t35_ctx, 0);
 1479|     59|            } 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|     59|            itut_t35_ctx->itut_t35 = c->itut_t35;
 1485|     59|            itut_t35_ctx->n_itut_t35 = c->n_itut_t35 + 1;
 1486|       |
 1487|     59|            Dav1dITUTT35 *const itut_t35_metadata = &c->itut_t35[c->n_itut_t35];
 1488|     59|            itut_t35_metadata->payload = dav1d_malloc(ALLOC_OBU_META, payload_size);
  ------------------
  |  |  132|     59|#define dav1d_malloc(type, sz) malloc(sz)
  ------------------
 1489|     59|            if (!itut_t35_metadata->payload) goto error;
  ------------------
  |  Branch (1489:17): [True: 0, False: 59]
  ------------------
 1490|       |
 1491|     59|            itut_t35_metadata->country_code = country_code;
 1492|     59|            itut_t35_metadata->country_code_extension_byte = country_code_extension_byte;
 1493|     59|            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|     59|            assert(gb.bits_left == 0);
  ------------------
  |  |  140|     59|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 59]
  |  |  |  Branch (140:68): [Folded, False: 59]
  |  |  ------------------
  ------------------
 1498|     59|            memcpy(itut_t35_metadata->payload, gb.ptr, payload_size);
 1499|       |
 1500|     59|            c->n_itut_t35++;
 1501|     59|            break;
 1502|     59|        }
 1503|     26|        case OBU_META_SCALABILITY:
  ------------------
  |  Branch (1503:9): [True: 26, False: 544]
  ------------------
 1504|     48|        case OBU_META_TIMECODE:
  ------------------
  |  Branch (1504:9): [True: 22, False: 548]
  ------------------
 1505|       |            // ignore metadata OBUs we don't care about
 1506|     48|            break;
 1507|    269|        default:
  ------------------
  |  Branch (1507:9): [True: 269, False: 301]
  ------------------
 1508|       |            // print a warning but don't fail for unknown types
 1509|    269|            if (meta_type > 31) // Types 6 to 31 are "Unregistered user private", so ignore them.
  ------------------
  |  Branch (1509:17): [True: 169, False: 100]
  ------------------
 1510|    169|                dav1d_log(c, "Unknown Metadata OBU type %d\n", meta_type);
  ------------------
  |  |   39|    169|#define dav1d_log dav1d_log
  ------------------
 1511|    269|            break;
 1512|    570|        }
 1513|       |
 1514|    568|        break;
 1515|    570|    }
 1516|  3.90k|    case DAV1D_OBU_TD:
  ------------------
  |  Branch (1516:5): [True: 3.90k, False: 44.2k]
  ------------------
 1517|  3.90k|        c->frame_flags |= PICTURE_FLAG_NEW_TEMPORAL_UNIT;
 1518|  3.90k|        break;
 1519|    214|    case DAV1D_OBU_PADDING:
  ------------------
  |  Branch (1519:5): [True: 214, False: 47.9k]
  ------------------
 1520|       |        // ignore OBUs we don't care about
 1521|    214|        break;
 1522|  5.00k|    default:
  ------------------
  |  Branch (1522:5): [True: 5.00k, False: 43.1k]
  ------------------
 1523|       |        // print a warning but don't fail for unknown types
 1524|  5.00k|        dav1d_log(c, "Unknown OBU type %d of size %td\n", type, gb.ptr_end - gb.ptr);
  ------------------
  |  |   39|  5.00k|#define dav1d_log dav1d_log
  ------------------
 1525|  5.00k|        break;
 1526|  48.1k|    }
 1527|       |
 1528|  47.1k|    if (c->seq_hdr && c->frame_hdr) {
  ------------------
  |  Branch (1528:9): [True: 43.1k, False: 4.00k]
  |  Branch (1528:23): [True: 22.4k, False: 20.7k]
  ------------------
 1529|  22.4k|        if (c->frame_hdr->show_existing_frame) {
  ------------------
  |  Branch (1529:13): [True: 135, False: 22.2k]
  ------------------
 1530|    135|            if (!c->refs[c->frame_hdr->existing_frame_idx].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (1530:17): [True: 1, False: 134]
  ------------------
 1531|    134|            switch (c->refs[c->frame_hdr->existing_frame_idx].p.p.frame_hdr->frame_type) {
 1532|     10|            case DAV1D_FRAME_TYPE_INTER:
  ------------------
  |  Branch (1532:13): [True: 10, False: 124]
  ------------------
 1533|     17|            case DAV1D_FRAME_TYPE_SWITCH:
  ------------------
  |  Branch (1533:13): [True: 7, False: 127]
  ------------------
 1534|     17|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_REFERENCE)
  ------------------
  |  Branch (1534:21): [True: 0, False: 17]
  ------------------
 1535|      0|                    goto skip;
 1536|     17|                break;
 1537|     17|            case DAV1D_FRAME_TYPE_INTRA:
  ------------------
  |  Branch (1537:13): [True: 8, False: 126]
  ------------------
 1538|      8|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_INTRA)
  ------------------
  |  Branch (1538:21): [True: 0, False: 8]
  ------------------
 1539|      0|                    goto skip;
 1540|       |                // fall-through
 1541|    117|            default:
  ------------------
  |  Branch (1541:13): [True: 109, False: 25]
  ------------------
 1542|    117|                break;
 1543|    134|            }
 1544|    134|            if (!c->refs[c->frame_hdr->existing_frame_idx].p.p.data[0]) goto error;
  ------------------
  |  Branch (1544:17): [True: 0, False: 134]
  ------------------
 1545|    134|            if (c->strict_std_compliance &&
  ------------------
  |  Branch (1545:17): [True: 0, False: 134]
  ------------------
 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|    134|            if (c->n_fc == 1) {
  ------------------
  |  Branch (1550:17): [True: 134, False: 0]
  ------------------
 1551|    134|                dav1d_thread_picture_ref(&c->out,
 1552|    134|                                         &c->refs[c->frame_hdr->existing_frame_idx].p);
 1553|    134|                dav1d_picture_copy_props(&c->out.p,
 1554|    134|                                         c->content_light, c->content_light_ref,
 1555|    134|                                         c->mastering_display, c->mastering_display_ref,
 1556|    134|                                         c->itut_t35, c->itut_t35_ref, c->n_itut_t35,
 1557|    134|                                         &in->m);
 1558|       |                // Must be removed from the context after being attached to the frame
 1559|    134|                dav1d_ref_dec(&c->itut_t35_ref);
 1560|    134|                c->itut_t35 = NULL;
 1561|    134|                c->n_itut_t35 = 0;
 1562|    134|                c->event_flags |= dav1d_picture_get_event_flags(&c->refs[c->frame_hdr->existing_frame_idx].p);
 1563|    134|            } 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|    134|            if (c->refs[c->frame_hdr->existing_frame_idx].p.p.frame_hdr->frame_type == DAV1D_FRAME_TYPE_KEY) {
  ------------------
  |  Branch (1619:17): [True: 109, False: 25]
  ------------------
 1620|    109|                const int r = c->frame_hdr->existing_frame_idx;
 1621|    109|                c->refs[r].p.showable = 0;
 1622|    981|                for (int i = 0; i < 8; i++) {
  ------------------
  |  Branch (1622:33): [True: 872, False: 109]
  ------------------
 1623|    872|                    if (i == r) continue;
  ------------------
  |  Branch (1623:25): [True: 109, False: 763]
  ------------------
 1624|       |
 1625|    763|                    if (c->refs[i].p.p.frame_hdr)
  ------------------
  |  Branch (1625:25): [True: 715, False: 48]
  ------------------
 1626|    715|                        dav1d_thread_picture_unref(&c->refs[i].p);
 1627|    763|                    dav1d_thread_picture_ref(&c->refs[i].p, &c->refs[r].p);
 1628|       |
 1629|    763|                    dav1d_cdf_thread_unref(&c->cdf[i]);
 1630|    763|                    dav1d_cdf_thread_ref(&c->cdf[i], &c->cdf[r]);
 1631|       |
 1632|    763|                    dav1d_ref_dec(&c->refs[i].segmap);
 1633|    763|                    c->refs[i].segmap = c->refs[r].segmap;
 1634|    763|                    if (c->refs[r].segmap)
  ------------------
  |  Branch (1634:25): [True: 49, False: 714]
  ------------------
 1635|     49|                        dav1d_ref_inc(c->refs[r].segmap);
 1636|    763|                    dav1d_ref_dec(&c->refs[i].refmvs);
 1637|    763|                }
 1638|    109|            }
 1639|    134|            c->frame_hdr = NULL;
 1640|  22.2k|        } else if (c->n_tiles == c->frame_hdr->tiling.cols * c->frame_hdr->tiling.rows) {
  ------------------
  |  Branch (1640:20): [True: 19.0k, False: 3.22k]
  ------------------
 1641|  19.0k|            switch (c->frame_hdr->frame_type) {
 1642|  3.32k|            case DAV1D_FRAME_TYPE_INTER:
  ------------------
  |  Branch (1642:13): [True: 3.32k, False: 15.7k]
  ------------------
 1643|  3.37k|            case DAV1D_FRAME_TYPE_SWITCH:
  ------------------
  |  Branch (1643:13): [True: 48, False: 18.9k]
  ------------------
 1644|  3.37k|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_REFERENCE ||
  ------------------
  |  Branch (1644:21): [True: 0, False: 3.37k]
  ------------------
 1645|  3.37k|                    (c->decode_frame_type == DAV1D_DECODEFRAMETYPE_REFERENCE &&
  ------------------
  |  Branch (1645:22): [True: 0, False: 3.37k]
  ------------------
 1646|      0|                     !c->frame_hdr->refresh_frame_flags))
  ------------------
  |  Branch (1646:22): [True: 0, False: 0]
  ------------------
 1647|      0|                    goto skip;
 1648|  3.37k|                break;
 1649|  3.37k|            case DAV1D_FRAME_TYPE_INTRA:
  ------------------
  |  Branch (1649:13): [True: 196, False: 18.8k]
  ------------------
 1650|    196|                if (c->decode_frame_type > DAV1D_DECODEFRAMETYPE_INTRA ||
  ------------------
  |  Branch (1650:21): [True: 0, False: 196]
  ------------------
 1651|    196|                    (c->decode_frame_type == DAV1D_DECODEFRAMETYPE_REFERENCE &&
  ------------------
  |  Branch (1651:22): [True: 0, False: 196]
  ------------------
 1652|      0|                     !c->frame_hdr->refresh_frame_flags))
  ------------------
  |  Branch (1652:22): [True: 0, False: 0]
  ------------------
 1653|      0|                    goto skip;
 1654|       |                // fall-through
 1655|  15.6k|            default:
  ------------------
  |  Branch (1655:13): [True: 15.4k, False: 3.56k]
  ------------------
 1656|  15.6k|                break;
 1657|  19.0k|            }
 1658|  19.0k|            if (!c->n_tile_data)
  ------------------
  |  Branch (1658:17): [True: 0, False: 19.0k]
  ------------------
 1659|      0|                goto error;
 1660|  19.0k|            if ((res = dav1d_submit_frame(c)) < 0)
  ------------------
  |  Branch (1660:17): [True: 4.45k, False: 14.5k]
  ------------------
 1661|  4.45k|                return res;
 1662|  14.5k|            assert(!c->n_tile_data);
  ------------------
  |  |  140|  14.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 14.5k]
  |  |  |  Branch (140:68): [Folded, False: 14.5k]
  |  |  ------------------
  ------------------
 1663|  14.5k|            c->frame_hdr = NULL;
 1664|  14.5k|            c->n_tiles = 0;
 1665|  14.5k|        }
 1666|  22.4k|    }
 1667|       |
 1668|  42.7k|    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.21k|error:
 1691|  1.21k|    dav1d_data_props_copy(&c->cached_error_props, &in->m);
 1692|  1.21k|    dav1d_log(c, gb.error ? "Overrun in OBU bit buffer\n" :
  ------------------
  |  |   39|  1.21k|#define dav1d_log dav1d_log
  ------------------
  |  Branch (1692:18): [True: 688, False: 530]
  ------------------
 1693|  1.21k|                            "Error parsing OBU data\n");
 1694|  1.21k|    return DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|  1.21k|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 1695|  47.1k|}
obu.c:parse_seq_hdr:
   75|  16.2k|{
   76|  16.2k|#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|  16.2k|    memset(hdr, 0, sizeof(*hdr));
   83|  16.2k|    hdr->profile = dav1d_get_bits(gb, 3);
   84|  16.2k|    if (hdr->profile > 2) goto error;
  ------------------
  |  Branch (84:9): [True: 19, False: 16.2k]
  ------------------
   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|  16.2k|    hdr->still_picture = dav1d_get_bit(gb);
   91|  16.2k|    hdr->reduced_still_picture_header = dav1d_get_bit(gb);
   92|  16.2k|    if (hdr->reduced_still_picture_header && !hdr->still_picture) goto error;
  ------------------
  |  Branch (92:9): [True: 11.1k, False: 5.16k]
  |  Branch (92:46): [True: 8, False: 11.0k]
  ------------------
   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|  16.2k|    if (hdr->reduced_still_picture_header) {
  ------------------
  |  Branch (98:9): [True: 11.0k, False: 5.16k]
  ------------------
   99|  11.0k|        hdr->num_operating_points = 1;
  100|  11.0k|        hdr->operating_points[0].major_level = dav1d_get_bits(gb, 3);
  101|  11.0k|        hdr->operating_points[0].minor_level = dav1d_get_bits(gb, 2);
  102|  11.0k|        hdr->operating_points[0].initial_display_delay = 10;
  103|  11.0k|    } else {
  104|  5.16k|        hdr->timing_info_present = dav1d_get_bit(gb);
  105|  5.16k|        if (hdr->timing_info_present) {
  ------------------
  |  Branch (105:13): [True: 664, False: 4.50k]
  ------------------
  106|    664|            hdr->num_units_in_tick = dav1d_get_bits(gb, 32);
  107|    664|            hdr->time_scale = dav1d_get_bits(gb, 32);
  108|    664|            if (strict_std_compliance && (!hdr->num_units_in_tick || !hdr->time_scale))
  ------------------
  |  Branch (108:17): [True: 0, False: 664]
  |  Branch (108:43): [True: 0, False: 0]
  |  Branch (108:70): [True: 0, False: 0]
  ------------------
  109|      0|                goto error;
  110|    664|            hdr->equal_picture_interval = dav1d_get_bit(gb);
  111|    664|            if (hdr->equal_picture_interval) {
  ------------------
  |  Branch (111:17): [True: 278, False: 386]
  ------------------
  112|    278|                const unsigned num_ticks_per_picture = dav1d_get_vlc(gb);
  113|    278|                if (num_ticks_per_picture == UINT32_MAX)
  ------------------
  |  Branch (113:21): [True: 8, False: 270]
  ------------------
  114|      8|                    goto error;
  115|    270|                hdr->num_ticks_per_picture = num_ticks_per_picture + 1;
  116|    270|            }
  117|       |
  118|    656|            hdr->decoder_model_info_present = dav1d_get_bit(gb);
  119|    656|            if (hdr->decoder_model_info_present) {
  ------------------
  |  Branch (119:17): [True: 435, False: 221]
  ------------------
  120|    435|                hdr->encoder_decoder_buffer_delay_length = dav1d_get_bits(gb, 5) + 1;
  121|    435|                hdr->num_units_in_decoding_tick = dav1d_get_bits(gb, 32);
  122|    435|                if (strict_std_compliance && !hdr->num_units_in_decoding_tick)
  ------------------
  |  Branch (122:21): [True: 0, False: 435]
  |  Branch (122:46): [True: 0, False: 0]
  ------------------
  123|      0|                    goto error;
  124|    435|                hdr->buffer_removal_delay_length = dav1d_get_bits(gb, 5) + 1;
  125|    435|                hdr->frame_presentation_delay_length = dav1d_get_bits(gb, 5) + 1;
  126|    435|            }
  127|    656|        }
  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.15k|        hdr->display_model_info_present = dav1d_get_bit(gb);
  134|  5.15k|        hdr->num_operating_points = dav1d_get_bits(gb, 5) + 1;
  135|  16.6k|        for (int i = 0; i < hdr->num_operating_points; i++) {
  ------------------
  |  Branch (135:25): [True: 11.7k, False: 4.95k]
  ------------------
  136|  11.7k|            struct Dav1dSequenceHeaderOperatingPoint *const op =
  137|  11.7k|                &hdr->operating_points[i];
  138|  11.7k|            op->idc = dav1d_get_bits(gb, 12);
  139|  11.7k|            if (op->idc && (!(op->idc & 0xff) || !(op->idc & 0xf00)))
  ------------------
  |  Branch (139:17): [True: 6.33k, False: 5.40k]
  |  Branch (139:29): [True: 42, False: 6.28k]
  |  Branch (139:50): [True: 163, False: 6.12k]
  ------------------
  140|    205|                goto error;
  141|  11.5k|            op->major_level = 2 + dav1d_get_bits(gb, 3);
  142|  11.5k|            op->minor_level = dav1d_get_bits(gb, 2);
  143|  11.5k|            if (op->major_level > 3)
  ------------------
  |  Branch (143:17): [True: 3.91k, False: 7.61k]
  ------------------
  144|  3.91k|                op->tier = dav1d_get_bit(gb);
  145|  11.5k|            if (hdr->decoder_model_info_present) {
  ------------------
  |  Branch (145:17): [True: 2.58k, False: 8.94k]
  ------------------
  146|  2.58k|                op->decoder_model_param_present = dav1d_get_bit(gb);
  147|  2.58k|                if (op->decoder_model_param_present) {
  ------------------
  |  Branch (147:21): [True: 946, False: 1.63k]
  ------------------
  148|    946|                    struct Dav1dSequenceHeaderOperatingParameterInfo *const opi =
  149|    946|                        &hdr->operating_parameter_info[i];
  150|    946|                    opi->decoder_buffer_delay =
  151|    946|                        dav1d_get_bits(gb, hdr->encoder_decoder_buffer_delay_length);
  152|    946|                    opi->encoder_buffer_delay =
  153|    946|                        dav1d_get_bits(gb, hdr->encoder_decoder_buffer_delay_length);
  154|    946|                    opi->low_delay_mode = dav1d_get_bit(gb);
  155|    946|                }
  156|  2.58k|            }
  157|  11.5k|            if (hdr->display_model_info_present)
  ------------------
  |  Branch (157:17): [True: 4.21k, False: 7.30k]
  ------------------
  158|  4.21k|                op->display_model_param_present = dav1d_get_bit(gb);
  159|  11.5k|            op->initial_display_delay =
  160|  11.5k|                op->display_model_param_present ? dav1d_get_bits(gb, 4) + 1 : 10;
  ------------------
  |  Branch (160:17): [True: 1.56k, False: 9.96k]
  ------------------
  161|  11.5k|        }
  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.15k|    }
  167|       |
  168|  16.0k|    hdr->width_n_bits = dav1d_get_bits(gb, 4) + 1;
  169|  16.0k|    hdr->height_n_bits = dav1d_get_bits(gb, 4) + 1;
  170|  16.0k|    hdr->max_width = dav1d_get_bits(gb, hdr->width_n_bits) + 1;
  171|  16.0k|    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|  16.0k|    if (!hdr->reduced_still_picture_header) {
  ------------------
  |  Branch (176:9): [True: 4.95k, False: 11.0k]
  ------------------
  177|  4.95k|        hdr->frame_id_numbers_present = dav1d_get_bit(gb);
  178|  4.95k|        if (hdr->frame_id_numbers_present) {
  ------------------
  |  Branch (178:13): [True: 474, False: 4.48k]
  ------------------
  179|    474|            hdr->delta_frame_id_n_bits = dav1d_get_bits(gb, 4) + 2;
  180|    474|            hdr->frame_id_n_bits = dav1d_get_bits(gb, 3) + hdr->delta_frame_id_n_bits + 1;
  181|    474|        }
  182|  4.95k|    }
  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|  16.0k|    hdr->sb128 = dav1d_get_bit(gb);
  189|  16.0k|    hdr->filter_intra = dav1d_get_bit(gb);
  190|  16.0k|    hdr->intra_edge_filter = dav1d_get_bit(gb);
  191|  16.0k|    if (hdr->reduced_still_picture_header) {
  ------------------
  |  Branch (191:9): [True: 11.0k, False: 4.95k]
  ------------------
  192|  11.0k|        hdr->screen_content_tools = DAV1D_ADAPTIVE;
  193|  11.0k|        hdr->force_integer_mv = DAV1D_ADAPTIVE;
  194|  11.0k|    } else {
  195|  4.95k|        hdr->inter_intra = dav1d_get_bit(gb);
  196|  4.95k|        hdr->masked_compound = dav1d_get_bit(gb);
  197|  4.95k|        hdr->warped_motion = dav1d_get_bit(gb);
  198|  4.95k|        hdr->dual_filter = dav1d_get_bit(gb);
  199|  4.95k|        hdr->order_hint = dav1d_get_bit(gb);
  200|  4.95k|        if (hdr->order_hint) {
  ------------------
  |  Branch (200:13): [True: 3.12k, False: 1.82k]
  ------------------
  201|  3.12k|            hdr->jnt_comp = dav1d_get_bit(gb);
  202|  3.12k|            hdr->ref_frame_mvs = dav1d_get_bit(gb);
  203|  3.12k|        }
  204|  4.95k|        hdr->screen_content_tools = dav1d_get_bit(gb) ? DAV1D_ADAPTIVE : dav1d_get_bit(gb);
  ------------------
  |  Branch (204:37): [True: 3.18k, False: 1.76k]
  ------------------
  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|  4.95k|        hdr->force_integer_mv = hdr->screen_content_tools ?
  ------------------
  |  Branch (209:33): [True: 3.97k, False: 983]
  ------------------
  210|  3.97k|                                dav1d_get_bit(gb) ? DAV1D_ADAPTIVE : dav1d_get_bit(gb) : 2;
  ------------------
  |  Branch (210:33): [True: 3.37k, False: 597]
  ------------------
  211|  4.95k|        if (hdr->order_hint)
  ------------------
  |  Branch (211:13): [True: 3.12k, False: 1.82k]
  ------------------
  212|  3.12k|            hdr->order_hint_n_bits = dav1d_get_bits(gb, 3) + 1;
  213|  4.95k|    }
  214|  16.0k|    hdr->super_res = dav1d_get_bit(gb);
  215|  16.0k|    hdr->cdef = dav1d_get_bit(gb);
  216|  16.0k|    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|  16.0k|    hdr->hbd = dav1d_get_bit(gb);
  223|  16.0k|    if (hdr->profile == 2 && hdr->hbd)
  ------------------
  |  Branch (223:9): [True: 5.23k, False: 10.8k]
  |  Branch (223:30): [True: 4.20k, False: 1.02k]
  ------------------
  224|  4.20k|        hdr->hbd += dav1d_get_bit(gb);
  225|  16.0k|    if (hdr->profile != 1)
  ------------------
  |  Branch (225:9): [True: 11.5k, False: 4.48k]
  ------------------
  226|  11.5k|        hdr->monochrome = dav1d_get_bit(gb);
  227|  16.0k|    hdr->color_description_present = dav1d_get_bit(gb);
  228|  16.0k|    if (hdr->color_description_present) {
  ------------------
  |  Branch (228:9): [True: 4.51k, False: 11.5k]
  ------------------
  229|  4.51k|        hdr->pri = dav1d_get_bits(gb, 8);
  230|  4.51k|        hdr->trc = dav1d_get_bits(gb, 8);
  231|  4.51k|        hdr->mtrx = dav1d_get_bits(gb, 8);
  232|  11.5k|    } else {
  233|  11.5k|        hdr->pri = DAV1D_COLOR_PRI_UNKNOWN;
  234|  11.5k|        hdr->trc = DAV1D_TRC_UNKNOWN;
  235|  11.5k|        hdr->mtrx = DAV1D_MC_UNKNOWN;
  236|  11.5k|    }
  237|  16.0k|    if (hdr->monochrome) {
  ------------------
  |  Branch (237:9): [True: 4.07k, False: 11.9k]
  ------------------
  238|  4.07k|        hdr->color_range = dav1d_get_bit(gb);
  239|  4.07k|        hdr->layout = DAV1D_PIXEL_LAYOUT_I400;
  240|  4.07k|        hdr->ss_hor = hdr->ss_ver = 1;
  241|  4.07k|        hdr->chr = DAV1D_CHR_UNKNOWN;
  242|  11.9k|    } else if (hdr->pri == DAV1D_COLOR_PRI_BT709 &&
  ------------------
  |  Branch (242:16): [True: 408, False: 11.5k]
  ------------------
  243|    408|               hdr->trc == DAV1D_TRC_SRGB &&
  ------------------
  |  Branch (243:16): [True: 230, False: 178]
  ------------------
  244|    230|               hdr->mtrx == DAV1D_MC_IDENTITY)
  ------------------
  |  Branch (244:16): [True: 8, False: 222]
  ------------------
  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: 3, False: 5]
  |  Branch (248:36): [True: 2, False: 1]
  |  Branch (248:57): [True: 0, False: 2]
  ------------------
  249|      3|            goto error;
  250|  11.9k|    } else {
  251|  11.9k|        hdr->color_range = dav1d_get_bit(gb);
  252|  11.9k|        switch (hdr->profile) {
  ------------------
  |  Branch (252:17): [True: 11.9k, False: 0]
  ------------------
  253|  4.16k|        case 0: hdr->layout = DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (253:9): [True: 4.16k, False: 7.79k]
  ------------------
  254|  4.16k|                hdr->ss_hor = hdr->ss_ver = 1;
  255|  4.16k|                break;
  256|  4.48k|        case 1: hdr->layout = DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (256:9): [True: 4.48k, False: 7.47k]
  ------------------
  257|  4.48k|                break;
  258|  3.31k|        case 2:
  ------------------
  |  Branch (258:9): [True: 3.31k, False: 8.64k]
  ------------------
  259|  3.31k|            if (hdr->hbd == 2) {
  ------------------
  |  Branch (259:17): [True: 2.65k, False: 655]
  ------------------
  260|  2.65k|                hdr->ss_hor = dav1d_get_bit(gb);
  261|  2.65k|                if (hdr->ss_hor)
  ------------------
  |  Branch (261:21): [True: 530, False: 2.12k]
  ------------------
  262|    530|                    hdr->ss_ver = dav1d_get_bit(gb);
  263|  2.65k|            } else
  264|    655|                hdr->ss_hor = 1;
  265|  3.31k|            hdr->layout = hdr->ss_hor ?
  ------------------
  |  Branch (265:27): [True: 1.18k, False: 2.12k]
  ------------------
  266|  1.18k|                          hdr->ss_ver ? DAV1D_PIXEL_LAYOUT_I420 :
  ------------------
  |  Branch (266:27): [True: 440, False: 745]
  ------------------
  267|  1.18k|                                        DAV1D_PIXEL_LAYOUT_I422 :
  268|  3.31k|                                        DAV1D_PIXEL_LAYOUT_I444;
  269|  3.31k|            break;
  270|  11.9k|        }
  271|  11.9k|        hdr->chr = (hdr->ss_hor & hdr->ss_ver) ?
  ------------------
  |  Branch (271:20): [True: 4.60k, False: 7.35k]
  ------------------
  272|  7.35k|                   dav1d_get_bits(gb, 2) : DAV1D_CHR_UNKNOWN;
  273|  11.9k|    }
  274|  16.0k|    if (strict_std_compliance &&
  ------------------
  |  Branch (274:9): [True: 0, False: 16.0k]
  ------------------
  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|  16.0k|    if (!hdr->monochrome)
  ------------------
  |  Branch (279:9): [True: 11.9k, False: 4.07k]
  ------------------
  280|  11.9k|        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|  16.0k|    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|  16.0k|    return check_trailing_bits(gb, strict_std_compliance);
  297|       |
  298|    243|error:
  299|    243|    return DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|    243|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  300|  16.0k|}
obu.c:parse_frame_hdr:
  409|  21.8k|static int parse_frame_hdr(Dav1dContext *const c, GetBits *const gb) {
  410|  21.8k|#define DEBUG_FRAME_HDR 0
  411|       |
  412|       |#if DEBUG_FRAME_HDR
  413|       |    const uint8_t *const init_ptr = gb->ptr;
  414|       |#endif
  415|  21.8k|    const Dav1dSequenceHeader *const seqhdr = c->seq_hdr;
  416|  21.8k|    Dav1dFrameHeader *const hdr = c->frame_hdr;
  417|       |
  418|  21.8k|    if (!seqhdr->reduced_still_picture_header)
  ------------------
  |  Branch (418:9): [True: 8.40k, False: 13.4k]
  ------------------
  419|  8.40k|        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|  21.8k|    if (hdr->show_existing_frame) {
  ------------------
  |  Branch (424:9): [True: 149, False: 21.7k]
  ------------------
  425|    149|        hdr->existing_frame_idx = dav1d_get_bits(gb, 3);
  426|    149|        if (seqhdr->decoder_model_info_present && !seqhdr->equal_picture_interval)
  ------------------
  |  Branch (426:13): [True: 5, False: 144]
  |  Branch (426:51): [True: 2, False: 3]
  ------------------
  427|      2|            hdr->frame_presentation_delay = dav1d_get_bits(gb, seqhdr->frame_presentation_delay_length);
  428|    149|        if (seqhdr->frame_id_numbers_present) {
  ------------------
  |  Branch (428:13): [True: 14, False: 135]
  ------------------
  429|     14|            hdr->frame_id = dav1d_get_bits(gb, seqhdr->frame_id_n_bits);
  430|     14|            Dav1dFrameHeader *const ref_frame_hdr = c->refs[hdr->existing_frame_idx].p.p.frame_hdr;
  431|     14|            if (!ref_frame_hdr || ref_frame_hdr->frame_id != hdr->frame_id) goto error;
  ------------------
  |  Branch (431:17): [True: 5, False: 9]
  |  Branch (431:35): [True: 6, False: 3]
  ------------------
  432|     14|        }
  433|    138|        return 0;
  434|    149|    }
  435|       |
  436|  21.7k|    if (seqhdr->reduced_still_picture_header) {
  ------------------
  |  Branch (436:9): [True: 13.4k, False: 8.25k]
  ------------------
  437|  13.4k|        hdr->frame_type = DAV1D_FRAME_TYPE_KEY;
  438|  13.4k|        hdr->show_frame = 1;
  439|  13.4k|    } else {
  440|  8.25k|        hdr->frame_type = dav1d_get_bits(gb, 2);
  441|  8.25k|        hdr->show_frame = dav1d_get_bit(gb);
  442|  8.25k|    }
  443|  21.7k|    if (hdr->show_frame) {
  ------------------
  |  Branch (443:9): [True: 20.2k, False: 1.49k]
  ------------------
  444|  20.2k|        if (seqhdr->decoder_model_info_present && !seqhdr->equal_picture_interval)
  ------------------
  |  Branch (444:13): [True: 284, False: 19.9k]
  |  Branch (444:51): [True: 223, False: 61]
  ------------------
  445|    223|            hdr->frame_presentation_delay = dav1d_get_bits(gb, seqhdr->frame_presentation_delay_length);
  446|  20.2k|        hdr->showable_frame = hdr->frame_type != DAV1D_FRAME_TYPE_KEY;
  447|  20.2k|    } else
  448|  1.49k|        hdr->showable_frame = dav1d_get_bit(gb);
  449|  21.7k|    hdr->error_resilient_mode =
  450|  21.7k|        (hdr->frame_type == DAV1D_FRAME_TYPE_KEY && hdr->show_frame) ||
  ------------------
  |  Branch (450:10): [True: 17.8k, False: 3.87k]
  |  Branch (450:53): [True: 17.6k, False: 136]
  ------------------
  451|  4.01k|        hdr->frame_type == DAV1D_FRAME_TYPE_SWITCH ||
  ------------------
  |  Branch (451:9): [True: 93, False: 3.91k]
  ------------------
  452|  3.91k|        seqhdr->reduced_still_picture_header || dav1d_get_bit(gb);
  ------------------
  |  Branch (452:9): [True: 0, False: 3.91k]
  |  Branch (452:49): [True: 514, False: 3.40k]
  ------------------
  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|  21.7k|    hdr->disable_cdf_update = dav1d_get_bit(gb);
  458|  21.7k|    hdr->allow_screen_content_tools = seqhdr->screen_content_tools == DAV1D_ADAPTIVE ?
  ------------------
  |  Branch (458:39): [True: 19.2k, False: 2.42k]
  ------------------
  459|  19.2k|                                      dav1d_get_bit(gb) : seqhdr->screen_content_tools;
  460|  21.7k|    if (hdr->allow_screen_content_tools)
  ------------------
  |  Branch (460:9): [True: 9.04k, False: 12.6k]
  ------------------
  461|  9.04k|        hdr->force_integer_mv = seqhdr->force_integer_mv == DAV1D_ADAPTIVE ?
  ------------------
  |  Branch (461:33): [True: 8.29k, False: 752]
  ------------------
  462|  8.29k|                                dav1d_get_bit(gb) : seqhdr->force_integer_mv;
  463|       |
  464|  21.7k|    if (IS_KEY_OR_INTRA(hdr))
  ------------------
  |  |   43|  21.7k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  21.7k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 18.0k, False: 3.65k]
  |  |  ------------------
  ------------------
  465|  18.0k|        hdr->force_integer_mv = 1;
  466|       |
  467|  21.7k|    if (seqhdr->frame_id_numbers_present)
  ------------------
  |  Branch (467:9): [True: 435, False: 21.2k]
  ------------------
  468|    435|        hdr->frame_id = dav1d_get_bits(gb, seqhdr->frame_id_n_bits);
  469|       |
  470|  21.7k|    if (!seqhdr->reduced_still_picture_header)
  ------------------
  |  Branch (470:9): [True: 8.25k, False: 13.4k]
  ------------------
  471|  8.25k|        hdr->frame_size_override = hdr->frame_type == DAV1D_FRAME_TYPE_SWITCH ? 1 : dav1d_get_bit(gb);
  ------------------
  |  Branch (471:36): [True: 93, False: 8.15k]
  ------------------
  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|  21.7k|    if (seqhdr->order_hint)
  ------------------
  |  Branch (476:9): [True: 6.15k, False: 15.5k]
  ------------------
  477|  6.15k|        hdr->frame_offset = dav1d_get_bits(gb, seqhdr->order_hint_n_bits);
  478|  21.7k|    hdr->primary_ref_frame = !hdr->error_resilient_mode && IS_INTER_OR_SWITCH(hdr) ?
  ------------------
  |  |   36|  3.40k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.22k, False: 178]
  |  |  ------------------
  ------------------
  |  Branch (478:30): [True: 3.40k, False: 18.2k]
  ------------------
  479|  18.4k|                             dav1d_get_bits(gb, 3) : DAV1D_PRIMARY_REF_NONE;
  ------------------
  |  |   45|  40.1k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  480|       |
  481|  21.7k|    if (seqhdr->decoder_model_info_present) {
  ------------------
  |  Branch (481:9): [True: 313, False: 21.3k]
  ------------------
  482|    313|        hdr->buffer_removal_time_present = dav1d_get_bit(gb);
  483|    313|        if (hdr->buffer_removal_time_present) {
  ------------------
  |  Branch (483:13): [True: 152, False: 161]
  ------------------
  484|    903|            for (int i = 0; i < c->seq_hdr->num_operating_points; i++) {
  ------------------
  |  Branch (484:29): [True: 751, False: 152]
  ------------------
  485|    751|                const struct Dav1dSequenceHeaderOperatingPoint *const seqop = &seqhdr->operating_points[i];
  486|    751|                struct Dav1dFrameHeaderOperatingPoint *const op = &hdr->operating_points[i];
  487|    751|                if (seqop->decoder_model_param_present) {
  ------------------
  |  Branch (487:21): [True: 392, False: 359]
  ------------------
  488|    392|                    int in_temporal_layer = (seqop->idc >> hdr->temporal_id) & 1;
  489|    392|                    int in_spatial_layer  = (seqop->idc >> (hdr->spatial_id + 8)) & 1;
  490|    392|                    if (!seqop->idc || (in_temporal_layer && in_spatial_layer))
  ------------------
  |  Branch (490:25): [True: 1, False: 391]
  |  Branch (490:41): [True: 221, False: 170]
  |  Branch (490:62): [True: 182, False: 39]
  ------------------
  491|    183|                        op->buffer_removal_time = dav1d_get_bits(gb, seqhdr->buffer_removal_delay_length);
  492|    392|                }
  493|    751|            }
  494|    152|        }
  495|    313|    }
  496|       |
  497|  21.7k|    if (IS_KEY_OR_INTRA(hdr)) {
  ------------------
  |  |   43|  21.7k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|  21.7k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 18.0k, False: 3.65k]
  |  |  ------------------
  ------------------
  498|  18.0k|        hdr->refresh_frame_flags = (hdr->frame_type == DAV1D_FRAME_TYPE_KEY &&
  ------------------
  |  Branch (498:37): [True: 17.8k, False: 223]
  ------------------
  499|  17.8k|                                    hdr->show_frame) ? 0xff : dav1d_get_bits(gb, 8);
  ------------------
  |  Branch (499:37): [True: 17.6k, False: 136]
  ------------------
  500|  18.0k|        if (hdr->refresh_frame_flags != 0xff && hdr->error_resilient_mode && seqhdr->order_hint)
  ------------------
  |  Branch (500:13): [True: 359, False: 17.6k]
  |  Branch (500:49): [True: 181, False: 178]
  |  Branch (500:78): [True: 103, False: 78]
  ------------------
  501|    927|            for (int i = 0; i < 8; i++)
  ------------------
  |  Branch (501:29): [True: 824, False: 103]
  ------------------
  502|    824|                dav1d_get_bits(gb, seqhdr->order_hint_n_bits);
  503|  18.0k|        if (c->strict_std_compliance &&
  ------------------
  |  Branch (503:13): [True: 0, False: 18.0k]
  ------------------
  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|  18.0k|        if (read_frame_size(c, gb, 0) < 0) goto error;
  ------------------
  |  Branch (508:13): [True: 0, False: 18.0k]
  ------------------
  509|  18.0k|        if (hdr->allow_screen_content_tools && !hdr->super_res.enabled)
  ------------------
  |  Branch (509:13): [True: 8.03k, False: 10.0k]
  |  Branch (509:48): [True: 6.85k, False: 1.17k]
  ------------------
  510|  6.85k|            hdr->allow_intrabc = dav1d_get_bit(gb);
  511|  18.0k|    } else {
  512|  3.65k|        hdr->refresh_frame_flags = hdr->frame_type == DAV1D_FRAME_TYPE_SWITCH ? 0xff :
  ------------------
  |  Branch (512:36): [True: 93, False: 3.56k]
  ------------------
  513|  3.65k|                                   dav1d_get_bits(gb, 8);
  514|  3.65k|        if (hdr->error_resilient_mode && seqhdr->order_hint)
  ------------------
  |  Branch (514:13): [True: 426, False: 3.22k]
  |  Branch (514:42): [True: 154, False: 272]
  ------------------
  515|  1.38k|            for (int i = 0; i < 8; i++)
  ------------------
  |  Branch (515:29): [True: 1.23k, False: 154]
  ------------------
  516|  1.23k|                dav1d_get_bits(gb, seqhdr->order_hint_n_bits);
  517|  3.65k|        if (seqhdr->order_hint) {
  ------------------
  |  Branch (517:13): [True: 3.06k, False: 593]
  ------------------
  518|  3.06k|            hdr->frame_ref_short_signaling = dav1d_get_bit(gb);
  519|  3.06k|            if (hdr->frame_ref_short_signaling) {
  ------------------
  |  Branch (519:17): [True: 1.49k, False: 1.56k]
  ------------------
  520|  1.49k|                hdr->refidx[0] = dav1d_get_bits(gb, 3);
  521|  1.49k|                hdr->refidx[1] = hdr->refidx[2] = -1;
  522|  1.49k|                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|  1.49k|                int frame_offset_mem[8+1];
  527|  1.49k|                int *const frame_offset = &frame_offset_mem[1];
  528|  1.49k|                int earliest_ref = -1;
  529|  13.4k|                for (int i = 0, earliest_offset = INT_MAX; i < 8; i++) {
  ------------------
  |  Branch (529:60): [True: 11.9k, False: 1.48k]
  ------------------
  530|  11.9k|                    const Dav1dFrameHeader *const refhdr = c->refs[i].p.p.frame_hdr;
  531|  11.9k|                    if (!refhdr) goto error;
  ------------------
  |  Branch (531:25): [True: 7, False: 11.9k]
  ------------------
  532|  11.9k|                    const int diff = get_poc_diff(seqhdr->order_hint_n_bits,
  533|  11.9k|                                                  refhdr->frame_offset,
  534|  11.9k|                                                  hdr->frame_offset);
  535|  11.9k|                    frame_offset[i] = diff;
  536|  11.9k|                    if (diff < earliest_offset) {
  ------------------
  |  Branch (536:25): [True: 1.81k, False: 10.0k]
  ------------------
  537|  1.81k|                        earliest_offset = diff;
  538|  1.81k|                        earliest_ref = i;
  539|  1.81k|                    }
  540|  11.9k|                }
  541|  1.48k|                frame_offset[hdr->refidx[0]] = INT_MIN; // = reference frame is used
  542|  1.48k|                frame_offset[hdr->refidx[3]] = INT_MIN;
  543|  1.48k|                assert(earliest_ref >= 0);
  ------------------
  |  |  140|  1.48k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.48k]
  |  |  |  Branch (140:68): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
  544|       |
  545|  1.48k|                int refidx = -1;
  546|  13.3k|                for (int i = 0, latest_offset = 0; i < 8; i++) {
  ------------------
  |  Branch (546:52): [True: 11.9k, False: 1.48k]
  ------------------
  547|  11.9k|                    const int hint = frame_offset[i];
  548|  11.9k|                    if (hint >= latest_offset) {
  ------------------
  |  Branch (548:25): [True: 3.31k, False: 8.58k]
  ------------------
  549|  3.31k|                        latest_offset = hint;
  550|  3.31k|                        refidx = i;
  551|  3.31k|                    }
  552|  11.9k|                }
  553|  1.48k|                frame_offset[refidx] = INT_MIN;
  554|  1.48k|                hdr->refidx[6] = refidx;
  555|       |
  556|  4.46k|                for (int i = 4; i < 6; i++) {
  ------------------
  |  Branch (556:33): [True: 2.97k, False: 1.48k]
  ------------------
  557|       |                    /* Unsigned compares to handle negative values. */
  558|  2.97k|                    unsigned earliest_offset = UINT8_MAX;
  559|  2.97k|                    refidx = -1;
  560|  26.7k|                    for (int j = 0; j < 8; j++) {
  ------------------
  |  Branch (560:37): [True: 23.8k, False: 2.97k]
  ------------------
  561|  23.8k|                        const unsigned hint = frame_offset[j];
  562|  23.8k|                        if (hint < earliest_offset) {
  ------------------
  |  Branch (562:29): [True: 1.32k, False: 22.4k]
  ------------------
  563|  1.32k|                            earliest_offset = hint;
  564|  1.32k|                            refidx = j;
  565|  1.32k|                        }
  566|  23.8k|                    }
  567|  2.97k|                    frame_offset[refidx] = INT_MIN;
  568|  2.97k|                    hdr->refidx[i] = refidx;
  569|  2.97k|                }
  570|       |
  571|  10.4k|                for (int i = 1; i < 7; i++) {
  ------------------
  |  Branch (571:33): [True: 8.92k, False: 1.48k]
  ------------------
  572|  8.92k|                    refidx = hdr->refidx[i];
  573|  8.92k|                    if (refidx < 0) {
  ------------------
  |  Branch (573:25): [True: 5.51k, False: 3.41k]
  ------------------
  574|  5.51k|                        unsigned latest_offset = ~UINT8_MAX;
  575|  49.6k|                        for (int j = 0; j < 8; j++) {
  ------------------
  |  Branch (575:41): [True: 44.1k, False: 5.51k]
  ------------------
  576|  44.1k|                            const unsigned hint = frame_offset[j];
  577|  44.1k|                            if (hint >= latest_offset) {
  ------------------
  |  Branch (577:33): [True: 16.9k, False: 27.2k]
  ------------------
  578|  16.9k|                                latest_offset = hint;
  579|  16.9k|                                refidx = j;
  580|  16.9k|                            }
  581|  44.1k|                        }
  582|  5.51k|                        frame_offset[refidx] = INT_MIN;
  583|  5.51k|                        hdr->refidx[i] = refidx >= 0 ? refidx : earliest_ref;
  ------------------
  |  Branch (583:42): [True: 4.57k, False: 940]
  ------------------
  584|  5.51k|                    }
  585|  8.92k|                }
  586|  1.48k|            }
  587|  3.06k|        }
  588|  29.0k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (588:25): [True: 25.4k, False: 3.62k]
  ------------------
  589|  25.4k|            if (!hdr->frame_ref_short_signaling)
  ------------------
  |  Branch (589:17): [True: 15.0k, False: 10.3k]
  ------------------
  590|  15.0k|                hdr->refidx[i] = dav1d_get_bits(gb, 3);
  591|  25.4k|            if (seqhdr->frame_id_numbers_present) {
  ------------------
  |  Branch (591:17): [True: 50, False: 25.3k]
  ------------------
  592|     50|                const unsigned delta_ref_frame_id = dav1d_get_bits(gb, seqhdr->delta_frame_id_n_bits) + 1;
  593|     50|                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|     50|                Dav1dFrameHeader *const ref_frame_hdr = c->refs[hdr->refidx[i]].p.p.frame_hdr;
  595|     50|                if (!ref_frame_hdr || ref_frame_hdr->frame_id != ref_frame_id) goto error;
  ------------------
  |  Branch (595:21): [True: 13, False: 37]
  |  Branch (595:39): [True: 9, False: 28]
  ------------------
  596|     50|            }
  597|  25.4k|        }
  598|  3.62k|        const int use_ref = !hdr->error_resilient_mode &&
  ------------------
  |  Branch (598:29): [True: 3.21k, False: 413]
  ------------------
  599|  3.21k|                            hdr->frame_size_override;
  ------------------
  |  Branch (599:29): [True: 568, False: 2.64k]
  ------------------
  600|  3.62k|        if (read_frame_size(c, gb, use_ref) < 0) goto error;
  ------------------
  |  Branch (600:13): [True: 5, False: 3.61k]
  ------------------
  601|  3.61k|        if (!hdr->force_integer_mv)
  ------------------
  |  Branch (601:13): [True: 3.18k, False: 434]
  ------------------
  602|  3.18k|            hdr->hp = dav1d_get_bit(gb);
  603|  3.61k|        hdr->subpel_filter_mode = dav1d_get_bit(gb) ? DAV1D_FILTER_SWITCHABLE :
  ------------------
  |  Branch (603:35): [True: 1.74k, False: 1.87k]
  ------------------
  604|  3.61k|                                                      dav1d_get_bits(gb, 2);
  605|  3.61k|        hdr->switchable_motion_mode = dav1d_get_bit(gb);
  606|  3.61k|        if (!hdr->error_resilient_mode && seqhdr->ref_frame_mvs &&
  ------------------
  |  Branch (606:13): [True: 3.20k, False: 413]
  |  Branch (606:43): [True: 2.63k, False: 568]
  ------------------
  607|  2.63k|            seqhdr->order_hint && IS_INTER_OR_SWITCH(hdr))
  ------------------
  |  |   36|  2.63k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 2.63k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (607:13): [True: 2.63k, False: 0]
  ------------------
  608|  2.63k|        {
  609|  2.63k|            hdr->use_ref_frame_mvs = dav1d_get_bit(gb);
  610|  2.63k|        }
  611|  3.61k|    }
  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|  21.6k|    if (!seqhdr->reduced_still_picture_header && !hdr->disable_cdf_update)
  ------------------
  |  Branch (617:9): [True: 8.21k, False: 13.4k]
  |  Branch (617:50): [True: 4.77k, False: 3.44k]
  ------------------
  618|  4.77k|        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|  21.6k|    hdr->tiling.uniform = dav1d_get_bit(gb);
  626|  21.6k|    const int sbsz_min1 = (64 << seqhdr->sb128) - 1;
  627|  21.6k|    const int sbsz_log2 = 6 + seqhdr->sb128;
  628|  21.6k|    const int sbw = (hdr->width[0] + sbsz_min1) >> sbsz_log2;
  629|  21.6k|    const int sbh = (hdr->height + sbsz_min1) >> sbsz_log2;
  630|  21.6k|    const int max_tile_width_sb = 4096 >> sbsz_log2;
  631|  21.6k|    const int max_tile_area_sb = 4096 * 2304 >> (2 * sbsz_log2);
  632|  21.6k|    hdr->tiling.min_log2_cols = tile_log2(max_tile_width_sb, sbw);
  633|  21.6k|    hdr->tiling.max_log2_cols = tile_log2(1, imin(sbw, DAV1D_MAX_TILE_COLS));
  ------------------
  |  |   41|  21.6k|#define DAV1D_MAX_TILE_COLS 64
  ------------------
  634|  21.6k|    hdr->tiling.max_log2_rows = tile_log2(1, imin(sbh, DAV1D_MAX_TILE_ROWS));
  ------------------
  |  |   42|  21.6k|#define DAV1D_MAX_TILE_ROWS 64
  ------------------
  635|  21.6k|    const int min_log2_tiles = imax(tile_log2(max_tile_area_sb, sbw * sbh),
  636|  21.6k|                              hdr->tiling.min_log2_cols);
  637|  21.6k|    if (hdr->tiling.uniform) {
  ------------------
  |  Branch (637:9): [True: 13.4k, False: 8.25k]
  ------------------
  638|  13.4k|        for (hdr->tiling.log2_cols = hdr->tiling.min_log2_cols;
  639|  14.9k|             hdr->tiling.log2_cols < hdr->tiling.max_log2_cols && dav1d_get_bit(gb);
  ------------------
  |  Branch (639:14): [True: 7.36k, False: 7.56k]
  |  Branch (639:67): [True: 1.51k, False: 5.85k]
  ------------------
  640|  13.4k|             hdr->tiling.log2_cols++) ;
  641|  13.4k|        const int tile_w = 1 + ((sbw - 1) >> hdr->tiling.log2_cols);
  642|  13.4k|        hdr->tiling.cols = 0;
  643|  38.4k|        for (int sbx = 0; sbx < sbw; sbx += tile_w, hdr->tiling.cols++)
  ------------------
  |  Branch (643:27): [True: 25.0k, False: 13.4k]
  ------------------
  644|  25.0k|            hdr->tiling.col_start_sb[hdr->tiling.cols] = sbx;
  645|  13.4k|        hdr->tiling.min_log2_rows =
  646|  13.4k|            imax(min_log2_tiles - hdr->tiling.log2_cols, 0);
  647|       |
  648|  13.4k|        for (hdr->tiling.log2_rows = hdr->tiling.min_log2_rows;
  649|  14.6k|             hdr->tiling.log2_rows < hdr->tiling.max_log2_rows && dav1d_get_bit(gb);
  ------------------
  |  Branch (649:14): [True: 5.66k, False: 8.97k]
  |  Branch (649:67): [True: 1.22k, False: 4.44k]
  ------------------
  650|  13.4k|             hdr->tiling.log2_rows++) ;
  651|  13.4k|        const int tile_h = 1 + ((sbh - 1) >> hdr->tiling.log2_rows);
  652|  13.4k|        hdr->tiling.rows = 0;
  653|  30.0k|        for (int sby = 0; sby < sbh; sby += tile_h, hdr->tiling.rows++)
  ------------------
  |  Branch (653:27): [True: 16.6k, False: 13.4k]
  ------------------
  654|  16.6k|            hdr->tiling.row_start_sb[hdr->tiling.rows] = sby;
  655|  13.4k|    } else {
  656|  8.25k|        hdr->tiling.cols = 0;
  657|  8.25k|        int widest_tile = 0, max_tile_area_sb = sbw * sbh;
  658|  19.7k|        for (int sbx = 0; sbx < sbw && hdr->tiling.cols < DAV1D_MAX_TILE_COLS; hdr->tiling.cols++) {
  ------------------
  |  |   41|  11.4k|#define DAV1D_MAX_TILE_COLS 64
  ------------------
  |  Branch (658:27): [True: 11.4k, False: 8.23k]
  |  Branch (658:40): [True: 11.4k, False: 11]
  ------------------
  659|  11.4k|            const int tile_width_sb = imin(sbw - sbx, max_tile_width_sb);
  660|  11.4k|            const int tile_w = (tile_width_sb > 1) ? 1 + dav1d_get_uniform(gb, tile_width_sb) : 1;
  ------------------
  |  Branch (660:32): [True: 5.05k, False: 6.40k]
  ------------------
  661|  11.4k|            hdr->tiling.col_start_sb[hdr->tiling.cols] = sbx;
  662|  11.4k|            sbx += tile_w;
  663|  11.4k|            widest_tile = imax(widest_tile, tile_w);
  664|  11.4k|        }
  665|  8.25k|        hdr->tiling.log2_cols = tile_log2(1, hdr->tiling.cols);
  666|  8.25k|        if (min_log2_tiles) max_tile_area_sb >>= min_log2_tiles + 1;
  ------------------
  |  Branch (666:13): [True: 136, False: 8.11k]
  ------------------
  667|  8.25k|        const int max_tile_height_sb = imax(max_tile_area_sb / widest_tile, 1);
  668|       |
  669|  8.25k|        hdr->tiling.rows = 0;
  670|  20.0k|        for (int sby = 0; sby < sbh && hdr->tiling.rows < DAV1D_MAX_TILE_ROWS; hdr->tiling.rows++) {
  ------------------
  |  |   42|  11.8k|#define DAV1D_MAX_TILE_ROWS 64
  ------------------
  |  Branch (670:27): [True: 11.8k, False: 8.23k]
  |  Branch (670:40): [True: 11.7k, False: 17]
  ------------------
  671|  11.7k|            const int tile_height_sb = imin(sbh - sby, max_tile_height_sb);
  672|  11.7k|            const int tile_h = (tile_height_sb > 1) ? 1 + dav1d_get_uniform(gb, tile_height_sb) : 1;
  ------------------
  |  Branch (672:32): [True: 5.06k, False: 6.73k]
  ------------------
  673|  11.7k|            hdr->tiling.row_start_sb[hdr->tiling.rows] = sby;
  674|  11.7k|            sby += tile_h;
  675|  11.7k|        }
  676|  8.25k|        hdr->tiling.log2_rows = tile_log2(1, hdr->tiling.rows);
  677|  8.25k|    }
  678|  21.6k|    hdr->tiling.col_start_sb[hdr->tiling.cols] = sbw;
  679|  21.6k|    hdr->tiling.row_start_sb[hdr->tiling.rows] = sbh;
  680|  21.6k|    if (hdr->tiling.log2_cols || hdr->tiling.log2_rows) {
  ------------------
  |  Branch (680:9): [True: 1.37k, False: 20.2k]
  |  Branch (680:34): [True: 921, False: 19.3k]
  ------------------
  681|  2.29k|        hdr->tiling.update = dav1d_get_bits(gb, hdr->tiling.log2_cols + hdr->tiling.log2_rows);
  682|  2.29k|        if (hdr->tiling.update >= hdr->tiling.cols * hdr->tiling.rows)
  ------------------
  |  Branch (682:13): [True: 14, False: 2.28k]
  ------------------
  683|     14|            goto error;
  684|  2.28k|        hdr->tiling.n_bytes = dav1d_get_bits(gb, 2) + 1;
  685|  2.28k|    }
  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|  21.6k|    hdr->quant.yac = dav1d_get_bits(gb, 8);
  693|  21.6k|    if (dav1d_get_bit(gb))
  ------------------
  |  Branch (693:9): [True: 8.96k, False: 12.6k]
  ------------------
  694|  8.96k|        hdr->quant.ydc_delta = dav1d_get_sbits(gb, 7);
  695|  21.6k|    if (!seqhdr->monochrome) {
  ------------------
  |  Branch (695:9): [True: 15.5k, False: 6.07k]
  ------------------
  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|  15.5k|        const int diff_uv_delta = seqhdr->separate_uv_delta_q ? dav1d_get_bit(gb) : 0;
  ------------------
  |  Branch (699:35): [True: 7.21k, False: 8.36k]
  ------------------
  700|  15.5k|        if (dav1d_get_bit(gb))
  ------------------
  |  Branch (700:13): [True: 5.66k, False: 9.91k]
  ------------------
  701|  5.66k|            hdr->quant.udc_delta = dav1d_get_sbits(gb, 7);
  702|  15.5k|        if (dav1d_get_bit(gb))
  ------------------
  |  Branch (702:13): [True: 6.60k, False: 8.97k]
  ------------------
  703|  6.60k|            hdr->quant.uac_delta = dav1d_get_sbits(gb, 7);
  704|  15.5k|        if (diff_uv_delta) {
  ------------------
  |  Branch (704:13): [True: 3.26k, False: 12.3k]
  ------------------
  705|  3.26k|            if (dav1d_get_bit(gb))
  ------------------
  |  Branch (705:17): [True: 1.44k, False: 1.81k]
  ------------------
  706|  1.44k|                hdr->quant.vdc_delta = dav1d_get_sbits(gb, 7);
  707|  3.26k|            if (dav1d_get_bit(gb))
  ------------------
  |  Branch (707:17): [True: 1.66k, False: 1.59k]
  ------------------
  708|  1.66k|                hdr->quant.vac_delta = dav1d_get_sbits(gb, 7);
  709|  12.3k|        } else {
  710|  12.3k|            hdr->quant.vdc_delta = hdr->quant.udc_delta;
  711|  12.3k|            hdr->quant.vac_delta = hdr->quant.uac_delta;
  712|  12.3k|        }
  713|  15.5k|    }
  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|  21.6k|    hdr->quant.qm = dav1d_get_bit(gb);
  719|  21.6k|    if (hdr->quant.qm) {
  ------------------
  |  Branch (719:9): [True: 10.3k, False: 11.3k]
  ------------------
  720|  10.3k|        hdr->quant.qm_y = dav1d_get_bits(gb, 4);
  721|  10.3k|        hdr->quant.qm_u = dav1d_get_bits(gb, 4);
  722|  10.3k|        hdr->quant.qm_v = seqhdr->separate_uv_delta_q ? dav1d_get_bits(gb, 4) :
  ------------------
  |  Branch (722:27): [True: 3.87k, False: 6.46k]
  ------------------
  723|  10.3k|                                                        hdr->quant.qm_u;
  724|  10.3k|    }
  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|  21.6k|    hdr->segmentation.enabled = dav1d_get_bit(gb);
  732|  21.6k|    if (hdr->segmentation.enabled) {
  ------------------
  |  Branch (732:9): [True: 8.42k, False: 13.2k]
  ------------------
  733|  8.42k|        if (hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  8.42k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (733:13): [True: 7.14k, False: 1.28k]
  ------------------
  734|  7.14k|            hdr->segmentation.update_map = 1;
  735|  7.14k|            hdr->segmentation.update_data = 1;
  736|  7.14k|        } else {
  737|  1.28k|            hdr->segmentation.update_map = dav1d_get_bit(gb);
  738|  1.28k|            if (hdr->segmentation.update_map)
  ------------------
  |  Branch (738:17): [True: 677, False: 603]
  ------------------
  739|    677|                hdr->segmentation.temporal = dav1d_get_bit(gb);
  740|  1.28k|            hdr->segmentation.update_data = dav1d_get_bit(gb);
  741|  1.28k|        }
  742|       |
  743|  8.42k|        if (hdr->segmentation.update_data) {
  ------------------
  |  Branch (743:13): [True: 7.29k, False: 1.13k]
  ------------------
  744|  7.29k|            hdr->segmentation.seg_data.last_active_segid = -1;
  745|  65.6k|            for (int i = 0; i < DAV1D_MAX_SEGMENTS; i++) {
  ------------------
  |  |   43|  65.6k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (745:29): [True: 58.3k, False: 7.29k]
  ------------------
  746|  58.3k|                Dav1dSegmentationData *const seg =
  747|  58.3k|                    &hdr->segmentation.seg_data.d[i];
  748|  58.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (748:21): [True: 26.2k, False: 32.1k]
  ------------------
  749|  26.2k|                    seg->delta_q = dav1d_get_sbits(gb, 9);
  750|  26.2k|                    hdr->segmentation.seg_data.last_active_segid = i;
  751|  26.2k|                }
  752|  58.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (752:21): [True: 24.5k, False: 33.7k]
  ------------------
  753|  24.5k|                    seg->delta_lf_y_v = dav1d_get_sbits(gb, 7);
  754|  24.5k|                    hdr->segmentation.seg_data.last_active_segid = i;
  755|  24.5k|                }
  756|  58.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (756:21): [True: 26.7k, False: 31.5k]
  ------------------
  757|  26.7k|                    seg->delta_lf_y_h = dav1d_get_sbits(gb, 7);
  758|  26.7k|                    hdr->segmentation.seg_data.last_active_segid = i;
  759|  26.7k|                }
  760|  58.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (760:21): [True: 27.7k, False: 30.5k]
  ------------------
  761|  27.7k|                    seg->delta_lf_u = dav1d_get_sbits(gb, 7);
  762|  27.7k|                    hdr->segmentation.seg_data.last_active_segid = i;
  763|  27.7k|                }
  764|  58.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (764:21): [True: 26.4k, False: 31.8k]
  ------------------
  765|  26.4k|                    seg->delta_lf_v = dav1d_get_sbits(gb, 7);
  766|  26.4k|                    hdr->segmentation.seg_data.last_active_segid = i;
  767|  26.4k|                }
  768|  58.3k|                if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (768:21): [True: 29.7k, False: 28.5k]
  ------------------
  769|  29.7k|                    seg->ref = dav1d_get_bits(gb, 3);
  770|  29.7k|                    hdr->segmentation.seg_data.last_active_segid = i;
  771|  29.7k|                    hdr->segmentation.seg_data.preskip = 1;
  772|  29.7k|                } else {
  773|  28.5k|                    seg->ref = -1;
  774|  28.5k|                }
  775|  58.3k|                if ((seg->skip = dav1d_get_bit(gb))) {
  ------------------
  |  Branch (775:21): [True: 27.4k, False: 30.8k]
  ------------------
  776|  27.4k|                    hdr->segmentation.seg_data.last_active_segid = i;
  777|  27.4k|                    hdr->segmentation.seg_data.preskip = 1;
  778|  27.4k|                }
  779|  58.3k|                if ((seg->globalmv = dav1d_get_bit(gb))) {
  ------------------
  |  Branch (779:21): [True: 24.7k, False: 33.5k]
  ------------------
  780|  24.7k|                    hdr->segmentation.seg_data.last_active_segid = i;
  781|  24.7k|                    hdr->segmentation.seg_data.preskip = 1;
  782|  24.7k|                }
  783|  58.3k|            }
  784|  7.29k|        } else {
  785|       |            // segmentation.update_data was false so we should copy
  786|       |            // segmentation data from the reference frame.
  787|  1.13k|            assert(hdr->primary_ref_frame != DAV1D_PRIMARY_REF_NONE);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
  788|  1.13k|            const int pri_ref = hdr->refidx[hdr->primary_ref_frame];
  789|  1.13k|            if (!c->refs[pri_ref].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (789:17): [True: 2, False: 1.13k]
  ------------------
  790|  1.13k|            hdr->segmentation.seg_data =
  791|  1.13k|                c->refs[pri_ref].p.p.frame_hdr->segmentation.seg_data;
  792|  1.13k|        }
  793|  13.2k|    } else {
  794|   119k|        for (int i = 0; i < DAV1D_MAX_SEGMENTS; i++)
  ------------------
  |  |   43|   119k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (794:25): [True: 105k, False: 13.2k]
  ------------------
  795|   105k|            hdr->segmentation.seg_data.d[i].ref = -1;
  796|  13.2k|    }
  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|  21.6k|    if (hdr->quant.yac) {
  ------------------
  |  Branch (803:9): [True: 20.8k, False: 828]
  ------------------
  804|  20.8k|        hdr->delta.q.present = dav1d_get_bit(gb);
  805|  20.8k|        if (hdr->delta.q.present) {
  ------------------
  |  Branch (805:13): [True: 7.43k, False: 13.3k]
  ------------------
  806|  7.43k|            hdr->delta.q.res_log2 = dav1d_get_bits(gb, 2);
  807|  7.43k|            if (!hdr->allow_intrabc) {
  ------------------
  |  Branch (807:17): [True: 6.15k, False: 1.27k]
  ------------------
  808|  6.15k|                hdr->delta.lf.present = dav1d_get_bit(gb);
  809|  6.15k|                if (hdr->delta.lf.present) {
  ------------------
  |  Branch (809:21): [True: 3.00k, False: 3.15k]
  ------------------
  810|  3.00k|                    hdr->delta.lf.res_log2 = dav1d_get_bits(gb, 2);
  811|  3.00k|                    hdr->delta.lf.multi = dav1d_get_bit(gb);
  812|  3.00k|                }
  813|  6.15k|            }
  814|  7.43k|        }
  815|  20.8k|    }
  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|  21.6k|    const int delta_lossless = !hdr->quant.ydc_delta && !hdr->quant.udc_delta &&
  ------------------
  |  Branch (822:32): [True: 12.9k, False: 8.65k]
  |  Branch (822:57): [True: 9.84k, False: 3.15k]
  ------------------
  823|  9.84k|        !hdr->quant.uac_delta && !hdr->quant.vdc_delta && !hdr->quant.vac_delta;
  ------------------
  |  Branch (823:9): [True: 8.21k, False: 1.63k]
  |  Branch (823:34): [True: 7.92k, False: 293]
  |  Branch (823:59): [True: 7.63k, False: 286]
  ------------------
  824|  21.6k|    hdr->all_lossless = 1;
  825|   194k|    for (int i = 0; i < DAV1D_MAX_SEGMENTS; i++) {
  ------------------
  |  |   43|   194k|#define DAV1D_MAX_SEGMENTS 8
  ------------------
  |  Branch (825:21): [True: 173k, False: 21.6k]
  ------------------
  826|   173k|        hdr->segmentation.qidx[i] = hdr->segmentation.enabled ?
  ------------------
  |  Branch (826:37): [True: 67.4k, False: 105k]
  ------------------
  827|  67.4k|            iclip_u8(hdr->quant.yac + hdr->segmentation.seg_data.d[i].delta_q) :
  828|   173k|            hdr->quant.yac;
  829|   173k|        hdr->segmentation.lossless[i] =
  830|   173k|            !hdr->segmentation.qidx[i] && delta_lossless;
  ------------------
  |  Branch (830:13): [True: 13.2k, False: 159k]
  |  Branch (830:43): [True: 5.93k, False: 7.31k]
  ------------------
  831|   173k|        hdr->all_lossless &= hdr->segmentation.lossless[i];
  832|   173k|    }
  833|       |
  834|       |    // loopfilter
  835|  21.6k|    if (hdr->all_lossless || hdr->allow_intrabc) {
  ------------------
  |  Branch (835:9): [True: 556, False: 21.0k]
  |  Branch (835:30): [True: 3.42k, False: 17.6k]
  ------------------
  836|  3.98k|        hdr->loopfilter.mode_ref_delta_enabled = 1;
  837|  3.98k|        hdr->loopfilter.mode_ref_delta_update = 1;
  838|  3.98k|        hdr->loopfilter.mode_ref_deltas = default_mode_ref_deltas;
  839|  17.6k|    } else {
  840|  17.6k|        hdr->loopfilter.level_y[0] = dav1d_get_bits(gb, 6);
  841|  17.6k|        hdr->loopfilter.level_y[1] = dav1d_get_bits(gb, 6);
  842|  17.6k|        if (!seqhdr->monochrome &&
  ------------------
  |  Branch (842:13): [True: 12.4k, False: 5.25k]
  ------------------
  843|  12.4k|            (hdr->loopfilter.level_y[0] || hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (843:14): [True: 10.5k, False: 1.82k]
  |  Branch (843:44): [True: 839, False: 983]
  ------------------
  844|  11.4k|        {
  845|  11.4k|            hdr->loopfilter.level_u = dav1d_get_bits(gb, 6);
  846|  11.4k|            hdr->loopfilter.level_v = dav1d_get_bits(gb, 6);
  847|  11.4k|        }
  848|  17.6k|        hdr->loopfilter.sharpness = dav1d_get_bits(gb, 3);
  849|       |
  850|  17.6k|        if (hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  17.6k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (850:13): [True: 14.7k, False: 2.89k]
  ------------------
  851|  14.7k|            hdr->loopfilter.mode_ref_deltas = default_mode_ref_deltas;
  852|  14.7k|        } else {
  853|  2.89k|            const int ref = hdr->refidx[hdr->primary_ref_frame];
  854|  2.89k|            if (!c->refs[ref].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (854:17): [True: 1, False: 2.88k]
  ------------------
  855|  2.88k|            hdr->loopfilter.mode_ref_deltas =
  856|  2.88k|                c->refs[ref].p.p.frame_hdr->loopfilter.mode_ref_deltas;
  857|  2.88k|        }
  858|  17.6k|        hdr->loopfilter.mode_ref_delta_enabled = dav1d_get_bit(gb);
  859|  17.6k|        if (hdr->loopfilter.mode_ref_delta_enabled) {
  ------------------
  |  Branch (859:13): [True: 6.70k, False: 10.9k]
  ------------------
  860|  6.70k|            hdr->loopfilter.mode_ref_delta_update = dav1d_get_bit(gb);
  861|  6.70k|            if (hdr->loopfilter.mode_ref_delta_update) {
  ------------------
  |  Branch (861:17): [True: 2.88k, False: 3.81k]
  ------------------
  862|  26.0k|                for (int i = 0; i < 8; i++)
  ------------------
  |  Branch (862:33): [True: 23.1k, False: 2.88k]
  ------------------
  863|  23.1k|                    if (dav1d_get_bit(gb))
  ------------------
  |  Branch (863:25): [True: 11.6k, False: 11.5k]
  ------------------
  864|  11.6k|                        hdr->loopfilter.mode_ref_deltas.ref_delta[i] =
  865|  11.6k|                            dav1d_get_sbits(gb, 7);
  866|  8.66k|                for (int i = 0; i < 2; i++)
  ------------------
  |  Branch (866:33): [True: 5.77k, False: 2.88k]
  ------------------
  867|  5.77k|                    if (dav1d_get_bit(gb))
  ------------------
  |  Branch (867:25): [True: 3.08k, False: 2.69k]
  ------------------
  868|  3.08k|                        hdr->loopfilter.mode_ref_deltas.mode_delta[i] =
  869|  3.08k|                            dav1d_get_sbits(gb, 7);
  870|  2.88k|            }
  871|  6.70k|        }
  872|  17.6k|    }
  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|  21.6k|    if (!hdr->all_lossless && seqhdr->cdef && !hdr->allow_intrabc) {
  ------------------
  |  Branch (879:9): [True: 21.0k, False: 556]
  |  Branch (879:31): [True: 8.58k, False: 12.5k]
  |  Branch (879:47): [True: 6.59k, False: 1.99k]
  ------------------
  880|  6.59k|        hdr->cdef.damping = dav1d_get_bits(gb, 2) + 3;
  881|  6.59k|        hdr->cdef.n_bits = dav1d_get_bits(gb, 2);
  882|  24.0k|        for (int i = 0; i < (1 << hdr->cdef.n_bits); i++) {
  ------------------
  |  Branch (882:25): [True: 17.4k, False: 6.59k]
  ------------------
  883|  17.4k|            hdr->cdef.y_strength[i] = dav1d_get_bits(gb, 6);
  884|  17.4k|            if (!seqhdr->monochrome)
  ------------------
  |  Branch (884:17): [True: 11.5k, False: 5.96k]
  ------------------
  885|  11.5k|                hdr->cdef.uv_strength[i] = dav1d_get_bits(gb, 6);
  886|  17.4k|        }
  887|  6.59k|    }
  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|  21.6k|    if ((!hdr->all_lossless || hdr->super_res.enabled) &&
  ------------------
  |  Branch (894:10): [True: 21.0k, False: 556]
  |  Branch (894:32): [True: 36, False: 520]
  ------------------
  895|  21.1k|        seqhdr->restoration && !hdr->allow_intrabc)
  ------------------
  |  Branch (895:9): [True: 10.0k, False: 11.0k]
  |  Branch (895:32): [True: 8.30k, False: 1.77k]
  ------------------
  896|  8.30k|    {
  897|  8.30k|        hdr->restoration.type[0] = dav1d_get_bits(gb, 2);
  898|  8.30k|        if (!seqhdr->monochrome) {
  ------------------
  |  Branch (898:13): [True: 6.19k, False: 2.11k]
  ------------------
  899|  6.19k|            hdr->restoration.type[1] = dav1d_get_bits(gb, 2);
  900|  6.19k|            hdr->restoration.type[2] = dav1d_get_bits(gb, 2);
  901|  6.19k|        }
  902|       |
  903|  8.30k|        if (hdr->restoration.type[0] || hdr->restoration.type[1] ||
  ------------------
  |  Branch (903:13): [True: 5.56k, False: 2.74k]
  |  Branch (903:41): [True: 842, False: 1.89k]
  ------------------
  904|  1.89k|            hdr->restoration.type[2])
  ------------------
  |  Branch (904:13): [True: 347, False: 1.55k]
  ------------------
  905|  6.75k|        {
  906|       |            // Log2 of the restoration unit size.
  907|  6.75k|            hdr->restoration.unit_size[0] = 6 + seqhdr->sb128;
  908|  6.75k|            if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (908:17): [True: 3.09k, False: 3.65k]
  ------------------
  909|  3.09k|                hdr->restoration.unit_size[0]++;
  910|  3.09k|                if (!seqhdr->sb128)
  ------------------
  |  Branch (910:21): [True: 1.36k, False: 1.73k]
  ------------------
  911|  1.36k|                    hdr->restoration.unit_size[0] += dav1d_get_bit(gb);
  912|  3.09k|            }
  913|  6.75k|            hdr->restoration.unit_size[1] = hdr->restoration.unit_size[0];
  914|  6.75k|            if ((hdr->restoration.type[1] || hdr->restoration.type[2]) &&
  ------------------
  |  Branch (914:18): [True: 3.70k, False: 3.05k]
  |  Branch (914:46): [True: 1.36k, False: 1.68k]
  ------------------
  915|  5.07k|                seqhdr->ss_hor == 1 && seqhdr->ss_ver == 1)
  ------------------
  |  Branch (915:17): [True: 2.20k, False: 2.87k]
  |  Branch (915:40): [True: 1.81k, False: 384]
  ------------------
  916|  1.81k|            {
  917|  1.81k|                hdr->restoration.unit_size[1] -= dav1d_get_bit(gb);
  918|  1.81k|            }
  919|  6.75k|        } else {
  920|  1.55k|            hdr->restoration.unit_size[0] = 8;
  921|  1.55k|        }
  922|  8.30k|    }
  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|  21.6k|    if (!hdr->all_lossless)
  ------------------
  |  Branch (928:9): [True: 21.0k, False: 556]
  ------------------
  929|  21.0k|        hdr->txfm_mode = dav1d_get_bit(gb) ? DAV1D_TX_SWITCHABLE : DAV1D_TX_LARGEST;
  ------------------
  |  Branch (929:26): [True: 7.36k, False: 13.7k]
  ------------------
  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|  21.6k|    if (IS_INTER_OR_SWITCH(hdr))
  ------------------
  |  |   36|  21.6k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.61k, False: 18.0k]
  |  |  ------------------
  ------------------
  935|  3.61k|        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|  21.6k|    if (hdr->switchable_comp_refs && IS_INTER_OR_SWITCH(hdr) && seqhdr->order_hint) {
  ------------------
  |  |   36|  23.4k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 1.83k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (940:9): [True: 1.83k, False: 19.8k]
  |  Branch (940:65): [True: 1.56k, False: 268]
  ------------------
  941|  1.56k|        const int poc = hdr->frame_offset;
  942|  1.56k|        int off_before = -1, off_after = -1;
  943|  1.56k|        int off_before_idx, off_after_idx;
  944|  12.4k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (944:25): [True: 10.9k, False: 1.55k]
  ------------------
  945|  10.9k|            if (!c->refs[hdr->refidx[i]].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (945:17): [True: 12, False: 10.9k]
  ------------------
  946|  10.9k|            const int refpoc = c->refs[hdr->refidx[i]].p.p.frame_hdr->frame_offset;
  947|       |
  948|  10.9k|            const int diff = get_poc_diff(seqhdr->order_hint_n_bits, refpoc, poc);
  949|  10.9k|            if (diff > 0) {
  ------------------
  |  Branch (949:17): [True: 3.85k, False: 7.06k]
  ------------------
  950|  3.85k|                if (off_after < 0 || get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (950:21): [True: 672, False: 3.18k]
  |  Branch (950:38): [True: 25, False: 3.15k]
  ------------------
  951|  3.18k|                                                  off_after, refpoc) > 0)
  952|    697|                {
  953|    697|                    off_after = refpoc;
  954|    697|                    off_after_idx = i;
  955|    697|                }
  956|  7.06k|            } else if (diff < 0 && (off_before < 0 ||
  ------------------
  |  Branch (956:24): [True: 6.44k, False: 617]
  |  Branch (956:37): [True: 1.05k, False: 5.39k]
  ------------------
  957|  5.39k|                                    get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (957:37): [True: 123, False: 5.26k]
  ------------------
  958|  5.39k|                                                 refpoc, off_before) > 0))
  959|  1.17k|            {
  960|  1.17k|                off_before = refpoc;
  961|  1.17k|                off_before_idx = i;
  962|  1.17k|            }
  963|  10.9k|        }
  964|       |
  965|  1.55k|        if ((off_before | off_after) >= 0) {
  ------------------
  |  Branch (965:13): [True: 201, False: 1.35k]
  ------------------
  966|    201|            hdr->skip_mode_refs[0] = imin(off_before_idx, off_after_idx);
  967|    201|            hdr->skip_mode_refs[1] = imax(off_before_idx, off_after_idx);
  968|    201|            hdr->skip_mode_allowed = 1;
  969|  1.35k|        } else if (off_before >= 0) {
  ------------------
  |  Branch (969:20): [True: 849, False: 506]
  ------------------
  970|    849|            int off_before2 = -1;
  971|    849|            int off_before2_idx;
  972|  6.79k|            for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (972:29): [True: 5.94k, False: 849]
  ------------------
  973|  5.94k|                if (!c->refs[hdr->refidx[i]].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (973:21): [True: 0, False: 5.94k]
  ------------------
  974|  5.94k|                const int refpoc = c->refs[hdr->refidx[i]].p.p.frame_hdr->frame_offset;
  975|  5.94k|                if (get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (975:21): [True: 647, False: 5.29k]
  ------------------
  976|  5.94k|                                 refpoc, off_before) < 0) {
  977|    647|                    if (off_before2 < 0 || get_poc_diff(seqhdr->order_hint_n_bits,
  ------------------
  |  Branch (977:25): [True: 177, False: 470]
  |  Branch (977:44): [True: 27, False: 443]
  ------------------
  978|    470|                                                        refpoc, off_before2) > 0)
  979|    204|                    {
  980|    204|                        off_before2 = refpoc;
  981|    204|                        off_before2_idx = i;
  982|    204|                    }
  983|    647|                }
  984|  5.94k|            }
  985|       |
  986|    849|            if (off_before2 >= 0) {
  ------------------
  |  Branch (986:17): [True: 177, False: 672]
  ------------------
  987|    177|                hdr->skip_mode_refs[0] = imin(off_before_idx, off_before2_idx);
  988|    177|                hdr->skip_mode_refs[1] = imax(off_before_idx, off_before2_idx);
  989|    177|                hdr->skip_mode_allowed = 1;
  990|    177|            }
  991|    849|        }
  992|  1.55k|    }
  993|  21.6k|    if (hdr->skip_mode_allowed)
  ------------------
  |  Branch (993:9): [True: 378, False: 21.2k]
  ------------------
  994|    378|        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|  21.6k|    if (!hdr->error_resilient_mode && IS_INTER_OR_SWITCH(hdr) && seqhdr->warped_motion)
  ------------------
  |  |   36|  25.0k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.19k, False: 177]
  |  |  ------------------
  ------------------
  |  Branch (999:9): [True: 3.37k, False: 18.2k]
  |  Branch (999:66): [True: 1.88k, False: 1.30k]
  ------------------
 1000|  1.88k|        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|  21.6k|    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|   173k|    for (int i = 0; i < 7; i++)
  ------------------
  |  Branch (1011:21): [True: 151k, False: 21.6k]
  ------------------
 1012|   151k|        hdr->gmv[i] = dav1d_default_wm_params;
 1013|       |
 1014|  21.6k|    if (IS_INTER_OR_SWITCH(hdr)) {
  ------------------
  |  |   36|  21.6k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (36:5): [True: 3.60k, False: 18.0k]
  |  |  ------------------
  ------------------
 1015|  28.8k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (1015:25): [True: 25.2k, False: 3.60k]
  ------------------
 1016|  25.2k|            hdr->gmv[i].type = !dav1d_get_bit(gb) ? DAV1D_WM_TYPE_IDENTITY :
  ------------------
  |  Branch (1016:32): [True: 17.8k, False: 7.36k]
  ------------------
 1017|  25.2k|                                dav1d_get_bit(gb) ? DAV1D_WM_TYPE_ROT_ZOOM :
  ------------------
  |  Branch (1017:33): [True: 3.47k, False: 3.89k]
  ------------------
 1018|  7.36k|                                dav1d_get_bit(gb) ? DAV1D_WM_TYPE_TRANSLATION :
  ------------------
  |  Branch (1018:33): [True: 1.75k, False: 2.13k]
  ------------------
 1019|  3.89k|                                                    DAV1D_WM_TYPE_AFFINE;
 1020|       |
 1021|  25.2k|            if (hdr->gmv[i].type == DAV1D_WM_TYPE_IDENTITY) continue;
  ------------------
  |  Branch (1021:17): [True: 17.8k, False: 7.36k]
  ------------------
 1022|       |
 1023|  7.36k|            const Dav1dWarpedMotionParams *ref_gmv;
 1024|  7.36k|            if (hdr->primary_ref_frame == DAV1D_PRIMARY_REF_NONE) {
  ------------------
  |  |   45|  7.36k|#define DAV1D_PRIMARY_REF_NONE 7
  ------------------
  |  Branch (1024:17): [True: 1.49k, False: 5.87k]
  ------------------
 1025|  1.49k|                ref_gmv = &dav1d_default_wm_params;
 1026|  5.87k|            } else {
 1027|  5.87k|                const int pri_ref = hdr->refidx[hdr->primary_ref_frame];
 1028|  5.87k|                if (!c->refs[pri_ref].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (1028:21): [True: 4, False: 5.86k]
  ------------------
 1029|  5.86k|                ref_gmv = &c->refs[pri_ref].p.p.frame_hdr->gmv[i];
 1030|  5.86k|            }
 1031|  7.35k|            int32_t *const mat = hdr->gmv[i].matrix;
 1032|  7.35k|            const int32_t *const ref_mat = ref_gmv->matrix;
 1033|  7.35k|            int bits, shift;
 1034|       |
 1035|  7.35k|            if (hdr->gmv[i].type >= DAV1D_WM_TYPE_ROT_ZOOM) {
  ------------------
  |  Branch (1035:17): [True: 5.60k, False: 1.75k]
  ------------------
 1036|  5.60k|                mat[2] = (1 << 16) + 2 *
 1037|  5.60k|                    dav1d_get_bits_subexp(gb, (ref_mat[2] - (1 << 16)) >> 1, 12);
 1038|  5.60k|                mat[3] = 2 * dav1d_get_bits_subexp(gb, ref_mat[3] >> 1, 12);
 1039|       |
 1040|  5.60k|                bits = 12;
 1041|  5.60k|                shift = 10;
 1042|  5.60k|            } else {
 1043|  1.75k|                bits = 9 - !hdr->hp;
 1044|  1.75k|                shift = 13 + !hdr->hp;
 1045|  1.75k|            }
 1046|       |
 1047|  7.35k|            if (hdr->gmv[i].type == DAV1D_WM_TYPE_AFFINE) {
  ------------------
  |  Branch (1047:17): [True: 2.13k, False: 5.22k]
  ------------------
 1048|  2.13k|                mat[4] = 2 * dav1d_get_bits_subexp(gb, ref_mat[4] >> 1, 12);
 1049|  2.13k|                mat[5] = (1 << 16) + 2 *
 1050|  2.13k|                    dav1d_get_bits_subexp(gb, (ref_mat[5] - (1 << 16)) >> 1, 12);
 1051|  5.22k|            } else {
 1052|  5.22k|                mat[4] = -mat[3];
 1053|  5.22k|                mat[5] = mat[2];
 1054|  5.22k|            }
 1055|       |
 1056|  7.35k|            mat[0] = dav1d_get_bits_subexp(gb, ref_mat[0] >> shift, bits) * (1 << shift);
 1057|  7.35k|            mat[1] = dav1d_get_bits_subexp(gb, ref_mat[1] >> shift, bits) * (1 << shift);
 1058|  7.35k|        }
 1059|  3.60k|    }
 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|  21.6k|    if (seqhdr->film_grain_present && (hdr->show_frame || hdr->showable_frame)) {
  ------------------
  |  Branch (1065:9): [True: 4.80k, False: 16.8k]
  |  Branch (1065:40): [True: 4.46k, False: 344]
  |  Branch (1065:59): [True: 189, False: 155]
  ------------------
 1066|  4.65k|        hdr->film_grain.present = dav1d_get_bit(gb);
 1067|  4.65k|        if (hdr->film_grain.present) {
  ------------------
  |  Branch (1067:13): [True: 1.01k, False: 3.63k]
  ------------------
 1068|  1.01k|            const unsigned seed = dav1d_get_bits(gb, 16);
 1069|  1.01k|            hdr->film_grain.update = hdr->frame_type != DAV1D_FRAME_TYPE_INTER || dav1d_get_bit(gb);
  ------------------
  |  Branch (1069:38): [True: 939, False: 78]
  |  Branch (1069:83): [True: 6, False: 72]
  ------------------
 1070|  1.01k|            if (!hdr->film_grain.update) {
  ------------------
  |  Branch (1070:17): [True: 72, False: 945]
  ------------------
 1071|     72|                const int refidx = dav1d_get_bits(gb, 3);
 1072|     72|                int i;
 1073|    332|                for (i = 0; i < 7; i++)
  ------------------
  |  Branch (1073:29): [True: 331, False: 1]
  ------------------
 1074|    331|                    if (hdr->refidx[i] == refidx)
  ------------------
  |  Branch (1074:25): [True: 71, False: 260]
  ------------------
 1075|     71|                        break;
 1076|     72|                if (i == 7 || !c->refs[refidx].p.p.frame_hdr) goto error;
  ------------------
  |  Branch (1076:21): [True: 1, False: 71]
  |  Branch (1076:31): [True: 3, False: 68]
  ------------------
 1077|     68|                hdr->film_grain.data = c->refs[refidx].p.p.frame_hdr->film_grain.data;
 1078|     68|                hdr->film_grain.data.seed = seed;
 1079|    945|            } else {
 1080|    945|                Dav1dFilmGrainData *const fgd = &hdr->film_grain.data;
 1081|    945|                fgd->seed = seed;
 1082|       |
 1083|    945|                fgd->num_y_points = dav1d_get_bits(gb, 4);
 1084|    945|                if (fgd->num_y_points > 14) goto error;
  ------------------
  |  Branch (1084:21): [True: 1, False: 944]
  ------------------
 1085|  1.95k|                for (int i = 0; i < fgd->num_y_points; i++) {
  ------------------
  |  Branch (1085:33): [True: 1.02k, False: 934]
  ------------------
 1086|  1.02k|                    fgd->y_points[i][0] = dav1d_get_bits(gb, 8);
 1087|  1.02k|                    if (i && fgd->y_points[i - 1][0] >= fgd->y_points[i][0])
  ------------------
  |  Branch (1087:25): [True: 489, False: 532]
  |  Branch (1087:30): [True: 10, False: 479]
  ------------------
 1088|     10|                        goto error;
 1089|  1.01k|                    fgd->y_points[i][1] = dav1d_get_bits(gb, 8);
 1090|  1.01k|                }
 1091|       |
 1092|    934|                if (!seqhdr->monochrome)
  ------------------
  |  Branch (1092:21): [True: 663, False: 271]
  ------------------
 1093|    663|                    fgd->chroma_scaling_from_luma = dav1d_get_bit(gb);
 1094|    934|                if (seqhdr->monochrome || fgd->chroma_scaling_from_luma ||
  ------------------
  |  Branch (1094:21): [True: 271, False: 663]
  |  Branch (1094:43): [True: 317, False: 346]
  ------------------
 1095|    346|                    (seqhdr->ss_ver == 1 && seqhdr->ss_hor == 1 && !fgd->num_y_points))
  ------------------
  |  Branch (1095:22): [True: 117, False: 229]
  |  Branch (1095:45): [True: 117, False: 0]
  |  Branch (1095:68): [True: 83, False: 34]
  ------------------
 1096|    671|                {
 1097|    671|                    fgd->num_uv_points[0] = fgd->num_uv_points[1] = 0;
 1098|    777|                } else for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1098:41): [True: 524, False: 253]
  ------------------
 1099|    524|                    fgd->num_uv_points[pl] = dav1d_get_bits(gb, 4);
 1100|    524|                    if (fgd->num_uv_points[pl] > 10) goto error;
  ------------------
  |  Branch (1100:25): [True: 2, False: 522]
  ------------------
 1101|  1.02k|                    for (int i = 0; i < fgd->num_uv_points[pl]; i++) {
  ------------------
  |  Branch (1101:37): [True: 506, False: 514]
  ------------------
 1102|    506|                        fgd->uv_points[pl][i][0] = dav1d_get_bits(gb, 8);
 1103|    506|                        if (i && fgd->uv_points[pl][i - 1][0] >= fgd->uv_points[pl][i][0])
  ------------------
  |  Branch (1103:29): [True: 209, False: 297]
  |  Branch (1103:34): [True: 8, False: 201]
  ------------------
 1104|      8|                            goto error;
 1105|    498|                        fgd->uv_points[pl][i][1] = dav1d_get_bits(gb, 8);
 1106|    498|                    }
 1107|    522|                }
 1108|       |
 1109|    924|                if (seqhdr->ss_hor == 1 && seqhdr->ss_ver == 1 &&
  ------------------
  |  Branch (1109:21): [True: 562, False: 362]
  |  Branch (1109:44): [True: 472, False: 90]
  ------------------
 1110|    472|                    !!fgd->num_uv_points[0] != !!fgd->num_uv_points[1])
  ------------------
  |  Branch (1110:21): [True: 1, False: 471]
  ------------------
 1111|      1|                {
 1112|      1|                    goto error;
 1113|      1|                }
 1114|       |
 1115|    923|                fgd->scaling_shift = dav1d_get_bits(gb, 2) + 8;
 1116|    923|                fgd->ar_coeff_lag = dav1d_get_bits(gb, 2);
 1117|    923|                const int num_y_pos = 2 * fgd->ar_coeff_lag * (fgd->ar_coeff_lag + 1);
 1118|    923|                if (fgd->num_y_points)
  ------------------
  |  Branch (1118:21): [True: 517, False: 406]
  ------------------
 1119|  4.54k|                    for (int i = 0; i < num_y_pos; i++)
  ------------------
  |  Branch (1119:37): [True: 4.02k, False: 517]
  ------------------
 1120|  4.02k|                        fgd->ar_coeffs_y[i] = dav1d_get_bits(gb, 8) - 128;
 1121|  2.76k|                for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (1121:34): [True: 1.84k, False: 923]
  ------------------
 1122|  1.84k|                    if (fgd->num_uv_points[pl] || fgd->chroma_scaling_from_luma) {
  ------------------
  |  Branch (1122:25): [True: 282, False: 1.56k]
  |  Branch (1122:51): [True: 634, False: 930]
  ------------------
 1123|    916|                        const int num_uv_pos = num_y_pos + !!fgd->num_y_points;
 1124|  8.65k|                        for (int i = 0; i < num_uv_pos; i++)
  ------------------
  |  Branch (1124:41): [True: 7.73k, False: 916]
  ------------------
 1125|  7.73k|                            fgd->ar_coeffs_uv[pl][i] = dav1d_get_bits(gb, 8) - 128;
 1126|    916|                        if (!fgd->num_y_points)
  ------------------
  |  Branch (1126:29): [True: 401, False: 515]
  ------------------
 1127|    401|                            fgd->ar_coeffs_uv[pl][num_uv_pos] = 0;
 1128|    916|                    }
 1129|    923|                fgd->ar_coeff_shift = dav1d_get_bits(gb, 2) + 6;
 1130|    923|                fgd->grain_scale_shift = dav1d_get_bits(gb, 2);
 1131|  2.76k|                for (int pl = 0; pl < 2; pl++)
  ------------------
  |  Branch (1131:34): [True: 1.84k, False: 923]
  ------------------
 1132|  1.84k|                    if (fgd->num_uv_points[pl]) {
  ------------------
  |  Branch (1132:25): [True: 282, False: 1.56k]
  ------------------
 1133|    282|                        fgd->uv_mult[pl] = dav1d_get_bits(gb, 8) - 128;
 1134|    282|                        fgd->uv_luma_mult[pl] = dav1d_get_bits(gb, 8) - 128;
 1135|    282|                        fgd->uv_offset[pl] = dav1d_get_bits(gb, 9) - 256;
 1136|    282|                    }
 1137|    923|                fgd->overlap_flag = dav1d_get_bit(gb);
 1138|    923|                fgd->clip_to_restricted_range = dav1d_get_bit(gb);
 1139|    923|            }
 1140|  1.01k|        }
 1141|  4.65k|    }
 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|  21.6k|    return 0;
 1148|       |
 1149|    104|error:
 1150|    104|    dav1d_log(c, "Error parsing frame header\n");
  ------------------
  |  |   39|    104|#define dav1d_log dav1d_log
  ------------------
 1151|    104|    return DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|    104|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
 1152|  21.6k|}
obu.c:read_frame_size:
  343|  21.6k|{
  344|  21.6k|    const Dav1dSequenceHeader *const seqhdr = c->seq_hdr;
  345|  21.6k|    Dav1dFrameHeader *const hdr = c->frame_hdr;
  346|       |
  347|  21.6k|    if (use_ref) {
  ------------------
  |  Branch (347:9): [True: 568, False: 21.1k]
  ------------------
  348|  1.47k|        for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (348:25): [True: 1.46k, False: 10]
  ------------------
  349|  1.46k|            if (dav1d_get_bit(gb)) {
  ------------------
  |  Branch (349:17): [True: 558, False: 905]
  ------------------
  350|    558|                const Dav1dThreadPicture *const ref =
  351|    558|                    &c->refs[c->frame_hdr->refidx[i]].p;
  352|    558|                if (!ref->p.frame_hdr) return -1;
  ------------------
  |  Branch (352:21): [True: 5, False: 553]
  ------------------
  353|    553|                hdr->width[1] = ref->p.frame_hdr->width[1];
  354|    553|                hdr->height = ref->p.frame_hdr->height;
  355|    553|                hdr->render_width = ref->p.frame_hdr->render_width;
  356|    553|                hdr->render_height = ref->p.frame_hdr->render_height;
  357|    553|                hdr->super_res.enabled = seqhdr->super_res && dav1d_get_bit(gb);
  ------------------
  |  Branch (357:42): [True: 178, False: 375]
  |  Branch (357:63): [True: 103, False: 75]
  ------------------
  358|    553|                if (hdr->super_res.enabled) {
  ------------------
  |  Branch (358:21): [True: 103, False: 450]
  ------------------
  359|    103|                    const int d = hdr->super_res.width_scale_denominator =
  360|    103|                        9 + dav1d_get_bits(gb, 3);
  361|    103|                    hdr->width[0] = imax((hdr->width[1] * 8 + (d >> 1)) / d,
  362|    103|                                         imin(16, hdr->width[1]));
  363|    450|                } else {
  364|    450|                    hdr->super_res.width_scale_denominator = 8;
  365|    450|                    hdr->width[0] = hdr->width[1];
  366|    450|                }
  367|    553|                return 0;
  368|    558|            }
  369|  1.46k|        }
  370|    568|    }
  371|       |
  372|  21.1k|    if (hdr->frame_size_override) {
  ------------------
  |  Branch (372:9): [True: 2.67k, False: 18.4k]
  ------------------
  373|  2.67k|        hdr->width[1] = dav1d_get_bits(gb, seqhdr->width_n_bits) + 1;
  374|  2.67k|        hdr->height = dav1d_get_bits(gb, seqhdr->height_n_bits) + 1;
  375|  18.4k|    } else {
  376|  18.4k|        hdr->width[1] = seqhdr->max_width;
  377|  18.4k|        hdr->height = seqhdr->max_height;
  378|  18.4k|    }
  379|  21.1k|    hdr->super_res.enabled = seqhdr->super_res && dav1d_get_bit(gb);
  ------------------
  |  Branch (379:30): [True: 8.83k, False: 12.2k]
  |  Branch (379:51): [True: 4.14k, False: 4.69k]
  ------------------
  380|  21.1k|    if (hdr->super_res.enabled) {
  ------------------
  |  Branch (380:9): [True: 4.14k, False: 16.9k]
  ------------------
  381|  4.14k|        const int d = hdr->super_res.width_scale_denominator = 9 + dav1d_get_bits(gb, 3);
  382|  4.14k|        hdr->width[0] = imax((hdr->width[1] * 8 + (d >> 1)) / d, imin(16, hdr->width[1]));
  383|  16.9k|    } else {
  384|  16.9k|        hdr->super_res.width_scale_denominator = 8;
  385|  16.9k|        hdr->width[0] = hdr->width[1];
  386|  16.9k|    }
  387|  21.1k|    hdr->have_render_size = dav1d_get_bit(gb);
  388|  21.1k|    if (hdr->have_render_size) {
  ------------------
  |  Branch (388:9): [True: 7.21k, False: 13.9k]
  ------------------
  389|  7.21k|        hdr->render_width = dav1d_get_bits(gb, 16) + 1;
  390|  7.21k|        hdr->render_height = dav1d_get_bits(gb, 16) + 1;
  391|  13.9k|    } else {
  392|  13.9k|        hdr->render_width = hdr->width[1];
  393|  13.9k|        hdr->render_height = hdr->height;
  394|  13.9k|    }
  395|  21.1k|    return 0;
  396|  21.6k|}
obu.c:tile_log2:
  398|   103k|static inline int tile_log2(const int sz, const int tgt) {
  399|   103k|    int k;
  400|   150k|    for (k = 0; (sz << k) < tgt; k++) ;
  ------------------
  |  Branch (400:17): [True: 47.8k, False: 103k]
  ------------------
  401|   103k|    return k;
  402|   103k|}
obu.c:check_trailing_bits:
   50|  18.8k|{
   51|  18.8k|    const int trailing_one_bit = dav1d_get_bit(gb);
   52|       |
   53|  18.8k|    if (gb->error)
  ------------------
  |  Branch (53:9): [True: 444, False: 18.3k]
  ------------------
   54|    444|        return DAV1D_ERR(EINVAL);
  ------------------
  |  |   58|    444|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
   55|       |
   56|  18.3k|    if (!strict_std_compliance)
  ------------------
  |  Branch (56:9): [True: 18.3k, False: 0]
  ------------------
   57|  18.3k|        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);
  ------------------
  |  |   58|      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);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
   68|       |
   69|      0|    return 0;
   70|      0|}
obu.c:parse_tile_hdr:
 1154|  19.2k|static void parse_tile_hdr(Dav1dContext *const c, GetBits *const gb) {
 1155|  19.2k|    const int n_tiles = c->frame_hdr->tiling.cols * c->frame_hdr->tiling.rows;
 1156|  19.2k|    const int have_tile_pos = n_tiles > 1 ? dav1d_get_bit(gb) : 0;
  ------------------
  |  Branch (1156:31): [True: 1.11k, False: 18.0k]
  ------------------
 1157|       |
 1158|  19.2k|    if (have_tile_pos) {
  ------------------
  |  Branch (1158:9): [True: 145, False: 19.0k]
  ------------------
 1159|    145|        const int n_bits = c->frame_hdr->tiling.log2_cols +
 1160|    145|                           c->frame_hdr->tiling.log2_rows;
 1161|    145|        c->tile[c->n_tile_data].start = dav1d_get_bits(gb, n_bits);
 1162|    145|        c->tile[c->n_tile_data].end = dav1d_get_bits(gb, n_bits);
 1163|  19.0k|    } else {
 1164|  19.0k|        c->tile[c->n_tile_data].start = 0;
 1165|  19.0k|        c->tile[c->n_tile_data].end = n_tiles - 1;
 1166|  19.0k|    }
 1167|  19.2k|}

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

dav1d_default_picture_alloc:
   46|  22.4k|int dav1d_default_picture_alloc(Dav1dPicture *const p, void *const cookie) {
   47|  22.4k|    const int hbd = p->p.bpc > 8;
   48|  22.4k|    const int aligned_w = (p->p.w + 127) & ~127;
   49|  22.4k|    const int aligned_h = (p->p.h + 127) & ~127;
   50|  22.4k|    const int has_chroma = p->p.layout != DAV1D_PIXEL_LAYOUT_I400;
   51|  22.4k|    const int ss_ver = p->p.layout == DAV1D_PIXEL_LAYOUT_I420;
   52|  22.4k|    const int ss_hor = p->p.layout != DAV1D_PIXEL_LAYOUT_I444;
   53|  22.4k|    ptrdiff_t y_stride = aligned_w << hbd;
   54|  22.4k|    ptrdiff_t uv_stride = has_chroma ? y_stride >> ss_hor : 0;
  ------------------
  |  Branch (54:27): [True: 15.8k, False: 6.59k]
  ------------------
   55|       |    /* Due to how mapping of addresses to sets works in most L1 and L2 cache
   56|       |     * implementations, strides of multiples of certain power-of-two numbers
   57|       |     * may cause multiple rows of the same superblock to map to the same set,
   58|       |     * causing evictions of previous rows resulting in a reduction in cache
   59|       |     * hit rate. Avoid that by slightly padding the stride when necessary. */
   60|  22.4k|    if (!(y_stride & 1023))
  ------------------
  |  Branch (60:9): [True: 2.23k, False: 20.2k]
  ------------------
   61|  2.23k|        y_stride += DAV1D_PICTURE_ALIGNMENT;
  ------------------
  |  |   44|  2.23k|#define DAV1D_PICTURE_ALIGNMENT 64
  ------------------
   62|  22.4k|    if (!(uv_stride & 1023) && has_chroma)
  ------------------
  |  Branch (62:9): [True: 7.93k, False: 14.5k]
  |  Branch (62:32): [True: 1.34k, False: 6.59k]
  ------------------
   63|  1.34k|        uv_stride += DAV1D_PICTURE_ALIGNMENT;
  ------------------
  |  |   44|  1.34k|#define DAV1D_PICTURE_ALIGNMENT 64
  ------------------
   64|  22.4k|    p->stride[0] = y_stride;
   65|  22.4k|    p->stride[1] = uv_stride;
   66|  22.4k|    const size_t y_sz = y_stride * aligned_h;
   67|  22.4k|    const size_t uv_sz = uv_stride * (aligned_h >> ss_ver);
   68|  22.4k|    const size_t pic_size = y_sz + 2 * uv_sz;
   69|       |
   70|  22.4k|    uint8_t *const buf = dav1d_mem_pool_pop(cookie, pic_size + DAV1D_PICTURE_ALIGNMENT);
  ------------------
  |  |   44|  22.4k|#define DAV1D_PICTURE_ALIGNMENT 64
  ------------------
   71|  22.4k|    if (!buf) return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  |  Branch (71:9): [True: 0, False: 22.4k]
  ------------------
   72|  22.4k|    p->allocator_data = buf;
   73|  22.4k|    p->data[0] = buf;
   74|  22.4k|    p->data[1] = has_chroma ? buf + y_sz : NULL;
  ------------------
  |  Branch (74:18): [True: 15.8k, False: 6.59k]
  ------------------
   75|  22.4k|    p->data[2] = has_chroma ? buf + y_sz + uv_sz : NULL;
  ------------------
  |  Branch (75:18): [True: 15.8k, False: 6.59k]
  ------------------
   76|       |
   77|  22.4k|    return 0;
   78|  22.4k|}
dav1d_default_picture_release:
   80|  22.4k|void dav1d_default_picture_release(Dav1dPicture *const p, void *const cookie) {
   81|  22.4k|    dav1d_mem_pool_push(cookie, p->allocator_data);
   82|  22.4k|}
dav1d_picture_free_itut_t35:
   99|     59|void dav1d_picture_free_itut_t35(const uint8_t *const data, void *const user_data) {
  100|     59|    struct itut_t35_ctx_context *itut_t35_ctx = user_data;
  101|       |
  102|    118|    for (size_t i = 0; i < itut_t35_ctx->n_itut_t35; i++)
  ------------------
  |  Branch (102:24): [True: 59, False: 59]
  ------------------
  103|     59|        dav1d_free(itut_t35_ctx->itut_t35[i].payload);
  ------------------
  |  |  135|     59|#define dav1d_free(ptr) free(ptr)
  ------------------
  104|     59|    dav1d_free(itut_t35_ctx->itut_t35);
  ------------------
  |  |  135|     59|#define dav1d_free(ptr) free(ptr)
  ------------------
  105|     59|    dav1d_free(itut_t35_ctx);
  ------------------
  |  |  135|     59|#define dav1d_free(ptr) free(ptr)
  ------------------
  106|     59|}
dav1d_picture_copy_props:
  164|  21.3k|{
  165|  21.3k|    dav1d_data_props_copy(&p->m, props);
  166|       |
  167|  21.3k|    dav1d_ref_dec(&p->content_light_ref);
  168|  21.3k|    p->content_light_ref = content_light_ref;
  169|  21.3k|    p->content_light = content_light;
  170|  21.3k|    if (content_light_ref) dav1d_ref_inc(content_light_ref);
  ------------------
  |  Branch (170:9): [True: 75, False: 21.2k]
  ------------------
  171|       |
  172|  21.3k|    dav1d_ref_dec(&p->mastering_display_ref);
  173|  21.3k|    p->mastering_display_ref = mastering_display_ref;
  174|  21.3k|    p->mastering_display = mastering_display;
  175|  21.3k|    if (mastering_display_ref) dav1d_ref_inc(mastering_display_ref);
  ------------------
  |  Branch (175:9): [True: 74, False: 21.2k]
  ------------------
  176|       |
  177|  21.3k|    dav1d_ref_dec(&p->itut_t35_ref);
  178|  21.3k|    p->itut_t35_ref = itut_t35_ref;
  179|  21.3k|    p->itut_t35 = itut_t35;
  180|  21.3k|    p->n_itut_t35 = n_itut_t35;
  181|  21.3k|    if (itut_t35_ref) dav1d_ref_inc(itut_t35_ref);
  ------------------
  |  Branch (181:9): [True: 69, False: 21.2k]
  ------------------
  182|  21.3k|}
dav1d_thread_picture_alloc:
  186|  19.0k|{
  187|  19.0k|    Dav1dThreadPicture *const p = &f->sr_cur;
  188|       |
  189|  19.0k|    const int res = picture_alloc(c, &p->p, f->frame_hdr->width[1], f->frame_hdr->height,
  190|  19.0k|                                  f->seq_hdr, f->seq_hdr_ref,
  191|  19.0k|                                  f->frame_hdr, f->frame_hdr_ref,
  192|  19.0k|                                  bpc, &f->tile[0].data.m, &c->allocator,
  193|  19.0k|                                  (void **) &p->progress);
  194|  19.0k|    if (res) return res;
  ------------------
  |  Branch (194:9): [True: 0, False: 19.0k]
  ------------------
  195|       |
  196|       |    // Don't clear these flags from c->frame_flags if the frame is not going to be output.
  197|       |    // This way they will be added to the next visible frame too.
  198|  19.0k|    const int flags_mask = ((f->frame_hdr->show_frame || c->output_invisible_frames) &&
  ------------------
  |  Branch (198:30): [True: 17.7k, False: 1.28k]
  |  Branch (198:58): [True: 0, False: 1.28k]
  ------------------
  199|  17.7k|                            c->max_spatial_id == f->frame_hdr->spatial_id)
  ------------------
  |  Branch (199:29): [True: 12.2k, False: 5.52k]
  ------------------
  200|  19.0k|                           ? 0 : (PICTURE_FLAG_NEW_SEQUENCE | PICTURE_FLAG_NEW_OP_PARAMS_INFO);
  201|  19.0k|    p->flags = c->frame_flags;
  202|  19.0k|    c->frame_flags &= flags_mask;
  203|       |
  204|  19.0k|    p->visible = f->frame_hdr->show_frame;
  205|  19.0k|    p->showable = f->frame_hdr->showable_frame;
  206|       |
  207|  19.0k|    if (p->visible) {
  ------------------
  |  Branch (207:9): [True: 17.7k, False: 1.28k]
  ------------------
  208|       |        // Only add HDR10+ and T35 metadata when show frame flag is enabled
  209|  17.7k|        dav1d_picture_copy_props(&p->p, c->content_light, c->content_light_ref,
  210|  17.7k|                                 c->mastering_display, c->mastering_display_ref,
  211|  17.7k|                                 c->itut_t35, c->itut_t35_ref, c->n_itut_t35,
  212|  17.7k|                                 &f->tile[0].data.m);
  213|       |
  214|       |        // Must be removed from the context after being attached to the frame
  215|  17.7k|        dav1d_ref_dec(&c->itut_t35_ref);
  216|  17.7k|        c->itut_t35 = NULL;
  217|  17.7k|        c->n_itut_t35 = 0;
  218|  17.7k|    } else {
  219|  1.28k|        dav1d_data_props_copy(&p->p.m, &f->tile[0].data.m);
  220|  1.28k|    }
  221|       |
  222|  19.0k|    if (c->n_fc > 1) {
  ------------------
  |  Branch (222:9): [True: 0, False: 19.0k]
  ------------------
  223|      0|        atomic_init(&p->progress[0], 0);
  224|       |        atomic_init(&p->progress[1], 0);
  225|      0|    }
  226|  19.0k|    return res;
  227|  19.0k|}
dav1d_picture_alloc_copy:
  231|  3.46k|{
  232|  3.46k|    struct pic_ctx_context *const pic_ctx = (struct pic_ctx_context*)src->ref->const_data;
  233|  3.46k|    const int res = picture_alloc(c, dst, w, src->p.h,
  234|  3.46k|                                  src->seq_hdr, src->seq_hdr_ref,
  235|  3.46k|                                  src->frame_hdr, src->frame_hdr_ref,
  236|  3.46k|                                  src->p.bpc, &src->m, &pic_ctx->allocator,
  237|  3.46k|                                  NULL);
  238|  3.46k|    if (res) return res;
  ------------------
  |  Branch (238:9): [True: 0, False: 3.46k]
  ------------------
  239|       |
  240|  3.46k|    dav1d_picture_copy_props(dst, src->content_light, src->content_light_ref,
  241|  3.46k|                             src->mastering_display, src->mastering_display_ref,
  242|  3.46k|                             src->itut_t35, src->itut_t35_ref, src->n_itut_t35,
  243|  3.46k|                             &src->m);
  244|       |
  245|  3.46k|    return 0;
  246|  3.46k|}
dav1d_picture_ref:
  248|   193k|void dav1d_picture_ref(Dav1dPicture *const dst, const Dav1dPicture *const src) {
  249|   193k|    assert(dst != NULL);
  ------------------
  |  |  140|   193k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 193k]
  |  |  |  Branch (140:68): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  250|   193k|    assert(dst->data[0] == NULL);
  ------------------
  |  |  140|   193k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 193k]
  |  |  |  Branch (140:68): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  251|   193k|    assert(src != NULL);
  ------------------
  |  |  140|   193k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 193k]
  |  |  |  Branch (140:68): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  252|       |
  253|   193k|    if (src->ref) {
  ------------------
  |  Branch (253:9): [True: 193k, False: 0]
  ------------------
  254|   193k|        assert(src->data[0] != NULL);
  ------------------
  |  |  140|   193k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 193k]
  |  |  |  Branch (140:68): [Folded, False: 193k]
  |  |  ------------------
  ------------------
  255|   193k|        dav1d_ref_inc(src->ref);
  256|   193k|    }
  257|   193k|    if (src->frame_hdr_ref) dav1d_ref_inc(src->frame_hdr_ref);
  ------------------
  |  Branch (257:9): [True: 193k, False: 0]
  ------------------
  258|   193k|    if (src->seq_hdr_ref) dav1d_ref_inc(src->seq_hdr_ref);
  ------------------
  |  Branch (258:9): [True: 193k, False: 0]
  ------------------
  259|   193k|    if (src->m.user_data.ref) dav1d_ref_inc(src->m.user_data.ref);
  ------------------
  |  Branch (259:9): [True: 0, False: 193k]
  ------------------
  260|   193k|    if (src->content_light_ref) dav1d_ref_inc(src->content_light_ref);
  ------------------
  |  Branch (260:9): [True: 473, False: 192k]
  ------------------
  261|   193k|    if (src->mastering_display_ref) dav1d_ref_inc(src->mastering_display_ref);
  ------------------
  |  Branch (261:9): [True: 378, False: 192k]
  ------------------
  262|   193k|    if (src->itut_t35_ref) dav1d_ref_inc(src->itut_t35_ref);
  ------------------
  |  Branch (262:9): [True: 437, False: 192k]
  ------------------
  263|   193k|    *dst = *src;
  264|   193k|}
dav1d_picture_move_ref:
  266|  13.5k|void dav1d_picture_move_ref(Dav1dPicture *const dst, Dav1dPicture *const src) {
  267|  13.5k|    assert(dst != NULL);
  ------------------
  |  |  140|  13.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 13.5k]
  |  |  |  Branch (140:68): [Folded, False: 13.5k]
  |  |  ------------------
  ------------------
  268|  13.5k|    assert(dst->data[0] == NULL);
  ------------------
  |  |  140|  13.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 13.5k]
  |  |  |  Branch (140:68): [Folded, False: 13.5k]
  |  |  ------------------
  ------------------
  269|  13.5k|    assert(src != NULL);
  ------------------
  |  |  140|  13.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 13.5k]
  |  |  |  Branch (140:68): [Folded, False: 13.5k]
  |  |  ------------------
  ------------------
  270|       |
  271|  13.5k|    if (src->ref)
  ------------------
  |  Branch (271:9): [True: 13.5k, False: 0]
  ------------------
  272|  13.5k|        assert(src->data[0] != NULL);
  ------------------
  |  |  140|  13.5k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 13.5k]
  |  |  |  Branch (140:68): [Folded, False: 13.5k]
  |  |  ------------------
  ------------------
  273|       |
  274|  13.5k|    *dst = *src;
  275|  13.5k|    memset(src, 0, sizeof(*src));
  276|  13.5k|}
dav1d_thread_picture_ref:
  280|   176k|{
  281|   176k|    dav1d_picture_ref(&dst->p, &src->p);
  282|   176k|    dst->visible = src->visible;
  283|   176k|    dst->showable = src->showable;
  284|   176k|    dst->progress = src->progress;
  285|   176k|    dst->flags = src->flags;
  286|   176k|}
dav1d_thread_picture_move_ref:
  290|    492|{
  291|    492|    dav1d_picture_move_ref(&dst->p, &src->p);
  292|    492|    dst->visible = src->visible;
  293|    492|    dst->showable = src->showable;
  294|    492|    dst->progress = src->progress;
  295|    492|    dst->flags = src->flags;
  296|    492|    memset(src, 0, sizeof(*src));
  297|    492|}
dav1d_picture_unref_internal:
  299|   250k|void dav1d_picture_unref_internal(Dav1dPicture *const p) {
  300|   250k|    validate_input(p != NULL);
  ------------------
  |  |   59|   250k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|   250k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 250k]
  |  |  |  |  ------------------
  |  |  |  |   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|    }
  |  |  ------------------
  ------------------
  301|       |
  302|   250k|    if (p->ref) {
  ------------------
  |  Branch (302:9): [True: 215k, False: 35.1k]
  ------------------
  303|   215k|        validate_input(p->data[0] != NULL);
  ------------------
  |  |   59|   215k|#define validate_input(x) validate_input_or_ret(x, )
  |  |  ------------------
  |  |  |  |   52|   215k|    if (!(x)) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:9): [True: 0, False: 215k]
  |  |  |  |  ------------------
  |  |  |  |   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|    }
  |  |  ------------------
  ------------------
  304|   215k|        dav1d_ref_dec(&p->ref);
  305|   215k|    }
  306|   250k|    dav1d_ref_dec(&p->seq_hdr_ref);
  307|   250k|    dav1d_ref_dec(&p->frame_hdr_ref);
  308|   250k|    dav1d_ref_dec(&p->m.user_data.ref);
  309|   250k|    dav1d_ref_dec(&p->content_light_ref);
  310|   250k|    dav1d_ref_dec(&p->mastering_display_ref);
  311|   250k|    dav1d_ref_dec(&p->itut_t35_ref);
  312|   250k|    memset(p, 0, sizeof(*p));
  313|   250k|    dav1d_data_props_set_defaults(&p->m);
  314|   250k|}
dav1d_thread_picture_unref:
  316|   205k|void dav1d_thread_picture_unref(Dav1dThreadPicture *const p) {
  317|   205k|    dav1d_picture_unref_internal(&p->p);
  318|       |
  319|       |    p->progress = NULL;
  320|   205k|}
dav1d_picture_get_event_flags:
  322|  17.8k|enum Dav1dEventFlags dav1d_picture_get_event_flags(const Dav1dThreadPicture *const p) {
  323|  17.8k|    if (!p->flags)
  ------------------
  |  Branch (323:9): [True: 3.60k, False: 14.2k]
  ------------------
  324|  3.60k|        return 0;
  325|       |
  326|  14.2k|    enum Dav1dEventFlags flags = 0;
  327|  14.2k|    if (p->flags & PICTURE_FLAG_NEW_SEQUENCE)
  ------------------
  |  Branch (327:9): [True: 13.5k, False: 680]
  ------------------
  328|  13.5k|       flags |= DAV1D_EVENT_FLAG_NEW_SEQUENCE;
  329|  14.2k|    if (p->flags & PICTURE_FLAG_NEW_OP_PARAMS_INFO)
  ------------------
  |  Branch (329:9): [True: 0, False: 14.2k]
  ------------------
  330|      0|       flags |= DAV1D_EVENT_FLAG_NEW_OP_PARAMS_INFO;
  331|       |
  332|  14.2k|    return flags;
  333|  17.8k|}
picture.c:picture_alloc:
  117|  22.4k|{
  118|  22.4k|    if (p->data[0]) {
  ------------------
  |  Branch (118:9): [True: 0, False: 22.4k]
  ------------------
  119|      0|        dav1d_log(c, "Picture already allocated!\n");
  ------------------
  |  |   39|      0|#define dav1d_log dav1d_log
  ------------------
  120|      0|        return -1;
  121|      0|    }
  122|  22.4k|    assert(bpc > 0 && bpc <= 16);
  ------------------
  |  |  140|  44.9k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 22.4k, False: 0]
  |  |  |  Branch (140:30): [True: 22.4k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  123|       |
  124|  22.4k|    size_t extra = c->n_fc > 1 ? sizeof(atomic_int) * 2 : 0;
  ------------------
  |  Branch (124:20): [True: 0, False: 22.4k]
  ------------------
  125|  22.4k|    struct pic_ctx_context *pic_ctx = dav1d_mem_pool_pop(c->pic_ctx_pool, extra +
  126|  22.4k|                                                         sizeof(struct pic_ctx_context));
  127|  22.4k|    if (!pic_ctx)
  ------------------
  |  Branch (127:9): [True: 0, False: 22.4k]
  ------------------
  128|      0|        return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  129|       |
  130|  22.4k|    p->p.w = w;
  131|  22.4k|    p->p.h = h;
  132|  22.4k|    p->seq_hdr = seq_hdr;
  133|  22.4k|    p->frame_hdr = frame_hdr;
  134|  22.4k|    p->p.layout = seq_hdr->layout;
  135|  22.4k|    p->p.bpc = bpc;
  136|  22.4k|    dav1d_data_props_set_defaults(&p->m);
  137|  22.4k|    const int res = p_allocator->alloc_picture_callback(p, p_allocator->cookie);
  138|  22.4k|    if (res < 0) {
  ------------------
  |  Branch (138:9): [True: 0, False: 22.4k]
  ------------------
  139|      0|        dav1d_mem_pool_push(c->pic_ctx_pool, pic_ctx);
  140|      0|        return res;
  141|      0|    }
  142|       |
  143|  22.4k|    pic_ctx->allocator = *p_allocator;
  144|  22.4k|    pic_ctx->pic = *p;
  145|  22.4k|    p->ref = dav1d_ref_init(&pic_ctx->ref, pic_ctx, free_buffer, c->pic_ctx_pool, 0);
  146|       |
  147|  22.4k|    p->seq_hdr_ref = seq_hdr_ref;
  148|  22.4k|    if (seq_hdr_ref) dav1d_ref_inc(seq_hdr_ref);
  ------------------
  |  Branch (148:9): [True: 22.4k, False: 0]
  ------------------
  149|       |
  150|  22.4k|    p->frame_hdr_ref = frame_hdr_ref;
  151|  22.4k|    if (frame_hdr_ref) dav1d_ref_inc(frame_hdr_ref);
  ------------------
  |  Branch (151:9): [True: 22.4k, False: 0]
  ------------------
  152|       |
  153|  22.4k|    if (extra && extra_ptr)
  ------------------
  |  Branch (153:9): [True: 0, False: 22.4k]
  |  Branch (153:18): [True: 0, False: 0]
  ------------------
  154|      0|        *extra_ptr = &pic_ctx->extra_data;
  155|       |
  156|  22.4k|    return 0;
  157|  22.4k|}
picture.c:free_buffer:
   91|  22.4k|static void free_buffer(const uint8_t *const data, void *const user_data) {
   92|  22.4k|    struct pic_ctx_context *pic_ctx = (struct pic_ctx_context*)data;
   93|       |
   94|  22.4k|    pic_ctx->allocator.release_picture_callback(&pic_ctx->pic,
   95|  22.4k|                                                pic_ctx->allocator.cookie);
   96|  22.4k|    dav1d_mem_pool_push(user_data, pic_ctx);
   97|  22.4k|}

dav1d_init_qm_tables:
 4684|      1|COLD void dav1d_init_qm_tables(void) {
 4685|       |    // This function is guaranteed to be called only once
 4686|       |
 4687|     16|    for (int i = 0; i < 15; i++)
  ------------------
  |  Branch (4687:21): [True: 15, False: 1]
  ------------------
 4688|     45|        for (int j = 0; j < 2; j++) {
  ------------------
  |  Branch (4688:25): [True: 30, False: 15]
  ------------------
 4689|       |            // note that the w/h in the assignment is inverted, this is on purpose
 4690|       |            // because we store coefficients transposed
 4691|     30|            dav1d_qm_tbl[i][j][RTX_4X8  ] = qm_tbl_8x4[i][j];
 4692|     30|            dav1d_qm_tbl[i][j][RTX_8X4  ] = qm_tbl_4x8[i][j];
 4693|     30|            dav1d_qm_tbl[i][j][RTX_4X16 ] = qm_tbl_16x4[i][j];
 4694|     30|            dav1d_qm_tbl[i][j][RTX_16X4 ] = qm_tbl_4x16[i][j];
 4695|     30|            dav1d_qm_tbl[i][j][RTX_8X16 ] = qm_tbl_16x8[i][j];
 4696|     30|            dav1d_qm_tbl[i][j][RTX_16X8 ] = qm_tbl_8x16[i][j];
 4697|     30|            dav1d_qm_tbl[i][j][RTX_8X32 ] = qm_tbl_32x8[i][j];
 4698|     30|            dav1d_qm_tbl[i][j][RTX_32X8 ] = qm_tbl_8x32[i][j];
 4699|     30|            dav1d_qm_tbl[i][j][RTX_16X32] = qm_tbl_32x16[i][j];
 4700|     30|            dav1d_qm_tbl[i][j][RTX_32X16] = qm_tbl_16x32[i][j];
 4701|       |
 4702|     30|            dav1d_qm_tbl[i][j][ TX_4X4  ] = qm_tbl_4x4[i][j];
 4703|     30|            dav1d_qm_tbl[i][j][ TX_8X8  ] = qm_tbl_8x8[i][j];
 4704|     30|            dav1d_qm_tbl[i][j][ TX_16X16] = qm_tbl_16x16[i][j];
 4705|     30|            dav1d_qm_tbl[i][j][ TX_32X32] = qm_tbl_32x32[i][j];
 4706|       |
 4707|     30|            dav1d_qm_tbl[i][j][ TX_64X64] = dav1d_qm_tbl[i][j][ TX_32X32];
 4708|     30|            dav1d_qm_tbl[i][j][RTX_64X32] = dav1d_qm_tbl[i][j][ TX_32X32];
 4709|     30|            dav1d_qm_tbl[i][j][RTX_64X16] = dav1d_qm_tbl[i][j][RTX_32X16];
 4710|     30|            dav1d_qm_tbl[i][j][RTX_32X64] = dav1d_qm_tbl[i][j][ TX_32X32];
 4711|     30|            dav1d_qm_tbl[i][j][RTX_16X64] = dav1d_qm_tbl[i][j][RTX_16X32];
 4712|     30|        }
 4713|       |
 4714|       |    // dav1d_qm_tbl[15][*][*] == NULL
 4715|      1|}

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: 462k, False: 90.3k]
  ------------------
 1192|   462k|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1192:29): [True: 447k, False: 14.6k]
  |  Branch (1192:45): [True: 7.30k, False: 7.30k]
  ------------------
 1193|   455k|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1193:29): [True: 444k, False: 10.5k]
  |  Branch (1193:45): [True: 5.27k, False: 5.28k]
  ------------------
 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: 566k, False: 552k]
  ------------------
 1204|   566k|        const int sub_h4 = imin(h4, 16 + init_y);
 1205|   566k|        const int sub_ch4 = imin(ch4, (init_y + 16) >> ss_ver);
 1206|  1.15M|        for (int init_x = 0; init_x < w4; init_x += 16) {
  ------------------
  |  Branch (1206:30): [True: 588k, False: 566k]
  ------------------
 1207|   588k|            if (b->pal_sz[0]) {
  ------------------
  |  Branch (1207:17): [True: 6.19k, False: 582k]
  ------------------
 1208|  6.19k|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1209|  6.19k|                             4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
  ------------------
  |  |   53|  6.19k|#define PXSTRIDE(x) (x)
  ------------------
 1210|  6.19k|                const uint8_t *pal_idx;
 1211|  6.19k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1211:21): [True: 0, False: 6.19k]
  ------------------
 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.19k|                } else {
 1217|  6.19k|                    pal_idx = t->scratch.pal_idx_y;
 1218|  6.19k|                }
 1219|  6.19k|                const pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (1219:42): [True: 0, False: 6.19k]
  ------------------
 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.19k|                    bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  6.19k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  6.19k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1223|  6.19k|                f->dsp->ipred.pal_pred(dst, f->cur.stride[0], pal,
 1224|  6.19k|                                       pal_idx, bw4 * 4, bh4 * 4);
 1225|  6.19k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  6.19k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 6.19k]
  |  |  ------------------
  |  |   35|  6.19k|        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.19k|        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.19k|            }
 1229|       |
 1230|   588k|            const int intra_flags = (sm_flag(t->a, bx4) |
 1231|   588k|                                     sm_flag(&t->l, by4) |
 1232|   588k|                                     intra_edge_filter_flag);
 1233|   588k|            const int sb_has_tr = init_x + 16 < w4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1233:35): [True: 22.2k, False: 566k]
  |  Branch (1233:58): [True: 13.2k, False: 552k]
  ------------------
 1234|   566k|                              intra_edge_flags & EDGE_I444_TOP_HAS_RIGHT;
 1235|   588k|            const int sb_has_bl = init_x ? 0 : init_y + 16 < h4 ? 1 :
  ------------------
  |  Branch (1235:35): [True: 22.2k, False: 566k]
  |  Branch (1235:48): [True: 13.2k, False: 552k]
  ------------------
 1236|   566k|                              intra_edge_flags & EDGE_I444_LEFT_HAS_BOTTOM;
 1237|   588k|            int y, x;
 1238|   588k|            const int sub_w4 = imin(w4, init_x + 16);
 1239|  1.30M|            for (y = init_y, t->by += init_y; y < sub_h4;
  ------------------
  |  Branch (1239:47): [True: 713k, False: 588k]
  ------------------
 1240|   713k|                 y += t_dim->h, t->by += t_dim->h)
 1241|   713k|            {
 1242|   713k|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1243|   713k|                               4 * (t->by * PXSTRIDE(f->cur.stride[0]) +
  ------------------
  |  |   53|   713k|#define PXSTRIDE(x) (x)
  ------------------
 1244|   713k|                                    t->bx + init_x);
 1245|  1.92M|                for (x = init_x, t->bx += init_x; x < sub_w4;
  ------------------
  |  Branch (1245:51): [True: 1.21M, False: 713k]
  ------------------
 1246|  1.21M|                     x += t_dim->w, t->bx += t_dim->w)
 1247|  1.21M|                {
 1248|  1.21M|                    if (b->pal_sz[0]) goto skip_y_pred;
  ------------------
  |  Branch (1248:25): [True: 12.5k, False: 1.20M]
  ------------------
 1249|       |
 1250|  1.20M|                    int angle = b->y_angle;
 1251|  1.20M|                    const enum EdgeFlags edge_flags =
 1252|  1.20M|                        (((y > init_y || !sb_has_tr) && (x + t_dim->w >= sub_w4)) ?
  ------------------
  |  Branch (1252:28): [True: 482k, False: 719k]
  |  Branch (1252:42): [True: 245k, False: 473k]
  |  Branch (1252:57): [True: 319k, False: 408k]
  ------------------
 1253|   882k|                             0 : EDGE_I444_TOP_HAS_RIGHT) |
 1254|  1.20M|                        ((x > init_x || (!sb_has_bl && y + t_dim->h >= sub_h4)) ?
  ------------------
  |  Branch (1254:27): [True: 496k, False: 705k]
  |  Branch (1254:42): [True: 407k, False: 298k]
  |  Branch (1254:56): [True: 324k, False: 83.1k]
  ------------------
 1255|   820k|                             0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1256|  1.20M|                    const pixel *top_sb_edge = NULL;
 1257|  1.20M|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1257:25): [True: 221k, False: 980k]
  ------------------
 1258|   221k|                        top_sb_edge = f->ipred_edge[0];
 1259|   221k|                        const int sby = t->by >> f->sb_shift;
 1260|   221k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1261|   221k|                    }
 1262|  1.20M|                    const enum IntraPredMode m =
 1263|  1.20M|                        bytefn(dav1d_prepare_intra_edges)(t->bx,
  ------------------
  |  |   87|  1.20M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  1.20M|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1264|  1.20M|                                                          t->bx > ts->tiling.col_start,
 1265|  1.20M|                                                          t->by,
 1266|  1.20M|                                                          t->by > ts->tiling.row_start,
 1267|  1.20M|                                                          ts->tiling.col_end,
 1268|  1.20M|                                                          ts->tiling.row_end,
 1269|  1.20M|                                                          edge_flags, dst,
 1270|  1.20M|                                                          f->cur.stride[0], top_sb_edge,
 1271|  1.20M|                                                          b->y_mode, &angle,
 1272|  1.20M|                                                          t_dim->w, t_dim->h,
 1273|  1.20M|                                                          f->seq_hdr->intra_edge_filter,
 1274|  1.20M|                                                          edge HIGHBD_CALL_SUFFIX);
 1275|  1.20M|                    dsp->ipred.intra_pred[m](dst, f->cur.stride[0], edge,
 1276|  1.20M|                                             t_dim->w * 4, t_dim->h * 4,
 1277|  1.20M|                                             angle | intra_flags,
 1278|  1.20M|                                             4 * f->bw - 4 * t->bx,
 1279|  1.20M|                                             4 * f->bh - 4 * t->by
 1280|  1.20M|                                             HIGHBD_CALL_SUFFIX);
 1281|       |
 1282|  1.20M|                    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  1.20M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.20M]
  |  |  ------------------
  |  |   35|  1.20M|        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.20M|        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.21M|                skip_y_pred: {}
 1293|  1.21M|                    if (!b->skip) {
  ------------------
  |  Branch (1293:25): [True: 631k, False: 583k]
  ------------------
 1294|   631k|                        coef *cf;
 1295|   631k|                        int eob;
 1296|   631k|                        enum TxfmType txtp;
 1297|   631k|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1297:29): [True: 0, False: 631k]
  ------------------
 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|   631k|                        } else {
 1305|   631k|                            uint8_t cf_ctx;
 1306|   631k|                            cf = bitfn(t->cf);
  ------------------
  |  |   51|   631k|#define bitfn(x) x##_8bpc
  ------------------
 1307|   631k|                            eob = decode_coefs(t, &t->a->lcoef[bx4 + x],
 1308|   631k|                                               &t->l.lcoef[by4 + y], b->tx, bs,
 1309|   631k|                                               b, 1, 0, cf, &txtp, &cf_ctx);
 1310|   631k|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   631k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 631k]
  |  |  ------------------
  |  |   35|   631k|        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|   631k|        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|   631k|                            dav1d_memset_likely_pow2(&t->a->lcoef[bx4 + x], cf_ctx, imin(t_dim->w, f->bw - t->bx));
 1314|   631k|                            dav1d_memset_likely_pow2(&t->l.lcoef[by4 + y], cf_ctx, imin(t_dim->h, f->bh - t->by));
 1315|   631k|                        }
 1316|   631k|                        if (eob >= 0) {
  ------------------
  |  Branch (1316:29): [True: 441k, False: 189k]
  ------------------
 1317|   441k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   441k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 441k]
  |  |  ------------------
  |  |   35|   441k|        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|   441k|        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|   441k|                            dsp->itx.itxfm_add[b->tx]
 1321|   441k|                                              [txtp](dst,
 1322|   441k|                                                     f->cur.stride[0],
 1323|   441k|                                                     cf, eob HIGHBD_CALL_SUFFIX);
 1324|   441k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   441k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 441k]
  |  |  ------------------
  |  |   35|   441k|        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|   441k|        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|   441k|                        }
 1328|   631k|                    } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1328:32): [True: 583k, False: 0]
  ------------------
 1329|   583k|                        dav1d_memset_pow2[t_dim->lw](&t->a->lcoef[bx4 + x], 0x40);
 1330|   583k|                        dav1d_memset_pow2[t_dim->lh](&t->l.lcoef[by4 + y], 0x40);
 1331|   583k|                    }
 1332|  1.21M|                    dst += 4 * t_dim->w;
 1333|  1.21M|                }
 1334|   713k|                t->bx -= x;
 1335|   713k|            }
 1336|   588k|            t->by -= y;
 1337|       |
 1338|   588k|            if (!has_chroma) continue;
  ------------------
  |  Branch (1338:17): [True: 116k, False: 471k]
  ------------------
 1339|       |
 1340|   471k|            const ptrdiff_t stride = f->cur.stride[1];
 1341|       |
 1342|   471k|            if (b->uv_mode == CFL_PRED) {
  ------------------
  |  Branch (1342:17): [True: 83.8k, False: 388k]
  ------------------
 1343|  83.8k|                assert(!init_x && !init_y);
  ------------------
  |  |  140|   167k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 83.8k, False: 0]
  |  |  |  Branch (140:30): [True: 83.8k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 83.8k]
  |  |  ------------------
  ------------------
 1344|       |
 1345|  83.8k|                int16_t *const ac = t->scratch.ac;
 1346|  83.8k|                pixel *y_src = ((pixel *) f->cur.data[0]) + 4 * (t->bx & ~ss_hor) +
 1347|  83.8k|                                 4 * (t->by & ~ss_ver) * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|  83.8k|#define PXSTRIDE(x) (x)
  ------------------
 1348|  83.8k|                const ptrdiff_t uv_off = 4 * ((t->bx >> ss_hor) +
 1349|  83.8k|                                              (t->by >> ss_ver) * PXSTRIDE(stride));
  ------------------
  |  |   53|  83.8k|#define PXSTRIDE(x) (x)
  ------------------
 1350|  83.8k|                pixel *const uv_dst[2] = { ((pixel *) f->cur.data[1]) + uv_off,
 1351|  83.8k|                                           ((pixel *) f->cur.data[2]) + uv_off };
 1352|       |
 1353|  83.8k|                const int furthest_r =
 1354|  83.8k|                    ((cw4 << ss_hor) + t_dim->w - 1) & ~(t_dim->w - 1);
 1355|  83.8k|                const int furthest_b =
 1356|  83.8k|                    ((ch4 << ss_ver) + t_dim->h - 1) & ~(t_dim->h - 1);
 1357|  83.8k|                dsp->ipred.cfl_ac[f->cur.p.layout - 1](ac, y_src, f->cur.stride[0],
 1358|  83.8k|                                                         cbw4 - (furthest_r >> ss_hor),
 1359|  83.8k|                                                         cbh4 - (furthest_b >> ss_ver),
 1360|  83.8k|                                                         cbw4 * 4, cbh4 * 4);
 1361|   251k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1361:34): [True: 167k, False: 83.8k]
  ------------------
 1362|   167k|                    if (!b->cfl_alpha[pl]) continue;
  ------------------
  |  Branch (1362:25): [True: 33.7k, False: 134k]
  ------------------
 1363|   134k|                    int angle = 0;
 1364|   134k|                    const pixel *top_sb_edge = NULL;
 1365|   134k|                    if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1365:25): [True: 31.8k, False: 102k]
  ------------------
 1366|  31.8k|                        top_sb_edge = f->ipred_edge[pl + 1];
 1367|  31.8k|                        const int sby = t->by >> f->sb_shift;
 1368|  31.8k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1369|  31.8k|                    }
 1370|   134k|                    const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1371|   134k|                    const int xstart = ts->tiling.col_start >> ss_hor;
 1372|   134k|                    const int ystart = ts->tiling.row_start >> ss_ver;
 1373|   134k|                    const enum IntraPredMode m =
 1374|   134k|                        bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|   134k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|   134k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1375|   134k|                                                          ypos, ypos > ystart,
 1376|   134k|                                                          ts->tiling.col_end >> ss_hor,
 1377|   134k|                                                          ts->tiling.row_end >> ss_ver,
 1378|   134k|                                                          0, uv_dst[pl], stride,
 1379|   134k|                                                          top_sb_edge, DC_PRED, &angle,
 1380|   134k|                                                          uv_t_dim->w, uv_t_dim->h, 0,
 1381|   134k|                                                          edge HIGHBD_CALL_SUFFIX);
 1382|   134k|                    dsp->ipred.cfl_pred[m](uv_dst[pl], stride, edge,
 1383|   134k|                                           uv_t_dim->w * 4,
 1384|   134k|                                           uv_t_dim->h * 4,
 1385|   134k|                                           ac, b->cfl_alpha[pl]
 1386|   134k|                                           HIGHBD_CALL_SUFFIX);
 1387|   134k|                }
 1388|  83.8k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  83.8k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 83.8k]
  |  |  ------------------
  |  |   35|  83.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|  83.8k|        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|   388k|            } else if (b->pal_sz[1]) {
  ------------------
  |  Branch (1393:24): [True: 2.06k, False: 385k]
  ------------------
 1394|  2.06k|                const ptrdiff_t uv_dstoff = 4 * ((t->bx >> ss_hor) +
 1395|  2.06k|                                              (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
  ------------------
  |  |   53|  2.06k|#define PXSTRIDE(x) (x)
  ------------------
 1396|  2.06k|                const pixel (*pal)[8];
 1397|  2.06k|                const uint8_t *pal_idx;
 1398|  2.06k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1398:21): [True: 0, False: 2.06k]
  ------------------
 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.06k|                } else {
 1406|  2.06k|                    pal = bytefn(t->scratch.pal);
  ------------------
  |  |   87|  2.06k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.06k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1407|  2.06k|                    pal_idx = t->scratch.pal_idx_uv;
 1408|  2.06k|                }
 1409|       |
 1410|  2.06k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[1]) + uv_dstoff,
 1411|  2.06k|                                       f->cur.stride[1], pal[1],
 1412|  2.06k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1413|  2.06k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[2]) + uv_dstoff,
 1414|  2.06k|                                       f->cur.stride[1], pal[2],
 1415|  2.06k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1416|  2.06k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  2.06k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.06k]
  |  |  ------------------
  |  |   35|  2.06k|        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.06k|        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.06k|            }
 1425|       |
 1426|   471k|            const int sm_uv_fl = sm_uv_flag(t->a, cbx4) |
 1427|   471k|                                 sm_uv_flag(&t->l, cby4);
 1428|   471k|            const int uv_sb_has_tr =
 1429|   471k|                ((init_x + 16) >> ss_hor) < cw4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1429:17): [True: 13.6k, False: 458k]
  |  Branch (1429:55): [True: 8.41k, False: 449k]
  ------------------
 1430|   458k|                intra_edge_flags & (EDGE_I420_TOP_HAS_RIGHT >> (f->cur.p.layout - 1));
 1431|   471k|            const int uv_sb_has_bl =
 1432|   471k|                init_x ? 0 : ((init_y + 16) >> ss_ver) < ch4 ? 1 :
  ------------------
  |  Branch (1432:17): [True: 13.6k, False: 458k]
  |  Branch (1432:30): [True: 8.41k, False: 449k]
  ------------------
 1433|   458k|                intra_edge_flags & (EDGE_I420_LEFT_HAS_BOTTOM >> (f->cur.p.layout - 1));
 1434|   471k|            const int sub_cw4 = imin(cw4, (init_x + 16) >> ss_hor);
 1435|  1.41M|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1435:30): [True: 943k, False: 471k]
  ------------------
 1436|  1.97M|                for (y = init_y >> ss_ver, t->by += init_y; y < sub_ch4;
  ------------------
  |  Branch (1436:61): [True: 1.03M, False: 943k]
  ------------------
 1437|  1.03M|                     y += uv_t_dim->h, t->by += uv_t_dim->h << ss_ver)
 1438|  1.03M|                {
 1439|  1.03M|                    pixel *dst = ((pixel *) f->cur.data[1 + pl]) +
 1440|  1.03M|                                   4 * ((t->by >> ss_ver) * PXSTRIDE(stride) +
  ------------------
  |  |   53|  1.03M|#define PXSTRIDE(x) (x)
  ------------------
 1441|  1.03M|                                        ((t->bx + init_x) >> ss_hor));
 1442|  2.43M|                    for (x = init_x >> ss_hor, t->bx += init_x; x < sub_cw4;
  ------------------
  |  Branch (1442:65): [True: 1.40M, False: 1.03M]
  ------------------
 1443|  1.40M|                         x += uv_t_dim->w, t->bx += uv_t_dim->w << ss_hor)
 1444|  1.40M|                    {
 1445|  1.40M|                        if ((b->uv_mode == CFL_PRED && b->cfl_alpha[pl]) ||
  ------------------
  |  Branch (1445:30): [True: 167k, False: 1.23M]
  |  Branch (1445:56): [True: 134k, False: 33.7k]
  ------------------
 1446|  1.27M|                            b->pal_sz[1])
  ------------------
  |  Branch (1446:29): [True: 13.2k, False: 1.25M]
  ------------------
 1447|   147k|                        {
 1448|   147k|                            goto skip_uv_pred;
 1449|   147k|                        }
 1450|       |
 1451|  1.25M|                        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.25M|                        const enum EdgeFlags edge_flags =
 1456|  1.25M|                            (((y > (init_y >> ss_ver) || !uv_sb_has_tr) &&
  ------------------
  |  Branch (1456:32): [True: 364k, False: 893k]
  |  Branch (1456:58): [True: 305k, False: 588k]
  ------------------
 1457|   669k|                              (x + uv_t_dim->w >= sub_cw4)) ?
  ------------------
  |  Branch (1457:31): [True: 371k, False: 297k]
  ------------------
 1458|   886k|                                 0 : EDGE_I444_TOP_HAS_RIGHT) |
 1459|  1.25M|                            ((x > (init_x >> ss_hor) ||
  ------------------
  |  Branch (1459:31): [True: 361k, False: 895k]
  ------------------
 1460|   895k|                              (!uv_sb_has_bl && y + uv_t_dim->h >= sub_ch4)) ?
  ------------------
  |  Branch (1460:32): [True: 521k, False: 374k]
  |  Branch (1460:49): [True: 452k, False: 68.4k]
  ------------------
 1461|   814k|                                 0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1462|  1.25M|                        const pixel *top_sb_edge = NULL;
 1463|  1.25M|                        if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1463:29): [True: 260k, False: 996k]
  ------------------
 1464|   260k|                            top_sb_edge = f->ipred_edge[1 + pl];
 1465|   260k|                            const int sby = t->by >> f->sb_shift;
 1466|   260k|                            top_sb_edge += f->sb128w * 128 * (sby - 1);
 1467|   260k|                        }
 1468|  1.25M|                        const enum IntraPredMode uv_mode =
 1469|  1.25M|                             b->uv_mode == CFL_PRED ? DC_PRED : b->uv_mode;
  ------------------
  |  Branch (1469:30): [True: 33.7k, False: 1.22M]
  ------------------
 1470|  1.25M|                        const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1471|  1.25M|                        const int xstart = ts->tiling.col_start >> ss_hor;
 1472|  1.25M|                        const int ystart = ts->tiling.row_start >> ss_ver;
 1473|  1.25M|                        const enum IntraPredMode m =
 1474|  1.25M|                            bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|  1.25M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  1.25M|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1475|  1.25M|                                                              ypos, ypos > ystart,
 1476|  1.25M|                                                              ts->tiling.col_end >> ss_hor,
 1477|  1.25M|                                                              ts->tiling.row_end >> ss_ver,
 1478|  1.25M|                                                              edge_flags, dst, stride,
 1479|  1.25M|                                                              top_sb_edge, uv_mode,
 1480|  1.25M|                                                              &angle, uv_t_dim->w,
 1481|  1.25M|                                                              uv_t_dim->h,
 1482|  1.25M|                                                              f->seq_hdr->intra_edge_filter,
 1483|  1.25M|                                                              edge HIGHBD_CALL_SUFFIX);
 1484|  1.25M|                        angle |= intra_edge_filter_flag;
 1485|  1.25M|                        dsp->ipred.intra_pred[m](dst, stride, edge,
 1486|  1.25M|                                                 uv_t_dim->w * 4,
 1487|  1.25M|                                                 uv_t_dim->h * 4,
 1488|  1.25M|                                                 angle | sm_uv_fl,
 1489|  1.25M|                                                 (4 * f->bw + ss_hor -
 1490|  1.25M|                                                  4 * (t->bx & ~ss_hor)) >> ss_hor,
 1491|  1.25M|                                                 (4 * f->bh + ss_ver -
 1492|  1.25M|                                                  4 * (t->by & ~ss_ver)) >> ss_ver
 1493|  1.25M|                                                 HIGHBD_CALL_SUFFIX);
 1494|  1.25M|                        if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  1.25M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.25M]
  |  |  ------------------
  |  |   35|  1.25M|        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.25M|        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.40M|                    skip_uv_pred: {}
 1505|  1.40M|                        if (!b->skip) {
  ------------------
  |  Branch (1505:29): [True: 794k, False: 610k]
  ------------------
 1506|   794k|                            enum TxfmType txtp;
 1507|   794k|                            int eob;
 1508|   794k|                            coef *cf;
 1509|   794k|                            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1509:33): [True: 0, False: 794k]
  ------------------
 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|   794k|                            } else {
 1517|   794k|                                uint8_t cf_ctx;
 1518|   794k|                                cf = bitfn(t->cf);
  ------------------
  |  |   51|   794k|#define bitfn(x) x##_8bpc
  ------------------
 1519|   794k|                                eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1520|   794k|                                                   &t->l.ccoef[pl][cby4 + y],
 1521|   794k|                                                   b->uvtx, bs, b, 1, 1 + pl, cf,
 1522|   794k|                                                   &txtp, &cf_ctx);
 1523|   794k|                                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   794k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 794k]
  |  |  ------------------
  |  |   35|   794k|        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|   794k|        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|   794k|                                int ctw = imin(uv_t_dim->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1528|   794k|                                int cth = imin(uv_t_dim->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1529|   794k|                                dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1530|   794k|                                dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1531|   794k|                            }
 1532|   794k|                            if (eob >= 0) {
  ------------------
  |  Branch (1532:33): [True: 286k, False: 507k]
  ------------------
 1533|   286k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   286k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 286k]
  |  |  ------------------
  |  |   35|   286k|        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|   286k|        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|   286k|                                dsp->itx.itxfm_add[b->uvtx]
 1537|   286k|                                                  [txtp](dst, stride,
 1538|   286k|                                                         cf, eob HIGHBD_CALL_SUFFIX);
 1539|   286k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   286k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 286k]
  |  |  ------------------
  |  |   35|   286k|        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|   286k|        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|   286k|                            }
 1543|   794k|                        } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1543:36): [True: 610k, False: 0]
  ------------------
 1544|   610k|                            dav1d_memset_pow2[uv_t_dim->lw](&t->a->ccoef[pl][cbx4 + x], 0x40);
 1545|   610k|                            dav1d_memset_pow2[uv_t_dim->lh](&t->l.ccoef[pl][cby4 + y], 0x40);
 1546|   610k|                        }
 1547|  1.40M|                        dst += uv_t_dim->w * 4;
 1548|  1.40M|                    }
 1549|  1.03M|                    t->bx -= x << ss_hor;
 1550|  1.03M|                }
 1551|   943k|                t->by -= y << ss_ver;
 1552|   943k|            }
 1553|   471k|        }
 1554|   566k|    }
 1555|   552k|}
dav1d_recon_b_inter_8bpc:
 1559|   126k|{
 1560|   126k|    Dav1dTileState *const ts = t->ts;
 1561|   126k|    const Dav1dFrameContext *const f = t->f;
 1562|   126k|    const Dav1dDSPContext *const dsp = f->dsp;
 1563|   126k|    const int bx4 = t->bx & 31, by4 = t->by & 31;
 1564|   126k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1565|   126k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 1566|   126k|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
 1567|   126k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
 1568|   126k|    const int bw4 = b_dim[0], bh4 = b_dim[1];
 1569|   126k|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
 1570|   126k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (1570:28): [True: 100k, False: 26.2k]
  ------------------
 1571|   100k|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1571:29): [True: 59.8k, False: 40.4k]
  |  Branch (1571:45): [True: 20.2k, False: 20.2k]
  ------------------
 1572|  80.1k|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1572:29): [True: 57.2k, False: 22.8k]
  |  Branch (1572:45): [True: 11.4k, False: 11.4k]
  ------------------
 1573|   126k|    const int chr_layout_idx = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I400 ? 0 :
  ------------------
  |  Branch (1573:32): [True: 26.2k, False: 100k]
  ------------------
 1574|   126k|                               DAV1D_PIXEL_LAYOUT_I444 - f->cur.p.layout;
 1575|   126k|    int res;
 1576|       |
 1577|       |    // prediction
 1578|   126k|    const int cbh4 = (bh4 + ss_ver) >> ss_ver, cbw4 = (bw4 + ss_hor) >> ss_hor;
 1579|   126k|    pixel *dst = ((pixel *) f->cur.data[0]) +
 1580|   126k|        4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
  ------------------
  |  |   53|   126k|#define PXSTRIDE(x) (x)
  ------------------
 1581|   126k|    const ptrdiff_t uvdstoff =
 1582|   126k|        4 * ((t->bx >> ss_hor) + (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
  ------------------
  |  |   53|   126k|#define PXSTRIDE(x) (x)
  ------------------
 1583|   126k|    if (IS_KEY_OR_INTRA(f->frame_hdr)) {
  ------------------
  |  |   43|   126k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|   126k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 78.6k, False: 48.0k]
  |  |  ------------------
  ------------------
 1584|       |        // intrabc
 1585|  78.6k|        assert(!f->frame_hdr->super_res.enabled);
  ------------------
  |  |  140|  78.6k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 78.6k]
  |  |  |  Branch (140:68): [Folded, False: 78.6k]
  |  |  ------------------
  ------------------
 1586|  78.6k|        res = mc(t, dst, NULL, f->cur.stride[0], bw4, bh4, t->bx, t->by, 0,
 1587|  78.6k|                 b->mv[0], &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1588|  78.6k|        if (res) return res;
  ------------------
  |  Branch (1588:13): [True: 0, False: 78.6k]
  ------------------
 1589|   116k|        if (has_chroma) for (int pl = 1; pl < 3; pl++) {
  ------------------
  |  Branch (1589:13): [True: 38.8k, False: 39.7k]
  |  Branch (1589:42): [True: 77.6k, False: 38.8k]
  ------------------
 1590|  77.6k|            res = mc(t, ((pixel *)f->cur.data[pl]) + uvdstoff, NULL, f->cur.stride[1],
 1591|  77.6k|                     bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1592|  77.6k|                     t->bx & ~ss_hor, t->by & ~ss_ver, pl, b->mv[0],
 1593|  77.6k|                     &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1594|  77.6k|            if (res) return res;
  ------------------
  |  Branch (1594:17): [True: 0, False: 77.6k]
  ------------------
 1595|  77.6k|        }
 1596|  78.6k|    } else if (b->comp_type == COMP_INTER_NONE) {
  ------------------
  |  Branch (1596:16): [True: 38.5k, False: 9.49k]
  ------------------
 1597|  38.5k|        const Dav1dThreadPicture *const refp = &f->refp[b->ref[0]];
 1598|  38.5k|        const enum Filter2d filter_2d = b->filter2d;
 1599|       |
 1600|  38.5k|        if (imin(bw4, bh4) > 1 &&
  ------------------
  |  Branch (1600:13): [True: 21.3k, False: 17.2k]
  ------------------
 1601|  21.3k|            ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1601:15): [True: 8.81k, False: 12.4k]
  |  Branch (1601:44): [True: 544, False: 8.27k]
  ------------------
 1602|  20.7k|             (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1602:15): [True: 1.33k, False: 19.4k]
  |  Branch (1602:44): [True: 1.16k, False: 168]
  ------------------
 1603|  1.70k|        {
 1604|  1.70k|            res = warp_affine(t, dst, NULL, f->cur.stride[0], b_dim, 0, refp,
 1605|  1.70k|                              b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1605:31): [True: 1.16k, False: 544]
  ------------------
 1606|  1.70k|                                  &f->frame_hdr->gmv[b->ref[0]]);
 1607|  1.70k|            if (res) return res;
  ------------------
  |  Branch (1607:17): [True: 0, False: 1.70k]
  ------------------
 1608|  36.8k|        } else {
 1609|  36.8k|            res = mc(t, dst, NULL, f->cur.stride[0],
 1610|  36.8k|                     bw4, bh4, t->bx, t->by, 0, b->mv[0], refp, b->ref[0], filter_2d);
 1611|  36.8k|            if (res) return res;
  ------------------
  |  Branch (1611:17): [True: 0, False: 36.8k]
  ------------------
 1612|  36.8k|            if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1612:17): [True: 6.16k, False: 30.6k]
  ------------------
 1613|  6.16k|                res = obmc(t, dst, f->cur.stride[0], b_dim, 0, bx4, by4, w4, h4);
 1614|  6.16k|                if (res) return res;
  ------------------
  |  Branch (1614:21): [True: 0, False: 6.16k]
  ------------------
 1615|  6.16k|            }
 1616|  36.8k|        }
 1617|  38.5k|        if (b->interintra_type) {
  ------------------
  |  Branch (1617:13): [True: 1.53k, False: 36.9k]
  ------------------
 1618|  1.53k|            pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   51|  1.53k|#define bitfn(x) x##_8bpc
  ------------------
 1619|  1.53k|            enum IntraPredMode m = b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1619:36): [True: 295, False: 1.23k]
  ------------------
 1620|  1.23k|                                   SMOOTH_PRED : b->interintra_mode;
 1621|  1.53k|            pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   51|  1.53k|#define bitfn(x) x##_8bpc
  ------------------
 1622|  1.53k|            int angle = 0;
 1623|  1.53k|            const pixel *top_sb_edge = NULL;
 1624|  1.53k|            if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1624:17): [True: 294, False: 1.23k]
  ------------------
 1625|    294|                top_sb_edge = f->ipred_edge[0];
 1626|    294|                const int sby = t->by >> f->sb_shift;
 1627|    294|                top_sb_edge += f->sb128w * 128 * (sby - 1);
 1628|    294|            }
 1629|  1.53k|            m = bytefn(dav1d_prepare_intra_edges)(t->bx, t->bx > ts->tiling.col_start,
  ------------------
  |  |   87|  1.53k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  1.53k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1630|  1.53k|                                                  t->by, t->by > ts->tiling.row_start,
 1631|  1.53k|                                                  ts->tiling.col_end, ts->tiling.row_end,
 1632|  1.53k|                                                  0, dst, f->cur.stride[0], top_sb_edge,
 1633|  1.53k|                                                  m, &angle, bw4, bh4, 0, tl_edge
 1634|  1.53k|                                                  HIGHBD_CALL_SUFFIX);
 1635|  1.53k|            dsp->ipred.intra_pred[m](tmp, 4 * bw4 * sizeof(pixel),
 1636|  1.53k|                                     tl_edge, bw4 * 4, bh4 * 4, 0, 0, 0
 1637|  1.53k|                                     HIGHBD_CALL_SUFFIX);
 1638|  1.53k|            dsp->mc.blend(dst, f->cur.stride[0], tmp,
 1639|  1.53k|                          bw4 * 4, bh4 * 4, II_MASK(0, bs, b));
  ------------------
  |  |   83|  1.53k|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|  1.53k|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 1.12k, False: 411]
  |  |  ------------------
  |  |   85|  1.53k|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|  1.53k|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1640|  1.53k|        }
 1641|       |
 1642|  38.5k|        if (!has_chroma) goto skip_inter_chroma_pred;
  ------------------
  |  Branch (1642:13): [True: 15.2k, False: 23.2k]
  ------------------
 1643|       |
 1644|       |        // sub8x8 derivation
 1645|  23.2k|        int is_sub8x8 = bw4 == ss_hor || bh4 == ss_ver;
  ------------------
  |  Branch (1645:25): [True: 2.64k, False: 20.6k]
  |  Branch (1645:42): [True: 2.27k, False: 18.3k]
  ------------------
 1646|  23.2k|        refmvs_block *const *r;
 1647|  23.2k|        if (is_sub8x8) {
  ------------------
  |  Branch (1647:13): [True: 4.91k, False: 18.3k]
  ------------------
 1648|  4.91k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  4.91k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.91k]
  |  |  |  Branch (140:68): [Folded, False: 4.91k]
  |  |  ------------------
  ------------------
 1649|  4.91k|            r = &t->rt.r[(t->by & 31) + 5];
 1650|  4.91k|            if (bw4 == 1) is_sub8x8 &= r[0][t->bx - 1].ref.ref[0] > 0;
  ------------------
  |  Branch (1650:17): [True: 2.64k, False: 2.27k]
  ------------------
 1651|  4.91k|            if (bh4 == ss_ver) is_sub8x8 &= r[-1][t->bx].ref.ref[0] > 0;
  ------------------
  |  Branch (1651:17): [True: 3.21k, False: 1.69k]
  ------------------
 1652|  4.91k|            if (bw4 == 1 && bh4 == ss_ver)
  ------------------
  |  Branch (1652:17): [True: 2.64k, False: 2.27k]
  |  Branch (1652:29): [True: 944, False: 1.69k]
  ------------------
 1653|    944|                is_sub8x8 &= r[-1][t->bx - 1].ref.ref[0] > 0;
 1654|  4.91k|        }
 1655|       |
 1656|       |        // chroma prediction
 1657|  23.2k|        if (is_sub8x8) {
  ------------------
  |  Branch (1657:13): [True: 4.78k, False: 18.4k]
  ------------------
 1658|  4.78k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  4.78k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.78k]
  |  |  |  Branch (140:68): [Folded, False: 4.78k]
  |  |  ------------------
  ------------------
 1659|  4.78k|            ptrdiff_t h_off = 0, v_off = 0;
 1660|  4.78k|            if (bw4 == 1 && bh4 == ss_ver) {
  ------------------
  |  Branch (1660:17): [True: 2.57k, False: 2.21k]
  |  Branch (1660:29): [True: 914, False: 1.65k]
  ------------------
 1661|  2.74k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1661:34): [True: 1.82k, False: 914]
  ------------------
 1662|  1.82k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1663|  1.82k|                             NULL, f->cur.stride[1],
 1664|  1.82k|                             bw4, bh4, t->bx - 1, t->by - 1, 1 + pl,
 1665|  1.82k|                             r[-1][t->bx - 1].mv.mv[0],
 1666|  1.82k|                             &f->refp[r[-1][t->bx - 1].ref.ref[0] - 1],
 1667|  1.82k|                             r[-1][t->bx - 1].ref.ref[0] - 1,
 1668|  1.82k|                             t->frame_thread.pass != 2 ? t->tl_4x4_filter :
  ------------------
  |  Branch (1668:30): [True: 1.82k, False: 0]
  ------------------
 1669|  1.82k|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx - 1].filter2d);
 1670|  1.82k|                    if (res) return res;
  ------------------
  |  Branch (1670:25): [True: 0, False: 1.82k]
  ------------------
 1671|  1.82k|                }
 1672|    914|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
  ------------------
  |  |   53|    914|#define PXSTRIDE(x) (x)
  ------------------
 1673|    914|                h_off = 2;
 1674|    914|            }
 1675|  4.78k|            if (bw4 == 1) {
  ------------------
  |  Branch (1675:17): [True: 2.57k, False: 2.21k]
  ------------------
 1676|  2.57k|                const enum Filter2d left_filter_2d =
 1677|  2.57k|                    dav1d_filter_2d[t->l.filter[1][by4]][t->l.filter[0][by4]];
 1678|  7.71k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1678:34): [True: 5.14k, False: 2.57k]
  ------------------
 1679|  5.14k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + v_off, NULL,
 1680|  5.14k|                             f->cur.stride[1], bw4, bh4, t->bx - 1,
 1681|  5.14k|                             t->by, 1 + pl, r[0][t->bx - 1].mv.mv[0],
 1682|  5.14k|                             &f->refp[r[0][t->bx - 1].ref.ref[0] - 1],
 1683|  5.14k|                             r[0][t->bx - 1].ref.ref[0] - 1,
 1684|  5.14k|                             t->frame_thread.pass != 2 ? left_filter_2d :
  ------------------
  |  Branch (1684:30): [True: 5.14k, False: 0]
  ------------------
 1685|  5.14k|                                 f->frame_thread.b[(t->by * f->b4_stride) + t->bx - 1].filter2d);
 1686|  5.14k|                    if (res) return res;
  ------------------
  |  Branch (1686:25): [True: 0, False: 5.14k]
  ------------------
 1687|  5.14k|                }
 1688|  2.57k|                h_off = 2;
 1689|  2.57k|            }
 1690|  4.78k|            if (bh4 == ss_ver) {
  ------------------
  |  Branch (1690:17): [True: 3.12k, False: 1.65k]
  ------------------
 1691|  3.12k|                const enum Filter2d top_filter_2d =
 1692|  3.12k|                    dav1d_filter_2d[t->a->filter[1][bx4]][t->a->filter[0][bx4]];
 1693|  9.38k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1693:34): [True: 6.25k, False: 3.12k]
  ------------------
 1694|  6.25k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off, NULL,
 1695|  6.25k|                             f->cur.stride[1], bw4, bh4, t->bx, t->by - 1,
 1696|  6.25k|                             1 + pl, r[-1][t->bx].mv.mv[0],
 1697|  6.25k|                             &f->refp[r[-1][t->bx].ref.ref[0] - 1],
 1698|  6.25k|                             r[-1][t->bx].ref.ref[0] - 1,
 1699|  6.25k|                             t->frame_thread.pass != 2 ? top_filter_2d :
  ------------------
  |  Branch (1699:30): [True: 6.25k, False: 0]
  ------------------
 1700|  6.25k|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx].filter2d);
 1701|  6.25k|                    if (res) return res;
  ------------------
  |  Branch (1701:25): [True: 0, False: 6.25k]
  ------------------
 1702|  6.25k|                }
 1703|  3.12k|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
  ------------------
  |  |   53|  3.12k|#define PXSTRIDE(x) (x)
  ------------------
 1704|  3.12k|            }
 1705|  14.3k|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1705:30): [True: 9.56k, False: 4.78k]
  ------------------
 1706|  9.56k|                res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off + v_off, NULL, f->cur.stride[1],
 1707|  9.56k|                         bw4, bh4, t->bx, t->by, 1 + pl, b->mv[0],
 1708|  9.56k|                         refp, b->ref[0], filter_2d);
 1709|  9.56k|                if (res) return res;
  ------------------
  |  Branch (1709:21): [True: 0, False: 9.56k]
  ------------------
 1710|  9.56k|            }
 1711|  18.4k|        } else {
 1712|  18.4k|            if (imin(cbw4, cbh4) > 1 &&
  ------------------
  |  Branch (1712:17): [True: 6.96k, False: 11.4k]
  ------------------
 1713|  6.96k|                ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1713:19): [True: 2.73k, False: 4.22k]
  |  Branch (1713:48): [True: 325, False: 2.40k]
  ------------------
 1714|  6.63k|                 (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1714:19): [True: 511, False: 6.12k]
  |  Branch (1714:48): [True: 475, False: 36]
  ------------------
 1715|    800|            {
 1716|  2.40k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1716:34): [True: 1.60k, False: 800]
  ------------------
 1717|  1.60k|                    res = warp_affine(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff, NULL,
 1718|  1.60k|                                      f->cur.stride[1], b_dim, 1 + pl, refp,
 1719|  1.60k|                                      b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1719:39): [True: 950, False: 650]
  ------------------
 1720|  1.60k|                                          &f->frame_hdr->gmv[b->ref[0]]);
 1721|  1.60k|                    if (res) return res;
  ------------------
  |  Branch (1721:25): [True: 0, False: 1.60k]
  ------------------
 1722|  1.60k|                }
 1723|  17.6k|            } else {
 1724|  52.9k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1724:34): [True: 35.3k, False: 17.6k]
  ------------------
 1725|  35.3k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1726|  35.3k|                             NULL, f->cur.stride[1],
 1727|  35.3k|                             bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1728|  35.3k|                             t->bx & ~ss_hor, t->by & ~ss_ver,
 1729|  35.3k|                             1 + pl, b->mv[0], refp, b->ref[0], filter_2d);
 1730|  35.3k|                    if (res) return res;
  ------------------
  |  Branch (1730:25): [True: 0, False: 35.3k]
  ------------------
 1731|  35.3k|                    if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1731:25): [True: 9.52k, False: 25.7k]
  ------------------
 1732|  9.52k|                        res = obmc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1733|  9.52k|                                   f->cur.stride[1], b_dim, 1 + pl, bx4, by4, w4, h4);
 1734|  9.52k|                        if (res) return res;
  ------------------
  |  Branch (1734:29): [True: 0, False: 9.52k]
  ------------------
 1735|  9.52k|                    }
 1736|  35.3k|                }
 1737|  17.6k|            }
 1738|  18.4k|            if (b->interintra_type) {
  ------------------
  |  Branch (1738:17): [True: 1.41k, False: 17.0k]
  ------------------
 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|  1.41k|                const uint8_t *const ii_mask = II_MASK(chr_layout_idx, bs, b);
  ------------------
  |  |   83|  1.41k|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|  1.41k|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 1.03k, False: 382]
  |  |  ------------------
  |  |   85|  1.41k|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|  1.41k|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1743|       |
 1744|  4.25k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1744:34): [True: 2.83k, False: 1.41k]
  ------------------
 1745|  2.83k|                    pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   51|  2.83k|#define bitfn(x) x##_8bpc
  ------------------
 1746|  2.83k|                    pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   51|  2.83k|#define bitfn(x) x##_8bpc
  ------------------
 1747|  2.83k|                    enum IntraPredMode m =
 1748|  2.83k|                        b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1748:25): [True: 556, False: 2.27k]
  ------------------
 1749|  2.27k|                        SMOOTH_PRED : b->interintra_mode;
 1750|  2.83k|                    int angle = 0;
 1751|  2.83k|                    pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1752|  2.83k|                    const pixel *top_sb_edge = NULL;
 1753|  2.83k|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1753:25): [True: 554, False: 2.28k]
  ------------------
 1754|    554|                        top_sb_edge = f->ipred_edge[pl + 1];
 1755|    554|                        const int sby = t->by >> f->sb_shift;
 1756|    554|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1757|    554|                    }
 1758|  2.83k|                    m = bytefn(dav1d_prepare_intra_edges)(t->bx >> ss_hor,
  ------------------
  |  |   87|  2.83k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.83k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 1759|  2.83k|                                                          (t->bx >> ss_hor) >
 1760|  2.83k|                                                              (ts->tiling.col_start >> ss_hor),
 1761|  2.83k|                                                          t->by >> ss_ver,
 1762|  2.83k|                                                          (t->by >> ss_ver) >
 1763|  2.83k|                                                              (ts->tiling.row_start >> ss_ver),
 1764|  2.83k|                                                          ts->tiling.col_end >> ss_hor,
 1765|  2.83k|                                                          ts->tiling.row_end >> ss_ver,
 1766|  2.83k|                                                          0, uvdst, f->cur.stride[1],
 1767|  2.83k|                                                          top_sb_edge, m,
 1768|  2.83k|                                                          &angle, cbw4, cbh4, 0, tl_edge
 1769|  2.83k|                                                          HIGHBD_CALL_SUFFIX);
 1770|  2.83k|                    dsp->ipred.intra_pred[m](tmp, cbw4 * 4 * sizeof(pixel),
 1771|  2.83k|                                             tl_edge, cbw4 * 4, cbh4 * 4, 0, 0, 0
 1772|  2.83k|                                             HIGHBD_CALL_SUFFIX);
 1773|  2.83k|                    dsp->mc.blend(uvdst, f->cur.stride[1], tmp,
 1774|  2.83k|                                  cbw4 * 4, cbh4 * 4, ii_mask);
 1775|  2.83k|                }
 1776|  1.41k|            }
 1777|  18.4k|        }
 1778|       |
 1779|  38.5k|    skip_inter_chroma_pred: {}
 1780|  38.5k|        t->tl_4x4_filter = filter_2d;
 1781|  38.5k|    } else {
 1782|  9.49k|        const enum Filter2d filter_2d = b->filter2d;
 1783|       |        // Maximum super block size is 128x128
 1784|  9.49k|        int16_t (*tmp)[128 * 128] = t->scratch.compinter;
 1785|  9.49k|        int jnt_weight;
 1786|  9.49k|        uint8_t *const seg_mask = t->scratch.seg_mask;
 1787|  9.49k|        const uint8_t *mask;
 1788|       |
 1789|  28.4k|        for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1789:25): [True: 18.9k, False: 9.49k]
  ------------------
 1790|  18.9k|            const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1791|       |
 1792|  18.9k|            if (b->inter_mode == GLOBALMV_GLOBALMV && f->gmv_warp_allowed[b->ref[i]]) {
  ------------------
  |  Branch (1792:17): [True: 1.71k, False: 17.2k]
  |  Branch (1792:55): [True: 202, False: 1.50k]
  ------------------
 1793|    202|                res = warp_affine(t, NULL, tmp[i], bw4 * 4, b_dim, 0, refp,
 1794|    202|                                  &f->frame_hdr->gmv[b->ref[i]]);
 1795|    202|                if (res) return res;
  ------------------
  |  Branch (1795:21): [True: 0, False: 202]
  ------------------
 1796|  18.7k|            } else {
 1797|  18.7k|                res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by, 0,
 1798|  18.7k|                         b->mv[i], refp, b->ref[i], filter_2d);
 1799|  18.7k|                if (res) return res;
  ------------------
  |  Branch (1799:21): [True: 0, False: 18.7k]
  ------------------
 1800|  18.7k|            }
 1801|  18.9k|        }
 1802|  9.49k|        switch (b->comp_type) {
  ------------------
  |  Branch (1802:17): [True: 9.49k, False: 0]
  ------------------
 1803|  6.10k|        case COMP_INTER_AVG:
  ------------------
  |  Branch (1803:9): [True: 6.10k, False: 3.39k]
  ------------------
 1804|  6.10k|            dsp->mc.avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1805|  6.10k|                        bw4 * 4, bh4 * 4 HIGHBD_CALL_SUFFIX);
 1806|  6.10k|            break;
 1807|  1.23k|        case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1807:9): [True: 1.23k, False: 8.25k]
  ------------------
 1808|  1.23k|            jnt_weight = f->jnt_weights[b->ref[0]][b->ref[1]];
 1809|  1.23k|            dsp->mc.w_avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1810|  1.23k|                          bw4 * 4, bh4 * 4, jnt_weight HIGHBD_CALL_SUFFIX);
 1811|  1.23k|            break;
 1812|  1.54k|        case COMP_INTER_SEG:
  ------------------
  |  Branch (1812:9): [True: 1.54k, False: 7.94k]
  ------------------
 1813|  1.54k|            dsp->mc.w_mask[chr_layout_idx](dst, f->cur.stride[0],
 1814|  1.54k|                                           tmp[b->mask_sign], tmp[!b->mask_sign],
 1815|  1.54k|                                           bw4 * 4, bh4 * 4, seg_mask,
 1816|  1.54k|                                           b->mask_sign HIGHBD_CALL_SUFFIX);
 1817|  1.54k|            mask = seg_mask;
 1818|  1.54k|            break;
 1819|    614|        case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1819:9): [True: 614, False: 8.87k]
  ------------------
 1820|    614|            mask = WEDGE_MASK(0, bs, 0, b->wedge_idx);
  ------------------
  |  |   89|    614|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|    614|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1821|    614|            dsp->mc.mask(dst, f->cur.stride[0],
 1822|    614|                         tmp[b->mask_sign], tmp[!b->mask_sign],
 1823|    614|                         bw4 * 4, bh4 * 4, mask HIGHBD_CALL_SUFFIX);
 1824|    614|            if (has_chroma)
  ------------------
  |  Branch (1824:17): [True: 463, False: 151]
  ------------------
 1825|    463|                mask = WEDGE_MASK(chr_layout_idx, bs, b->mask_sign, b->wedge_idx);
  ------------------
  |  |   89|    463|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|    463|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1826|    614|            break;
 1827|  9.49k|        }
 1828|       |
 1829|       |        // chroma
 1830|  19.8k|        if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1830:13): [True: 6.62k, False: 2.86k]
  |  Branch (1830:42): [True: 13.2k, False: 6.62k]
  ------------------
 1831|  39.7k|            for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1831:29): [True: 26.4k, False: 13.2k]
  ------------------
 1832|  26.4k|                const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1833|  26.4k|                if (b->inter_mode == GLOBALMV_GLOBALMV &&
  ------------------
  |  Branch (1833:21): [True: 2.26k, False: 24.2k]
  ------------------
 1834|  2.26k|                    imin(cbw4, cbh4) > 1 && f->gmv_warp_allowed[b->ref[i]])
  ------------------
  |  Branch (1834:21): [True: 884, False: 1.38k]
  |  Branch (1834:45): [True: 120, False: 764]
  ------------------
 1835|    120|                {
 1836|    120|                    res = warp_affine(t, NULL, tmp[i], bw4 * 4 >> ss_hor,
 1837|    120|                                      b_dim, 1 + pl,
 1838|    120|                                      refp, &f->frame_hdr->gmv[b->ref[i]]);
 1839|    120|                    if (res) return res;
  ------------------
  |  Branch (1839:25): [True: 0, False: 120]
  ------------------
 1840|  26.3k|                } else {
 1841|  26.3k|                    res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by,
 1842|  26.3k|                             1 + pl, b->mv[i], refp, b->ref[i], filter_2d);
 1843|  26.3k|                    if (res) return res;
  ------------------
  |  Branch (1843:25): [True: 0, False: 26.3k]
  ------------------
 1844|  26.3k|                }
 1845|  26.4k|            }
 1846|  13.2k|            pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1847|  13.2k|            switch (b->comp_type) {
  ------------------
  |  Branch (1847:21): [True: 13.2k, False: 0]
  ------------------
 1848|  8.30k|            case COMP_INTER_AVG:
  ------------------
  |  Branch (1848:13): [True: 8.30k, False: 4.94k]
  ------------------
 1849|  8.30k|                dsp->mc.avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1850|  8.30k|                            bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver
 1851|  8.30k|                            HIGHBD_CALL_SUFFIX);
 1852|  8.30k|                break;
 1853|  1.46k|            case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1853:13): [True: 1.46k, False: 11.7k]
  ------------------
 1854|  1.46k|                dsp->mc.w_avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1855|  1.46k|                              bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, jnt_weight
 1856|  1.46k|                              HIGHBD_CALL_SUFFIX);
 1857|  1.46k|                break;
 1858|    926|            case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1858:13): [True: 926, False: 12.3k]
  ------------------
 1859|  3.47k|            case COMP_INTER_SEG:
  ------------------
  |  Branch (1859:13): [True: 2.55k, False: 10.6k]
  ------------------
 1860|  3.47k|                dsp->mc.mask(uvdst, f->cur.stride[1],
 1861|  3.47k|                             tmp[b->mask_sign], tmp[!b->mask_sign],
 1862|  3.47k|                             bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, mask
 1863|  3.47k|                             HIGHBD_CALL_SUFFIX);
 1864|  3.47k|                break;
 1865|  13.2k|            }
 1866|  13.2k|        }
 1867|  9.49k|    }
 1868|       |
 1869|   126k|    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|   126k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 126k]
  |  |  ------------------
  |  |   35|   126k|        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|   126k|        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|   126k|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
 1880|       |
 1881|   126k|    if (b->skip) {
  ------------------
  |  Branch (1881:9): [True: 85.3k, False: 41.2k]
  ------------------
 1882|       |        // reset coef contexts
 1883|  85.3k|        BlockContext *const a = t->a;
 1884|  85.3k|        dav1d_memset_pow2[b_dim[2]](&a->lcoef[bx4], 0x40);
 1885|  85.3k|        dav1d_memset_pow2[b_dim[3]](&t->l.lcoef[by4], 0x40);
 1886|  85.3k|        if (has_chroma) {
  ------------------
  |  Branch (1886:13): [True: 40.8k, False: 44.4k]
  ------------------
 1887|  40.8k|            dav1d_memset_pow2_fn memset_cw = dav1d_memset_pow2[ulog2(cbw4)];
 1888|  40.8k|            dav1d_memset_pow2_fn memset_ch = dav1d_memset_pow2[ulog2(cbh4)];
 1889|  40.8k|            memset_cw(&a->ccoef[0][cbx4], 0x40);
 1890|  40.8k|            memset_cw(&a->ccoef[1][cbx4], 0x40);
 1891|  40.8k|            memset_ch(&t->l.ccoef[0][cby4], 0x40);
 1892|  40.8k|            memset_ch(&t->l.ccoef[1][cby4], 0x40);
 1893|  40.8k|        }
 1894|  85.3k|        return 0;
 1895|  85.3k|    }
 1896|       |
 1897|  41.2k|    const TxfmInfo *const uvtx = &dav1d_txfm_dimensions[b->uvtx];
 1898|  41.2k|    const TxfmInfo *const ytx = &dav1d_txfm_dimensions[b->max_ytx];
 1899|  41.2k|    const uint16_t tx_split[2] = { b->tx_split0, b->tx_split1 };
 1900|       |
 1901|  83.2k|    for (int init_y = 0; init_y < bh4; init_y += 16) {
  ------------------
  |  Branch (1901:26): [True: 42.0k, False: 41.2k]
  ------------------
 1902|  85.0k|        for (int init_x = 0; init_x < bw4; init_x += 16) {
  ------------------
  |  Branch (1902:30): [True: 43.0k, False: 42.0k]
  ------------------
 1903|       |            // coefficient coding & inverse transforms
 1904|  43.0k|            int y_off = !!init_y, y;
 1905|  43.0k|            dst += PXSTRIDE(f->cur.stride[0]) * 4 * init_y;
  ------------------
  |  |   53|  43.0k|#define PXSTRIDE(x) (x)
  ------------------
 1906|  87.4k|            for (y = init_y, t->by += init_y; y < imin(h4, init_y + 16);
  ------------------
  |  Branch (1906:47): [True: 44.3k, False: 43.0k]
  ------------------
 1907|  44.3k|                 y += ytx->h, y_off++)
 1908|  44.3k|            {
 1909|  44.3k|                int x, x_off = !!init_x;
 1910|  94.3k|                for (x = init_x, t->bx += init_x; x < imin(w4, init_x + 16);
  ------------------
  |  Branch (1910:51): [True: 50.0k, False: 44.3k]
  ------------------
 1911|  50.0k|                     x += ytx->w, x_off++)
 1912|  50.0k|                {
 1913|  50.0k|                    read_coef_tree(t, bs, b, b->max_ytx, 0, tx_split,
 1914|  50.0k|                                   x_off, y_off, &dst[x * 4]);
 1915|  50.0k|                    t->bx += ytx->w;
 1916|  50.0k|                }
 1917|  44.3k|                dst += PXSTRIDE(f->cur.stride[0]) * 4 * ytx->h;
  ------------------
  |  |   53|  44.3k|#define PXSTRIDE(x) (x)
  ------------------
 1918|  44.3k|                t->bx -= x;
 1919|  44.3k|                t->by += ytx->h;
 1920|  44.3k|            }
 1921|  43.0k|            dst -= PXSTRIDE(f->cur.stride[0]) * 4 * y;
  ------------------
  |  |   53|  43.0k|#define PXSTRIDE(x) (x)
  ------------------
 1922|  43.0k|            t->by -= y;
 1923|       |
 1924|       |            // chroma coefs and inverse transform
 1925|  86.4k|            if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1925:17): [True: 28.8k, False: 14.2k]
  |  Branch (1925:46): [True: 57.6k, False: 28.8k]
  ------------------
 1926|  57.6k|                pixel *uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff +
 1927|  57.6k|                    (PXSTRIDE(f->cur.stride[1]) * init_y * 4 >> ss_ver);
  ------------------
  |  |   53|  57.6k|#define PXSTRIDE(x) (x)
  ------------------
 1928|  57.6k|                for (y = init_y >> ss_ver, t->by += init_y;
 1929|   118k|                     y < imin(ch4, (init_y + 16) >> ss_ver); y += uvtx->h)
  ------------------
  |  Branch (1929:22): [True: 60.6k, False: 57.6k]
  ------------------
 1930|  60.6k|                {
 1931|  60.6k|                    int x;
 1932|  60.6k|                    for (x = init_x >> ss_hor, t->bx += init_x;
 1933|   126k|                         x < imin(cw4, (init_x + 16) >> ss_hor); x += uvtx->w)
  ------------------
  |  Branch (1933:26): [True: 65.6k, False: 60.6k]
  ------------------
 1934|  65.6k|                    {
 1935|  65.6k|                        coef *cf;
 1936|  65.6k|                        int eob;
 1937|  65.6k|                        enum TxfmType txtp;
 1938|  65.6k|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1938:29): [True: 0, False: 65.6k]
  ------------------
 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|  65.6k|                        } else {
 1946|  65.6k|                            uint8_t cf_ctx;
 1947|  65.6k|                            cf = bitfn(t->cf);
  ------------------
  |  |   51|  65.6k|#define bitfn(x) x##_8bpc
  ------------------
 1948|  65.6k|                            txtp = t->scratch.txtp_map[(by4 + (y << ss_ver)) * 32 +
 1949|  65.6k|                                                        bx4 + (x << ss_hor)];
 1950|  65.6k|                            eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1951|  65.6k|                                               &t->l.ccoef[pl][cby4 + y],
 1952|  65.6k|                                               b->uvtx, bs, b, 0, 1 + pl,
 1953|  65.6k|                                               cf, &txtp, &cf_ctx);
 1954|  65.6k|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  65.6k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 65.6k]
  |  |  ------------------
  |  |   35|  65.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|  65.6k|        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|  65.6k|                            int ctw = imin(uvtx->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1959|  65.6k|                            int cth = imin(uvtx->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1960|  65.6k|                            dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1961|  65.6k|                            dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1962|  65.6k|                        }
 1963|  65.6k|                        if (eob >= 0) {
  ------------------
  |  Branch (1963:29): [True: 17.0k, False: 48.5k]
  ------------------
 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|  65.6k|                        t->bx += uvtx->w << ss_hor;
 1975|  65.6k|                    }
 1976|  60.6k|                    uvdst += PXSTRIDE(f->cur.stride[1]) * 4 * uvtx->h;
  ------------------
  |  |   53|  60.6k|#define PXSTRIDE(x) (x)
  ------------------
 1977|  60.6k|                    t->bx -= x << ss_hor;
 1978|  60.6k|                    t->by += uvtx->h << ss_ver;
 1979|  60.6k|                }
 1980|  57.6k|                t->by -= y << ss_ver;
 1981|  57.6k|            }
 1982|  43.0k|        }
 1983|  42.0k|    }
 1984|  41.2k|    return 0;
 1985|   126k|}
dav1d_filter_sbrow_deblock_cols_8bpc:
 1987|  30.9k|void bytefn(dav1d_filter_sbrow_deblock_cols)(Dav1dFrameContext *const f, const int sby) {
 1988|  30.9k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK) ||
  ------------------
  |  Branch (1988:9): [True: 0, False: 30.9k]
  ------------------
 1989|  30.9k|        (!f->frame_hdr->loopfilter.level_y[0] && !f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (1989:10): [True: 12.7k, False: 18.1k]
  |  Branch (1989:50): [True: 10.4k, False: 2.29k]
  ------------------
 1990|  10.4k|    {
 1991|  10.4k|        return;
 1992|  10.4k|    }
 1993|  20.4k|    const int y = sby * f->sb_step * 4;
 1994|  20.4k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1995|  20.4k|    pixel *const p[3] = {
 1996|  20.4k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  20.4k|#define PXSTRIDE(x) (x)
  ------------------
 1997|  20.4k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  20.4k|#define PXSTRIDE(x) (x)
  ------------------
 1998|  20.4k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  20.4k|#define PXSTRIDE(x) (x)
  ------------------
 1999|  20.4k|    };
 2000|  20.4k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2001|  20.4k|    bytefn(dav1d_loopfilter_sbrow_cols)(f, p, mask, sby,
  ------------------
  |  |   87|  20.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  20.4k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2002|  20.4k|                                        f->lf.start_of_tile_row[sby]);
 2003|  20.4k|}
dav1d_filter_sbrow_deblock_rows_8bpc:
 2005|  30.9k|void bytefn(dav1d_filter_sbrow_deblock_rows)(Dav1dFrameContext *const f, const int sby) {
 2006|  30.9k|    const int y = sby * f->sb_step * 4;
 2007|  30.9k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2008|  30.9k|    pixel *const p[3] = {
 2009|  30.9k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  30.9k|#define PXSTRIDE(x) (x)
  ------------------
 2010|  30.9k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  30.9k|#define PXSTRIDE(x) (x)
  ------------------
 2011|  30.9k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  30.9k|#define PXSTRIDE(x) (x)
  ------------------
 2012|  30.9k|    };
 2013|  30.9k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2014|  30.9k|    if (f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK &&
  ------------------
  |  Branch (2014:9): [True: 30.9k, False: 0]
  ------------------
 2015|  30.9k|        (f->frame_hdr->loopfilter.level_y[0] || f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (2015:10): [True: 18.1k, False: 12.7k]
  |  Branch (2015:49): [True: 2.29k, False: 10.4k]
  ------------------
 2016|  20.4k|    {
 2017|  20.4k|        bytefn(dav1d_loopfilter_sbrow_rows)(f, p, mask, sby);
  ------------------
  |  |   87|  20.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  20.4k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2018|  20.4k|    }
 2019|  30.9k|    if (f->seq_hdr->cdef || f->lf.restore_planes) {
  ------------------
  |  Branch (2019:9): [True: 13.0k, False: 17.9k]
  |  Branch (2019:29): [True: 6.98k, False: 10.9k]
  ------------------
 2020|       |        // Store loop filtered pixels required by CDEF / LR
 2021|  19.9k|        bytefn(dav1d_copy_lpf)(f, p, sby);
  ------------------
  |  |   87|  19.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  19.9k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2022|  19.9k|    }
 2023|  30.9k|}
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: 10.0k, False: 2.98k]
  ------------------
 2040|  10.0k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2041|  10.0k|        pixel *p_up[3] = {
 2042|  10.0k|            p[0] - 8 * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  10.0k|#define PXSTRIDE(x) (x)
  ------------------
 2043|  10.0k|            p[1] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  10.0k|#define PXSTRIDE(x) (x)
  ------------------
 2044|  10.0k|            p[2] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  10.0k|#define PXSTRIDE(x) (x)
  ------------------
 2045|  10.0k|        };
 2046|  10.0k|        bytefn(dav1d_cdef_brow)(tc, p_up, prev_mask, start - 2, start, 1, sby);
  ------------------
  |  |   87|  10.0k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  10.0k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2047|  10.0k|    }
 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|  7.34k|void bytefn(dav1d_filter_sbrow_resize)(Dav1dFrameContext *const f, const int sby) {
 2054|  7.34k|    const int sbsz = f->sb_step;
 2055|  7.34k|    const int y = sby * sbsz * 4;
 2056|  7.34k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2057|  7.34k|    const pixel *const p[3] = {
 2058|  7.34k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
  ------------------
  |  |   53|  7.34k|#define PXSTRIDE(x) (x)
  ------------------
 2059|  7.34k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  7.34k|#define PXSTRIDE(x) (x)
  ------------------
 2060|  7.34k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  7.34k|#define PXSTRIDE(x) (x)
  ------------------
 2061|  7.34k|    };
 2062|  7.34k|    pixel *const sr_p[3] = {
 2063|  7.34k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
  ------------------
  |  |   53|  7.34k|#define PXSTRIDE(x) (x)
  ------------------
 2064|  7.34k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  7.34k|#define PXSTRIDE(x) (x)
  ------------------
 2065|  7.34k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  7.34k|#define PXSTRIDE(x) (x)
  ------------------
 2066|  7.34k|    };
 2067|  7.34k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400;
 2068|  24.9k|    for (int pl = 0; pl < 1 + 2 * has_chroma; pl++) {
  ------------------
  |  Branch (2068:22): [True: 17.6k, False: 7.34k]
  ------------------
 2069|  17.6k|        const int ss_ver = pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (2069:28): [True: 10.2k, False: 7.34k]
  |  Branch (2069:34): [True: 8.92k, False: 1.36k]
  ------------------
 2070|  17.6k|        const int h_start = 8 * !!sby >> ss_ver;
 2071|  17.6k|        const ptrdiff_t dst_stride = f->sr_cur.p.stride[!!pl];
 2072|  17.6k|        pixel *dst = sr_p[pl] - h_start * PXSTRIDE(dst_stride);
  ------------------
  |  |   53|  17.6k|#define PXSTRIDE(x) (x)
  ------------------
 2073|  17.6k|        const ptrdiff_t src_stride = f->cur.stride[!!pl];
 2074|  17.6k|        const pixel *src = p[pl] - h_start * PXSTRIDE(src_stride);
  ------------------
  |  |   53|  17.6k|#define PXSTRIDE(x) (x)
  ------------------
 2075|  17.6k|        const int h_end = 4 * (sbsz - 2 * (sby + 1 < f->sbh)) >> ss_ver;
 2076|  17.6k|        const int ss_hor = pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2076:28): [True: 10.2k, False: 7.34k]
  |  Branch (2076:34): [True: 9.07k, False: 1.21k]
  ------------------
 2077|  17.6k|        const int dst_w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 2078|  17.6k|        const int src_w = (4 * f->bw + ss_hor) >> ss_hor;
 2079|  17.6k|        const int img_h = (f->cur.p.h - sbsz * 4 * sby + ss_ver) >> ss_ver;
 2080|       |
 2081|  17.6k|        f->dsp->mc.resize(dst, dst_stride, src, src_stride, dst_w,
 2082|  17.6k|                          imin(img_h, h_end) + h_start, src_w,
 2083|  17.6k|                          f->resize_step[!!pl], f->resize_start[!!pl]
 2084|  17.6k|                          HIGHBD_CALL_SUFFIX);
 2085|  17.6k|    }
 2086|  7.34k|}
dav1d_filter_sbrow_lr_8bpc:
 2088|  10.7k|void bytefn(dav1d_filter_sbrow_lr)(Dav1dFrameContext *const f, const int sby) {
 2089|  10.7k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_RESTORATION)) return;
  ------------------
  |  Branch (2089:9): [True: 0, False: 10.7k]
  ------------------
 2090|  10.7k|    const int y = sby * f->sb_step * 4;
 2091|  10.7k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2092|  10.7k|    pixel *const sr_p[3] = {
 2093|  10.7k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
  ------------------
  |  |   53|  10.7k|#define PXSTRIDE(x) (x)
  ------------------
 2094|  10.7k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
  ------------------
  |  |   53|  10.7k|#define PXSTRIDE(x) (x)
  ------------------
 2095|  10.7k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
  ------------------
  |  |   53|  10.7k|#define PXSTRIDE(x) (x)
  ------------------
 2096|  10.7k|    };
 2097|  10.7k|    bytefn(dav1d_lr_sbrow)(f, sr_p, sby);
  ------------------
  |  |   87|  10.7k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  10.7k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2098|  10.7k|}
dav1d_filter_sbrow_8bpc:
 2100|  30.9k|void bytefn(dav1d_filter_sbrow)(Dav1dFrameContext *const f, const int sby) {
 2101|  30.9k|    bytefn(dav1d_filter_sbrow_deblock_cols)(f, sby);
  ------------------
  |  |   87|  30.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  30.9k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2102|  30.9k|    bytefn(dav1d_filter_sbrow_deblock_rows)(f, sby);
  ------------------
  |  |   87|  30.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  30.9k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2103|  30.9k|    if (f->seq_hdr->cdef)
  ------------------
  |  Branch (2103:9): [True: 13.0k, False: 17.9k]
  ------------------
 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|  30.9k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1])
  ------------------
  |  Branch (2105:9): [True: 7.34k, False: 23.6k]
  ------------------
 2106|  7.34k|        bytefn(dav1d_filter_sbrow_resize)(f, sby);
  ------------------
  |  |   87|  7.34k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  7.34k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2107|  30.9k|    if (f->lf.restore_planes)
  ------------------
  |  Branch (2107:9): [True: 10.7k, False: 20.2k]
  ------------------
 2108|  10.7k|        bytefn(dav1d_filter_sbrow_lr)(f, sby);
  ------------------
  |  |   87|  10.7k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  10.7k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2109|  30.9k|}
dav1d_backup_ipred_edge_8bpc:
 2111|  33.6k|void bytefn(dav1d_backup_ipred_edge)(Dav1dTaskContext *const t) {
 2112|  33.6k|    const Dav1dFrameContext *const f = t->f;
 2113|  33.6k|    Dav1dTileState *const ts = t->ts;
 2114|  33.6k|    const int sby = t->by >> f->sb_shift;
 2115|  33.6k|    const int sby_off = f->sb128w * 128 * sby;
 2116|  33.6k|    const int x_off = ts->tiling.col_start;
 2117|       |
 2118|  33.6k|    const pixel *const y =
 2119|  33.6k|        ((const pixel *) f->cur.data[0]) + x_off * 4 +
 2120|  33.6k|                    ((t->by + f->sb_step) * 4 - 1) * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|  33.6k|#define PXSTRIDE(x) (x)
  ------------------
 2121|  33.6k|    pixel_copy(&f->ipred_edge[0][sby_off + x_off * 4], y,
  ------------------
  |  |   47|  33.6k|#define pixel_copy memcpy
  ------------------
 2122|  33.6k|               4 * (ts->tiling.col_end - x_off));
 2123|       |
 2124|  33.6k|    if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (2124:9): [True: 21.0k, False: 12.6k]
  ------------------
 2125|  21.0k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2126|  21.0k|        const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 2127|       |
 2128|  21.0k|        const ptrdiff_t uv_off = (x_off * 4 >> ss_hor) +
 2129|  21.0k|            (((t->by + f->sb_step) * 4 >> ss_ver) - 1) * PXSTRIDE(f->cur.stride[1]);
  ------------------
  |  |   53|  21.0k|#define PXSTRIDE(x) (x)
  ------------------
 2130|  63.0k|        for (int pl = 1; pl <= 2; pl++)
  ------------------
  |  Branch (2130:26): [True: 42.0k, False: 21.0k]
  ------------------
 2131|  42.0k|            pixel_copy(&f->ipred_edge[pl][sby_off + (x_off * 4 >> ss_hor)],
  ------------------
  |  |   47|  42.0k|#define pixel_copy memcpy
  ------------------
 2132|  42.0k|                       &((const pixel *) f->cur.data[pl])[uv_off],
 2133|  42.0k|                       4 * (ts->tiling.col_end - x_off) >> ss_hor);
 2134|  21.0k|    }
 2135|  33.6k|}
dav1d_copy_pal_block_y_8bpc:
 2141|  6.19k|{
 2142|  6.19k|    const Dav1dFrameContext *const f = t->f;
 2143|  6.19k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2143:24): [True: 0, False: 6.19k]
  ------------------
 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.19k|        bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  6.19k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  6.19k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2147|  29.0k|    for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2147:21): [True: 22.9k, False: 6.19k]
  ------------------
 2148|  22.9k|        memcpy(bytefn(t->al_pal)[0][bx4 + x][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  22.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  22.9k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2149|  24.2k|    for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2149:21): [True: 18.0k, False: 6.19k]
  ------------------
 2150|  18.0k|        memcpy(bytefn(t->al_pal)[1][by4 + y][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  18.0k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  18.0k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2151|  6.19k|}
dav1d_copy_pal_block_uv_8bpc:
 2157|  2.06k|{
 2158|  2.06k|    const Dav1dFrameContext *const f = t->f;
 2159|  2.06k|    const pixel (*const pal)[8] = t->frame_thread.pass ?
  ------------------
  |  Branch (2159:35): [True: 0, False: 2.06k]
  ------------------
 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.06k|        bytefn(t->scratch.pal);
  ------------------
  |  |   87|  2.06k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.06k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2163|       |    // see aomedia bug 2183 for why we use luma coordinates here
 2164|  6.19k|    for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (2164:22): [True: 4.13k, False: 2.06k]
  ------------------
 2165|  21.7k|        for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2165:25): [True: 17.6k, False: 4.13k]
  ------------------
 2166|  17.6k|            memcpy(bytefn(t->al_pal)[0][bx4 + x][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  17.6k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  17.6k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2167|  19.4k|        for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2167:25): [True: 15.2k, False: 4.13k]
  ------------------
 2168|  15.2k|            memcpy(bytefn(t->al_pal)[1][by4 + y][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  15.2k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  15.2k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2169|  4.13k|    }
 2170|  2.06k|}
dav1d_read_pal_plane_8bpc:
 2175|  8.25k|{
 2176|  8.25k|    Dav1dTileState *const ts = t->ts;
 2177|  8.25k|    const Dav1dFrameContext *const f = t->f;
 2178|  8.25k|    const int pal_sz = b->pal_sz[pl] = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  8.25k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 2179|  8.25k|                                           ts->cdf.m.pal_sz[pl][sz_ctx], 6) + 2;
 2180|  8.25k|    pixel cache[16], used_cache[8];
 2181|  8.25k|    int l_cache = pl ? t->pal_sz_uv[1][by4] : t->l.pal_sz[by4];
  ------------------
  |  Branch (2181:19): [True: 2.06k, False: 6.19k]
  ------------------
 2182|  8.25k|    int n_cache = 0;
 2183|       |    // don't reuse above palette outside SB64 boundaries
 2184|  8.25k|    int a_cache = by4 & 15 ? pl ? t->pal_sz_uv[0][bx4] : t->a->pal_sz[bx4] : 0;
  ------------------
  |  Branch (2184:19): [True: 6.08k, False: 2.17k]
  |  Branch (2184:30): [True: 1.37k, False: 4.71k]
  ------------------
 2185|  8.25k|    const pixel *l = bytefn(t->al_pal)[1][by4][pl];
  ------------------
  |  |   87|  8.25k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.25k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2186|  8.25k|    const pixel *a = bytefn(t->al_pal)[0][bx4][pl];
  ------------------
  |  |   87|  8.25k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.25k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2187|       |
 2188|       |    // fill/sort cache
 2189|  17.5k|    while (l_cache && a_cache) {
  ------------------
  |  Branch (2189:12): [True: 11.9k, False: 5.59k]
  |  Branch (2189:23): [True: 9.32k, False: 2.66k]
  ------------------
 2190|  9.32k|        if (*l < *a) {
  ------------------
  |  Branch (2190:13): [True: 3.50k, False: 5.82k]
  ------------------
 2191|  3.50k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2191:17): [True: 665, False: 2.84k]
  |  Branch (2191:29): [True: 2.80k, False: 37]
  ------------------
 2192|  3.47k|                cache[n_cache++] = *l;
 2193|  3.50k|            l++;
 2194|  3.50k|            l_cache--;
 2195|  5.82k|        } else {
 2196|  5.82k|            if (*a == *l) {
  ------------------
  |  Branch (2196:17): [True: 2.29k, False: 3.52k]
  ------------------
 2197|  2.29k|                l++;
 2198|  2.29k|                l_cache--;
 2199|  2.29k|            }
 2200|  5.82k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2200:17): [True: 1.02k, False: 4.79k]
  |  Branch (2200:29): [True: 4.61k, False: 179]
  ------------------
 2201|  5.64k|                cache[n_cache++] = *a;
 2202|  5.82k|            a++;
 2203|  5.82k|            a_cache--;
 2204|  5.82k|        }
 2205|  9.32k|    }
 2206|  8.25k|    if (l_cache) {
  ------------------
  |  Branch (2206:9): [True: 2.66k, False: 5.59k]
  ------------------
 2207|  10.2k|        do {
 2208|  10.2k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2208:17): [True: 1.93k, False: 8.35k]
  |  Branch (2208:29): [True: 6.56k, False: 1.79k]
  ------------------
 2209|  8.49k|                cache[n_cache++] = *l;
 2210|  10.2k|            l++;
 2211|  10.2k|        } while (--l_cache > 0);
  ------------------
  |  Branch (2211:18): [True: 7.62k, False: 2.66k]
  ------------------
 2212|  5.59k|    } else if (a_cache) {
  ------------------
  |  Branch (2212:16): [True: 1.97k, False: 3.62k]
  ------------------
 2213|  7.37k|        do {
 2214|  7.37k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2214:17): [True: 1.23k, False: 6.14k]
  |  Branch (2214:29): [True: 4.58k, False: 1.55k]
  ------------------
 2215|  5.82k|                cache[n_cache++] = *a;
 2216|  7.37k|            a++;
 2217|  7.37k|        } while (--a_cache > 0);
  ------------------
  |  Branch (2217:18): [True: 5.40k, False: 1.97k]
  ------------------
 2218|  1.97k|    }
 2219|       |
 2220|       |    // find reused cache entries
 2221|  8.25k|    int i = 0;
 2222|  28.6k|    for (int n = 0; n < n_cache && i < pal_sz; n++)
  ------------------
  |  Branch (2222:21): [True: 21.3k, False: 7.24k]
  |  Branch (2222:36): [True: 20.3k, False: 1.01k]
  ------------------
 2223|  20.3k|        if (dav1d_msac_decode_bool_equi(&ts->msac))
  ------------------
  |  |   53|  20.3k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2223:13): [True: 10.4k, False: 9.92k]
  ------------------
 2224|  10.4k|            used_cache[i++] = cache[n];
 2225|  8.25k|    const int n_used_cache = i;
 2226|       |
 2227|       |    // parse new entries
 2228|  8.25k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2228:24): [True: 0, False: 8.25k]
  ------------------
 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.25k|        bytefn(t->scratch.pal)[pl];
  ------------------
  |  |   87|  8.25k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  8.25k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2232|  8.25k|    if (i < pal_sz) {
  ------------------
  |  Branch (2232:9): [True: 6.72k, False: 1.53k]
  ------------------
 2233|  6.72k|        const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2233:25): [True: 6.72k, Folded]
  ------------------
 2234|  6.72k|        int prev = pal[i++] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2235|       |
 2236|  6.72k|        if (i < pal_sz) {
  ------------------
  |  Branch (2236:13): [True: 5.97k, False: 746]
  ------------------
 2237|  5.97k|            int bits = bpc - 3 + dav1d_msac_decode_bools(&ts->msac, 2);
 2238|  5.97k|            const int max = (1 << bpc) - 1;
 2239|       |
 2240|  13.6k|            do {
 2241|  13.6k|                const int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2242|  13.6k|                prev = pal[i++] = imin(prev + delta + !pl, max);
 2243|  13.6k|                if (prev + !pl >= max) {
  ------------------
  |  Branch (2243:21): [True: 2.78k, False: 10.8k]
  ------------------
 2244|  7.70k|                    for (; i < pal_sz; i++)
  ------------------
  |  Branch (2244:28): [True: 4.91k, False: 2.78k]
  ------------------
 2245|  4.91k|                        pal[i] = max;
 2246|  2.78k|                    break;
 2247|  2.78k|                }
 2248|  10.8k|                bits = imin(bits, 1 + ulog2(max - prev - !pl));
 2249|  10.8k|            } while (i < pal_sz);
  ------------------
  |  Branch (2249:22): [True: 7.69k, False: 3.18k]
  ------------------
 2250|  5.97k|        }
 2251|       |
 2252|       |        // merge cache+new entries
 2253|  6.72k|        int n = 0, m = n_used_cache;
 2254|  38.2k|        for (i = 0; i < pal_sz; i++) {
  ------------------
  |  Branch (2254:21): [True: 31.5k, False: 6.72k]
  ------------------
 2255|  31.5k|            if (n < n_used_cache && (m >= pal_sz || used_cache[n] <= pal[m])) {
  ------------------
  |  Branch (2255:17): [True: 10.7k, False: 20.8k]
  |  Branch (2255:38): [True: 2.25k, False: 8.50k]
  |  Branch (2255:53): [True: 4.02k, False: 4.48k]
  ------------------
 2256|  6.27k|                pal[i] = used_cache[n++];
 2257|  25.3k|            } else {
 2258|  25.3k|                assert(m < pal_sz);
  ------------------
  |  |  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]
  |  |  ------------------
  ------------------
 2259|  25.3k|                pal[i] = pal[m++];
 2260|  25.3k|            }
 2261|  31.5k|        }
 2262|  6.72k|    } else {
 2263|  1.53k|        memcpy(pal, used_cache, n_used_cache * sizeof(*used_cache));
 2264|  1.53k|    }
 2265|       |
 2266|  8.25k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  8.25k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 8.25k]
  |  |  ------------------
  |  |   35|  8.25k|        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.25k|        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.25k|}
dav1d_read_pal_uv_8bpc:
 2280|  2.06k|{
 2281|  2.06k|    bytefn(dav1d_read_pal_plane)(t, b, 1, sz_ctx, bx4, by4);
  ------------------
  |  |   87|  2.06k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.06k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2282|       |
 2283|       |    // V pal coding
 2284|  2.06k|    Dav1dTileState *const ts = t->ts;
 2285|  2.06k|    const Dav1dFrameContext *const f = t->f;
 2286|  2.06k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2286:24): [True: 0, False: 2.06k]
  ------------------
 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.06k|        bytefn(t->scratch.pal)[2];
  ------------------
  |  |   87|  2.06k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   51|  2.06k|#define bitfn(x) x##_8bpc
  |  |  ------------------
  ------------------
 2290|  2.06k|    const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2290:21): [True: 2.06k, Folded]
  ------------------
 2291|  2.06k|    if (dav1d_msac_decode_bool_equi(&ts->msac)) {
  ------------------
  |  |   53|  2.06k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2291:9): [True: 1.02k, False: 1.04k]
  ------------------
 2292|  1.02k|        const int bits = bpc - 4 + dav1d_msac_decode_bools(&ts->msac, 2);
 2293|  1.02k|        int prev = pal[0] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2294|  1.02k|        const int max = (1 << bpc) - 1;
 2295|  4.32k|        for (int i = 1; i < b->pal_sz[1]; i++) {
  ------------------
  |  Branch (2295:25): [True: 3.30k, False: 1.02k]
  ------------------
 2296|  3.30k|            int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2297|  3.30k|            if (delta && dav1d_msac_decode_bool_equi(&ts->msac)) delta = -delta;
  ------------------
  |  |   53|  3.17k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2297:17): [True: 3.17k, False: 129]
  |  Branch (2297:26): [True: 1.55k, False: 1.62k]
  ------------------
 2298|  3.30k|            prev = pal[i] = (prev + delta) & max;
 2299|  3.30k|        }
 2300|  1.04k|    } else {
 2301|  5.22k|        for (int i = 0; i < b->pal_sz[1]; i++)
  ------------------
  |  Branch (2301:25): [True: 4.18k, False: 1.04k]
  ------------------
 2302|  4.18k|            pal[i] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2303|  1.04k|    }
 2304|  2.06k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  2.06k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.06k]
  |  |  ------------------
  |  |   35|  2.06k|        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.06k|        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.06k|}
recon_tmpl.c:read_coef_tree:
  736|   171k|{
  737|   171k|    const Dav1dFrameContext *const f = t->f;
  738|   171k|    Dav1dTileState *const ts = t->ts;
  739|   171k|    const Dav1dDSPContext *const dsp = f->dsp;
  740|   171k|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[ytx];
  741|   171k|    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|   171k|    if (depth < 2 && tx_split[depth] &&
  ------------------
  |  Branch (745:9): [True: 151k, False: 20.0k]
  |  Branch (745:22): [True: 22.4k, False: 128k]
  ------------------
  746|  22.4k|        tx_split[depth] & (1 << (y_off * 4 + x_off)))
  ------------------
  |  Branch (746:9): [True: 17.0k, False: 5.36k]
  ------------------
  747|  17.0k|    {
  748|  17.0k|        const enum RectTxfmSize sub = t_dim->sub;
  749|  17.0k|        const TxfmInfo *const sub_t_dim = &dav1d_txfm_dimensions[sub];
  750|  17.0k|        const int txsw = sub_t_dim->w, txsh = sub_t_dim->h;
  751|       |
  752|  17.0k|        read_coef_tree(t, bs, b, sub, depth + 1, tx_split,
  753|  17.0k|                       x_off * 2 + 0, y_off * 2 + 0, dst);
  754|  17.0k|        t->bx += txsw;
  755|  17.0k|        if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (755:13): [True: 13.6k, False: 3.42k]
  |  Branch (755:27): [True: 12.8k, False: 770]
  ------------------
  756|  12.8k|            read_coef_tree(t, bs, b, sub, depth + 1, tx_split, x_off * 2 + 1,
  757|  12.8k|                           y_off * 2 + 0, dst ? &dst[4 * txsw] : NULL);
  ------------------
  |  Branch (757:43): [True: 12.8k, False: 0]
  ------------------
  758|  17.0k|        t->bx -= txsw;
  759|  17.0k|        t->by += txsh;
  760|  17.0k|        if (txh >= txw && t->by < f->bh) {
  ------------------
  |  Branch (760:13): [True: 12.2k, False: 4.83k]
  |  Branch (760:27): [True: 11.7k, False: 505]
  ------------------
  761|  11.7k|            if (dst)
  ------------------
  |  Branch (761:17): [True: 11.7k, False: 0]
  ------------------
  762|  11.7k|                dst += 4 * txsh * PXSTRIDE(f->cur.stride[0]);
  ------------------
  |  |   53|  11.7k|#define PXSTRIDE(x) (x)
  ------------------
  763|  11.7k|            read_coef_tree(t, bs, b, sub, depth + 1, tx_split,
  764|  11.7k|                           x_off * 2 + 0, y_off * 2 + 1, dst);
  765|  11.7k|            t->bx += txsw;
  766|  11.7k|            if (txw >= txh && t->bx < f->bw)
  ------------------
  |  Branch (766:17): [True: 8.31k, False: 3.39k]
  |  Branch (766:31): [True: 7.59k, False: 711]
  ------------------
  767|  7.59k|                read_coef_tree(t, bs, b, sub, depth + 1, tx_split, x_off * 2 + 1,
  768|  7.59k|                               y_off * 2 + 1, dst ? &dst[4 * txsw] : NULL);
  ------------------
  |  Branch (768:47): [True: 7.59k, False: 0]
  ------------------
  769|  11.7k|            t->bx -= txsw;
  770|  11.7k|        }
  771|  17.0k|        t->by -= txsh;
  772|   154k|    } else {
  773|   154k|        const int bx4 = t->bx & 31, by4 = t->by & 31;
  774|   154k|        enum TxfmType txtp;
  775|   154k|        uint8_t cf_ctx;
  776|   154k|        int eob;
  777|   154k|        coef *cf;
  778|       |
  779|   154k|        if (t->frame_thread.pass) {
  ------------------
  |  Branch (779:13): [True: 0, False: 154k]
  ------------------
  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|   154k|        } else {
  785|   154k|            cf = bitfn(t->cf);
  ------------------
  |  |   51|   154k|#define bitfn(x) x##_8bpc
  ------------------
  786|   154k|        }
  787|   154k|        if (t->frame_thread.pass != 2) {
  ------------------
  |  Branch (787:13): [True: 154k, False: 0]
  ------------------
  788|   154k|            eob = decode_coefs(t, &t->a->lcoef[bx4], &t->l.lcoef[by4],
  789|   154k|                               ytx, bs, b, 0, 0, cf, &txtp, &cf_ctx);
  790|   154k|            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   154k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 154k]
  |  |  ------------------
  |  |   35|   154k|        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|   154k|        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|   154k|            dav1d_memset_likely_pow2(&t->a->lcoef[bx4], cf_ctx, imin(txw, f->bw - t->bx));
  794|   154k|            dav1d_memset_likely_pow2(&t->l.lcoef[by4], cf_ctx, imin(txh, f->bh - t->by));
  795|   154k|#define set_ctx(rep_macro) \
  796|   154k|            for (int y = 0; y < txh; y++) { \
  797|   154k|                rep_macro(txtp_map, 0, txtp); \
  798|   154k|                txtp_map += 32; \
  799|   154k|            }
  800|   154k|            uint8_t *txtp_map = &t->scratch.txtp_map[by4 * 32 + bx4];
  801|   154k|            case_set_upto16(t_dim->lw);
  ------------------
  |  |   80|   154k|    switch (var) { \
  |  |   81|  52.7k|    case 0: set_ctx(set_ctx1); break; \
  |  |  ------------------
  |  |  |  |  796|   119k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 66.3k, False: 52.7k]
  |  |  |  |  ------------------
  |  |  |  |  797|  66.3k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  66.3k|    case 0: set_ctx(set_ctx1); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   56|  66.3k|    ((union alias8 *) &(var)[off])->u8 = (val) * 0x01
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|  66.3k|                txtp_map += 32; \
  |  |  |  |  799|  66.3k|            }
  |  |  ------------------
  |  |  |  Branch (81:5): [True: 52.7k, False: 101k]
  |  |  ------------------
  |  |   82|  48.8k|    case 1: set_ctx(set_ctx2); break; \
  |  |  ------------------
  |  |  |  |  796|   161k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 112k, False: 48.8k]
  |  |  |  |  ------------------
  |  |  |  |  797|   112k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|   112k|    case 1: set_ctx(set_ctx2); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|   112k|    ((union alias16 *) &(var)[off])->u16 = (val) * 0x0101
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|   112k|                txtp_map += 32; \
  |  |  |  |  799|   112k|            }
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 48.8k, False: 105k]
  |  |  ------------------
  |  |   83|  33.2k|    case 2: set_ctx(set_ctx4); break; \
  |  |  ------------------
  |  |  |  |  796|   139k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 105k, False: 33.2k]
  |  |  |  |  ------------------
  |  |  |  |  797|   105k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|   105k|    case 2: set_ctx(set_ctx4); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|   105k|    ((union alias32 *) &(var)[off])->u32 = (val) * 0x01010101U
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|   105k|                txtp_map += 32; \
  |  |  |  |  799|   105k|            }
  |  |  ------------------
  |  |  |  Branch (83:5): [True: 33.2k, False: 120k]
  |  |  ------------------
  |  |   84|  10.5k|    case 3: set_ctx(set_ctx8); break; \
  |  |  ------------------
  |  |  |  |  796|  74.5k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 64.0k, False: 10.5k]
  |  |  |  |  ------------------
  |  |  |  |  797|  64.0k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  64.0k|    case 3: set_ctx(set_ctx8); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   62|  64.0k|    ((union alias64 *) &(var)[off])->u64 = (val) * 0x0101010101010101ULL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|  64.0k|                txtp_map += 32; \
  |  |  |  |  799|  64.0k|            }
  |  |  ------------------
  |  |  |  Branch (84:5): [True: 10.5k, False: 143k]
  |  |  ------------------
  |  |   85|  8.78k|    case 4: set_ctx(set_ctx16); break; \
  |  |  ------------------
  |  |  |  |  796|   132k|            for (int y = 0; y < txh; y++) { \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (796:29): [True: 124k, False: 8.78k]
  |  |  |  |  ------------------
  |  |  |  |  797|   124k|                rep_macro(txtp_map, 0, txtp); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   85|   124k|    case 4: set_ctx(set_ctx16); break; \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   63|   124k|#define set_ctx16(var, off, val) do { \
  |  |  |  |  |  |  |  |   64|   124k|        memset(&(var)[off], val, 16); \
  |  |  |  |  |  |  |  |   65|   124k|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (65:14): [Folded, False: 124k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  798|   124k|                txtp_map += 32; \
  |  |  |  |  799|   124k|            }
  |  |  ------------------
  |  |  |  Branch (85:5): [True: 8.78k, False: 145k]
  |  |  ------------------
  |  |   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: 154k]
  |  |  ------------------
  |  |   87|   154k|    }
  ------------------
  802|   154k|#undef set_ctx
  803|   154k|            if (t->frame_thread.pass == 1)
  ------------------
  |  Branch (803:17): [True: 0, False: 154k]
  ------------------
  804|      0|                *ts->frame_thread[1].cbi++ = eob * (1 << 5) + txtp;
  805|   154k|        } else {
  806|      0|            const int cbi = *ts->frame_thread[0].cbi++;
  807|      0|            eob  = cbi >> 5;
  808|      0|            txtp = cbi & 0x1f;
  809|      0|        }
  810|   154k|        if (!(t->frame_thread.pass & 1)) {
  ------------------
  |  Branch (810:13): [True: 154k, False: 0]
  ------------------
  811|   154k|            assert(dst);
  ------------------
  |  |  140|   154k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 154k]
  |  |  |  Branch (140:68): [Folded, False: 154k]
  |  |  ------------------
  ------------------
  812|   154k|            if (eob >= 0) {
  ------------------
  |  Branch (812:17): [True: 113k, False: 40.8k]
  ------------------
  813|   113k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   113k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 113k]
  |  |  ------------------
  |  |   35|   113k|        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|   113k|        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|   113k|                dsp->itx.itxfm_add[ytx][txtp](dst, f->cur.stride[0], cf, eob
  816|   113k|                                              HIGHBD_CALL_SUFFIX);
  817|   113k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   113k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 113k]
  |  |  ------------------
  |  |   35|   113k|        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|   113k|        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|   113k|            }
  820|   154k|        }
  821|   154k|    }
  822|   171k|}
recon_tmpl.c:decode_coefs:
  327|  4.99M|{
  328|  4.99M|    Dav1dTileState *const ts = t->ts;
  329|  4.99M|    const int chroma = !!plane;
  330|  4.99M|    const Dav1dFrameContext *const f = t->f;
  331|  4.99M|    const int lossless = f->frame_hdr->segmentation.lossless[b->seg_id];
  332|  4.99M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[tx];
  333|  4.99M|    const int dbg = DEBUG_BLOCK_INFO && plane && 0;
  ------------------
  |  |   34|  4.99M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 4.99M]
  |  |  ------------------
  |  |   35|  4.99M|        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.99M|        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.99M|    if (dbg)
  ------------------
  |  Branch (335:9): [Folded, False: 4.99M]
  ------------------
  336|      0|        printf("Start: r=%d\n", ts->msac.rng);
  337|       |
  338|       |    // does this block have any non-zero coefficients
  339|  4.99M|    const int sctx = get_skip_ctx(t_dim, bs, a, l, chroma, f->cur.p.layout);
  340|  4.99M|    const int all_skip = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  4.99M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  341|  4.99M|                             ts->cdf.coef.skip[t_dim->ctx][sctx]);
  342|  4.99M|    if (dbg)
  ------------------
  |  Branch (342:9): [Folded, False: 4.99M]
  ------------------
  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.99M|    if (all_skip) {
  ------------------
  |  Branch (345:9): [True: 3.04M, False: 1.95M]
  ------------------
  346|  3.04M|        *res_ctx = 0x40;
  347|  3.04M|        *txtp = lossless * WHT_WHT; /* lossless ? WHT_WHT : DCT_DCT */
  348|  3.04M|        return -1;
  349|  3.04M|    }
  350|       |
  351|       |    // transform type (chroma: derived, luma: explicitly coded)
  352|  1.95M|    if (lossless) {
  ------------------
  |  Branch (352:9): [True: 91.7k, False: 1.85M]
  ------------------
  353|  91.7k|        assert(t_dim->max == TX_4X4);
  ------------------
  |  |  140|  91.7k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 91.7k]
  |  |  |  Branch (140:68): [Folded, False: 91.7k]
  |  |  ------------------
  ------------------
  354|  91.7k|        *txtp = WHT_WHT;
  355|  1.85M|    } else if (t_dim->max + intra >= TX_64X64) {
  ------------------
  |  Branch (355:16): [True: 314k, False: 1.54M]
  ------------------
  356|   314k|        *txtp = DCT_DCT;
  357|  1.54M|    } else if (chroma) {
  ------------------
  |  Branch (357:16): [True: 400k, False: 1.14M]
  ------------------
  358|       |        // inferred from either the luma txtp (inter) or a LUT (intra)
  359|   400k|        *txtp = intra ? dav1d_txtp_from_uvmode[b->uv_mode] :
  ------------------
  |  Branch (359:17): [True: 366k, False: 33.4k]
  ------------------
  360|   400k|                        get_uv_inter_txtp(t_dim, *txtp);
  361|  1.14M|    } else if (!f->frame_hdr->segmentation.qidx[b->seg_id]) {
  ------------------
  |  Branch (361:16): [True: 6.87k, False: 1.13M]
  ------------------
  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|  6.87k|        *txtp = DCT_DCT;
  366|  1.13M|    } else {
  367|  1.13M|        unsigned idx;
  368|  1.13M|        if (intra) {
  ------------------
  |  Branch (368:13): [True: 1.03M, False: 98.4k]
  ------------------
  369|  1.03M|            const enum IntraPredMode y_mode_nofilt = b->y_mode == FILTER_PRED ?
  ------------------
  |  Branch (369:54): [True: 80.3k, False: 959k]
  ------------------
  370|   959k|                dav1d_filter_mode_to_y_mode[b->y_angle] : b->y_mode;
  371|  1.03M|            if (f->frame_hdr->reduced_txtp_set || t_dim->min == TX_16X16) {
  ------------------
  |  Branch (371:17): [True: 364k, False: 674k]
  |  Branch (371:51): [True: 124k, False: 550k]
  ------------------
  372|   489k|                idx = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   489k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  373|   489k|                          ts->cdf.m.txtp_intra2[t_dim->min][y_mode_nofilt], 4);
  374|   489k|                *txtp = dav1d_tx_types_per_set[idx + 0];
  375|   550k|            } else {
  376|   550k|                idx = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|   550k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
  377|   550k|                          ts->cdf.m.txtp_intra1[t_dim->min][y_mode_nofilt], 6);
  378|   550k|                *txtp = dav1d_tx_types_per_set[idx + 5];
  379|   550k|            }
  380|  1.03M|            if (dbg)
  ------------------
  |  Branch (380:17): [Folded, False: 1.03M]
  ------------------
  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|  1.03M|        } else {
  384|  98.4k|            if (f->frame_hdr->reduced_txtp_set || t_dim->max == TX_32X32) {
  ------------------
  |  Branch (384:17): [True: 38.2k, False: 60.2k]
  |  Branch (384:51): [True: 6.41k, False: 53.7k]
  ------------------
  385|  44.7k|                idx = dav1d_msac_decode_bool_adapt(&ts->msac,
  ------------------
  |  |   52|  44.7k|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  386|  44.7k|                          ts->cdf.m.txtp_inter3[t_dim->min]);
  387|  44.7k|                *txtp = (idx - 1) & IDTX; /* idx ? DCT_DCT : IDTX */
  388|  53.7k|            } else if (t_dim->min == TX_16X16) {
  ------------------
  |  Branch (388:24): [True: 6.85k, False: 46.9k]
  ------------------
  389|  6.85k|                idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|  6.85k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
  390|  6.85k|                          ts->cdf.m.txtp_inter2, 11);
  391|  6.85k|                *txtp = dav1d_tx_types_per_set[idx + 12];
  392|  46.9k|            } else {
  393|  46.9k|                idx = dav1d_msac_decode_symbol_adapt16(&ts->msac,
  ------------------
  |  |   57|  46.9k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  ------------------
  394|  46.9k|                          ts->cdf.m.txtp_inter1[t_dim->min], 15);
  395|  46.9k|                *txtp = dav1d_tx_types_per_set[idx + 24];
  396|  46.9k|            }
  397|  98.4k|            if (dbg)
  ------------------
  |  Branch (397:17): [Folded, False: 98.4k]
  ------------------
  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|  98.4k|        }
  401|  1.13M|    }
  402|       |
  403|       |    // find end-of-block (eob)
  404|  1.95M|    int eob;
  405|  1.95M|    const int slw = imin(t_dim->lw, TX_32X32), slh = imin(t_dim->lh, TX_32X32);
  406|  1.95M|    const int tx2dszctx = slw + slh;
  407|  1.95M|    const enum TxClass tx_class = dav1d_tx_type_class[*txtp];
  408|  1.95M|    const int is_1d = tx_class != TX_CLASS_2D;
  409|  1.95M|    switch (tx2dszctx) {
  ------------------
  |  Branch (409:13): [True: 1.95M, 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|   254k|    case_sz(0,   16,  8, [is_1d]);
  ------------------
  |  |  411|   254k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 254k, False: 1.69M]
  |  |  ------------------
  |  |  412|   254k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   254k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   254k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   254k|        break; \
  |  |  415|   254k|    }
  ------------------
  417|   188k|    case_sz(1,   32,  8, [is_1d]);
  ------------------
  |  |  411|   188k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 188k, False: 1.76M]
  |  |  ------------------
  |  |  412|   188k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   188k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   188k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   188k|        break; \
  |  |  415|   188k|    }
  ------------------
  418|   723k|    case_sz(2,   64,  8, [is_1d]);
  ------------------
  |  |  411|   723k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 723k, False: 1.22M]
  |  |  ------------------
  |  |  412|   723k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   723k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   723k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   723k|        break; \
  |  |  415|   723k|    }
  ------------------
  419|   209k|    case_sz(3,  128,  8, [is_1d]);
  ------------------
  |  |  411|   209k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 209k, False: 1.74M]
  |  |  ------------------
  |  |  412|   209k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   209k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   48|   209k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  |  |  ------------------
  |  |  414|   209k|        break; \
  |  |  415|   209k|    }
  ------------------
  420|   304k|    case_sz(4,  256, 16, [is_1d]);
  ------------------
  |  |  411|   304k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 304k, False: 1.64M]
  |  |  ------------------
  |  |  412|   304k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   304k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   57|   304k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  |  |  ------------------
  |  |  414|   304k|        break; \
  |  |  415|   304k|    }
  ------------------
  421|  90.1k|    case_sz(5,  512, 16,        );
  ------------------
  |  |  411|  90.1k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 90.1k, False: 1.86M]
  |  |  ------------------
  |  |  412|  90.1k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|  90.1k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   57|  90.1k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  |  |  ------------------
  |  |  414|  90.1k|        break; \
  |  |  415|  90.1k|    }
  ------------------
  422|   180k|    case_sz(6, 1024, 16,        );
  ------------------
  |  |  411|   180k|    case sz: { \
  |  |  ------------------
  |  |  |  Branch (411:5): [True: 180k, False: 1.77M]
  |  |  ------------------
  |  |  412|   180k|        uint16_t *const eob_bin_cdf = ts->cdf.coef.eob_bin_##bin[chroma]is_1d; \
  |  |  413|   180k|        eob = dav1d_msac_decode_symbol_adapt##ns(&ts->msac, eob_bin_cdf, 4 + sz); \
  |  |  ------------------
  |  |  |  |   57|   180k|#define dav1d_msac_decode_symbol_adapt16(ctx, cdf, symb) ((ctx)->symbol_adapt16(ctx, cdf, symb))
  |  |  ------------------
  |  |  414|   180k|        break; \
  |  |  415|   180k|    }
  ------------------
  423|  1.95M|#undef case_sz
  424|  1.95M|    }
  425|  1.95M|    if (dbg)
  ------------------
  |  Branch (425:9): [Folded, False: 1.95M]
  ------------------
  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.95M|    if (eob > 1) {
  ------------------
  |  Branch (428:9): [True: 1.08M, False: 866k]
  ------------------
  429|  1.08M|        const int eob_bin = eob - 2;
  430|  1.08M|        uint16_t *const eob_hi_bit_cdf =
  431|  1.08M|            ts->cdf.coef.eob_hi_bit[t_dim->ctx][chroma][eob_bin];
  432|  1.08M|        const int eob_hi_bit = dav1d_msac_decode_bool_adapt(&ts->msac, eob_hi_bit_cdf);
  ------------------
  |  |   52|  1.08M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  433|  1.08M|        if (dbg)
  ------------------
  |  Branch (433:13): [Folded, False: 1.08M]
  ------------------
  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.08M|        eob = ((eob_hi_bit | 2) << eob_bin) | dav1d_msac_decode_bools(&ts->msac, eob_bin);
  437|  1.08M|        if (dbg)
  ------------------
  |  Branch (437:13): [Folded, False: 1.08M]
  ------------------
  438|      0|            printf("Post-eob[%d]: r=%d\n", eob, ts->msac.rng);
  439|  1.08M|    }
  440|  1.95M|    assert(eob >= 0);
  ------------------
  |  |  140|  1.95M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.95M]
  |  |  |  Branch (140:68): [Folded, False: 1.95M]
  |  |  ------------------
  ------------------
  441|       |
  442|       |    // base tokens
  443|  1.95M|    uint16_t (*const eob_cdf)[4] = ts->cdf.coef.eob_base_tok[t_dim->ctx][chroma];
  444|  1.95M|    uint16_t (*const hi_cdf)[4] = ts->cdf.coef.br_tok[imin(t_dim->ctx, 3)][chroma];
  445|  1.95M|    unsigned rc, dc_tok;
  446|       |
  447|  1.95M|    if (eob) {
  ------------------
  |  Branch (447:9): [True: 1.15M, False: 795k]
  ------------------
  448|  1.15M|        uint16_t (*const lo_cdf)[4] = ts->cdf.coef.base_tok[t_dim->ctx][chroma];
  449|  1.15M|        uint8_t *const levels = t->scratch.levels; // bits 0-5: tok, 6-7: lo_tok
  450|       |
  451|       |        /* eob */
  452|  1.15M|        unsigned ctx = 1 + (eob > 2 << tx2dszctx) + (eob > 4 << tx2dszctx);
  453|  1.15M|        int eob_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, eob_cdf[ctx], 2);
  ------------------
  |  |   47|  1.15M|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  454|  1.15M|        int tok = eob_tok + 1;
  455|  1.15M|        int level_tok = tok * 0x41;
  456|  1.15M|        unsigned mag;
  457|       |
  458|  1.15M|#define DECODE_COEFS_CLASS(tx_class) \
  459|  1.15M|        unsigned x, y; \
  460|  1.15M|        uint8_t *level; \
  461|  1.15M|        if (tx_class == TX_CLASS_2D) \
  462|  1.15M|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  463|  1.15M|        else if (tx_class == TX_CLASS_H) \
  464|       |            /* Transposing reduces the stride and padding requirements */ \
  465|  1.15M|            x = eob & mask, y = eob >> shift, rc = eob; \
  466|  1.15M|        else /* tx_class == TX_CLASS_V */ \
  467|  1.15M|            x = eob & mask, y = eob >> shift, rc = (x << shift2) | y; \
  468|  1.15M|        if (dbg) \
  469|  1.15M|            printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  470|  1.15M|                   t_dim->ctx, chroma, ctx, eob, rc, tok, ts->msac.rng); \
  471|  1.15M|        if (eob_tok == 2) { \
  472|  1.15M|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  473|  1.15M|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  474|  1.15M|            level_tok = tok + (3 << 6); \
  475|  1.15M|            if (dbg) \
  476|  1.15M|                printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  477|  1.15M|                       imin(t_dim->ctx, 3), chroma, ctx, eob, rc, tok, \
  478|  1.15M|                       ts->msac.rng); \
  479|  1.15M|        } \
  480|  1.15M|        cf[rc] = tok << 11; \
  481|  1.15M|        if (tx_class == TX_CLASS_2D) \
  482|  1.15M|            level = levels + rc; \
  483|  1.15M|        else \
  484|  1.15M|            level = levels + x * stride + y; \
  485|  1.15M|        *level = (uint8_t) level_tok; \
  486|  1.15M|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  487|  1.15M|            unsigned rc_i; \
  488|  1.15M|            if (tx_class == TX_CLASS_2D) \
  489|  1.15M|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  490|  1.15M|            else if (tx_class == TX_CLASS_H) \
  491|  1.15M|                x = i & mask, y = i >> shift, rc_i = i; \
  492|  1.15M|            else /* tx_class == TX_CLASS_V */ \
  493|  1.15M|                x = i & mask, y = i >> shift, rc_i = (x << shift2) | y; \
  494|  1.15M|            assert(x < 32 && y < 32); \
  495|  1.15M|            if (tx_class == TX_CLASS_2D) \
  496|  1.15M|                level = levels + rc_i; \
  497|  1.15M|            else \
  498|  1.15M|                level = levels + x * stride + y; \
  499|  1.15M|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  500|  1.15M|            if (tx_class == TX_CLASS_2D) \
  501|  1.15M|                y |= x; \
  502|  1.15M|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  503|  1.15M|            if (dbg) \
  504|  1.15M|                printf("Post-lo_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  505|  1.15M|                       t_dim->ctx, chroma, ctx, i, rc_i, tok, ts->msac.rng); \
  506|  1.15M|            if (tok == 3) { \
  507|  1.15M|                mag &= 63; \
  508|  1.15M|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  509|  1.15M|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  510|  1.15M|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  511|  1.15M|                if (dbg) \
  512|  1.15M|                    printf("Post-hi_tok[%d][%d][%d][%d=%d=%d]: r=%d\n", \
  513|  1.15M|                           imin(t_dim->ctx, 3), chroma, ctx, i, rc_i, tok, \
  514|  1.15M|                           ts->msac.rng); \
  515|  1.15M|                *level = (uint8_t) (tok + (3 << 6)); \
  516|  1.15M|                cf[rc_i] = (tok << 11) | rc; \
  517|  1.15M|                rc = rc_i; \
  518|  1.15M|            } else { \
  519|       |                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  520|  1.15M|                tok *= 0x17ff41; \
  521|  1.15M|                *level = (uint8_t) tok; \
  522|       |                /* tok ? (tok << 11) | rc : 0 */ \
  523|  1.15M|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  524|  1.15M|                if (tok) rc = rc_i; \
  525|  1.15M|                cf[rc_i] = tok; \
  526|  1.15M|            } \
  527|  1.15M|        } \
  528|       |        /* dc */ \
  529|  1.15M|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  530|  1.15M|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  531|  1.15M|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  532|  1.15M|        if (dbg) \
  533|  1.15M|            printf("Post-dc_lo_tok[%d][%d][%d][%d]: r=%d\n", \
  534|  1.15M|                   t_dim->ctx, chroma, ctx, dc_tok, ts->msac.rng); \
  535|  1.15M|        if (dc_tok == 3) { \
  536|  1.15M|            if (tx_class == TX_CLASS_2D) \
  537|  1.15M|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  538|  1.15M|                      levels[1 * stride + 1]; \
  539|  1.15M|            mag &= 63; \
  540|  1.15M|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  541|  1.15M|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  542|  1.15M|            if (dbg) \
  543|  1.15M|                printf("Post-dc_hi_tok[%d][%d][0][%d]: r=%d\n", \
  544|  1.15M|                       imin(t_dim->ctx, 3), chroma, dc_tok, ts->msac.rng); \
  545|  1.15M|        } \
  546|  1.15M|        break
  547|       |
  548|  1.15M|        const uint16_t *scan;
  549|  1.15M|        switch (tx_class) {
  550|  1.09M|        case TX_CLASS_2D: {
  ------------------
  |  Branch (550:9): [True: 1.09M, False: 62.5k]
  ------------------
  551|  1.09M|            const unsigned nonsquare_tx = tx >= RTX_4X8;
  552|  1.09M|            const uint8_t (*const lo_ctx_offsets)[5] =
  553|  1.09M|                dav1d_lo_ctx_offsets[nonsquare_tx + (tx & nonsquare_tx)];
  554|  1.09M|            scan = dav1d_scans[tx];
  555|  1.09M|            const ptrdiff_t stride = 4 << slh;
  556|  1.09M|            const unsigned shift = slh + 2, shift2 = 0;
  557|  1.09M|            const unsigned mask = (4 << slh) - 1;
  558|  1.09M|            memset(levels, 0, stride * ((4 << slw) + 2));
  559|  1.09M|            DECODE_COEFS_CLASS(TX_CLASS_2D);
  ------------------
  |  |  459|  1.09M|        unsigned x, y; \
  |  |  460|  1.09M|        uint8_t *level; \
  |  |  461|  1.09M|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (461:13): [True: 1.09M, Folded]
  |  |  ------------------
  |  |  462|  1.09M|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  |  |  463|  1.09M|        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.09M|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (468:13): [Folded, False: 1.09M]
  |  |  ------------------
  |  |  469|  1.09M|            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.09M|        if (eob_tok == 2) { \
  |  |  ------------------
  |  |  |  Branch (471:13): [True: 31.9k, False: 1.06M]
  |  |  ------------------
  |  |  472|  31.9k|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  |  |  ------------------
  |  |  |  Branch (472:19): [True: 17.8k, False: 14.1k]
  |  |  |  Branch (472:20): [True: 31.9k, Folded]
  |  |  ------------------
  |  |  473|  31.9k|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  31.9k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  474|  31.9k|            level_tok = tok + (3 << 6); \
  |  |  475|  31.9k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (475:17): [Folded, False: 31.9k]
  |  |  ------------------
  |  |  476|  31.9k|                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|  31.9k|        } \
  |  |  480|  1.09M|        cf[rc] = tok << 11; \
  |  |  481|  1.09M|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (481:13): [True: 1.09M, Folded]
  |  |  ------------------
  |  |  482|  1.09M|            level = levels + rc; \
  |  |  483|  1.09M|        else \
  |  |  484|  1.09M|            level = levels + x * stride + y; \
  |  |  485|  1.09M|        *level = (uint8_t) level_tok; \
  |  |  486|  30.5M|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  |  |  ------------------
  |  |  |  Branch (486:31): [True: 29.4M, False: 1.09M]
  |  |  ------------------
  |  |  487|  29.4M|            unsigned rc_i; \
  |  |  488|  29.4M|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (488:17): [True: 29.4M, Folded]
  |  |  ------------------
  |  |  489|  29.4M|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  |  |  490|  29.4M|            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|  29.4M|            assert(x < 32 && y < 32); \
  |  |  ------------------
  |  |  |  |  140|  58.9M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:30): [True: 29.4M, False: 0]
  |  |  |  |  |  Branch (140:30): [True: 29.4M, False: 0]
  |  |  |  |  |  Branch (140:68): [Folded, False: 29.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  495|  29.4M|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (495:17): [True: 29.4M, Folded]
  |  |  ------------------
  |  |  496|  29.4M|                level = levels + rc_i; \
  |  |  497|  29.4M|            else \
  |  |  498|  29.4M|                level = levels + x * stride + y; \
  |  |  499|  29.4M|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  |  |  500|  29.4M|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (500:17): [True: 29.4M, Folded]
  |  |  ------------------
  |  |  501|  29.4M|                y |= x; \
  |  |  502|  29.4M|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  29.4M|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  503|  29.4M|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (503:17): [Folded, False: 29.4M]
  |  |  ------------------
  |  |  504|  29.4M|                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|  29.4M|            if (tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (506:17): [True: 2.08M, False: 27.4M]
  |  |  ------------------
  |  |  507|  2.08M|                mag &= 63; \
  |  |  508|  2.08M|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  |  |  ------------------
  |  |  |  Branch (508:24): [True: 1.74M, False: 345k]
  |  |  ------------------
  |  |  509|  2.08M|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  |  |  ------------------
  |  |  |  Branch (509:24): [True: 437k, False: 1.65M]
  |  |  ------------------
  |  |  510|  2.08M|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  2.08M|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  511|  2.08M|                if (dbg) \
  |  |  ------------------
  |  |  |  Branch (511:21): [Folded, False: 2.08M]
  |  |  ------------------
  |  |  512|  2.08M|                    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.08M|                *level = (uint8_t) (tok + (3 << 6)); \
  |  |  516|  2.08M|                cf[rc_i] = (tok << 11) | rc; \
  |  |  517|  2.08M|                rc = rc_i; \
  |  |  518|  27.4M|            } else { \
  |  |  519|  27.4M|                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  |  |  520|  27.4M|                tok *= 0x17ff41; \
  |  |  521|  27.4M|                *level = (uint8_t) tok; \
  |  |  522|  27.4M|                /* tok ? (tok << 11) | rc : 0 */ \
  |  |  523|  27.4M|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  |  |  524|  27.4M|                if (tok) rc = rc_i; \
  |  |  ------------------
  |  |  |  Branch (524:21): [True: 7.84M, False: 19.5M]
  |  |  ------------------
  |  |  525|  27.4M|                cf[rc_i] = tok; \
  |  |  526|  27.4M|            } \
  |  |  527|  29.4M|        } \
  |  |  528|  1.09M|        /* dc */ \
  |  |  529|  1.09M|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  |  |  ------------------
  |  |  |  Branch (529:15): [True: 1.09M, Folded]
  |  |  ------------------
  |  |  530|  1.09M|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  |  |  531|  1.09M|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  1.09M|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  532|  1.09M|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (532:13): [Folded, False: 1.09M]
  |  |  ------------------
  |  |  533|  1.09M|            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.09M|        if (dc_tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (535:13): [True: 414k, False: 679k]
  |  |  ------------------
  |  |  536|   414k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (536:17): [True: 414k, Folded]
  |  |  ------------------
  |  |  537|   414k|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  |  |  538|   414k|                      levels[1 * stride + 1]; \
  |  |  539|   414k|            mag &= 63; \
  |  |  540|   414k|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  |  |  ------------------
  |  |  |  Branch (540:19): [True: 29.5k, False: 385k]
  |  |  ------------------
  |  |  541|   414k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|   414k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  542|   414k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (542:17): [Folded, False: 414k]
  |  |  ------------------
  |  |  543|   414k|                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|   414k|        } \
  |  |  546|  1.09M|        break
  ------------------
  560|  1.09M|        }
  561|  40.3k|        case TX_CLASS_H: {
  ------------------
  |  Branch (561:9): [True: 40.3k, False: 1.11M]
  ------------------
  562|  40.3k|            const uint8_t (*const lo_ctx_offsets)[5] = NULL;
  563|  40.3k|            const ptrdiff_t stride = 16;
  564|  40.3k|            const unsigned shift = slh + 2, shift2 = 0;
  565|  40.3k|            const unsigned mask = (4 << slh) - 1;
  566|  40.3k|            memset(levels, 0, stride * ((4 << slh) + 2));
  567|  40.3k|            DECODE_COEFS_CLASS(TX_CLASS_H);
  ------------------
  |  |  459|  40.3k|        unsigned x, y; \
  |  |  460|  40.3k|        uint8_t *level; \
  |  |  461|  40.3k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (461:13): [Folded, False: 40.3k]
  |  |  ------------------
  |  |  462|  40.3k|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  |  |  463|  40.3k|        else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (463:18): [True: 40.3k, Folded]
  |  |  ------------------
  |  |  464|  40.3k|            /* Transposing reduces the stride and padding requirements */ \
  |  |  465|  40.3k|            x = eob & mask, y = eob >> shift, rc = eob; \
  |  |  466|  40.3k|        else /* tx_class == TX_CLASS_V */ \
  |  |  467|  40.3k|            x = eob & mask, y = eob >> shift, rc = (x << shift2) | y; \
  |  |  468|  40.3k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (468:13): [Folded, False: 40.3k]
  |  |  ------------------
  |  |  469|  40.3k|            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|  40.3k|        if (eob_tok == 2) { \
  |  |  ------------------
  |  |  |  Branch (471:13): [True: 1.37k, False: 39.0k]
  |  |  ------------------
  |  |  472|  1.37k|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  |  |  ------------------
  |  |  |  Branch (472:19): [True: 1.29k, False: 72]
  |  |  |  Branch (472:20): [Folded, False: 1.37k]
  |  |  ------------------
  |  |  473|  1.37k|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  1.37k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  474|  1.37k|            level_tok = tok + (3 << 6); \
  |  |  475|  1.37k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (475:17): [Folded, False: 1.37k]
  |  |  ------------------
  |  |  476|  1.37k|                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.37k|        } \
  |  |  480|  40.3k|        cf[rc] = tok << 11; \
  |  |  481|  40.3k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (481:13): [Folded, False: 40.3k]
  |  |  ------------------
  |  |  482|  40.3k|            level = levels + rc; \
  |  |  483|  40.3k|        else \
  |  |  484|  40.3k|            level = levels + x * stride + y; \
  |  |  485|  40.3k|        *level = (uint8_t) level_tok; \
  |  |  486|   833k|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  |  |  ------------------
  |  |  |  Branch (486:31): [True: 792k, False: 40.3k]
  |  |  ------------------
  |  |  487|   792k|            unsigned rc_i; \
  |  |  488|   792k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (488:17): [Folded, False: 792k]
  |  |  ------------------
  |  |  489|   792k|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  |  |  490|   792k|            else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (490:22): [True: 792k, Folded]
  |  |  ------------------
  |  |  491|   792k|                x = i & mask, y = i >> shift, rc_i = i; \
  |  |  492|   792k|            else /* tx_class == TX_CLASS_V */ \
  |  |  493|   792k|                x = i & mask, y = i >> shift, rc_i = (x << shift2) | y; \
  |  |  494|   792k|            assert(x < 32 && y < 32); \
  |  |  ------------------
  |  |  |  |  140|  1.58M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:30): [True: 792k, False: 0]
  |  |  |  |  |  Branch (140:30): [True: 792k, False: 0]
  |  |  |  |  |  Branch (140:68): [Folded, False: 792k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  495|   792k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (495:17): [Folded, False: 792k]
  |  |  ------------------
  |  |  496|   792k|                level = levels + rc_i; \
  |  |  497|   792k|            else \
  |  |  498|   792k|                level = levels + x * stride + y; \
  |  |  499|   792k|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  |  |  500|   792k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (500:17): [Folded, False: 792k]
  |  |  ------------------
  |  |  501|   792k|                y |= x; \
  |  |  502|   792k|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|   792k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  503|   792k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (503:17): [Folded, False: 792k]
  |  |  ------------------
  |  |  504|   792k|                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|   792k|            if (tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (506:17): [True: 34.7k, False: 758k]
  |  |  ------------------
  |  |  507|  34.7k|                mag &= 63; \
  |  |  508|  34.7k|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  |  |  ------------------
  |  |  |  Branch (508:24): [True: 21.8k, False: 12.9k]
  |  |  ------------------
  |  |  509|  34.7k|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  |  |  ------------------
  |  |  |  Branch (509:24): [True: 3.55k, False: 31.2k]
  |  |  ------------------
  |  |  510|  34.7k|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  34.7k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  511|  34.7k|                if (dbg) \
  |  |  ------------------
  |  |  |  Branch (511:21): [Folded, False: 34.7k]
  |  |  ------------------
  |  |  512|  34.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|  34.7k|                *level = (uint8_t) (tok + (3 << 6)); \
  |  |  516|  34.7k|                cf[rc_i] = (tok << 11) | rc; \
  |  |  517|  34.7k|                rc = rc_i; \
  |  |  518|   758k|            } else { \
  |  |  519|   758k|                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  |  |  520|   758k|                tok *= 0x17ff41; \
  |  |  521|   758k|                *level = (uint8_t) tok; \
  |  |  522|   758k|                /* tok ? (tok << 11) | rc : 0 */ \
  |  |  523|   758k|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  |  |  524|   758k|                if (tok) rc = rc_i; \
  |  |  ------------------
  |  |  |  Branch (524:21): [True: 191k, False: 566k]
  |  |  ------------------
  |  |  525|   758k|                cf[rc_i] = tok; \
  |  |  526|   758k|            } \
  |  |  527|   792k|        } \
  |  |  528|  40.3k|        /* dc */ \
  |  |  529|  40.3k|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  |  |  ------------------
  |  |  |  Branch (529:15): [Folded, False: 40.3k]
  |  |  ------------------
  |  |  530|  40.3k|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  |  |  531|  40.3k|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  40.3k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  532|  40.3k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (532:13): [Folded, False: 40.3k]
  |  |  ------------------
  |  |  533|  40.3k|            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|  40.3k|        if (dc_tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (535:13): [True: 4.38k, False: 36.0k]
  |  |  ------------------
  |  |  536|  4.38k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (536:17): [Folded, False: 4.38k]
  |  |  ------------------
  |  |  537|  4.38k|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  |  |  538|      0|                      levels[1 * stride + 1]; \
  |  |  539|  4.38k|            mag &= 63; \
  |  |  540|  4.38k|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  |  |  ------------------
  |  |  |  Branch (540:19): [True: 568, False: 3.81k]
  |  |  ------------------
  |  |  541|  4.38k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  4.38k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  542|  4.38k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (542:17): [Folded, False: 4.38k]
  |  |  ------------------
  |  |  543|  4.38k|                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.38k|        } \
  |  |  546|  40.3k|        break
  ------------------
  568|  40.3k|        }
  569|  22.1k|        case TX_CLASS_V: {
  ------------------
  |  Branch (569:9): [True: 22.1k, False: 1.13M]
  ------------------
  570|  22.1k|            const uint8_t (*const lo_ctx_offsets)[5] = NULL;
  571|  22.1k|            const ptrdiff_t stride = 16;
  572|  22.1k|            const unsigned shift = slw + 2, shift2 = slh + 2;
  573|  22.1k|            const unsigned mask = (4 << slw) - 1;
  574|  22.1k|            memset(levels, 0, stride * ((4 << slw) + 2));
  575|  22.1k|            DECODE_COEFS_CLASS(TX_CLASS_V);
  ------------------
  |  |  459|  22.1k|        unsigned x, y; \
  |  |  460|  22.1k|        uint8_t *level; \
  |  |  461|  22.1k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (461:13): [Folded, False: 22.1k]
  |  |  ------------------
  |  |  462|  22.1k|            rc = scan[eob], x = rc >> shift, y = rc & mask; \
  |  |  463|  22.1k|        else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (463:18): [Folded, False: 22.1k]
  |  |  ------------------
  |  |  464|  22.1k|            /* Transposing reduces the stride and padding requirements */ \
  |  |  465|  22.1k|            x = eob & mask, y = eob >> shift, rc = eob; \
  |  |  466|  22.1k|        else /* tx_class == TX_CLASS_V */ \
  |  |  467|  22.1k|            x = eob & mask, y = eob >> shift, rc = (x << shift2) | y; \
  |  |  468|  22.1k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (468:13): [Folded, False: 22.1k]
  |  |  ------------------
  |  |  469|  22.1k|            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|  22.1k|        if (eob_tok == 2) { \
  |  |  ------------------
  |  |  |  Branch (471:13): [True: 715, False: 21.4k]
  |  |  ------------------
  |  |  472|    715|            ctx = (tx_class == TX_CLASS_2D ? (x | y) > 1 : y != 0) ? 14 : 7; \
  |  |  ------------------
  |  |  |  Branch (472:19): [True: 678, False: 37]
  |  |  |  Branch (472:20): [Folded, False: 715]
  |  |  ------------------
  |  |  473|    715|            tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|    715|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  474|    715|            level_tok = tok + (3 << 6); \
  |  |  475|    715|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (475:17): [Folded, False: 715]
  |  |  ------------------
  |  |  476|    715|                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|    715|        } \
  |  |  480|  22.1k|        cf[rc] = tok << 11; \
  |  |  481|  22.1k|        if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (481:13): [Folded, False: 22.1k]
  |  |  ------------------
  |  |  482|  22.1k|            level = levels + rc; \
  |  |  483|  22.1k|        else \
  |  |  484|  22.1k|            level = levels + x * stride + y; \
  |  |  485|  22.1k|        *level = (uint8_t) level_tok; \
  |  |  486|   449k|        for (int i = eob - 1; i > 0; i--) { /* ac */ \
  |  |  ------------------
  |  |  |  Branch (486:31): [True: 427k, False: 22.1k]
  |  |  ------------------
  |  |  487|   427k|            unsigned rc_i; \
  |  |  488|   427k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (488:17): [Folded, False: 427k]
  |  |  ------------------
  |  |  489|   427k|                rc_i = scan[i], x = rc_i >> shift, y = rc_i & mask; \
  |  |  490|   427k|            else if (tx_class == TX_CLASS_H) \
  |  |  ------------------
  |  |  |  Branch (490:22): [Folded, False: 427k]
  |  |  ------------------
  |  |  491|   427k|                x = i & mask, y = i >> shift, rc_i = i; \
  |  |  492|   427k|            else /* tx_class == TX_CLASS_V */ \
  |  |  493|   427k|                x = i & mask, y = i >> shift, rc_i = (x << shift2) | y; \
  |  |  494|   427k|            assert(x < 32 && y < 32); \
  |  |  ------------------
  |  |  |  |  140|   855k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (140:30): [True: 427k, False: 0]
  |  |  |  |  |  Branch (140:30): [True: 427k, False: 0]
  |  |  |  |  |  Branch (140:68): [Folded, False: 427k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  495|   427k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (495:17): [Folded, False: 427k]
  |  |  ------------------
  |  |  496|   427k|                level = levels + rc_i; \
  |  |  497|   427k|            else \
  |  |  498|   427k|                level = levels + x * stride + y; \
  |  |  499|   427k|            ctx = get_lo_ctx(level, tx_class, &mag, lo_ctx_offsets, x, y, stride); \
  |  |  500|   427k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (500:17): [Folded, False: 427k]
  |  |  ------------------
  |  |  501|   427k|                y |= x; \
  |  |  502|   427k|            tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|   427k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  503|   427k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (503:17): [Folded, False: 427k]
  |  |  ------------------
  |  |  504|   427k|                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|   427k|            if (tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (506:17): [True: 19.3k, False: 408k]
  |  |  ------------------
  |  |  507|  19.3k|                mag &= 63; \
  |  |  508|  19.3k|                ctx = (y > (tx_class == TX_CLASS_2D) ? 14 : 7) + \
  |  |  ------------------
  |  |  |  Branch (508:24): [True: 11.6k, False: 7.72k]
  |  |  ------------------
  |  |  509|  19.3k|                      (mag > 12 ? 6 : (mag + 1) >> 1); \
  |  |  ------------------
  |  |  |  Branch (509:24): [True: 2.58k, False: 16.8k]
  |  |  ------------------
  |  |  510|  19.3k|                tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  19.3k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  511|  19.3k|                if (dbg) \
  |  |  ------------------
  |  |  |  Branch (511:21): [Folded, False: 19.3k]
  |  |  ------------------
  |  |  512|  19.3k|                    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.3k|                *level = (uint8_t) (tok + (3 << 6)); \
  |  |  516|  19.3k|                cf[rc_i] = (tok << 11) | rc; \
  |  |  517|  19.3k|                rc = rc_i; \
  |  |  518|   408k|            } else { \
  |  |  519|   408k|                /* 0x1 for tok, 0x7ff as bitmask for rc, 0x41 for level_tok */ \
  |  |  520|   408k|                tok *= 0x17ff41; \
  |  |  521|   408k|                *level = (uint8_t) tok; \
  |  |  522|   408k|                /* tok ? (tok << 11) | rc : 0 */ \
  |  |  523|   408k|                tok = (tok >> 9) & (rc + ~0x7ffu); \
  |  |  524|   408k|                if (tok) rc = rc_i; \
  |  |  ------------------
  |  |  |  Branch (524:21): [True: 100k, False: 308k]
  |  |  ------------------
  |  |  525|   408k|                cf[rc_i] = tok; \
  |  |  526|   408k|            } \
  |  |  527|   427k|        } \
  |  |  528|  22.1k|        /* dc */ \
  |  |  529|  22.1k|        ctx = (tx_class == TX_CLASS_2D) ? 0 : \
  |  |  ------------------
  |  |  |  Branch (529:15): [Folded, False: 22.1k]
  |  |  ------------------
  |  |  530|  22.1k|            get_lo_ctx(levels, tx_class, &mag, lo_ctx_offsets, 0, 0, stride); \
  |  |  531|  22.1k|        dc_tok = dav1d_msac_decode_symbol_adapt4(&ts->msac, lo_cdf[ctx], 3); \
  |  |  ------------------
  |  |  |  |   47|  22.1k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  |  |  ------------------
  |  |  532|  22.1k|        if (dbg) \
  |  |  ------------------
  |  |  |  Branch (532:13): [Folded, False: 22.1k]
  |  |  ------------------
  |  |  533|  22.1k|            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|  22.1k|        if (dc_tok == 3) { \
  |  |  ------------------
  |  |  |  Branch (535:13): [True: 2.23k, False: 19.9k]
  |  |  ------------------
  |  |  536|  2.23k|            if (tx_class == TX_CLASS_2D) \
  |  |  ------------------
  |  |  |  Branch (536:17): [Folded, False: 2.23k]
  |  |  ------------------
  |  |  537|  2.23k|                mag = levels[0 * stride + 1] + levels[1 * stride + 0] + \
  |  |  538|      0|                      levels[1 * stride + 1]; \
  |  |  539|  2.23k|            mag &= 63; \
  |  |  540|  2.23k|            ctx = mag > 12 ? 6 : (mag + 1) >> 1; \
  |  |  ------------------
  |  |  |  Branch (540:19): [True: 306, False: 1.93k]
  |  |  ------------------
  |  |  541|  2.23k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[ctx]); \
  |  |  ------------------
  |  |  |  |   49|  2.23k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  |  |  ------------------
  |  |  542|  2.23k|            if (dbg) \
  |  |  ------------------
  |  |  |  Branch (542:17): [Folded, False: 2.23k]
  |  |  ------------------
  |  |  543|  2.23k|                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.23k|        } \
  |  |  546|  22.1k|        break
  ------------------
  576|  22.1k|        }
  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.15M]
  ------------------
  579|  1.15M|        }
  580|  1.15M|    } else { // dc-only
  581|   795k|        int tok_br = dav1d_msac_decode_symbol_adapt4(&ts->msac, eob_cdf[0], 2);
  ------------------
  |  |   47|   795k|#define dav1d_msac_decode_symbol_adapt4  dav1d_msac_decode_symbol_adapt4_sse2
  ------------------
  582|   795k|        dc_tok = 1 + tok_br;
  583|   795k|        if (dbg)
  ------------------
  |  Branch (583:13): [Folded, False: 795k]
  ------------------
  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|   795k|        if (tok_br == 2) {
  ------------------
  |  Branch (586:13): [True: 52.8k, False: 742k]
  ------------------
  587|  52.8k|            dc_tok = dav1d_msac_decode_hi_tok(&ts->msac, hi_cdf[0]);
  ------------------
  |  |   49|  52.8k|#define dav1d_msac_decode_hi_tok         dav1d_msac_decode_hi_tok_sse2
  ------------------
  588|  52.8k|            if (dbg)
  ------------------
  |  Branch (588:17): [Folded, False: 52.8k]
  ------------------
  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|  52.8k|        }
  592|   795k|        rc = 0;
  593|   795k|    }
  594|       |
  595|       |    // residual and sign
  596|  1.95M|    const uint16_t *const dq_tbl = ts->dq[b->seg_id][plane];
  597|  1.95M|    const uint8_t *const qm_tbl = *txtp < IDTX ? f->qm[tx][plane] : NULL;
  ------------------
  |  Branch (597:35): [True: 1.69M, False: 255k]
  ------------------
  598|  1.95M|    const int dq_shift = imax(0, t_dim->ctx - 2);
  599|  1.95M|    const int cf_max = ~(~127U << (BITDEPTH == 8 ? 8 : f->cur.p.bpc));
  ------------------
  |  Branch (599:36): [True: 793k, Folded]
  ------------------
  600|  1.95M|    unsigned cul_level, dc_sign_level;
  601|       |
  602|  1.95M|    if (!dc_tok) {
  ------------------
  |  Branch (602:9): [True: 287k, False: 1.66M]
  ------------------
  603|   287k|        cul_level = 0;
  604|   287k|        dc_sign_level = 1 << 6;
  605|   287k|        if (qm_tbl) goto ac_qm;
  ------------------
  |  Branch (605:13): [True: 73.4k, False: 214k]
  ------------------
  606|   214k|        goto ac_noqm;
  607|   287k|    }
  608|       |
  609|  1.66M|    const int dc_sign_ctx = get_dc_sign_ctx(tx, a, l);
  610|  1.66M|    uint16_t *const dc_sign_cdf = ts->cdf.coef.dc_sign[chroma][dc_sign_ctx];
  611|  1.66M|    const int dc_sign = dav1d_msac_decode_bool_adapt(&ts->msac, dc_sign_cdf);
  ------------------
  |  |   52|  1.66M|#define dav1d_msac_decode_bool_adapt     dav1d_msac_decode_bool_adapt_sse2
  ------------------
  612|  1.66M|    if (dbg)
  ------------------
  |  Branch (612:9): [Folded, False: 1.66M]
  ------------------
  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.66M|    int dc_dq = dq_tbl[0];
  617|  1.66M|    dc_sign_level = (dc_sign - 1) & (2 << 6);
  618|       |
  619|  1.66M|    if (qm_tbl) {
  ------------------
  |  Branch (619:9): [True: 360k, False: 1.30M]
  ------------------
  620|   360k|        dc_dq = (dc_dq * qm_tbl[0] + 16) >> 5;
  621|       |
  622|   360k|        if (dc_tok == 15) {
  ------------------
  |  Branch (622:13): [True: 10.1k, False: 350k]
  ------------------
  623|  10.1k|            dc_tok = read_golomb(&ts->msac) + 15;
  624|  10.1k|            if (dbg)
  ------------------
  |  Branch (624:17): [Folded, False: 10.1k]
  ------------------
  625|      0|                printf("Post-dc_residual[%d->%d]: r=%d\n",
  626|      0|                       dc_tok - 15, dc_tok, ts->msac.rng);
  627|       |
  628|  10.1k|            dc_tok &= 0xfffff;
  629|  10.1k|            dc_dq = (dc_dq * dc_tok) & 0xffffff;
  630|   350k|        } else {
  631|   350k|            dc_dq *= dc_tok;
  632|   350k|            assert(dc_dq <= 0xffffff);
  ------------------
  |  |  140|   350k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 350k]
  |  |  |  Branch (140:68): [Folded, False: 350k]
  |  |  ------------------
  ------------------
  633|   350k|        }
  634|   360k|        cul_level = dc_tok;
  635|   360k|        dc_dq >>= dq_shift;
  636|   360k|        dc_dq = umin(dc_dq, cf_max + dc_sign);
  637|   360k|        cf[0] = (coef) (dc_sign ? -dc_dq : dc_dq);
  ------------------
  |  Branch (637:25): [True: 187k, False: 172k]
  ------------------
  638|       |
  639|   542k|        if (rc) ac_qm: {
  ------------------
  |  Branch (639:13): [True: 234k, False: 125k]
  ------------------
  640|   542k|            const unsigned ac_dq = dq_tbl[1];
  641|  4.14M|            do {
  642|  4.14M|                const int sign = dav1d_msac_decode_bool_equi(&ts->msac);
  ------------------
  |  |   53|  4.14M|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  643|  4.14M|                if (dbg)
  ------------------
  |  Branch (643:21): [Folded, False: 4.14M]
  ------------------
  644|      0|                    printf("Post-sign[%d=%d]: r=%d\n", rc, sign, ts->msac.rng);
  645|  4.14M|                const unsigned rc_tok = cf[rc];
  646|  4.14M|                unsigned tok, dq = (ac_dq * qm_tbl[rc] + 16) >> 5;
  647|  4.14M|                int dq_sat;
  648|       |
  649|  4.14M|                if (rc_tok >= (15 << 11)) {
  ------------------
  |  Branch (649:21): [True: 152k, False: 3.99M]
  ------------------
  650|   152k|                    tok = read_golomb(&ts->msac) + 15;
  651|   152k|                    if (dbg)
  ------------------
  |  Branch (651:25): [Folded, False: 152k]
  ------------------
  652|      0|                        printf("Post-residual[%d=%d->%d]: r=%d\n",
  653|      0|                               rc, tok - 15, tok, ts->msac.rng);
  654|       |
  655|   152k|                    tok &= 0xfffff;
  656|   152k|                    dq = (dq * tok) & 0xffffff;
  657|  3.99M|                } else {
  658|  3.99M|                    tok = rc_tok >> 11;
  659|  3.99M|                    dq *= tok;
  660|  3.99M|                    assert(dq <= 0xffffff);
  ------------------
  |  |  140|  3.99M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 3.99M]
  |  |  |  Branch (140:68): [Folded, False: 3.99M]
  |  |  ------------------
  ------------------
  661|  3.99M|                }
  662|  4.14M|                cul_level += tok;
  663|  4.14M|                dq >>= dq_shift;
  664|  4.14M|                dq_sat = umin(dq, cf_max + sign);
  665|  4.14M|                cf[rc] = (coef) (sign ? -dq_sat : dq_sat);
  ------------------
  |  Branch (665:34): [True: 2.12M, False: 2.01M]
  ------------------
  666|       |
  667|  4.14M|                rc = rc_tok & 0x3ff;
  668|  4.14M|            } while (rc);
  ------------------
  |  Branch (668:22): [True: 3.83M, False: 308k]
  ------------------
  669|   542k|        }
  670|  1.30M|    } else {
  671|       |        // non-qmatrix is the common case and allows for additional optimizations
  672|  1.30M|        if (dc_tok == 15) {
  ------------------
  |  Branch (672:13): [True: 27.0k, False: 1.27M]
  ------------------
  673|  27.0k|            dc_tok = read_golomb(&ts->msac) + 15;
  674|  27.0k|            if (dbg)
  ------------------
  |  Branch (674:17): [Folded, False: 27.0k]
  ------------------
  675|      0|                printf("Post-dc_residual[%d->%d]: r=%d\n",
  676|      0|                       dc_tok - 15, dc_tok, ts->msac.rng);
  677|       |
  678|  27.0k|            dc_tok &= 0xfffff;
  679|  27.0k|            dc_dq = ((dc_dq * dc_tok) & 0xffffff) >> dq_shift;
  680|  27.0k|            dc_dq = umin(dc_dq, cf_max + dc_sign);
  681|  1.27M|        } else {
  682|  1.27M|            dc_dq = ((dc_dq * dc_tok) >> dq_shift);
  683|  1.27M|            assert(dc_dq <= cf_max);
  ------------------
  |  |  140|  1.27M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 1.27M]
  |  |  |  Branch (140:68): [Folded, False: 1.27M]
  |  |  ------------------
  ------------------
  684|  1.27M|        }
  685|  1.30M|        cul_level = dc_tok;
  686|  1.30M|        cf[0] = (coef) (dc_sign ? -dc_dq : dc_dq);
  ------------------
  |  Branch (686:25): [True: 675k, False: 627k]
  ------------------
  687|       |
  688|  1.48M|        if (rc) ac_noqm: {
  ------------------
  |  Branch (688:13): [True: 634k, False: 669k]
  ------------------
  689|  1.48M|            const unsigned ac_dq = dq_tbl[1];
  690|  7.29M|            do {
  691|  7.29M|                const int sign = dav1d_msac_decode_bool_equi(&ts->msac);
  ------------------
  |  |   53|  7.29M|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  692|  7.29M|                if (dbg)
  ------------------
  |  Branch (692:21): [Folded, False: 7.29M]
  ------------------
  693|      0|                    printf("Post-sign[%d=%d]: r=%d\n", rc, sign, ts->msac.rng);
  694|  7.29M|                const unsigned rc_tok = cf[rc];
  695|  7.29M|                unsigned tok;
  696|  7.29M|                int dq;
  697|       |
  698|       |                // residual
  699|  7.29M|                if (rc_tok >= (15 << 11)) {
  ------------------
  |  Branch (699:21): [True: 103k, False: 7.19M]
  ------------------
  700|   103k|                    tok = read_golomb(&ts->msac) + 15;
  701|   103k|                    if (dbg)
  ------------------
  |  Branch (701:25): [Folded, False: 103k]
  ------------------
  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|   103k|                    tok &= 0xfffff;
  707|       |
  708|       |                    // dequant, see 7.12.3
  709|   103k|                    dq = ((ac_dq * tok) & 0xffffff) >> dq_shift;
  710|   103k|                    dq = umin(dq, cf_max + sign);
  711|  7.19M|                } else {
  712|       |                    // cannot exceed cf_max, so we can avoid the clipping
  713|  7.19M|                    tok = rc_tok >> 11;
  714|  7.19M|                    dq = ((ac_dq * tok) >> dq_shift);
  715|  7.19M|                    assert(dq <= cf_max);
  ------------------
  |  |  140|  7.19M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 7.19M]
  |  |  |  Branch (140:68): [Folded, False: 7.19M]
  |  |  ------------------
  ------------------
  716|  7.19M|                }
  717|  7.29M|                cul_level += tok;
  718|  7.29M|                cf[rc] = (coef) (sign ? -dq : dq);
  ------------------
  |  Branch (718:34): [True: 3.68M, False: 3.60M]
  ------------------
  719|       |
  720|  7.29M|                rc = rc_tok & 0x3ff; // next non-zero rc, zero if eob
  721|  7.29M|            } while (rc);
  ------------------
  |  Branch (721:22): [True: 6.44M, False: 848k]
  ------------------
  722|  1.48M|        }
  723|  1.30M|    }
  724|       |
  725|       |    // context
  726|  1.95M|    *res_ctx = umin(cul_level, 63) | dc_sign_level;
  727|       |
  728|  1.95M|    return eob;
  729|  1.66M|}
recon_tmpl.c:get_skip_ctx:
   65|  4.99M|{
   66|  4.99M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
   67|       |
   68|  4.99M|    if (chroma) {
  ------------------
  |  Branch (68:9): [True: 2.99M, False: 2.00M]
  ------------------
   69|  2.99M|        const int ss_ver = layout == DAV1D_PIXEL_LAYOUT_I420;
   70|  2.99M|        const int ss_hor = layout != DAV1D_PIXEL_LAYOUT_I444;
   71|  2.99M|        const int not_one_blk = b_dim[2] - (!!b_dim[2] && ss_hor) > t_dim->lw ||
  ------------------
  |  Branch (71:33): [True: 436k, False: 2.56M]
  |  Branch (71:45): [True: 2.76M, False: 230k]
  |  Branch (71:59): [True: 180k, False: 2.58M]
  ------------------
   72|  2.56M|                                b_dim[3] - (!!b_dim[3] && ss_ver) > t_dim->lh;
  ------------------
  |  Branch (72:33): [True: 51.7k, False: 2.50M]
  |  Branch (72:45): [True: 2.25M, False: 307k]
  |  Branch (72:59): [True: 140k, False: 2.11M]
  ------------------
   73|  2.99M|        unsigned ca, cl;
   74|       |
   75|  2.99M|#define MERGE_CTX(dir, type, no_val) \
   76|  2.99M|        c##dir = *(const type *) dir != no_val; \
   77|  2.99M|        break
   78|       |
   79|  2.99M|        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.99M]
  ------------------
   86|   351k|        case TX_4X4:   MERGE_CTX(a, uint8_t,  0x40);
  ------------------
  |  |   76|   351k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   351k|        break
  ------------------
  |  Branch (86:9): [True: 351k, False: 2.64M]
  ------------------
   87|  1.32M|        case TX_8X8:   MERGE_CTX(a, uint16_t, 0x4040);
  ------------------
  |  |   76|  1.32M|        c##dir = *(const type *) dir != no_val; \
  |  |   77|  1.32M|        break
  ------------------
  |  Branch (87:9): [True: 1.32M, False: 1.67M]
  ------------------
   88|   691k|        case TX_16X16: MERGE_CTX(a, uint32_t, 0x40404040U);
  ------------------
  |  |   76|   691k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   691k|        break
  ------------------
  |  Branch (88:9): [True: 691k, False: 2.30M]
  ------------------
   89|   627k|        case TX_32X32: MERGE_CTX(a, uint64_t, 0x4040404040404040ULL);
  ------------------
  |  |   76|   627k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   627k|        break
  ------------------
  |  Branch (89:9): [True: 627k, False: 2.37M]
  ------------------
   90|  2.99M|        }
   91|  2.99M|        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.99M]
  ------------------
   93|   439k|        case TX_4X4:   MERGE_CTX(l, uint8_t,  0x40);
  ------------------
  |  |   76|   439k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   439k|        break
  ------------------
  |  Branch (93:9): [True: 439k, False: 2.55M]
  ------------------
   94|  1.36M|        case TX_8X8:   MERGE_CTX(l, uint16_t, 0x4040);
  ------------------
  |  |   76|  1.36M|        c##dir = *(const type *) dir != no_val; \
  |  |   77|  1.36M|        break
  ------------------
  |  Branch (94:9): [True: 1.36M, False: 1.63M]
  ------------------
   95|   594k|        case TX_16X16: MERGE_CTX(l, uint32_t, 0x40404040U);
  ------------------
  |  |   76|   594k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   594k|        break
  ------------------
  |  Branch (95:9): [True: 594k, False: 2.40M]
  ------------------
   96|   598k|        case TX_32X32: MERGE_CTX(l, uint64_t, 0x4040404040404040ULL);
  ------------------
  |  |   76|   598k|        c##dir = *(const type *) dir != no_val; \
  |  |   77|   598k|        break
  ------------------
  |  Branch (96:9): [True: 598k, False: 2.39M]
  ------------------
   97|  2.99M|        }
   98|  2.99M|#undef MERGE_CTX
   99|       |
  100|  2.99M|        return 7 + not_one_blk * 3 + ca + cl;
  101|  2.99M|    } else if (b_dim[2] == t_dim->lw && b_dim[3] == t_dim->lh) {
  ------------------
  |  Branch (101:16): [True: 1.39M, False: 610k]
  |  Branch (101:41): [True: 1.32M, False: 62.4k]
  ------------------
  102|  1.32M|        return 0;
  103|  1.32M|    } else {
  104|   672k|        unsigned la, ll;
  105|       |
  106|   672k|#define MERGE_CTX(dir, type, tx) \
  107|   672k|        if (tx == TX_64X64) { \
  108|   672k|            uint64_t tmp = *(const uint64_t *) dir; \
  109|   672k|            tmp |= *(const uint64_t *) &dir[8]; \
  110|   672k|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  111|   672k|        } else \
  112|   672k|            l##dir = *(const type *) dir; \
  113|   672k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  114|   672k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  115|   672k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  116|   672k|        break
  117|       |
  118|   672k|        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: 672k]
  ------------------
  120|   262k|        case TX_4X4:   MERGE_CTX(a, uint8_t,  TX_4X4);
  ------------------
  |  |  107|   262k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 262k]
  |  |  ------------------
  |  |  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|   262k|            l##dir = *(const type *) dir; \
  |  |  113|   262k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 262k]
  |  |  ------------------
  |  |  114|   262k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 262k]
  |  |  ------------------
  |  |  115|   262k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [Folded, False: 262k]
  |  |  ------------------
  |  |  116|   262k|        break
  ------------------
  |  Branch (120:9): [True: 262k, False: 410k]
  ------------------
  121|   245k|        case TX_8X8:   MERGE_CTX(a, uint16_t, TX_8X8);
  ------------------
  |  |  107|   245k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 245k]
  |  |  ------------------
  |  |  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|   245k|            l##dir = *(const type *) dir; \
  |  |  113|   245k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 245k]
  |  |  ------------------
  |  |  114|   245k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 245k]
  |  |  ------------------
  |  |  115|   245k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 245k, Folded]
  |  |  ------------------
  |  |  116|   245k|        break
  ------------------
  |  Branch (121:9): [True: 245k, False: 427k]
  ------------------
  122|   105k|        case TX_16X16: MERGE_CTX(a, uint32_t, TX_16X16);
  ------------------
  |  |  107|   105k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 105k]
  |  |  ------------------
  |  |  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|   105k|            l##dir = *(const type *) dir; \
  |  |  113|   105k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 105k]
  |  |  ------------------
  |  |  114|   105k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 105k, Folded]
  |  |  ------------------
  |  |  115|   105k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 105k, Folded]
  |  |  ------------------
  |  |  116|   105k|        break
  ------------------
  |  Branch (122:9): [True: 105k, False: 567k]
  ------------------
  123|  10.5k|        case TX_32X32: MERGE_CTX(a, uint32_t, TX_32X32);
  ------------------
  |  |  107|  10.5k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 10.5k]
  |  |  ------------------
  |  |  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.5k|            l##dir = *(const type *) dir; \
  |  |  113|  10.5k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [True: 10.5k, Folded]
  |  |  ------------------
  |  |  114|  10.5k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 10.5k, Folded]
  |  |  ------------------
  |  |  115|  10.5k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 10.5k, Folded]
  |  |  ------------------
  |  |  116|  10.5k|        break
  ------------------
  |  Branch (123:9): [True: 10.5k, False: 662k]
  ------------------
  124|  48.6k|        case TX_64X64: MERGE_CTX(a, uint32_t, TX_64X64);
  ------------------
  |  |  107|  48.6k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [True: 48.6k, Folded]
  |  |  ------------------
  |  |  108|  48.6k|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|  48.6k|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|  48.6k|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|  48.6k|        } else \
  |  |  112|  48.6k|            l##dir = *(const type *) dir; \
  |  |  113|  48.6k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 48.6k]
  |  |  ------------------
  |  |  114|  48.6k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 48.6k, Folded]
  |  |  ------------------
  |  |  115|  48.6k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 48.6k, Folded]
  |  |  ------------------
  |  |  116|  48.6k|        break
  ------------------
  |  Branch (124:9): [True: 48.6k, False: 624k]
  ------------------
  125|   672k|        }
  126|   672k|        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: 672k]
  ------------------
  128|   270k|        case TX_4X4:   MERGE_CTX(l, uint8_t,  TX_4X4);
  ------------------
  |  |  107|   270k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 270k]
  |  |  ------------------
  |  |  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|   270k|            l##dir = *(const type *) dir; \
  |  |  113|   270k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 270k]
  |  |  ------------------
  |  |  114|   270k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 270k]
  |  |  ------------------
  |  |  115|   270k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [Folded, False: 270k]
  |  |  ------------------
  |  |  116|   270k|        break
  ------------------
  |  Branch (128:9): [True: 270k, False: 402k]
  ------------------
  129|   238k|        case TX_8X8:   MERGE_CTX(l, uint16_t, TX_8X8);
  ------------------
  |  |  107|   238k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 238k]
  |  |  ------------------
  |  |  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|   238k|            l##dir = *(const type *) dir; \
  |  |  113|   238k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 238k]
  |  |  ------------------
  |  |  114|   238k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [Folded, False: 238k]
  |  |  ------------------
  |  |  115|   238k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 238k, Folded]
  |  |  ------------------
  |  |  116|   238k|        break
  ------------------
  |  Branch (129:9): [True: 238k, False: 433k]
  ------------------
  130|   104k|        case TX_16X16: MERGE_CTX(l, uint32_t, TX_16X16);
  ------------------
  |  |  107|   104k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 104k]
  |  |  ------------------
  |  |  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|   104k|            l##dir = *(const type *) dir; \
  |  |  113|   104k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 104k]
  |  |  ------------------
  |  |  114|   104k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 104k, Folded]
  |  |  ------------------
  |  |  115|   104k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 104k, Folded]
  |  |  ------------------
  |  |  116|   104k|        break
  ------------------
  |  Branch (130:9): [True: 104k, False: 568k]
  ------------------
  131|  10.6k|        case TX_32X32: MERGE_CTX(l, uint32_t, TX_32X32);
  ------------------
  |  |  107|  10.6k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [Folded, False: 10.6k]
  |  |  ------------------
  |  |  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.6k|            l##dir = *(const type *) dir; \
  |  |  113|  10.6k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [True: 10.6k, Folded]
  |  |  ------------------
  |  |  114|  10.6k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 10.6k, Folded]
  |  |  ------------------
  |  |  115|  10.6k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 10.6k, Folded]
  |  |  ------------------
  |  |  116|  10.6k|        break
  ------------------
  |  Branch (131:9): [True: 10.6k, False: 662k]
  ------------------
  132|  48.6k|        case TX_64X64: MERGE_CTX(l, uint32_t, TX_64X64);
  ------------------
  |  |  107|  48.6k|        if (tx == TX_64X64) { \
  |  |  ------------------
  |  |  |  Branch (107:13): [True: 48.6k, Folded]
  |  |  ------------------
  |  |  108|  48.6k|            uint64_t tmp = *(const uint64_t *) dir; \
  |  |  109|  48.6k|            tmp |= *(const uint64_t *) &dir[8]; \
  |  |  110|  48.6k|            l##dir = (unsigned) (tmp >> 32) | (unsigned) tmp; \
  |  |  111|  48.6k|        } else \
  |  |  112|  48.6k|            l##dir = *(const type *) dir; \
  |  |  113|  48.6k|        if (tx == TX_32X32) l##dir |= *(const type *) &dir[sizeof(type)]; \
  |  |  ------------------
  |  |  |  Branch (113:13): [Folded, False: 48.6k]
  |  |  ------------------
  |  |  114|  48.6k|        if (tx >= TX_16X16) l##dir |= l##dir >> 16; \
  |  |  ------------------
  |  |  |  Branch (114:13): [True: 48.6k, Folded]
  |  |  ------------------
  |  |  115|  48.6k|        if (tx >= TX_8X8)   l##dir |= l##dir >> 8; \
  |  |  ------------------
  |  |  |  Branch (115:13): [True: 48.6k, Folded]
  |  |  ------------------
  |  |  116|  48.6k|        break
  ------------------
  |  Branch (132:9): [True: 48.6k, False: 624k]
  ------------------
  133|   672k|        }
  134|   672k|#undef MERGE_CTX
  135|       |
  136|   672k|        return dav1d_skip_ctx[umin(la & 0x3F, 4)][umin(ll & 0x3F, 4)];
  137|   672k|    }
  138|  4.99M|}
recon_tmpl.c:get_lo_ctx:
  304|  30.7M|{
  305|  30.7M|    unsigned mag = levels[0 * stride + 1] + levels[1 * stride + 0];
  306|  30.7M|    unsigned offset;
  307|  30.7M|    if (tx_class == TX_CLASS_2D) {
  ------------------
  |  Branch (307:9): [True: 29.4M, False: 1.28M]
  ------------------
  308|  29.4M|        mag += levels[1 * stride + 1];
  309|  29.4M|        *hi_mag = mag;
  310|  29.4M|        mag += levels[0 * stride + 2] + levels[2 * stride + 0];
  311|  29.4M|        offset = ctx_offsets[umin(y, 4)][umin(x, 4)];
  312|  29.4M|    } else {
  313|  1.28M|        mag += levels[0 * stride + 2];
  314|  1.28M|        *hi_mag = mag;
  315|  1.28M|        mag += levels[0 * stride + 3] + levels[0 * stride + 4];
  316|  1.28M|        offset = 26 + (y > 1 ? 10 : y * 5);
  ------------------
  |  Branch (316:24): [True: 597k, False: 685k]
  ------------------
  317|  1.28M|    }
  318|  30.7M|    return offset + (mag > 512 ? 4 : (mag + 64) >> 7);
  ------------------
  |  Branch (318:22): [True: 1.96M, False: 28.8M]
  ------------------
  319|  30.7M|}
recon_tmpl.c:get_dc_sign_ctx:
  143|  1.66M|{
  144|  1.66M|    uint64_t mask = 0xC0C0C0C0C0C0C0C0ULL, mul = 0x0101010101010101ULL;
  145|  1.66M|    int s;
  146|       |
  147|  1.66M|#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.66M|    __asm__("" : "+r"(mask), "+r"(mul));
  151|  1.66M|#endif
  152|       |
  153|  1.66M|    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.66M]
  ------------------
  155|   206k|    case TX_4X4: {
  ------------------
  |  Branch (155:5): [True: 206k, False: 1.45M]
  ------------------
  156|   206k|        int t = *(const uint8_t *) a >> 6;
  157|   206k|        t    += *(const uint8_t *) l >> 6;
  158|   206k|        s = t - 1 - 1;
  159|   206k|        break;
  160|      0|    }
  161|   534k|    case TX_8X8: {
  ------------------
  |  Branch (161:5): [True: 534k, False: 1.12M]
  ------------------
  162|   534k|        uint32_t t = *(const uint16_t *) a & (uint32_t) mask;
  163|   534k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  164|   534k|        t *= 0x04040404U;
  165|   534k|        s = (int) (t >> 24) - 2 - 2;
  166|   534k|        break;
  167|      0|    }
  168|   210k|    case TX_16X16: {
  ------------------
  |  Branch (168:5): [True: 210k, False: 1.45M]
  ------------------
  169|   210k|        uint32_t t = (*(const uint32_t *) a & (uint32_t) mask) >> 6;
  170|   210k|        t         += (*(const uint32_t *) l & (uint32_t) mask) >> 6;
  171|   210k|        t *= (uint32_t) mul;
  172|   210k|        s = (int) (t >> 24) - 4 - 4;
  173|   210k|        break;
  174|      0|    }
  175|   115k|    case TX_32X32: {
  ------------------
  |  Branch (175:5): [True: 115k, False: 1.54M]
  ------------------
  176|   115k|        uint64_t t = (*(const uint64_t *) a & mask) >> 6;
  177|   115k|        t         += (*(const uint64_t *) l & mask) >> 6;
  178|   115k|        t *= mul;
  179|   115k|        s = (int) (t >> 56) - 8 - 8;
  180|   115k|        break;
  181|      0|    }
  182|  27.2k|    case TX_64X64: {
  ------------------
  |  Branch (182:5): [True: 27.2k, False: 1.63M]
  ------------------
  183|  27.2k|        uint64_t t = (*(const uint64_t *) &a[0] & mask) >> 6;
  184|  27.2k|        t         += (*(const uint64_t *) &a[8] & mask) >> 6;
  185|  27.2k|        t         += (*(const uint64_t *) &l[0] & mask) >> 6;
  186|  27.2k|        t         += (*(const uint64_t *) &l[8] & mask) >> 6;
  187|  27.2k|        t *= mul;
  188|  27.2k|        s = (int) (t >> 56) - 16 - 16;
  189|  27.2k|        break;
  190|      0|    }
  191|  62.3k|    case RTX_4X8: {
  ------------------
  |  Branch (191:5): [True: 62.3k, False: 1.60M]
  ------------------
  192|  62.3k|        uint32_t t = *(const uint8_t  *) a & (uint32_t) mask;
  193|  62.3k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  194|  62.3k|        t *= 0x04040404U;
  195|  62.3k|        s = (int) (t >> 24) - 1 - 2;
  196|  62.3k|        break;
  197|      0|    }
  198|  88.2k|    case RTX_8X4: {
  ------------------
  |  Branch (198:5): [True: 88.2k, False: 1.57M]
  ------------------
  199|  88.2k|        uint32_t t = *(const uint16_t *) a & (uint32_t) mask;
  200|  88.2k|        t         += *(const uint8_t  *) l & (uint32_t) mask;
  201|  88.2k|        t *= 0x04040404U;
  202|  88.2k|        s = (int) (t >> 24) - 2 - 1;
  203|  88.2k|        break;
  204|      0|    }
  205|  57.8k|    case RTX_8X16: {
  ------------------
  |  Branch (205:5): [True: 57.8k, False: 1.60M]
  ------------------
  206|  57.8k|        uint32_t t = *(const uint16_t *) a & (uint32_t) mask;
  207|  57.8k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  208|  57.8k|        t = (t >> 6) * (uint32_t) mul;
  209|  57.8k|        s = (int) (t >> 24) - 2 - 4;
  210|  57.8k|        break;
  211|      0|    }
  212|   111k|    case RTX_16X8: {
  ------------------
  |  Branch (212:5): [True: 111k, False: 1.55M]
  ------------------
  213|   111k|        uint32_t t = *(const uint32_t *) a & (uint32_t) mask;
  214|   111k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  215|   111k|        t = (t >> 6) * (uint32_t) mul;
  216|   111k|        s = (int) (t >> 24) - 4 - 2;
  217|   111k|        break;
  218|      0|    }
  219|  26.3k|    case RTX_16X32: {
  ------------------
  |  Branch (219:5): [True: 26.3k, False: 1.63M]
  ------------------
  220|  26.3k|        uint64_t t = *(const uint32_t *) a & (uint32_t) mask;
  221|  26.3k|        t         += *(const uint64_t *) l & mask;
  222|  26.3k|        t = (t >> 6) * mul;
  223|  26.3k|        s = (int) (t >> 56) - 4 - 8;
  224|  26.3k|        break;
  225|      0|    }
  226|  43.5k|    case RTX_32X16: {
  ------------------
  |  Branch (226:5): [True: 43.5k, False: 1.62M]
  ------------------
  227|  43.5k|        uint64_t t = *(const uint64_t *) a & mask;
  228|  43.5k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  229|  43.5k|        t = (t >> 6) * mul;
  230|  43.5k|        s = (int) (t >> 56) - 8 - 4;
  231|  43.5k|        break;
  232|      0|    }
  233|  6.23k|    case RTX_32X64: {
  ------------------
  |  Branch (233:5): [True: 6.23k, False: 1.65M]
  ------------------
  234|  6.23k|        uint64_t t = (*(const uint64_t *) &a[0] & mask) >> 6;
  235|  6.23k|        t         += (*(const uint64_t *) &l[0] & mask) >> 6;
  236|  6.23k|        t         += (*(const uint64_t *) &l[8] & mask) >> 6;
  237|  6.23k|        t *= mul;
  238|  6.23k|        s = (int) (t >> 56) - 8 - 16;
  239|  6.23k|        break;
  240|      0|    }
  241|  12.7k|    case RTX_64X32: {
  ------------------
  |  Branch (241:5): [True: 12.7k, False: 1.65M]
  ------------------
  242|  12.7k|        uint64_t t = (*(const uint64_t *) &a[0] & mask) >> 6;
  243|  12.7k|        t         += (*(const uint64_t *) &a[8] & mask) >> 6;
  244|  12.7k|        t         += (*(const uint64_t *) &l[0] & mask) >> 6;
  245|  12.7k|        t *= mul;
  246|  12.7k|        s = (int) (t >> 56) - 16 - 8;
  247|  12.7k|        break;
  248|      0|    }
  249|  34.8k|    case RTX_4X16: {
  ------------------
  |  Branch (249:5): [True: 34.8k, False: 1.62M]
  ------------------
  250|  34.8k|        uint32_t t = *(const uint8_t  *) a & (uint32_t) mask;
  251|  34.8k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  252|  34.8k|        t = (t >> 6) * (uint32_t) mul;
  253|  34.8k|        s = (int) (t >> 24) - 1 - 4;
  254|  34.8k|        break;
  255|      0|    }
  256|  67.7k|    case RTX_16X4: {
  ------------------
  |  Branch (256:5): [True: 67.7k, False: 1.59M]
  ------------------
  257|  67.7k|        uint32_t t = *(const uint32_t *) a & (uint32_t) mask;
  258|  67.7k|        t         += *(const uint8_t  *) l & (uint32_t) mask;
  259|  67.7k|        t = (t >> 6) * (uint32_t) mul;
  260|  67.7k|        s = (int) (t >> 24) - 4 - 1;
  261|  67.7k|        break;
  262|      0|    }
  263|  22.6k|    case RTX_8X32: {
  ------------------
  |  Branch (263:5): [True: 22.6k, False: 1.64M]
  ------------------
  264|  22.6k|        uint64_t t = *(const uint16_t *) a & (uint32_t) mask;
  265|  22.6k|        t         += *(const uint64_t *) l & mask;
  266|  22.6k|        t = (t >> 6) * mul;
  267|  22.6k|        s = (int) (t >> 56) - 2 - 8;
  268|  22.6k|        break;
  269|      0|    }
  270|  28.4k|    case RTX_32X8: {
  ------------------
  |  Branch (270:5): [True: 28.4k, False: 1.63M]
  ------------------
  271|  28.4k|        uint64_t t = *(const uint64_t *) a & mask;
  272|  28.4k|        t         += *(const uint16_t *) l & (uint32_t) mask;
  273|  28.4k|        t = (t >> 6) * mul;
  274|  28.4k|        s = (int) (t >> 56) - 8 - 2;
  275|  28.4k|        break;
  276|      0|    }
  277|  4.05k|    case RTX_16X64: {
  ------------------
  |  Branch (277:5): [True: 4.05k, False: 1.65M]
  ------------------
  278|  4.05k|        uint64_t t = *(const uint32_t *) a & (uint32_t) mask;
  279|  4.05k|        t         += *(const uint64_t *) &l[0] & mask;
  280|  4.05k|        t = (t >> 6) + ((*(const uint64_t *) &l[8] & mask) >> 6);
  281|  4.05k|        t *= mul;
  282|  4.05k|        s = (int) (t >> 56) - 4 - 16;
  283|  4.05k|        break;
  284|      0|    }
  285|  3.63k|    case RTX_64X16: {
  ------------------
  |  Branch (285:5): [True: 3.63k, False: 1.66M]
  ------------------
  286|  3.63k|        uint64_t t = *(const uint64_t *) &a[0] & mask;
  287|  3.63k|        t         += *(const uint32_t *) l & (uint32_t) mask;
  288|  3.63k|        t = (t >> 6) + ((*(const uint64_t *) &a[8] & mask) >> 6);
  289|  3.63k|        t *= mul;
  290|  3.63k|        s = (int) (t >> 56) - 16 - 4;
  291|  3.63k|        break;
  292|      0|    }
  293|  1.66M|    }
  294|       |
  295|  1.66M|    return (s != 0) + (s > 0);
  296|  1.66M|}
recon_tmpl.c:read_golomb:
   49|   292k|static inline unsigned read_golomb(MsacContext *const msac) {
   50|   292k|    int len = 0;
   51|   292k|    unsigned val = 1;
   52|       |
   53|   491k|    while (!dav1d_msac_decode_bool_equi(msac) && len < 32) len++;
  ------------------
  |  |   53|   491k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (53:12): [True: 198k, False: 292k]
  |  Branch (53:50): [True: 198k, False: 2]
  ------------------
   54|   491k|    while (len--) val = (val << 1) + dav1d_msac_decode_bool_equi(msac);
  ------------------
  |  |   53|   198k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (54:12): [True: 198k, False: 292k]
  ------------------
   55|       |
   56|   292k|    return val - 1;
   57|   292k|}
recon_tmpl.c:mc:
  944|   819k|{
  945|   819k|    assert((dst8 != NULL) ^ (dst16 != NULL));
  ------------------
  |  |  140|   819k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 819k]
  |  |  |  Branch (140:68): [Folded, False: 819k]
  |  |  ------------------
  ------------------
  946|   819k|    const Dav1dFrameContext *const f = t->f;
  947|   819k|    const int ss_ver = !!pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (947:24): [True: 468k, False: 350k]
  |  Branch (947:32): [True: 197k, False: 271k]
  ------------------
  948|   819k|    const int ss_hor = !!pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (948:24): [True: 468k, False: 350k]
  |  Branch (948:32): [True: 198k, False: 270k]
  ------------------
  949|   819k|    const int h_mul = 4 >> ss_hor, v_mul = 4 >> ss_ver;
  950|   819k|    const int mvx = mv.x, mvy = mv.y;
  951|   819k|    const int mx = mvx & (15 >> !ss_hor), my = mvy & (15 >> !ss_ver);
  952|   819k|    ptrdiff_t ref_stride = refp->p.stride[!!pl];
  953|   819k|    const pixel *ref;
  954|       |
  955|   819k|    if (refp->p.p.w == f->cur.p.w && refp->p.p.h == f->cur.p.h) {
  ------------------
  |  Branch (955:9): [True: 597k, False: 221k]
  |  Branch (955:38): [True: 590k, False: 6.54k]
  ------------------
  956|   590k|        const int dx = bx * h_mul + (mvx >> (3 + ss_hor));
  957|   590k|        const int dy = by * v_mul + (mvy >> (3 + ss_ver));
  958|   590k|        int w, h;
  959|       |
  960|   590k|        if (refp->p.data[0] != f->cur.data[0]) { // i.e. not for intrabc
  ------------------
  |  Branch (960:13): [True: 99.5k, False: 491k]
  ------------------
  961|  99.5k|            w = (f->cur.p.w + ss_hor) >> ss_hor;
  962|  99.5k|            h = (f->cur.p.h + ss_ver) >> ss_ver;
  963|   491k|        } else {
  964|   491k|            w = f->bw * 4 >> ss_hor;
  965|   491k|            h = f->bh * 4 >> ss_ver;
  966|   491k|        }
  967|   590k|        if (dx < !!mx * 3 || dy < !!my * 3 ||
  ------------------
  |  Branch (967:13): [True: 9.30k, False: 581k]
  |  Branch (967:30): [True: 6.08k, False: 575k]
  ------------------
  968|   575k|            dx + bw4 * h_mul + !!mx * 4 > w ||
  ------------------
  |  Branch (968:13): [True: 20.6k, False: 554k]
  ------------------
  969|   554k|            dy + bh4 * v_mul + !!my * 4 > h)
  ------------------
  |  Branch (969:13): [True: 39.0k, False: 515k]
  ------------------
  970|  75.0k|        {
  971|  75.0k|            pixel *const emu_edge_buf = bitfn(t->scratch.emu_edge);
  ------------------
  |  |   51|  75.0k|#define bitfn(x) x##_8bpc
  ------------------
  972|  75.0k|            f->dsp->mc.emu_edge(bw4 * h_mul + !!mx * 7, bh4 * v_mul + !!my * 7,
  973|  75.0k|                                w, h, dx - !!mx * 3, dy - !!my * 3,
  974|  75.0k|                                emu_edge_buf, 192 * sizeof(pixel),
  975|  75.0k|                                refp->p.data[pl], ref_stride);
  976|  75.0k|            ref = &emu_edge_buf[192 * !!my * 3 + !!mx * 3];
  977|  75.0k|            ref_stride = 192 * sizeof(pixel);
  978|   515k|        } else {
  979|   515k|            ref = ((pixel *) refp->p.data[pl]) + PXSTRIDE(ref_stride) * dy + dx;
  ------------------
  |  |   53|   515k|#define PXSTRIDE(x) (x)
  ------------------
  980|   515k|        }
  981|       |
  982|   590k|        if (dst8 != NULL) {
  ------------------
  |  Branch (982:13): [True: 572k, False: 17.9k]
  ------------------
  983|   572k|            f->dsp->mc.mc[filter_2d](dst8, dst_stride, ref, ref_stride, bw4 * h_mul,
  984|   572k|                                     bh4 * v_mul, mx << !ss_hor, my << !ss_ver
  985|   572k|                                     HIGHBD_CALL_SUFFIX);
  986|   572k|        } else {
  987|  17.9k|            f->dsp->mc.mct[filter_2d](dst16, ref, ref_stride, bw4 * h_mul,
  988|  17.9k|                                      bh4 * v_mul, mx << !ss_hor, my << !ss_ver
  989|  17.9k|                                      HIGHBD_CALL_SUFFIX);
  990|  17.9k|        }
  991|   590k|    } else {
  992|   228k|        assert(refp != &f->sr_cur);
  ------------------
  |  |  140|   228k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 228k]
  |  |  |  Branch (140:68): [Folded, False: 228k]
  |  |  ------------------
  ------------------
  993|       |
  994|   228k|        const int orig_pos_y = (by * v_mul << 4) + mvy * (1 << !ss_ver);
  995|   228k|        const int orig_pos_x = (bx * h_mul << 4) + mvx * (1 << !ss_hor);
  996|   228k|#define scale_mv(res, val, scale) do { \
  997|   228k|            const int64_t tmp = (int64_t)(val) * scale + (scale - 0x4000) * 8; \
  998|   228k|            res = apply_sign64((int) ((llabs(tmp) + 128) >> 8), tmp) + 32;     \
  999|   228k|        } while (0)
 1000|   228k|        int pos_y, pos_x;
 1001|   228k|        scale_mv(pos_x, orig_pos_x, f->svc[refidx][0].scale);
  ------------------
  |  |  996|   228k|#define scale_mv(res, val, scale) do { \
  |  |  997|   228k|            const int64_t tmp = (int64_t)(val) * scale + (scale - 0x4000) * 8; \
  |  |  998|   228k|            res = apply_sign64((int) ((llabs(tmp) + 128) >> 8), tmp) + 32;     \
  |  |  999|   228k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (999:18): [Folded, False: 228k]
  |  |  ------------------
  ------------------
 1002|   228k|        scale_mv(pos_y, orig_pos_y, f->svc[refidx][1].scale);
  ------------------
  |  |  996|   228k|#define scale_mv(res, val, scale) do { \
  |  |  997|   228k|            const int64_t tmp = (int64_t)(val) * scale + (scale - 0x4000) * 8; \
  |  |  998|   228k|            res = apply_sign64((int) ((llabs(tmp) + 128) >> 8), tmp) + 32;     \
  |  |  999|   228k|        } while (0)
  |  |  ------------------
  |  |  |  Branch (999:18): [Folded, False: 228k]
  |  |  ------------------
  ------------------
 1003|   228k|#undef scale_mv
 1004|   228k|        const int left = pos_x >> 10;
 1005|   228k|        const int top = pos_y >> 10;
 1006|   228k|        const int right =
 1007|   228k|            ((pos_x + (bw4 * h_mul - 1) * f->svc[refidx][0].step) >> 10) + 1;
 1008|   228k|        const int bottom =
 1009|   228k|            ((pos_y + (bh4 * v_mul - 1) * f->svc[refidx][1].step) >> 10) + 1;
 1010|       |
 1011|   228k|        if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|   228k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 228k]
  |  |  ------------------
  |  |   35|   228k|        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|   228k|        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|   228k|        const int w = (refp->p.p.w + ss_hor) >> ss_hor;
 1018|   228k|        const int h = (refp->p.p.h + ss_ver) >> ss_ver;
 1019|   228k|        if (left < 3 || top < 3 || right + 4 > w || bottom + 4 > h) {
  ------------------
  |  Branch (1019:13): [True: 37.9k, False: 190k]
  |  Branch (1019:25): [True: 36.3k, False: 154k]
  |  Branch (1019:36): [True: 31.1k, False: 122k]
  |  Branch (1019:53): [True: 28.0k, False: 94.8k]
  ------------------
 1020|   133k|            pixel *const emu_edge_buf = bitfn(t->scratch.emu_edge);
  ------------------
  |  |   51|   133k|#define bitfn(x) x##_8bpc
  ------------------
 1021|   133k|            f->dsp->mc.emu_edge(right - left + 7, bottom - top + 7,
 1022|   133k|                                w, h, left - 3, top - 3,
 1023|   133k|                                emu_edge_buf, 320 * sizeof(pixel),
 1024|   133k|                                refp->p.data[pl], ref_stride);
 1025|   133k|            ref = &emu_edge_buf[320 * 3 + 3];
 1026|   133k|            ref_stride = 320 * sizeof(pixel);
 1027|   133k|            if (DEBUG_BLOCK_INFO) printf("Emu\n");
  ------------------
  |  |   34|   133k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 133k]
  |  |  ------------------
  |  |   35|   133k|        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|   133k|        t->bx >= 8 && t->bx < 12
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  Branch (36:23): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1028|   133k|        } else {
 1029|  94.8k|            ref = ((pixel *) refp->p.data[pl]) + PXSTRIDE(ref_stride) * top + left;
  ------------------
  |  |   53|  94.8k|#define PXSTRIDE(x) (x)
  ------------------
 1030|  94.8k|        }
 1031|       |
 1032|   228k|        if (dst8 != NULL) {
  ------------------
  |  Branch (1032:13): [True: 162k, False: 66.2k]
  ------------------
 1033|   162k|            f->dsp->mc.mc_scaled[filter_2d](dst8, dst_stride, ref, ref_stride,
 1034|   162k|                                            bw4 * h_mul, bh4 * v_mul,
 1035|   162k|                                            pos_x & 0x3ff, pos_y & 0x3ff,
 1036|   162k|                                            f->svc[refidx][0].step,
 1037|   162k|                                            f->svc[refidx][1].step
 1038|   162k|                                            HIGHBD_CALL_SUFFIX);
 1039|   162k|        } else {
 1040|  66.2k|            f->dsp->mc.mct_scaled[filter_2d](dst16, ref, ref_stride,
 1041|  66.2k|                                             bw4 * h_mul, bh4 * v_mul,
 1042|  66.2k|                                             pos_x & 0x3ff, pos_y & 0x3ff,
 1043|  66.2k|                                             f->svc[refidx][0].step,
 1044|  66.2k|                                             f->svc[refidx][1].step
 1045|  66.2k|                                             HIGHBD_CALL_SUFFIX);
 1046|  66.2k|        }
 1047|   228k|    }
 1048|       |
 1049|   819k|    return 0;
 1050|   819k|}
recon_tmpl.c:warp_affine:
 1120|  7.41k|{
 1121|  7.41k|    assert((dst8 != NULL) ^ (dst16 != NULL));
  ------------------
  |  |  140|  7.41k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 7.41k]
  |  |  |  Branch (140:68): [Folded, False: 7.41k]
  |  |  ------------------
  ------------------
 1122|  7.41k|    const Dav1dFrameContext *const f = t->f;
 1123|  7.41k|    const Dav1dDSPContext *const dsp = f->dsp;
 1124|  7.41k|    const int ss_ver = !!pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (1124:24): [True: 3.04k, False: 4.36k]
  |  Branch (1124:32): [True: 2.01k, False: 1.03k]
  ------------------
 1125|  7.41k|    const int ss_hor = !!pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (1125:24): [True: 3.04k, False: 4.36k]
  |  Branch (1125:32): [True: 2.01k, False: 1.03k]
  ------------------
 1126|  7.41k|    const int h_mul = 4 >> ss_hor, v_mul = 4 >> ss_ver;
 1127|  7.41k|    assert(!((b_dim[0] * h_mul) & 7) && !((b_dim[1] * v_mul) & 7));
  ------------------
  |  |  140|  14.8k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 7.41k, False: 0]
  |  |  |  Branch (140:30): [True: 7.41k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 7.41k]
  |  |  ------------------
  ------------------
 1128|  7.41k|    const int32_t *const mat = wmp->matrix;
 1129|  7.41k|    const int width = (refp->p.p.w + ss_hor) >> ss_hor;
 1130|  7.41k|    const int height = (refp->p.p.h + ss_ver) >> ss_ver;
 1131|       |
 1132|  30.1k|    for (int y = 0; y < b_dim[1] * v_mul; y += 8) {
  ------------------
  |  Branch (1132:21): [True: 22.7k, False: 7.41k]
  ------------------
 1133|  22.7k|        const int src_y = t->by * 4 + ((y + 4) << ss_ver);
 1134|  22.7k|        const int64_t mat3_y = (int64_t) mat[3] * src_y + mat[0];
 1135|  22.7k|        const int64_t mat5_y = (int64_t) mat[5] * src_y + mat[1];
 1136|  85.4k|        for (int x = 0; x < b_dim[0] * h_mul; x += 8) {
  ------------------
  |  Branch (1136:25): [True: 62.7k, False: 22.7k]
  ------------------
 1137|       |            // calculate transformation relative to center of 8x8 block in
 1138|       |            // luma pixel units
 1139|  62.7k|            const int src_x = t->bx * 4 + ((x + 4) << ss_hor);
 1140|  62.7k|            const int64_t mvx = ((int64_t) mat[2] * src_x + mat3_y) >> ss_hor;
 1141|  62.7k|            const int64_t mvy = ((int64_t) mat[4] * src_x + mat5_y) >> ss_ver;
 1142|       |
 1143|  62.7k|            const int dx = (int) (mvx >> 16) - 4;
 1144|  62.7k|            const int mx = (((int) mvx & 0xffff) - wmp->u.p.alpha * 4 -
 1145|  62.7k|                                                   wmp->u.p.beta  * 7) & ~0x3f;
 1146|  62.7k|            const int dy = (int) (mvy >> 16) - 4;
 1147|  62.7k|            const int my = (((int) mvy & 0xffff) - wmp->u.p.gamma * 4 -
 1148|  62.7k|                                                   wmp->u.p.delta * 4) & ~0x3f;
 1149|       |
 1150|  62.7k|            const pixel *ref_ptr;
 1151|  62.7k|            ptrdiff_t ref_stride = refp->p.stride[!!pl];
 1152|       |
 1153|  62.7k|            if (dx < 3 || dx + 8 + 4 > width || dy < 3 || dy + 8 + 4 > height) {
  ------------------
  |  Branch (1153:17): [True: 3.85k, False: 58.8k]
  |  Branch (1153:27): [True: 12.4k, False: 46.4k]
  |  Branch (1153:49): [True: 3.21k, False: 43.1k]
  |  Branch (1153:59): [True: 12.5k, False: 30.6k]
  ------------------
 1154|  32.1k|                pixel *const emu_edge_buf = bitfn(t->scratch.emu_edge);
  ------------------
  |  |   51|  32.1k|#define bitfn(x) x##_8bpc
  ------------------
 1155|  32.1k|                f->dsp->mc.emu_edge(15, 15, width, height, dx - 3, dy - 3,
 1156|  32.1k|                                    emu_edge_buf, 32 * sizeof(pixel),
 1157|  32.1k|                                    refp->p.data[pl], ref_stride);
 1158|  32.1k|                ref_ptr = &emu_edge_buf[32 * 3 + 3];
 1159|  32.1k|                ref_stride = 32 * sizeof(pixel);
 1160|  32.1k|            } else {
 1161|  30.6k|                ref_ptr = ((pixel *) refp->p.data[pl]) + PXSTRIDE(ref_stride) * dy + dx;
  ------------------
  |  |   53|  30.6k|#define PXSTRIDE(x) (x)
  ------------------
 1162|  30.6k|            }
 1163|  62.7k|            if (dst16 != NULL)
  ------------------
  |  Branch (1163:17): [True: 9.47k, False: 53.2k]
  ------------------
 1164|  9.47k|                dsp->mc.warp8x8t(&dst16[x], dstride, ref_ptr, ref_stride,
 1165|  9.47k|                                 wmp->u.abcd, mx, my HIGHBD_CALL_SUFFIX);
 1166|  53.2k|            else
 1167|  53.2k|                dsp->mc.warp8x8(&dst8[x], dstride, ref_ptr, ref_stride,
 1168|  53.2k|                                wmp->u.abcd, mx, my HIGHBD_CALL_SUFFIX);
 1169|  62.7k|        }
 1170|  22.7k|        if (dst8) dst8  += 8 * PXSTRIDE(dstride);
  ------------------
  |  |   53|  20.9k|#define PXSTRIDE(x) (x)
  ------------------
  |  Branch (1170:13): [True: 20.9k, False: 1.82k]
  ------------------
 1171|  1.82k|        else      dst16 += 8 * dstride;
 1172|  22.7k|    }
 1173|  7.41k|    return 0;
 1174|  7.41k|}
recon_tmpl.c:obmc:
 1056|  33.0k|{
 1057|  33.0k|    assert(!(t->bx & 1) && !(t->by & 1));
  ------------------
  |  |  140|  66.0k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 33.0k, False: 0]
  |  |  |  Branch (140:30): [True: 33.0k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 33.0k]
  |  |  ------------------
  ------------------
 1058|  33.0k|    const Dav1dFrameContext *const f = t->f;
 1059|  33.0k|    /*const*/ refmvs_block **r = &t->rt.r[(t->by & 31) + 5];
 1060|  33.0k|    pixel *const lap = bitfn(t->scratch.lap);
  ------------------
  |  |   51|  33.0k|#define bitfn(x) x##_8bpc
  ------------------
 1061|  33.0k|    const int ss_ver = !!pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (1061:24): [True: 19.1k, False: 13.8k]
  |  Branch (1061:32): [True: 17.1k, False: 2.00k]
  ------------------
 1062|  33.0k|    const int ss_hor = !!pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (1062:24): [True: 19.1k, False: 13.8k]
  |  Branch (1062:32): [True: 17.1k, False: 2.00k]
  ------------------
 1063|  33.0k|    const int h_mul = 4 >> ss_hor, v_mul = 4 >> ss_ver;
 1064|  33.0k|    int res;
 1065|       |
 1066|  33.0k|    if (t->by > t->ts->tiling.row_start &&
  ------------------
  |  Branch (1066:9): [True: 27.6k, False: 5.33k]
  ------------------
 1067|  27.6k|        (!pl || b_dim[0] * h_mul + b_dim[1] * v_mul >= 16))
  ------------------
  |  Branch (1067:10): [True: 11.7k, False: 15.9k]
  |  Branch (1067:17): [True: 5.80k, False: 10.1k]
  ------------------
 1068|  17.5k|    {
 1069|  37.2k|        for (int i = 0, x = 0; x < w4 && i < imin(b_dim[2], 4); ) {
  ------------------
  |  Branch (1069:32): [True: 19.8k, False: 17.4k]
  |  Branch (1069:42): [True: 19.7k, False: 81]
  ------------------
 1070|       |            // only odd blocks are considered for overlap handling, hence +1
 1071|  19.7k|            const refmvs_block *const a_r = &r[-1][t->bx + x + 1];
 1072|  19.7k|            const uint8_t *const a_b_dim = dav1d_block_dimensions[a_r->bs];
 1073|  19.7k|            const int step4 = iclip(a_b_dim[0], 2, 16);
 1074|       |
 1075|  19.7k|            if (a_r->ref.ref[0] > 0) {
  ------------------
  |  Branch (1075:17): [True: 19.2k, False: 538]
  ------------------
 1076|  19.2k|                const int ow4 = imin(step4, b_dim[0]);
 1077|  19.2k|                const int oh4 = imin(b_dim[1], 16) >> 1;
 1078|  19.2k|                res = mc(t, lap, NULL, ow4 * h_mul * sizeof(pixel), ow4, (oh4 * 3 + 3) >> 2,
 1079|  19.2k|                         t->bx + x, t->by, pl, a_r->mv.mv[0],
 1080|  19.2k|                         &f->refp[a_r->ref.ref[0] - 1], a_r->ref.ref[0] - 1,
 1081|  19.2k|                         dav1d_filter_2d[t->a->filter[1][bx4 + x + 1]][t->a->filter[0][bx4 + x + 1]]);
 1082|  19.2k|                if (res) return res;
  ------------------
  |  Branch (1082:21): [True: 0, False: 19.2k]
  ------------------
 1083|  19.2k|                f->dsp->mc.blend_h(&dst[x * h_mul], dst_stride, lap,
 1084|  19.2k|                                   h_mul * ow4, v_mul * oh4);
 1085|  19.2k|                i++;
 1086|  19.2k|            }
 1087|  19.7k|            x += step4;
 1088|  19.7k|        }
 1089|  17.5k|    }
 1090|       |
 1091|  33.0k|    if (t->bx > t->ts->tiling.col_start)
  ------------------
  |  Branch (1091:9): [True: 29.6k, False: 3.34k]
  ------------------
 1092|  62.6k|        for (int i = 0, y = 0; y < h4 && i < imin(b_dim[3], 4); ) {
  ------------------
  |  Branch (1092:32): [True: 33.0k, False: 29.5k]
  |  Branch (1092:42): [True: 32.9k, False: 112]
  ------------------
 1093|       |            // only odd blocks are considered for overlap handling, hence +1
 1094|  32.9k|            const refmvs_block *const l_r = &r[y + 1][t->bx - 1];
 1095|  32.9k|            const uint8_t *const l_b_dim = dav1d_block_dimensions[l_r->bs];
 1096|  32.9k|            const int step4 = iclip(l_b_dim[1], 2, 16);
 1097|       |
 1098|  32.9k|            if (l_r->ref.ref[0] > 0) {
  ------------------
  |  Branch (1098:17): [True: 32.3k, False: 646]
  ------------------
 1099|  32.3k|                const int ow4 = imin(b_dim[0], 16) >> 1;
 1100|  32.3k|                const int oh4 = imin(step4, b_dim[1]);
 1101|  32.3k|                res = mc(t, lap, NULL, h_mul * ow4 * sizeof(pixel), ow4, oh4,
 1102|  32.3k|                         t->bx, t->by + y, pl, l_r->mv.mv[0],
 1103|  32.3k|                         &f->refp[l_r->ref.ref[0] - 1], l_r->ref.ref[0] - 1,
 1104|  32.3k|                         dav1d_filter_2d[t->l.filter[1][by4 + y + 1]][t->l.filter[0][by4 + y + 1]]);
 1105|  32.3k|                if (res) return res;
  ------------------
  |  Branch (1105:21): [True: 0, False: 32.3k]
  ------------------
 1106|  32.3k|                f->dsp->mc.blend_v(&dst[y * v_mul * PXSTRIDE(dst_stride)],
  ------------------
  |  |   53|  32.3k|#define PXSTRIDE(x) (x)
  ------------------
 1107|  32.3k|                                   dst_stride, lap, h_mul * ow4, v_mul * oh4);
 1108|  32.3k|                i++;
 1109|  32.3k|            }
 1110|  32.9k|            y += step4;
 1111|  32.9k|        }
 1112|  33.0k|    return 0;
 1113|  33.0k|}
dav1d_recon_b_intra_16bpc:
 1179|  1.53M|{
 1180|  1.53M|    Dav1dTileState *const ts = t->ts;
 1181|  1.53M|    const Dav1dFrameContext *const f = t->f;
 1182|  1.53M|    const Dav1dDSPContext *const dsp = f->dsp;
 1183|  1.53M|    const int bx4 = t->bx & 31, by4 = t->by & 31;
 1184|  1.53M|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1185|  1.53M|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 1186|  1.53M|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
 1187|  1.53M|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
 1188|  1.53M|    const int bw4 = b_dim[0], bh4 = b_dim[1];
 1189|  1.53M|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
 1190|  1.53M|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
 1191|  1.53M|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (1191:28): [True: 1.32M, False: 211k]
  ------------------
 1192|  1.32M|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1192:29): [True: 1.31M, False: 10.8k]
  |  Branch (1192:45): [True: 5.40k, False: 5.40k]
  ------------------
 1193|  1.31M|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1193:29): [True: 1.30M, False: 9.99k]
  |  Branch (1193:45): [True: 5.00k, False: 4.99k]
  ------------------
 1194|  1.53M|    const TxfmInfo *const t_dim = &dav1d_txfm_dimensions[b->tx];
 1195|  1.53M|    const TxfmInfo *const uv_t_dim = &dav1d_txfm_dimensions[b->uvtx];
 1196|       |
 1197|       |    // coefficient coding
 1198|  1.53M|    pixel *const edge = bitfn(t->scratch.edge) + 128;
  ------------------
  |  |   77|  1.53M|#define bitfn(x) x##_16bpc
  ------------------
 1199|  1.53M|    const int cbw4 = (bw4 + ss_hor) >> ss_hor, cbh4 = (bh4 + ss_ver) >> ss_ver;
 1200|       |
 1201|  1.53M|    const int intra_edge_filter_flag = f->seq_hdr->intra_edge_filter << 10;
 1202|       |
 1203|  3.09M|    for (int init_y = 0; init_y < h4; init_y += 16) {
  ------------------
  |  Branch (1203:26): [True: 1.55M, False: 1.53M]
  ------------------
 1204|  1.55M|        const int sub_h4 = imin(h4, 16 + init_y);
 1205|  1.55M|        const int sub_ch4 = imin(ch4, (init_y + 16) >> ss_ver);
 1206|  3.13M|        for (int init_x = 0; init_x < w4; init_x += 16) {
  ------------------
  |  Branch (1206:30): [True: 1.57M, False: 1.55M]
  ------------------
 1207|  1.57M|            if (b->pal_sz[0]) {
  ------------------
  |  Branch (1207:17): [True: 8.24k, False: 1.57M]
  ------------------
 1208|  8.24k|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1209|  8.24k|                             4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
 1210|  8.24k|                const uint8_t *pal_idx;
 1211|  8.24k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1211:21): [True: 0, False: 8.24k]
  ------------------
 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|  8.24k|                } else {
 1217|  8.24k|                    pal_idx = t->scratch.pal_idx_y;
 1218|  8.24k|                }
 1219|  8.24k|                const pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (1219:42): [True: 0, False: 8.24k]
  ------------------
 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|  8.24k|                    bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  8.24k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  8.24k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1223|  8.24k|                f->dsp->ipred.pal_pred(dst, f->cur.stride[0], pal,
 1224|  8.24k|                                       pal_idx, bw4 * 4, bh4 * 4);
 1225|  8.24k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  8.24k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 8.24k]
  |  |  ------------------
  |  |   35|  8.24k|        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.24k|        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|  8.24k|            }
 1229|       |
 1230|  1.57M|            const int intra_flags = (sm_flag(t->a, bx4) |
 1231|  1.57M|                                     sm_flag(&t->l, by4) |
 1232|  1.57M|                                     intra_edge_filter_flag);
 1233|  1.57M|            const int sb_has_tr = init_x + 16 < w4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1233:35): [True: 26.0k, False: 1.55M]
  |  Branch (1233:58): [True: 16.2k, False: 1.53M]
  ------------------
 1234|  1.55M|                              intra_edge_flags & EDGE_I444_TOP_HAS_RIGHT;
 1235|  1.57M|            const int sb_has_bl = init_x ? 0 : init_y + 16 < h4 ? 1 :
  ------------------
  |  Branch (1235:35): [True: 26.0k, False: 1.55M]
  |  Branch (1235:48): [True: 16.2k, False: 1.53M]
  ------------------
 1236|  1.55M|                              intra_edge_flags & EDGE_I444_LEFT_HAS_BOTTOM;
 1237|  1.57M|            int y, x;
 1238|  1.57M|            const int sub_w4 = imin(w4, init_x + 16);
 1239|  3.29M|            for (y = init_y, t->by += init_y; y < sub_h4;
  ------------------
  |  Branch (1239:47): [True: 1.72M, False: 1.57M]
  ------------------
 1240|  1.72M|                 y += t_dim->h, t->by += t_dim->h)
 1241|  1.72M|            {
 1242|  1.72M|                pixel *dst = ((pixel *) f->cur.data[0]) +
 1243|  1.72M|                               4 * (t->by * PXSTRIDE(f->cur.stride[0]) +
 1244|  1.72M|                                    t->bx + init_x);
 1245|  3.82M|                for (x = init_x, t->bx += init_x; x < sub_w4;
  ------------------
  |  Branch (1245:51): [True: 2.10M, False: 1.72M]
  ------------------
 1246|  2.10M|                     x += t_dim->w, t->bx += t_dim->w)
 1247|  2.10M|                {
 1248|  2.10M|                    if (b->pal_sz[0]) goto skip_y_pred;
  ------------------
  |  Branch (1248:25): [True: 9.94k, False: 2.09M]
  ------------------
 1249|       |
 1250|  2.09M|                    int angle = b->y_angle;
 1251|  2.09M|                    const enum EdgeFlags edge_flags =
 1252|  2.09M|                        (((y > init_y || !sb_has_tr) && (x + t_dim->w >= sub_w4)) ?
  ------------------
  |  Branch (1252:28): [True: 388k, False: 1.70M]
  |  Branch (1252:42): [True: 564k, False: 1.14M]
  |  Branch (1252:57): [True: 657k, False: 295k]
  ------------------
 1253|  1.43M|                             0 : EDGE_I444_TOP_HAS_RIGHT) |
 1254|  2.09M|                        ((x > init_x || (!sb_has_bl && y + t_dim->h >= sub_h4)) ?
  ------------------
  |  Branch (1254:27): [True: 381k, False: 1.71M]
  |  Branch (1254:42): [True: 1.01M, False: 698k]
  |  Branch (1254:56): [True: 921k, False: 92.3k]
  ------------------
 1255|  1.30M|                             0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1256|  2.09M|                    const pixel *top_sb_edge = NULL;
 1257|  2.09M|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1257:25): [True: 443k, False: 1.64M]
  ------------------
 1258|   443k|                        top_sb_edge = f->ipred_edge[0];
 1259|   443k|                        const int sby = t->by >> f->sb_shift;
 1260|   443k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1261|   443k|                    }
 1262|  2.09M|                    const enum IntraPredMode m =
 1263|  2.09M|                        bytefn(dav1d_prepare_intra_edges)(t->bx,
  ------------------
  |  |   87|  2.09M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  2.09M|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1264|  2.09M|                                                          t->bx > ts->tiling.col_start,
 1265|  2.09M|                                                          t->by,
 1266|  2.09M|                                                          t->by > ts->tiling.row_start,
 1267|  2.09M|                                                          ts->tiling.col_end,
 1268|  2.09M|                                                          ts->tiling.row_end,
 1269|  2.09M|                                                          edge_flags, dst,
 1270|  2.09M|                                                          f->cur.stride[0], top_sb_edge,
 1271|  2.09M|                                                          b->y_mode, &angle,
 1272|  2.09M|                                                          t_dim->w, t_dim->h,
 1273|  2.09M|                                                          f->seq_hdr->intra_edge_filter,
 1274|  2.09M|                                                          edge HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  2.09M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1275|  2.09M|                    dsp->ipred.intra_pred[m](dst, f->cur.stride[0], edge,
 1276|  2.09M|                                             t_dim->w * 4, t_dim->h * 4,
 1277|  2.09M|                                             angle | intra_flags,
 1278|  2.09M|                                             4 * f->bw - 4 * t->bx,
 1279|  2.09M|                                             4 * f->bh - 4 * t->by
 1280|  2.09M|                                             HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  2.09M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1281|       |
 1282|  2.09M|                    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  2.09M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.09M]
  |  |  ------------------
  |  |   35|  2.09M|        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.09M|        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|  2.10M|                skip_y_pred: {}
 1293|  2.10M|                    if (!b->skip) {
  ------------------
  |  Branch (1293:25): [True: 1.21M, False: 887k]
  ------------------
 1294|  1.21M|                        coef *cf;
 1295|  1.21M|                        int eob;
 1296|  1.21M|                        enum TxfmType txtp;
 1297|  1.21M|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1297:29): [True: 0, False: 1.21M]
  ------------------
 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.21M|                        } else {
 1305|  1.21M|                            uint8_t cf_ctx;
 1306|  1.21M|                            cf = bitfn(t->cf);
  ------------------
  |  |   77|  1.21M|#define bitfn(x) x##_16bpc
  ------------------
 1307|  1.21M|                            eob = decode_coefs(t, &t->a->lcoef[bx4 + x],
 1308|  1.21M|                                               &t->l.lcoef[by4 + y], b->tx, bs,
 1309|  1.21M|                                               b, 1, 0, cf, &txtp, &cf_ctx);
 1310|  1.21M|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  1.21M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 1.21M]
  |  |  ------------------
  |  |   35|  1.21M|        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.21M|        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.21M|                            dav1d_memset_likely_pow2(&t->a->lcoef[bx4 + x], cf_ctx, imin(t_dim->w, f->bw - t->bx));
 1314|  1.21M|                            dav1d_memset_likely_pow2(&t->l.lcoef[by4 + y], cf_ctx, imin(t_dim->h, f->bh - t->by));
 1315|  1.21M|                        }
 1316|  1.21M|                        if (eob >= 0) {
  ------------------
  |  Branch (1316:29): [True: 820k, False: 395k]
  ------------------
 1317|   820k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   820k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 820k]
  |  |  ------------------
  |  |   35|   820k|        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|   820k|        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|   820k|                            dsp->itx.itxfm_add[b->tx]
 1321|   820k|                                              [txtp](dst,
 1322|   820k|                                                     f->cur.stride[0],
 1323|   820k|                                                     cf, eob HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   820k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1324|   820k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   820k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 820k]
  |  |  ------------------
  |  |   35|   820k|        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|   820k|        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|   820k|                        }
 1328|  1.21M|                    } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1328:32): [True: 887k, False: 0]
  ------------------
 1329|   887k|                        dav1d_memset_pow2[t_dim->lw](&t->a->lcoef[bx4 + x], 0x40);
 1330|   887k|                        dav1d_memset_pow2[t_dim->lh](&t->l.lcoef[by4 + y], 0x40);
 1331|   887k|                    }
 1332|  2.10M|                    dst += 4 * t_dim->w;
 1333|  2.10M|                }
 1334|  1.72M|                t->bx -= x;
 1335|  1.72M|            }
 1336|  1.57M|            t->by -= y;
 1337|       |
 1338|  1.57M|            if (!has_chroma) continue;
  ------------------
  |  Branch (1338:17): [True: 232k, False: 1.34M]
  ------------------
 1339|       |
 1340|  1.34M|            const ptrdiff_t stride = f->cur.stride[1];
 1341|       |
 1342|  1.34M|            if (b->uv_mode == CFL_PRED) {
  ------------------
  |  Branch (1342:17): [True: 164k, False: 1.18M]
  ------------------
 1343|   164k|                assert(!init_x && !init_y);
  ------------------
  |  |  140|   329k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 164k, False: 0]
  |  |  |  Branch (140:30): [True: 164k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 164k]
  |  |  ------------------
  ------------------
 1344|       |
 1345|   164k|                int16_t *const ac = t->scratch.ac;
 1346|   164k|                pixel *y_src = ((pixel *) f->cur.data[0]) + 4 * (t->bx & ~ss_hor) +
 1347|   164k|                                 4 * (t->by & ~ss_ver) * PXSTRIDE(f->cur.stride[0]);
 1348|   164k|                const ptrdiff_t uv_off = 4 * ((t->bx >> ss_hor) +
 1349|   164k|                                              (t->by >> ss_ver) * PXSTRIDE(stride));
 1350|   164k|                pixel *const uv_dst[2] = { ((pixel *) f->cur.data[1]) + uv_off,
 1351|   164k|                                           ((pixel *) f->cur.data[2]) + uv_off };
 1352|       |
 1353|   164k|                const int furthest_r =
 1354|   164k|                    ((cw4 << ss_hor) + t_dim->w - 1) & ~(t_dim->w - 1);
 1355|   164k|                const int furthest_b =
 1356|   164k|                    ((ch4 << ss_ver) + t_dim->h - 1) & ~(t_dim->h - 1);
 1357|   164k|                dsp->ipred.cfl_ac[f->cur.p.layout - 1](ac, y_src, f->cur.stride[0],
 1358|   164k|                                                         cbw4 - (furthest_r >> ss_hor),
 1359|   164k|                                                         cbh4 - (furthest_b >> ss_ver),
 1360|   164k|                                                         cbw4 * 4, cbh4 * 4);
 1361|   494k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1361:34): [True: 329k, False: 164k]
  ------------------
 1362|   329k|                    if (!b->cfl_alpha[pl]) continue;
  ------------------
  |  Branch (1362:25): [True: 67.2k, False: 262k]
  ------------------
 1363|   262k|                    int angle = 0;
 1364|   262k|                    const pixel *top_sb_edge = NULL;
 1365|   262k|                    if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1365:25): [True: 48.8k, False: 213k]
  ------------------
 1366|  48.8k|                        top_sb_edge = f->ipred_edge[pl + 1];
 1367|  48.8k|                        const int sby = t->by >> f->sb_shift;
 1368|  48.8k|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1369|  48.8k|                    }
 1370|   262k|                    const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1371|   262k|                    const int xstart = ts->tiling.col_start >> ss_hor;
 1372|   262k|                    const int ystart = ts->tiling.row_start >> ss_ver;
 1373|   262k|                    const enum IntraPredMode m =
 1374|   262k|                        bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|   262k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|   262k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1375|   262k|                                                          ypos, ypos > ystart,
 1376|   262k|                                                          ts->tiling.col_end >> ss_hor,
 1377|   262k|                                                          ts->tiling.row_end >> ss_ver,
 1378|   262k|                                                          0, uv_dst[pl], stride,
 1379|   262k|                                                          top_sb_edge, DC_PRED, &angle,
 1380|   262k|                                                          uv_t_dim->w, uv_t_dim->h, 0,
 1381|   262k|                                                          edge HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   262k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1382|   262k|                    dsp->ipred.cfl_pred[m](uv_dst[pl], stride, edge,
 1383|   262k|                                           uv_t_dim->w * 4,
 1384|   262k|                                           uv_t_dim->h * 4,
 1385|   262k|                                           ac, b->cfl_alpha[pl]
 1386|   262k|                                           HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   262k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1387|   262k|                }
 1388|   164k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|   164k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 164k]
  |  |  ------------------
  |  |   35|   164k|        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|   164k|        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|  1.18M|            } else if (b->pal_sz[1]) {
  ------------------
  |  Branch (1393:24): [True: 3.59k, False: 1.17M]
  ------------------
 1394|  3.59k|                const ptrdiff_t uv_dstoff = 4 * ((t->bx >> ss_hor) +
 1395|  3.59k|                                              (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
 1396|  3.59k|                const pixel (*pal)[8];
 1397|  3.59k|                const uint8_t *pal_idx;
 1398|  3.59k|                if (t->frame_thread.pass) {
  ------------------
  |  Branch (1398:21): [True: 0, False: 3.59k]
  ------------------
 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|  3.59k|                } else {
 1406|  3.59k|                    pal = bytefn(t->scratch.pal);
  ------------------
  |  |   87|  3.59k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  3.59k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1407|  3.59k|                    pal_idx = t->scratch.pal_idx_uv;
 1408|  3.59k|                }
 1409|       |
 1410|  3.59k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[1]) + uv_dstoff,
 1411|  3.59k|                                       f->cur.stride[1], pal[1],
 1412|  3.59k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1413|  3.59k|                f->dsp->ipred.pal_pred(((pixel *) f->cur.data[2]) + uv_dstoff,
 1414|  3.59k|                                       f->cur.stride[1], pal[2],
 1415|  3.59k|                                       pal_idx, cbw4 * 4, cbh4 * 4);
 1416|  3.59k|                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  3.59k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 3.59k]
  |  |  ------------------
  |  |   35|  3.59k|        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.59k|        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|  3.59k|            }
 1425|       |
 1426|  1.34M|            const int sm_uv_fl = sm_uv_flag(t->a, cbx4) |
 1427|  1.34M|                                 sm_uv_flag(&t->l, cby4);
 1428|  1.34M|            const int uv_sb_has_tr =
 1429|  1.34M|                ((init_x + 16) >> ss_hor) < cw4 ? 1 : init_y ? 0 :
  ------------------
  |  Branch (1429:17): [True: 20.3k, False: 1.32M]
  |  Branch (1429:55): [True: 11.8k, False: 1.31M]
  ------------------
 1430|  1.32M|                intra_edge_flags & (EDGE_I420_TOP_HAS_RIGHT >> (f->cur.p.layout - 1));
 1431|  1.34M|            const int uv_sb_has_bl =
 1432|  1.34M|                init_x ? 0 : ((init_y + 16) >> ss_ver) < ch4 ? 1 :
  ------------------
  |  Branch (1432:17): [True: 20.3k, False: 1.32M]
  |  Branch (1432:30): [True: 11.8k, False: 1.31M]
  ------------------
 1433|  1.32M|                intra_edge_flags & (EDGE_I420_LEFT_HAS_BOTTOM >> (f->cur.p.layout - 1));
 1434|  1.34M|            const int sub_cw4 = imin(cw4, (init_x + 16) >> ss_hor);
 1435|  4.04M|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1435:30): [True: 2.69M, False: 1.34M]
  ------------------
 1436|  5.53M|                for (y = init_y >> ss_ver, t->by += init_y; y < sub_ch4;
  ------------------
  |  Branch (1436:61): [True: 2.84M, False: 2.69M]
  ------------------
 1437|  2.84M|                     y += uv_t_dim->h, t->by += uv_t_dim->h << ss_ver)
 1438|  2.84M|                {
 1439|  2.84M|                    pixel *dst = ((pixel *) f->cur.data[1 + pl]) +
 1440|  2.84M|                                   4 * ((t->by >> ss_ver) * PXSTRIDE(stride) +
 1441|  2.84M|                                        ((t->bx + init_x) >> ss_hor));
 1442|  5.95M|                    for (x = init_x >> ss_hor, t->bx += init_x; x < sub_cw4;
  ------------------
  |  Branch (1442:65): [True: 3.11M, False: 2.84M]
  ------------------
 1443|  3.11M|                         x += uv_t_dim->w, t->bx += uv_t_dim->w << ss_hor)
 1444|  3.11M|                    {
 1445|  3.11M|                        if ((b->uv_mode == CFL_PRED && b->cfl_alpha[pl]) ||
  ------------------
  |  Branch (1445:30): [True: 329k, False: 2.78M]
  |  Branch (1445:56): [True: 262k, False: 67.2k]
  ------------------
 1446|  2.85M|                            b->pal_sz[1])
  ------------------
  |  Branch (1446:29): [True: 8.23k, False: 2.84M]
  ------------------
 1447|   270k|                        {
 1448|   270k|                            goto skip_uv_pred;
 1449|   270k|                        }
 1450|       |
 1451|  2.84M|                        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.84M|                        const enum EdgeFlags edge_flags =
 1456|  2.84M|                            (((y > (init_y >> ss_ver) || !uv_sb_has_tr) &&
  ------------------
  |  Branch (1456:32): [True: 288k, False: 2.55M]
  |  Branch (1456:58): [True: 859k, False: 1.69M]
  ------------------
 1457|  1.14M|                              (x + uv_t_dim->w >= sub_cw4)) ?
  ------------------
  |  Branch (1457:31): [True: 978k, False: 169k]
  ------------------
 1458|  1.86M|                                 0 : EDGE_I444_TOP_HAS_RIGHT) |
 1459|  2.84M|                            ((x > (init_x >> ss_hor) ||
  ------------------
  |  Branch (1459:31): [True: 272k, False: 2.57M]
  ------------------
 1460|  2.57M|                              (!uv_sb_has_bl && y + uv_t_dim->h >= sub_ch4)) ?
  ------------------
  |  Branch (1460:32): [True: 1.58M, False: 990k]
  |  Branch (1460:49): [True: 1.47M, False: 110k]
  ------------------
 1461|  1.74M|                                 0 : EDGE_I444_LEFT_HAS_BOTTOM);
 1462|  2.84M|                        const pixel *top_sb_edge = NULL;
 1463|  2.84M|                        if (!((t->by & ~ss_ver) & (f->sb_step - 1))) {
  ------------------
  |  Branch (1463:29): [True: 584k, False: 2.26M]
  ------------------
 1464|   584k|                            top_sb_edge = f->ipred_edge[1 + pl];
 1465|   584k|                            const int sby = t->by >> f->sb_shift;
 1466|   584k|                            top_sb_edge += f->sb128w * 128 * (sby - 1);
 1467|   584k|                        }
 1468|  2.84M|                        const enum IntraPredMode uv_mode =
 1469|  2.84M|                             b->uv_mode == CFL_PRED ? DC_PRED : b->uv_mode;
  ------------------
  |  Branch (1469:30): [True: 67.2k, False: 2.77M]
  ------------------
 1470|  2.84M|                        const int xpos = t->bx >> ss_hor, ypos = t->by >> ss_ver;
 1471|  2.84M|                        const int xstart = ts->tiling.col_start >> ss_hor;
 1472|  2.84M|                        const int ystart = ts->tiling.row_start >> ss_ver;
 1473|  2.84M|                        const enum IntraPredMode m =
 1474|  2.84M|                            bytefn(dav1d_prepare_intra_edges)(xpos, xpos > xstart,
  ------------------
  |  |   87|  2.84M|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  2.84M|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1475|  2.84M|                                                              ypos, ypos > ystart,
 1476|  2.84M|                                                              ts->tiling.col_end >> ss_hor,
 1477|  2.84M|                                                              ts->tiling.row_end >> ss_ver,
 1478|  2.84M|                                                              edge_flags, dst, stride,
 1479|  2.84M|                                                              top_sb_edge, uv_mode,
 1480|  2.84M|                                                              &angle, uv_t_dim->w,
 1481|  2.84M|                                                              uv_t_dim->h,
 1482|  2.84M|                                                              f->seq_hdr->intra_edge_filter,
 1483|  2.84M|                                                              edge HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  2.84M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1484|  2.84M|                        angle |= intra_edge_filter_flag;
 1485|  2.84M|                        dsp->ipred.intra_pred[m](dst, stride, edge,
 1486|  2.84M|                                                 uv_t_dim->w * 4,
 1487|  2.84M|                                                 uv_t_dim->h * 4,
 1488|  2.84M|                                                 angle | sm_uv_fl,
 1489|  2.84M|                                                 (4 * f->bw + ss_hor -
 1490|  2.84M|                                                  4 * (t->bx & ~ss_hor)) >> ss_hor,
 1491|  2.84M|                                                 (4 * f->bh + ss_ver -
 1492|  2.84M|                                                  4 * (t->by & ~ss_ver)) >> ss_ver
 1493|  2.84M|                                                 HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  2.84M|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1494|  2.84M|                        if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|  2.84M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.84M]
  |  |  ------------------
  |  |   35|  2.84M|        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.84M|        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|  3.11M|                    skip_uv_pred: {}
 1505|  3.11M|                        if (!b->skip) {
  ------------------
  |  Branch (1505:29): [True: 2.06M, False: 1.05M]
  ------------------
 1506|  2.06M|                            enum TxfmType txtp;
 1507|  2.06M|                            int eob;
 1508|  2.06M|                            coef *cf;
 1509|  2.06M|                            if (t->frame_thread.pass) {
  ------------------
  |  Branch (1509:33): [True: 0, False: 2.06M]
  ------------------
 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|  2.06M|                            } else {
 1517|  2.06M|                                uint8_t cf_ctx;
 1518|  2.06M|                                cf = bitfn(t->cf);
  ------------------
  |  |   77|  2.06M|#define bitfn(x) x##_16bpc
  ------------------
 1519|  2.06M|                                eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1520|  2.06M|                                                   &t->l.ccoef[pl][cby4 + y],
 1521|  2.06M|                                                   b->uvtx, bs, b, 1, 1 + pl, cf,
 1522|  2.06M|                                                   &txtp, &cf_ctx);
 1523|  2.06M|                                if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  2.06M|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 2.06M]
  |  |  ------------------
  |  |   35|  2.06M|        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.06M|        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|  2.06M|                                int ctw = imin(uv_t_dim->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1528|  2.06M|                                int cth = imin(uv_t_dim->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1529|  2.06M|                                dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1530|  2.06M|                                dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1531|  2.06M|                            }
 1532|  2.06M|                            if (eob >= 0) {
  ------------------
  |  Branch (1532:33): [True: 253k, False: 1.81M]
  ------------------
 1533|   253k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   253k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 253k]
  |  |  ------------------
  |  |   35|   253k|        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|   253k|        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|   253k|                                dsp->itx.itxfm_add[b->uvtx]
 1537|   253k|                                                  [txtp](dst, stride,
 1538|   253k|                                                         cf, eob HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|   253k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1539|   253k|                                if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|   253k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 253k]
  |  |  ------------------
  |  |   35|   253k|        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|   253k|        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|   253k|                            }
 1543|  2.06M|                        } else if (!t->frame_thread.pass) {
  ------------------
  |  Branch (1543:36): [True: 1.05M, False: 0]
  ------------------
 1544|  1.05M|                            dav1d_memset_pow2[uv_t_dim->lw](&t->a->ccoef[pl][cbx4 + x], 0x40);
 1545|  1.05M|                            dav1d_memset_pow2[uv_t_dim->lh](&t->l.ccoef[pl][cby4 + y], 0x40);
 1546|  1.05M|                        }
 1547|  3.11M|                        dst += uv_t_dim->w * 4;
 1548|  3.11M|                    }
 1549|  2.84M|                    t->bx -= x << ss_hor;
 1550|  2.84M|                }
 1551|  2.69M|                t->by -= y << ss_ver;
 1552|  2.69M|            }
 1553|  1.34M|        }
 1554|  1.55M|    }
 1555|  1.53M|}
dav1d_recon_b_inter_16bpc:
 1559|   182k|{
 1560|   182k|    Dav1dTileState *const ts = t->ts;
 1561|   182k|    const Dav1dFrameContext *const f = t->f;
 1562|   182k|    const Dav1dDSPContext *const dsp = f->dsp;
 1563|   182k|    const int bx4 = t->bx & 31, by4 = t->by & 31;
 1564|   182k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1565|   182k|    const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 1566|   182k|    const int cbx4 = bx4 >> ss_hor, cby4 = by4 >> ss_ver;
 1567|   182k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
 1568|   182k|    const int bw4 = b_dim[0], bh4 = b_dim[1];
 1569|   182k|    const int w4 = imin(bw4, f->bw - t->bx), h4 = imin(bh4, f->bh - t->by);
 1570|   182k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400 &&
  ------------------
  |  Branch (1570:28): [True: 140k, False: 42.3k]
  ------------------
 1571|   140k|                           (bw4 > ss_hor || t->bx & 1) &&
  ------------------
  |  Branch (1571:29): [True: 128k, False: 11.2k]
  |  Branch (1571:45): [True: 5.61k, False: 5.61k]
  ------------------
 1572|   134k|                           (bh4 > ss_ver || t->by & 1);
  ------------------
  |  Branch (1572:29): [True: 126k, False: 8.46k]
  |  Branch (1572:45): [True: 4.23k, False: 4.23k]
  ------------------
 1573|   182k|    const int chr_layout_idx = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I400 ? 0 :
  ------------------
  |  Branch (1573:32): [True: 42.3k, False: 140k]
  ------------------
 1574|   182k|                               DAV1D_PIXEL_LAYOUT_I444 - f->cur.p.layout;
 1575|   182k|    int res;
 1576|       |
 1577|       |    // prediction
 1578|   182k|    const int cbh4 = (bh4 + ss_ver) >> ss_ver, cbw4 = (bw4 + ss_hor) >> ss_hor;
 1579|   182k|    pixel *dst = ((pixel *) f->cur.data[0]) +
 1580|   182k|        4 * (t->by * PXSTRIDE(f->cur.stride[0]) + t->bx);
 1581|   182k|    const ptrdiff_t uvdstoff =
 1582|   182k|        4 * ((t->bx >> ss_hor) + (t->by >> ss_ver) * PXSTRIDE(f->cur.stride[1]));
 1583|   182k|    if (IS_KEY_OR_INTRA(f->frame_hdr)) {
  ------------------
  |  |   43|   182k|    (!IS_INTER_OR_SWITCH(frame_header))
  |  |  ------------------
  |  |  |  |   36|   182k|    ((frame_header)->frame_type & 1)
  |  |  ------------------
  |  |  |  Branch (43:5): [True: 125k, False: 56.5k]
  |  |  ------------------
  ------------------
 1584|       |        // intrabc
 1585|   125k|        assert(!f->frame_hdr->super_res.enabled);
  ------------------
  |  |  140|   125k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 125k]
  |  |  |  Branch (140:68): [Folded, False: 125k]
  |  |  ------------------
  ------------------
 1586|   125k|        res = mc(t, dst, NULL, f->cur.stride[0], bw4, bh4, t->bx, t->by, 0,
 1587|   125k|                 b->mv[0], &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1588|   125k|        if (res) return res;
  ------------------
  |  Branch (1588:13): [True: 0, False: 125k]
  ------------------
 1589|   313k|        if (has_chroma) for (int pl = 1; pl < 3; pl++) {
  ------------------
  |  Branch (1589:13): [True: 104k, False: 21.1k]
  |  Branch (1589:42): [True: 209k, False: 104k]
  ------------------
 1590|   209k|            res = mc(t, ((pixel *)f->cur.data[pl]) + uvdstoff, NULL, f->cur.stride[1],
 1591|   209k|                     bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1592|   209k|                     t->bx & ~ss_hor, t->by & ~ss_ver, pl, b->mv[0],
 1593|   209k|                     &f->sr_cur, 0 /* unused */, FILTER_2D_BILINEAR);
 1594|   209k|            if (res) return res;
  ------------------
  |  Branch (1594:17): [True: 0, False: 209k]
  ------------------
 1595|   209k|        }
 1596|   125k|    } else if (b->comp_type == COMP_INTER_NONE) {
  ------------------
  |  Branch (1596:16): [True: 46.2k, False: 10.3k]
  ------------------
 1597|  46.2k|        const Dav1dThreadPicture *const refp = &f->refp[b->ref[0]];
 1598|  46.2k|        const enum Filter2d filter_2d = b->filter2d;
 1599|       |
 1600|  46.2k|        if (imin(bw4, bh4) > 1 &&
  ------------------
  |  Branch (1600:13): [True: 26.1k, False: 20.0k]
  ------------------
 1601|  26.1k|            ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1601:15): [True: 8.91k, False: 17.2k]
  |  Branch (1601:44): [True: 640, False: 8.27k]
  ------------------
 1602|  25.5k|             (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1602:15): [True: 1.90k, False: 23.6k]
  |  Branch (1602:44): [True: 1.64k, False: 260]
  ------------------
 1603|  2.28k|        {
 1604|  2.28k|            res = warp_affine(t, dst, NULL, f->cur.stride[0], b_dim, 0, refp,
 1605|  2.28k|                              b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1605:31): [True: 1.64k, False: 640]
  ------------------
 1606|  2.28k|                                  &f->frame_hdr->gmv[b->ref[0]]);
 1607|  2.28k|            if (res) return res;
  ------------------
  |  Branch (1607:17): [True: 0, False: 2.28k]
  ------------------
 1608|  43.9k|        } else {
 1609|  43.9k|            res = mc(t, dst, NULL, f->cur.stride[0],
 1610|  43.9k|                     bw4, bh4, t->bx, t->by, 0, b->mv[0], refp, b->ref[0], filter_2d);
 1611|  43.9k|            if (res) return res;
  ------------------
  |  Branch (1611:17): [True: 0, False: 43.9k]
  ------------------
 1612|  43.9k|            if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1612:17): [True: 7.68k, False: 36.2k]
  ------------------
 1613|  7.68k|                res = obmc(t, dst, f->cur.stride[0], b_dim, 0, bx4, by4, w4, h4);
 1614|  7.68k|                if (res) return res;
  ------------------
  |  Branch (1614:21): [True: 0, False: 7.68k]
  ------------------
 1615|  7.68k|            }
 1616|  43.9k|        }
 1617|  46.2k|        if (b->interintra_type) {
  ------------------
  |  Branch (1617:13): [True: 3.14k, False: 43.1k]
  ------------------
 1618|  3.14k|            pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   77|  3.14k|#define bitfn(x) x##_16bpc
  ------------------
 1619|  3.14k|            enum IntraPredMode m = b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1619:36): [True: 578, False: 2.56k]
  ------------------
 1620|  2.56k|                                   SMOOTH_PRED : b->interintra_mode;
 1621|  3.14k|            pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   77|  3.14k|#define bitfn(x) x##_16bpc
  ------------------
 1622|  3.14k|            int angle = 0;
 1623|  3.14k|            const pixel *top_sb_edge = NULL;
 1624|  3.14k|            if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1624:17): [True: 527, False: 2.61k]
  ------------------
 1625|    527|                top_sb_edge = f->ipred_edge[0];
 1626|    527|                const int sby = t->by >> f->sb_shift;
 1627|    527|                top_sb_edge += f->sb128w * 128 * (sby - 1);
 1628|    527|            }
 1629|  3.14k|            m = bytefn(dav1d_prepare_intra_edges)(t->bx, t->bx > ts->tiling.col_start,
  ------------------
  |  |   87|  3.14k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  3.14k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1630|  3.14k|                                                  t->by, t->by > ts->tiling.row_start,
 1631|  3.14k|                                                  ts->tiling.col_end, ts->tiling.row_end,
 1632|  3.14k|                                                  0, dst, f->cur.stride[0], top_sb_edge,
 1633|  3.14k|                                                  m, &angle, bw4, bh4, 0, tl_edge
 1634|  3.14k|                                                  HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  3.14k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1635|  3.14k|            dsp->ipred.intra_pred[m](tmp, 4 * bw4 * sizeof(pixel),
 1636|  3.14k|                                     tl_edge, bw4 * 4, bh4 * 4, 0, 0, 0
 1637|  3.14k|                                     HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  3.14k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1638|  3.14k|            dsp->mc.blend(dst, f->cur.stride[0], tmp,
 1639|  3.14k|                          bw4 * 4, bh4 * 4, II_MASK(0, bs, b));
  ------------------
  |  |   83|  3.14k|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|  3.14k|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 2.34k, False: 801]
  |  |  ------------------
  |  |   85|  3.14k|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|  3.14k|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1640|  3.14k|        }
 1641|       |
 1642|  46.2k|        if (!has_chroma) goto skip_inter_chroma_pred;
  ------------------
  |  Branch (1642:13): [True: 25.3k, False: 20.9k]
  ------------------
 1643|       |
 1644|       |        // sub8x8 derivation
 1645|  20.9k|        int is_sub8x8 = bw4 == ss_hor || bh4 == ss_ver;
  ------------------
  |  Branch (1645:25): [True: 2.54k, False: 18.3k]
  |  Branch (1645:42): [True: 2.15k, False: 16.2k]
  ------------------
 1646|  20.9k|        refmvs_block *const *r;
 1647|  20.9k|        if (is_sub8x8) {
  ------------------
  |  Branch (1647:13): [True: 4.70k, False: 16.2k]
  ------------------
 1648|  4.70k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  4.70k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.70k]
  |  |  |  Branch (140:68): [Folded, False: 4.70k]
  |  |  ------------------
  ------------------
 1649|  4.70k|            r = &t->rt.r[(t->by & 31) + 5];
 1650|  4.70k|            if (bw4 == 1) is_sub8x8 &= r[0][t->bx - 1].ref.ref[0] > 0;
  ------------------
  |  Branch (1650:17): [True: 2.54k, False: 2.15k]
  ------------------
 1651|  4.70k|            if (bh4 == ss_ver) is_sub8x8 &= r[-1][t->bx].ref.ref[0] > 0;
  ------------------
  |  Branch (1651:17): [True: 3.10k, False: 1.59k]
  ------------------
 1652|  4.70k|            if (bw4 == 1 && bh4 == ss_ver)
  ------------------
  |  Branch (1652:17): [True: 2.54k, False: 2.15k]
  |  Branch (1652:29): [True: 949, False: 1.59k]
  ------------------
 1653|    949|                is_sub8x8 &= r[-1][t->bx - 1].ref.ref[0] > 0;
 1654|  4.70k|        }
 1655|       |
 1656|       |        // chroma prediction
 1657|  20.9k|        if (is_sub8x8) {
  ------------------
  |  Branch (1657:13): [True: 4.59k, False: 16.3k]
  ------------------
 1658|  4.59k|            assert(ss_hor == 1);
  ------------------
  |  |  140|  4.59k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 4.59k]
  |  |  |  Branch (140:68): [Folded, False: 4.59k]
  |  |  ------------------
  ------------------
 1659|  4.59k|            ptrdiff_t h_off = 0, v_off = 0;
 1660|  4.59k|            if (bw4 == 1 && bh4 == ss_ver) {
  ------------------
  |  Branch (1660:17): [True: 2.47k, False: 2.12k]
  |  Branch (1660:29): [True: 903, False: 1.57k]
  ------------------
 1661|  2.70k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1661:34): [True: 1.80k, False: 903]
  ------------------
 1662|  1.80k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1663|  1.80k|                             NULL, f->cur.stride[1],
 1664|  1.80k|                             bw4, bh4, t->bx - 1, t->by - 1, 1 + pl,
 1665|  1.80k|                             r[-1][t->bx - 1].mv.mv[0],
 1666|  1.80k|                             &f->refp[r[-1][t->bx - 1].ref.ref[0] - 1],
 1667|  1.80k|                             r[-1][t->bx - 1].ref.ref[0] - 1,
 1668|  1.80k|                             t->frame_thread.pass != 2 ? t->tl_4x4_filter :
  ------------------
  |  Branch (1668:30): [True: 1.80k, False: 0]
  ------------------
 1669|  1.80k|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx - 1].filter2d);
 1670|  1.80k|                    if (res) return res;
  ------------------
  |  Branch (1670:25): [True: 0, False: 1.80k]
  ------------------
 1671|  1.80k|                }
 1672|    903|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
 1673|    903|                h_off = 2;
 1674|    903|            }
 1675|  4.59k|            if (bw4 == 1) {
  ------------------
  |  Branch (1675:17): [True: 2.47k, False: 2.12k]
  ------------------
 1676|  2.47k|                const enum Filter2d left_filter_2d =
 1677|  2.47k|                    dav1d_filter_2d[t->l.filter[1][by4]][t->l.filter[0][by4]];
 1678|  7.42k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1678:34): [True: 4.95k, False: 2.47k]
  ------------------
 1679|  4.95k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + v_off, NULL,
 1680|  4.95k|                             f->cur.stride[1], bw4, bh4, t->bx - 1,
 1681|  4.95k|                             t->by, 1 + pl, r[0][t->bx - 1].mv.mv[0],
 1682|  4.95k|                             &f->refp[r[0][t->bx - 1].ref.ref[0] - 1],
 1683|  4.95k|                             r[0][t->bx - 1].ref.ref[0] - 1,
 1684|  4.95k|                             t->frame_thread.pass != 2 ? left_filter_2d :
  ------------------
  |  Branch (1684:30): [True: 4.95k, False: 0]
  ------------------
 1685|  4.95k|                                 f->frame_thread.b[(t->by * f->b4_stride) + t->bx - 1].filter2d);
 1686|  4.95k|                    if (res) return res;
  ------------------
  |  Branch (1686:25): [True: 0, False: 4.95k]
  ------------------
 1687|  4.95k|                }
 1688|  2.47k|                h_off = 2;
 1689|  2.47k|            }
 1690|  4.59k|            if (bh4 == ss_ver) {
  ------------------
  |  Branch (1690:17): [True: 3.02k, False: 1.57k]
  ------------------
 1691|  3.02k|                const enum Filter2d top_filter_2d =
 1692|  3.02k|                    dav1d_filter_2d[t->a->filter[1][bx4]][t->a->filter[0][bx4]];
 1693|  9.07k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1693:34): [True: 6.05k, False: 3.02k]
  ------------------
 1694|  6.05k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off, NULL,
 1695|  6.05k|                             f->cur.stride[1], bw4, bh4, t->bx, t->by - 1,
 1696|  6.05k|                             1 + pl, r[-1][t->bx].mv.mv[0],
 1697|  6.05k|                             &f->refp[r[-1][t->bx].ref.ref[0] - 1],
 1698|  6.05k|                             r[-1][t->bx].ref.ref[0] - 1,
 1699|  6.05k|                             t->frame_thread.pass != 2 ? top_filter_2d :
  ------------------
  |  Branch (1699:30): [True: 6.05k, False: 0]
  ------------------
 1700|  6.05k|                                 f->frame_thread.b[((t->by - 1) * f->b4_stride) + t->bx].filter2d);
 1701|  6.05k|                    if (res) return res;
  ------------------
  |  Branch (1701:25): [True: 0, False: 6.05k]
  ------------------
 1702|  6.05k|                }
 1703|  3.02k|                v_off = 2 * PXSTRIDE(f->cur.stride[1]);
 1704|  3.02k|            }
 1705|  13.7k|            for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1705:30): [True: 9.19k, False: 4.59k]
  ------------------
 1706|  9.19k|                res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff + h_off + v_off, NULL, f->cur.stride[1],
 1707|  9.19k|                         bw4, bh4, t->bx, t->by, 1 + pl, b->mv[0],
 1708|  9.19k|                         refp, b->ref[0], filter_2d);
 1709|  9.19k|                if (res) return res;
  ------------------
  |  Branch (1709:21): [True: 0, False: 9.19k]
  ------------------
 1710|  9.19k|            }
 1711|  16.3k|        } else {
 1712|  16.3k|            if (imin(cbw4, cbh4) > 1 &&
  ------------------
  |  Branch (1712:17): [True: 5.82k, False: 10.5k]
  ------------------
 1713|  5.82k|                ((b->inter_mode == GLOBALMV && f->gmv_warp_allowed[b->ref[0]]) ||
  ------------------
  |  Branch (1713:19): [True: 2.78k, False: 3.04k]
  |  Branch (1713:48): [True: 271, False: 2.51k]
  ------------------
 1714|  5.55k|                 (b->motion_mode == MM_WARP && t->warpmv.type > DAV1D_WM_TYPE_TRANSLATION)))
  ------------------
  |  Branch (1714:19): [True: 399, False: 5.15k]
  |  Branch (1714:48): [True: 354, False: 45]
  ------------------
 1715|    625|            {
 1716|  1.87k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1716:34): [True: 1.25k, False: 625]
  ------------------
 1717|  1.25k|                    res = warp_affine(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff, NULL,
 1718|  1.25k|                                      f->cur.stride[1], b_dim, 1 + pl, refp,
 1719|  1.25k|                                      b->motion_mode == MM_WARP ? &t->warpmv :
  ------------------
  |  Branch (1719:39): [True: 708, False: 542]
  ------------------
 1720|  1.25k|                                          &f->frame_hdr->gmv[b->ref[0]]);
 1721|  1.25k|                    if (res) return res;
  ------------------
  |  Branch (1721:25): [True: 0, False: 1.25k]
  ------------------
 1722|  1.25k|                }
 1723|  15.7k|            } else {
 1724|  47.1k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1724:34): [True: 31.4k, False: 15.7k]
  ------------------
 1725|  31.4k|                    res = mc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1726|  31.4k|                             NULL, f->cur.stride[1],
 1727|  31.4k|                             bw4 << (bw4 == ss_hor), bh4 << (bh4 == ss_ver),
 1728|  31.4k|                             t->bx & ~ss_hor, t->by & ~ss_ver,
 1729|  31.4k|                             1 + pl, b->mv[0], refp, b->ref[0], filter_2d);
 1730|  31.4k|                    if (res) return res;
  ------------------
  |  Branch (1730:25): [True: 0, False: 31.4k]
  ------------------
 1731|  31.4k|                    if (b->motion_mode == MM_OBMC) {
  ------------------
  |  Branch (1731:25): [True: 9.64k, False: 21.7k]
  ------------------
 1732|  9.64k|                        res = obmc(t, ((pixel *) f->cur.data[1 + pl]) + uvdstoff,
 1733|  9.64k|                                   f->cur.stride[1], b_dim, 1 + pl, bx4, by4, w4, h4);
 1734|  9.64k|                        if (res) return res;
  ------------------
  |  Branch (1734:29): [True: 0, False: 9.64k]
  ------------------
 1735|  9.64k|                    }
 1736|  31.4k|                }
 1737|  15.7k|            }
 1738|  16.3k|            if (b->interintra_type) {
  ------------------
  |  Branch (1738:17): [True: 2.03k, False: 14.3k]
  ------------------
 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|  2.03k|                const uint8_t *const ii_mask = II_MASK(chr_layout_idx, bs, b);
  ------------------
  |  |   83|  2.03k|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   84|  2.03k|    (size_t)((b)->interintra_type == INTER_INTRA_BLEND ? \
  |  |  ------------------
  |  |  |  Branch (84:14): [True: 1.53k, False: 500]
  |  |  ------------------
  |  |   85|  2.03k|    dav1d_masks.offsets[c][(bs)-BS_32x32].ii[(b)->interintra_mode] : \
  |  |   86|  2.03k|    dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[0][(b)->wedge_idx]) * 8))
  ------------------
 1743|       |
 1744|  6.11k|                for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1744:34): [True: 4.07k, False: 2.03k]
  ------------------
 1745|  4.07k|                    pixel *const tmp = bitfn(t->scratch.interintra);
  ------------------
  |  |   77|  4.07k|#define bitfn(x) x##_16bpc
  ------------------
 1746|  4.07k|                    pixel *const tl_edge = bitfn(t->scratch.edge) + 32;
  ------------------
  |  |   77|  4.07k|#define bitfn(x) x##_16bpc
  ------------------
 1747|  4.07k|                    enum IntraPredMode m =
 1748|  4.07k|                        b->interintra_mode == II_SMOOTH_PRED ?
  ------------------
  |  Branch (1748:25): [True: 740, False: 3.33k]
  ------------------
 1749|  3.33k|                        SMOOTH_PRED : b->interintra_mode;
 1750|  4.07k|                    int angle = 0;
 1751|  4.07k|                    pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1752|  4.07k|                    const pixel *top_sb_edge = NULL;
 1753|  4.07k|                    if (!(t->by & (f->sb_step - 1))) {
  ------------------
  |  Branch (1753:25): [True: 846, False: 3.23k]
  ------------------
 1754|    846|                        top_sb_edge = f->ipred_edge[pl + 1];
 1755|    846|                        const int sby = t->by >> f->sb_shift;
 1756|    846|                        top_sb_edge += f->sb128w * 128 * (sby - 1);
 1757|    846|                    }
 1758|  4.07k|                    m = bytefn(dav1d_prepare_intra_edges)(t->bx >> ss_hor,
  ------------------
  |  |   87|  4.07k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  4.07k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 1759|  4.07k|                                                          (t->bx >> ss_hor) >
 1760|  4.07k|                                                              (ts->tiling.col_start >> ss_hor),
 1761|  4.07k|                                                          t->by >> ss_ver,
 1762|  4.07k|                                                          (t->by >> ss_ver) >
 1763|  4.07k|                                                              (ts->tiling.row_start >> ss_ver),
 1764|  4.07k|                                                          ts->tiling.col_end >> ss_hor,
 1765|  4.07k|                                                          ts->tiling.row_end >> ss_ver,
 1766|  4.07k|                                                          0, uvdst, f->cur.stride[1],
 1767|  4.07k|                                                          top_sb_edge, m,
 1768|  4.07k|                                                          &angle, cbw4, cbh4, 0, tl_edge
 1769|  4.07k|                                                          HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  4.07k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1770|  4.07k|                    dsp->ipred.intra_pred[m](tmp, cbw4 * 4 * sizeof(pixel),
 1771|  4.07k|                                             tl_edge, cbw4 * 4, cbh4 * 4, 0, 0, 0
 1772|  4.07k|                                             HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  4.07k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1773|  4.07k|                    dsp->mc.blend(uvdst, f->cur.stride[1], tmp,
 1774|  4.07k|                                  cbw4 * 4, cbh4 * 4, ii_mask);
 1775|  4.07k|                }
 1776|  2.03k|            }
 1777|  16.3k|        }
 1778|       |
 1779|  46.2k|    skip_inter_chroma_pred: {}
 1780|  46.2k|        t->tl_4x4_filter = filter_2d;
 1781|  46.2k|    } else {
 1782|  10.3k|        const enum Filter2d filter_2d = b->filter2d;
 1783|       |        // Maximum super block size is 128x128
 1784|  10.3k|        int16_t (*tmp)[128 * 128] = t->scratch.compinter;
 1785|  10.3k|        int jnt_weight;
 1786|  10.3k|        uint8_t *const seg_mask = t->scratch.seg_mask;
 1787|  10.3k|        const uint8_t *mask;
 1788|       |
 1789|  30.9k|        for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1789:25): [True: 20.6k, False: 10.3k]
  ------------------
 1790|  20.6k|            const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1791|       |
 1792|  20.6k|            if (b->inter_mode == GLOBALMV_GLOBALMV && f->gmv_warp_allowed[b->ref[i]]) {
  ------------------
  |  Branch (1792:17): [True: 2.13k, False: 18.5k]
  |  Branch (1792:55): [True: 173, False: 1.96k]
  ------------------
 1793|    173|                res = warp_affine(t, NULL, tmp[i], bw4 * 4, b_dim, 0, refp,
 1794|    173|                                  &f->frame_hdr->gmv[b->ref[i]]);
 1795|    173|                if (res) return res;
  ------------------
  |  Branch (1795:21): [True: 0, False: 173]
  ------------------
 1796|  20.4k|            } else {
 1797|  20.4k|                res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by, 0,
 1798|  20.4k|                         b->mv[i], refp, b->ref[i], filter_2d);
 1799|  20.4k|                if (res) return res;
  ------------------
  |  Branch (1799:21): [True: 0, False: 20.4k]
  ------------------
 1800|  20.4k|            }
 1801|  20.6k|        }
 1802|  10.3k|        switch (b->comp_type) {
  ------------------
  |  Branch (1802:17): [True: 10.3k, False: 0]
  ------------------
 1803|  7.23k|        case COMP_INTER_AVG:
  ------------------
  |  Branch (1803:9): [True: 7.23k, False: 3.09k]
  ------------------
 1804|  7.23k|            dsp->mc.avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1805|  7.23k|                        bw4 * 4, bh4 * 4 HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  7.23k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1806|  7.23k|            break;
 1807|  1.10k|        case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1807:9): [True: 1.10k, False: 9.22k]
  ------------------
 1808|  1.10k|            jnt_weight = f->jnt_weights[b->ref[0]][b->ref[1]];
 1809|  1.10k|            dsp->mc.w_avg(dst, f->cur.stride[0], tmp[0], tmp[1],
 1810|  1.10k|                          bw4 * 4, bh4 * 4, jnt_weight HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.10k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1811|  1.10k|            break;
 1812|  1.27k|        case COMP_INTER_SEG:
  ------------------
  |  Branch (1812:9): [True: 1.27k, False: 9.05k]
  ------------------
 1813|  1.27k|            dsp->mc.w_mask[chr_layout_idx](dst, f->cur.stride[0],
 1814|  1.27k|                                           tmp[b->mask_sign], tmp[!b->mask_sign],
 1815|  1.27k|                                           bw4 * 4, bh4 * 4, seg_mask,
 1816|  1.27k|                                           b->mask_sign HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.27k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1817|  1.27k|            mask = seg_mask;
 1818|  1.27k|            break;
 1819|    712|        case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1819:9): [True: 712, False: 9.61k]
  ------------------
 1820|    712|            mask = WEDGE_MASK(0, bs, 0, b->wedge_idx);
  ------------------
  |  |   89|    712|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|    712|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1821|    712|            dsp->mc.mask(dst, f->cur.stride[0],
 1822|    712|                         tmp[b->mask_sign], tmp[!b->mask_sign],
 1823|    712|                         bw4 * 4, bh4 * 4, mask HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|    712|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1824|    712|            if (has_chroma)
  ------------------
  |  Branch (1824:17): [True: 165, False: 547]
  ------------------
 1825|    165|                mask = WEDGE_MASK(chr_layout_idx, bs, b->mask_sign, b->wedge_idx);
  ------------------
  |  |   89|    165|    ((const uint8_t*)((uintptr_t)&dav1d_masks + \
  |  |   90|    165|    (size_t)dav1d_masks.offsets[c][(bs)-BS_32x32].wedge[sign][idx] * 8))
  ------------------
 1826|    712|            break;
 1827|  10.3k|        }
 1828|       |
 1829|       |        // chroma
 1830|  13.9k|        if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1830:13): [True: 4.65k, False: 5.67k]
  |  Branch (1830:42): [True: 9.30k, False: 4.65k]
  ------------------
 1831|  27.9k|            for (int i = 0; i < 2; i++) {
  ------------------
  |  Branch (1831:29): [True: 18.6k, False: 9.30k]
  ------------------
 1832|  18.6k|                const Dav1dThreadPicture *const refp = &f->refp[b->ref[i]];
 1833|  18.6k|                if (b->inter_mode == GLOBALMV_GLOBALMV &&
  ------------------
  |  Branch (1833:21): [True: 1.94k, False: 16.6k]
  ------------------
 1834|  1.94k|                    imin(cbw4, cbh4) > 1 && f->gmv_warp_allowed[b->ref[i]])
  ------------------
  |  Branch (1834:21): [True: 736, False: 1.20k]
  |  Branch (1834:45): [True: 76, False: 660]
  ------------------
 1835|     76|                {
 1836|     76|                    res = warp_affine(t, NULL, tmp[i], bw4 * 4 >> ss_hor,
 1837|     76|                                      b_dim, 1 + pl,
 1838|     76|                                      refp, &f->frame_hdr->gmv[b->ref[i]]);
 1839|     76|                    if (res) return res;
  ------------------
  |  Branch (1839:25): [True: 0, False: 76]
  ------------------
 1840|  18.5k|                } else {
 1841|  18.5k|                    res = mc(t, NULL, tmp[i], 0, bw4, bh4, t->bx, t->by,
 1842|  18.5k|                             1 + pl, b->mv[i], refp, b->ref[i], filter_2d);
 1843|  18.5k|                    if (res) return res;
  ------------------
  |  Branch (1843:25): [True: 0, False: 18.5k]
  ------------------
 1844|  18.5k|                }
 1845|  18.6k|            }
 1846|  9.30k|            pixel *const uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff;
 1847|  9.30k|            switch (b->comp_type) {
  ------------------
  |  Branch (1847:21): [True: 9.30k, False: 0]
  ------------------
 1848|  6.28k|            case COMP_INTER_AVG:
  ------------------
  |  Branch (1848:13): [True: 6.28k, False: 3.02k]
  ------------------
 1849|  6.28k|                dsp->mc.avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1850|  6.28k|                            bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver
 1851|  6.28k|                            HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  6.28k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1852|  6.28k|                break;
 1853|  1.76k|            case COMP_INTER_WEIGHTED_AVG:
  ------------------
  |  Branch (1853:13): [True: 1.76k, False: 7.54k]
  ------------------
 1854|  1.76k|                dsp->mc.w_avg(uvdst, f->cur.stride[1], tmp[0], tmp[1],
 1855|  1.76k|                              bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, jnt_weight
 1856|  1.76k|                              HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.76k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1857|  1.76k|                break;
 1858|    330|            case COMP_INTER_WEDGE:
  ------------------
  |  Branch (1858:13): [True: 330, False: 8.97k]
  ------------------
 1859|  1.26k|            case COMP_INTER_SEG:
  ------------------
  |  Branch (1859:13): [True: 930, False: 8.37k]
  ------------------
 1860|  1.26k|                dsp->mc.mask(uvdst, f->cur.stride[1],
 1861|  1.26k|                             tmp[b->mask_sign], tmp[!b->mask_sign],
 1862|  1.26k|                             bw4 * 4 >> ss_hor, bh4 * 4 >> ss_ver, mask
 1863|  1.26k|                             HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  1.26k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1864|  1.26k|                break;
 1865|  9.30k|            }
 1866|  9.30k|        }
 1867|  10.3k|    }
 1868|       |
 1869|   182k|    if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
  ------------------
  |  |   34|   182k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 182k]
  |  |  ------------------
  |  |   35|   182k|        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|   182k|        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|   182k|    const int cw4 = (w4 + ss_hor) >> ss_hor, ch4 = (h4 + ss_ver) >> ss_ver;
 1880|       |
 1881|   182k|    if (b->skip) {
  ------------------
  |  Branch (1881:9): [True: 127k, False: 54.7k]
  ------------------
 1882|       |        // reset coef contexts
 1883|   127k|        BlockContext *const a = t->a;
 1884|   127k|        dav1d_memset_pow2[b_dim[2]](&a->lcoef[bx4], 0x40);
 1885|   127k|        dav1d_memset_pow2[b_dim[3]](&t->l.lcoef[by4], 0x40);
 1886|   127k|        if (has_chroma) {
  ------------------
  |  Branch (1886:13): [True: 99.7k, False: 27.8k]
  ------------------
 1887|  99.7k|            dav1d_memset_pow2_fn memset_cw = dav1d_memset_pow2[ulog2(cbw4)];
 1888|  99.7k|            dav1d_memset_pow2_fn memset_ch = dav1d_memset_pow2[ulog2(cbh4)];
 1889|  99.7k|            memset_cw(&a->ccoef[0][cbx4], 0x40);
 1890|  99.7k|            memset_cw(&a->ccoef[1][cbx4], 0x40);
 1891|  99.7k|            memset_ch(&t->l.ccoef[0][cby4], 0x40);
 1892|  99.7k|            memset_ch(&t->l.ccoef[1][cby4], 0x40);
 1893|  99.7k|        }
 1894|   127k|        return 0;
 1895|   127k|    }
 1896|       |
 1897|  54.7k|    const TxfmInfo *const uvtx = &dav1d_txfm_dimensions[b->uvtx];
 1898|  54.7k|    const TxfmInfo *const ytx = &dav1d_txfm_dimensions[b->max_ytx];
 1899|  54.7k|    const uint16_t tx_split[2] = { b->tx_split0, b->tx_split1 };
 1900|       |
 1901|   110k|    for (int init_y = 0; init_y < bh4; init_y += 16) {
  ------------------
  |  Branch (1901:26): [True: 55.9k, False: 54.7k]
  ------------------
 1902|   113k|        for (int init_x = 0; init_x < bw4; init_x += 16) {
  ------------------
  |  Branch (1902:30): [True: 57.2k, False: 55.9k]
  ------------------
 1903|       |            // coefficient coding & inverse transforms
 1904|  57.2k|            int y_off = !!init_y, y;
 1905|  57.2k|            dst += PXSTRIDE(f->cur.stride[0]) * 4 * init_y;
 1906|   117k|            for (y = init_y, t->by += init_y; y < imin(h4, init_y + 16);
  ------------------
  |  Branch (1906:47): [True: 60.0k, False: 57.2k]
  ------------------
 1907|  60.0k|                 y += ytx->h, y_off++)
 1908|  60.0k|            {
 1909|  60.0k|                int x, x_off = !!init_x;
 1910|   131k|                for (x = init_x, t->bx += init_x; x < imin(w4, init_x + 16);
  ------------------
  |  Branch (1910:51): [True: 71.9k, False: 60.0k]
  ------------------
 1911|  71.9k|                     x += ytx->w, x_off++)
 1912|  71.9k|                {
 1913|  71.9k|                    read_coef_tree(t, bs, b, b->max_ytx, 0, tx_split,
 1914|  71.9k|                                   x_off, y_off, &dst[x * 4]);
 1915|  71.9k|                    t->bx += ytx->w;
 1916|  71.9k|                }
 1917|  60.0k|                dst += PXSTRIDE(f->cur.stride[0]) * 4 * ytx->h;
 1918|  60.0k|                t->bx -= x;
 1919|  60.0k|                t->by += ytx->h;
 1920|  60.0k|            }
 1921|  57.2k|            dst -= PXSTRIDE(f->cur.stride[0]) * 4 * y;
 1922|  57.2k|            t->by -= y;
 1923|       |
 1924|       |            // chroma coefs and inverse transform
 1925|  94.5k|            if (has_chroma) for (int pl = 0; pl < 2; pl++) {
  ------------------
  |  Branch (1925:17): [True: 31.5k, False: 25.7k]
  |  Branch (1925:46): [True: 63.0k, False: 31.5k]
  ------------------
 1926|  63.0k|                pixel *uvdst = ((pixel *) f->cur.data[1 + pl]) + uvdstoff +
 1927|  63.0k|                    (PXSTRIDE(f->cur.stride[1]) * init_y * 4 >> ss_ver);
 1928|  63.0k|                for (y = init_y >> ss_ver, t->by += init_y;
 1929|   129k|                     y < imin(ch4, (init_y + 16) >> ss_ver); y += uvtx->h)
  ------------------
  |  Branch (1929:22): [True: 66.5k, False: 63.0k]
  ------------------
 1930|  66.5k|                {
 1931|  66.5k|                    int x;
 1932|  66.5k|                    for (x = init_x >> ss_hor, t->bx += init_x;
 1933|   139k|                         x < imin(cw4, (init_x + 16) >> ss_hor); x += uvtx->w)
  ------------------
  |  Branch (1933:26): [True: 73.4k, False: 66.5k]
  ------------------
 1934|  73.4k|                    {
 1935|  73.4k|                        coef *cf;
 1936|  73.4k|                        int eob;
 1937|  73.4k|                        enum TxfmType txtp;
 1938|  73.4k|                        if (t->frame_thread.pass) {
  ------------------
  |  Branch (1938:29): [True: 0, False: 73.4k]
  ------------------
 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|  73.4k|                        } else {
 1946|  73.4k|                            uint8_t cf_ctx;
 1947|  73.4k|                            cf = bitfn(t->cf);
  ------------------
  |  |   77|  73.4k|#define bitfn(x) x##_16bpc
  ------------------
 1948|  73.4k|                            txtp = t->scratch.txtp_map[(by4 + (y << ss_ver)) * 32 +
 1949|  73.4k|                                                        bx4 + (x << ss_hor)];
 1950|  73.4k|                            eob = decode_coefs(t, &t->a->ccoef[pl][cbx4 + x],
 1951|  73.4k|                                               &t->l.ccoef[pl][cby4 + y],
 1952|  73.4k|                                               b->uvtx, bs, b, 0, 1 + pl,
 1953|  73.4k|                                               cf, &txtp, &cf_ctx);
 1954|  73.4k|                            if (DEBUG_BLOCK_INFO)
  ------------------
  |  |   34|  73.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 73.4k]
  |  |  ------------------
  |  |   35|  73.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|  73.4k|        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|  73.4k|                            int ctw = imin(uvtx->w, (f->bw - t->bx + ss_hor) >> ss_hor);
 1959|  73.4k|                            int cth = imin(uvtx->h, (f->bh - t->by + ss_ver) >> ss_ver);
 1960|  73.4k|                            dav1d_memset_likely_pow2(&t->a->ccoef[pl][cbx4 + x], cf_ctx, ctw);
 1961|  73.4k|                            dav1d_memset_likely_pow2(&t->l.ccoef[pl][cby4 + y], cf_ctx, cth);
 1962|  73.4k|                        }
 1963|  73.4k|                        if (eob >= 0) {
  ------------------
  |  Branch (1963:29): [True: 19.4k, False: 54.0k]
  ------------------
 1964|  19.4k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  19.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 19.4k]
  |  |  ------------------
  |  |   35|  19.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|  19.4k|        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|  19.4k|                            dsp->itx.itxfm_add[b->uvtx]
 1967|  19.4k|                                              [txtp](&uvdst[4 * x],
 1968|  19.4k|                                                     f->cur.stride[1],
 1969|  19.4k|                                                     cf, eob HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  19.4k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 1970|  19.4k|                            if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS)
  ------------------
  |  |   34|  19.4k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 19.4k]
  |  |  ------------------
  |  |   35|  19.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|  19.4k|        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|  19.4k|                        }
 1974|  73.4k|                        t->bx += uvtx->w << ss_hor;
 1975|  73.4k|                    }
 1976|  66.5k|                    uvdst += PXSTRIDE(f->cur.stride[1]) * 4 * uvtx->h;
 1977|  66.5k|                    t->bx -= x << ss_hor;
 1978|  66.5k|                    t->by += uvtx->h << ss_ver;
 1979|  66.5k|                }
 1980|  63.0k|                t->by -= y << ss_ver;
 1981|  63.0k|            }
 1982|  57.2k|        }
 1983|  55.9k|    }
 1984|  54.7k|    return 0;
 1985|   182k|}
dav1d_filter_sbrow_deblock_cols_16bpc:
 1987|  39.5k|void bytefn(dav1d_filter_sbrow_deblock_cols)(Dav1dFrameContext *const f, const int sby) {
 1988|  39.5k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK) ||
  ------------------
  |  Branch (1988:9): [True: 0, False: 39.5k]
  ------------------
 1989|  39.5k|        (!f->frame_hdr->loopfilter.level_y[0] && !f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (1989:10): [True: 15.2k, False: 24.2k]
  |  Branch (1989:50): [True: 13.0k, False: 2.20k]
  ------------------
 1990|  13.0k|    {
 1991|  13.0k|        return;
 1992|  13.0k|    }
 1993|  26.4k|    const int y = sby * f->sb_step * 4;
 1994|  26.4k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 1995|  26.4k|    pixel *const p[3] = {
 1996|  26.4k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
 1997|  26.4k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 1998|  26.4k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
 1999|  26.4k|    };
 2000|  26.4k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2001|  26.4k|    bytefn(dav1d_loopfilter_sbrow_cols)(f, p, mask, sby,
  ------------------
  |  |   87|  26.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  26.4k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2002|  26.4k|                                        f->lf.start_of_tile_row[sby]);
 2003|  26.4k|}
dav1d_filter_sbrow_deblock_rows_16bpc:
 2005|  39.5k|void bytefn(dav1d_filter_sbrow_deblock_rows)(Dav1dFrameContext *const f, const int sby) {
 2006|  39.5k|    const int y = sby * f->sb_step * 4;
 2007|  39.5k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2008|  39.5k|    pixel *const p[3] = {
 2009|  39.5k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
 2010|  39.5k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2011|  39.5k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
 2012|  39.5k|    };
 2013|  39.5k|    Av1Filter *mask = f->lf.mask + (sby >> !f->seq_hdr->sb128) * f->sb128w;
 2014|  39.5k|    if (f->c->inloop_filters & DAV1D_INLOOPFILTER_DEBLOCK &&
  ------------------
  |  Branch (2014:9): [True: 39.5k, False: 0]
  ------------------
 2015|  39.5k|        (f->frame_hdr->loopfilter.level_y[0] || f->frame_hdr->loopfilter.level_y[1]))
  ------------------
  |  Branch (2015:10): [True: 24.2k, False: 15.2k]
  |  Branch (2015:49): [True: 2.20k, False: 13.0k]
  ------------------
 2016|  26.4k|    {
 2017|  26.4k|        bytefn(dav1d_loopfilter_sbrow_rows)(f, p, mask, sby);
  ------------------
  |  |   87|  26.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  26.4k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2018|  26.4k|    }
 2019|  39.5k|    if (f->seq_hdr->cdef || f->lf.restore_planes) {
  ------------------
  |  Branch (2019:9): [True: 21.6k, False: 17.9k]
  |  Branch (2019:29): [True: 3.34k, False: 14.6k]
  ------------------
 2020|       |        // Store loop filtered pixels required by CDEF / LR
 2021|  24.9k|        bytefn(dav1d_copy_lpf)(f, p, sby);
  ------------------
  |  |   87|  24.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  24.9k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2022|  24.9k|    }
 2023|  39.5k|}
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.9k, False: 3.62k]
  ------------------
 2040|  17.9k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2041|  17.9k|        pixel *p_up[3] = {
 2042|  17.9k|            p[0] - 8 * PXSTRIDE(f->cur.stride[0]),
 2043|  17.9k|            p[1] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2044|  17.9k|            p[2] - (8 * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2045|  17.9k|        };
 2046|  17.9k|        bytefn(dav1d_cdef_brow)(tc, p_up, prev_mask, start - 2, start, 1, sby);
  ------------------
  |  |   87|  17.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  17.9k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2047|  17.9k|    }
 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.19k|void bytefn(dav1d_filter_sbrow_resize)(Dav1dFrameContext *const f, const int sby) {
 2054|  5.19k|    const int sbsz = f->sb_step;
 2055|  5.19k|    const int y = sby * sbsz * 4;
 2056|  5.19k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2057|  5.19k|    const pixel *const p[3] = {
 2058|  5.19k|        f->lf.p[0] + y * PXSTRIDE(f->cur.stride[0]),
 2059|  5.19k|        f->lf.p[1] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver),
 2060|  5.19k|        f->lf.p[2] + (y * PXSTRIDE(f->cur.stride[1]) >> ss_ver)
 2061|  5.19k|    };
 2062|  5.19k|    pixel *const sr_p[3] = {
 2063|  5.19k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
 2064|  5.19k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
 2065|  5.19k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
 2066|  5.19k|    };
 2067|  5.19k|    const int has_chroma = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400;
 2068|  17.5k|    for (int pl = 0; pl < 1 + 2 * has_chroma; pl++) {
  ------------------
  |  Branch (2068:22): [True: 12.3k, False: 5.19k]
  ------------------
 2069|  12.3k|        const int ss_ver = pl && f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
  ------------------
  |  Branch (2069:28): [True: 7.19k, False: 5.19k]
  |  Branch (2069:34): [True: 4.74k, False: 2.44k]
  ------------------
 2070|  12.3k|        const int h_start = 8 * !!sby >> ss_ver;
 2071|  12.3k|        const ptrdiff_t dst_stride = f->sr_cur.p.stride[!!pl];
 2072|  12.3k|        pixel *dst = sr_p[pl] - h_start * PXSTRIDE(dst_stride);
 2073|  12.3k|        const ptrdiff_t src_stride = f->cur.stride[!!pl];
 2074|  12.3k|        const pixel *src = p[pl] - h_start * PXSTRIDE(src_stride);
 2075|  12.3k|        const int h_end = 4 * (sbsz - 2 * (sby + 1 < f->sbh)) >> ss_ver;
 2076|  12.3k|        const int ss_hor = pl && f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
  ------------------
  |  Branch (2076:28): [True: 7.19k, False: 5.19k]
  |  Branch (2076:34): [True: 4.90k, False: 2.28k]
  ------------------
 2077|  12.3k|        const int dst_w = (f->sr_cur.p.p.w + ss_hor) >> ss_hor;
 2078|  12.3k|        const int src_w = (4 * f->bw + ss_hor) >> ss_hor;
 2079|  12.3k|        const int img_h = (f->cur.p.h - sbsz * 4 * sby + ss_ver) >> ss_ver;
 2080|       |
 2081|  12.3k|        f->dsp->mc.resize(dst, dst_stride, src, src_stride, dst_w,
 2082|  12.3k|                          imin(img_h, h_end) + h_start, src_w,
 2083|  12.3k|                          f->resize_step[!!pl], f->resize_start[!!pl]
 2084|  12.3k|                          HIGHBD_CALL_SUFFIX);
  ------------------
  |  |   73|  12.3k|#define HIGHBD_CALL_SUFFIX , f->bitdepth_max
  ------------------
 2085|  12.3k|    }
 2086|  5.19k|}
dav1d_filter_sbrow_lr_16bpc:
 2088|  9.61k|void bytefn(dav1d_filter_sbrow_lr)(Dav1dFrameContext *const f, const int sby) {
 2089|  9.61k|    if (!(f->c->inloop_filters & DAV1D_INLOOPFILTER_RESTORATION)) return;
  ------------------
  |  Branch (2089:9): [True: 0, False: 9.61k]
  ------------------
 2090|  9.61k|    const int y = sby * f->sb_step * 4;
 2091|  9.61k|    const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2092|  9.61k|    pixel *const sr_p[3] = {
 2093|  9.61k|        f->lf.sr_p[0] + y * PXSTRIDE(f->sr_cur.p.stride[0]),
 2094|  9.61k|        f->lf.sr_p[1] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver),
 2095|  9.61k|        f->lf.sr_p[2] + (y * PXSTRIDE(f->sr_cur.p.stride[1]) >> ss_ver)
 2096|  9.61k|    };
 2097|  9.61k|    bytefn(dav1d_lr_sbrow)(f, sr_p, sby);
  ------------------
  |  |   87|  9.61k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  9.61k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2098|  9.61k|}
dav1d_filter_sbrow_16bpc:
 2100|  39.5k|void bytefn(dav1d_filter_sbrow)(Dav1dFrameContext *const f, const int sby) {
 2101|  39.5k|    bytefn(dav1d_filter_sbrow_deblock_cols)(f, sby);
  ------------------
  |  |   87|  39.5k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  39.5k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2102|  39.5k|    bytefn(dav1d_filter_sbrow_deblock_rows)(f, sby);
  ------------------
  |  |   87|  39.5k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  39.5k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2103|  39.5k|    if (f->seq_hdr->cdef)
  ------------------
  |  Branch (2103:9): [True: 21.6k, False: 17.9k]
  ------------------
 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|  39.5k|    if (f->frame_hdr->width[0] != f->frame_hdr->width[1])
  ------------------
  |  Branch (2105:9): [True: 5.19k, False: 34.3k]
  ------------------
 2106|  5.19k|        bytefn(dav1d_filter_sbrow_resize)(f, sby);
  ------------------
  |  |   87|  5.19k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  5.19k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2107|  39.5k|    if (f->lf.restore_planes)
  ------------------
  |  Branch (2107:9): [True: 9.61k, False: 29.9k]
  ------------------
 2108|  9.61k|        bytefn(dav1d_filter_sbrow_lr)(f, sby);
  ------------------
  |  |   87|  9.61k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  9.61k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2109|  39.5k|}
dav1d_backup_ipred_edge_16bpc:
 2111|  43.0k|void bytefn(dav1d_backup_ipred_edge)(Dav1dTaskContext *const t) {
 2112|  43.0k|    const Dav1dFrameContext *const f = t->f;
 2113|  43.0k|    Dav1dTileState *const ts = t->ts;
 2114|  43.0k|    const int sby = t->by >> f->sb_shift;
 2115|  43.0k|    const int sby_off = f->sb128w * 128 * sby;
 2116|  43.0k|    const int x_off = ts->tiling.col_start;
 2117|       |
 2118|  43.0k|    const pixel *const y =
 2119|  43.0k|        ((const pixel *) f->cur.data[0]) + x_off * 4 +
 2120|  43.0k|                    ((t->by + f->sb_step) * 4 - 1) * PXSTRIDE(f->cur.stride[0]);
 2121|  43.0k|    pixel_copy(&f->ipred_edge[0][sby_off + x_off * 4], y,
  ------------------
  |  |   65|  43.0k|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
 2122|  43.0k|               4 * (ts->tiling.col_end - x_off));
 2123|       |
 2124|  43.0k|    if (f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I400) {
  ------------------
  |  Branch (2124:9): [True: 32.6k, False: 10.4k]
  ------------------
 2125|  32.6k|        const int ss_ver = f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I420;
 2126|  32.6k|        const int ss_hor = f->cur.p.layout != DAV1D_PIXEL_LAYOUT_I444;
 2127|       |
 2128|  32.6k|        const ptrdiff_t uv_off = (x_off * 4 >> ss_hor) +
 2129|  32.6k|            (((t->by + f->sb_step) * 4 >> ss_ver) - 1) * PXSTRIDE(f->cur.stride[1]);
 2130|  98.0k|        for (int pl = 1; pl <= 2; pl++)
  ------------------
  |  Branch (2130:26): [True: 65.3k, False: 32.6k]
  ------------------
 2131|  65.3k|            pixel_copy(&f->ipred_edge[pl][sby_off + (x_off * 4 >> ss_hor)],
  ------------------
  |  |   65|  65.3k|#define pixel_copy(a, b, c) memcpy(a, b, (c) << 1)
  ------------------
 2132|  32.6k|                       &((const pixel *) f->cur.data[pl])[uv_off],
 2133|  32.6k|                       4 * (ts->tiling.col_end - x_off) >> ss_hor);
 2134|  32.6k|    }
 2135|  43.0k|}
dav1d_copy_pal_block_y_16bpc:
 2141|  8.24k|{
 2142|  8.24k|    const Dav1dFrameContext *const f = t->f;
 2143|  8.24k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2143:24): [True: 0, False: 8.24k]
  ------------------
 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|  8.24k|        bytefn(t->scratch.pal)[0];
  ------------------
  |  |   87|  8.24k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  8.24k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2147|  40.2k|    for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2147:21): [True: 31.9k, False: 8.24k]
  ------------------
 2148|  31.9k|        memcpy(bytefn(t->al_pal)[0][bx4 + x][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  31.9k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  31.9k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2149|  34.0k|    for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2149:21): [True: 25.8k, False: 8.24k]
  ------------------
 2150|  25.8k|        memcpy(bytefn(t->al_pal)[1][by4 + y][0], pal, 8 * sizeof(pixel));
  ------------------
  |  |   87|  25.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  25.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2151|  8.24k|}
dav1d_copy_pal_block_uv_16bpc:
 2157|  3.59k|{
 2158|  3.59k|    const Dav1dFrameContext *const f = t->f;
 2159|  3.59k|    const pixel (*const pal)[8] = t->frame_thread.pass ?
  ------------------
  |  Branch (2159:35): [True: 0, False: 3.59k]
  ------------------
 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|  3.59k|        bytefn(t->scratch.pal);
  ------------------
  |  |   87|  3.59k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  3.59k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2163|       |    // see aomedia bug 2183 for why we use luma coordinates here
 2164|  10.7k|    for (int pl = 1; pl <= 2; pl++) {
  ------------------
  |  Branch (2164:22): [True: 7.18k, False: 3.59k]
  ------------------
 2165|  39.3k|        for (int x = 0; x < bw4; x++)
  ------------------
  |  Branch (2165:25): [True: 32.1k, False: 7.18k]
  ------------------
 2166|  32.1k|            memcpy(bytefn(t->al_pal)[0][bx4 + x][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  32.1k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  32.1k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2167|  37.6k|        for (int y = 0; y < bh4; y++)
  ------------------
  |  Branch (2167:25): [True: 30.4k, False: 7.18k]
  ------------------
 2168|  30.4k|            memcpy(bytefn(t->al_pal)[1][by4 + y][pl], pal[pl], 8 * sizeof(pixel));
  ------------------
  |  |   87|  30.4k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  30.4k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2169|  7.18k|    }
 2170|  3.59k|}
dav1d_read_pal_plane_16bpc:
 2175|  11.8k|{
 2176|  11.8k|    Dav1dTileState *const ts = t->ts;
 2177|  11.8k|    const Dav1dFrameContext *const f = t->f;
 2178|  11.8k|    const int pal_sz = b->pal_sz[pl] = dav1d_msac_decode_symbol_adapt8(&ts->msac,
  ------------------
  |  |   48|  11.8k|#define dav1d_msac_decode_symbol_adapt8  dav1d_msac_decode_symbol_adapt8_sse2
  ------------------
 2179|  11.8k|                                           ts->cdf.m.pal_sz[pl][sz_ctx], 6) + 2;
 2180|  11.8k|    pixel cache[16], used_cache[8];
 2181|  11.8k|    int l_cache = pl ? t->pal_sz_uv[1][by4] : t->l.pal_sz[by4];
  ------------------
  |  Branch (2181:19): [True: 3.59k, False: 8.24k]
  ------------------
 2182|  11.8k|    int n_cache = 0;
 2183|       |    // don't reuse above palette outside SB64 boundaries
 2184|  11.8k|    int a_cache = by4 & 15 ? pl ? t->pal_sz_uv[0][bx4] : t->a->pal_sz[bx4] : 0;
  ------------------
  |  Branch (2184:19): [True: 8.91k, False: 2.92k]
  |  Branch (2184:30): [True: 2.54k, False: 6.36k]
  ------------------
 2185|  11.8k|    const pixel *l = bytefn(t->al_pal)[1][by4][pl];
  ------------------
  |  |   87|  11.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  11.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2186|  11.8k|    const pixel *a = bytefn(t->al_pal)[0][bx4][pl];
  ------------------
  |  |   87|  11.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  11.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2187|       |
 2188|       |    // fill/sort cache
 2189|  22.7k|    while (l_cache && a_cache) {
  ------------------
  |  Branch (2189:12): [True: 14.3k, False: 8.43k]
  |  Branch (2189:23): [True: 10.9k, False: 3.39k]
  ------------------
 2190|  10.9k|        if (*l < *a) {
  ------------------
  |  Branch (2190:13): [True: 4.36k, False: 6.59k]
  ------------------
 2191|  4.36k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2191:17): [True: 910, False: 3.45k]
  |  Branch (2191:29): [True: 3.39k, False: 63]
  ------------------
 2192|  4.30k|                cache[n_cache++] = *l;
 2193|  4.36k|            l++;
 2194|  4.36k|            l_cache--;
 2195|  6.59k|        } else {
 2196|  6.59k|            if (*a == *l) {
  ------------------
  |  Branch (2196:17): [True: 2.60k, False: 3.98k]
  ------------------
 2197|  2.60k|                l++;
 2198|  2.60k|                l_cache--;
 2199|  2.60k|            }
 2200|  6.59k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2200:17): [True: 1.26k, False: 5.33k]
  |  Branch (2200:29): [True: 5.14k, False: 184]
  ------------------
 2201|  6.41k|                cache[n_cache++] = *a;
 2202|  6.59k|            a++;
 2203|  6.59k|            a_cache--;
 2204|  6.59k|        }
 2205|  10.9k|    }
 2206|  11.8k|    if (l_cache) {
  ------------------
  |  Branch (2206:9): [True: 3.39k, False: 8.43k]
  ------------------
 2207|  13.5k|        do {
 2208|  13.5k|            if (!n_cache || cache[n_cache - 1] != *l)
  ------------------
  |  Branch (2208:17): [True: 2.44k, False: 11.1k]
  |  Branch (2208:29): [True: 8.67k, False: 2.46k]
  ------------------
 2209|  11.1k|                cache[n_cache++] = *l;
 2210|  13.5k|            l++;
 2211|  13.5k|        } while (--l_cache > 0);
  ------------------
  |  Branch (2211:18): [True: 10.1k, False: 3.39k]
  ------------------
 2212|  8.43k|    } else if (a_cache) {
  ------------------
  |  Branch (2212:16): [True: 2.67k, False: 5.75k]
  ------------------
 2213|  10.3k|        do {
 2214|  10.3k|            if (!n_cache || cache[n_cache - 1] != *a)
  ------------------
  |  Branch (2214:17): [True: 1.69k, False: 8.68k]
  |  Branch (2214:29): [True: 6.77k, False: 1.90k]
  ------------------
 2215|  8.47k|                cache[n_cache++] = *a;
 2216|  10.3k|            a++;
 2217|  10.3k|        } while (--a_cache > 0);
  ------------------
  |  Branch (2217:18): [True: 7.70k, False: 2.67k]
  ------------------
 2218|  2.67k|    }
 2219|       |
 2220|       |    // find reused cache entries
 2221|  11.8k|    int i = 0;
 2222|  37.9k|    for (int n = 0; n < n_cache && i < pal_sz; n++)
  ------------------
  |  Branch (2222:21): [True: 27.5k, False: 10.4k]
  |  Branch (2222:36): [True: 26.1k, False: 1.36k]
  ------------------
 2223|  26.1k|        if (dav1d_msac_decode_bool_equi(&ts->msac))
  ------------------
  |  |   53|  26.1k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2223:13): [True: 12.9k, False: 13.2k]
  ------------------
 2224|  12.9k|            used_cache[i++] = cache[n];
 2225|  11.8k|    const int n_used_cache = i;
 2226|       |
 2227|       |    // parse new entries
 2228|  11.8k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2228:24): [True: 0, False: 11.8k]
  ------------------
 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|  11.8k|        bytefn(t->scratch.pal)[pl];
  ------------------
  |  |   87|  11.8k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  11.8k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2232|  11.8k|    if (i < pal_sz) {
  ------------------
  |  Branch (2232:9): [True: 9.99k, False: 1.84k]
  ------------------
 2233|  9.99k|        const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2233:25): [Folded, False: 9.99k]
  ------------------
 2234|  9.99k|        int prev = pal[i++] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2235|       |
 2236|  9.99k|        if (i < pal_sz) {
  ------------------
  |  Branch (2236:13): [True: 8.97k, False: 1.01k]
  ------------------
 2237|  8.97k|            int bits = bpc - 3 + dav1d_msac_decode_bools(&ts->msac, 2);
 2238|  8.97k|            const int max = (1 << bpc) - 1;
 2239|       |
 2240|  20.9k|            do {
 2241|  20.9k|                const int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2242|  20.9k|                prev = pal[i++] = imin(prev + delta + !pl, max);
 2243|  20.9k|                if (prev + !pl >= max) {
  ------------------
  |  Branch (2243:21): [True: 3.94k, False: 16.9k]
  ------------------
 2244|  11.1k|                    for (; i < pal_sz; i++)
  ------------------
  |  Branch (2244:28): [True: 7.22k, False: 3.94k]
  ------------------
 2245|  7.22k|                        pal[i] = max;
 2246|  3.94k|                    break;
 2247|  3.94k|                }
 2248|  16.9k|                bits = imin(bits, 1 + ulog2(max - prev - !pl));
 2249|  16.9k|            } while (i < pal_sz);
  ------------------
  |  Branch (2249:22): [True: 11.9k, False: 5.02k]
  ------------------
 2250|  8.97k|        }
 2251|       |
 2252|       |        // merge cache+new entries
 2253|  9.99k|        int n = 0, m = n_used_cache;
 2254|  56.2k|        for (i = 0; i < pal_sz; i++) {
  ------------------
  |  Branch (2254:21): [True: 46.2k, False: 9.99k]
  ------------------
 2255|  46.2k|            if (n < n_used_cache && (m >= pal_sz || used_cache[n] <= pal[m])) {
  ------------------
  |  Branch (2255:17): [True: 14.0k, False: 32.1k]
  |  Branch (2255:38): [True: 3.00k, False: 11.0k]
  |  Branch (2255:53): [True: 5.08k, False: 5.96k]
  ------------------
 2256|  8.09k|                pal[i] = used_cache[n++];
 2257|  38.1k|            } else {
 2258|  38.1k|                assert(m < pal_sz);
  ------------------
  |  |  140|  38.1k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 38.1k]
  |  |  |  Branch (140:68): [Folded, False: 38.1k]
  |  |  ------------------
  ------------------
 2259|  38.1k|                pal[i] = pal[m++];
 2260|  38.1k|            }
 2261|  46.2k|        }
 2262|  9.99k|    } else {
 2263|  1.84k|        memcpy(pal, used_cache, n_used_cache * sizeof(*used_cache));
 2264|  1.84k|    }
 2265|       |
 2266|  11.8k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  11.8k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 11.8k]
  |  |  ------------------
  |  |   35|  11.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|  11.8k|        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|  11.8k|}
dav1d_read_pal_uv_16bpc:
 2280|  3.59k|{
 2281|  3.59k|    bytefn(dav1d_read_pal_plane)(t, b, 1, sz_ctx, bx4, by4);
  ------------------
  |  |   87|  3.59k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  3.59k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2282|       |
 2283|       |    // V pal coding
 2284|  3.59k|    Dav1dTileState *const ts = t->ts;
 2285|  3.59k|    const Dav1dFrameContext *const f = t->f;
 2286|  3.59k|    pixel *const pal = t->frame_thread.pass ?
  ------------------
  |  Branch (2286:24): [True: 0, False: 3.59k]
  ------------------
 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|  3.59k|        bytefn(t->scratch.pal)[2];
  ------------------
  |  |   87|  3.59k|#define bytefn(x) bitfn(x)
  |  |  ------------------
  |  |  |  |   77|  3.59k|#define bitfn(x) x##_16bpc
  |  |  ------------------
  ------------------
 2290|  3.59k|    const int bpc = BITDEPTH == 8 ? 8 : f->cur.p.bpc;
  ------------------
  |  Branch (2290:21): [Folded, False: 3.59k]
  ------------------
 2291|  3.59k|    if (dav1d_msac_decode_bool_equi(&ts->msac)) {
  ------------------
  |  |   53|  3.59k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2291:9): [True: 1.85k, False: 1.73k]
  ------------------
 2292|  1.85k|        const int bits = bpc - 4 + dav1d_msac_decode_bools(&ts->msac, 2);
 2293|  1.85k|        int prev = pal[0] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2294|  1.85k|        const int max = (1 << bpc) - 1;
 2295|  7.68k|        for (int i = 1; i < b->pal_sz[1]; i++) {
  ------------------
  |  Branch (2295:25): [True: 5.82k, False: 1.85k]
  ------------------
 2296|  5.82k|            int delta = dav1d_msac_decode_bools(&ts->msac, bits);
 2297|  5.82k|            if (delta && dav1d_msac_decode_bool_equi(&ts->msac)) delta = -delta;
  ------------------
  |  |   53|  5.77k|#define dav1d_msac_decode_bool_equi      dav1d_msac_decode_bool_equi_sse2
  ------------------
  |  Branch (2297:17): [True: 5.77k, False: 52]
  |  Branch (2297:26): [True: 2.91k, False: 2.86k]
  ------------------
 2298|  5.82k|            prev = pal[i] = (prev + delta) & max;
 2299|  5.82k|        }
 2300|  1.85k|    } else {
 2301|  8.79k|        for (int i = 0; i < b->pal_sz[1]; i++)
  ------------------
  |  Branch (2301:25): [True: 7.06k, False: 1.73k]
  ------------------
 2302|  7.06k|            pal[i] = dav1d_msac_decode_bools(&ts->msac, bpc);
 2303|  1.73k|    }
 2304|  3.59k|    if (DEBUG_BLOCK_INFO) {
  ------------------
  |  |   34|  3.59k|#define DEBUG_BLOCK_INFO 0 && \
  |  |  ------------------
  |  |  |  Branch (34:26): [Folded, False: 3.59k]
  |  |  ------------------
  |  |   35|  3.59k|        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.59k|        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|  3.59k|}

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

obu.c:dav1d_ref_init:
   59|     59|{
   60|     59|    ref->data = NULL;
   61|     59|    ref->const_data = ptr;
   62|       |    atomic_init(&ref->ref_cnt, 1);
   63|     59|    ref->free_ref = free_ref;
   64|     59|    ref->free_callback = free_callback;
   65|     59|    ref->user_data = user_data;
   66|     59|    return ref;
   67|     59|}
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|   626k|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|   626k|}
picture.c:dav1d_ref_init:
   59|  22.4k|{
   60|  22.4k|    ref->data = NULL;
   61|  22.4k|    ref->const_data = ptr;
   62|       |    atomic_init(&ref->ref_cnt, 1);
   63|  22.4k|    ref->free_ref = free_ref;
   64|  22.4k|    ref->free_callback = free_callback;
   65|  22.4k|    ref->user_data = user_data;
   66|  22.4k|    return ref;
   67|  22.4k|}
cdf.c:dav1d_ref_inc:
   69|  18.9k|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|  18.9k|}
data.c:dav1d_ref_init:
   59|  16.0k|{
   60|  16.0k|    ref->data = NULL;
   61|  16.0k|    ref->const_data = ptr;
   62|       |    atomic_init(&ref->ref_cnt, 1);
   63|  16.0k|    ref->free_ref = free_ref;
   64|  16.0k|    ref->free_callback = free_callback;
   65|  16.0k|    ref->user_data = user_data;
   66|  16.0k|    return ref;
   67|  16.0k|}
data.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|}
decode.c:dav1d_ref_inc:
   69|  89.7k|static inline void dav1d_ref_inc(Dav1dRef *const ref) {
   70|       |    atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
   71|  89.7k|}

dav1d_refmvs_find:
  354|   309k|{
  355|   309k|    const refmvs_frame *const rf = rt->rf;
  356|   309k|    const uint8_t *const b_dim = dav1d_block_dimensions[bs];
  357|   309k|    const int bw4 = b_dim[0], w4 = imin(imin(bw4, 16), rt->tile_col.end - bx4);
  358|   309k|    const int bh4 = b_dim[1], h4 = imin(imin(bh4, 16), rt->tile_row.end - by4);
  359|   309k|    mv gmv[2], tgmv[2];
  360|       |
  361|   309k|    *cnt = 0;
  362|   309k|    assert(ref.ref[0] >=  0 && ref.ref[0] <= 8 &&
  ------------------
  |  |  140|  1.85M|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 309k, False: 0]
  |  |  |  Branch (140:30): [True: 309k, False: 0]
  |  |  |  Branch (140:30): [True: 309k, False: 0]
  |  |  |  Branch (140:30): [True: 309k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 309k]
  |  |  ------------------
  ------------------
  363|   309k|           ref.ref[1] >= -1 && ref.ref[1] <= 8);
  364|   309k|    if (ref.ref[0] > 0) {
  ------------------
  |  Branch (364:9): [True: 104k, False: 204k]
  ------------------
  365|   104k|        tgmv[0] = get_gmv_2d(&rf->frm_hdr->gmv[ref.ref[0] - 1],
  366|   104k|                             bx4, by4, bw4, bh4, rf->frm_hdr);
  367|   104k|        gmv[0] = rf->frm_hdr->gmv[ref.ref[0] - 1].type > DAV1D_WM_TYPE_TRANSLATION ?
  ------------------
  |  Branch (367:18): [True: 26.5k, False: 77.9k]
  ------------------
  368|  77.9k|                 tgmv[0] : (mv) { .n = INVALID_MV };
  ------------------
  |  |   40|  77.9k|#define INVALID_MV 0x80008000
  ------------------
  369|   204k|    } else {
  370|   204k|        tgmv[0] = (mv) { .n = 0 };
  371|   204k|        gmv[0] = (mv) { .n = INVALID_MV };
  ------------------
  |  |   40|   204k|#define INVALID_MV 0x80008000
  ------------------
  372|   204k|    }
  373|   309k|    if (ref.ref[1] > 0) {
  ------------------
  |  Branch (373:9): [True: 19.8k, False: 289k]
  ------------------
  374|  19.8k|        tgmv[1] = get_gmv_2d(&rf->frm_hdr->gmv[ref.ref[1] - 1],
  375|  19.8k|                             bx4, by4, bw4, bh4, rf->frm_hdr);
  376|  19.8k|        gmv[1] = rf->frm_hdr->gmv[ref.ref[1] - 1].type > DAV1D_WM_TYPE_TRANSLATION ?
  ------------------
  |  Branch (376:18): [True: 5.45k, False: 14.3k]
  ------------------
  377|  14.3k|                 tgmv[1] : (mv) { .n = INVALID_MV };
  ------------------
  |  |   40|  14.3k|#define INVALID_MV 0x80008000
  ------------------
  378|  19.8k|    }
  379|       |
  380|       |    // top
  381|   309k|    int have_newmv = 0, have_col_mvs = 0, have_row_mvs = 0;
  382|   309k|    unsigned max_rows = 0, n_rows = ~0;
  383|   309k|    const refmvs_block *b_top;
  384|   309k|    if (by4 > rt->tile_row.start) {
  ------------------
  |  Branch (384:9): [True: 209k, False: 99.1k]
  ------------------
  385|   209k|        max_rows = imin((by4 - rt->tile_row.start + 1) >> 1, 2 + (bh4 > 1));
  386|   209k|        b_top = &rt->r[(by4 & 31) - 1 + 5][bx4];
  387|   209k|        n_rows = scan_row(mvstack, cnt, ref, gmv, b_top,
  388|   209k|                          bw4, w4, max_rows, bw4 >= 16 ? 4 : 1,
  ------------------
  |  Branch (388:46): [True: 4.96k, False: 204k]
  ------------------
  389|   209k|                          &have_newmv, &have_row_mvs);
  390|   209k|    }
  391|       |
  392|       |    // left
  393|   309k|    unsigned max_cols = 0, n_cols = ~0U;
  394|   309k|    refmvs_block *const *b_left;
  395|   309k|    if (bx4 > rt->tile_col.start) {
  ------------------
  |  Branch (395:9): [True: 288k, False: 20.6k]
  ------------------
  396|   288k|        max_cols = imin((bx4 - rt->tile_col.start + 1) >> 1, 2 + (bw4 > 1));
  397|   288k|        b_left = &rt->r[(by4 & 31) + 5];
  398|   288k|        n_cols = scan_col(mvstack, cnt, ref, gmv, b_left,
  399|   288k|                          bh4, h4, bx4 - 1, max_cols, bh4 >= 16 ? 4 : 1,
  ------------------
  |  Branch (399:55): [True: 16.7k, False: 271k]
  ------------------
  400|   288k|                          &have_newmv, &have_col_mvs);
  401|   288k|    }
  402|       |
  403|       |    // top/right
  404|   309k|    if (n_rows != ~0U && edge_flags & EDGE_I444_TOP_HAS_RIGHT &&
  ------------------
  |  Branch (404:9): [True: 209k, False: 99.1k]
  |  Branch (404:26): [True: 122k, False: 87.4k]
  ------------------
  405|   122k|        imax(bw4, bh4) <= 16 && bw4 + bx4 < rt->tile_col.end)
  ------------------
  |  Branch (405:9): [True: 121k, False: 1.28k]
  |  Branch (405:33): [True: 104k, False: 16.1k]
  ------------------
  406|   104k|    {
  407|   104k|        add_spatial_candidate(mvstack, cnt, 4, &b_top[bw4], ref, gmv,
  408|   104k|                              &have_newmv, &have_row_mvs);
  409|   104k|    }
  410|       |
  411|   309k|    const int nearest_match = have_col_mvs + have_row_mvs;
  412|   309k|    const int nearest_cnt = *cnt;
  413|   732k|    for (int n = 0; n < nearest_cnt; n++)
  ------------------
  |  Branch (413:21): [True: 423k, False: 309k]
  ------------------
  414|   423k|        mvstack[n].weight += 640;
  415|       |
  416|       |    // temporal
  417|   309k|    int globalmv_ctx = rf->frm_hdr->use_ref_frame_mvs;
  418|   309k|    if (rf->use_ref_frame_mvs) {
  ------------------
  |  Branch (418:9): [True: 6.84k, False: 302k]
  ------------------
  419|  6.84k|        const ptrdiff_t stride = rf->rp_stride;
  420|  6.84k|        const int by8 = by4 >> 1, bx8 = bx4 >> 1;
  421|  6.84k|        const refmvs_temporal_block *const rbi = &rt->rp_proj[(by8 & 15) * stride + bx8];
  422|  6.84k|        const refmvs_temporal_block *rb = rbi;
  423|  6.84k|        const int step_h = bw4 >= 16 ? 2 : 1, step_v = bh4 >= 16 ? 2 : 1;
  ------------------
  |  Branch (423:28): [True: 218, False: 6.62k]
  |  Branch (423:56): [True: 365, False: 6.47k]
  ------------------
  424|  6.84k|        const int w8 = imin((w4 + 1) >> 1, 8), h8 = imin((h4 + 1) >> 1, 8);
  425|  18.9k|        for (int y = 0; y < h8; y += step_v) {
  ------------------
  |  Branch (425:25): [True: 12.1k, False: 6.84k]
  ------------------
  426|  32.9k|            for (int x = 0; x < w8; x+= step_h) {
  ------------------
  |  Branch (426:29): [True: 20.8k, False: 12.1k]
  ------------------
  427|  20.8k|                add_temporal_candidate(rf, mvstack, cnt, &rb[x], ref,
  428|  20.8k|                                       !(x | y) ? &globalmv_ctx : NULL, tgmv);
  ------------------
  |  Branch (428:40): [True: 6.84k, False: 13.9k]
  ------------------
  429|  20.8k|            }
  430|  12.1k|            rb += stride * step_v;
  431|  12.1k|        }
  432|  6.84k|        if (imin(bw4, bh4) >= 2 && imax(bw4, bh4) < 16) {
  ------------------
  |  Branch (432:13): [True: 4.57k, False: 2.26k]
  |  Branch (432:36): [True: 4.12k, False: 454]
  ------------------
  433|  4.12k|            const int bh8 = bh4 >> 1, bw8 = bw4 >> 1;
  434|  4.12k|            rb = &rbi[bh8 * stride];
  435|  4.12k|            const int has_bottom = by8 + bh8 < imin(rt->tile_row.end >> 1,
  436|  4.12k|                                                    (by8 & ~7) + 8);
  437|  4.12k|            if (has_bottom && bx8 - 1 >= imax(rt->tile_col.start >> 1, bx8 & ~7)) {
  ------------------
  |  Branch (437:17): [True: 2.69k, False: 1.43k]
  |  Branch (437:31): [True: 2.02k, False: 668]
  ------------------
  438|  2.02k|                add_temporal_candidate(rf, mvstack, cnt, &rb[-1], ref,
  439|  2.02k|                                       NULL, NULL);
  440|  2.02k|            }
  441|  4.12k|            if (bx8 + bw8 < imin(rt->tile_col.end >> 1, (bx8 & ~7) + 8)) {
  ------------------
  |  Branch (441:17): [True: 3.03k, False: 1.08k]
  ------------------
  442|  3.03k|                if (has_bottom) {
  ------------------
  |  Branch (442:21): [True: 1.99k, False: 1.04k]
  ------------------
  443|  1.99k|                    add_temporal_candidate(rf, mvstack, cnt, &rb[bw8], ref,
  444|  1.99k|                                           NULL, NULL);
  445|  1.99k|                }
  446|  3.03k|                if (by8 + bh8 - 1 < imin(rt->tile_row.end >> 1, (by8 & ~7) + 8)) {
  ------------------
  |  Branch (446:21): [True: 2.98k, False: 52]
  ------------------
  447|  2.98k|                    add_temporal_candidate(rf, mvstack, cnt, &rb[bw8 - stride],
  448|  2.98k|                                           ref, NULL, NULL);
  449|  2.98k|                }
  450|  3.03k|            }
  451|  4.12k|        }
  452|  6.84k|    }
  453|   309k|    assert(*cnt <= 8);
  ------------------
  |  |  140|   309k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 309k]
  |  |  |  Branch (140:68): [Folded, False: 309k]
  |  |  ------------------
  ------------------
  454|       |
  455|       |    // top/left (which, confusingly, is part of "secondary" references)
  456|   309k|    int have_dummy_newmv_match;
  457|   309k|    if ((n_rows | n_cols) != ~0U) {
  ------------------
  |  Branch (457:9): [True: 192k, False: 116k]
  ------------------
  458|   192k|        add_spatial_candidate(mvstack, cnt, 4, &b_top[-1], ref, gmv,
  459|   192k|                              &have_dummy_newmv_match, &have_row_mvs);
  460|   192k|    }
  461|       |
  462|       |    // "secondary" (non-direct neighbour) top & left edges
  463|       |    // what is different about secondary is that everything is now in 8x8 resolution
  464|   927k|    for (int n = 2; n <= 3; n++) {
  ------------------
  |  Branch (464:21): [True: 618k, False: 309k]
  ------------------
  465|   618k|        if ((unsigned) n > n_rows && (unsigned) n <= max_rows) {
  ------------------
  |  Branch (465:13): [True: 346k, False: 271k]
  |  Branch (465:38): [True: 170k, False: 176k]
  ------------------
  466|   170k|            n_rows += scan_row(mvstack, cnt, ref, gmv,
  467|   170k|                               &rt->r[(((by4 & 31) - 2 * n + 1) | 1) + 5][bx4 | 1],
  468|   170k|                               bw4, w4, 1 + max_rows - n, bw4 >= 16 ? 4 : 2,
  ------------------
  |  Branch (468:59): [True: 1.82k, False: 168k]
  ------------------
  469|   170k|                               &have_dummy_newmv_match, &have_row_mvs);
  470|   170k|        }
  471|       |
  472|   618k|        if ((unsigned) n > n_cols && (unsigned) n <= max_cols) {
  ------------------
  |  Branch (472:13): [True: 487k, False: 130k]
  |  Branch (472:38): [True: 316k, False: 170k]
  ------------------
  473|   316k|            n_cols += scan_col(mvstack, cnt, ref, gmv, &rt->r[((by4 & 31) | 1) + 5],
  474|   316k|                               bh4, h4, (bx4 - n * 2 + 1) | 1,
  475|   316k|                               1 + max_cols - n, bh4 >= 16 ? 4 : 2,
  ------------------
  |  Branch (475:50): [True: 13.4k, False: 303k]
  ------------------
  476|   316k|                               &have_dummy_newmv_match, &have_col_mvs);
  477|   316k|        }
  478|   618k|    }
  479|   309k|    assert(*cnt <= 8);
  ------------------
  |  |  140|   309k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 309k]
  |  |  |  Branch (140:68): [Folded, False: 309k]
  |  |  ------------------
  ------------------
  480|       |
  481|   309k|    const int ref_match_count = have_col_mvs + have_row_mvs;
  482|       |
  483|       |    // context build-up
  484|   309k|    int refmv_ctx, newmv_ctx;
  485|   309k|    switch (nearest_match) {
  ------------------
  |  Branch (485:13): [True: 309k, False: 0]
  ------------------
  486|  40.7k|    case 0:
  ------------------
  |  Branch (486:5): [True: 40.7k, False: 268k]
  ------------------
  487|  40.7k|        refmv_ctx = imin(2, ref_match_count);
  488|  40.7k|        newmv_ctx = ref_match_count > 0;
  489|  40.7k|        break;
  490|   139k|    case 1:
  ------------------
  |  Branch (490:5): [True: 139k, False: 169k]
  ------------------
  491|   139k|        refmv_ctx = imin(ref_match_count * 3, 4);
  492|   139k|        newmv_ctx = 3 - have_newmv;
  493|   139k|        break;
  494|   128k|    case 2:
  ------------------
  |  Branch (494:5): [True: 128k, False: 180k]
  ------------------
  495|   128k|        refmv_ctx = 5;
  496|   128k|        newmv_ctx = 5 - have_newmv;
  497|   128k|        break;
  498|   309k|    }
  499|       |
  500|       |    // sorting (nearest, then "secondary")
  501|   309k|    int len = nearest_cnt;
  502|   661k|    while (len) {
  ------------------
  |  Branch (502:12): [True: 352k, False: 309k]
  ------------------
  503|   352k|        int last = 0;
  504|   545k|        for (int n = 1; n < len; n++) {
  ------------------
  |  Branch (504:25): [True: 192k, False: 352k]
  ------------------
  505|   192k|            if (mvstack[n - 1].weight < mvstack[n].weight) {
  ------------------
  |  Branch (505:17): [True: 89.8k, False: 102k]
  ------------------
  506|  89.8k|#define EXCHANGE(a, b) do { refmvs_candidate tmp = a; a = b; b = tmp; } while (0)
  507|  89.8k|                EXCHANGE(mvstack[n - 1], mvstack[n]);
  ------------------
  |  |  506|  89.8k|#define EXCHANGE(a, b) do { refmvs_candidate tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (506:80): [Folded, False: 89.8k]
  |  |  ------------------
  ------------------
  508|  89.8k|                last = n;
  509|  89.8k|            }
  510|   192k|        }
  511|   352k|        len = last;
  512|   352k|    }
  513|   309k|    len = *cnt;
  514|   523k|    while (len > nearest_cnt) {
  ------------------
  |  Branch (514:12): [True: 213k, False: 309k]
  ------------------
  515|   213k|        int last = nearest_cnt;
  516|   325k|        for (int n = nearest_cnt + 1; n < len; n++) {
  ------------------
  |  Branch (516:39): [True: 111k, False: 213k]
  ------------------
  517|   111k|            if (mvstack[n - 1].weight < mvstack[n].weight) {
  ------------------
  |  Branch (517:17): [True: 13.5k, False: 98.3k]
  ------------------
  518|  13.5k|                EXCHANGE(mvstack[n - 1], mvstack[n]);
  ------------------
  |  |  506|  13.5k|#define EXCHANGE(a, b) do { refmvs_candidate tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (506:80): [Folded, False: 13.5k]
  |  |  ------------------
  ------------------
  519|  13.5k|#undef EXCHANGE
  520|  13.5k|                last = n;
  521|  13.5k|            }
  522|   111k|        }
  523|   213k|        len = last;
  524|   213k|    }
  525|       |
  526|   309k|    if (ref.ref[1] > 0) {
  ------------------
  |  Branch (526:9): [True: 19.8k, False: 289k]
  ------------------
  527|  19.8k|        if (*cnt < 2) {
  ------------------
  |  Branch (527:13): [True: 13.6k, False: 6.13k]
  ------------------
  528|  13.6k|            const int sign0 = rf->sign_bias[ref.ref[0] - 1];
  529|  13.6k|            const int sign1 = rf->sign_bias[ref.ref[1] - 1];
  530|  13.6k|            const int sz4 = imin(w4, h4);
  531|  13.6k|            refmvs_candidate *const same = &mvstack[*cnt];
  532|  13.6k|            int same_count[4] = { 0 };
  533|       |
  534|       |            // non-self references in top
  535|  24.1k|            if (n_rows != ~0U) for (int x = 0; x < sz4;) {
  ------------------
  |  Branch (535:17): [True: 11.5k, False: 2.16k]
  |  Branch (535:48): [True: 12.5k, False: 11.5k]
  ------------------
  536|  12.5k|                const refmvs_block *const cand_b = &b_top[x];
  537|  12.5k|                add_compound_extended_candidate(same, same_count, cand_b,
  538|  12.5k|                                                sign0, sign1, ref, rf->sign_bias);
  539|  12.5k|                x += dav1d_block_dimensions[cand_b->bs][0];
  540|  12.5k|            }
  541|       |
  542|       |            // non-self references in left
  543|  25.8k|            if (n_cols != ~0U) for (int y = 0; y < sz4;) {
  ------------------
  |  Branch (543:17): [True: 12.1k, False: 1.54k]
  |  Branch (543:48): [True: 13.6k, False: 12.1k]
  ------------------
  544|  13.6k|                const refmvs_block *const cand_b = &b_left[y][bx4 - 1];
  545|  13.6k|                add_compound_extended_candidate(same, same_count, cand_b,
  546|  13.6k|                                                sign0, sign1, ref, rf->sign_bias);
  547|  13.6k|                y += dav1d_block_dimensions[cand_b->bs][1];
  548|  13.6k|            }
  549|       |
  550|  13.6k|            refmvs_candidate *const diff = &same[2];
  551|  13.6k|            const int *const diff_count = &same_count[2];
  552|       |
  553|       |            // merge together
  554|  41.0k|            for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (554:29): [True: 27.3k, False: 13.6k]
  ------------------
  555|  27.3k|                int m = same_count[n];
  556|       |
  557|  27.3k|                if (m >= 2) continue;
  ------------------
  |  Branch (557:21): [True: 7.42k, False: 19.9k]
  ------------------
  558|       |
  559|  19.9k|                const int l = diff_count[n];
  560|  19.9k|                if (l) {
  ------------------
  |  Branch (560:21): [True: 18.0k, False: 1.89k]
  ------------------
  561|  18.0k|                    same[m].mv.mv[n] = diff[0].mv.mv[n];
  562|  18.0k|                    if (++m == 2) continue;
  ------------------
  |  Branch (562:25): [True: 11.6k, False: 6.36k]
  ------------------
  563|  6.36k|                    if (l == 2) {
  ------------------
  |  Branch (563:25): [True: 5.21k, False: 1.14k]
  ------------------
  564|  5.21k|                        same[1].mv.mv[n] = diff[1].mv.mv[n];
  565|  5.21k|                        continue;
  566|  5.21k|                    }
  567|  6.36k|                }
  568|  4.21k|                do {
  569|  4.21k|                    same[m].mv.mv[n] = tgmv[n];
  570|  4.21k|                } while (++m < 2);
  ------------------
  |  Branch (570:26): [True: 1.16k, False: 3.04k]
  ------------------
  571|  3.04k|            }
  572|       |
  573|       |            // if the first extended was the same as the non-extended one,
  574|       |            // then replace it with the second extended one
  575|  13.6k|            int n = *cnt;
  576|  13.6k|            if (n == 1 && mvstack[0].mv.n == same[0].mv.n)
  ------------------
  |  Branch (576:17): [True: 7.35k, False: 6.33k]
  |  Branch (576:27): [True: 5.11k, False: 2.24k]
  ------------------
  577|  5.11k|                mvstack[1].mv = mvstack[2].mv;
  578|  20.0k|            do {
  579|  20.0k|                mvstack[n].weight = 2;
  580|  20.0k|            } while (++n < 2);
  ------------------
  |  Branch (580:22): [True: 6.33k, False: 13.6k]
  ------------------
  581|  13.6k|            *cnt = 2;
  582|  13.6k|        }
  583|       |
  584|       |        // clamping
  585|  19.8k|        const int left = -(bx4 + bw4 + 4) * 4 * 8;
  586|  19.8k|        const int right = (rf->iw4 - bx4 + 4) * 4 * 8;
  587|  19.8k|        const int top = -(by4 + bh4 + 4) * 4 * 8;
  588|  19.8k|        const int bottom = (rf->ih4 - by4 + 4) * 4 * 8;
  589|       |
  590|  19.8k|        const int n_refmvs = *cnt;
  591|  19.8k|        int n = 0;
  592|  43.5k|        do {
  593|  43.5k|            mvstack[n].mv.mv[0].x = iclip(mvstack[n].mv.mv[0].x, left, right);
  594|  43.5k|            mvstack[n].mv.mv[0].y = iclip(mvstack[n].mv.mv[0].y, top, bottom);
  595|  43.5k|            mvstack[n].mv.mv[1].x = iclip(mvstack[n].mv.mv[1].x, left, right);
  596|  43.5k|            mvstack[n].mv.mv[1].y = iclip(mvstack[n].mv.mv[1].y, top, bottom);
  597|  43.5k|        } while (++n < n_refmvs);
  ------------------
  |  Branch (597:18): [True: 23.7k, False: 19.8k]
  ------------------
  598|       |
  599|  19.8k|        switch (refmv_ctx >> 1) {
  ------------------
  |  Branch (599:17): [True: 19.8k, False: 0]
  ------------------
  600|  7.58k|        case 0:
  ------------------
  |  Branch (600:9): [True: 7.58k, False: 12.2k]
  ------------------
  601|  7.58k|            *ctx = imin(newmv_ctx, 1);
  602|  7.58k|            break;
  603|  7.24k|        case 1:
  ------------------
  |  Branch (603:9): [True: 7.24k, False: 12.5k]
  ------------------
  604|  7.24k|            *ctx = 1 + imin(newmv_ctx, 3);
  605|  7.24k|            break;
  606|  4.99k|        case 2:
  ------------------
  |  Branch (606:9): [True: 4.99k, False: 14.8k]
  ------------------
  607|  4.99k|            *ctx = iclip(3 + newmv_ctx, 4, 7);
  608|  4.99k|            break;
  609|  19.8k|        }
  610|       |
  611|  19.8k|        return;
  612|   289k|    } else if (*cnt < 2 && ref.ref[0] > 0) {
  ------------------
  |  Branch (612:16): [True: 85.7k, False: 203k]
  |  Branch (612:28): [True: 51.8k, False: 33.8k]
  ------------------
  613|  51.8k|        const int sign = rf->sign_bias[ref.ref[0] - 1];
  614|  51.8k|        const int sz4 = imin(w4, h4);
  615|       |
  616|       |        // non-self references in top
  617|  84.6k|        if (n_rows != ~0U) for (int x = 0; x < sz4 && *cnt < 2;) {
  ------------------
  |  Branch (617:13): [True: 41.4k, False: 10.4k]
  |  Branch (617:44): [True: 43.5k, False: 41.0k]
  |  Branch (617:55): [True: 43.2k, False: 317]
  ------------------
  618|  43.2k|            const refmvs_block *const cand_b = &b_top[x];
  619|  43.2k|            add_single_extended_candidate(mvstack, cnt, cand_b, sign, rf->sign_bias);
  620|  43.2k|            x += dav1d_block_dimensions[cand_b->bs][0];
  621|  43.2k|        }
  622|       |
  623|       |        // non-self references in left
  624|  85.0k|        if (n_cols != ~0U) for (int y = 0; y < sz4 && *cnt < 2;) {
  ------------------
  |  Branch (624:13): [True: 44.3k, False: 7.55k]
  |  Branch (624:44): [True: 47.0k, False: 37.9k]
  |  Branch (624:55): [True: 40.7k, False: 6.35k]
  ------------------
  625|  40.7k|            const refmvs_block *const cand_b = &b_left[y][bx4 - 1];
  626|  40.7k|            add_single_extended_candidate(mvstack, cnt, cand_b, sign, rf->sign_bias);
  627|  40.7k|            y += dav1d_block_dimensions[cand_b->bs][1];
  628|  40.7k|        }
  629|  51.8k|    }
  630|   289k|    assert(*cnt <= 8);
  ------------------
  |  |  140|   289k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 289k]
  |  |  |  Branch (140:68): [Folded, False: 289k]
  |  |  ------------------
  ------------------
  631|       |
  632|       |    // clamping
  633|   289k|    int n_refmvs = *cnt;
  634|   289k|    if (n_refmvs) {
  ------------------
  |  Branch (634:9): [True: 271k, False: 17.3k]
  ------------------
  635|   271k|        const int left = -(bx4 + bw4 + 4) * 4 * 8;
  636|   271k|        const int right = (rf->iw4 - bx4 + 4) * 4 * 8;
  637|   271k|        const int top = -(by4 + bh4 + 4) * 4 * 8;
  638|   271k|        const int bottom = (rf->ih4 - by4 + 4) * 4 * 8;
  639|       |
  640|   271k|        int n = 0;
  641|   730k|        do {
  642|   730k|            mvstack[n].mv.mv[0].x = iclip(mvstack[n].mv.mv[0].x, left, right);
  643|   730k|            mvstack[n].mv.mv[0].y = iclip(mvstack[n].mv.mv[0].y, top, bottom);
  644|   730k|        } while (++n < n_refmvs);
  ------------------
  |  Branch (644:18): [True: 458k, False: 271k]
  ------------------
  645|   271k|    }
  646|       |
  647|   379k|    for (int n = *cnt; n < 2; n++)
  ------------------
  |  Branch (647:24): [True: 90.1k, False: 289k]
  ------------------
  648|  90.1k|        mvstack[n].mv.mv[0] = tgmv[0];
  649|       |
  650|   289k|    *ctx = (refmv_ctx << 4) | (globalmv_ctx << 3) | newmv_ctx;
  651|   289k|}
dav1d_refmvs_tile_sbrow_init:
  657|  23.8k|{
  658|  23.8k|    if (rf->n_tile_threads == 1) tile_row_idx = 0;
  ------------------
  |  Branch (658:9): [True: 23.8k, False: 0]
  ------------------
  659|  23.8k|    rt->rp_proj = &rf->rp_proj[16 * rf->rp_stride * tile_row_idx];
  660|  23.8k|    const ptrdiff_t r_stride = rf->rp_stride * 2;
  661|  23.8k|    const ptrdiff_t pass_off = (rf->n_frame_threads > 1 && pass == 2) ?
  ------------------
  |  Branch (661:33): [True: 0, False: 23.8k]
  |  Branch (661:60): [True: 0, False: 0]
  ------------------
  662|  23.8k|        35 * 2 * rf->n_blocks : 0;
  663|  23.8k|    refmvs_block *r = &rf->r[35 * r_stride * tile_row_idx + pass_off];
  664|  23.8k|    const int sbsz = rf->sbsz;
  665|  23.8k|    const int off = (sbsz * sby) & 16;
  666|   560k|    for (int i = 0; i < sbsz; i++, r += r_stride)
  ------------------
  |  Branch (666:21): [True: 536k, False: 23.8k]
  ------------------
  667|   536k|        rt->r[off + 5 + i] = r;
  668|  23.8k|    rt->r[off + 0] = r;
  669|  23.8k|    r += r_stride;
  670|  23.8k|    rt->r[off + 1] = NULL;
  671|  23.8k|    rt->r[off + 2] = r;
  672|  23.8k|    r += r_stride;
  673|  23.8k|    rt->r[off + 3] = NULL;
  674|  23.8k|    rt->r[off + 4] = r;
  675|  23.8k|    if (sby & 1) {
  ------------------
  |  Branch (675:9): [True: 9.01k, False: 14.8k]
  ------------------
  676|  9.01k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  677|  9.01k|        EXCHANGE(rt->r[off + 0], rt->r[off + sbsz + 0]);
  ------------------
  |  |  676|  9.01k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (676:75): [Folded, False: 9.01k]
  |  |  ------------------
  ------------------
  678|  9.01k|        EXCHANGE(rt->r[off + 2], rt->r[off + sbsz + 2]);
  ------------------
  |  |  676|  9.01k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (676:75): [Folded, False: 9.01k]
  |  |  ------------------
  ------------------
  679|  9.01k|        EXCHANGE(rt->r[off + 4], rt->r[off + sbsz + 4]);
  ------------------
  |  |  676|  9.01k|#define EXCHANGE(a, b) do { void *const tmp = a; a = b; b = tmp; } while (0)
  |  |  ------------------
  |  |  |  Branch (676:75): [Folded, False: 9.01k]
  |  |  ------------------
  ------------------
  680|  9.01k|#undef EXCHANGE
  681|  9.01k|    }
  682|       |
  683|  23.8k|    rt->rf = rf;
  684|  23.8k|    rt->tile_row.start = tile_row_start4;
  685|  23.8k|    rt->tile_row.end = imin(tile_row_end4, rf->ih4);
  686|  23.8k|    rt->tile_col.start = tile_col_start4;
  687|  23.8k|    rt->tile_col.end = imin(tile_col_end4, rf->iw4);
  688|  23.8k|}
dav1d_refmvs_init_frame:
  812|  6.63k|{
  813|  6.63k|    const int rp_stride = ((frm_hdr->width[0] + 127) & ~127) >> 3;
  814|  6.63k|    const int n_tile_rows = n_tile_threads > 1 ? frm_hdr->tiling.rows : 1;
  ------------------
  |  Branch (814:29): [True: 0, False: 6.63k]
  ------------------
  815|  6.63k|    const int n_blocks = rp_stride * n_tile_rows;
  816|       |
  817|  6.63k|    rf->sbsz = 16 << seq_hdr->sb128;
  818|  6.63k|    rf->frm_hdr = frm_hdr;
  819|  6.63k|    rf->iw8 = (frm_hdr->width[0] + 7) >> 3;
  820|  6.63k|    rf->ih8 = (frm_hdr->height + 7) >> 3;
  821|  6.63k|    rf->iw4 = rf->iw8 << 1;
  822|  6.63k|    rf->ih4 = rf->ih8 << 1;
  823|  6.63k|    rf->rp = rp;
  824|  6.63k|    rf->rp_stride = rp_stride;
  825|  6.63k|    rf->n_tile_threads = n_tile_threads;
  826|  6.63k|    rf->n_frame_threads = n_frame_threads;
  827|       |
  828|  6.63k|    if (n_blocks != rf->n_blocks) {
  ------------------
  |  Branch (828:9): [True: 5.22k, False: 1.41k]
  ------------------
  829|  5.22k|        const size_t r_sz = sizeof(*rf->r) * 35 * 2 * n_blocks * (1 + (n_frame_threads > 1));
  830|  5.22k|        const size_t rp_proj_sz = sizeof(*rf->rp_proj) * 16 * n_blocks;
  831|       |        /* Note that sizeof(*rf->r) == 12, but it's accessed using 16-byte unaligned
  832|       |         * loads in save_tmvs() asm which can overread 4 bytes into rp_proj. */
  833|  5.22k|        dav1d_free_aligned(rf->r);
  ------------------
  |  |  136|  5.22k|#define dav1d_free_aligned(ptr) dav1d_free_aligned_internal(ptr)
  ------------------
  834|  5.22k|        rf->r = dav1d_alloc_aligned(ALLOC_REFMVS, r_sz + rp_proj_sz, 64);
  ------------------
  |  |  134|  5.22k|#define dav1d_alloc_aligned(type, sz, align) dav1d_alloc_aligned_internal(sz, align)
  ------------------
  835|  5.22k|        if (!rf->r) {
  ------------------
  |  Branch (835:13): [True: 0, False: 5.22k]
  ------------------
  836|      0|            rf->n_blocks = 0;
  837|      0|            return DAV1D_ERR(ENOMEM);
  ------------------
  |  |   58|      0|#define DAV1D_ERR(e) (-(e)) ///< Negate POSIX error code.
  ------------------
  838|      0|        }
  839|       |
  840|  5.22k|        rf->rp_proj = (refmvs_temporal_block*)((uintptr_t)rf->r + r_sz);
  841|  5.22k|        rf->n_blocks = n_blocks;
  842|  5.22k|    }
  843|       |
  844|  6.63k|    const int poc = frm_hdr->frame_offset;
  845|  53.0k|    for (int i = 0; i < 7; i++) {
  ------------------
  |  Branch (845:21): [True: 46.4k, False: 6.63k]
  ------------------
  846|  46.4k|        const int poc_diff = get_poc_diff(seq_hdr->order_hint_n_bits,
  847|  46.4k|                                          ref_poc[i], poc);
  848|  46.4k|        rf->sign_bias[i] = poc_diff > 0;
  849|  46.4k|        rf->mfmv_sign[i] = poc_diff < 0;
  850|  46.4k|        rf->pocdiff[i] = iclip(get_poc_diff(seq_hdr->order_hint_n_bits,
  851|  46.4k|                                            poc, ref_poc[i]), -31, 31);
  852|  46.4k|    }
  853|       |
  854|       |    // temporal MV setup
  855|  6.63k|    rf->n_mfmvs = 0;
  856|  6.63k|    rf->rp_ref = rp_ref;
  857|  6.63k|    if (frm_hdr->use_ref_frame_mvs && seq_hdr->order_hint_n_bits) {
  ------------------
  |  Branch (857:9): [True: 1.64k, False: 4.98k]
  |  Branch (857:39): [True: 1.64k, False: 0]
  ------------------
  858|  1.64k|        int total = 2;
  859|  1.64k|        if (rp_ref[0] && ref_ref_poc[0][6] != ref_poc[3] /* alt-of-last != gold */) {
  ------------------
  |  Branch (859:13): [True: 264, False: 1.38k]
  |  Branch (859:26): [True: 149, False: 115]
  ------------------
  860|    149|            rf->mfmv_ref[rf->n_mfmvs++] = 0; // last
  861|    149|            total = 3;
  862|    149|        }
  863|  1.64k|        if (rp_ref[4] && get_poc_diff(seq_hdr->order_hint_n_bits, ref_poc[4],
  ------------------
  |  Branch (863:13): [True: 229, False: 1.41k]
  |  Branch (863:26): [True: 99, False: 130]
  ------------------
  864|    229|                                      frm_hdr->frame_offset) > 0)
  865|     99|        {
  866|     99|            rf->mfmv_ref[rf->n_mfmvs++] = 4; // bwd
  867|     99|        }
  868|  1.64k|        if (rp_ref[5] && get_poc_diff(seq_hdr->order_hint_n_bits, ref_poc[5],
  ------------------
  |  Branch (868:13): [True: 245, False: 1.40k]
  |  Branch (868:26): [True: 97, False: 148]
  ------------------
  869|    245|                                      frm_hdr->frame_offset) > 0)
  870|     97|        {
  871|     97|            rf->mfmv_ref[rf->n_mfmvs++] = 5; // altref2
  872|     97|        }
  873|  1.64k|        if (rf->n_mfmvs < total && rp_ref[6] &&
  ------------------
  |  Branch (873:13): [True: 1.57k, False: 71]
  |  Branch (873:36): [True: 168, False: 1.40k]
  ------------------
  874|    168|            get_poc_diff(seq_hdr->order_hint_n_bits, ref_poc[6],
  ------------------
  |  Branch (874:13): [True: 60, False: 108]
  ------------------
  875|    168|                         frm_hdr->frame_offset) > 0)
  876|     60|        {
  877|     60|            rf->mfmv_ref[rf->n_mfmvs++] = 6; // altref
  878|     60|        }
  879|  1.64k|        if (rf->n_mfmvs < total && rp_ref[1])
  ------------------
  |  Branch (879:13): [True: 1.55k, False: 95]
  |  Branch (879:36): [True: 260, False: 1.29k]
  ------------------
  880|    260|            rf->mfmv_ref[rf->n_mfmvs++] = 1; // last2
  881|       |
  882|  2.31k|        for (int n = 0; n < rf->n_mfmvs; n++) {
  ------------------
  |  Branch (882:25): [True: 665, False: 1.64k]
  ------------------
  883|    665|            const int rpoc = ref_poc[rf->mfmv_ref[n]];
  884|    665|            const int diff1 = get_poc_diff(seq_hdr->order_hint_n_bits,
  885|    665|                                           rpoc, frm_hdr->frame_offset);
  886|    665|            if (abs(diff1) > 31) {
  ------------------
  |  Branch (886:17): [True: 77, False: 588]
  ------------------
  887|     77|                rf->mfmv_ref2cur[n] = INVALID_REF2CUR;
  ------------------
  |  |   41|     77|#define INVALID_REF2CUR (-32)
  ------------------
  888|    588|            } else {
  889|    588|                rf->mfmv_ref2cur[n] = rf->mfmv_ref[n] < 4 ? -diff1 : diff1;
  ------------------
  |  Branch (889:39): [True: 375, False: 213]
  ------------------
  890|  4.70k|                for (int m = 0; m < 7; m++) {
  ------------------
  |  Branch (890:33): [True: 4.11k, False: 588]
  ------------------
  891|  4.11k|                    const int rrpoc = ref_ref_poc[rf->mfmv_ref[n]][m];
  892|  4.11k|                    const int diff2 = get_poc_diff(seq_hdr->order_hint_n_bits,
  893|  4.11k|                                                   rpoc, rrpoc);
  894|       |                    // unsigned comparison also catches the < 0 case
  895|  4.11k|                    rf->mfmv_ref2ref[n][m] = (unsigned) diff2 > 31U ? 0 : diff2;
  ------------------
  |  Branch (895:46): [True: 1.22k, False: 2.89k]
  ------------------
  896|  4.11k|                }
  897|    588|            }
  898|    665|        }
  899|  1.64k|    }
  900|  6.63k|    rf->use_ref_frame_mvs = rf->n_mfmvs > 0;
  901|       |
  902|  6.63k|    return 0;
  903|  6.63k|}
dav1d_refmvs_dsp_init:
  926|  14.0k|{
  927|  14.0k|    c->load_tmvs = load_tmvs_c;
  928|  14.0k|    c->save_tmvs = save_tmvs_c;
  929|  14.0k|    c->splat_mv = splat_mv_c;
  930|       |
  931|  14.0k|#if HAVE_ASM
  932|       |#if ARCH_AARCH64 || ARCH_ARM
  933|       |    refmvs_dsp_init_arm(c);
  934|       |#elif ARCH_LOONGARCH64
  935|       |    refmvs_dsp_init_loongarch(c);
  936|       |#elif ARCH_X86
  937|       |    refmvs_dsp_init_x86(c);
  938|  14.0k|#endif
  939|  14.0k|#endif
  940|  14.0k|}
refmvs.c:scan_row:
  102|   380k|{
  103|   380k|    const refmvs_block *cand_b = b;
  104|   380k|    const enum BlockSize first_cand_bs = cand_b->bs;
  105|   380k|    const uint8_t *const first_cand_b_dim = dav1d_block_dimensions[first_cand_bs];
  106|   380k|    int cand_bw4 = first_cand_b_dim[0];
  107|   380k|    int len = imax(step, imin(bw4, cand_bw4));
  108|       |
  109|   380k|    if (bw4 <= cand_bw4) {
  ------------------
  |  Branch (109:9): [True: 338k, False: 41.7k]
  ------------------
  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|   338k|        const int weight = bw4 == 1 ? 2 :
  ------------------
  |  Branch (114:28): [True: 154k, False: 183k]
  ------------------
  115|   338k|                           imax(2, imin(2 * max_rows, first_cand_b_dim[1]));
  116|   338k|        add_spatial_candidate(mvstack, cnt, len * weight, cand_b, ref, gmv,
  117|   338k|                              have_newmv_match, have_refmv_match);
  118|   338k|        return weight >> 1;
  119|   338k|    }
  120|       |
  121|  80.0k|    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|  80.0k|        add_spatial_candidate(mvstack, cnt, len * 2, cand_b, ref, gmv,
  126|  80.0k|                              have_newmv_match, have_refmv_match);
  127|  80.0k|        x += len;
  128|  80.0k|        if (x >= w4) return 1;
  ------------------
  |  Branch (128:13): [True: 41.7k, False: 38.2k]
  ------------------
  129|  38.2k|        cand_b = &b[x];
  130|  38.2k|        cand_bw4 = dav1d_block_dimensions[cand_b->bs][0];
  131|  38.2k|        assert(cand_bw4 < bw4);
  ------------------
  |  |  140|  38.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 38.2k]
  |  |  |  Branch (140:68): [Folded, False: 38.2k]
  |  |  ------------------
  ------------------
  132|  38.2k|        len = imax(step, cand_bw4);
  133|  38.2k|    }
  134|  41.7k|}
refmvs.c:scan_col:
  141|   605k|{
  142|   605k|    const refmvs_block *cand_b = &b[0][bx4];
  143|   605k|    const enum BlockSize first_cand_bs = cand_b->bs;
  144|   605k|    const uint8_t *const first_cand_b_dim = dav1d_block_dimensions[first_cand_bs];
  145|   605k|    int cand_bh4 = first_cand_b_dim[1];
  146|   605k|    int len = imax(step, imin(bh4, cand_bh4));
  147|       |
  148|   605k|    if (bh4 <= cand_bh4) {
  ------------------
  |  Branch (148:9): [True: 550k, False: 54.8k]
  ------------------
  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|   550k|        const int weight = bh4 == 1 ? 2 :
  ------------------
  |  Branch (153:28): [True: 335k, False: 215k]
  ------------------
  154|   550k|                           imax(2, imin(2 * max_cols, first_cand_b_dim[0]));
  155|   550k|        add_spatial_candidate(mvstack, cnt, len * weight, cand_b, ref, gmv,
  156|   550k|                            have_newmv_match, have_refmv_match);
  157|   550k|        return weight >> 1;
  158|   550k|    }
  159|       |
  160|   105k|    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|   105k|        add_spatial_candidate(mvstack, cnt, len * 2, cand_b, ref, gmv,
  165|   105k|                              have_newmv_match, have_refmv_match);
  166|   105k|        y += len;
  167|   105k|        if (y >= h4) return 1;
  ------------------
  |  Branch (167:13): [True: 54.8k, False: 50.2k]
  ------------------
  168|  50.2k|        cand_b = &b[y][bx4];
  169|  50.2k|        cand_bh4 = dav1d_block_dimensions[cand_b->bs][1];
  170|  50.2k|        assert(cand_bh4 < bh4);
  ------------------
  |  |  140|  50.2k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 50.2k]
  |  |  |  Branch (140:68): [Folded, False: 50.2k]
  |  |  ------------------
  ------------------
  171|  50.2k|        len = imax(step, cand_bh4);
  172|  50.2k|    }
  173|  54.8k|}
refmvs.c:add_spatial_candidate:
   46|  1.37M|{
   47|  1.37M|    if (b->mv.mv[0].n == INVALID_MV) return; // intra block, no intrabc
  ------------------
  |  |   40|  1.37M|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (47:9): [True: 171k, False: 1.19M]
  ------------------
   48|       |
   49|  1.19M|    if (ref.ref[1] == -1) {
  ------------------
  |  Branch (49:9): [True: 1.08M, False: 112k]
  ------------------
   50|  1.37M|        for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (50:25): [True: 1.23M, False: 135k]
  ------------------
   51|  1.23M|            if (b->ref.ref[n] == ref.ref[0]) {
  ------------------
  |  Branch (51:17): [True: 950k, False: 288k]
  ------------------
   52|   950k|                const mv cand_mv = ((b->mf & 1) && gmv[0].n != INVALID_MV) ?
  ------------------
  |  |   40|  92.4k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (52:37): [True: 92.4k, False: 857k]
  |  Branch (52:52): [True: 16.4k, False: 76.0k]
  ------------------
   53|   933k|                                   gmv[0] : b->mv.mv[n];
   54|       |
   55|   950k|                *have_refmv_match = 1;
   56|   950k|                *have_newmv_match |= b->mf >> 1;
   57|       |
   58|   950k|                const int last = *cnt;
   59|  1.90M|                for (int m = 0; m < last; m++)
  ------------------
  |  Branch (59:33): [True: 1.19M, False: 708k]
  ------------------
   60|  1.19M|                    if (mvstack[m].mv.mv[0].n == cand_mv.n) {
  ------------------
  |  Branch (60:25): [True: 241k, False: 949k]
  ------------------
   61|   241k|                        mvstack[m].weight += weight;
   62|   241k|                        return;
   63|   241k|                    }
   64|       |
   65|   708k|                if (last < 8) {
  ------------------
  |  Branch (65:21): [True: 707k, False: 682]
  ------------------
   66|   707k|                    mvstack[last].mv.mv[0] = cand_mv;
   67|   707k|                    mvstack[last].weight = weight;
   68|   707k|                    *cnt = last + 1;
   69|   707k|                }
   70|   708k|                return;
   71|   950k|            }
   72|  1.23M|        }
   73|  1.08M|    } else if (b->ref.pair == ref.pair) {
  ------------------
  |  Branch (73:16): [True: 36.5k, False: 76.4k]
  ------------------
   74|  36.5k|        const refmvs_mvpair cand_mv = { .mv = {
   75|  36.5k|            [0] = ((b->mf & 1) && gmv[0].n != INVALID_MV) ? gmv[0] : b->mv.mv[0],
  ------------------
  |  |   40|  2.51k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (75:20): [True: 2.51k, False: 33.9k]
  |  Branch (75:35): [True: 1.05k, False: 1.46k]
  ------------------
   76|  36.5k|            [1] = ((b->mf & 1) && gmv[1].n != INVALID_MV) ? gmv[1] : b->mv.mv[1],
  ------------------
  |  |   40|  2.51k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (76:20): [True: 2.51k, False: 33.9k]
  |  Branch (76:35): [True: 803, False: 1.71k]
  ------------------
   77|  36.5k|        }};
   78|       |
   79|  36.5k|        *have_refmv_match = 1;
   80|  36.5k|        *have_newmv_match |= b->mf >> 1;
   81|       |
   82|  36.5k|        const int last = *cnt;
   83|  55.4k|        for (int n = 0; n < last; n++)
  ------------------
  |  Branch (83:25): [True: 32.8k, False: 22.6k]
  ------------------
   84|  32.8k|            if (mvstack[n].mv.n == cand_mv.n) {
  ------------------
  |  Branch (84:17): [True: 13.8k, False: 18.9k]
  ------------------
   85|  13.8k|                mvstack[n].weight += weight;
   86|  13.8k|                return;
   87|  13.8k|            }
   88|       |
   89|  22.6k|        if (last < 8) {
  ------------------
  |  Branch (89:13): [True: 22.6k, False: 10]
  ------------------
   90|  22.6k|            mvstack[last].mv = cand_mv;
   91|  22.6k|            mvstack[last].weight = weight;
   92|  22.6k|            *cnt = last + 1;
   93|  22.6k|        }
   94|  22.6k|    }
   95|  1.19M|}
refmvs.c:add_temporal_candidate:
  198|  27.8k|{
  199|  27.8k|    if (rb->mv.n == INVALID_MV) return;
  ------------------
  |  |   40|  27.8k|#define INVALID_MV 0x80008000
  ------------------
  |  Branch (199:9): [True: 11.7k, False: 16.0k]
  ------------------
  200|       |
  201|  16.0k|    union mv mv = mv_projection(rb->mv, rf->pocdiff[ref.ref[0] - 1], rb->ref);
  202|  16.0k|    fix_mv_precision(rf->frm_hdr, &mv);
  203|       |
  204|  16.0k|    const int last = *cnt;
  205|  16.0k|    if (ref.ref[1] == -1) {
  ------------------
  |  Branch (205:9): [True: 10.9k, False: 5.13k]
  ------------------
  206|  10.9k|        if (globalmv_ctx)
  ------------------
  |  Branch (206:13): [True: 3.10k, False: 7.81k]
  ------------------
  207|  3.10k|            *globalmv_ctx = (abs(mv.x - gmv[0].x) | abs(mv.y - gmv[0].y)) >= 16;
  208|       |
  209|  18.3k|        for (int n = 0; n < last; n++)
  ------------------
  |  Branch (209:25): [True: 16.1k, False: 2.23k]
  ------------------
  210|  16.1k|            if (mvstack[n].mv.mv[0].n == mv.n) {
  ------------------
  |  Branch (210:17): [True: 8.67k, False: 7.45k]
  ------------------
  211|  8.67k|                mvstack[n].weight += 2;
  212|  8.67k|                return;
  213|  8.67k|            }
  214|  2.23k|        if (last < 8) {
  ------------------
  |  Branch (214:13): [True: 2.23k, False: 0]
  ------------------
  215|  2.23k|            mvstack[last].mv.mv[0] = mv;
  216|  2.23k|            mvstack[last].weight = 2;
  217|  2.23k|            *cnt = last + 1;
  218|  2.23k|        }
  219|  5.13k|    } else {
  220|  5.13k|        refmvs_mvpair mvp = { .mv = {
  221|  5.13k|            [0] = mv,
  222|  5.13k|            [1] = mv_projection(rb->mv, rf->pocdiff[ref.ref[1] - 1], rb->ref),
  223|  5.13k|        }};
  224|  5.13k|        fix_mv_precision(rf->frm_hdr, &mvp.mv[1]);
  225|       |
  226|  7.46k|        for (int n = 0; n < last; n++)
  ------------------
  |  Branch (226:25): [True: 6.60k, False: 859]
  ------------------
  227|  6.60k|            if (mvstack[n].mv.n == mvp.n) {
  ------------------
  |  Branch (227:17): [True: 4.27k, False: 2.32k]
  ------------------
  228|  4.27k|                mvstack[n].weight += 2;
  229|  4.27k|                return;
  230|  4.27k|            }
  231|    859|        if (last < 8) {
  ------------------
  |  Branch (231:13): [True: 859, False: 0]
  ------------------
  232|    859|            mvstack[last].mv = mvp;
  233|    859|            mvstack[last].weight = 2;
  234|    859|            *cnt = last + 1;
  235|    859|        }
  236|    859|    }
  237|  16.0k|}
refmvs.c:mv_projection:
  175|  21.1k|static inline union mv mv_projection(const union mv mv, const int num, const int den) {
  176|  21.1k|    static const uint16_t div_mult[32] = {
  177|  21.1k|           0, 16384, 8192, 5461, 4096, 3276, 2730, 2340,
  178|  21.1k|        2048,  1820, 1638, 1489, 1365, 1260, 1170, 1092,
  179|  21.1k|        1024,   963,  910,  862,  819,  780,  744,  712,
  180|  21.1k|         682,   655,  630,  606,  585,  564,  546,  528
  181|  21.1k|    };
  182|  21.1k|    assert(den > 0 && den < 32);
  ------------------
  |  |  140|  42.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 21.1k, False: 0]
  |  |  |  Branch (140:30): [True: 21.1k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 21.1k]
  |  |  ------------------
  ------------------
  183|  21.1k|    assert(num > -32 && num < 32);
  ------------------
  |  |  140|  42.3k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:30): [True: 21.1k, False: 0]
  |  |  |  Branch (140:30): [True: 21.1k, False: 0]
  |  |  |  Branch (140:68): [Folded, False: 21.1k]
  |  |  ------------------
  ------------------
  184|  21.1k|    const int frac = num * div_mult[den];
  185|  21.1k|    const int y = mv.y * frac, x = mv.x * frac;
  186|       |    // Round and clip according to AV1 spec section 7.9.3
  187|  21.1k|    return (union mv) { // 0x3fff == (1 << 14) - 1
  188|  21.1k|        .y = iclip((y + 8192 + (y >> 31)) >> 14, -0x3fff, 0x3fff),
  189|  21.1k|        .x = iclip((x + 8192 + (x >> 31)) >> 14, -0x3fff, 0x3fff)
  190|  21.1k|    };
  191|  21.1k|}
refmvs.c:add_compound_extended_candidate:
  245|  26.2k|{
  246|  26.2k|    refmvs_candidate *const diff = &same[2];
  247|  26.2k|    int *const diff_count = &same_count[2];
  248|       |
  249|  67.8k|    for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (249:21): [True: 51.7k, False: 16.1k]
  ------------------
  250|  51.7k|        const int cand_ref = cand_b->ref.ref[n];
  251|       |
  252|  51.7k|        if (cand_ref <= 0) break;
  ------------------
  |  Branch (252:13): [True: 10.0k, False: 41.6k]
  ------------------
  253|       |
  254|  41.6k|        mv cand_mv = cand_b->mv.mv[n];
  255|  41.6k|        if (cand_ref == ref.ref[0]) {
  ------------------
  |  Branch (255:13): [True: 14.4k, False: 27.1k]
  ------------------
  256|  14.4k|            if (same_count[0] < 2)
  ------------------
  |  Branch (256:17): [True: 13.9k, False: 504]
  ------------------
  257|  13.9k|                same[same_count[0]++].mv.mv[0] = cand_mv;
  258|  14.4k|            if (diff_count[1] < 2) {
  ------------------
  |  Branch (258:17): [True: 12.0k, False: 2.39k]
  ------------------
  259|  12.0k|                if (sign1 ^ sign_bias[cand_ref - 1]) {
  ------------------
  |  Branch (259:21): [True: 226, False: 11.8k]
  ------------------
  260|    226|                    cand_mv.y = -cand_mv.y;
  261|    226|                    cand_mv.x = -cand_mv.x;
  262|    226|                }
  263|  12.0k|                diff[diff_count[1]++].mv.mv[1] = cand_mv;
  264|  12.0k|            }
  265|  27.1k|        } else if (cand_ref == ref.ref[1]) {
  ------------------
  |  Branch (265:20): [True: 13.7k, False: 13.4k]
  ------------------
  266|  13.7k|            if (same_count[1] < 2)
  ------------------
  |  Branch (266:17): [True: 13.3k, False: 377]
  ------------------
  267|  13.3k|                same[same_count[1]++].mv.mv[1] = cand_mv;
  268|  13.7k|            if (diff_count[0] < 2) {
  ------------------
  |  Branch (268:17): [True: 10.8k, False: 2.81k]
  ------------------
  269|  10.8k|                if (sign0 ^ sign_bias[cand_ref - 1]) {
  ------------------
  |  Branch (269:21): [True: 225, False: 10.6k]
  ------------------
  270|    225|                    cand_mv.y = -cand_mv.y;
  271|    225|                    cand_mv.x = -cand_mv.x;
  272|    225|                }
  273|  10.8k|                diff[diff_count[0]++].mv.mv[0] = cand_mv;
  274|  10.8k|            }
  275|  13.7k|        } else {
  276|  13.4k|            mv i_cand_mv = (union mv) {
  277|  13.4k|                .x = -cand_mv.x,
  278|  13.4k|                .y = -cand_mv.y
  279|  13.4k|            };
  280|       |
  281|  13.4k|            if (diff_count[0] < 2) {
  ------------------
  |  Branch (281:17): [True: 10.3k, False: 3.08k]
  ------------------
  282|  10.3k|                diff[diff_count[0]++].mv.mv[0] =
  283|  10.3k|                    sign0 ^ sign_bias[cand_ref - 1] ?
  ------------------
  |  Branch (283:21): [True: 97, False: 10.2k]
  ------------------
  284|  10.2k|                    i_cand_mv : cand_mv;
  285|  10.3k|            }
  286|       |
  287|  13.4k|            if (diff_count[1] < 2) {
  ------------------
  |  Branch (287:17): [True: 9.62k, False: 3.84k]
  ------------------
  288|  9.62k|                diff[diff_count[1]++].mv.mv[1] =
  289|  9.62k|                    sign1 ^ sign_bias[cand_ref - 1] ?
  ------------------
  |  Branch (289:21): [True: 137, False: 9.49k]
  ------------------
  290|  9.49k|                    i_cand_mv : cand_mv;
  291|  9.62k|            }
  292|  13.4k|        }
  293|  41.6k|    }
  294|  26.2k|}
refmvs.c:add_single_extended_candidate:
  299|  83.9k|{
  300|   168k|    for (int n = 0; n < 2; n++) {
  ------------------
  |  Branch (300:21): [True: 164k, False: 4.07k]
  ------------------
  301|   164k|        const int cand_ref = cand_b->ref.ref[n];
  302|       |
  303|   164k|        if (cand_ref <= 0) break;
  ------------------
  |  Branch (303:13): [True: 79.8k, False: 84.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|  84.8k|        mv cand_mv = cand_b->mv.mv[n];
  311|  84.8k|        if (sign ^ sign_bias[cand_ref - 1]) {
  ------------------
  |  Branch (311:13): [True: 491, False: 84.3k]
  ------------------
  312|    491|            cand_mv.y = -cand_mv.y;
  313|    491|            cand_mv.x = -cand_mv.x;
  314|    491|        }
  315|       |
  316|  84.8k|        int m;
  317|  84.8k|        const int last = *cnt;
  318|  99.0k|        for (m = 0; m < last; m++)
  ------------------
  |  Branch (318:21): [True: 79.0k, False: 20.0k]
  ------------------
  319|  79.0k|            if (cand_mv.n == mvstack[m].mv.mv[0].n)
  ------------------
  |  Branch (319:17): [True: 64.8k, False: 14.2k]
  ------------------
  320|  64.8k|                break;
  321|  84.8k|        if (m == last) {
  ------------------
  |  Branch (321:13): [True: 20.0k, False: 64.8k]
  ------------------
  322|  20.0k|            mvstack[m].mv.mv[0] = cand_mv;
  323|  20.0k|            mvstack[m].weight = 2; // "minimal"
  324|  20.0k|            *cnt = last + 1;
  325|  20.0k|        }
  326|  84.8k|    }
  327|  83.9k|}

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

dav1d_init_last_nonzero_col_from_eob_tables:
  350|  3.70k|COLD void dav1d_init_last_nonzero_col_from_eob_tables(void) {
  351|       |    static pthread_once_t initted = PTHREAD_ONCE_INIT;
  352|  3.70k|    pthread_once(&initted, init_internal);
  353|  3.70k|}
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.39k|int dav1d_get_shear_params(Dav1dWarpedMotionParams *const wm) {
   81|  7.39k|    const int32_t *const mat = wm->matrix;
   82|       |
   83|  7.39k|    if (mat[2] <= 0) return 1;
  ------------------
  |  Branch (83:9): [True: 0, False: 7.39k]
  ------------------
   84|       |
   85|  7.39k|    wm->u.p.alpha = iclip_wmp(mat[2] - 0x10000);
   86|  7.39k|    wm->u.p.beta = iclip_wmp(mat[3]);
   87|       |
   88|  7.39k|    int shift;
   89|  7.39k|    const int y = apply_sign(resolve_divisor_32(abs(mat[2]), &shift), mat[2]);
   90|  7.39k|    const int64_t v1 = ((int64_t) mat[4] * 0x10000) * y;
   91|  7.39k|    const int rnd = (1 << shift) >> 1;
   92|  7.39k|    wm->u.p.gamma = iclip_wmp(apply_sign64((int) ((llabs(v1) + rnd) >> shift), v1));
   93|  7.39k|    const int64_t v2 = ((int64_t) mat[3] * mat[4]) * y;
   94|  7.39k|    wm->u.p.delta = iclip_wmp(mat[5] -
   95|  7.39k|                          apply_sign64((int) ((llabs(v2) + rnd) >> shift), v2) -
   96|  7.39k|                          0x10000);
   97|       |
   98|  7.39k|    return (4 * abs(wm->u.p.alpha) + 7 * abs(wm->u.p.beta) >= 0x10000) ||
  ------------------
  |  Branch (98:12): [True: 228, False: 7.17k]
  ------------------
   99|  7.17k|           (4 * abs(wm->u.p.gamma) + 4 * abs(wm->u.p.delta) >= 0x10000);
  ------------------
  |  Branch (99:12): [True: 29, False: 7.14k]
  ------------------
  100|  7.39k|}
dav1d_find_affine_int:
  153|  3.23k|{
  154|  3.23k|    int32_t *const mat = wm->matrix;
  155|  3.23k|    int a[2][2] = { { 0, 0 }, { 0, 0 } };
  156|  3.23k|    int bx[2] = { 0, 0 };
  157|  3.23k|    int by[2] = { 0, 0 };
  158|  3.23k|    const int rsuy = 2 * bh4 - 1;
  159|  3.23k|    const int rsux = 2 * bw4 - 1;
  160|  3.23k|    const int suy = rsuy * 8;
  161|  3.23k|    const int sux = rsux * 8;
  162|  3.23k|    const int duy = suy + mv.y;
  163|  3.23k|    const int dux = sux + mv.x;
  164|  3.23k|    const int isuy = by4 * 4 + rsuy;
  165|  3.23k|    const int isux = bx4 * 4 + rsux;
  166|       |
  167|  9.20k|    for (int i = 0; i < np; i++) {
  ------------------
  |  Branch (167:21): [True: 5.96k, False: 3.23k]
  ------------------
  168|  5.96k|        const int dx = pts[i][1][0] - dux;
  169|  5.96k|        const int dy = pts[i][1][1] - duy;
  170|  5.96k|        const int sx = pts[i][0][0] - sux;
  171|  5.96k|        const int sy = pts[i][0][1] - suy;
  172|  5.96k|        if (abs(sx - dx) < 256 && abs(sy - dy) < 256) {
  ------------------
  |  Branch (172:13): [True: 5.84k, False: 125]
  |  Branch (172:35): [True: 5.76k, False: 82]
  ------------------
  173|  5.76k|            a[0][0] += ((sx * sx) >> 2) + sx * 2 + 8;
  174|  5.76k|            a[0][1] += ((sx * sy) >> 2) + sx + sy + 4;
  175|  5.76k|            a[1][1] += ((sy * sy) >> 2) + sy * 2 + 8;
  176|  5.76k|            bx[0] += ((sx * dx) >> 2) + sx + dx + 8;
  177|  5.76k|            bx[1] += ((sy * dx) >> 2) + sy + dx + 4;
  178|  5.76k|            by[0] += ((sx * dy) >> 2) + sx + dy + 4;
  179|  5.76k|            by[1] += ((sy * dy) >> 2) + sy + dy + 8;
  180|  5.76k|        }
  181|  5.96k|    }
  182|       |
  183|       |    // compute determinant of a
  184|  3.23k|    const int64_t det = (int64_t) a[0][0] * a[1][1] - (int64_t) a[0][1] * a[0][1];
  185|  3.23k|    if (det == 0) return 1;
  ------------------
  |  Branch (185:9): [True: 207, 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.23k|}
warpmv.c:iclip_wmp:
   63|  29.5k|static inline int iclip_wmp(const int v) {
   64|  29.5k|    const int cv = iclip(v, INT16_MIN, INT16_MAX);
   65|       |
   66|  29.5k|    return apply_sign((abs(cv) + 32) >> 6, cv) * (1 << 6);
   67|  29.5k|}
warpmv.c:resolve_divisor_32:
   69|  7.39k|static inline int resolve_divisor_32(const unsigned d, int *const shift) {
   70|  7.39k|    *shift = ulog2(d);
   71|  7.39k|    const int e = d - (1 << *shift);
   72|  7.39k|    const int f = *shift > 8 ? (e + (1 << (*shift - 9))) >> (*shift - 8) :
  ------------------
  |  Branch (72:19): [True: 7.39k, False: 0]
  ------------------
   73|  7.39k|                               e << (8 - *shift);
   74|  7.39k|    assert(f <= 256);
  ------------------
  |  |  140|  7.39k|#define assert(x) do { if (!(x)) __builtin_unreachable(); } while (0)
  |  |  ------------------
  |  |  |  Branch (140:28): [True: 0, False: 7.39k]
  |  |  |  Branch (140:68): [Folded, False: 7.39k]
  |  |  ------------------
  ------------------
   75|  7.39k|    *shift += 14;
   76|       |    // Use f as lookup into the precomputed table of multipliers
   77|  7.39k|    return div_lut[f];
   78|  7.39k|}
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|  5.05k|static ALWAYS_INLINE void cdef_dsp_init_x86(Dav1dCdefDSPContext *const c) {
   47|  5.05k|    const unsigned flags = dav1d_get_cpu_flags();
   48|       |
   49|  5.05k|#if BITDEPTH == 8
   50|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (50:9): [True: 0, False: 5.05k]
  ------------------
   51|       |
   52|  5.05k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, sse2);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   53|  5.05k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, sse2);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   54|  5.05k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, sse2);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   55|  5.05k|#endif
   56|       |
   57|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (57:9): [True: 0, False: 5.05k]
  ------------------
   58|       |
   59|  5.05k|    c->dir = BF(dav1d_cdef_dir, ssse3);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   60|  5.05k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, ssse3);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   61|  5.05k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, ssse3);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   62|  5.05k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, ssse3);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   63|       |
   64|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE41)) return;
  ------------------
  |  Branch (64:9): [True: 0, False: 5.05k]
  ------------------
   65|       |
   66|  5.05k|    c->dir = BF(dav1d_cdef_dir, sse4);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   67|  5.05k|#if BITDEPTH == 8
   68|  5.05k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, sse4);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   69|  5.05k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, sse4);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   70|  5.05k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, sse4);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   71|  5.05k|#endif
   72|       |
   73|  5.05k|#if ARCH_X86_64
   74|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (74:9): [True: 0, False: 5.05k]
  ------------------
   75|       |
   76|  5.05k|    c->dir = BF(dav1d_cdef_dir, avx2);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   77|  5.05k|    c->fb[0] = BF(dav1d_cdef_filter_8x8, avx2);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   78|  5.05k|    c->fb[1] = BF(dav1d_cdef_filter_4x8, avx2);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   79|  5.05k|    c->fb[2] = BF(dav1d_cdef_filter_4x4, avx2);
  ------------------
  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   80|       |
   81|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (81:9): [True: 5.05k, 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|  12.8k|static ALWAYS_INLINE void film_grain_dsp_init_x86(Dav1dFilmGrainDSPContext *const c) {
   46|  12.8k|    const unsigned flags = dav1d_get_cpu_flags();
   47|       |
   48|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (48:9): [True: 0, False: 12.8k]
  ------------------
   49|       |
   50|  12.8k|    c->generate_grain_y = BF(dav1d_generate_grain_y, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   51|  12.8k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_generate_grain_uv_420, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   52|  12.8k|    c->fgy_32x32xn = BF(dav1d_fgy_32x32xn, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   53|  12.8k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_fguv_32x32xn_i420, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   54|  12.8k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_generate_grain_uv_422, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   55|  12.8k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_generate_grain_uv_444, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   56|  12.8k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_fguv_32x32xn_i422, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   57|  12.8k|    c->fguv_32x32xn[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_fguv_32x32xn_i444, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   58|       |
   59|  12.8k|#if ARCH_X86_64
   60|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (60:9): [True: 0, False: 12.8k]
  ------------------
   61|       |
   62|  12.8k|    c->generate_grain_y = BF(dav1d_generate_grain_y, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   63|  12.8k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I420 - 1] = BF(dav1d_generate_grain_uv_420, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   64|  12.8k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I422 - 1] = BF(dav1d_generate_grain_uv_422, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   65|  12.8k|    c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I444 - 1] = BF(dav1d_generate_grain_uv_444, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   66|       |
   67|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_SLOW_GATHER)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 12.8k]
  ------------------
   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|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (74:9): [True: 12.8k, 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|  12.8k|static ALWAYS_INLINE void intra_pred_dsp_init_x86(Dav1dIntraPredDSPContext *const c) {
   72|  12.8k|    const unsigned flags = dav1d_get_cpu_flags();
   73|       |
   74|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (74:9): [True: 0, False: 12.8k]
  ------------------
   75|       |
   76|  12.8k|    init_angular_ipred_fn(DC_PRED,       ipred_dc,       ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   77|  12.8k|    init_angular_ipred_fn(DC_128_PRED,   ipred_dc_128,   ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   78|  12.8k|    init_angular_ipred_fn(TOP_DC_PRED,   ipred_dc_top,   ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|  12.8k|    init_angular_ipred_fn(LEFT_DC_PRED,  ipred_dc_left,  ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|  12.8k|    init_angular_ipred_fn(HOR_PRED,      ipred_h,        ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   81|  12.8k|    init_angular_ipred_fn(VERT_PRED,     ipred_v,        ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   82|  12.8k|    init_angular_ipred_fn(PAETH_PRED,    ipred_paeth,    ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  12.8k|    init_angular_ipred_fn(SMOOTH_PRED,   ipred_smooth,   ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   84|  12.8k|    init_angular_ipred_fn(SMOOTH_H_PRED, ipred_smooth_h, ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   85|  12.8k|    init_angular_ipred_fn(SMOOTH_V_PRED, ipred_smooth_v, ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   86|  12.8k|    init_angular_ipred_fn(Z1_PRED,       ipred_z1,       ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   87|  12.8k|    init_angular_ipred_fn(Z2_PRED,       ipred_z2,       ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|  12.8k|    init_angular_ipred_fn(Z3_PRED,       ipred_z3,       ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   89|  12.8k|    init_angular_ipred_fn(FILTER_PRED,   ipred_filter,   ssse3);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   90|       |
   91|  12.8k|    init_cfl_pred_fn(DC_PRED,      ipred_cfl,      ssse3);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   92|  12.8k|    init_cfl_pred_fn(DC_128_PRED,  ipred_cfl_128,  ssse3);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|  12.8k|    init_cfl_pred_fn(TOP_DC_PRED,  ipred_cfl_top,  ssse3);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  12.8k|    init_cfl_pred_fn(LEFT_DC_PRED, ipred_cfl_left, ssse3);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|       |
   96|  12.8k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I420 - 1, ipred_cfl_ac_420, ssse3);
  ------------------
  |  |   43|  12.8k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   97|  12.8k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I422 - 1, ipred_cfl_ac_422, ssse3);
  ------------------
  |  |   43|  12.8k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|  12.8k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I444 - 1, ipred_cfl_ac_444, ssse3);
  ------------------
  |  |   43|  12.8k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   99|       |
  100|  12.8k|    c->pal_pred = BF(dav1d_pal_pred, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  101|       |
  102|  12.8k|#if ARCH_X86_64
  103|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (103:9): [True: 0, False: 12.8k]
  ------------------
  104|       |
  105|  12.8k|    init_angular_ipred_fn(DC_PRED,       ipred_dc,       avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  106|  12.8k|    init_angular_ipred_fn(DC_128_PRED,   ipred_dc_128,   avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  107|  12.8k|    init_angular_ipred_fn(TOP_DC_PRED,   ipred_dc_top,   avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  108|  12.8k|    init_angular_ipred_fn(LEFT_DC_PRED,  ipred_dc_left,  avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|  12.8k|    init_angular_ipred_fn(HOR_PRED,      ipred_h,        avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  110|  12.8k|    init_angular_ipred_fn(VERT_PRED,     ipred_v,        avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  111|  12.8k|    init_angular_ipred_fn(PAETH_PRED,    ipred_paeth,    avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  112|  12.8k|    init_angular_ipred_fn(SMOOTH_PRED,   ipred_smooth,   avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|  12.8k|    init_angular_ipred_fn(SMOOTH_H_PRED, ipred_smooth_h, avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|  12.8k|    init_angular_ipred_fn(SMOOTH_V_PRED, ipred_smooth_v, avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  115|  12.8k|    init_angular_ipred_fn(Z1_PRED,       ipred_z1,       avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  116|  12.8k|    init_angular_ipred_fn(Z2_PRED,       ipred_z2,       avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  117|  12.8k|    init_angular_ipred_fn(Z3_PRED,       ipred_z3,       avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  118|  12.8k|    init_angular_ipred_fn(FILTER_PRED,   ipred_filter,   avx2);
  ------------------
  |  |   39|  12.8k|    init_fn(intra_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|       |
  120|  12.8k|    init_cfl_pred_fn(DC_PRED,      ipred_cfl,      avx2);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  121|  12.8k|    init_cfl_pred_fn(DC_128_PRED,  ipred_cfl_128,  avx2);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  122|  12.8k|    init_cfl_pred_fn(TOP_DC_PRED,  ipred_cfl_top,  avx2);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  123|  12.8k|    init_cfl_pred_fn(LEFT_DC_PRED, ipred_cfl_left, avx2);
  ------------------
  |  |   41|  12.8k|    init_fn(cfl_pred, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  124|       |
  125|  12.8k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I420 - 1, ipred_cfl_ac_420, avx2);
  ------------------
  |  |   43|  12.8k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|  12.8k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I422 - 1, ipred_cfl_ac_422, avx2);
  ------------------
  |  |   43|  12.8k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  127|  12.8k|    init_cfl_ac_fn(DAV1D_PIXEL_LAYOUT_I444 - 1, ipred_cfl_ac_444, avx2);
  ------------------
  |  |   43|  12.8k|    init_fn(cfl_ac, type, name, suffix)
  |  |  ------------------
  |  |  |  |   36|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |
  129|  12.8k|    c->pal_pred = BF(dav1d_pal_pred, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  130|       |
  131|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (131:9): [True: 12.8k, 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|  12.8k|    c->type0[type1] = BF(dav1d_##name, suffix)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  12.8k|#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|  5.05k|{
  113|  5.05k|#define assign_itx_bpc_fn(pfx, w, h, type, type_enum, bpc, ext) \
  114|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  115|  5.05k|        BF_BPC(dav1d_inv_txfm_add_##type##_##w##x##h, bpc, ext)
  116|       |
  117|  5.05k|#define assign_itx1_bpc_fn(pfx, w, h, bpc, ext) \
  118|  5.05k|    assign_itx_bpc_fn(pfx, w, h, dct_dct,           DCT_DCT,           bpc, ext)
  119|       |
  120|  5.05k|#define assign_itx2_bpc_fn(pfx, w, h, bpc, ext) \
  121|  5.05k|    assign_itx1_bpc_fn(pfx, w, h, bpc, ext); \
  122|  5.05k|    assign_itx_bpc_fn(pfx, w, h, identity_identity, IDTX,              bpc, ext)
  123|       |
  124|  5.05k|#define assign_itx12_bpc_fn(pfx, w, h, bpc, ext) \
  125|  5.05k|    assign_itx2_bpc_fn(pfx, w, h, bpc, ext); \
  126|  5.05k|    assign_itx_bpc_fn(pfx, w, h, dct_adst,          ADST_DCT,          bpc, ext); \
  127|  5.05k|    assign_itx_bpc_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      bpc, ext); \
  128|  5.05k|    assign_itx_bpc_fn(pfx, w, h, dct_identity,      H_DCT,             bpc, ext); \
  129|  5.05k|    assign_itx_bpc_fn(pfx, w, h, adst_dct,          DCT_ADST,          bpc, ext); \
  130|  5.05k|    assign_itx_bpc_fn(pfx, w, h, adst_adst,         ADST_ADST,         bpc, ext); \
  131|  5.05k|    assign_itx_bpc_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     bpc, ext); \
  132|  5.05k|    assign_itx_bpc_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      bpc, ext); \
  133|  5.05k|    assign_itx_bpc_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     bpc, ext); \
  134|  5.05k|    assign_itx_bpc_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, bpc, ext); \
  135|  5.05k|    assign_itx_bpc_fn(pfx, w, h, identity_dct,      V_DCT,             bpc, ext)
  136|       |
  137|  5.05k|#define assign_itx16_bpc_fn(pfx, w, h, bpc, ext) \
  138|  5.05k|    assign_itx12_bpc_fn(pfx, w, h, bpc, ext); \
  139|  5.05k|    assign_itx_bpc_fn(pfx, w, h, adst_identity,     H_ADST,            bpc, ext); \
  140|  5.05k|    assign_itx_bpc_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        bpc, ext); \
  141|  5.05k|    assign_itx_bpc_fn(pfx, w, h, identity_adst,     V_ADST,            bpc, ext); \
  142|  5.05k|    assign_itx_bpc_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        bpc, ext)
  143|       |
  144|  5.05k|    const unsigned flags = dav1d_get_cpu_flags();
  145|       |
  146|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (146:9): [True: 0, False: 5.05k]
  ------------------
  147|       |
  148|  5.05k|    assign_itx_fn(, 4, 4, wht_wht, WHT_WHT, sse2);
  ------------------
  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  ------------------
  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  149|       |
  150|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (150:9): [True: 0, False: 5.05k]
  ------------------
  151|       |
  152|  5.05k|#if BITDEPTH == 8
  153|  5.05k|    assign_itx16_fn(,   4,  4, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  154|  5.05k|    assign_itx16_fn(R,  4,  8, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  5.05k|    assign_itx16_fn(R,  8,  4, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|  5.05k|    assign_itx16_fn(,   8,  8, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  157|  5.05k|    assign_itx16_fn(R,  4, 16, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  158|  5.05k|    assign_itx16_fn(R, 16,  4, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|  5.05k|    assign_itx16_fn(R,  8, 16, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|  5.05k|    assign_itx16_fn(R, 16,  8, ssse3);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  161|  5.05k|    assign_itx12_fn(,  16, 16, ssse3);
  ------------------
  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|  5.05k|    assign_itx2_fn (R,  8, 32, ssse3);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|  5.05k|    assign_itx2_fn (R, 32,  8, ssse3);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  164|  5.05k|    assign_itx2_fn (R, 16, 32, ssse3);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|  5.05k|    assign_itx2_fn (R, 32, 16, ssse3);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  166|  5.05k|    assign_itx2_fn (,  32, 32, ssse3);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  167|  5.05k|    assign_itx1_fn (R, 16, 64, ssse3);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  168|  5.05k|    assign_itx1_fn (R, 32, 64, ssse3);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  5.05k|    assign_itx1_fn (R, 64, 16, ssse3);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|  5.05k|    assign_itx1_fn (R, 64, 32, ssse3);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  171|  5.05k|    assign_itx1_fn ( , 64, 64, ssse3);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|  5.05k|    *all_simd = 1;
  173|  5.05k|#endif
  174|       |
  175|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE41)) return;
  ------------------
  |  Branch (175:9): [True: 0, False: 5.05k]
  ------------------
  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|  5.05k|#if ARCH_X86_64
  203|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (203:9): [True: 0, False: 5.05k]
  ------------------
  204|       |
  205|  5.05k|    assign_itx_fn(, 4, 4, wht_wht, WHT_WHT, avx2);
  ------------------
  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  ------------------
  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  206|       |
  207|  5.05k|#if BITDEPTH == 8
  208|  5.05k|    assign_itx16_fn( ,  4,  4, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  209|  5.05k|    assign_itx16_fn(R,  4,  8, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|  5.05k|    assign_itx16_fn(R,  4, 16, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|  5.05k|    assign_itx16_fn(R,  8,  4, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  212|  5.05k|    assign_itx16_fn( ,  8,  8, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  213|  5.05k|    assign_itx16_fn(R,  8, 16, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  214|  5.05k|    assign_itx2_fn (R,  8, 32, avx2);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  215|  5.05k|    assign_itx16_fn(R, 16,  4, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|  5.05k|    assign_itx16_fn(R, 16,  8, avx2);
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  5.05k|    assign_itx_fn(pfx, w, h, adst_identity,     H_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_identity, H_FLIPADST,        ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  5.05k|    assign_itx_fn(pfx, w, h, identity_adst,     V_ADST,            ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  217|  5.05k|    assign_itx12_fn( , 16, 16, avx2);
  ------------------
  |  |   88|  5.05k|    assign_itx2_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   89|  5.05k|    assign_itx_fn(pfx, w, h, dct_adst,          ADST_DCT,          ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|  5.05k|    assign_itx_fn(pfx, w, h, dct_flipadst,      FLIPADST_DCT,      ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|  5.05k|    assign_itx_fn(pfx, w, h, dct_identity,      H_DCT,             ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   92|  5.05k|    assign_itx_fn(pfx, w, h, adst_dct,          DCT_ADST,          ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  5.05k|    assign_itx_fn(pfx, w, h, adst_adst,         ADST_ADST,         ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|  5.05k|    assign_itx_fn(pfx, w, h, adst_flipadst,     FLIPADST_ADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_dct,      DCT_FLIPADST,      ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   96|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_adst,     ADST_FLIPADST,     ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|  5.05k|    assign_itx_fn(pfx, w, h, flipadst_flipadst, FLIPADST_FLIPADST, ext); \
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  218|  5.05k|    assign_itx2_fn (R, 16, 32, avx2);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  219|  5.05k|    assign_itx1_fn (R, 16, 64, avx2);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  220|  5.05k|    assign_itx2_fn (R, 32,  8, avx2);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|  5.05k|    assign_itx2_fn (R, 32, 16, avx2);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  222|  5.05k|    assign_itx2_fn ( , 32, 32, avx2);
  ------------------
  |  |   84|  5.05k|    assign_itx1_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|  5.05k|    assign_itx1_fn (R, 32, 64, avx2);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  224|  5.05k|    assign_itx1_fn (R, 64, 16, avx2);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  225|  5.05k|    assign_itx1_fn (R, 64, 32, avx2);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  226|  5.05k|    assign_itx1_fn ( , 64, 64, avx2);
  ------------------
  |  |   81|  5.05k|    assign_itx_fn(pfx, w, h, dct_dct,           DCT_DCT,           ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#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|  5.05k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (266:9): [True: 5.05k, False: 0]
  ------------------
  267|       |
  268|      0|#if BITDEPTH == 8
  269|  5.05k|    assign_itx16_fn( ,  4,  4, avx512icl); // no wht
  ------------------
  |  |  101|  5.05k|    assign_itx12_fn(pfx, w, h, ext); \
  |  |  ------------------
  |  |  |  |   88|  5.05k|    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|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   85|  5.05k|    assign_itx_fn(pfx, w, h, identity_identity, IDTX,              ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   52|  5.05k|#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|  5.05k|    assign_itx_fn(pfx, w, h, identity_dct,      V_DCT,             ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  5.05k|#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|  5.05k|    assign_itx_fn(pfx, w, h, identity_flipadst, V_FLIPADST,        ext)
  |  |  ------------------
  |  |  |  |   77|  5.05k|    c->itxfm_add[pfx##TX_##w##X##h][type_enum] = \
  |  |  |  |   78|  5.05k|        BF(dav1d_inv_txfm_add_##type##_##w##x##h, ext)
  |  |  |  |  ------------------
  |  |  |  |  |  |   52|  5.05k|#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|  12.8k|static ALWAYS_INLINE void loop_filter_dsp_init_x86(Dav1dLoopFilterDSPContext *const c) {
   42|  12.8k|    const unsigned flags = dav1d_get_cpu_flags();
   43|       |
   44|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (44:9): [True: 0, False: 12.8k]
  ------------------
   45|       |
   46|  12.8k|    c->loop_filter_sb[0][0] = BF(dav1d_lpf_h_sb_y, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   47|  12.8k|    c->loop_filter_sb[0][1] = BF(dav1d_lpf_v_sb_y, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   48|  12.8k|    c->loop_filter_sb[1][0] = BF(dav1d_lpf_h_sb_uv, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   49|  12.8k|    c->loop_filter_sb[1][1] = BF(dav1d_lpf_v_sb_uv, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   50|       |
   51|  12.8k|#if ARCH_X86_64
   52|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (52:9): [True: 0, False: 12.8k]
  ------------------
   53|       |
   54|  12.8k|    c->loop_filter_sb[0][0] = BF(dav1d_lpf_h_sb_y, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   55|  12.8k|    c->loop_filter_sb[0][1] = BF(dav1d_lpf_v_sb_y, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   56|  12.8k|    c->loop_filter_sb[1][0] = BF(dav1d_lpf_h_sb_uv, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   57|  12.8k|    c->loop_filter_sb[1][1] = BF(dav1d_lpf_v_sb_uv, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   58|       |
   59|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (59:9): [True: 12.8k, 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|  12.8k|static ALWAYS_INLINE void loop_restoration_dsp_init_x86(Dav1dLoopRestorationDSPContext *const c, const int bpc) {
   51|  12.8k|    const unsigned flags = dav1d_get_cpu_flags();
   52|       |
   53|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (53:9): [True: 0, False: 12.8k]
  ------------------
   54|  12.8k|#if BITDEPTH == 8
   55|  12.8k|    c->wiener[0] = BF(dav1d_wiener_filter7, sse2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   56|  12.8k|    c->wiener[1] = BF(dav1d_wiener_filter5, sse2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   57|  12.8k|#endif
   58|       |
   59|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (59:9): [True: 0, False: 12.8k]
  ------------------
   60|  12.8k|    c->wiener[0] = BF(dav1d_wiener_filter7, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   61|  12.8k|    c->wiener[1] = BF(dav1d_wiener_filter5, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   62|  12.8k|    if (BITDEPTH == 8 || bpc == 10) {
  ------------------
  |  Branch (62:9): [True: 5.05k, Folded]
  |  Branch (62:26): [True: 4.12k, False: 3.70k]
  ------------------
   63|  9.17k|        c->sgr[0] = BF(dav1d_sgr_filter_5x5, ssse3);
  ------------------
  |  |   52|  9.17k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   64|  9.17k|        c->sgr[1] = BF(dav1d_sgr_filter_3x3, ssse3);
  ------------------
  |  |   52|  9.17k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   65|  9.17k|        c->sgr[2] = BF(dav1d_sgr_filter_mix, ssse3);
  ------------------
  |  |   52|  9.17k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   66|  9.17k|    }
   67|       |
   68|  12.8k|#if ARCH_X86_64
   69|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (69:9): [True: 0, False: 12.8k]
  ------------------
   70|       |
   71|  12.8k|    c->wiener[0] = BF(dav1d_wiener_filter7, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   72|  12.8k|    c->wiener[1] = BF(dav1d_wiener_filter5, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   73|  12.8k|    if (BITDEPTH == 8 || bpc == 10) {
  ------------------
  |  Branch (73:9): [True: 5.05k, Folded]
  |  Branch (73:26): [True: 4.12k, False: 3.70k]
  ------------------
   74|  9.17k|        c->sgr[0] = BF(dav1d_sgr_filter_5x5, avx2);
  ------------------
  |  |   52|  9.17k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   75|  9.17k|        c->sgr[1] = BF(dav1d_sgr_filter_3x3, avx2);
  ------------------
  |  |   52|  9.17k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   76|  9.17k|        c->sgr[2] = BF(dav1d_sgr_filter_mix, avx2);
  ------------------
  |  |   52|  9.17k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
   77|  9.17k|    }
   78|       |
   79|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (79:9): [True: 12.8k, 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|  12.8k|static ALWAYS_INLINE void mc_dsp_init_x86(Dav1dMCDSPContext *const c) {
   93|  12.8k|    const unsigned flags = dav1d_get_cpu_flags();
   94|       |
   95|  12.8k|    if(!(flags & DAV1D_X86_CPU_FLAG_SSSE3))
  ------------------
  |  Branch (95:8): [True: 0, False: 12.8k]
  ------------------
   96|      0|        return;
   97|       |
   98|  12.8k|    init_8tap_fns(ssse3);
  ------------------
  |  |  143|  12.8k|    init_8tap_gen(mc,  opt); \
  |  |  ------------------
  |  |  |  |  132|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  144|  12.8k|    init_8tap_gen(mct, opt)
  |  |  ------------------
  |  |  |  |  132|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   99|       |
  100|  12.8k|    init_mc_fn(FILTER_2D_BILINEAR,             bilin,               ssse3);
  ------------------
  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  101|  12.8k|    init_mct_fn(FILTER_2D_BILINEAR,            bilin,               ssse3);
  ------------------
  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  102|       |
  103|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  104|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  105|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  106|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  107|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  108|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  109|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  110|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  111|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  112|  12.8k|    init_mc_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               ssse3);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  113|       |
  114|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  115|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  116|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  117|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  118|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  119|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  120|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  121|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  122|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  123|  12.8k|    init_mct_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               ssse3);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  124|       |
  125|  12.8k|    c->avg = BF(dav1d_avg, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  126|  12.8k|    c->w_avg = BF(dav1d_w_avg, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  127|  12.8k|    c->mask = BF(dav1d_mask, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  128|  12.8k|    c->w_mask[0] = BF(dav1d_w_mask_444, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  129|  12.8k|    c->w_mask[1] = BF(dav1d_w_mask_422, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  130|  12.8k|    c->w_mask[2] = BF(dav1d_w_mask_420, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  131|  12.8k|    c->blend = BF(dav1d_blend, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  132|  12.8k|    c->blend_v = BF(dav1d_blend_v, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  133|  12.8k|    c->blend_h = BF(dav1d_blend_h, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  134|  12.8k|    c->warp8x8  = BF(dav1d_warp_affine_8x8, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  135|  12.8k|    c->warp8x8t = BF(dav1d_warp_affine_8x8t, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  136|  12.8k|    c->emu_edge = BF(dav1d_emu_edge, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  137|  12.8k|    c->resize = BF(dav1d_resize, ssse3);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  138|       |
  139|  12.8k|    if(!(flags & DAV1D_X86_CPU_FLAG_SSE41))
  ------------------
  |  Branch (139:8): [True: 0, False: 12.8k]
  ------------------
  140|      0|        return;
  141|       |
  142|  12.8k|#if BITDEPTH == 8
  143|  12.8k|    c->warp8x8  = BF(dav1d_warp_affine_8x8, sse4);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  144|  12.8k|    c->warp8x8t = BF(dav1d_warp_affine_8x8t, sse4);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  145|  12.8k|#endif
  146|       |
  147|  12.8k|#if ARCH_X86_64
  148|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2))
  ------------------
  |  Branch (148:9): [True: 0, False: 12.8k]
  ------------------
  149|      0|        return;
  150|       |
  151|  12.8k|    init_8tap_fns(avx2);
  ------------------
  |  |  143|  12.8k|    init_8tap_gen(mc,  opt); \
  |  |  ------------------
  |  |  |  |  132|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  144|  12.8k|    init_8tap_gen(mct, opt)
  |  |  ------------------
  |  |  |  |  132|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  133|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_regular_smooth, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  134|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_regular_sharp,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  135|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_smooth_regular, opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  136|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH,         8tap_smooth,         opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  137|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_smooth_sharp,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  138|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_sharp_regular,  opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  139|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_sharp_smooth,   opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  140|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  152|       |
  153|  12.8k|    init_mc_fn(FILTER_2D_BILINEAR,            bilin,               avx2);
  ------------------
  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  154|  12.8k|    init_mct_fn(FILTER_2D_BILINEAR,           bilin,               avx2);
  ------------------
  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  155|       |
  156|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  157|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  158|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  159|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  160|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  161|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  162|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  163|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  164|  12.8k|    init_mc_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  165|  12.8k|    init_mc_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               avx2);
  ------------------
  |  |   40|  12.8k|    c->mc_scaled[type] = BF(dav1d_put_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  166|       |
  167|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR,        8tap_scaled_regular,        avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  168|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SMOOTH, 8tap_scaled_regular_smooth, avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  169|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_REGULAR_SHARP,  8tap_scaled_regular_sharp,  avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  170|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_REGULAR, 8tap_scaled_smooth_regular, avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  171|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH,         8tap_scaled_smooth,         avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  172|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SMOOTH_SHARP,   8tap_scaled_smooth_sharp,   avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  173|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_REGULAR,  8tap_scaled_sharp_regular,  avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  174|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP_SMOOTH,   8tap_scaled_sharp_smooth,   avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  175|  12.8k|    init_mct_scaled_fn(FILTER_2D_8TAP_SHARP,          8tap_scaled_sharp,          avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  176|  12.8k|    init_mct_scaled_fn(FILTER_2D_BILINEAR,            bilin_scaled,               avx2);
  ------------------
  |  |   42|  12.8k|    c->mct_scaled[type] = BF(dav1d_prep_##name, suffix)
  |  |  ------------------
  |  |  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  |  |  ------------------
  ------------------
  177|       |
  178|  12.8k|    c->avg = BF(dav1d_avg, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  179|  12.8k|    c->w_avg = BF(dav1d_w_avg, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  180|  12.8k|    c->mask = BF(dav1d_mask, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  181|  12.8k|    c->w_mask[0] = BF(dav1d_w_mask_444, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  182|  12.8k|    c->w_mask[1] = BF(dav1d_w_mask_422, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  183|  12.8k|    c->w_mask[2] = BF(dav1d_w_mask_420, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  184|  12.8k|    c->blend = BF(dav1d_blend, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  185|  12.8k|    c->blend_v = BF(dav1d_blend_v, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  186|  12.8k|    c->blend_h = BF(dav1d_blend_h, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  187|  12.8k|    c->warp8x8  = BF(dav1d_warp_affine_8x8, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  188|  12.8k|    c->warp8x8t = BF(dav1d_warp_affine_8x8t, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  189|  12.8k|    c->emu_edge = BF(dav1d_emu_edge, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  190|  12.8k|    c->resize = BF(dav1d_resize, avx2);
  ------------------
  |  |   52|  12.8k|#define BF(x, suffix) x##_8bpc_##suffix
  ------------------
  191|       |
  192|  12.8k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL))
  ------------------
  |  Branch (192:9): [True: 12.8k, False: 0]
  ------------------
  193|  12.8k|        return;
  194|       |
  195|  12.8k|    init_8tap_fns(avx512icl);
  ------------------
  |  |  143|      0|    init_8tap_gen(mc,  opt); \
  |  |  ------------------
  |  |  |  |  132|      0|    init_##name##_fn(FILTER_2D_8TAP_REGULAR,        8tap_regular,        opt); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#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|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  12.8k|    c->mc[type] = BF(dav1d_put_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#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|  12.8k|    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|  12.8k|    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|  12.8k|    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|  12.8k|    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|  12.8k|    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|  12.8k|    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|  12.8k|    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|  12.8k|    init_##name##_fn(FILTER_2D_8TAP_SHARP,          8tap_sharp,          opt)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  12.8k|    c->mct[type] = BF(dav1d_prep_##name, suffix)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   52|  12.8k|#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|  21.3k|static ALWAYS_INLINE void msac_init_x86(MsacContext *const s) {
   60|  21.3k|    const unsigned flags = dav1d_get_cpu_flags();
   61|       |
   62|  21.3k|    if (flags & DAV1D_X86_CPU_FLAG_SSE2) {
  ------------------
  |  Branch (62:9): [True: 21.3k, False: 0]
  ------------------
   63|  21.3k|        s->symbol_adapt16 = dav1d_msac_decode_symbol_adapt16_sse2;
   64|  21.3k|    }
   65|       |
   66|  21.3k|    if (flags & DAV1D_X86_CPU_FLAG_AVX2) {
  ------------------
  |  Branch (66:9): [True: 21.3k, False: 0]
  ------------------
   67|  21.3k|        s->symbol_adapt16 = dav1d_msac_decode_symbol_adapt16_avx2;
   68|  21.3k|    }
   69|  21.3k|}

pal.c:pal_dsp_init_x86:
   34|  14.0k|static ALWAYS_INLINE void pal_dsp_init_x86(Dav1dPalDSPContext *const c) {
   35|  14.0k|    const unsigned flags = dav1d_get_cpu_flags();
   36|       |
   37|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (37:9): [True: 0, False: 14.0k]
  ------------------
   38|       |
   39|  14.0k|    c->pal_idx_finish = dav1d_pal_idx_finish_ssse3;
   40|       |
   41|  14.0k|#if ARCH_X86_64
   42|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (42:9): [True: 0, False: 14.0k]
  ------------------
   43|       |
   44|  14.0k|    c->pal_idx_finish = dav1d_pal_idx_finish_avx2;
   45|       |
   46|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (46:9): [True: 14.0k, 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|  14.0k|static ALWAYS_INLINE void refmvs_dsp_init_x86(Dav1dRefmvsDSPContext *const c) {
   42|  14.0k|    const unsigned flags = dav1d_get_cpu_flags();
   43|       |
   44|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE2)) return;
  ------------------
  |  Branch (44:9): [True: 0, False: 14.0k]
  ------------------
   45|       |
   46|  14.0k|    c->splat_mv = dav1d_splat_mv_sse2;
   47|       |
   48|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSSE3)) return;
  ------------------
  |  Branch (48:9): [True: 0, False: 14.0k]
  ------------------
   49|       |
   50|  14.0k|    c->save_tmvs = dav1d_save_tmvs_ssse3;
   51|       |
   52|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_SSE41)) return;
  ------------------
  |  Branch (52:9): [True: 0, False: 14.0k]
  ------------------
   53|  14.0k|#if ARCH_X86_64
   54|  14.0k|    c->load_tmvs = dav1d_load_tmvs_sse4;
   55|       |
   56|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX2)) return;
  ------------------
  |  Branch (56:9): [True: 0, False: 14.0k]
  ------------------
   57|       |
   58|  14.0k|    c->save_tmvs = dav1d_save_tmvs_avx2;
   59|  14.0k|    c->splat_mv = dav1d_splat_mv_avx2;
   60|       |
   61|  14.0k|    if (!(flags & DAV1D_X86_CPU_FLAG_AVX512ICL)) return;
  ------------------
  |  Branch (61:9): [True: 14.0k, 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:
  128|      1|static __inline void SetCpuFlags(int cpu_flags) {
  129|      1|  LIBYUV_API extern int cpu_info_;
  130|      1|#ifdef __ATOMIC_RELAXED
  131|      1|  __atomic_store_n(&cpu_info_, cpu_flags, __ATOMIC_RELAXED);
  132|       |#else
  133|       |  cpu_info_ = cpu_flags;
  134|       |#endif
  135|      1|}
planar_functions.cc:_ZN6libyuvL11TestCpuFlagEi:
   78|    568|static __inline int TestCpuFlag(int test_flag) {
   79|    568|  LIBYUV_API extern int cpu_info_;
   80|    568|#ifdef __ATOMIC_RELAXED
   81|    568|  int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED);
   82|       |#else
   83|       |  int cpu_info = cpu_info_;
   84|       |#endif
   85|    568|  return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag;
  ------------------
  |  Branch (85:11): [True: 0, False: 568]
  ------------------
   86|    568|}
scale.cc:_ZN6libyuvL11TestCpuFlagEi:
   78|  26.1k|static __inline int TestCpuFlag(int test_flag) {
   79|  26.1k|  LIBYUV_API extern int cpu_info_;
   80|  26.1k|#ifdef __ATOMIC_RELAXED
   81|  26.1k|  int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED);
   82|       |#else
   83|       |  int cpu_info = cpu_info_;
   84|       |#endif
   85|  26.1k|  return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag;
  ------------------
  |  Branch (85:11): [True: 1, False: 26.1k]
  ------------------
   86|  26.1k|}
scale_common.cc:_ZN6libyuvL11TestCpuFlagEi:
   78|  2.26k|static __inline int TestCpuFlag(int test_flag) {
   79|  2.26k|  LIBYUV_API extern int cpu_info_;
   80|  2.26k|#ifdef __ATOMIC_RELAXED
   81|  2.26k|  int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED);
   82|       |#else
   83|       |  int cpu_info = cpu_info_;
   84|       |#endif
   85|  2.26k|  return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag;
  ------------------
  |  Branch (85:11): [True: 0, False: 2.26k]
  ------------------
   86|  2.26k|}

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:
  492|      1|int MaskCpuFlags(int enable_flags) {
  493|      1|  int cpu_info = GetCpuFlags() & enable_flags;
  494|      1|  SetCpuFlags(cpu_info);
  495|      1|  return cpu_info;
  496|      1|}
InitCpuFlags:
  499|      1|int InitCpuFlags(void) {
  500|      1|  return MaskCpuFlags(-1);
  501|      1|}
cpu_id.cc:_ZN6libyuvL11GetCpuFlagsEv:
  390|      1|static SAFEBUFFERS int GetCpuFlags(void) {
  391|      1|  int cpu_info = 0;
  392|      1|#if !defined(__pnacl__) && !defined(__CLR_VER) &&                   \
  393|      1|    (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \
  394|      1|     defined(_M_IX86))
  395|      1|  int cpu_info0[4] = {0, 0, 0, 0};
  396|      1|  int cpu_info1[4] = {0, 0, 0, 0};
  397|      1|  int cpu_info7[4] = {0, 0, 0, 0};
  398|      1|  int cpu_einfo7[4] = {0, 0, 0, 0};
  399|      1|  int cpu_info24[4] = {0, 0, 0, 0};
  400|      1|  int cpu_info21[4] = {0, 0, 0, 0};
  401|      1|  int cpu_amdinfo21[4] = {0, 0, 0, 0};
  402|      1|  CpuId(0, 0, cpu_info0);
  403|      1|  CpuId(1, 0, cpu_info1);
  404|      1|  if (cpu_info0[0] >= 7) {
  ------------------
  |  Branch (404:7): [True: 1, False: 0]
  ------------------
  405|      1|    CpuId(7, 0, cpu_info7);
  406|      1|    CpuId(7, 1, cpu_einfo7);
  407|      1|    CpuId(0x80000021, 0, cpu_amdinfo21);
  408|      1|  }
  409|      1|  if (cpu_info0[0] >= 0x21) {
  ------------------
  |  Branch (409:7): [True: 0, False: 1]
  ------------------
  410|      0|    CpuId(0x21, 0, cpu_info21);
  411|      0|  }
  412|      1|  if (cpu_info0[0] >= 0x24) {
  ------------------
  |  Branch (412:7): [True: 0, False: 1]
  ------------------
  413|      0|    CpuId(0x24, 0, cpu_info24);
  414|      0|  }
  415|      1|  cpu_info = kCpuHasX86 | ((cpu_info1[3] & 0x04000000) ? kCpuHasSSE2 : 0) |
  ------------------
  |  Branch (415:28): [True: 1, False: 0]
  ------------------
  416|      1|             ((cpu_info1[2] & 0x00000200) ? kCpuHasSSSE3 : 0) |
  ------------------
  |  Branch (416:15): [True: 1, False: 0]
  ------------------
  417|      1|             ((cpu_info1[2] & 0x00080000) ? kCpuHasSSE41 : 0) |
  ------------------
  |  Branch (417:15): [True: 1, False: 0]
  ------------------
  418|      1|             ((cpu_info1[2] & 0x00100000) ? kCpuHasSSE42 : 0) |
  ------------------
  |  Branch (418:15): [True: 1, False: 0]
  ------------------
  419|      1|             ((cpu_info7[1] & 0x00000200) ? kCpuHasERMS : 0) |
  ------------------
  |  Branch (419:15): [True: 0, False: 1]
  ------------------
  420|      1|             ((cpu_info7[3] & 0x00000010) ? kCpuHasFSMR : 0);
  ------------------
  |  Branch (420:15): [True: 0, False: 1]
  ------------------
  421|       |
  422|       |  // AVX requires OS saves YMM registers.
  423|      1|  if (((cpu_info1[2] & 0x1c000000) == 0x1c000000) &&  // AVX and OSXSave
  ------------------
  |  Branch (423:7): [True: 1, False: 0]
  ------------------
  424|      1|      ((GetXCR0() & 6) == 6)) {  // Test OS saves YMM registers
  ------------------
  |  Branch (424:7): [True: 1, False: 0]
  ------------------
  425|      1|    cpu_info |= kCpuHasAVX | ((cpu_info7[1] & 0x00000020) ? kCpuHasAVX2 : 0) |
  ------------------
  |  Branch (425:31): [True: 1, False: 0]
  ------------------
  426|      1|                ((cpu_info1[2] & 0x00001000) ? kCpuHasFMA3 : 0) |
  ------------------
  |  Branch (426:18): [True: 1, False: 0]
  ------------------
  427|      1|                ((cpu_info1[2] & 0x20000000) ? kCpuHasF16C : 0) |
  ------------------
  |  Branch (427:18): [True: 1, False: 0]
  ------------------
  428|      1|                ((cpu_einfo7[0] & 0x00000010) ? kCpuHasAVXVNNI : 0) |
  ------------------
  |  Branch (428:18): [True: 0, False: 1]
  ------------------
  429|      1|                ((cpu_einfo7[3] & 0x00000010) ? kCpuHasAVXVNNIINT8 : 0);
  ------------------
  |  Branch (429:18): [True: 0, False: 1]
  ------------------
  430|       |
  431|      1|    cpu_info |= ((cpu_amdinfo21[0] & 0x00008000) ? kCpuHasERMS : 0);
  ------------------
  |  Branch (431:18): [True: 0, False: 1]
  ------------------
  432|       |
  433|       |    // Detect AVX512bw
  434|      1|    if ((GetXCR0() & 0xe0) == 0xe0 && (cpu_info7[1] & 0x00010000)) {
  ------------------
  |  Branch (434:9): [True: 0, False: 1]
  |  Branch (434:39): [True: 0, False: 0]
  ------------------
  435|      0|      cpu_info |= ((cpu_info7[1] & 0x40000000) ? kCpuHasAVX512BW : 0) |
  ------------------
  |  Branch (435:20): [True: 0, False: 0]
  ------------------
  436|      0|                  ((cpu_info7[1] & 0x80000000) ? kCpuHasAVX512VL : 0) |
  ------------------
  |  Branch (436:20): [True: 0, False: 0]
  ------------------
  437|      0|                  ((cpu_info7[2] & 0x00000002) ? kCpuHasAVX512VBMI : 0) |
  ------------------
  |  Branch (437:20): [True: 0, False: 0]
  ------------------
  438|      0|                  ((cpu_info7[2] & 0x00000040) ? kCpuHasAVX512VBMI2 : 0) |
  ------------------
  |  Branch (438:20): [True: 0, False: 0]
  ------------------
  439|      0|                  ((cpu_info7[2] & 0x00000800) ? kCpuHasAVX512VNNI : 0) |
  ------------------
  |  Branch (439:20): [True: 0, False: 0]
  ------------------
  440|      0|                  ((cpu_info7[2] & 0x00001000) ? kCpuHasAVX512VBITALG : 0) |
  ------------------
  |  Branch (440:20): [True: 0, False: 0]
  ------------------
  441|      0|                  ((cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0) |
  ------------------
  |  Branch (441:20): [True: 0, False: 0]
  ------------------
  442|      0|                  ((cpu_info7[3] & 0x02000000) ? kCpuHasAMXINT8 : 0) |
  ------------------
  |  Branch (442:20): [True: 0, False: 0]
  ------------------
  443|      0|                  ((cpu_info21[0] & 0x00800000) ? kCpuHasAVX512BMM : 0);
  ------------------
  |  Branch (443:20): [True: 0, False: 0]
  ------------------
  444|      0|      if (cpu_info0[0] >= 0x24 && (cpu_einfo7[3] & 0x00080000)) {
  ------------------
  |  Branch (444:11): [True: 0, False: 0]
  |  Branch (444:35): [True: 0, False: 0]
  ------------------
  445|      0|        cpu_info |= ((cpu_info24[1] & 0xFF) >= 2) ? kCpuHasAVX10_2 : 0;
  ------------------
  |  Branch (445:21): [True: 0, False: 0]
  ------------------
  446|      0|      }
  447|      0|    }
  448|      1|  }
  449|      1|#endif
  450|       |#if defined(__loongarch__) && defined(__linux__)
  451|       |  cpu_info = LoongArchCpuCaps();
  452|       |  cpu_info |= kCpuHasLOONGARCH;
  453|       |#endif
  454|       |#if defined(__aarch64__)
  455|       |#if defined(__linux__)
  456|       |  // getauxval is supported since Android SDK version 18, minimum at time of
  457|       |  // writing is 21, so should be safe to always use this. If getauxval is
  458|       |  // somehow disabled then getauxval returns 0, which will leave Neon enabled
  459|       |  // since Neon is mandatory on AArch64.
  460|       |  unsigned long hwcap = getauxval(AT_HWCAP);
  461|       |  unsigned long hwcap2 = getauxval(AT_HWCAP2);
  462|       |  cpu_info = AArch64CpuCaps(hwcap, hwcap2);
  463|       |#else
  464|       |  cpu_info = AArch64CpuCaps();
  465|       |#endif
  466|       |  cpu_info |= kCpuHasARM;
  467|       |#endif  // __aarch64__
  468|       |#if defined(__arm__)
  469|       |  // gcc -mfpu=neon defines __ARM_NEON__
  470|       |  // __ARM_NEON__ generates code that requires Neon.  NaCL also requires Neon.
  471|       |  // For Linux, /proc/cpuinfo can be tested but without that assume Neon.
  472|       |  // Linux arm parse text file for neon detect.
  473|       |#if defined(__linux__)
  474|       |  cpu_info = ArmCpuCaps("/proc/cpuinfo");
  475|       |#elif defined(__ARM_NEON__)
  476|       |  cpu_info = kCpuHasNEON;
  477|       |#else
  478|       |  cpu_info = 0;
  479|       |#endif
  480|       |  cpu_info |= kCpuHasARM;
  481|       |#endif  // __arm__
  482|       |#if defined(__riscv) && defined(__linux__)
  483|       |  cpu_info = RiscvCpuCaps("/proc/cpuinfo");
  484|       |  cpu_info |= kCpuHasRISCV;
  485|       |#endif  // __riscv
  486|      1|  cpu_info |= kCpuInitialized;
  487|      1|  return cpu_info;
  488|      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:
   34|    142|               int height) {
   35|    142|  int y;
   36|    142|  void (*CopyRow)(const uint8_t* src, uint8_t* dst, int width) = CopyRow_C;
   37|    142|  if (width <= 0 || height == 0 || height == INT_MIN) {
  ------------------
  |  Branch (37:7): [True: 0, False: 142]
  |  Branch (37:21): [True: 0, False: 142]
  |  Branch (37:36): [True: 0, False: 142]
  ------------------
   38|      0|    return;
   39|      0|  }
   40|       |  // Negative height means invert the image.
   41|    142|  if (height < 0) {
  ------------------
  |  Branch (41:7): [True: 0, False: 142]
  ------------------
   42|      0|    height = -height;
   43|      0|    dst_y = dst_y + (ptrdiff_t)(height - 1) * dst_stride_y;
   44|      0|    dst_stride_y = -dst_stride_y;
   45|      0|  }
   46|       |  // Coalesce rows.
   47|    142|  if (src_stride_y == width && dst_stride_y == width &&
  ------------------
  |  Branch (47:7): [True: 6, False: 136]
  |  Branch (47:32): [True: 6, False: 0]
  ------------------
   48|      6|      (ptrdiff_t)width * height <= INT_MAX) {
  ------------------
  |  Branch (48:7): [True: 6, False: 0]
  ------------------
   49|      6|    width *= height;
   50|      6|    height = 1;
   51|      6|    src_stride_y = dst_stride_y = 0;
   52|      6|  }
   53|       |  // Nothing to do.
   54|    142|  if (src_y == dst_y && src_stride_y == dst_stride_y) {
  ------------------
  |  Branch (54:7): [True: 0, False: 142]
  |  Branch (54:25): [True: 0, False: 0]
  ------------------
   55|      0|    return;
   56|      0|  }
   57|       |
   58|    142|#if defined(HAS_COPYROW_SSE2)
   59|    142|  if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (59:7): [True: 142, False: 0]
  ------------------
   60|    142|    CopyRow = IS_ALIGNED(width, 32) ? CopyRow_SSE2 : CopyRow_Any_SSE2;
  ------------------
  |  | 1002|    142|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 78, False: 64]
  |  |  ------------------
  ------------------
   61|    142|  }
   62|    142|#endif
   63|    142|#if defined(HAS_COPYROW_AVX)
   64|    142|  if (TestCpuFlag(kCpuHasAVX)) {
  ------------------
  |  Branch (64:7): [True: 142, False: 0]
  ------------------
   65|    142|    CopyRow = IS_ALIGNED(width, 64) ? CopyRow_AVX : CopyRow_Any_AVX;
  ------------------
  |  | 1002|    142|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 42, False: 100]
  |  |  ------------------
  ------------------
   66|    142|  }
   67|    142|#endif
   68|    142|#if defined(HAS_COPYROW_AVX512BW)
   69|    142|  if (TestCpuFlag(kCpuHasAVX512BW)) {
  ------------------
  |  Branch (69:7): [True: 0, False: 142]
  ------------------
   70|      0|    CopyRow = IS_ALIGNED(width, 128) ? CopyRow_AVX512BW : CopyRow_Any_AVX512BW;
  ------------------
  |  | 1002|      0|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   71|      0|  }
   72|    142|#endif
   73|    142|#if defined(HAS_COPYROW_ERMS)
   74|    142|  if (TestCpuFlag(kCpuHasERMS)) {
  ------------------
  |  Branch (74:7): [True: 0, False: 142]
  ------------------
   75|      0|    CopyRow = CopyRow_ERMS;
   76|      0|  }
   77|    142|#endif
   78|       |#if defined(HAS_COPYROW_NEON)
   79|       |  if (TestCpuFlag(kCpuHasNEON)) {
   80|       |    CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON;
   81|       |  }
   82|       |#endif
   83|       |#if defined(HAS_COPYROW_SVE2)
   84|       |  if (TestCpuFlag(kCpuHasSVE2)) {
   85|       |    CopyRow = CopyRow_SVE2;
   86|       |  }
   87|       |#endif
   88|       |#if defined(HAS_COPYROW_SME)
   89|       |  if (TestCpuFlag(kCpuHasSME)) {
   90|       |    CopyRow = CopyRow_SME;
   91|       |  }
   92|       |#endif
   93|       |#if defined(HAS_COPYROW_RVV)
   94|       |  if (TestCpuFlag(kCpuHasRVV)) {
   95|       |    CopyRow = CopyRow_RVV;
   96|       |  }
   97|       |#endif
   98|       |
   99|       |  // Copy plane
  100|  3.65k|  for (y = 0; y < height; ++y) {
  ------------------
  |  Branch (100:15): [True: 3.51k, False: 142]
  ------------------
  101|  3.51k|    CopyRow(src_y, dst_y, width);
  102|  3.51k|    src_y += src_stride_y;
  103|  3.51k|    dst_y += dst_stride_y;
  104|  3.51k|  }
  105|    142|}
CopyPlane_16:
  113|     50|                  int height) {
  114|     50|  CopyPlane((const uint8_t*)src_y, src_stride_y * 2, (uint8_t*)dst_y,
  115|     50|            dst_stride_y * 2, width * 2, height);
  116|     50|}

CopyRow_Any_AVX:
  970|  1.82k|  void NAMEANY(const uint8_t* src_ptr, uint8_t* dst_ptr, int width) {         \
  971|  1.82k|    SIMD_ALIGNED(uint8_t vin[256]);                                           \
  ------------------
  |  |  927|  1.82k|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
  972|  1.82k|    static_assert(SS(MASK + 1, UVSHIFT) * SBPP <= sizeof(vin),                \
  973|  1.82k|                  "vin buffer too small");                                    \
  974|  1.82k|    SIMD_ALIGNED(uint8_t vout[256]);                                          \
  ------------------
  |  |  927|  1.82k|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
  975|  1.82k|    static_assert((MASK + 1) * BPP <= sizeof(vout), "vout buffer too small"); \
  976|  1.82k|    memset(vin, 0, sizeof(vin)); /* for YUY2 and msan */                      \
  977|  1.82k|    int r = width & MASK;                                                     \
  978|  1.82k|    int n = width & ~MASK;                                                    \
  979|  1.82k|    if (n > 0) {                                                              \
  ------------------
  |  Branch (979:9): [True: 150, False: 1.67k]
  ------------------
  980|    150|      ANY_SIMD(src_ptr, dst_ptr, n);                                          \
  981|    150|    }                                                                         \
  982|  1.82k|    ptrdiff_t np = n;                                                         \
  983|  1.82k|    memcpy(vin, src_ptr + (np >> UVSHIFT) * SBPP, SS(r, UVSHIFT) * SBPP);     \
  ------------------
  |  |   32|  1.82k|#define SS(width, shift) (((width) + (1 << (shift)) - 1) >> (shift))
  ------------------
  984|  1.82k|    ANY_SIMD(vin, vout, MASK + 1);                                            \
  985|  1.82k|    memcpy(dst_ptr + np * BPP, vout, r * BPP);                                \
  986|  1.82k|  }
InterpolateRow_Any_AVX2:
 1707|  2.54M|               int width, int source_y_fraction) {                   \
 1708|  2.54M|    SIMD_ALIGNED(TS vin[64 * 2]);                                    \
  ------------------
  |  |  927|  2.54M|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
 1709|  2.54M|    static_assert((MASK + 1) * SBPP * sizeof(TS) <= sizeof(vin) / 2, \
 1710|  2.54M|                  "vin buffer too small");                           \
 1711|  2.54M|    SIMD_ALIGNED(TD vout[64]);                                       \
  ------------------
  |  |  927|  2.54M|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
 1712|  2.54M|    static_assert((MASK + 1) * BPP * sizeof(TD) <= sizeof(vout),     \
 1713|  2.54M|                  "vout buffer too small");                          \
 1714|  2.54M|    memset(vin, 0, sizeof(vin)); /* for msan */                      \
 1715|  2.54M|    int r = width & MASK;                                            \
 1716|  2.54M|    int n = width & ~MASK;                                           \
 1717|  2.54M|    if (n > 0) {                                                     \
  ------------------
  |  Branch (1717:9): [True: 978k, False: 1.56M]
  ------------------
 1718|   978k|      ANY_SIMD(dst_ptr, src_ptr, src_stride, n, source_y_fraction);  \
 1719|   978k|    }                                                                \
 1720|  2.54M|    ptrdiff_t np = n;                                                \
 1721|  2.54M|    memcpy(vin, src_ptr + np * SBPP, r * SBPP * sizeof(TS));         \
 1722|  2.54M|    if (source_y_fraction) {                                         \
  ------------------
  |  Branch (1722:9): [True: 1.25M, False: 1.29M]
  ------------------
 1723|  1.25M|      memcpy(vin + 64, src_ptr + src_stride + np * SBPP,             \
 1724|  1.25M|             r * SBPP * sizeof(TS));                                 \
 1725|  1.25M|    }                                                                \
 1726|  2.54M|    ANY_SIMD(vout, vin, 64, MASK + 1, source_y_fraction);            \
 1727|  2.54M|    memcpy(dst_ptr + np * BPP, vout, r * BPP * sizeof(TD));          \
 1728|  2.54M|  }
InterpolateRow_16_Any_AVX2:
 1707|  3.44M|               int width, int source_y_fraction) {                   \
 1708|  3.44M|    SIMD_ALIGNED(TS vin[64 * 2]);                                    \
  ------------------
  |  |  927|  3.44M|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
 1709|  3.44M|    static_assert((MASK + 1) * SBPP * sizeof(TS) <= sizeof(vin) / 2, \
 1710|  3.44M|                  "vin buffer too small");                           \
 1711|  3.44M|    SIMD_ALIGNED(TD vout[64]);                                       \
  ------------------
  |  |  927|  3.44M|#define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
  ------------------
 1712|  3.44M|    static_assert((MASK + 1) * BPP * sizeof(TD) <= sizeof(vout),     \
 1713|  3.44M|                  "vout buffer too small");                          \
 1714|  3.44M|    memset(vin, 0, sizeof(vin)); /* for msan */                      \
 1715|  3.44M|    int r = width & MASK;                                            \
 1716|  3.44M|    int n = width & ~MASK;                                           \
 1717|  3.44M|    if (n > 0) {                                                     \
  ------------------
  |  Branch (1717:9): [True: 2.15M, False: 1.28M]
  ------------------
 1718|  2.15M|      ANY_SIMD(dst_ptr, src_ptr, src_stride, n, source_y_fraction);  \
 1719|  2.15M|    }                                                                \
 1720|  3.44M|    ptrdiff_t np = n;                                                \
 1721|  3.44M|    memcpy(vin, src_ptr + np * SBPP, r * SBPP * sizeof(TS));         \
 1722|  3.44M|    if (source_y_fraction) {                                         \
  ------------------
  |  Branch (1722:9): [True: 2.30M, False: 1.13M]
  ------------------
 1723|  2.30M|      memcpy(vin + 64, src_ptr + src_stride + np * SBPP,             \
 1724|  2.30M|             r * SBPP * sizeof(TS));                                 \
 1725|  2.30M|    }                                                                \
 1726|  3.44M|    ANY_SIMD(vout, vin, 64, MASK + 1, source_y_fraction);            \
 1727|  3.44M|    memcpy(dst_ptr + np * BPP, vout, r * BPP * sizeof(TD));          \
 1728|  3.44M|  }

CopyRow_AVX:
 6876|  3.66k|void CopyRow_AVX(const uint8_t* src, uint8_t* dst, int width) {
 6877|  3.66k|  asm volatile(
 6878|  3.66k|      "1:          \n"
 6879|  3.66k|      "vmovdqu     (%0),%%ymm0                   \n"
 6880|  3.66k|      "vmovdqu     0x20(%0),%%ymm1               \n"
 6881|  3.66k|      "lea         0x40(%0),%0                   \n"
 6882|  3.66k|      "vmovdqu     %%ymm0,(%1)                   \n"
 6883|  3.66k|      "vmovdqu     %%ymm1,0x20(%1)               \n"
 6884|  3.66k|      "lea         0x40(%1),%1                   \n"
 6885|  3.66k|      "sub         $0x40,%2                      \n"
 6886|  3.66k|      "jg          1b                            \n"
 6887|  3.66k|      "vzeroupper  \n"
 6888|  3.66k|      : "+r"(src),   // %0
 6889|  3.66k|        "+r"(dst),   // %1
 6890|  3.66k|        "+r"(width)  // %2
 6891|  3.66k|      :
 6892|  3.66k|      : "memory", "cc", "xmm0", "xmm1");
 6893|  3.66k|}
InterpolateRow_AVX2:
 9035|  4.64M|                         int source_y_fraction) {
 9036|  4.64M|  asm volatile(
 9037|  4.64M|      "sub         %1,%0                         \n"
 9038|  4.64M|      "cmp         $0x0,%3                       \n"
 9039|  4.64M|      "je          100f                          \n"
 9040|  4.64M|      "cmp         $0x80,%3                      \n"
 9041|  4.64M|      "je          50f                           \n"
 9042|       |
 9043|  4.64M|      "vmovd       %3,%%xmm0                     \n"
 9044|  4.64M|      "neg         %3                            \n"
 9045|  4.64M|      "add         $0x100,%3                     \n"
 9046|  4.64M|      "vmovd       %3,%%xmm5                     \n"
 9047|  4.64M|      "vpunpcklbw  %%xmm0,%%xmm5,%%xmm5          \n"
 9048|  4.64M|      "vpunpcklwd  %%xmm5,%%xmm5,%%xmm5          \n"
 9049|  4.64M|      "vbroadcastss %%xmm5,%%ymm5                \n"
 9050|  4.64M|      "mov         $0x80808080,%%eax             \n"
 9051|  4.64M|      "vmovd       %%eax,%%xmm4                  \n"
 9052|  4.64M|      "vbroadcastss %%xmm4,%%ymm4                \n"
 9053|       |
 9054|       |      // General purpose row blend.
 9055|  4.64M|      LABELALIGN
 9056|  4.64M|      "1:          \n"
 9057|  4.64M|      "vmovdqu     (%1),%%ymm0                   \n"
 9058|  4.64M|      "vmovdqu     0x00(%1,%4,1),%%ymm2          \n"
 9059|  4.64M|      "vpunpckhbw  %%ymm2,%%ymm0,%%ymm1          \n"
 9060|  4.64M|      "vpunpcklbw  %%ymm2,%%ymm0,%%ymm0          \n"
 9061|  4.64M|      "vpsubb      %%ymm4,%%ymm1,%%ymm1          \n"
 9062|  4.64M|      "vpsubb      %%ymm4,%%ymm0,%%ymm0          \n"
 9063|  4.64M|      "vpmaddubsw  %%ymm1,%%ymm5,%%ymm1          \n"
 9064|  4.64M|      "vpmaddubsw  %%ymm0,%%ymm5,%%ymm0          \n"
 9065|  4.64M|      "vpaddw      %%ymm4,%%ymm1,%%ymm1          \n"
 9066|  4.64M|      "vpaddw      %%ymm4,%%ymm0,%%ymm0          \n"
 9067|  4.64M|      "vpsrlw      $0x8,%%ymm1,%%ymm1            \n"
 9068|  4.64M|      "vpsrlw      $0x8,%%ymm0,%%ymm0            \n"
 9069|  4.64M|      "vpackuswb   %%ymm1,%%ymm0,%%ymm0          \n"
 9070|  4.64M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 9071|  4.64M|      "lea         0x20(%1),%1                   \n"
 9072|  4.64M|      "sub         $0x20,%2                      \n"
 9073|  4.64M|      "jg          1b                            \n"
 9074|  4.64M|      "jmp         99f                           \n"
 9075|       |
 9076|       |      // Blend 50 / 50.
 9077|  4.64M|      LABELALIGN
 9078|  4.64M|      "50:         \n"
 9079|  4.64M|      "vmovdqu     (%1),%%ymm0                   \n"
 9080|  4.64M|      "vpavgb      0x00(%1,%4,1),%%ymm0,%%ymm0   \n"
 9081|  4.64M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 9082|  4.64M|      "lea         0x20(%1),%1                   \n"
 9083|  4.64M|      "sub         $0x20,%2                      \n"
 9084|  4.64M|      "jg          50b                           \n"
 9085|  4.64M|      "jmp         99f                           \n"
 9086|       |
 9087|       |      // Blend 100 / 0 - Copy row unchanged.
 9088|  4.64M|      LABELALIGN
 9089|  4.64M|      "100:        \n"
 9090|  4.64M|      "vmovdqu     (%1),%%ymm0                   \n"
 9091|  4.64M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 9092|  4.64M|      "lea         0x20(%1),%1                   \n"
 9093|  4.64M|      "sub         $0x20,%2                      \n"
 9094|  4.64M|      "jg          100b                          \n"
 9095|       |
 9096|  4.64M|      "99:         \n"
 9097|  4.64M|      "vzeroupper  \n"
 9098|  4.64M|      : "+r"(dst_ptr),           // %0
 9099|  4.64M|        "+r"(src_ptr),           // %1
 9100|  4.64M|        "+r"(width),             // %2
 9101|  4.64M|        "+r"(source_y_fraction)  // %3
 9102|  4.64M|      : "r"(src_stride)          // %4
 9103|  4.64M|      : "memory", "cc", "eax", "xmm0", "xmm1", "xmm2", "xmm4", "xmm5");
 9104|  4.64M|}
InterpolateRow_16_AVX2:
 9113|  7.39M|                            int source_y_fraction) {
 9114|  7.39M|  asm volatile(
 9115|  7.39M|      "sub         %1,%0                         \n"
 9116|  7.39M|      "cmp         $0x0,%3                       \n"
 9117|  7.39M|      "je          100f                          \n"
 9118|  7.39M|      "cmp         $0x80,%3                      \n"
 9119|  7.39M|      "je          50f                           \n"
 9120|       |
 9121|  7.39M|      "vmovd       %3,%%xmm0                     \n"
 9122|  7.39M|      "neg         %3                            \n"
 9123|  7.39M|      "add         $0x100,%3                     \n"
 9124|  7.39M|      "vmovd       %3,%%xmm5                     \n"
 9125|  7.39M|      "vpunpcklwd  %%xmm0,%%xmm5,%%xmm5          \n"
 9126|  7.39M|      "vpbroadcastd %%xmm5,%%ymm5                \n"
 9127|  7.39M|      "mov         $0x80008000,%%eax             \n"  // 0x80008000 used to bias
 9128|       |                                                      // unsigned words to
 9129|       |                                                      // signed range for
 9130|       |                                                      // vpmaddwd.
 9131|  7.39M|      "vmovd       %%eax,%%xmm4                  \n"
 9132|  7.39M|      "vbroadcastss %%xmm4,%%ymm4                \n"
 9133|  7.39M|      "mov         $8388736,%%eax                \n"  // 32768 * 256 + 128
 9134|       |                                                      // rounding constant.
 9135|  7.39M|      "vmovd       %%eax,%%xmm3                  \n"
 9136|  7.39M|      "vbroadcastss %%xmm3,%%ymm3                \n"
 9137|       |
 9138|  7.39M|      LABELALIGN
 9139|  7.39M|      "1:          \n"
 9140|  7.39M|      "vmovdqu     (%1),%%ymm0                   \n"
 9141|  7.39M|      "vmovdqu     (%1,%4,2),%%ymm1              \n"
 9142|  7.39M|      "vpunpckhwd  %%ymm1,%%ymm0,%%ymm2          \n"
 9143|  7.39M|      "vpunpcklwd  %%ymm1,%%ymm0,%%ymm0          \n"
 9144|  7.39M|      "vpsubw      %%ymm4,%%ymm2,%%ymm2          \n"
 9145|  7.39M|      "vpsubw      %%ymm4,%%ymm0,%%ymm0          \n"
 9146|  7.39M|      "vpmaddwd    %%ymm5,%%ymm2,%%ymm2          \n"
 9147|  7.39M|      "vpmaddwd    %%ymm5,%%ymm0,%%ymm0          \n"
 9148|  7.39M|      "vpaddd      %%ymm3,%%ymm2,%%ymm2          \n"
 9149|  7.39M|      "vpaddd      %%ymm3,%%ymm0,%%ymm0          \n"
 9150|  7.39M|      "vpsrad      $0x8,%%ymm2,%%ymm2            \n"
 9151|  7.39M|      "vpsrad      $0x8,%%ymm0,%%ymm0            \n"
 9152|  7.39M|      "vpackusdw   %%ymm2,%%ymm0,%%ymm0          \n"
 9153|  7.39M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 9154|  7.39M|      "lea         0x20(%1),%1                   \n"
 9155|  7.39M|      "sub         $0x10,%2                      \n"
 9156|  7.39M|      "jg          1b                            \n"
 9157|  7.39M|      "jmp         99f                           \n"
 9158|       |
 9159|  7.39M|      "50:         \n" LABELALIGN
 9160|  7.39M|      "2:          \n"
 9161|  7.39M|      "vmovdqu     (%1),%%ymm0                   \n"
 9162|  7.39M|      "vpavgw      (%1,%4,2),%%ymm0,%%ymm0       \n"
 9163|  7.39M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 9164|  7.39M|      "lea         0x20(%1),%1                   \n"
 9165|  7.39M|      "sub         $0x10,%2                      \n"
 9166|  7.39M|      "jg          2b                            \n"
 9167|  7.39M|      "jmp         99f                           \n"
 9168|       |
 9169|  7.39M|      "100:        \n" LABELALIGN
 9170|  7.39M|      "3:          \n"
 9171|  7.39M|      "vmovdqu     (%1),%%ymm0                   \n"
 9172|  7.39M|      "vmovdqu     %%ymm0,0x00(%1,%0,1)          \n"
 9173|  7.39M|      "lea         0x20(%1),%1                   \n"
 9174|  7.39M|      "sub         $0x10,%2                      \n"
 9175|  7.39M|      "jg          3b                            \n"
 9176|       |
 9177|  7.39M|      "99:         \n"
 9178|  7.39M|      "vzeroupper  \n"
 9179|  7.39M|      : "+r"(dst_ptr),           // %0
 9180|  7.39M|        "+r"(src_ptr),           // %1
 9181|  7.39M|        "+r"(width),             // %2
 9182|  7.39M|        "+r"(source_y_fraction)  // %3
 9183|  7.39M|      : "r"(src_stride)          // %4
 9184|  7.39M|      : "memory", "cc", "eax", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");
 9185|  7.39M|}

ScalePlane:
 1939|  9.54k|               enum FilterMode filtering) {
 1940|       |  // Reject dimensions larger than 32768 (or smaller than -32768 for height).
 1941|       |  // This prevents FixedDiv signed integer overflows that can lead to division
 1942|       |  // by zero/overflow crashes (SIGFPE on x86) or incorrect step calculations.
 1943|  9.54k|  if (!src || src_width <= 0 || src_height == 0 || src_width > 32768 ||
  ------------------
  |  Branch (1943:7): [True: 0, False: 9.54k]
  |  Branch (1943:15): [True: 0, False: 9.54k]
  |  Branch (1943:33): [True: 0, False: 9.54k]
  |  Branch (1943:52): [True: 0, False: 9.54k]
  ------------------
 1944|  9.54k|      src_height < -32768 || src_height > 32768 || !dst || dst_width <= 0 ||
  ------------------
  |  Branch (1944:7): [True: 0, False: 9.54k]
  |  Branch (1944:30): [True: 0, False: 9.54k]
  |  Branch (1944:52): [True: 0, False: 9.54k]
  |  Branch (1944:60): [True: 0, False: 9.54k]
  ------------------
 1945|  9.54k|      dst_height <= 0) {
  ------------------
  |  Branch (1945:7): [True: 0, False: 9.54k]
  ------------------
 1946|      0|    return -1;
 1947|      0|  }
 1948|       |  // Simplify filtering when possible.
 1949|  9.54k|  filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
 1950|  9.54k|                                filtering);
 1951|       |
 1952|       |  // Negative height means invert the image.
 1953|  9.54k|  if (src_height < 0) {
  ------------------
  |  Branch (1953:7): [True: 0, False: 9.54k]
  ------------------
 1954|      0|    src_height = -src_height;
 1955|      0|    src = src + (src_height - 1) * (ptrdiff_t)src_stride;
 1956|      0|    src_stride = -src_stride;
 1957|      0|  }
 1958|       |  // Use specialized scales to improve performance for common resolutions.
 1959|       |  // For example, all the 1/2 scalings will use ScalePlaneDown2()
 1960|  9.54k|  if (dst_width == src_width && dst_height == src_height) {
  ------------------
  |  Branch (1960:7): [True: 1.15k, False: 8.39k]
  |  Branch (1960:33): [True: 92, False: 1.06k]
  ------------------
 1961|       |    // Straight copy.
 1962|     92|    CopyPlane(src, src_stride, dst, dst_stride, dst_width, dst_height);
 1963|     92|    return 0;
 1964|     92|  }
 1965|  9.45k|  if (dst_width == src_width && filtering != kFilterBox) {
  ------------------
  |  Branch (1965:7): [True: 1.06k, False: 8.39k]
  |  Branch (1965:33): [True: 1.06k, False: 0]
  ------------------
 1966|  1.06k|    int dy = 0;
 1967|  1.06k|    int y = 0;
 1968|       |    // When scaling down, use the center 2 rows to filter.
 1969|       |    // When scaling up, last row of destination uses the last 2 source rows.
 1970|  1.06k|    if (dst_height <= src_height) {
  ------------------
  |  Branch (1970:9): [True: 306, False: 754]
  ------------------
 1971|    306|      dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  241|    306|#define FixedDiv FixedDiv_X86
  ------------------
 1972|    306|      y = CENTERSTART(dy, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  |   33|    306|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (33:28): [True: 0, False: 306]
  |  |  ------------------
  ------------------
 1973|    754|    } else if (src_height > 1 && dst_height > 1) {
  ------------------
  |  Branch (1973:16): [True: 670, False: 84]
  |  Branch (1973:34): [True: 670, False: 0]
  ------------------
 1974|    670|      dy = FixedDiv1(src_height, dst_height);
  ------------------
  |  |  242|    670|#define FixedDiv1 FixedDiv1_X86
  ------------------
 1975|    670|    }
 1976|       |    // Arbitrary scale vertically, but unscaled horizontally.
 1977|  1.06k|    ScalePlaneVertical(src_height, dst_width, dst_height, src_stride,
 1978|  1.06k|                       dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering);
 1979|  1.06k|    return 0;
 1980|  1.06k|  }
 1981|  8.39k|  if (dst_width <= Abs(src_width) && dst_height <= src_height) {
  ------------------
  |  Branch (1981:7): [True: 3.36k, False: 5.02k]
  |  Branch (1981:38): [True: 1.96k, False: 1.40k]
  ------------------
 1982|       |    // Scale down.
 1983|  1.96k|    if (4 * dst_width == 3 * src_width && 4 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (1983:9): [True: 60, False: 1.90k]
  |  Branch (1983:43): [True: 2, False: 58]
  ------------------
 1984|       |      // optimized, 3/4
 1985|      2|      ScalePlaneDown34(src_width, src_height, dst_width, dst_height, src_stride,
 1986|      2|                       dst_stride, src, dst, filtering);
 1987|      2|      return 0;
 1988|      2|    }
 1989|  1.96k|    if (2 * dst_width == src_width && 2 * dst_height == src_height) {
  ------------------
  |  Branch (1989:9): [True: 196, False: 1.76k]
  |  Branch (1989:39): [True: 104, False: 92]
  ------------------
 1990|       |      // optimized, 1/2
 1991|    104|      ScalePlaneDown2(src_width, src_height, dst_width, dst_height, src_stride,
 1992|    104|                      dst_stride, src, dst, filtering);
 1993|    104|      return 0;
 1994|    104|    }
 1995|       |    // 3/8 rounded up for odd sized chroma height.
 1996|  1.85k|    if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (1996:9): [True: 42, False: 1.81k]
  |  Branch (1996:43): [True: 21, False: 21]
  ------------------
 1997|       |      // optimized, 3/8
 1998|     21|      ScalePlaneDown38(src_width, src_height, dst_width, dst_height, src_stride,
 1999|     21|                       dst_stride, src, dst, filtering);
 2000|     21|      return 0;
 2001|     21|    }
 2002|  1.83k|    if (4 * dst_width == src_width && 4 * dst_height == src_height &&
  ------------------
  |  Branch (2002:9): [True: 200, False: 1.63k]
  |  Branch (2002:39): [True: 58, False: 142]
  ------------------
 2003|     58|        (filtering == kFilterBox || filtering == kFilterNone)) {
  ------------------
  |  Branch (2003:10): [True: 58, False: 0]
  |  Branch (2003:37): [True: 0, False: 0]
  ------------------
 2004|       |      // optimized, 1/4
 2005|     58|      ScalePlaneDown4(src_width, src_height, dst_width, dst_height, src_stride,
 2006|     58|                      dst_stride, src, dst, filtering);
 2007|     58|      return 0;
 2008|     58|    }
 2009|  1.83k|  }
 2010|  8.20k|  if (filtering == kFilterBox && dst_height * 2 < src_height) {
  ------------------
  |  Branch (2010:7): [True: 939, False: 7.27k]
  |  Branch (2010:34): [True: 939, False: 0]
  ------------------
 2011|    939|    return ScalePlaneBox(src_width, src_height, dst_width, dst_height,
 2012|    939|                         src_stride, dst_stride, src, dst);
 2013|    939|  }
 2014|  7.27k|  if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
  ------------------
  |  Branch (2014:7): [True: 520, False: 6.75k]
  |  Branch (2014:43): [True: 180, False: 340]
  ------------------
 2015|    180|    ScalePlaneUp2_Linear(src_width, src_height, dst_width, dst_height,
 2016|    180|                         src_stride, dst_stride, src, dst);
 2017|    180|    return 0;
 2018|    180|  }
 2019|  7.09k|  if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
  ------------------
  |  Branch (2019:7): [True: 356, False: 6.73k]
  |  Branch (2019:45): [True: 172, False: 184]
  ------------------
 2020|    172|      (filtering == kFilterBilinear || filtering == kFilterBox)) {
  ------------------
  |  Branch (2020:8): [True: 146, False: 26]
  |  Branch (2020:40): [True: 0, False: 26]
  ------------------
 2021|    146|    ScalePlaneUp2_Bilinear(src_width, src_height, dst_width, dst_height,
 2022|    146|                           src_stride, dst_stride, src, dst);
 2023|    146|    return 0;
 2024|    146|  }
 2025|  6.94k|  if (filtering && dst_height > src_height) {
  ------------------
  |  Branch (2025:7): [True: 6.37k, False: 574]
  |  Branch (2025:20): [True: 4.01k, False: 2.35k]
  ------------------
 2026|  4.01k|    return ScalePlaneBilinearUp(src_width, src_height, dst_width, dst_height,
 2027|  4.01k|                                src_stride, dst_stride, src, dst, filtering);
 2028|  4.01k|  }
 2029|  2.93k|  if (filtering) {
  ------------------
  |  Branch (2029:7): [True: 2.35k, False: 574]
  ------------------
 2030|  2.35k|    return ScalePlaneBilinearDown(src_width, src_height, dst_width, dst_height,
 2031|  2.35k|                                  src_stride, dst_stride, src, dst, filtering);
 2032|  2.35k|  }
 2033|    574|  ScalePlaneSimple(src_width, src_height, dst_width, dst_height, src_stride,
 2034|    574|                   dst_stride, src, dst);
 2035|    574|  return 0;
 2036|  2.93k|}
ScalePlane_16:
 2047|  13.1k|                  enum FilterMode filtering) {
 2048|       |  // Reject dimensions larger than 32768 (or smaller than -32768 for height).
 2049|       |  // This prevents FixedDiv signed integer overflows that can lead to division
 2050|       |  // by zero/overflow crashes (SIGFPE on x86) or incorrect step calculations.
 2051|  13.1k|  if (!src || src_width <= 0 || src_height == 0 || src_width > 32768 ||
  ------------------
  |  Branch (2051:7): [True: 0, False: 13.1k]
  |  Branch (2051:15): [True: 0, False: 13.1k]
  |  Branch (2051:33): [True: 0, False: 13.1k]
  |  Branch (2051:52): [True: 0, False: 13.1k]
  ------------------
 2052|  13.1k|      src_height < -32768 || src_height > 32768 || !dst || dst_width <= 0 ||
  ------------------
  |  Branch (2052:7): [True: 0, False: 13.1k]
  |  Branch (2052:30): [True: 0, False: 13.1k]
  |  Branch (2052:52): [True: 0, False: 13.1k]
  |  Branch (2052:60): [True: 0, False: 13.1k]
  ------------------
 2053|  13.1k|      dst_height <= 0) {
  ------------------
  |  Branch (2053:7): [True: 0, False: 13.1k]
  ------------------
 2054|      0|    return -1;
 2055|      0|  }
 2056|       |  // Simplify filtering when possible.
 2057|  13.1k|  filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
 2058|  13.1k|                                filtering);
 2059|       |
 2060|       |  // Negative height means invert the image.
 2061|  13.1k|  if (src_height < 0) {
  ------------------
  |  Branch (2061:7): [True: 0, False: 13.1k]
  ------------------
 2062|      0|    src_height = -src_height;
 2063|      0|    src = src + (src_height - 1) * (ptrdiff_t)src_stride;
 2064|      0|    src_stride = -src_stride;
 2065|      0|  }
 2066|       |  // Use specialized scales to improve performance for common resolutions.
 2067|       |  // For example, all the 1/2 scalings will use ScalePlaneDown2()
 2068|  13.1k|  if (dst_width == src_width && dst_height == src_height) {
  ------------------
  |  Branch (2068:7): [True: 1.25k, False: 11.9k]
  |  Branch (2068:33): [True: 50, False: 1.20k]
  ------------------
 2069|       |    // Straight copy.
 2070|     50|    CopyPlane_16(src, src_stride, dst, dst_stride, dst_width, dst_height);
 2071|     50|    return 0;
 2072|     50|  }
 2073|  13.1k|  if (dst_width == src_width && filtering != kFilterBox) {
  ------------------
  |  Branch (2073:7): [True: 1.20k, False: 11.9k]
  |  Branch (2073:33): [True: 1.20k, False: 0]
  ------------------
 2074|  1.20k|    int dy = 0;
 2075|  1.20k|    int y = 0;
 2076|       |    // When scaling down, use the center 2 rows to filter.
 2077|       |    // When scaling up, last row of destination uses the last 2 source rows.
 2078|  1.20k|    if (dst_height <= src_height) {
  ------------------
  |  Branch (2078:9): [True: 498, False: 709]
  ------------------
 2079|    498|      dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  241|    498|#define FixedDiv FixedDiv_X86
  ------------------
 2080|    498|      y = CENTERSTART(dy, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  |   33|    498|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (33:28): [True: 0, False: 498]
  |  |  ------------------
  ------------------
 2081|       |      // When scaling up, ensure the last row of destination uses the last
 2082|       |      // source. Avoid divide by zero for dst_height but will do no scaling
 2083|       |      // later.
 2084|    709|    } else if (src_height > 1 && dst_height > 1) {
  ------------------
  |  Branch (2084:16): [True: 638, False: 71]
  |  Branch (2084:34): [True: 638, False: 0]
  ------------------
 2085|    638|      dy = FixedDiv1(src_height, dst_height);
  ------------------
  |  |  242|    638|#define FixedDiv1 FixedDiv1_X86
  ------------------
 2086|    638|    }
 2087|       |    // Arbitrary scale vertically, but unscaled horizontally.
 2088|  1.20k|    ScalePlaneVertical_16(src_height, dst_width, dst_height, src_stride,
 2089|  1.20k|                          dst_stride, src, dst, 0, y, dy, /*bpp=*/1, filtering);
 2090|  1.20k|    return 0;
 2091|  1.20k|  }
 2092|  11.9k|  if (dst_width <= Abs(src_width) && dst_height <= src_height) {
  ------------------
  |  Branch (2092:7): [True: 4.87k, False: 7.05k]
  |  Branch (2092:38): [True: 2.95k, False: 1.92k]
  ------------------
 2093|       |    // Scale down.
 2094|  2.95k|    if (4 * dst_width == 3 * src_width && 4 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (2094:9): [True: 58, False: 2.89k]
  |  Branch (2094:43): [True: 2, False: 56]
  ------------------
 2095|       |      // optimized, 3/4
 2096|      2|      ScalePlaneDown34_16(src_width, src_height, dst_width, dst_height,
 2097|      2|                          src_stride, dst_stride, src, dst, filtering);
 2098|      2|      return 0;
 2099|      2|    }
 2100|  2.95k|    if (2 * dst_width == src_width && 2 * dst_height == src_height) {
  ------------------
  |  Branch (2100:9): [True: 263, False: 2.69k]
  |  Branch (2100:39): [True: 129, False: 134]
  ------------------
 2101|       |      // optimized, 1/2
 2102|    129|      ScalePlaneDown2_16(src_width, src_height, dst_width, dst_height,
 2103|    129|                         src_stride, dst_stride, src, dst, filtering);
 2104|    129|      return 0;
 2105|    129|    }
 2106|       |    // 3/8 rounded up for odd sized chroma height.
 2107|  2.82k|    if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
  ------------------
  |  Branch (2107:9): [True: 24, False: 2.80k]
  |  Branch (2107:43): [True: 14, False: 10]
  ------------------
 2108|       |      // optimized, 3/8
 2109|     14|      ScalePlaneDown38_16(src_width, src_height, dst_width, dst_height,
 2110|     14|                          src_stride, dst_stride, src, dst, filtering);
 2111|     14|      return 0;
 2112|     14|    }
 2113|  2.81k|    if (4 * dst_width == src_width && 4 * dst_height == src_height &&
  ------------------
  |  Branch (2113:9): [True: 182, False: 2.62k]
  |  Branch (2113:39): [True: 59, False: 123]
  ------------------
 2114|     59|        (filtering == kFilterBox || filtering == kFilterNone)) {
  ------------------
  |  Branch (2114:10): [True: 59, False: 0]
  |  Branch (2114:37): [True: 0, False: 0]
  ------------------
 2115|       |      // optimized, 1/4
 2116|     59|      ScalePlaneDown4_16(src_width, src_height, dst_width, dst_height,
 2117|     59|                         src_stride, dst_stride, src, dst, filtering);
 2118|     59|      return 0;
 2119|     59|    }
 2120|  2.81k|  }
 2121|  11.7k|  if (filtering == kFilterBox && dst_height * 2 < src_height) {
  ------------------
  |  Branch (2121:7): [True: 1.50k, False: 10.2k]
  |  Branch (2121:34): [True: 1.50k, False: 0]
  ------------------
 2122|  1.50k|    return ScalePlaneBox_16(src_width, src_height, dst_width, dst_height,
 2123|  1.50k|                            src_stride, dst_stride, src, dst);
 2124|  1.50k|  }
 2125|  10.2k|  if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
  ------------------
  |  Branch (2125:7): [True: 180, False: 10.0k]
  |  Branch (2125:43): [True: 0, False: 180]
  ------------------
 2126|      0|    ScalePlaneUp2_16_Linear(src_width, src_height, dst_width, dst_height,
 2127|      0|                            src_stride, dst_stride, src, dst);
 2128|      0|    return 0;
 2129|      0|  }
 2130|  10.2k|  if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
  ------------------
  |  Branch (2130:7): [True: 305, False: 9.91k]
  |  Branch (2130:45): [True: 20, False: 285]
  ------------------
 2131|     20|      (filtering == kFilterBilinear || filtering == kFilterBox)) {
  ------------------
  |  Branch (2131:8): [True: 0, False: 20]
  |  Branch (2131:40): [True: 0, False: 20]
  ------------------
 2132|      0|    ScalePlaneUp2_16_Bilinear(src_width, src_height, dst_width, dst_height,
 2133|      0|                              src_stride, dst_stride, src, dst);
 2134|      0|    return 0;
 2135|      0|  }
 2136|  10.2k|  if (filtering && dst_height > src_height) {
  ------------------
  |  Branch (2136:7): [True: 9.57k, False: 650]
  |  Branch (2136:20): [True: 4.11k, False: 5.46k]
  ------------------
 2137|  4.11k|    return ScalePlaneBilinearUp_16(src_width, src_height, dst_width, dst_height,
 2138|  4.11k|                                   src_stride, dst_stride, src, dst, filtering);
 2139|  4.11k|  }
 2140|  6.11k|  if (filtering) {
  ------------------
  |  Branch (2140:7): [True: 5.46k, False: 650]
  ------------------
 2141|  5.46k|    return ScalePlaneBilinearDown_16(src_width, src_height, dst_width,
 2142|  5.46k|                                     dst_height, src_stride, dst_stride, src,
 2143|  5.46k|                                     dst, filtering);
 2144|  5.46k|  }
 2145|    650|  ScalePlaneSimple_16(src_width, src_height, dst_width, dst_height, src_stride,
 2146|    650|                      dst_stride, src, dst);
 2147|    650|  return 0;
 2148|  6.11k|}
ScalePlane_12:
 2159|  13.5k|                  enum FilterMode filtering) {
 2160|       |  // Reject dimensions larger than 32768 (or smaller than -32768 for height).
 2161|       |  // This prevents FixedDiv signed integer overflows that can lead to division
 2162|       |  // by zero/overflow crashes (SIGFPE on x86) or incorrect step calculations.
 2163|  13.5k|  if (!src || src_width <= 0 || src_height == 0 || src_width > 32768 ||
  ------------------
  |  Branch (2163:7): [True: 0, False: 13.5k]
  |  Branch (2163:15): [True: 0, False: 13.5k]
  |  Branch (2163:33): [True: 0, False: 13.5k]
  |  Branch (2163:52): [True: 0, False: 13.5k]
  ------------------
 2164|  13.5k|      src_height < -32768 || src_height > 32768 || !dst || dst_width <= 0 ||
  ------------------
  |  Branch (2164:7): [True: 0, False: 13.5k]
  |  Branch (2164:30): [True: 0, False: 13.5k]
  |  Branch (2164:52): [True: 0, False: 13.5k]
  |  Branch (2164:60): [True: 0, False: 13.5k]
  ------------------
 2165|  13.5k|      dst_height <= 0) {
  ------------------
  |  Branch (2165:7): [True: 0, False: 13.5k]
  ------------------
 2166|      0|    return -1;
 2167|      0|  }
 2168|       |  // Simplify filtering when possible.
 2169|  13.5k|  filtering = ScaleFilterReduce(src_width, src_height, dst_width, dst_height,
 2170|  13.5k|                                filtering);
 2171|       |
 2172|       |  // Negative height means invert the image.
 2173|  13.5k|  if (src_height < 0) {
  ------------------
  |  Branch (2173:7): [True: 0, False: 13.5k]
  ------------------
 2174|      0|    src_height = -src_height;
 2175|      0|    src = src + (src_height - 1) * (ptrdiff_t)src_stride;
 2176|      0|    src_stride = -src_stride;
 2177|      0|  }
 2178|       |
 2179|  13.5k|  if ((dst_width + 1) / 2 == src_width && filtering == kFilterLinear) {
  ------------------
  |  Branch (2179:7): [True: 602, False: 12.9k]
  |  Branch (2179:43): [True: 177, False: 425]
  ------------------
 2180|    177|    ScalePlaneUp2_12_Linear(src_width, src_height, dst_width, dst_height,
 2181|    177|                            src_stride, dst_stride, src, dst);
 2182|    177|    return 0;
 2183|    177|  }
 2184|  13.3k|  if ((dst_height + 1) / 2 == src_height && (dst_width + 1) / 2 == src_width &&
  ------------------
  |  Branch (2184:7): [True: 466, False: 12.8k]
  |  Branch (2184:45): [True: 173, False: 293]
  ------------------
 2185|    173|      (filtering == kFilterBilinear || filtering == kFilterBox)) {
  ------------------
  |  Branch (2185:8): [True: 138, False: 35]
  |  Branch (2185:40): [True: 0, False: 35]
  ------------------
 2186|    138|    ScalePlaneUp2_12_Bilinear(src_width, src_height, dst_width, dst_height,
 2187|    138|                              src_stride, dst_stride, src, dst);
 2188|    138|    return 0;
 2189|    138|  }
 2190|       |
 2191|  13.1k|  return ScalePlane_16(src, src_stride, src_width, src_height, dst, dst_stride,
 2192|  13.1k|                       dst_width, dst_height, filtering);
 2193|  13.3k|}
scale.cc:_ZN6libyuvL3AbsEi:
   28|  39.9k|static __inline int Abs(int v) {
   29|  39.9k|  return v >= 0 ? v : -v;
  ------------------
  |  Branch (29:10): [True: 39.9k, False: 0]
  ------------------
   30|  39.9k|}
scale.cc:_ZN6libyuvL16ScalePlaneDown34EiiiillPKhPhNS_10FilterModeE:
  339|      2|                             enum FilterMode filtering) {
  340|      2|  int y;
  341|      2|  void (*ScaleRowDown34_0)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  342|      2|                           uint8_t* dst_ptr, int dst_width);
  343|      2|  void (*ScaleRowDown34_1)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  344|      2|                           uint8_t* dst_ptr, int dst_width);
  345|      2|  const ptrdiff_t filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
  ------------------
  |  Branch (345:35): [True: 0, False: 2]
  ------------------
  346|      2|  (void)src_width;
  347|      2|  (void)src_height;
  348|      2|  assert(dst_width % 3 == 0);
  349|      2|  if (!filtering) {
  ------------------
  |  Branch (349:7): [True: 0, False: 2]
  ------------------
  350|      0|    ScaleRowDown34_0 = ScaleRowDown34_C;
  351|      0|    ScaleRowDown34_1 = ScaleRowDown34_C;
  352|      2|  } else {
  353|      2|    ScaleRowDown34_0 = ScaleRowDown34_0_Box_C;
  354|      2|    ScaleRowDown34_1 = ScaleRowDown34_1_Box_C;
  355|      2|  }
  356|       |#if defined(HAS_SCALEROWDOWN34_NEON)
  357|       |  if (TestCpuFlag(kCpuHasNEON)) {
  358|       |#if defined(__aarch64__)
  359|       |    if (dst_width % 48 == 0) {
  360|       |#else
  361|       |    if (dst_width % 24 == 0) {
  362|       |#endif
  363|       |      if (!filtering) {
  364|       |        ScaleRowDown34_0 = ScaleRowDown34_NEON;
  365|       |        ScaleRowDown34_1 = ScaleRowDown34_NEON;
  366|       |      } else {
  367|       |        ScaleRowDown34_0 = ScaleRowDown34_0_Box_NEON;
  368|       |        ScaleRowDown34_1 = ScaleRowDown34_1_Box_NEON;
  369|       |      }
  370|       |    } else {
  371|       |      if (!filtering) {
  372|       |        ScaleRowDown34_0 = ScaleRowDown34_Any_NEON;
  373|       |        ScaleRowDown34_1 = ScaleRowDown34_Any_NEON;
  374|       |      } else {
  375|       |        ScaleRowDown34_0 = ScaleRowDown34_0_Box_Any_NEON;
  376|       |        ScaleRowDown34_1 = ScaleRowDown34_1_Box_Any_NEON;
  377|       |      }
  378|       |    }
  379|       |  }
  380|       |#endif
  381|       |#if defined(HAS_SCALEROWDOWN34_LSX)
  382|       |  if (TestCpuFlag(kCpuHasLSX)) {
  383|       |    if (dst_width % 48 == 0) {
  384|       |      if (!filtering) {
  385|       |        ScaleRowDown34_0 = ScaleRowDown34_LSX;
  386|       |        ScaleRowDown34_1 = ScaleRowDown34_LSX;
  387|       |      } else {
  388|       |        ScaleRowDown34_0 = ScaleRowDown34_0_Box_LSX;
  389|       |        ScaleRowDown34_1 = ScaleRowDown34_1_Box_LSX;
  390|       |      }
  391|       |    } else {
  392|       |      if (!filtering) {
  393|       |        ScaleRowDown34_0 = ScaleRowDown34_Any_LSX;
  394|       |        ScaleRowDown34_1 = ScaleRowDown34_Any_LSX;
  395|       |      } else {
  396|       |        ScaleRowDown34_0 = ScaleRowDown34_0_Box_Any_LSX;
  397|       |        ScaleRowDown34_1 = ScaleRowDown34_1_Box_Any_LSX;
  398|       |      }
  399|       |    }
  400|       |  }
  401|       |#endif
  402|      2|#if defined(HAS_SCALEROWDOWN34_SSSE3)
  403|      2|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (403:7): [True: 2, False: 0]
  ------------------
  404|      2|    if (dst_width % 24 == 0) {
  ------------------
  |  Branch (404:9): [True: 0, False: 2]
  ------------------
  405|      0|      if (!filtering) {
  ------------------
  |  Branch (405:11): [True: 0, False: 0]
  ------------------
  406|      0|        ScaleRowDown34_0 = ScaleRowDown34_SSSE3;
  407|      0|        ScaleRowDown34_1 = ScaleRowDown34_SSSE3;
  408|      0|      } else {
  409|      0|        ScaleRowDown34_0 = ScaleRowDown34_0_Box_SSSE3;
  410|      0|        ScaleRowDown34_1 = ScaleRowDown34_1_Box_SSSE3;
  411|      0|      }
  412|      2|    } else {
  413|      2|      if (!filtering) {
  ------------------
  |  Branch (413:11): [True: 0, False: 2]
  ------------------
  414|      0|        ScaleRowDown34_0 = ScaleRowDown34_Any_SSSE3;
  415|      0|        ScaleRowDown34_1 = ScaleRowDown34_Any_SSSE3;
  416|      2|      } else {
  417|      2|        ScaleRowDown34_0 = ScaleRowDown34_0_Box_Any_SSSE3;
  418|      2|        ScaleRowDown34_1 = ScaleRowDown34_1_Box_Any_SSSE3;
  419|      2|      }
  420|      2|    }
  421|      2|  }
  422|      2|#endif
  423|       |#if defined(HAS_SCALEROWDOWN34_RVV)
  424|       |  if (TestCpuFlag(kCpuHasRVV)) {
  425|       |    if (!filtering) {
  426|       |      ScaleRowDown34_0 = ScaleRowDown34_RVV;
  427|       |      ScaleRowDown34_1 = ScaleRowDown34_RVV;
  428|       |    } else {
  429|       |      ScaleRowDown34_0 = ScaleRowDown34_0_Box_RVV;
  430|       |      ScaleRowDown34_1 = ScaleRowDown34_1_Box_RVV;
  431|       |    }
  432|       |  }
  433|       |#endif
  434|       |
  435|      4|  for (y = 0; y < dst_height - 2; y += 3) {
  ------------------
  |  Branch (435:15): [True: 2, False: 2]
  ------------------
  436|      2|    ScaleRowDown34_0(src_ptr, filter_stride, dst_ptr, dst_width);
  437|      2|    src_ptr += src_stride;
  438|      2|    dst_ptr += dst_stride;
  439|      2|    ScaleRowDown34_1(src_ptr, filter_stride, dst_ptr, dst_width);
  440|      2|    src_ptr += src_stride;
  441|      2|    dst_ptr += dst_stride;
  442|      2|    ScaleRowDown34_0(src_ptr + src_stride, -filter_stride, dst_ptr, dst_width);
  443|      2|    src_ptr += src_stride * 2;
  444|      2|    dst_ptr += dst_stride;
  445|      2|  }
  446|       |
  447|       |  // Remainder 1 or 2 rows with last row vertically unfiltered
  448|      2|  if ((dst_height % 3) == 2) {
  ------------------
  |  Branch (448:7): [True: 0, False: 2]
  ------------------
  449|      0|    ScaleRowDown34_0(src_ptr, filter_stride, dst_ptr, dst_width);
  450|      0|    src_ptr += src_stride;
  451|      0|    dst_ptr += dst_stride;
  452|      0|    ScaleRowDown34_1(src_ptr, 0, dst_ptr, dst_width);
  453|      2|  } else if ((dst_height % 3) == 1) {
  ------------------
  |  Branch (453:14): [True: 0, False: 2]
  ------------------
  454|      0|    ScaleRowDown34_0(src_ptr, 0, dst_ptr, dst_width);
  455|      0|  }
  456|      2|}
scale.cc:_ZN6libyuvL15ScalePlaneDown2EiiiillPKhPhNS_10FilterModeE:
   47|    104|                            enum FilterMode filtering) {
   48|    104|  int y;
   49|    104|  void (*ScaleRowDown2)(const uint8_t* src_ptr, ptrdiff_t src_stride,
   50|    104|                        uint8_t* dst_ptr, int dst_width) =
   51|    104|      filtering == kFilterNone
  ------------------
  |  Branch (51:7): [True: 0, False: 104]
  ------------------
   52|    104|          ? ScaleRowDown2_C
   53|    104|          : (filtering == kFilterLinear ? ScaleRowDown2Linear_C
  ------------------
  |  Branch (53:14): [True: 0, False: 104]
  ------------------
   54|    104|                                        : ScaleRowDown2Box_C);
   55|    104|  ptrdiff_t row_stride = src_stride * 2;
   56|    104|  (void)src_width;
   57|    104|  (void)src_height;
   58|    104|  if (!filtering) {
  ------------------
  |  Branch (58:7): [True: 0, False: 104]
  ------------------
   59|      0|    src_ptr += src_stride;  // Point to odd rows.
   60|      0|    src_stride = 0;
   61|      0|  }
   62|       |
   63|       |#if defined(HAS_SCALEROWDOWN2_NEON)
   64|       |  if (TestCpuFlag(kCpuHasNEON)) {
   65|       |    ScaleRowDown2 =
   66|       |        filtering == kFilterNone
   67|       |            ? ScaleRowDown2_Any_NEON
   68|       |            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_NEON
   69|       |                                          : ScaleRowDown2Box_Any_NEON);
   70|       |    if (IS_ALIGNED(dst_width, 16)) {
   71|       |      ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_NEON
   72|       |                                               : (filtering == kFilterLinear
   73|       |                                                      ? ScaleRowDown2Linear_NEON
   74|       |                                                      : ScaleRowDown2Box_NEON);
   75|       |    }
   76|       |  }
   77|       |#endif
   78|       |#if defined(HAS_SCALEROWDOWN2_SME)
   79|       |  if (TestCpuFlag(kCpuHasSME)) {
   80|       |    ScaleRowDown2 = filtering == kFilterNone     ? ScaleRowDown2_SME
   81|       |                    : filtering == kFilterLinear ? ScaleRowDown2Linear_SME
   82|       |                                                 : ScaleRowDown2Box_SME;
   83|       |  }
   84|       |#endif
   85|    104|#if defined(HAS_SCALEROWDOWN2_SSSE3)
   86|    104|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (86:7): [True: 104, False: 0]
  ------------------
   87|    104|    ScaleRowDown2 =
   88|    104|        filtering == kFilterNone
  ------------------
  |  Branch (88:9): [True: 0, False: 104]
  ------------------
   89|    104|            ? ScaleRowDown2_Any_SSSE3
   90|    104|            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_SSSE3
  ------------------
  |  Branch (90:16): [True: 0, False: 104]
  ------------------
   91|    104|                                          : ScaleRowDown2Box_Any_SSSE3);
   92|    104|    if (IS_ALIGNED(dst_width, 16)) {
  ------------------
  |  | 1002|    104|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 12, False: 92]
  |  |  ------------------
  ------------------
   93|     12|      ScaleRowDown2 =
   94|     12|          filtering == kFilterNone
  ------------------
  |  Branch (94:11): [True: 0, False: 12]
  ------------------
   95|     12|              ? ScaleRowDown2_SSSE3
   96|     12|              : (filtering == kFilterLinear ? ScaleRowDown2Linear_SSSE3
  ------------------
  |  Branch (96:18): [True: 0, False: 12]
  ------------------
   97|     12|                                            : ScaleRowDown2Box_SSSE3);
   98|     12|    }
   99|    104|  }
  100|    104|#endif
  101|    104|#if defined(HAS_SCALEROWDOWN2_AVX2)
  102|    104|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (102:7): [True: 104, False: 0]
  ------------------
  103|    104|    ScaleRowDown2 =
  104|    104|        filtering == kFilterNone
  ------------------
  |  Branch (104:9): [True: 0, False: 104]
  ------------------
  105|    104|            ? ScaleRowDown2_Any_AVX2
  106|    104|            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_AVX2
  ------------------
  |  Branch (106:16): [True: 0, False: 104]
  ------------------
  107|    104|                                          : ScaleRowDown2Box_Any_AVX2);
  108|    104|    if (IS_ALIGNED(dst_width, 32)) {
  ------------------
  |  | 1002|    104|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 12, False: 92]
  |  |  ------------------
  ------------------
  109|     12|      ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_AVX2
  ------------------
  |  Branch (109:23): [True: 0, False: 12]
  ------------------
  110|     12|                                               : (filtering == kFilterLinear
  ------------------
  |  Branch (110:51): [True: 0, False: 12]
  ------------------
  111|     12|                                                      ? ScaleRowDown2Linear_AVX2
  112|     12|                                                      : ScaleRowDown2Box_AVX2);
  113|     12|    }
  114|    104|  }
  115|    104|#endif
  116|       |#if defined(HAS_SCALEROWDOWN2_LSX)
  117|       |  if (TestCpuFlag(kCpuHasLSX)) {
  118|       |    ScaleRowDown2 =
  119|       |        filtering == kFilterNone
  120|       |            ? ScaleRowDown2_Any_LSX
  121|       |            : (filtering == kFilterLinear ? ScaleRowDown2Linear_Any_LSX
  122|       |                                          : ScaleRowDown2Box_Any_LSX);
  123|       |    if (IS_ALIGNED(dst_width, 32)) {
  124|       |      ScaleRowDown2 = filtering == kFilterNone ? ScaleRowDown2_LSX
  125|       |                                               : (filtering == kFilterLinear
  126|       |                                                      ? ScaleRowDown2Linear_LSX
  127|       |                                                      : ScaleRowDown2Box_LSX);
  128|       |    }
  129|       |  }
  130|       |#endif
  131|       |#if defined(HAS_SCALEROWDOWN2_RVV)
  132|       |  if (TestCpuFlag(kCpuHasRVV)) {
  133|       |    ScaleRowDown2 = filtering == kFilterNone
  134|       |                        ? ScaleRowDown2_RVV
  135|       |                        : (filtering == kFilterLinear ? ScaleRowDown2Linear_RVV
  136|       |                                                      : ScaleRowDown2Box_RVV);
  137|       |  }
  138|       |#endif
  139|       |
  140|    104|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (140:7): [True: 0, False: 104]
  ------------------
  141|      0|    src_stride = 0;
  142|      0|  }
  143|       |  // TODO(fbarchard): Loop through source height to allow odd height.
  144|    682|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (144:15): [True: 578, False: 104]
  ------------------
  145|    578|    ScaleRowDown2(src_ptr, src_stride, dst_ptr, dst_width);
  146|    578|    src_ptr += row_stride;
  147|    578|    dst_ptr += dst_stride;
  148|    578|  }
  149|    104|}
scale.cc:_ZN6libyuvL16ScalePlaneDown38EiiiillPKhPhNS_10FilterModeE:
  552|     21|                             enum FilterMode filtering) {
  553|     21|  int y;
  554|     21|  void (*ScaleRowDown38_3)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  555|     21|                           uint8_t* dst_ptr, int dst_width);
  556|     21|  void (*ScaleRowDown38_2)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  557|     21|                           uint8_t* dst_ptr, int dst_width);
  558|     21|  const ptrdiff_t filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
  ------------------
  |  Branch (558:35): [True: 0, False: 21]
  ------------------
  559|     21|  assert(dst_width % 3 == 0);
  560|     21|  (void)src_width;
  561|     21|  (void)src_height;
  562|     21|  if (!filtering) {
  ------------------
  |  Branch (562:7): [True: 0, False: 21]
  ------------------
  563|      0|    ScaleRowDown38_3 = ScaleRowDown38_C;
  564|      0|    ScaleRowDown38_2 = ScaleRowDown38_C;
  565|     21|  } else {
  566|     21|    ScaleRowDown38_3 = ScaleRowDown38_3_Box_C;
  567|     21|    ScaleRowDown38_2 = ScaleRowDown38_2_Box_C;
  568|     21|  }
  569|       |
  570|       |#if defined(HAS_SCALEROWDOWN38_NEON)
  571|       |  if (TestCpuFlag(kCpuHasNEON)) {
  572|       |    if (!filtering) {
  573|       |      ScaleRowDown38_3 = ScaleRowDown38_Any_NEON;
  574|       |      ScaleRowDown38_2 = ScaleRowDown38_Any_NEON;
  575|       |    } else {
  576|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_Any_NEON;
  577|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_Any_NEON;
  578|       |    }
  579|       |    if (dst_width % 12 == 0) {
  580|       |      if (!filtering) {
  581|       |        ScaleRowDown38_3 = ScaleRowDown38_NEON;
  582|       |        ScaleRowDown38_2 = ScaleRowDown38_NEON;
  583|       |      } else {
  584|       |        ScaleRowDown38_3 = ScaleRowDown38_3_Box_NEON;
  585|       |        ScaleRowDown38_2 = ScaleRowDown38_2_Box_NEON;
  586|       |      }
  587|       |    }
  588|       |  }
  589|       |#endif
  590|     21|#if defined(HAS_SCALEROWDOWN38_SSSE3)
  591|     21|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (591:7): [True: 21, False: 0]
  ------------------
  592|     21|    if (!filtering) {
  ------------------
  |  Branch (592:9): [True: 0, False: 21]
  ------------------
  593|      0|      ScaleRowDown38_3 = ScaleRowDown38_Any_SSSE3;
  594|      0|      ScaleRowDown38_2 = ScaleRowDown38_Any_SSSE3;
  595|     21|    } else {
  596|     21|      ScaleRowDown38_3 = ScaleRowDown38_3_Box_Any_SSSE3;
  597|     21|      ScaleRowDown38_2 = ScaleRowDown38_2_Box_Any_SSSE3;
  598|     21|    }
  599|     21|    if (dst_width % 12 == 0 && !filtering) {
  ------------------
  |  Branch (599:9): [True: 12, False: 9]
  |  Branch (599:32): [True: 0, False: 12]
  ------------------
  600|      0|      ScaleRowDown38_3 = ScaleRowDown38_SSSE3;
  601|      0|      ScaleRowDown38_2 = ScaleRowDown38_SSSE3;
  602|      0|    }
  603|     21|    if (dst_width % 6 == 0 && filtering) {
  ------------------
  |  Branch (603:9): [True: 15, False: 6]
  |  Branch (603:31): [True: 15, False: 0]
  ------------------
  604|     15|      ScaleRowDown38_3 = ScaleRowDown38_3_Box_SSSE3;
  605|     15|      ScaleRowDown38_2 = ScaleRowDown38_2_Box_SSSE3;
  606|     15|    }
  607|     21|  }
  608|     21|#endif
  609|       |#if defined(HAS_SCALEROWDOWN38_LSX)
  610|       |  if (TestCpuFlag(kCpuHasLSX)) {
  611|       |    if (!filtering) {
  612|       |      ScaleRowDown38_3 = ScaleRowDown38_Any_LSX;
  613|       |      ScaleRowDown38_2 = ScaleRowDown38_Any_LSX;
  614|       |    } else {
  615|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_Any_LSX;
  616|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_Any_LSX;
  617|       |    }
  618|       |    if (dst_width % 12 == 0) {
  619|       |      if (!filtering) {
  620|       |        ScaleRowDown38_3 = ScaleRowDown38_LSX;
  621|       |        ScaleRowDown38_2 = ScaleRowDown38_LSX;
  622|       |      } else {
  623|       |        ScaleRowDown38_3 = ScaleRowDown38_3_Box_LSX;
  624|       |        ScaleRowDown38_2 = ScaleRowDown38_2_Box_LSX;
  625|       |      }
  626|       |    }
  627|       |  }
  628|       |#endif
  629|       |#if defined(HAS_SCALEROWDOWN38_RVV)
  630|       |  if (TestCpuFlag(kCpuHasRVV)) {
  631|       |    if (!filtering) {
  632|       |      ScaleRowDown38_3 = ScaleRowDown38_RVV;
  633|       |      ScaleRowDown38_2 = ScaleRowDown38_RVV;
  634|       |    } else {
  635|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_RVV;
  636|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_RVV;
  637|       |    }
  638|       |  }
  639|       |#endif
  640|       |
  641|     63|  for (y = 0; y < dst_height - 2; y += 3) {
  ------------------
  |  Branch (641:15): [True: 42, False: 21]
  ------------------
  642|     42|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  643|     42|    src_ptr += src_stride * 3;
  644|     42|    dst_ptr += dst_stride;
  645|     42|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  646|     42|    src_ptr += src_stride * 3;
  647|     42|    dst_ptr += dst_stride;
  648|     42|    ScaleRowDown38_2(src_ptr, filter_stride, dst_ptr, dst_width);
  649|     42|    src_ptr += src_stride * 2;
  650|     42|    dst_ptr += dst_stride;
  651|     42|  }
  652|       |
  653|       |  // Remainder 1 or 2 rows with last row vertically unfiltered
  654|     21|  if ((dst_height % 3) == 2) {
  ------------------
  |  Branch (654:7): [True: 0, False: 21]
  ------------------
  655|      0|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  656|      0|    src_ptr += src_stride * 3;
  657|      0|    dst_ptr += dst_stride;
  658|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  659|     21|  } else if ((dst_height % 3) == 1) {
  ------------------
  |  Branch (659:14): [True: 0, False: 21]
  ------------------
  660|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  661|      0|  }
  662|     21|}
scale.cc:_ZN6libyuvL15ScalePlaneDown4EiiiillPKhPhNS_10FilterModeE:
  223|     58|                            enum FilterMode filtering) {
  224|     58|  int y;
  225|     58|  void (*ScaleRowDown4)(const uint8_t* src_ptr, ptrdiff_t src_stride,
  226|     58|                        uint8_t* dst_ptr, int dst_width) =
  227|     58|      filtering ? ScaleRowDown4Box_C : ScaleRowDown4_C;
  ------------------
  |  Branch (227:7): [True: 58, False: 0]
  ------------------
  228|     58|  ptrdiff_t row_stride = src_stride * 4;
  229|     58|  (void)src_width;
  230|     58|  (void)src_height;
  231|     58|  if (!filtering) {
  ------------------
  |  Branch (231:7): [True: 0, False: 58]
  ------------------
  232|      0|    src_ptr += src_stride * 2;  // Point to row 2.
  233|      0|    src_stride = 0;
  234|      0|  }
  235|       |#if defined(HAS_SCALEROWDOWN4_NEON)
  236|       |  if (TestCpuFlag(kCpuHasNEON)) {
  237|       |    ScaleRowDown4 =
  238|       |        filtering ? ScaleRowDown4Box_Any_NEON : ScaleRowDown4_Any_NEON;
  239|       |    if (IS_ALIGNED(dst_width, 16)) {
  240|       |      ScaleRowDown4 = filtering ? ScaleRowDown4Box_NEON : ScaleRowDown4_NEON;
  241|       |    }
  242|       |  }
  243|       |#endif
  244|     58|#if defined(HAS_SCALEROWDOWN4_SSSE3)
  245|     58|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (245:7): [True: 58, False: 0]
  ------------------
  246|     58|    ScaleRowDown4 =
  247|     58|        filtering ? ScaleRowDown4Box_Any_SSSE3 : ScaleRowDown4_Any_SSSE3;
  ------------------
  |  Branch (247:9): [True: 58, False: 0]
  ------------------
  248|     58|    if (IS_ALIGNED(dst_width, 8)) {
  ------------------
  |  | 1002|     58|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 6, False: 52]
  |  |  ------------------
  ------------------
  249|      6|      ScaleRowDown4 = filtering ? ScaleRowDown4Box_SSSE3 : ScaleRowDown4_SSSE3;
  ------------------
  |  Branch (249:23): [True: 6, False: 0]
  ------------------
  250|      6|    }
  251|     58|  }
  252|     58|#endif
  253|     58|#if defined(HAS_SCALEROWDOWN4_AVX2)
  254|     58|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (254:7): [True: 58, False: 0]
  ------------------
  255|     58|    ScaleRowDown4 =
  256|     58|        filtering ? ScaleRowDown4Box_Any_AVX2 : ScaleRowDown4_Any_AVX2;
  ------------------
  |  Branch (256:9): [True: 58, False: 0]
  ------------------
  257|     58|    if (IS_ALIGNED(dst_width, 16)) {
  ------------------
  |  | 1002|     58|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 6, False: 52]
  |  |  ------------------
  ------------------
  258|      6|      ScaleRowDown4 = filtering ? ScaleRowDown4Box_AVX2 : ScaleRowDown4_AVX2;
  ------------------
  |  Branch (258:23): [True: 6, False: 0]
  ------------------
  259|      6|    }
  260|     58|  }
  261|     58|#endif
  262|       |#if defined(HAS_SCALEROWDOWN4_LSX)
  263|       |  if (TestCpuFlag(kCpuHasLSX)) {
  264|       |    ScaleRowDown4 =
  265|       |        filtering ? ScaleRowDown4Box_Any_LSX : ScaleRowDown4_Any_LSX;
  266|       |    if (IS_ALIGNED(dst_width, 16)) {
  267|       |      ScaleRowDown4 = filtering ? ScaleRowDown4Box_LSX : ScaleRowDown4_LSX;
  268|       |    }
  269|       |  }
  270|       |#endif
  271|       |#if defined(HAS_SCALEROWDOWN4_RVV)
  272|       |  if (TestCpuFlag(kCpuHasRVV)) {
  273|       |    ScaleRowDown4 = filtering ? ScaleRowDown4Box_RVV : ScaleRowDown4_RVV;
  274|       |  }
  275|       |#endif
  276|       |
  277|     58|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (277:7): [True: 0, False: 58]
  ------------------
  278|      0|    src_stride = 0;
  279|      0|  }
  280|    583|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (280:15): [True: 525, False: 58]
  ------------------
  281|    525|    ScaleRowDown4(src_ptr, src_stride, dst_ptr, dst_width);
  282|    525|    src_ptr += row_stride;
  283|    525|    dst_ptr += dst_stride;
  284|    525|  }
  285|     58|}
scale.cc:_ZN6libyuvL13ScalePlaneBoxEiiiillPKhPh:
  864|    939|                         uint8_t* dst_ptr) {
  865|    939|  int j, k;
  866|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
  867|    939|  int x = 0;
  868|    939|  int y = 0;
  869|    939|  int dx = 0;
  870|    939|  int dy = 0;
  871|    939|  const int max_y = (src_height << 16);
  872|    939|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterBox, &x, &y,
  873|    939|             &dx, &dy);
  874|    939|  src_width = Abs(src_width);
  875|    939|  {
  876|       |    // Allocate a row buffer of uint16_t.
  877|    939|    align_buffer_64(row16, src_width * 2);
  ------------------
  |  | 1005|    939|  size_t var##_mem_size = (size); /* NOLINT */                             \
  |  | 1006|    939|  void* var##_mem = (var##_mem_size > SIZE_MAX - 63)                       \
  |  |  ------------------
  |  |  |  Branch (1006:21): [True: 0, False: 939]
  |  |  ------------------
  |  | 1007|    939|                        ? NULL                                             \
  |  | 1008|    939|                        : malloc(var##_mem_size + 63);        /* NOLINT */ \
  |  | 1009|    939|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
  878|    939|    if (!row16)
  ------------------
  |  Branch (878:9): [True: 0, False: 939]
  ------------------
  879|      0|      return 1;
  880|    939|    void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx,
  881|    939|                         const uint16_t* src_ptr, uint8_t* dst_ptr) =
  882|    939|        (dx & 0xffff) ? ScaleAddCols2_C
  ------------------
  |  Branch (882:9): [True: 543, False: 396]
  ------------------
  883|    939|                      : ((dx != 0x10000) ? ScaleAddCols1_C : ScaleAddCols0_C);
  ------------------
  |  Branch (883:26): [True: 396, False: 0]
  ------------------
  884|    939|    void (*ScaleAddRow)(const uint8_t* src_ptr, uint16_t* dst_ptr,
  885|    939|                        int src_width) = ScaleAddRow_C;
  886|    939|#if defined(HAS_SCALEADDROW_SSE2)
  887|    939|    if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (887:9): [True: 939, False: 0]
  ------------------
  888|    939|      ScaleAddRow = ScaleAddRow_Any_SSE2;
  889|    939|      if (IS_ALIGNED(src_width, 16)) {
  ------------------
  |  | 1002|    939|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 156, False: 783]
  |  |  ------------------
  ------------------
  890|    156|        ScaleAddRow = ScaleAddRow_SSE2;
  891|    156|      }
  892|    939|    }
  893|    939|#endif
  894|    939|#if defined(HAS_SCALEADDROW_AVX2)
  895|    939|    if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (895:9): [True: 939, False: 0]
  ------------------
  896|    939|      ScaleAddRow = ScaleAddRow_Any_AVX2;
  897|    939|      if (IS_ALIGNED(src_width, 32)) {
  ------------------
  |  | 1002|    939|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 130, False: 809]
  |  |  ------------------
  ------------------
  898|    130|        ScaleAddRow = ScaleAddRow_AVX2;
  899|    130|      }
  900|    939|    }
  901|    939|#endif
  902|       |#if defined(HAS_SCALEADDROW_NEON)
  903|       |    if (TestCpuFlag(kCpuHasNEON)) {
  904|       |      ScaleAddRow = ScaleAddRow_Any_NEON;
  905|       |      if (IS_ALIGNED(src_width, 16)) {
  906|       |        ScaleAddRow = ScaleAddRow_NEON;
  907|       |      }
  908|       |    }
  909|       |#endif
  910|       |#if defined(HAS_SCALEADDROW_LSX)
  911|       |    if (TestCpuFlag(kCpuHasLSX)) {
  912|       |      ScaleAddRow = ScaleAddRow_Any_LSX;
  913|       |      if (IS_ALIGNED(src_width, 16)) {
  914|       |        ScaleAddRow = ScaleAddRow_LSX;
  915|       |      }
  916|       |    }
  917|       |#endif
  918|       |#if defined(HAS_SCALEADDROW_RVV)
  919|       |    if (TestCpuFlag(kCpuHasRVV)) {
  920|       |      ScaleAddRow = ScaleAddRow_RVV;
  921|       |    }
  922|       |#endif
  923|       |
  924|  45.0k|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (924:17): [True: 44.0k, False: 939]
  ------------------
  925|  44.0k|      int boxheight;
  926|  44.0k|      int iy = y >> 16;
  927|  44.0k|      const uint8_t* src = src_ptr + iy * src_stride;
  928|  44.0k|      y += dy;
  929|  44.0k|      if (y > max_y) {
  ------------------
  |  Branch (929:11): [True: 0, False: 44.0k]
  ------------------
  930|      0|        y = max_y;
  931|      0|      }
  932|  44.0k|      boxheight = MIN1((y >> 16) - iy);
  ------------------
  |  |  735|  44.0k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 44.0k]
  |  |  ------------------
  ------------------
  933|  44.0k|      memset(row16, 0, src_width * 2);
  934|   583k|      for (k = 0; k < boxheight; ++k) {
  ------------------
  |  Branch (934:19): [True: 538k, False: 44.0k]
  ------------------
  935|   538k|        ScaleAddRow(src, (uint16_t*)(row16), src_width);
  936|   538k|        src += src_stride;
  937|   538k|      }
  938|  44.0k|      ScaleAddCols(dst_width, boxheight, x, dx, (uint16_t*)(row16), dst_ptr);
  939|  44.0k|      dst_ptr += dst_stride;
  940|  44.0k|    }
  941|    939|    free_aligned_buffer_64(row16);
  ------------------
  |  | 1012|    939|  free(var##_mem);                  \
  |  | 1013|    939|  var = NULL
  ------------------
  942|    939|  }
  943|      0|  return 0;
  944|    939|}
scale.cc:_ZN6libyuvL15ScaleAddCols2_CEiiiiPKtPh:
  762|  28.0k|                            uint8_t* dst_ptr) {
  763|  28.0k|  int i;
  764|  28.0k|  int scaletbl[2];
  765|  28.0k|  int minboxwidth = dx >> 16;
  766|  28.0k|  int boxwidth;
  767|  28.0k|  scaletbl[0] = 65536 / (MIN1(minboxwidth) * boxheight);
  ------------------
  |  |  735|  28.0k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 28.0k]
  |  |  ------------------
  ------------------
  768|  28.0k|  scaletbl[1] = 65536 / (MIN1(minboxwidth + 1) * boxheight);
  ------------------
  |  |  735|  28.0k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 28.0k]
  |  |  ------------------
  ------------------
  769|  2.18M|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (769:15): [True: 2.15M, False: 28.0k]
  ------------------
  770|  2.15M|    int ix = x >> 16;
  771|  2.15M|    x += dx;
  772|  2.15M|    boxwidth = MIN1((x >> 16) - ix);
  ------------------
  |  |  735|  2.15M|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 2.15M]
  |  |  ------------------
  ------------------
  773|  2.15M|    int scaletbl_index = boxwidth - minboxwidth;
  774|       |    assert((scaletbl_index == 0) || (scaletbl_index == 1));
  775|  2.15M|    *dst_ptr++ = (uint8_t)(SumPixels(boxwidth, src_ptr + ix) *
  776|  2.15M|                               scaletbl[scaletbl_index] >>
  777|  2.15M|                           16);
  778|  2.15M|  }
  779|  28.0k|}
scale.cc:_ZN6libyuvL9SumPixelsEiPKt:
  737|  3.86M|static __inline uint32_t SumPixels(int iboxwidth, const uint16_t* src_ptr) {
  738|  3.86M|  uint32_t sum = 0u;
  739|  3.86M|  int x;
  740|  3.86M|  assert(iboxwidth > 0);
  741|  24.5M|  for (x = 0; x < iboxwidth; ++x) {
  ------------------
  |  Branch (741:15): [True: 20.6M, False: 3.86M]
  ------------------
  742|  20.6M|    sum += src_ptr[x];
  743|  20.6M|  }
  744|  3.86M|  return sum;
  745|  3.86M|}
scale.cc:_ZN6libyuvL15ScaleAddCols1_CEiiiiPKtPh:
  824|  16.0k|                            uint8_t* dst_ptr) {
  825|  16.0k|  int boxwidth = MIN1(dx >> 16);
  ------------------
  |  |  735|  16.0k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 16.0k]
  |  |  ------------------
  ------------------
  826|  16.0k|  int scaleval = 65536 / (boxwidth * boxheight);
  827|  16.0k|  int i;
  828|  16.0k|  x >>= 16;
  829|  1.72M|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (829:15): [True: 1.70M, False: 16.0k]
  ------------------
  830|  1.70M|    *dst_ptr++ = (uint8_t)(SumPixels(boxwidth, src_ptr + x) * scaleval >> 16);
  831|  1.70M|    x += boxwidth;
  832|  1.70M|  }
  833|  16.0k|}
scale.cc:_ZN6libyuvL20ScalePlaneUp2_LinearEiiiillPKhPh:
 1385|    180|                                 uint8_t* dst_ptr) {
 1386|    180|  void (*ScaleRowUp)(const uint8_t* src_ptr, uint8_t* dst_ptr, int dst_width) =
 1387|    180|      ScaleRowUp2_Linear_Any_C;
 1388|    180|  int i;
 1389|    180|  int y;
 1390|    180|  int dy;
 1391|       |
 1392|    180|  (void)src_width;
 1393|       |  // This function can only scale up by 2 times horizontally.
 1394|    180|  assert(src_width == ((dst_width + 1) / 2));
 1395|       |
 1396|    180|#ifdef HAS_SCALEROWUP2_LINEAR_SSE2
 1397|    180|  if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (1397:7): [True: 180, False: 0]
  ------------------
 1398|    180|    ScaleRowUp = ScaleRowUp2_Linear_Any_SSE2;
 1399|    180|  }
 1400|    180|#endif
 1401|       |
 1402|    180|#ifdef HAS_SCALEROWUP2_LINEAR_SSSE3
 1403|    180|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1403:7): [True: 180, False: 0]
  ------------------
 1404|    180|    ScaleRowUp = ScaleRowUp2_Linear_Any_SSSE3;
 1405|    180|  }
 1406|    180|#endif
 1407|       |
 1408|    180|#ifdef HAS_SCALEROWUP2_LINEAR_AVX2
 1409|    180|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1409:7): [True: 180, False: 0]
  ------------------
 1410|    180|    ScaleRowUp = ScaleRowUp2_Linear_Any_AVX2;
 1411|    180|  }
 1412|    180|#endif
 1413|       |
 1414|       |#ifdef HAS_SCALEROWUP2_LINEAR_NEON
 1415|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1416|       |    ScaleRowUp = ScaleRowUp2_Linear_Any_NEON;
 1417|       |  }
 1418|       |#endif
 1419|       |#ifdef HAS_SCALEROWUP2_LINEAR_RVV
 1420|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1421|       |    ScaleRowUp = ScaleRowUp2_Linear_RVV;
 1422|       |  }
 1423|       |#endif
 1424|       |
 1425|    180|  if (dst_height == 1) {
  ------------------
  |  Branch (1425:7): [True: 25, False: 155]
  ------------------
 1426|     25|    ScaleRowUp(src_ptr + ((src_height - 1) / 2) * src_stride, dst_ptr,
 1427|     25|               dst_width);
 1428|    155|  } else {
 1429|    155|    dy = FixedDiv(src_height - 1, dst_height - 1);
  ------------------
  |  |  241|    155|#define FixedDiv FixedDiv_X86
  ------------------
 1430|    155|    y = (1 << 15) - 1;
 1431|   329k|    for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1431:17): [True: 328k, False: 155]
  ------------------
 1432|   328k|      ScaleRowUp(src_ptr + (y >> 16) * src_stride, dst_ptr, dst_width);
 1433|   328k|      dst_ptr += dst_stride;
 1434|   328k|      y += dy;
 1435|   328k|    }
 1436|    155|  }
 1437|    180|}
scale.cc:_ZN6libyuvL22ScalePlaneUp2_BilinearEiiiillPKhPh:
 1450|    146|                                   uint8_t* dst_ptr) {
 1451|    146|  void (*Scale2RowUp)(const uint8_t* src_ptr, ptrdiff_t src_stride,
 1452|    146|                      uint8_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
 1453|    146|      ScaleRowUp2_Bilinear_Any_C;
 1454|    146|  int x;
 1455|       |
 1456|    146|  (void)src_width;
 1457|       |  // This function can only scale up by 2 times.
 1458|    146|  assert(src_width == ((dst_width + 1) / 2));
 1459|    146|  assert(src_height == ((dst_height + 1) / 2));
 1460|       |
 1461|    146|#ifdef HAS_SCALEROWUP2_BILINEAR_SSE2
 1462|    146|  if (TestCpuFlag(kCpuHasSSE2)) {
  ------------------
  |  Branch (1462:7): [True: 146, False: 0]
  ------------------
 1463|    146|    Scale2RowUp = ScaleRowUp2_Bilinear_Any_SSE2;
 1464|    146|  }
 1465|    146|#endif
 1466|       |
 1467|    146|#ifdef HAS_SCALEROWUP2_BILINEAR_SSSE3
 1468|    146|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1468:7): [True: 146, False: 0]
  ------------------
 1469|    146|    Scale2RowUp = ScaleRowUp2_Bilinear_Any_SSSE3;
 1470|    146|  }
 1471|    146|#endif
 1472|       |
 1473|    146|#ifdef HAS_SCALEROWUP2_BILINEAR_AVX2
 1474|    146|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1474:7): [True: 146, False: 0]
  ------------------
 1475|    146|    Scale2RowUp = ScaleRowUp2_Bilinear_Any_AVX2;
 1476|    146|  }
 1477|    146|#endif
 1478|       |
 1479|       |#ifdef HAS_SCALEROWUP2_BILINEAR_NEON
 1480|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1481|       |    Scale2RowUp = ScaleRowUp2_Bilinear_Any_NEON;
 1482|       |  }
 1483|       |#endif
 1484|       |#ifdef HAS_SCALEROWUP2_BILINEAR_RVV
 1485|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1486|       |    Scale2RowUp = ScaleRowUp2_Bilinear_RVV;
 1487|       |  }
 1488|       |#endif
 1489|       |
 1490|    146|  Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1491|    146|  dst_ptr += dst_stride;
 1492|  7.39k|  for (x = 0; x < src_height - 1; ++x) {
  ------------------
  |  Branch (1492:15): [True: 7.25k, False: 146]
  ------------------
 1493|  7.25k|    Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
 1494|  7.25k|    src_ptr += src_stride;
 1495|       |    // TODO(fbarchard): Test performance of writing one row of destination at a
 1496|       |    // time.
 1497|  7.25k|    dst_ptr += 2 * dst_stride;
 1498|  7.25k|  }
 1499|    146|  if (!(dst_height & 1)) {
  ------------------
  |  Branch (1499:7): [True: 114, False: 32]
  ------------------
 1500|    114|    Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1501|    114|  }
 1502|    146|}
scale.cc:_ZN6libyuvL20ScalePlaneBilinearUpEiiiillPKhPhNS_10FilterModeE:
 1221|  4.01k|                                enum FilterMode filtering) {
 1222|  4.01k|  assert(src_width > 0);
 1223|  4.01k|  assert(src_height > 0);
 1224|  4.01k|  assert(dst_width > 0);
 1225|  4.01k|  assert(dst_height > 0);
 1226|       |
 1227|  4.01k|  int j;
 1228|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1229|  4.01k|  int x = 0;
 1230|  4.01k|  int y = 0;
 1231|  4.01k|  int dx = 0;
 1232|  4.01k|  int dy = 0;
 1233|  4.01k|  const int max_y = (src_height - 1) << 16;
 1234|  4.01k|  void (*InterpolateRow)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1235|  4.01k|                         ptrdiff_t src_stride, int dst_width,
 1236|  4.01k|                         int source_y_fraction) = InterpolateRow_C;
 1237|  4.01k|  void (*ScaleFilterCols)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1238|  4.01k|                          int dst_width, int x, int dx) =
 1239|  4.01k|      filtering ? ScaleFilterCols_C : ScaleCols_C;
  ------------------
  |  Branch (1239:7): [True: 4.01k, False: 0]
  ------------------
 1240|  4.01k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1241|  4.01k|             &dx, &dy);
 1242|  4.01k|  assert(dy <= 65536);
 1243|  4.01k|  src_width = Abs(src_width);
 1244|       |
 1245|  4.01k|#if defined(HAS_INTERPOLATEROW_AVX2)
 1246|  4.01k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1246:7): [True: 4.01k, False: 0]
  ------------------
 1247|  4.01k|    InterpolateRow = InterpolateRow_Any_AVX2;
 1248|  4.01k|    if (IS_ALIGNED(dst_width, 32)) {
  ------------------
  |  | 1002|  4.01k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 2.03k, False: 1.97k]
  |  |  ------------------
  ------------------
 1249|  2.03k|      InterpolateRow = InterpolateRow_AVX2;
 1250|  2.03k|    }
 1251|  4.01k|  }
 1252|  4.01k|#endif
 1253|       |#if defined(HAS_INTERPOLATEROW_NEON)
 1254|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1255|       |    InterpolateRow = InterpolateRow_Any_NEON;
 1256|       |    if (IS_ALIGNED(dst_width, 16)) {
 1257|       |      InterpolateRow = InterpolateRow_NEON;
 1258|       |    }
 1259|       |  }
 1260|       |#endif
 1261|       |#if defined(HAS_INTERPOLATEROW_SVE2)
 1262|       |  if (TestCpuFlag(kCpuHasSVE2)) {
 1263|       |    InterpolateRow = InterpolateRow_SVE2;
 1264|       |  }
 1265|       |#endif
 1266|       |#if defined(HAS_INTERPOLATEROW_SME)
 1267|       |  if (TestCpuFlag(kCpuHasSME)) {
 1268|       |    InterpolateRow = InterpolateRow_SME;
 1269|       |  }
 1270|       |#endif
 1271|       |#if defined(HAS_INTERPOLATEROW_RVV)
 1272|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1273|       |    InterpolateRow = InterpolateRow_RVV;
 1274|       |  }
 1275|       |#endif
 1276|       |
 1277|  4.01k|  if (filtering && src_width >= 32768) {
  ------------------
  |  Branch (1277:7): [True: 4.01k, False: 0]
  |  Branch (1277:20): [True: 0, False: 4.01k]
  ------------------
 1278|      0|    ScaleFilterCols = ScaleFilterCols64_C;
 1279|      0|  }
 1280|  4.01k|#if defined(HAS_SCALEFILTERCOLS_SSSE3)
 1281|  4.01k|  if (filtering && TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
  ------------------
  |  Branch (1281:7): [True: 4.01k, False: 0]
  |  Branch (1281:20): [True: 4.01k, False: 0]
  |  Branch (1281:49): [True: 4.01k, False: 0]
  ------------------
 1282|  4.01k|    ScaleFilterCols = ScaleFilterCols_SSSE3;
 1283|  4.01k|  }
 1284|  4.01k|#endif
 1285|       |#if defined(HAS_SCALEFILTERCOLS_NEON)
 1286|       |  if (filtering && TestCpuFlag(kCpuHasNEON) && src_width < 32768) {
 1287|       |    ScaleFilterCols = ScaleFilterCols_Any_NEON;
 1288|       |    if (IS_ALIGNED(dst_width, 8)) {
 1289|       |      ScaleFilterCols = ScaleFilterCols_NEON;
 1290|       |    }
 1291|       |  }
 1292|       |#endif
 1293|       |#if defined(HAS_SCALEFILTERCOLS_LSX)
 1294|       |  if (filtering && TestCpuFlag(kCpuHasLSX) && src_width < 32768) {
 1295|       |    ScaleFilterCols = ScaleFilterCols_Any_LSX;
 1296|       |    if (IS_ALIGNED(dst_width, 16)) {
 1297|       |      ScaleFilterCols = ScaleFilterCols_LSX;
 1298|       |    }
 1299|       |  }
 1300|       |#endif
 1301|  4.01k|  if (!filtering && src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1301:7): [True: 0, False: 4.01k]
  |  Branch (1301:21): [True: 0, False: 0]
  |  Branch (1301:51): [True: 0, False: 0]
  ------------------
 1302|      0|    ScaleFilterCols = ScaleColsUp2_C;
 1303|       |#if defined(HAS_SCALECOLS_SSE2)
 1304|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1305|       |      ScaleFilterCols = ScaleColsUp2_SSE2;
 1306|       |    }
 1307|       |#endif
 1308|      0|  }
 1309|       |
 1310|  4.01k|  if (y > max_y) {
  ------------------
  |  Branch (1310:7): [True: 676, False: 3.33k]
  ------------------
 1311|    676|    y = max_y;
 1312|    676|  }
 1313|  4.01k|  {
 1314|  4.01k|    int yi = y >> 16;
 1315|  4.01k|    const uint8_t* src = src_ptr + yi * src_stride;
 1316|       |
 1317|       |    // Allocate 2 row buffers.
 1318|  4.01k|    const int row_size = (dst_width + 31) & ~31;
 1319|  4.01k|    align_buffer_64(row, row_size * 2);
  ------------------
  |  | 1005|  4.01k|  size_t var##_mem_size = (size); /* NOLINT */                             \
  |  | 1006|  4.01k|  void* var##_mem = (var##_mem_size > SIZE_MAX - 63)                       \
  |  |  ------------------
  |  |  |  Branch (1006:21): [True: 0, False: 4.01k]
  |  |  ------------------
  |  | 1007|  4.01k|                        ? NULL                                             \
  |  | 1008|  4.01k|                        : malloc(var##_mem_size + 63);        /* NOLINT */ \
  |  | 1009|  4.01k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1320|  4.01k|    if (!row)
  ------------------
  |  Branch (1320:9): [True: 0, False: 4.01k]
  ------------------
 1321|      0|      return 1;
 1322|       |
 1323|  4.01k|    uint8_t* rowptr = row;
 1324|  4.01k|    ptrdiff_t rowstride = row_size;
 1325|  4.01k|    int lasty = yi;
 1326|       |
 1327|  4.01k|    ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1328|  4.01k|    if (src_height > 1) {
  ------------------
  |  Branch (1328:9): [True: 3.33k, False: 676]
  ------------------
 1329|  3.33k|      src += src_stride;
 1330|  3.33k|    }
 1331|  4.01k|    ScaleFilterCols(rowptr + rowstride, src, dst_width, x, dx);
 1332|  4.01k|    if (src_height > 2) {
  ------------------
  |  Branch (1332:9): [True: 3.21k, False: 800]
  ------------------
 1333|  3.21k|      src += src_stride;
 1334|  3.21k|    }
 1335|       |
 1336|       |    // 2-row rolling buffer:
 1337|       |    // rowptr and (rowptr + rowstride) hold the scaled rows for yi and yi + 1.
 1338|       |    // Because dy <= 65536 (dy <= 1.0 in 16.16), yi advances in unit steps.
 1339|       |    // When yi != lasty:
 1340|       |    // 1. Scale the next source row into the older buffer (rowptr).
 1341|       |    // 2. Swap buffer pointers (rowptr += rowstride; rowstride = -rowstride;)
 1342|       |    //    so rowptr points to yi and (rowptr + rowstride) points to yi + 1.
 1343|       |    // 3. Advance src by 1 row if row yi + 2 exists ((y + 65536) < max_y),
 1344|       |    //    otherwise clamp src at (src_height - 1) to avoid reading out of bounds.
 1345|  2.35M|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1345:17): [True: 2.35M, False: 4.01k]
  ------------------
 1346|  2.35M|      if (y > max_y) {
  ------------------
  |  Branch (1346:11): [True: 611k, False: 1.74M]
  ------------------
 1347|   611k|        y = max_y;
 1348|   611k|      }
 1349|  2.35M|      yi = y >> 16;
 1350|  2.35M|      if (yi != lasty) {
  ------------------
  |  Branch (1350:11): [True: 102k, False: 2.24M]
  ------------------
 1351|   102k|        ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1352|   102k|        rowptr += rowstride;
 1353|   102k|        rowstride = -rowstride;
 1354|   102k|        lasty = yi;
 1355|   102k|        if ((y + 65536) < max_y) {
  ------------------
  |  Branch (1355:13): [True: 99.5k, False: 3.21k]
  ------------------
 1356|  99.5k|          src += src_stride;
 1357|  99.5k|        }
 1358|   102k|      }
 1359|  2.35M|      if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1359:11): [True: 611k, False: 1.74M]
  ------------------
 1360|   611k|        InterpolateRow(dst_ptr, rowptr, 0, dst_width, 0);
 1361|  1.74M|      } else {
 1362|  1.74M|        int yf = (y >> 8) & 255;
 1363|  1.74M|        InterpolateRow(dst_ptr, rowptr, rowstride, dst_width, yf);
 1364|  1.74M|      }
 1365|  2.35M|      dst_ptr += dst_stride;
 1366|  2.35M|      y += dy;
 1367|  2.35M|    }
 1368|  4.01k|    free_aligned_buffer_64(row);
  ------------------
  |  | 1012|  4.01k|  free(var##_mem);                  \
  |  | 1013|  4.01k|  var = NULL
  ------------------
 1369|  4.01k|  }
 1370|      0|  return 0;
 1371|  4.01k|}
scale.cc:_ZN6libyuvL22ScalePlaneBilinearDownEiiiillPKhPhNS_10FilterModeE:
 1012|  2.35k|                                  enum FilterMode filtering) {
 1013|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1014|  2.35k|  int x = 0;
 1015|  2.35k|  int y = 0;
 1016|  2.35k|  int dx = 0;
 1017|  2.35k|  int dy = 0;
 1018|       |  // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear.
 1019|       |  // Allocate a row buffer.
 1020|  2.35k|  align_buffer_64(row, src_width);
  ------------------
  |  | 1005|  2.35k|  size_t var##_mem_size = (size); /* NOLINT */                             \
  |  | 1006|  2.35k|  void* var##_mem = (var##_mem_size > SIZE_MAX - 63)                       \
  |  |  ------------------
  |  |  |  Branch (1006:21): [True: 0, False: 2.35k]
  |  |  ------------------
  |  | 1007|  2.35k|                        ? NULL                                             \
  |  | 1008|  2.35k|                        : malloc(var##_mem_size + 63);        /* NOLINT */ \
  |  | 1009|  2.35k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1021|  2.35k|  if (!row)
  ------------------
  |  Branch (1021:7): [True: 0, False: 2.35k]
  ------------------
 1022|      0|    return 1;
 1023|       |
 1024|  2.35k|  const int max_y = (src_height - 1) << 16;
 1025|  2.35k|  int j;
 1026|  2.35k|  void (*ScaleFilterCols)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1027|  2.35k|                          int dst_width, int x, int dx) =
 1028|  2.35k|      (src_width >= 32768) ? ScaleFilterCols64_C : ScaleFilterCols_C;
  ------------------
  |  Branch (1028:7): [True: 0, False: 2.35k]
  ------------------
 1029|  2.35k|  void (*InterpolateRow)(uint8_t* dst_ptr, const uint8_t* src_ptr,
 1030|  2.35k|                         ptrdiff_t src_stride, int dst_width,
 1031|  2.35k|                         int source_y_fraction) = InterpolateRow_C;
 1032|  2.35k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1033|  2.35k|             &dx, &dy);
 1034|  2.35k|  src_width = Abs(src_width);
 1035|       |
 1036|  2.35k|#if defined(HAS_INTERPOLATEROW_AVX2)
 1037|  2.35k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1037:7): [True: 2.35k, False: 0]
  ------------------
 1038|  2.35k|    InterpolateRow = InterpolateRow_Any_AVX2;
 1039|  2.35k|    if (IS_ALIGNED(src_width, 32)) {
  ------------------
  |  | 1002|  2.35k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 247, False: 2.11k]
  |  |  ------------------
  ------------------
 1040|    247|      InterpolateRow = InterpolateRow_AVX2;
 1041|    247|    }
 1042|  2.35k|  }
 1043|  2.35k|#endif
 1044|       |#if defined(HAS_INTERPOLATEROW_NEON)
 1045|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1046|       |    InterpolateRow = InterpolateRow_Any_NEON;
 1047|       |    if (IS_ALIGNED(src_width, 16)) {
 1048|       |      InterpolateRow = InterpolateRow_NEON;
 1049|       |    }
 1050|       |  }
 1051|       |#endif
 1052|       |#if defined(HAS_INTERPOLATEROW_SVE2)
 1053|       |  if (TestCpuFlag(kCpuHasSVE2)) {
 1054|       |    InterpolateRow = InterpolateRow_SVE2;
 1055|       |  }
 1056|       |#endif
 1057|       |#if defined(HAS_INTERPOLATEROW_SME)
 1058|       |  if (TestCpuFlag(kCpuHasSME)) {
 1059|       |    InterpolateRow = InterpolateRow_SME;
 1060|       |  }
 1061|       |#endif
 1062|       |#if defined(HAS_INTERPOLATEROW_LSX)
 1063|       |  if (TestCpuFlag(kCpuHasLSX)) {
 1064|       |    InterpolateRow = InterpolateRow_Any_LSX;
 1065|       |    if (IS_ALIGNED(src_width, 32)) {
 1066|       |      InterpolateRow = InterpolateRow_LSX;
 1067|       |    }
 1068|       |  }
 1069|       |#endif
 1070|       |#if defined(HAS_INTERPOLATEROW_RVV)
 1071|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1072|       |    InterpolateRow = InterpolateRow_RVV;
 1073|       |  }
 1074|       |#endif
 1075|       |
 1076|  2.35k|#if defined(HAS_SCALEFILTERCOLS_SSSE3)
 1077|  2.35k|  if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
  ------------------
  |  Branch (1077:7): [True: 2.35k, False: 0]
  |  Branch (1077:36): [True: 2.35k, False: 0]
  ------------------
 1078|  2.35k|    ScaleFilterCols = ScaleFilterCols_SSSE3;
 1079|  2.35k|  }
 1080|  2.35k|#endif
 1081|       |#if defined(HAS_SCALEFILTERCOLS_NEON)
 1082|       |  if (TestCpuFlag(kCpuHasNEON) && src_width < 32768) {
 1083|       |    ScaleFilterCols = ScaleFilterCols_Any_NEON;
 1084|       |    if (IS_ALIGNED(dst_width, 8)) {
 1085|       |      ScaleFilterCols = ScaleFilterCols_NEON;
 1086|       |    }
 1087|       |  }
 1088|       |#endif
 1089|       |#if defined(HAS_SCALEFILTERCOLS_LSX)
 1090|       |  if (TestCpuFlag(kCpuHasLSX) && src_width < 32768) {
 1091|       |    ScaleFilterCols = ScaleFilterCols_Any_LSX;
 1092|       |    if (IS_ALIGNED(dst_width, 16)) {
 1093|       |      ScaleFilterCols = ScaleFilterCols_LSX;
 1094|       |    }
 1095|       |  }
 1096|       |#endif
 1097|  2.35k|  if (y > max_y) {
  ------------------
  |  Branch (1097:7): [True: 70, False: 2.28k]
  ------------------
 1098|     70|    y = max_y;
 1099|     70|  }
 1100|       |
 1101|   136k|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1101:15): [True: 134k, False: 2.35k]
  ------------------
 1102|   134k|    int yi = y >> 16;
 1103|   134k|    const uint8_t* src = src_ptr + yi * src_stride;
 1104|   134k|    if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1104:9): [True: 74.4k, False: 59.8k]
  ------------------
 1105|  74.4k|      ScaleFilterCols(dst_ptr, src, dst_width, x, dx);
 1106|  74.4k|    } else {
 1107|  59.8k|      int yf = (y >> 8) & 255;
 1108|  59.8k|      InterpolateRow(row, src, src_stride, src_width, yf);
 1109|  59.8k|      ScaleFilterCols(dst_ptr, row, dst_width, x, dx);
 1110|  59.8k|    }
 1111|   134k|    dst_ptr += dst_stride;
 1112|   134k|    y += dy;
 1113|   134k|    if (y > max_y) {
  ------------------
  |  Branch (1113:9): [True: 2.89k, False: 131k]
  ------------------
 1114|  2.89k|      y = max_y;
 1115|  2.89k|    }
 1116|   134k|  }
 1117|       |  free_aligned_buffer_64(row);
  ------------------
  |  | 1012|  2.35k|  free(var##_mem);                  \
  |  | 1013|  2.35k|  var = NULL
  ------------------
 1118|  2.35k|  return 0;
 1119|  2.35k|}
scale.cc:_ZN6libyuvL16ScalePlaneSimpleEiiiillPKhPh:
 1863|    574|                             uint8_t* dst_ptr) {
 1864|    574|  int i;
 1865|    574|  void (*ScaleCols)(uint8_t* dst_ptr, const uint8_t* src_ptr, int dst_width,
 1866|    574|                    int x, int dx) = ScaleCols_C;
 1867|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1868|    574|  int x = 0;
 1869|    574|  int y = 0;
 1870|    574|  int dx = 0;
 1871|    574|  int dy = 0;
 1872|    574|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterNone, &x, &y,
 1873|    574|             &dx, &dy);
 1874|    574|  src_width = Abs(src_width);
 1875|       |
 1876|    574|  if (src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1876:7): [True: 59, False: 515]
  |  Branch (1876:37): [True: 59, False: 0]
  ------------------
 1877|     59|    ScaleCols = ScaleColsUp2_C;
 1878|       |#if defined(HAS_SCALECOLS_SSE2)
 1879|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1880|       |      ScaleCols = ScaleColsUp2_SSE2;
 1881|       |    }
 1882|       |#endif
 1883|     59|  }
 1884|       |
 1885|   676k|  for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1885:15): [True: 675k, False: 574]
  ------------------
 1886|   675k|    ScaleCols(dst_ptr, src_ptr + (y >> 16) * src_stride, dst_width, x, dx);
 1887|   675k|    dst_ptr += dst_stride;
 1888|   675k|    y += dy;
 1889|   675k|  }
 1890|    574|}
scale.cc:_ZN6libyuvL19ScalePlaneDown34_16EiiiillPKtPtNS_10FilterModeE:
  466|      2|                                enum FilterMode filtering) {
  467|      2|  int y;
  468|      2|  void (*ScaleRowDown34_0)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  469|      2|                           uint16_t* dst_ptr, int dst_width);
  470|      2|  void (*ScaleRowDown34_1)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  471|      2|                           uint16_t* dst_ptr, int dst_width);
  472|      2|  const ptrdiff_t filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
  ------------------
  |  Branch (472:35): [True: 0, False: 2]
  ------------------
  473|      2|  (void)src_width;
  474|      2|  (void)src_height;
  475|      2|  assert(dst_width % 3 == 0);
  476|      2|  if (!filtering) {
  ------------------
  |  Branch (476:7): [True: 0, False: 2]
  ------------------
  477|      0|    ScaleRowDown34_0 = ScaleRowDown34_16_C;
  478|      0|    ScaleRowDown34_1 = ScaleRowDown34_16_C;
  479|      2|  } else {
  480|      2|    ScaleRowDown34_0 = ScaleRowDown34_0_Box_16_C;
  481|      2|    ScaleRowDown34_1 = ScaleRowDown34_1_Box_16_C;
  482|      2|  }
  483|       |#if defined(HAS_SCALEROWDOWN34_16_NEON)
  484|       |  if (TestCpuFlag(kCpuHasNEON) && (dst_width % 24 == 0)) {
  485|       |    if (!filtering) {
  486|       |      ScaleRowDown34_0 = ScaleRowDown34_16_NEON;
  487|       |      ScaleRowDown34_1 = ScaleRowDown34_16_NEON;
  488|       |    } else {
  489|       |      ScaleRowDown34_0 = ScaleRowDown34_0_Box_16_NEON;
  490|       |      ScaleRowDown34_1 = ScaleRowDown34_1_Box_16_NEON;
  491|       |    }
  492|       |  }
  493|       |#endif
  494|       |#if defined(HAS_SCALEROWDOWN34_16_SSSE3)
  495|       |  if (TestCpuFlag(kCpuHasSSSE3) && (dst_width % 24 == 0)) {
  496|       |    if (!filtering) {
  497|       |      ScaleRowDown34_0 = ScaleRowDown34_16_SSSE3;
  498|       |      ScaleRowDown34_1 = ScaleRowDown34_16_SSSE3;
  499|       |    } else {
  500|       |      ScaleRowDown34_0 = ScaleRowDown34_0_Box_16_SSSE3;
  501|       |      ScaleRowDown34_1 = ScaleRowDown34_1_Box_16_SSSE3;
  502|       |    }
  503|       |  }
  504|       |#endif
  505|       |
  506|      4|  for (y = 0; y < dst_height - 2; y += 3) {
  ------------------
  |  Branch (506:15): [True: 2, False: 2]
  ------------------
  507|      2|    ScaleRowDown34_0(src_ptr, filter_stride, dst_ptr, dst_width);
  508|      2|    src_ptr += src_stride;
  509|      2|    dst_ptr += dst_stride;
  510|      2|    ScaleRowDown34_1(src_ptr, filter_stride, dst_ptr, dst_width);
  511|      2|    src_ptr += src_stride;
  512|      2|    dst_ptr += dst_stride;
  513|      2|    ScaleRowDown34_0(src_ptr + src_stride, -filter_stride, dst_ptr, dst_width);
  514|      2|    src_ptr += src_stride * 2;
  515|      2|    dst_ptr += dst_stride;
  516|      2|  }
  517|       |
  518|       |  // Remainder 1 or 2 rows with last row vertically unfiltered
  519|      2|  if ((dst_height % 3) == 2) {
  ------------------
  |  Branch (519:7): [True: 0, False: 2]
  ------------------
  520|      0|    ScaleRowDown34_0(src_ptr, filter_stride, dst_ptr, dst_width);
  521|      0|    src_ptr += src_stride;
  522|      0|    dst_ptr += dst_stride;
  523|      0|    ScaleRowDown34_1(src_ptr, 0, dst_ptr, dst_width);
  524|      2|  } else if ((dst_height % 3) == 1) {
  ------------------
  |  Branch (524:14): [True: 0, False: 2]
  ------------------
  525|      0|    ScaleRowDown34_0(src_ptr, 0, dst_ptr, dst_width);
  526|      0|  }
  527|      2|}
scale.cc:_ZN6libyuvL18ScalePlaneDown2_16EiiiillPKtPtNS_10FilterModeE:
  159|    129|                               enum FilterMode filtering) {
  160|    129|  int y;
  161|    129|  void (*ScaleRowDown2)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  162|    129|                        uint16_t* dst_ptr, int dst_width) =
  163|    129|      filtering == kFilterNone
  ------------------
  |  Branch (163:7): [True: 0, False: 129]
  ------------------
  164|    129|          ? ScaleRowDown2_16_C
  165|    129|          : (filtering == kFilterLinear ? ScaleRowDown2Linear_16_C
  ------------------
  |  Branch (165:14): [True: 0, False: 129]
  ------------------
  166|    129|                                        : ScaleRowDown2Box_16_C);
  167|    129|  ptrdiff_t row_stride = src_stride * 2;
  168|    129|  (void)src_width;
  169|    129|  (void)src_height;
  170|    129|  if (!filtering) {
  ------------------
  |  Branch (170:7): [True: 0, False: 129]
  ------------------
  171|      0|    src_ptr += src_stride;  // Point to odd rows.
  172|      0|    src_stride = 0;
  173|      0|  }
  174|       |
  175|       |#if defined(HAS_SCALEROWDOWN2_16_NEON)
  176|       |  if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(dst_width, 16)) {
  177|       |    ScaleRowDown2 = filtering == kFilterNone     ? ScaleRowDown2_16_NEON
  178|       |                    : filtering == kFilterLinear ? ScaleRowDown2Linear_16_NEON
  179|       |                                                 : ScaleRowDown2Box_16_NEON;
  180|       |  }
  181|       |#endif
  182|       |#if defined(HAS_SCALEROWDOWN2_16_SME)
  183|       |  if (TestCpuFlag(kCpuHasSME)) {
  184|       |    ScaleRowDown2 = filtering == kFilterNone     ? ScaleRowDown2_16_SME
  185|       |                    : filtering == kFilterLinear ? ScaleRowDown2Linear_16_SME
  186|       |                                                 : ScaleRowDown2Box_16_SME;
  187|       |  }
  188|       |#endif
  189|       |#if defined(HAS_SCALEROWDOWN2_16_SSE2)
  190|       |  if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 16)) {
  191|       |    ScaleRowDown2 =
  192|       |        filtering == kFilterNone
  193|       |            ? ScaleRowDown2_16_SSE2
  194|       |            : (filtering == kFilterLinear ? ScaleRowDown2Linear_16_SSE2
  195|       |                                          : ScaleRowDown2Box_16_SSE2);
  196|       |  }
  197|       |#endif
  198|       |
  199|    129|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (199:7): [True: 0, False: 129]
  ------------------
  200|      0|    src_stride = 0;
  201|      0|  }
  202|       |  // TODO(fbarchard): Loop through source height to allow odd height.
  203|  2.28k|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (203:15): [True: 2.15k, False: 129]
  ------------------
  204|  2.15k|    ScaleRowDown2(src_ptr, src_stride, dst_ptr, dst_width);
  205|  2.15k|    src_ptr += row_stride;
  206|  2.15k|    dst_ptr += dst_stride;
  207|  2.15k|  }
  208|    129|}
scale.cc:_ZN6libyuvL19ScalePlaneDown38_16EiiiillPKtPtNS_10FilterModeE:
  672|     14|                                enum FilterMode filtering) {
  673|     14|  int y;
  674|     14|  void (*ScaleRowDown38_3)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  675|     14|                           uint16_t* dst_ptr, int dst_width);
  676|     14|  void (*ScaleRowDown38_2)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  677|     14|                           uint16_t* dst_ptr, int dst_width);
  678|     14|  const ptrdiff_t filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
  ------------------
  |  Branch (678:35): [True: 0, False: 14]
  ------------------
  679|     14|  (void)src_width;
  680|     14|  (void)src_height;
  681|     14|  assert(dst_width % 3 == 0);
  682|     14|  if (!filtering) {
  ------------------
  |  Branch (682:7): [True: 0, False: 14]
  ------------------
  683|      0|    ScaleRowDown38_3 = ScaleRowDown38_16_C;
  684|      0|    ScaleRowDown38_2 = ScaleRowDown38_16_C;
  685|     14|  } else {
  686|     14|    ScaleRowDown38_3 = ScaleRowDown38_3_Box_16_C;
  687|     14|    ScaleRowDown38_2 = ScaleRowDown38_2_Box_16_C;
  688|     14|  }
  689|       |#if defined(HAS_SCALEROWDOWN38_16_NEON)
  690|       |  if (TestCpuFlag(kCpuHasNEON) && (dst_width % 12 == 0)) {
  691|       |    if (!filtering) {
  692|       |      ScaleRowDown38_3 = ScaleRowDown38_16_NEON;
  693|       |      ScaleRowDown38_2 = ScaleRowDown38_16_NEON;
  694|       |    } else {
  695|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_16_NEON;
  696|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_16_NEON;
  697|       |    }
  698|       |  }
  699|       |#endif
  700|       |#if defined(HAS_SCALEROWDOWN38_16_SSSE3)
  701|       |  if (TestCpuFlag(kCpuHasSSSE3) && (dst_width % 24 == 0)) {
  702|       |    if (!filtering) {
  703|       |      ScaleRowDown38_3 = ScaleRowDown38_16_SSSE3;
  704|       |      ScaleRowDown38_2 = ScaleRowDown38_16_SSSE3;
  705|       |    } else {
  706|       |      ScaleRowDown38_3 = ScaleRowDown38_3_Box_16_SSSE3;
  707|       |      ScaleRowDown38_2 = ScaleRowDown38_2_Box_16_SSSE3;
  708|       |    }
  709|       |  }
  710|       |#endif
  711|       |
  712|     42|  for (y = 0; y < dst_height - 2; y += 3) {
  ------------------
  |  Branch (712:15): [True: 28, False: 14]
  ------------------
  713|     28|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  714|     28|    src_ptr += src_stride * 3;
  715|     28|    dst_ptr += dst_stride;
  716|     28|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  717|     28|    src_ptr += src_stride * 3;
  718|     28|    dst_ptr += dst_stride;
  719|     28|    ScaleRowDown38_2(src_ptr, filter_stride, dst_ptr, dst_width);
  720|     28|    src_ptr += src_stride * 2;
  721|     28|    dst_ptr += dst_stride;
  722|     28|  }
  723|       |
  724|       |  // Remainder 1 or 2 rows with last row vertically unfiltered
  725|     14|  if ((dst_height % 3) == 2) {
  ------------------
  |  Branch (725:7): [True: 0, False: 14]
  ------------------
  726|      0|    ScaleRowDown38_3(src_ptr, filter_stride, dst_ptr, dst_width);
  727|      0|    src_ptr += src_stride * 3;
  728|      0|    dst_ptr += dst_stride;
  729|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  730|     14|  } else if ((dst_height % 3) == 1) {
  ------------------
  |  Branch (730:14): [True: 0, False: 14]
  ------------------
  731|      0|    ScaleRowDown38_3(src_ptr, 0, dst_ptr, dst_width);
  732|      0|  }
  733|     14|}
scale.cc:_ZN6libyuvL18ScalePlaneDown4_16EiiiillPKtPtNS_10FilterModeE:
  295|     59|                               enum FilterMode filtering) {
  296|     59|  int y;
  297|     59|  void (*ScaleRowDown4)(const uint16_t* src_ptr, ptrdiff_t src_stride,
  298|     59|                        uint16_t* dst_ptr, int dst_width) =
  299|     59|      filtering ? ScaleRowDown4Box_16_C : ScaleRowDown4_16_C;
  ------------------
  |  Branch (299:7): [True: 59, False: 0]
  ------------------
  300|     59|  ptrdiff_t row_stride = src_stride * 4;
  301|     59|  (void)src_width;
  302|     59|  (void)src_height;
  303|     59|  if (!filtering) {
  ------------------
  |  Branch (303:7): [True: 0, False: 59]
  ------------------
  304|      0|    src_ptr += src_stride * 2;  // Point to row 2.
  305|      0|    src_stride = 0;
  306|      0|  }
  307|       |#if defined(HAS_SCALEROWDOWN4_16_NEON)
  308|       |  if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(dst_width, 8)) {
  309|       |    ScaleRowDown4 =
  310|       |        filtering ? ScaleRowDown4Box_16_NEON : ScaleRowDown4_16_NEON;
  311|       |  }
  312|       |#endif
  313|       |#if defined(HAS_SCALEROWDOWN4_16_SSE2)
  314|       |  if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
  315|       |    ScaleRowDown4 =
  316|       |        filtering ? ScaleRowDown4Box_16_SSE2 : ScaleRowDown4_16_SSE2;
  317|       |  }
  318|       |#endif
  319|       |
  320|     59|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (320:7): [True: 0, False: 59]
  ------------------
  321|      0|    src_stride = 0;
  322|      0|  }
  323|    742|  for (y = 0; y < dst_height; ++y) {
  ------------------
  |  Branch (323:15): [True: 683, False: 59]
  ------------------
  324|    683|    ScaleRowDown4(src_ptr, src_stride, dst_ptr, dst_width);
  325|    683|    src_ptr += row_stride;
  326|    683|    dst_ptr += dst_stride;
  327|    683|  }
  328|     59|}
scale.cc:_ZN6libyuvL16ScalePlaneBox_16EiiiillPKtPt:
  953|  1.50k|                            uint16_t* dst_ptr) {
  954|  1.50k|  int j, k;
  955|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
  956|  1.50k|  int x = 0;
  957|  1.50k|  int y = 0;
  958|  1.50k|  int dx = 0;
  959|  1.50k|  int dy = 0;
  960|  1.50k|  const int max_y = (src_height << 16);
  961|  1.50k|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterBox, &x, &y,
  962|  1.50k|             &dx, &dy);
  963|  1.50k|  src_width = Abs(src_width);
  964|  1.50k|  {
  965|       |    // Allocate a row buffer of uint32_t.
  966|  1.50k|    align_buffer_64(row32, src_width * 4);
  ------------------
  |  | 1005|  1.50k|  size_t var##_mem_size = (size); /* NOLINT */                             \
  |  | 1006|  1.50k|  void* var##_mem = (var##_mem_size > SIZE_MAX - 63)                       \
  |  |  ------------------
  |  |  |  Branch (1006:21): [True: 0, False: 1.50k]
  |  |  ------------------
  |  | 1007|  1.50k|                        ? NULL                                             \
  |  | 1008|  1.50k|                        : malloc(var##_mem_size + 63);        /* NOLINT */ \
  |  | 1009|  1.50k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
  967|  1.50k|    if (!row32)
  ------------------
  |  Branch (967:9): [True: 0, False: 1.50k]
  ------------------
  968|      0|      return 1;
  969|  1.50k|    void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx,
  970|  1.50k|                         const uint32_t* src_ptr, uint16_t* dst_ptr) =
  971|  1.50k|        (dx & 0xffff) ? ScaleAddCols2_16_C : ScaleAddCols1_16_C;
  ------------------
  |  Branch (971:9): [True: 559, False: 943]
  ------------------
  972|  1.50k|    void (*ScaleAddRow)(const uint16_t* src_ptr, uint32_t* dst_ptr,
  973|  1.50k|                        int src_width) = ScaleAddRow_16_C;
  974|       |
  975|       |#if defined(HAS_SCALEADDROW_16_SSE2)
  976|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(src_width, 16)) {
  977|       |      ScaleAddRow = ScaleAddRow_16_SSE2;
  978|       |    }
  979|       |#endif
  980|       |
  981|  63.5k|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (981:17): [True: 62.0k, False: 1.50k]
  ------------------
  982|  62.0k|      int boxheight;
  983|  62.0k|      int iy = y >> 16;
  984|  62.0k|      const uint16_t* src = src_ptr + iy * src_stride;
  985|  62.0k|      y += dy;
  986|  62.0k|      if (y > max_y) {
  ------------------
  |  Branch (986:11): [True: 0, False: 62.0k]
  ------------------
  987|      0|        y = max_y;
  988|      0|      }
  989|  62.0k|      boxheight = MIN1((y >> 16) - iy);
  ------------------
  |  |  735|  62.0k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 62.0k]
  |  |  ------------------
  ------------------
  990|  62.0k|      memset(row32, 0, src_width * 4);
  991|  1.00M|      for (k = 0; k < boxheight; ++k) {
  ------------------
  |  Branch (991:19): [True: 947k, False: 62.0k]
  ------------------
  992|   947k|        ScaleAddRow(src, (uint32_t*)(row32), src_width);
  993|   947k|        src += src_stride;
  994|   947k|      }
  995|  62.0k|      ScaleAddCols(dst_width, boxheight, x, dx, (uint32_t*)(row32), dst_ptr);
  996|  62.0k|      dst_ptr += dst_stride;
  997|  62.0k|    }
  998|  1.50k|    free_aligned_buffer_64(row32);
  ------------------
  |  | 1012|  1.50k|  free(var##_mem);                  \
  |  | 1013|  1.50k|  var = NULL
  ------------------
  999|  1.50k|  }
 1000|      0|  return 0;
 1001|  1.50k|}
scale.cc:_ZN6libyuvL18ScaleAddCols2_16_CEiiiiPKjPt:
  786|  33.1k|                               uint16_t* dst_ptr) {
  787|  33.1k|  int i;
  788|  33.1k|  int scaletbl[2];
  789|  33.1k|  int minboxwidth = dx >> 16;
  790|  33.1k|  int boxwidth;
  791|  33.1k|  scaletbl[0] = 65536 / (MIN1(minboxwidth) * boxheight);
  ------------------
  |  |  735|  33.1k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 33.1k]
  |  |  ------------------
  ------------------
  792|  33.1k|  scaletbl[1] = 65536 / (MIN1(minboxwidth + 1) * boxheight);
  ------------------
  |  |  735|  33.1k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 33.1k]
  |  |  ------------------
  ------------------
  793|  2.31M|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (793:15): [True: 2.28M, False: 33.1k]
  ------------------
  794|  2.28M|    int ix = x >> 16;
  795|  2.28M|    x += dx;
  796|  2.28M|    boxwidth = MIN1((x >> 16) - ix);
  ------------------
  |  |  735|  2.28M|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 2.28M]
  |  |  ------------------
  ------------------
  797|  2.28M|    int scaletbl_index = boxwidth - minboxwidth;
  798|       |    assert((scaletbl_index == 0) || (scaletbl_index == 1));
  799|  2.28M|    *dst_ptr++ =
  800|  2.28M|        SumPixels_16(boxwidth, src_ptr + ix) * scaletbl[scaletbl_index] >> 16;
  801|  2.28M|  }
  802|  33.1k|}
scale.cc:_ZN6libyuvL12SumPixels_16EiPKj:
  747|  3.77M|static __inline uint32_t SumPixels_16(int iboxwidth, const uint32_t* src_ptr) {
  748|  3.77M|  uint32_t sum = 0u;
  749|  3.77M|  int x;
  750|  3.77M|  assert(iboxwidth > 0);
  751|  25.9M|  for (x = 0; x < iboxwidth; ++x) {
  ------------------
  |  Branch (751:15): [True: 22.1M, False: 3.77M]
  ------------------
  752|  22.1M|    sum += src_ptr[x];
  753|  22.1M|  }
  754|  3.77M|  return sum;
  755|  3.77M|}
scale.cc:_ZN6libyuvL18ScaleAddCols1_16_CEiiiiPKjPt:
  840|  28.9k|                               uint16_t* dst_ptr) {
  841|  28.9k|  int boxwidth = MIN1(dx >> 16);
  ------------------
  |  |  735|  28.9k|#define MIN1(x) ((x) < 1 ? 1 : (x))
  |  |  ------------------
  |  |  |  Branch (735:18): [True: 0, False: 28.9k]
  |  |  ------------------
  ------------------
  842|  28.9k|  int scaleval = 65536 / (boxwidth * boxheight);
  843|  28.9k|  int i;
  844|  1.52M|  for (i = 0; i < dst_width; ++i) {
  ------------------
  |  Branch (844:15): [True: 1.49M, False: 28.9k]
  ------------------
  845|  1.49M|    *dst_ptr++ = SumPixels_16(boxwidth, src_ptr + x) * scaleval >> 16;
  846|  1.49M|    x += boxwidth;
  847|  1.49M|  }
  848|  28.9k|}
scale.cc:_ZN6libyuvL23ScalePlaneBilinearUp_16EiiiillPKtPtNS_10FilterModeE:
 1718|  4.11k|                                   enum FilterMode filtering) {
 1719|  4.11k|  assert(src_width > 0);
 1720|  4.11k|  assert(src_height > 0);
 1721|  4.11k|  assert(dst_width > 0);
 1722|  4.11k|  assert(dst_height > 0);
 1723|       |
 1724|  4.11k|  int j;
 1725|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1726|  4.11k|  int x = 0;
 1727|  4.11k|  int y = 0;
 1728|  4.11k|  int dx = 0;
 1729|  4.11k|  int dy = 0;
 1730|  4.11k|  const int max_y = (src_height - 1) << 16;
 1731|  4.11k|  void (*InterpolateRow)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1732|  4.11k|                         ptrdiff_t src_stride, int dst_width,
 1733|  4.11k|                         int source_y_fraction) = InterpolateRow_16_C;
 1734|  4.11k|  void (*ScaleFilterCols)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1735|  4.11k|                          int dst_width, int x, int dx) =
 1736|  4.11k|      filtering ? ScaleFilterCols_16_C : ScaleCols_16_C;
  ------------------
  |  Branch (1736:7): [True: 4.11k, False: 0]
  ------------------
 1737|  4.11k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1738|  4.11k|             &dx, &dy);
 1739|  4.11k|  assert(dy <= 65536);
 1740|  4.11k|  src_width = Abs(src_width);
 1741|       |
 1742|       |#if defined(HAS_INTERPOLATEROW_16_SSSE3)
 1743|       |  if (TestCpuFlag(kCpuHasSSSE3)) {
 1744|       |    InterpolateRow = InterpolateRow_16_Any_SSSE3;
 1745|       |    if (IS_ALIGNED(dst_width, 16)) {
 1746|       |      InterpolateRow = InterpolateRow_16_SSSE3;
 1747|       |    }
 1748|       |  }
 1749|       |#endif
 1750|  4.11k|#if defined(HAS_INTERPOLATEROW_16_AVX2)
 1751|  4.11k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1751:7): [True: 4.11k, False: 0]
  ------------------
 1752|  4.11k|    InterpolateRow = InterpolateRow_16_Any_AVX2;
 1753|  4.11k|    if (IS_ALIGNED(dst_width, 32)) {
  ------------------
  |  | 1002|  4.11k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 1.30k, False: 2.80k]
  |  |  ------------------
  ------------------
 1754|  1.30k|      InterpolateRow = InterpolateRow_16_AVX2;
 1755|  1.30k|    }
 1756|  4.11k|  }
 1757|  4.11k|#endif
 1758|       |#if defined(HAS_INTERPOLATEROW_16_NEON)
 1759|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1760|       |    InterpolateRow = InterpolateRow_16_Any_NEON;
 1761|       |    if (IS_ALIGNED(dst_width, 16)) {
 1762|       |      InterpolateRow = InterpolateRow_16_NEON;
 1763|       |    }
 1764|       |  }
 1765|       |#endif
 1766|       |#if defined(HAS_INTERPOLATEROW_16_SME)
 1767|       |  if (TestCpuFlag(kCpuHasSME)) {
 1768|       |    InterpolateRow = InterpolateRow_16_SME;
 1769|       |  }
 1770|       |#endif
 1771|       |
 1772|  4.11k|  if (filtering && src_width >= 32768) {
  ------------------
  |  Branch (1772:7): [True: 4.11k, False: 0]
  |  Branch (1772:20): [True: 0, False: 4.11k]
  ------------------
 1773|      0|    ScaleFilterCols = ScaleFilterCols64_16_C;
 1774|      0|  }
 1775|       |#if defined(HAS_SCALEFILTERCOLS_16_SSSE3)
 1776|       |  if (filtering && TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
 1777|       |    ScaleFilterCols = ScaleFilterCols_16_SSSE3;
 1778|       |  }
 1779|       |#endif
 1780|  4.11k|  if (!filtering && src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1780:7): [True: 0, False: 4.11k]
  |  Branch (1780:21): [True: 0, False: 0]
  |  Branch (1780:51): [True: 0, False: 0]
  ------------------
 1781|      0|    ScaleFilterCols = ScaleColsUp2_16_C;
 1782|       |#if defined(HAS_SCALECOLS_16_SSE2)
 1783|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1784|       |      ScaleFilterCols = ScaleColsUp2_16_SSE2;
 1785|       |    }
 1786|       |#endif
 1787|      0|  }
 1788|       |
 1789|  4.11k|  if (y > max_y) {
  ------------------
  |  Branch (1789:7): [True: 544, False: 3.56k]
  ------------------
 1790|    544|    y = max_y;
 1791|    544|  }
 1792|  4.11k|  {
 1793|  4.11k|    int yi = y >> 16;
 1794|  4.11k|    const uint16_t* src = src_ptr + yi * src_stride;
 1795|       |
 1796|       |    // Allocate 2 row buffers.
 1797|  4.11k|    const int row_size = (dst_width + 31) & ~31;
 1798|  4.11k|    align_buffer_64(row, row_size * 4);
  ------------------
  |  | 1005|  4.11k|  size_t var##_mem_size = (size); /* NOLINT */                             \
  |  | 1006|  4.11k|  void* var##_mem = (var##_mem_size > SIZE_MAX - 63)                       \
  |  |  ------------------
  |  |  |  Branch (1006:21): [True: 0, False: 4.11k]
  |  |  ------------------
  |  | 1007|  4.11k|                        ? NULL                                             \
  |  | 1008|  4.11k|                        : malloc(var##_mem_size + 63);        /* NOLINT */ \
  |  | 1009|  4.11k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1799|  4.11k|    ptrdiff_t rowstride = row_size;
 1800|  4.11k|    int lasty = yi;
 1801|  4.11k|    uint16_t* rowptr = (uint16_t*)row;
 1802|  4.11k|    if (!row)
  ------------------
  |  Branch (1802:9): [True: 0, False: 4.11k]
  ------------------
 1803|      0|      return 1;
 1804|       |
 1805|  4.11k|    ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1806|  4.11k|    if (src_height > 1) {
  ------------------
  |  Branch (1806:9): [True: 3.56k, False: 544]
  ------------------
 1807|  3.56k|      src += src_stride;
 1808|  3.56k|    }
 1809|  4.11k|    ScaleFilterCols(rowptr + rowstride, src, dst_width, x, dx);
 1810|  4.11k|    if (src_height > 2) {
  ------------------
  |  Branch (1810:9): [True: 2.91k, False: 1.19k]
  ------------------
 1811|  2.91k|      src += src_stride;
 1812|  2.91k|    }
 1813|       |
 1814|       |    // 2-row rolling buffer:
 1815|       |    // rowptr and (rowptr + rowstride) hold the scaled rows for yi and yi + 1.
 1816|       |    // Because dy <= 65536 (dy <= 1.0 in 16.16), yi advances in unit steps.
 1817|       |    // When yi != lasty:
 1818|       |    // 1. Scale the next source row into the older buffer (rowptr).
 1819|       |    // 2. Swap buffer pointers (rowptr += rowstride; rowstride = -rowstride;)
 1820|       |    //    so rowptr points to yi and (rowptr + rowstride) points to yi + 1.
 1821|       |    // 3. Advance src by 1 row if row yi + 2 exists ((y + 65536) < max_y),
 1822|       |    //    otherwise clamp src at (src_height - 1) to avoid reading out of bounds.
 1823|  3.73M|    for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1823:17): [True: 3.72M, False: 4.11k]
  ------------------
 1824|  3.72M|      if (y > max_y) {
  ------------------
  |  Branch (1824:11): [True: 529k, False: 3.19M]
  ------------------
 1825|   529k|        y = max_y;
 1826|   529k|      }
 1827|  3.72M|      yi = y >> 16;
 1828|  3.72M|      if (yi != lasty) {
  ------------------
  |  Branch (1828:11): [True: 146k, False: 3.58M]
  ------------------
 1829|   146k|        ScaleFilterCols(rowptr, src, dst_width, x, dx);
 1830|   146k|        rowptr += rowstride;
 1831|   146k|        rowstride = -rowstride;
 1832|   146k|        lasty = yi;
 1833|   146k|        if ((y + 65536) < max_y) {
  ------------------
  |  Branch (1833:13): [True: 144k, False: 2.91k]
  ------------------
 1834|   144k|          src += src_stride;
 1835|   144k|        }
 1836|   146k|      }
 1837|  3.72M|      if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1837:11): [True: 529k, False: 3.19M]
  ------------------
 1838|   529k|        InterpolateRow(dst_ptr, rowptr, 0, dst_width, 0);
 1839|  3.19M|      } else {
 1840|  3.19M|        int yf = (y >> 8) & 255;
 1841|  3.19M|        InterpolateRow(dst_ptr, rowptr, rowstride, dst_width, yf);
 1842|  3.19M|      }
 1843|  3.72M|      dst_ptr += dst_stride;
 1844|  3.72M|      y += dy;
 1845|  3.72M|    }
 1846|  4.11k|    free_aligned_buffer_64(row);
  ------------------
  |  | 1012|  4.11k|  free(var##_mem);                  \
  |  | 1013|  4.11k|  var = NULL
  ------------------
 1847|  4.11k|  }
 1848|      0|  return 0;
 1849|  4.11k|}
scale.cc:_ZN6libyuvL25ScalePlaneBilinearDown_16EiiiillPKtPtNS_10FilterModeE:
 1129|  5.46k|                                     enum FilterMode filtering) {
 1130|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1131|  5.46k|  int x = 0;
 1132|  5.46k|  int y = 0;
 1133|  5.46k|  int dx = 0;
 1134|  5.46k|  int dy = 0;
 1135|       |  // TODO(fbarchard): Consider not allocating row buffer for kFilterLinear.
 1136|       |  // Allocate a row buffer.
 1137|  5.46k|  align_buffer_64(row, src_width * 2);
  ------------------
  |  | 1005|  5.46k|  size_t var##_mem_size = (size); /* NOLINT */                             \
  |  | 1006|  5.46k|  void* var##_mem = (var##_mem_size > SIZE_MAX - 63)                       \
  |  |  ------------------
  |  |  |  Branch (1006:21): [True: 0, False: 5.46k]
  |  |  ------------------
  |  | 1007|  5.46k|                        ? NULL                                             \
  |  | 1008|  5.46k|                        : malloc(var##_mem_size + 63);        /* NOLINT */ \
  |  | 1009|  5.46k|  uint8_t* var = (uint8_t*)(((intptr_t)var##_mem + 63) & ~63) /* NOLINT */
  ------------------
 1138|  5.46k|  if (!row)
  ------------------
  |  Branch (1138:7): [True: 0, False: 5.46k]
  ------------------
 1139|      0|    return 1;
 1140|       |
 1141|  5.46k|  const int max_y = (src_height - 1) << 16;
 1142|  5.46k|  int j;
 1143|  5.46k|  void (*ScaleFilterCols)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1144|  5.46k|                          int dst_width, int x, int dx) =
 1145|  5.46k|      (src_width >= 32768) ? ScaleFilterCols64_16_C : ScaleFilterCols_16_C;
  ------------------
  |  Branch (1145:7): [True: 0, False: 5.46k]
  ------------------
 1146|  5.46k|  void (*InterpolateRow)(uint16_t* dst_ptr, const uint16_t* src_ptr,
 1147|  5.46k|                         ptrdiff_t src_stride, int dst_width,
 1148|  5.46k|                         int source_y_fraction) = InterpolateRow_16_C;
 1149|  5.46k|  ScaleSlope(src_width, src_height, dst_width, dst_height, filtering, &x, &y,
 1150|  5.46k|             &dx, &dy);
 1151|  5.46k|  src_width = Abs(src_width);
 1152|       |
 1153|       |#if defined(HAS_INTERPOLATEROW_16_SSSE3)
 1154|       |  if (TestCpuFlag(kCpuHasSSSE3)) {
 1155|       |    InterpolateRow = InterpolateRow_16_Any_SSSE3;
 1156|       |    if (IS_ALIGNED(src_width, 16)) {
 1157|       |      InterpolateRow = InterpolateRow_16_SSSE3;
 1158|       |    }
 1159|       |  }
 1160|       |#endif
 1161|  5.46k|#if defined(HAS_INTERPOLATEROW_16_AVX2)
 1162|  5.46k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1162:7): [True: 5.46k, False: 0]
  ------------------
 1163|  5.46k|    InterpolateRow = InterpolateRow_16_Any_AVX2;
 1164|  5.46k|    if (IS_ALIGNED(src_width, 32)) {
  ------------------
  |  | 1002|  5.46k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 587, False: 4.87k]
  |  |  ------------------
  ------------------
 1165|    587|      InterpolateRow = InterpolateRow_16_AVX2;
 1166|    587|    }
 1167|  5.46k|  }
 1168|  5.46k|#endif
 1169|       |#if defined(HAS_INTERPOLATEROW_16_NEON)
 1170|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1171|       |    InterpolateRow = InterpolateRow_16_Any_NEON;
 1172|       |    if (IS_ALIGNED(src_width, 16)) {
 1173|       |      InterpolateRow = InterpolateRow_16_NEON;
 1174|       |    }
 1175|       |  }
 1176|       |#endif
 1177|       |#if defined(HAS_INTERPOLATEROW_16_SME)
 1178|       |  if (TestCpuFlag(kCpuHasSME)) {
 1179|       |    InterpolateRow = InterpolateRow_16_SME;
 1180|       |  }
 1181|       |#endif
 1182|       |
 1183|       |#if defined(HAS_SCALEFILTERCOLS_16_SSSE3)
 1184|       |  if (TestCpuFlag(kCpuHasSSSE3) && src_width < 32768) {
 1185|       |    ScaleFilterCols = ScaleFilterCols_16_SSSE3;
 1186|       |  }
 1187|       |#endif
 1188|  5.46k|  if (y > max_y) {
  ------------------
  |  Branch (1188:7): [True: 38, False: 5.42k]
  ------------------
 1189|     38|    y = max_y;
 1190|     38|  }
 1191|       |
 1192|   420k|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1192:15): [True: 415k, False: 5.46k]
  ------------------
 1193|   415k|    int yi = y >> 16;
 1194|   415k|    const uint16_t* src = src_ptr + yi * src_stride;
 1195|   415k|    if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1195:9): [True: 158k, False: 256k]
  ------------------
 1196|   158k|      ScaleFilterCols(dst_ptr, src, dst_width, x, dx);
 1197|   256k|    } else {
 1198|   256k|      int yf = (y >> 8) & 255;
 1199|   256k|      InterpolateRow((uint16_t*)row, src, src_stride, src_width, yf);
 1200|   256k|      ScaleFilterCols(dst_ptr, (uint16_t*)row, dst_width, x, dx);
 1201|   256k|    }
 1202|   415k|    dst_ptr += dst_stride;
 1203|   415k|    y += dy;
 1204|   415k|    if (y > max_y) {
  ------------------
  |  Branch (1204:9): [True: 6.10k, False: 409k]
  ------------------
 1205|  6.10k|      y = max_y;
 1206|  6.10k|    }
 1207|   415k|  }
 1208|       |  free_aligned_buffer_64(row);
  ------------------
  |  | 1012|  5.46k|  free(var##_mem);                  \
  |  | 1013|  5.46k|  var = NULL
  ------------------
 1209|  5.46k|  return 0;
 1210|  5.46k|}
scale.cc:_ZN6libyuvL19ScalePlaneSimple_16EiiiillPKtPt:
 1899|    650|                                uint16_t* dst_ptr) {
 1900|    650|  int i;
 1901|    650|  void (*ScaleCols)(uint16_t* dst_ptr, const uint16_t* src_ptr, int dst_width,
 1902|    650|                    int x, int dx) = ScaleCols_16_C;
 1903|       |  // Initial source x/y coordinate and step values as 16.16 fixed point.
 1904|    650|  int x = 0;
 1905|    650|  int y = 0;
 1906|    650|  int dx = 0;
 1907|    650|  int dy = 0;
 1908|    650|  ScaleSlope(src_width, src_height, dst_width, dst_height, kFilterNone, &x, &y,
 1909|    650|             &dx, &dy);
 1910|    650|  src_width = Abs(src_width);
 1911|       |
 1912|    650|  if (src_width * 2 == dst_width && x < 0x8000) {
  ------------------
  |  Branch (1912:7): [True: 45, False: 605]
  |  Branch (1912:37): [True: 45, False: 0]
  ------------------
 1913|     45|    ScaleCols = ScaleColsUp2_16_C;
 1914|       |#if defined(HAS_SCALECOLS_16_SSE2)
 1915|       |    if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(dst_width, 8)) {
 1916|       |      ScaleCols = ScaleColsUp2_16_SSE2;
 1917|       |    }
 1918|       |#endif
 1919|     45|  }
 1920|       |
 1921|   754k|  for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1921:15): [True: 753k, False: 650]
  ------------------
 1922|   753k|    ScaleCols(dst_ptr, src_ptr + (y >> 16) * src_stride, dst_width, x, dx);
 1923|   753k|    dst_ptr += dst_stride;
 1924|   753k|    y += dy;
 1925|   753k|  }
 1926|    650|}
scale.cc:_ZN6libyuvL23ScalePlaneUp2_12_LinearEiiiillPKtPt:
 1516|    177|                                    uint16_t* dst_ptr) {
 1517|    177|  void (*ScaleRowUp)(const uint16_t* src_ptr, uint16_t* dst_ptr,
 1518|    177|                     int dst_width) = ScaleRowUp2_Linear_16_Any_C;
 1519|    177|  int i;
 1520|    177|  int y;
 1521|    177|  int dy;
 1522|       |
 1523|    177|  (void)src_width;
 1524|       |  // This function can only scale up by 2 times horizontally.
 1525|    177|  assert(src_width == ((dst_width + 1) / 2));
 1526|       |
 1527|    177|#ifdef HAS_SCALEROWUP2_LINEAR_12_SSSE3
 1528|    177|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1528:7): [True: 177, False: 0]
  ------------------
 1529|    177|    ScaleRowUp = ScaleRowUp2_Linear_12_Any_SSSE3;
 1530|    177|  }
 1531|    177|#endif
 1532|       |
 1533|    177|#ifdef HAS_SCALEROWUP2_LINEAR_12_AVX2
 1534|    177|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1534:7): [True: 177, False: 0]
  ------------------
 1535|    177|    ScaleRowUp = ScaleRowUp2_Linear_12_Any_AVX2;
 1536|    177|  }
 1537|    177|#endif
 1538|       |
 1539|       |#ifdef HAS_SCALEROWUP2_LINEAR_12_NEON
 1540|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1541|       |    ScaleRowUp = ScaleRowUp2_Linear_12_Any_NEON;
 1542|       |  }
 1543|       |#endif
 1544|       |
 1545|    177|  if (dst_height == 1) {
  ------------------
  |  Branch (1545:7): [True: 10, False: 167]
  ------------------
 1546|     10|    ScaleRowUp(src_ptr + ((src_height - 1) / 2) * src_stride, dst_ptr,
 1547|     10|               dst_width);
 1548|    167|  } else {
 1549|    167|    dy = FixedDiv(src_height - 1, dst_height - 1);
  ------------------
  |  |  241|    167|#define FixedDiv FixedDiv_X86
  ------------------
 1550|    167|    y = (1 << 15) - 1;
 1551|   614k|    for (i = 0; i < dst_height; ++i) {
  ------------------
  |  Branch (1551:17): [True: 614k, False: 167]
  ------------------
 1552|   614k|      ScaleRowUp(src_ptr + (y >> 16) * src_stride, dst_ptr, dst_width);
 1553|   614k|      dst_ptr += dst_stride;
 1554|   614k|      y += dy;
 1555|   614k|    }
 1556|    167|  }
 1557|    177|}
scale.cc:_ZN6libyuvL25ScalePlaneUp2_12_BilinearEiiiillPKtPt:
 1571|    138|                                      uint16_t* dst_ptr) {
 1572|    138|  void (*Scale2RowUp)(const uint16_t* src_ptr, ptrdiff_t src_stride,
 1573|    138|                      uint16_t* dst_ptr, ptrdiff_t dst_stride, int dst_width) =
 1574|    138|      ScaleRowUp2_Bilinear_16_Any_C;
 1575|    138|  int x;
 1576|       |
 1577|    138|  (void)src_width;
 1578|       |  // This function can only scale up by 2 times.
 1579|    138|  assert(src_width == ((dst_width + 1) / 2));
 1580|    138|  assert(src_height == ((dst_height + 1) / 2));
 1581|       |
 1582|    138|#ifdef HAS_SCALEROWUP2_BILINEAR_12_SSSE3
 1583|    138|  if (TestCpuFlag(kCpuHasSSSE3)) {
  ------------------
  |  Branch (1583:7): [True: 138, False: 0]
  ------------------
 1584|    138|    Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_SSSE3;
 1585|    138|  }
 1586|    138|#endif
 1587|       |
 1588|    138|#ifdef HAS_SCALEROWUP2_BILINEAR_12_AVX2
 1589|    138|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1589:7): [True: 138, False: 0]
  ------------------
 1590|    138|    Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_AVX2;
 1591|    138|  }
 1592|    138|#endif
 1593|       |
 1594|       |#ifdef HAS_SCALEROWUP2_BILINEAR_12_NEON
 1595|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1596|       |    Scale2RowUp = ScaleRowUp2_Bilinear_12_Any_NEON;
 1597|       |  }
 1598|       |#endif
 1599|       |
 1600|    138|  Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1601|    138|  dst_ptr += dst_stride;
 1602|  6.53k|  for (x = 0; x < src_height - 1; ++x) {
  ------------------
  |  Branch (1602:15): [True: 6.39k, False: 138]
  ------------------
 1603|  6.39k|    Scale2RowUp(src_ptr, src_stride, dst_ptr, dst_stride, dst_width);
 1604|  6.39k|    src_ptr += src_stride;
 1605|  6.39k|    dst_ptr += 2 * dst_stride;
 1606|  6.39k|  }
 1607|    138|  if (!(dst_height & 1)) {
  ------------------
  |  Branch (1607:7): [True: 99, False: 39]
  ------------------
 1608|     99|    Scale2RowUp(src_ptr, 0, dst_ptr, 0, dst_width);
 1609|     99|  }
 1610|    138|}

ScaleRowDown2Box_Any_AVX2:
   27|    530|               int dst_width) {                                                \
   28|    530|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|    530|    int n = dst_width - r;                                                     \
   30|    530|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 250, False: 280]
  ------------------
   31|    250|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|    250|    }                                                                          \
   33|    530|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|    530|                   dst_ptr + n * BPP, r);                                      \
   35|    530|  }
ScaleRowDown4Box_Any_AVX2:
   27|    501|               int dst_width) {                                                \
   28|    501|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|    501|    int n = dst_width - r;                                                     \
   30|    501|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 360, False: 141]
  ------------------
   31|    360|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|    360|    }                                                                          \
   33|    501|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|    501|                   dst_ptr + n * BPP, r);                                      \
   35|    501|  }
ScaleRowDown34_0_Box_Any_SSSE3:
   27|      4|               int dst_width) {                                                \
   28|      4|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|      4|    int n = dst_width - r;                                                     \
   30|      4|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 0, False: 4]
  ------------------
   31|      0|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|      0|    }                                                                          \
   33|      4|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|      4|                   dst_ptr + n * BPP, r);                                      \
   35|      4|  }
ScaleRowDown34_1_Box_Any_SSSE3:
   27|      2|               int dst_width) {                                                \
   28|      2|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|      2|    int n = dst_width - r;                                                     \
   30|      2|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|      0|    }                                                                          \
   33|      2|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|      2|                   dst_ptr + n * BPP, r);                                      \
   35|      2|  }
ScaleRowDown38_3_Box_Any_SSSE3:
   27|     24|               int dst_width) {                                                \
   28|     24|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|     24|    int n = dst_width - r;                                                     \
   30|     24|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 0, False: 24]
  ------------------
   31|      0|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|      0|    }                                                                          \
   33|     24|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|     24|                   dst_ptr + n * BPP, r);                                      \
   35|     24|  }
ScaleRowDown38_2_Box_Any_SSSE3:
   27|     12|               int dst_width) {                                                \
   28|     12|    int r = (int)((unsigned int)dst_width % (MASK + 1)); /* NOLINT */          \
   29|     12|    int n = dst_width - r;                                                     \
   30|     12|    if (n > 0) {                                                               \
  ------------------
  |  Branch (30:9): [True: 0, False: 12]
  ------------------
   31|      0|      SCALEROWDOWN_SIMD(src_ptr, src_stride, dst_ptr, n);                      \
   32|      0|    }                                                                          \
   33|     12|    SCALEROWDOWN_C(src_ptr + (n * FACTOR) * BPP, src_stride,                   \
   34|     12|                   dst_ptr + n * BPP, r);                                      \
   35|     12|  }
ScaleAddRow_Any_AVX2:
  505|   475k|  void NAMEANY(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width) { \
  506|   475k|    int n = src_width & ~MASK;                                             \
  507|   475k|    if (n > 0) {                                                           \
  ------------------
  |  Branch (507:9): [True: 360k, False: 114k]
  ------------------
  508|   360k|      SCALEADDROW_SIMD(src_ptr, dst_ptr, n);                               \
  509|   360k|    }                                                                      \
  510|   475k|    SCALEADDROW_C(src_ptr + n, dst_ptr + n, src_width & MASK);             \
  511|   475k|  }
ScaleRowUp2_Linear_Any_AVX2:
  571|   329k|  void NAME(const PTYPE* src_ptr, PTYPE* dst_ptr, int dst_width) { \
  572|   329k|    int work_width = (dst_width - 1) & ~1;                         \
  573|   329k|    int r = work_width & MASK;                                     \
  574|   329k|    int n = work_width & ~MASK;                                    \
  575|   329k|    dst_ptr[0] = src_ptr[0];                                       \
  576|   329k|    if (work_width > 0) {                                          \
  ------------------
  |  Branch (576:9): [True: 329k, False: 0]
  ------------------
  577|   329k|      if (n != 0) {                                                \
  ------------------
  |  Branch (577:11): [True: 122k, False: 206k]
  ------------------
  578|   122k|        SIMD(src_ptr, dst_ptr + 1, n);                             \
  579|   122k|      }                                                            \
  580|   329k|      C(src_ptr + (n / 2), dst_ptr + n + 1, r);                    \
  581|   329k|    }                                                              \
  582|   329k|    dst_ptr[dst_width - 1] = src_ptr[(dst_width - 1) / 2];         \
  583|   329k|  }
ScaleRowUp2_Linear_12_Any_AVX2:
  571|   614k|  void NAME(const PTYPE* src_ptr, PTYPE* dst_ptr, int dst_width) { \
  572|   614k|    int work_width = (dst_width - 1) & ~1;                         \
  573|   614k|    int r = work_width & MASK;                                     \
  574|   614k|    int n = work_width & ~MASK;                                    \
  575|   614k|    dst_ptr[0] = src_ptr[0];                                       \
  576|   614k|    if (work_width > 0) {                                          \
  ------------------
  |  Branch (576:9): [True: 614k, False: 0]
  ------------------
  577|   614k|      if (n != 0) {                                                \
  ------------------
  |  Branch (577:11): [True: 255k, False: 358k]
  ------------------
  578|   255k|        SIMD(src_ptr, dst_ptr + 1, n);                             \
  579|   255k|      }                                                            \
  580|   614k|      C(src_ptr + (n / 2), dst_ptr + n + 1, r);                    \
  581|   614k|    }                                                              \
  582|   614k|    dst_ptr[dst_width - 1] = src_ptr[(dst_width - 1) / 2];         \
  583|   614k|  }
ScaleRowUp2_Bilinear_Any_AVX2:
  694|  7.51k|            ptrdiff_t dst_stride, int dst_width) {                        \
  695|  7.51k|    int work_width = (dst_width - 1) & ~1;                                \
  696|  7.51k|    int r = work_width & MASK;                                            \
  697|  7.51k|    int n = work_width & ~MASK;                                           \
  698|  7.51k|    const PTYPE* sa = src_ptr;                                            \
  699|  7.51k|    const PTYPE* sb = src_ptr + src_stride;                               \
  700|  7.51k|    PTYPE* da = dst_ptr;                                                  \
  701|  7.51k|    PTYPE* db = dst_ptr + dst_stride;                                     \
  702|  7.51k|    da[0] = (3 * sa[0] + sb[0] + 2) >> 2;                                 \
  703|  7.51k|    db[0] = (sa[0] + 3 * sb[0] + 2) >> 2;                                 \
  704|  7.51k|    if (work_width > 0) {                                                 \
  ------------------
  |  Branch (704:9): [True: 7.51k, False: 0]
  ------------------
  705|  7.51k|      if (n != 0) {                                                       \
  ------------------
  |  Branch (705:11): [True: 7.00k, False: 510]
  ------------------
  706|  7.00k|        SIMD(sa, sb - sa, da + 1, db - da, n);                            \
  707|  7.00k|      }                                                                   \
  708|  7.51k|      C(sa + (n / 2), sb - sa, da + n + 1, db - da, r);                   \
  709|  7.51k|    }                                                                     \
  710|  7.51k|    da[dst_width - 1] =                                                   \
  711|  7.51k|        (3 * sa[(dst_width - 1) / 2] + sb[(dst_width - 1) / 2] + 2) >> 2; \
  712|  7.51k|    db[dst_width - 1] =                                                   \
  713|  7.51k|        (sa[(dst_width - 1) / 2] + 3 * sb[(dst_width - 1) / 2] + 2) >> 2; \
  714|  7.51k|  }
ScaleRowUp2_Bilinear_12_Any_AVX2:
  694|  6.62k|            ptrdiff_t dst_stride, int dst_width) {                        \
  695|  6.62k|    int work_width = (dst_width - 1) & ~1;                                \
  696|  6.62k|    int r = work_width & MASK;                                            \
  697|  6.62k|    int n = work_width & ~MASK;                                           \
  698|  6.62k|    const PTYPE* sa = src_ptr;                                            \
  699|  6.62k|    const PTYPE* sb = src_ptr + src_stride;                               \
  700|  6.62k|    PTYPE* da = dst_ptr;                                                  \
  701|  6.62k|    PTYPE* db = dst_ptr + dst_stride;                                     \
  702|  6.62k|    da[0] = (3 * sa[0] + sb[0] + 2) >> 2;                                 \
  703|  6.62k|    db[0] = (sa[0] + 3 * sb[0] + 2) >> 2;                                 \
  704|  6.62k|    if (work_width > 0) {                                                 \
  ------------------
  |  Branch (704:9): [True: 6.62k, False: 0]
  ------------------
  705|  6.62k|      if (n != 0) {                                                       \
  ------------------
  |  Branch (705:11): [True: 6.44k, False: 184]
  ------------------
  706|  6.44k|        SIMD(sa, sb - sa, da + 1, db - da, n);                            \
  707|  6.44k|      }                                                                   \
  708|  6.62k|      C(sa + (n / 2), sb - sa, da + n + 1, db - da, r);                   \
  709|  6.62k|    }                                                                     \
  710|  6.62k|    da[dst_width - 1] =                                                   \
  711|  6.62k|        (3 * sa[(dst_width - 1) / 2] + sb[(dst_width - 1) / 2] + 2) >> 2; \
  712|  6.62k|    db[dst_width - 1] =                                                   \
  713|  6.62k|        (sa[(dst_width - 1) / 2] + 3 * sb[(dst_width - 1) / 2] + 2) >> 2; \
  714|  6.62k|  }

ScaleRowDown2Box_C:
  112|    530|                        int dst_width) {
  113|    530|  const uint8_t* s = src_ptr;
  114|    530|  const uint8_t* t = src_ptr + src_stride;
  115|    530|  int x;
  116|  4.16k|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (116:15): [True: 3.63k, False: 530]
  ------------------
  117|  3.63k|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  118|  3.63k|    dst[1] = (s[2] + s[3] + t[2] + t[3] + 2) >> 2;
  119|  3.63k|    dst += 2;
  120|  3.63k|    s += 4;
  121|  3.63k|    t += 4;
  122|  3.63k|  }
  123|    530|  if (dst_width & 1) {
  ------------------
  |  Branch (123:7): [True: 158, False: 372]
  ------------------
  124|    158|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  125|    158|  }
  126|    530|}
ScaleRowDown2Box_16_C:
  155|  2.15k|                           int dst_width) {
  156|  2.15k|  const uint16_t* s = src_ptr;
  157|  2.15k|  const uint16_t* t = src_ptr + src_stride;
  158|  2.15k|  int x;
  159|  42.0k|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (159:15): [True: 39.9k, False: 2.15k]
  ------------------
  160|  39.9k|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  161|  39.9k|    dst[1] = (s[2] + s[3] + t[2] + t[3] + 2) >> 2;
  162|  39.9k|    dst += 2;
  163|  39.9k|    s += 4;
  164|  39.9k|    t += 4;
  165|  39.9k|  }
  166|  2.15k|  if (dst_width & 1) {
  ------------------
  |  Branch (166:7): [True: 1.17k, False: 972]
  ------------------
  167|  1.17k|    dst[0] = (s[0] + s[1] + t[0] + t[1] + 2) >> 2;
  168|  1.17k|  }
  169|  2.15k|}
ScaleRowDown4Box_C:
  209|    501|                        int dst_width) {
  210|    501|  int x;
  211|  1.77k|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (211:15): [True: 1.27k, False: 501]
  ------------------
  212|  1.27k|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  213|  1.27k|              src_ptr[src_stride + 0] + src_ptr[src_stride + 1] +
  214|  1.27k|              src_ptr[src_stride + 2] + src_ptr[src_stride + 3] +
  215|  1.27k|              src_ptr[src_stride * 2 + 0] + src_ptr[src_stride * 2 + 1] +
  216|  1.27k|              src_ptr[src_stride * 2 + 2] + src_ptr[src_stride * 2 + 3] +
  217|  1.27k|              src_ptr[src_stride * 3 + 0] + src_ptr[src_stride * 3 + 1] +
  218|  1.27k|              src_ptr[src_stride * 3 + 2] + src_ptr[src_stride * 3 + 3] + 8) >>
  219|  1.27k|             4;
  220|  1.27k|    dst[1] = (src_ptr[4] + src_ptr[5] + src_ptr[6] + src_ptr[7] +
  221|  1.27k|              src_ptr[src_stride + 4] + src_ptr[src_stride + 5] +
  222|  1.27k|              src_ptr[src_stride + 6] + src_ptr[src_stride + 7] +
  223|  1.27k|              src_ptr[src_stride * 2 + 4] + src_ptr[src_stride * 2 + 5] +
  224|  1.27k|              src_ptr[src_stride * 2 + 6] + src_ptr[src_stride * 2 + 7] +
  225|  1.27k|              src_ptr[src_stride * 3 + 4] + src_ptr[src_stride * 3 + 5] +
  226|  1.27k|              src_ptr[src_stride * 3 + 6] + src_ptr[src_stride * 3 + 7] + 8) >>
  227|  1.27k|             4;
  228|  1.27k|    dst += 2;
  229|  1.27k|    src_ptr += 8;
  230|  1.27k|  }
  231|    501|  if (dst_width & 1) {
  ------------------
  |  Branch (231:7): [True: 32, False: 469]
  ------------------
  232|     32|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  233|     32|              src_ptr[src_stride + 0] + src_ptr[src_stride + 1] +
  234|     32|              src_ptr[src_stride + 2] + src_ptr[src_stride + 3] +
  235|     32|              src_ptr[src_stride * 2 + 0] + src_ptr[src_stride * 2 + 1] +
  236|     32|              src_ptr[src_stride * 2 + 2] + src_ptr[src_stride * 2 + 3] +
  237|     32|              src_ptr[src_stride * 3 + 0] + src_ptr[src_stride * 3 + 1] +
  238|     32|              src_ptr[src_stride * 3 + 2] + src_ptr[src_stride * 3 + 3] + 8) >>
  239|     32|             4;
  240|     32|  }
  241|    501|}
ScaleRowDown4Box_16_C:
  246|    683|                           int dst_width) {
  247|    683|  int x;
  248|  9.21k|  for (x = 0; x < dst_width - 1; x += 2) {
  ------------------
  |  Branch (248:15): [True: 8.52k, False: 683]
  ------------------
  249|  8.52k|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  250|  8.52k|              src_ptr[src_stride + 0] + src_ptr[src_stride + 1] +
  251|  8.52k|              src_ptr[src_stride + 2] + src_ptr[src_stride + 3] +
  252|  8.52k|              src_ptr[src_stride * 2 + 0] + src_ptr[src_stride * 2 + 1] +
  253|  8.52k|              src_ptr[src_stride * 2 + 2] + src_ptr[src_stride * 2 + 3] +
  254|  8.52k|              src_ptr[src_stride * 3 + 0] + src_ptr[src_stride * 3 + 1] +
  255|  8.52k|              src_ptr[src_stride * 3 + 2] + src_ptr[src_stride * 3 + 3] + 8) >>
  256|  8.52k|             4;
  257|  8.52k|    dst[1] = (src_ptr[4] + src_ptr[5] + src_ptr[6] + src_ptr[7] +
  258|  8.52k|              src_ptr[src_stride + 4] + src_ptr[src_stride + 5] +
  259|  8.52k|              src_ptr[src_stride + 6] + src_ptr[src_stride + 7] +
  260|  8.52k|              src_ptr[src_stride * 2 + 4] + src_ptr[src_stride * 2 + 5] +
  261|  8.52k|              src_ptr[src_stride * 2 + 6] + src_ptr[src_stride * 2 + 7] +
  262|  8.52k|              src_ptr[src_stride * 3 + 4] + src_ptr[src_stride * 3 + 5] +
  263|  8.52k|              src_ptr[src_stride * 3 + 6] + src_ptr[src_stride * 3 + 7] + 8) >>
  264|  8.52k|             4;
  265|  8.52k|    dst += 2;
  266|  8.52k|    src_ptr += 8;
  267|  8.52k|  }
  268|    683|  if (dst_width & 1) {
  ------------------
  |  Branch (268:7): [True: 32, False: 651]
  ------------------
  269|     32|    dst[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[3] +
  270|     32|              src_ptr[src_stride + 0] + src_ptr[src_stride + 1] +
  271|     32|              src_ptr[src_stride + 2] + src_ptr[src_stride + 3] +
  272|     32|              src_ptr[src_stride * 2 + 0] + src_ptr[src_stride * 2 + 1] +
  273|     32|              src_ptr[src_stride * 2 + 2] + src_ptr[src_stride * 2 + 3] +
  274|     32|              src_ptr[src_stride * 3 + 0] + src_ptr[src_stride * 3 + 1] +
  275|     32|              src_ptr[src_stride * 3 + 2] + src_ptr[src_stride * 3 + 3] + 8) >>
  276|     32|             4;
  277|     32|  }
  278|    683|}
ScaleRowDown34_0_Box_C:
  316|      4|                            int dst_width) {
  317|      4|  const uint8_t* s = src_ptr;
  318|      4|  const uint8_t* t = src_ptr + src_stride;
  319|      4|  int x;
  320|      4|  assert((dst_width % 3 == 0) && (dst_width > 0));
  321|      8|  for (x = 0; x < dst_width; x += 3) {
  ------------------
  |  Branch (321:15): [True: 4, False: 4]
  ------------------
  322|      4|    uint8_t a0 = (s[0] * 3 + s[1] * 1 + 2) >> 2;
  323|      4|    uint8_t a1 = (s[1] * 1 + s[2] * 1 + 1) >> 1;
  324|      4|    uint8_t a2 = (s[2] * 1 + s[3] * 3 + 2) >> 2;
  325|      4|    uint8_t b0 = (t[0] * 3 + t[1] * 1 + 2) >> 2;
  326|      4|    uint8_t b1 = (t[1] * 1 + t[2] * 1 + 1) >> 1;
  327|      4|    uint8_t b2 = (t[2] * 1 + t[3] * 3 + 2) >> 2;
  328|      4|    d[0] = (a0 * 3 + b0 + 2) >> 2;
  329|      4|    d[1] = (a1 * 3 + b1 + 2) >> 2;
  330|      4|    d[2] = (a2 * 3 + b2 + 2) >> 2;
  331|      4|    d += 3;
  332|      4|    s += 4;
  333|      4|    t += 4;
  334|      4|  }
  335|      4|}
ScaleRowDown34_0_Box_16_C:
  340|      4|                               int dst_width) {
  341|      4|  const uint16_t* s = src_ptr;
  342|      4|  const uint16_t* t = src_ptr + src_stride;
  343|      4|  int x;
  344|      4|  assert((dst_width % 3 == 0) && (dst_width > 0));
  345|      8|  for (x = 0; x < dst_width; x += 3) {
  ------------------
  |  Branch (345:15): [True: 4, False: 4]
  ------------------
  346|      4|    uint16_t a0 = (s[0] * 3 + s[1] * 1 + 2) >> 2;
  347|      4|    uint16_t a1 = (s[1] * 1 + s[2] * 1 + 1) >> 1;
  348|      4|    uint16_t a2 = (s[2] * 1 + s[3] * 3 + 2) >> 2;
  349|      4|    uint16_t b0 = (t[0] * 3 + t[1] * 1 + 2) >> 2;
  350|      4|    uint16_t b1 = (t[1] * 1 + t[2] * 1 + 1) >> 1;
  351|      4|    uint16_t b2 = (t[2] * 1 + t[3] * 3 + 2) >> 2;
  352|      4|    d[0] = (a0 * 3 + b0 + 2) >> 2;
  353|      4|    d[1] = (a1 * 3 + b1 + 2) >> 2;
  354|      4|    d[2] = (a2 * 3 + b2 + 2) >> 2;
  355|      4|    d += 3;
  356|      4|    s += 4;
  357|      4|    t += 4;
  358|      4|  }
  359|      4|}
ScaleRowDown34_1_Box_C:
  365|      2|                            int dst_width) {
  366|      2|  const uint8_t* s = src_ptr;
  367|      2|  const uint8_t* t = src_ptr + src_stride;
  368|      2|  int x;
  369|      2|  assert((dst_width % 3 == 0) && (dst_width > 0));
  370|      4|  for (x = 0; x < dst_width; x += 3) {
  ------------------
  |  Branch (370:15): [True: 2, False: 2]
  ------------------
  371|      2|    uint8_t a0 = (s[0] * 3 + s[1] * 1 + 2) >> 2;
  372|      2|    uint8_t a1 = (s[1] * 1 + s[2] * 1 + 1) >> 1;
  373|      2|    uint8_t a2 = (s[2] * 1 + s[3] * 3 + 2) >> 2;
  374|      2|    uint8_t b0 = (t[0] * 3 + t[1] * 1 + 2) >> 2;
  375|      2|    uint8_t b1 = (t[1] * 1 + t[2] * 1 + 1) >> 1;
  376|      2|    uint8_t b2 = (t[2] * 1 + t[3] * 3 + 2) >> 2;
  377|      2|    d[0] = (a0 + b0 + 1) >> 1;
  378|      2|    d[1] = (a1 + b1 + 1) >> 1;
  379|      2|    d[2] = (a2 + b2 + 1) >> 1;
  380|      2|    d += 3;
  381|      2|    s += 4;
  382|      2|    t += 4;
  383|      2|  }
  384|      2|}
ScaleRowDown34_1_Box_16_C:
  389|      2|                               int dst_width) {
  390|      2|  const uint16_t* s = src_ptr;
  391|      2|  const uint16_t* t = src_ptr + src_stride;
  392|      2|  int x;
  393|      2|  assert((dst_width % 3 == 0) && (dst_width > 0));
  394|      4|  for (x = 0; x < dst_width; x += 3) {
  ------------------
  |  Branch (394:15): [True: 2, False: 2]
  ------------------
  395|      2|    uint16_t a0 = (s[0] * 3 + s[1] * 1 + 2) >> 2;
  396|      2|    uint16_t a1 = (s[1] * 1 + s[2] * 1 + 1) >> 1;
  397|      2|    uint16_t a2 = (s[2] * 1 + s[3] * 3 + 2) >> 2;
  398|      2|    uint16_t b0 = (t[0] * 3 + t[1] * 1 + 2) >> 2;
  399|      2|    uint16_t b1 = (t[1] * 1 + t[2] * 1 + 1) >> 1;
  400|      2|    uint16_t b2 = (t[2] * 1 + t[3] * 3 + 2) >> 2;
  401|      2|    d[0] = (a0 + b0 + 1) >> 1;
  402|      2|    d[1] = (a1 + b1 + 1) >> 1;
  403|      2|    d[2] = (a2 + b2 + 1) >> 1;
  404|      2|    d += 3;
  405|      2|    s += 4;
  406|      2|    t += 4;
  407|      2|  }
  408|      2|}
ScaleRowUp2_Linear_C:
  417|   329k|                          int dst_width) {
  418|   329k|  int src_width = dst_width >> 1;
  419|   329k|  int x;
  420|   329k|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  421|  1.65M|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (421:15): [True: 1.32M, False: 329k]
  ------------------
  422|  1.32M|    dst_ptr[2 * x + 0] = (src_ptr[x + 0] * 3 + src_ptr[x + 1] * 1 + 2) >> 2;
  423|  1.32M|    dst_ptr[2 * x + 1] = (src_ptr[x + 0] * 1 + src_ptr[x + 1] * 3 + 2) >> 2;
  424|  1.32M|  }
  425|   329k|}
ScaleRowUp2_Bilinear_C:
  441|  7.51k|                            int dst_width) {
  442|  7.51k|  const uint8_t* s = src_ptr;
  443|  7.51k|  const uint8_t* t = src_ptr + src_stride;
  444|  7.51k|  uint8_t* d = dst_ptr;
  445|  7.51k|  uint8_t* e = dst_ptr + dst_stride;
  446|  7.51k|  int src_width = dst_width >> 1;
  447|  7.51k|  int x;
  448|  7.51k|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  449|   112k|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (449:15): [True: 105k, False: 7.51k]
  ------------------
  450|   105k|    d[2 * x + 0] =
  451|   105k|        (s[x + 0] * 9 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 1 + 8) >> 4;
  452|   105k|    d[2 * x + 1] =
  453|   105k|        (s[x + 0] * 3 + s[x + 1] * 9 + t[x + 0] * 1 + t[x + 1] * 3 + 8) >> 4;
  454|   105k|    e[2 * x + 0] =
  455|   105k|        (s[x + 0] * 3 + s[x + 1] * 1 + t[x + 0] * 9 + t[x + 1] * 3 + 8) >> 4;
  456|   105k|    e[2 * x + 1] =
  457|   105k|        (s[x + 0] * 1 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 9 + 8) >> 4;
  458|   105k|  }
  459|  7.51k|}
ScaleRowUp2_Linear_16_C:
  464|   614k|                             int dst_width) {
  465|   614k|  int src_width = dst_width >> 1;
  466|   614k|  int x;
  467|   614k|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  468|  4.13M|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (468:15): [True: 3.52M, False: 614k]
  ------------------
  469|  3.52M|    dst_ptr[2 * x + 0] = (src_ptr[x + 0] * 3 + src_ptr[x + 1] * 1 + 2) >> 2;
  470|  3.52M|    dst_ptr[2 * x + 1] = (src_ptr[x + 0] * 1 + src_ptr[x + 1] * 3 + 2) >> 2;
  471|  3.52M|  }
  472|   614k|}
ScaleRowUp2_Bilinear_16_C:
  479|  6.62k|                               int dst_width) {
  480|  6.62k|  const uint16_t* s = src_ptr;
  481|  6.62k|  const uint16_t* t = src_ptr + src_stride;
  482|  6.62k|  uint16_t* d = dst_ptr;
  483|  6.62k|  uint16_t* e = dst_ptr + dst_stride;
  484|  6.62k|  int src_width = dst_width >> 1;
  485|  6.62k|  int x;
  486|  6.62k|  assert((dst_width % 2 == 0) && (dst_width >= 0));
  487|  49.4k|  for (x = 0; x < src_width; ++x) {
  ------------------
  |  Branch (487:15): [True: 42.7k, False: 6.62k]
  ------------------
  488|  42.7k|    d[2 * x + 0] =
  489|  42.7k|        (s[x + 0] * 9 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 1 + 8) >> 4;
  490|  42.7k|    d[2 * x + 1] =
  491|  42.7k|        (s[x + 0] * 3 + s[x + 1] * 9 + t[x + 0] * 1 + t[x + 1] * 3 + 8) >> 4;
  492|  42.7k|    e[2 * x + 0] =
  493|  42.7k|        (s[x + 0] * 3 + s[x + 1] * 1 + t[x + 0] * 9 + t[x + 1] * 3 + 8) >> 4;
  494|  42.7k|    e[2 * x + 1] =
  495|  42.7k|        (s[x + 0] * 1 + s[x + 1] * 3 + t[x + 0] * 3 + t[x + 1] * 9 + 8) >> 4;
  496|  42.7k|  }
  497|  6.62k|}
ScaleCols_C:
  504|   524k|                 int dx) {
  505|   524k|  int j;
  506|  63.2M|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (506:15): [True: 62.7M, False: 524k]
  ------------------
  507|  62.7M|    dst_ptr[0] = src_ptr[x >> 16];
  508|  62.7M|    x += dx;
  509|  62.7M|    dst_ptr[1] = src_ptr[x >> 16];
  510|  62.7M|    x += dx;
  511|  62.7M|    dst_ptr += 2;
  512|  62.7M|  }
  513|   524k|  if (dst_width & 1) {
  ------------------
  |  Branch (513:7): [True: 468k, False: 56.6k]
  ------------------
  514|   468k|    dst_ptr[0] = src_ptr[x >> 16];
  515|   468k|  }
  516|   524k|}
ScaleCols_16_C:
  522|   605k|                    int dx) {
  523|   605k|  int j;
  524|   301M|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (524:15): [True: 300M, False: 605k]
  ------------------
  525|   300M|    dst_ptr[0] = src_ptr[x >> 16];
  526|   300M|    x += dx;
  527|   300M|    dst_ptr[1] = src_ptr[x >> 16];
  528|   300M|    x += dx;
  529|   300M|    dst_ptr += 2;
  530|   300M|  }
  531|   605k|  if (dst_width & 1) {
  ------------------
  |  Branch (531:7): [True: 455k, False: 149k]
  ------------------
  532|   455k|    dst_ptr[0] = src_ptr[x >> 16];
  533|   455k|  }
  534|   605k|}
ScaleColsUp2_C:
  541|   151k|                    int dx) {
  542|   151k|  int j;
  543|   151k|  (void)x;
  544|   151k|  (void)dx;
  545|   302k|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (545:15): [True: 151k, False: 151k]
  ------------------
  546|   151k|    dst_ptr[1] = dst_ptr[0] = src_ptr[0];
  547|   151k|    src_ptr += 1;
  548|   151k|    dst_ptr += 2;
  549|   151k|  }
  550|   151k|  if (dst_width & 1) {
  ------------------
  |  Branch (550:7): [True: 0, False: 151k]
  ------------------
  551|      0|    dst_ptr[0] = src_ptr[0];
  552|      0|  }
  553|   151k|}
ScaleColsUp2_16_C:
  559|   148k|                       int dx) {
  560|   148k|  int j;
  561|   148k|  (void)x;
  562|   148k|  (void)dx;
  563|   296k|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (563:15): [True: 148k, False: 148k]
  ------------------
  564|   148k|    dst_ptr[1] = dst_ptr[0] = src_ptr[0];
  565|   148k|    src_ptr += 1;
  566|   148k|    dst_ptr += 2;
  567|   148k|  }
  568|   148k|  if (dst_width & 1) {
  ------------------
  |  Branch (568:7): [True: 0, False: 148k]
  ------------------
  569|      0|    dst_ptr[0] = src_ptr[0];
  570|      0|  }
  571|   148k|}
ScaleFilterCols_16_C:
  649|   570k|                          int dx) {
  650|   570k|  int j;
  651|   145M|  for (j = 0; j < dst_width - 1; j += 2) {
  ------------------
  |  Branch (651:15): [True: 144M, False: 570k]
  ------------------
  652|   144M|    int xi = x >> 16;
  653|   144M|    int a = src_ptr[xi];
  654|   144M|    int b = src_ptr[xi + 1];
  655|   144M|    dst_ptr[0] = BLENDER(a, b, x & 0xffff);
  ------------------
  |  |  641|   144M|  (uint16_t)((int)(a) +                                                       \
  |  |  642|   144M|             (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> \
  |  |  643|   144M|                   16))
  ------------------
  656|   144M|    x += dx;
  657|   144M|    xi = x >> 16;
  658|   144M|    a = src_ptr[xi];
  659|   144M|    b = src_ptr[xi + 1];
  660|   144M|    dst_ptr[1] = BLENDER(a, b, x & 0xffff);
  ------------------
  |  |  641|   144M|  (uint16_t)((int)(a) +                                                       \
  |  |  642|   144M|             (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> \
  |  |  643|   144M|                   16))
  ------------------
  661|   144M|    x += dx;
  662|   144M|    dst_ptr += 2;
  663|   144M|  }
  664|   570k|  if (dst_width & 1) {
  ------------------
  |  Branch (664:7): [True: 180k, False: 389k]
  ------------------
  665|   180k|    int xi = x >> 16;
  666|   180k|    int a = src_ptr[xi];
  667|   180k|    int b = src_ptr[xi + 1];
  668|   180k|    dst_ptr[0] = BLENDER(a, b, x & 0xffff);
  ------------------
  |  |  641|   180k|  (uint16_t)((int)(a) +                                                       \
  |  |  642|   180k|             (int)((((int64_t)((f)) * ((int64_t)(b) - (int)(a))) + 0x8000) >> \
  |  |  643|   180k|                   16))
  ------------------
  669|   180k|  }
  670|   570k|}
ScaleRowDown38_3_Box_C:
  737|     24|                            int dst_width) {
  738|     24|  int i;
  739|     24|  assert((dst_width % 3 == 0) && (dst_width > 0));
  740|     48|  for (i = 0; i < dst_width; i += 3) {
  ------------------
  |  Branch (740:15): [True: 24, False: 24]
  ------------------
  741|     24|    dst_ptr[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] +
  742|     24|                  src_ptr[src_stride + 0] + src_ptr[src_stride + 1] +
  743|     24|                  src_ptr[src_stride + 2] + src_ptr[src_stride * 2 + 0] +
  744|     24|                  src_ptr[src_stride * 2 + 1] + src_ptr[src_stride * 2 + 2]) *
  745|     24|                     (65536 / 9) >>
  746|     24|                 16;
  747|     24|    dst_ptr[1] = (src_ptr[3] + src_ptr[4] + src_ptr[5] +
  748|     24|                  src_ptr[src_stride + 3] + src_ptr[src_stride + 4] +
  749|     24|                  src_ptr[src_stride + 5] + src_ptr[src_stride * 2 + 3] +
  750|     24|                  src_ptr[src_stride * 2 + 4] + src_ptr[src_stride * 2 + 5]) *
  751|     24|                     (65536 / 9) >>
  752|     24|                 16;
  753|     24|    dst_ptr[2] = (src_ptr[6] + src_ptr[7] + src_ptr[src_stride + 6] +
  754|     24|                  src_ptr[src_stride + 7] + src_ptr[src_stride * 2 + 6] +
  755|     24|                  src_ptr[src_stride * 2 + 7]) *
  756|     24|                     (65536 / 6) >>
  757|     24|                 16;
  758|     24|    src_ptr += 8;
  759|     24|    dst_ptr += 3;
  760|     24|  }
  761|     24|}
ScaleRowDown38_3_Box_16_C:
  766|     56|                               int dst_width) {
  767|     56|  int i;
  768|     56|  assert((dst_width % 3 == 0) && (dst_width > 0));
  769|    256|  for (i = 0; i < dst_width; i += 3) {
  ------------------
  |  Branch (769:15): [True: 200, False: 56]
  ------------------
  770|    200|    dst_ptr[0] = (src_ptr[0] + src_ptr[1] + src_ptr[2] +
  771|    200|                  src_ptr[src_stride + 0] + src_ptr[src_stride + 1] +
  772|    200|                  src_ptr[src_stride + 2] + src_ptr[src_stride * 2 + 0] +
  773|    200|                  src_ptr[src_stride * 2 + 1] + src_ptr[src_stride * 2 + 2]) *
  774|    200|                     (65536u / 9u) >>
  775|    200|                 16;
  776|    200|    dst_ptr[1] = (src_ptr[3] + src_ptr[4] + src_ptr[5] +
  777|    200|                  src_ptr[src_stride + 3] + src_ptr[src_stride + 4] +
  778|    200|                  src_ptr[src_stride + 5] + src_ptr[src_stride * 2 + 3] +
  779|    200|                  src_ptr[src_stride * 2 + 4] + src_ptr[src_stride * 2 + 5]) *
  780|    200|                     (65536u / 9u) >>
  781|    200|                 16;
  782|    200|    dst_ptr[2] = (src_ptr[6] + src_ptr[7] + src_ptr[src_stride + 6] +
  783|    200|                  src_ptr[src_stride + 7] + src_ptr[src_stride * 2 + 6] +
  784|    200|                  src_ptr[src_stride * 2 + 7]) *
  785|    200|                     (65536u / 6u) >>
  786|    200|                 16;
  787|    200|    src_ptr += 8;
  788|    200|    dst_ptr += 3;
  789|    200|  }
  790|     56|}
ScaleRowDown38_2_Box_C:
  796|     12|                            int dst_width) {
  797|     12|  int i;
  798|     12|  assert((dst_width % 3 == 0) && (dst_width > 0));
  799|     24|  for (i = 0; i < dst_width; i += 3) {
  ------------------
  |  Branch (799:15): [True: 12, False: 12]
  ------------------
  800|     12|    dst_ptr[0] =
  801|     12|        (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[src_stride + 0] +
  802|     12|         src_ptr[src_stride + 1] + src_ptr[src_stride + 2]) *
  803|     12|            (65536 / 6) >>
  804|     12|        16;
  805|     12|    dst_ptr[1] =
  806|     12|        (src_ptr[3] + src_ptr[4] + src_ptr[5] + src_ptr[src_stride + 3] +
  807|     12|         src_ptr[src_stride + 4] + src_ptr[src_stride + 5]) *
  808|     12|            (65536 / 6) >>
  809|     12|        16;
  810|     12|    dst_ptr[2] = (src_ptr[6] + src_ptr[7] + src_ptr[src_stride + 6] +
  811|     12|                  src_ptr[src_stride + 7]) *
  812|     12|                     (65536 / 4) >>
  813|     12|                 16;
  814|     12|    src_ptr += 8;
  815|     12|    dst_ptr += 3;
  816|     12|  }
  817|     12|}
ScaleRowDown38_2_Box_16_C:
  822|     28|                               int dst_width) {
  823|     28|  int i;
  824|     28|  assert((dst_width % 3 == 0) && (dst_width > 0));
  825|    128|  for (i = 0; i < dst_width; i += 3) {
  ------------------
  |  Branch (825:15): [True: 100, False: 28]
  ------------------
  826|    100|    dst_ptr[0] =
  827|    100|        (src_ptr[0] + src_ptr[1] + src_ptr[2] + src_ptr[src_stride + 0] +
  828|    100|         src_ptr[src_stride + 1] + src_ptr[src_stride + 2]) *
  829|    100|            (65536u / 6u) >>
  830|    100|        16;
  831|    100|    dst_ptr[1] =
  832|    100|        (src_ptr[3] + src_ptr[4] + src_ptr[5] + src_ptr[src_stride + 3] +
  833|    100|         src_ptr[src_stride + 4] + src_ptr[src_stride + 5]) *
  834|    100|            (65536u / 6u) >>
  835|    100|        16;
  836|    100|    dst_ptr[2] = (src_ptr[6] + src_ptr[7] + src_ptr[src_stride + 6] +
  837|    100|                  src_ptr[src_stride + 7]) *
  838|    100|                     (65536u / 4u) >>
  839|    100|                 16;
  840|    100|    src_ptr += 8;
  841|    100|    dst_ptr += 3;
  842|    100|  }
  843|     28|}
ScaleAddRow_C:
  845|   475k|void ScaleAddRow_C(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width) {
  846|   475k|  int x;
  847|   475k|  assert(src_width > 0);
  848|  4.58M|  for (x = 0; x < src_width - 1; x += 2) {
  ------------------
  |  Branch (848:15): [True: 4.10M, False: 475k]
  ------------------
  849|  4.10M|    dst_ptr[0] += src_ptr[0];
  850|  4.10M|    dst_ptr[1] += src_ptr[1];
  851|  4.10M|    src_ptr += 2;
  852|  4.10M|    dst_ptr += 2;
  853|  4.10M|  }
  854|   475k|  if (src_width & 1) {
  ------------------
  |  Branch (854:7): [True: 218k, False: 256k]
  ------------------
  855|   218k|    dst_ptr[0] += src_ptr[0];
  856|   218k|  }
  857|   475k|}
ScaleAddRow_16_C:
  861|   947k|                      int src_width) {
  862|   947k|  int x;
  863|   947k|  assert(src_width > 0);
  864|  64.9M|  for (x = 0; x < src_width - 1; x += 2) {
  ------------------
  |  Branch (864:15): [True: 63.9M, False: 947k]
  ------------------
  865|  63.9M|    dst_ptr[0] += src_ptr[0];
  866|  63.9M|    dst_ptr[1] += src_ptr[1];
  867|  63.9M|    src_ptr += 2;
  868|  63.9M|    dst_ptr += 2;
  869|  63.9M|  }
  870|   947k|  if (src_width & 1) {
  ------------------
  |  Branch (870:7): [True: 219k, False: 728k]
  ------------------
  871|   219k|    dst_ptr[0] += src_ptr[0];
  872|   219k|  }
  873|   947k|}
ScalePlaneVertical:
 1471|  1.06k|                        enum FilterMode filtering) {
 1472|       |  // TODO(fbarchard): Allow higher bpp.
 1473|  1.06k|  int dst_width_bytes = dst_width * bpp;
 1474|  1.06k|  void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb,
 1475|  1.06k|                         ptrdiff_t src_stride, int dst_width,
 1476|  1.06k|                         int source_y_fraction) = InterpolateRow_C;
 1477|  1.06k|  const int64_t max_y =
 1478|  1.06k|      (src_height > 1) ? (((int64_t)src_height - 1) << 16) - 1 : 0;
  ------------------
  |  Branch (1478:7): [True: 976, False: 84]
  ------------------
 1479|  1.06k|  int64_t y64 = y;
 1480|  1.06k|  int j;
 1481|  1.06k|  assert(bpp >= 1 && bpp <= 4);
 1482|  1.06k|  assert(src_height != 0);
 1483|  1.06k|  assert(dst_width > 0);
 1484|  1.06k|  assert(dst_height > 0);
 1485|  1.06k|  src_argb += (x >> 16) * bpp;
 1486|  1.06k|#if defined(HAS_INTERPOLATEROW_AVX2)
 1487|  1.06k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1487:7): [True: 1.06k, False: 0]
  ------------------
 1488|  1.06k|    InterpolateRow = InterpolateRow_Any_AVX2;
 1489|  1.06k|    if (IS_ALIGNED(dst_width_bytes, 32)) {
  ------------------
  |  | 1002|  1.06k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 397, False: 663]
  |  |  ------------------
  ------------------
 1490|    397|      InterpolateRow = InterpolateRow_AVX2;
 1491|    397|    }
 1492|  1.06k|  }
 1493|  1.06k|#endif
 1494|       |#if defined(HAS_INTERPOLATEROW_NEON)
 1495|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1496|       |    InterpolateRow = InterpolateRow_Any_NEON;
 1497|       |    if (IS_ALIGNED(dst_width_bytes, 16)) {
 1498|       |      InterpolateRow = InterpolateRow_NEON;
 1499|       |    }
 1500|       |  }
 1501|       |#endif
 1502|       |#if defined(HAS_INTERPOLATEROW_SVE2)
 1503|       |  if (TestCpuFlag(kCpuHasSVE2)) {
 1504|       |    InterpolateRow = InterpolateRow_SVE2;
 1505|       |  }
 1506|       |#endif
 1507|       |#if defined(HAS_INTERPOLATEROW_SME)
 1508|       |  if (TestCpuFlag(kCpuHasSME)) {
 1509|       |    InterpolateRow = InterpolateRow_SME;
 1510|       |  }
 1511|       |#endif
 1512|       |#if defined(HAS_INTERPOLATEROW_LSX)
 1513|       |  if (TestCpuFlag(kCpuHasLSX)) {
 1514|       |    InterpolateRow = InterpolateRow_Any_LSX;
 1515|       |    if (IS_ALIGNED(dst_width_bytes, 32)) {
 1516|       |      InterpolateRow = InterpolateRow_LSX;
 1517|       |    }
 1518|       |  }
 1519|       |#endif
 1520|       |#if defined(HAS_INTERPOLATEROW_RVV)
 1521|       |  if (TestCpuFlag(kCpuHasRVV)) {
 1522|       |    InterpolateRow = InterpolateRow_RVV;
 1523|       |  }
 1524|       |#endif
 1525|       |
 1526|  1.25M|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1526:15): [True: 1.24M, False: 1.06k]
  ------------------
 1527|  1.24M|    int yi;
 1528|  1.24M|    int yf;
 1529|  1.24M|    if (y64 > max_y) {
  ------------------
  |  Branch (1529:9): [True: 0, False: 1.24M]
  ------------------
 1530|      0|      y64 = max_y;
 1531|      0|    }
 1532|  1.24M|    yi = (int)(y64 >> 16);
 1533|  1.24M|    yf = filtering ? (int)((y64 >> 8) & 255) : 0;
  ------------------
  |  Branch (1533:10): [True: 508k, False: 741k]
  ------------------
 1534|  1.24M|    InterpolateRow(dst_argb, src_argb + yi * (ptrdiff_t)src_stride, src_stride,
 1535|  1.24M|                   dst_width_bytes, yf);
 1536|  1.24M|    dst_argb += dst_stride;
 1537|  1.24M|    y64 += dy;
 1538|  1.24M|  }
 1539|  1.06k|}
ScalePlaneVertical_16:
 1552|  1.20k|                           enum FilterMode filtering) {
 1553|       |  // TODO(fbarchard): Allow higher wpp.
 1554|  1.20k|  int dst_width_words = dst_width * wpp;
 1555|  1.20k|  void (*InterpolateRow)(uint16_t* dst_argb, const uint16_t* src_argb,
 1556|  1.20k|                         ptrdiff_t src_stride, int dst_width,
 1557|  1.20k|                         int source_y_fraction) = InterpolateRow_16_C;
 1558|  1.20k|  const int64_t max_y =
 1559|  1.20k|      (src_height > 1) ? (((int64_t)src_height - 1) << 16) - 1 : 0;
  ------------------
  |  Branch (1559:7): [True: 1.13k, False: 71]
  ------------------
 1560|  1.20k|  int64_t y64 = y;
 1561|  1.20k|  int j;
 1562|  1.20k|  assert(wpp >= 1 && wpp <= 2);
 1563|  1.20k|  assert(src_height != 0);
 1564|  1.20k|  assert(dst_width > 0);
 1565|  1.20k|  assert(dst_height > 0);
 1566|  1.20k|  src_argb += (x >> 16) * wpp;
 1567|       |#if defined(HAS_INTERPOLATEROW_16_SSSE3)
 1568|       |  if (TestCpuFlag(kCpuHasSSSE3)) {
 1569|       |    InterpolateRow = InterpolateRow_16_Any_SSSE3;
 1570|       |    if (IS_ALIGNED(dst_width_words, 16)) {
 1571|       |      InterpolateRow = InterpolateRow_16_SSSE3;
 1572|       |    }
 1573|       |  }
 1574|       |#endif
 1575|  1.20k|#if defined(HAS_INTERPOLATEROW_16_AVX2)
 1576|  1.20k|  if (TestCpuFlag(kCpuHasAVX2)) {
  ------------------
  |  Branch (1576:7): [True: 1.20k, False: 0]
  ------------------
 1577|  1.20k|    InterpolateRow = InterpolateRow_16_Any_AVX2;
 1578|  1.20k|    if (IS_ALIGNED(dst_width_words, 32)) {
  ------------------
  |  | 1002|  1.20k|#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
  |  |  ------------------
  |  |  |  Branch (1002:26): [True: 570, False: 637]
  |  |  ------------------
  ------------------
 1579|    570|      InterpolateRow = InterpolateRow_16_AVX2;
 1580|    570|    }
 1581|  1.20k|  }
 1582|  1.20k|#endif
 1583|       |#if defined(HAS_INTERPOLATEROW_16_NEON)
 1584|       |  if (TestCpuFlag(kCpuHasNEON)) {
 1585|       |    InterpolateRow = InterpolateRow_16_Any_NEON;
 1586|       |    if (IS_ALIGNED(dst_width_words, 8)) {
 1587|       |      InterpolateRow = InterpolateRow_16_NEON;
 1588|       |    }
 1589|       |  }
 1590|       |#endif
 1591|       |#if defined(HAS_INTERPOLATEROW_16_SME)
 1592|       |  if (TestCpuFlag(kCpuHasSME)) {
 1593|       |    InterpolateRow = InterpolateRow_16_SME;
 1594|       |  }
 1595|       |#endif
 1596|  1.25M|  for (j = 0; j < dst_height; ++j) {
  ------------------
  |  Branch (1596:15): [True: 1.25M, False: 1.20k]
  ------------------
 1597|  1.25M|    int yi;
 1598|  1.25M|    int yf;
 1599|  1.25M|    if (y64 > max_y) {
  ------------------
  |  Branch (1599:9): [True: 0, False: 1.25M]
  ------------------
 1600|      0|      y64 = max_y;
 1601|      0|    }
 1602|  1.25M|    yi = (int)(y64 >> 16);
 1603|  1.25M|    yf = filtering ? (int)((y64 >> 8) & 255) : 0;
  ------------------
  |  Branch (1603:10): [True: 647k, False: 606k]
  ------------------
 1604|  1.25M|    InterpolateRow(dst_argb, src_argb + yi * (ptrdiff_t)src_stride, src_stride,
 1605|  1.25M|                   dst_width_words, yf);
 1606|  1.25M|    dst_argb += dst_stride;
 1607|  1.25M|    y64 += dy;
 1608|  1.25M|  }
 1609|  1.20k|}
ScaleFilterReduce:
 1616|  36.2k|                                  enum FilterMode filtering) {
 1617|  36.2k|  if (src_width < 0) {
  ------------------
  |  Branch (1617:7): [True: 0, False: 36.2k]
  ------------------
 1618|      0|    src_width = -src_width;
 1619|      0|  }
 1620|  36.2k|  if (src_height < 0) {
  ------------------
  |  Branch (1620:7): [True: 0, False: 36.2k]
  ------------------
 1621|      0|    src_height = -src_height;
 1622|      0|  }
 1623|  36.2k|  if (filtering == kFilterBox) {
  ------------------
  |  Branch (1623:7): [True: 24.6k, False: 11.6k]
  ------------------
 1624|       |    // If scaling either axis to 0.5 or larger, switch from Box to Bilinear.
 1625|  24.6k|    if (dst_width * 2 >= src_width || dst_height * 2 >= src_height) {
  ------------------
  |  Branch (1625:9): [True: 18.4k, False: 6.17k]
  |  Branch (1625:39): [True: 2.00k, False: 4.16k]
  ------------------
 1626|  20.4k|      filtering = kFilterBilinear;
 1627|  20.4k|    }
 1628|  24.6k|  }
 1629|  36.2k|  if (filtering == kFilterBilinear) {
  ------------------
  |  Branch (1629:7): [True: 29.9k, False: 6.23k]
  ------------------
 1630|  29.9k|    if (src_height == 1) {
  ------------------
  |  Branch (1630:9): [True: 2.08k, False: 27.9k]
  ------------------
 1631|  2.08k|      filtering = kFilterLinear;
 1632|  2.08k|    }
 1633|       |    // TODO(fbarchard): Detect any odd scale factor and reduce to Linear.
 1634|  29.9k|    if (dst_height == src_height || dst_height * 3 == src_height) {
  ------------------
  |  Branch (1634:9): [True: 1.67k, False: 28.3k]
  |  Branch (1634:37): [True: 67, False: 28.2k]
  ------------------
 1635|  1.74k|      filtering = kFilterLinear;
 1636|  1.74k|    }
 1637|       |    // TODO(fbarchard): Remove 1 pixel wide filter restriction, which is to
 1638|       |    // avoid reading 2 pixels horizontally that causes memory exception.
 1639|  29.9k|    if (src_width == 1) {
  ------------------
  |  Branch (1639:9): [True: 1.39k, False: 28.5k]
  ------------------
 1640|  1.39k|      filtering = kFilterNone;
 1641|  1.39k|    }
 1642|  29.9k|  }
 1643|  36.2k|  if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1643:7): [True: 4.40k, False: 31.8k]
  ------------------
 1644|  4.40k|    if (src_width == 1) {
  ------------------
  |  Branch (1644:9): [True: 0, False: 4.40k]
  ------------------
 1645|      0|      filtering = kFilterNone;
 1646|      0|    }
 1647|       |    // TODO(fbarchard): Detect any odd scale factor and reduce to None.
 1648|  4.40k|    if (dst_width == src_width || dst_width * 3 == src_width) {
  ------------------
  |  Branch (1648:9): [True: 166, False: 4.23k]
  |  Branch (1648:35): [True: 70, False: 4.16k]
  ------------------
 1649|    236|      filtering = kFilterNone;
 1650|    236|    }
 1651|  4.40k|  }
 1652|  36.2k|  return filtering;
 1653|  36.2k|}
ScaleSlope:
 1676|  19.6k|                int* dy) {
 1677|  19.6k|  assert(x != NULL);
 1678|  19.6k|  assert(y != NULL);
 1679|  19.6k|  assert(dx != NULL);
 1680|  19.6k|  assert(dy != NULL);
 1681|  19.6k|  assert(src_width != 0);
 1682|  19.6k|  assert(src_height != 0);
 1683|  19.6k|  assert(dst_width > 0);
 1684|  19.6k|  assert(dst_height > 0);
 1685|       |  // Check for 1 pixel and avoid FixedDiv overflow.
 1686|  19.6k|  if (dst_width == 1 && src_width >= 32768) {
  ------------------
  |  Branch (1686:7): [True: 726, False: 18.8k]
  |  Branch (1686:25): [True: 0, False: 726]
  ------------------
 1687|      0|    dst_width = src_width;
 1688|      0|  }
 1689|  19.6k|  if (dst_height == 1 && src_height >= 32768) {
  ------------------
  |  Branch (1689:7): [True: 1.14k, False: 18.4k]
  |  Branch (1689:26): [True: 0, False: 1.14k]
  ------------------
 1690|      0|    dst_height = src_height;
 1691|      0|  }
 1692|  19.6k|  if (filtering == kFilterBox) {
  ------------------
  |  Branch (1692:7): [True: 2.44k, False: 17.1k]
  ------------------
 1693|       |    // Scale step for point sampling duplicates all pixels equally.
 1694|  2.44k|    *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  241|  2.44k|#define FixedDiv FixedDiv_X86
  ------------------
 1695|  2.44k|    *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  241|  2.44k|#define FixedDiv FixedDiv_X86
  ------------------
 1696|  2.44k|    *x = 0;
 1697|  2.44k|    *y = 0;
 1698|  17.1k|  } else if (filtering == kFilterBilinear) {
  ------------------
  |  Branch (1698:14): [True: 13.3k, False: 3.78k]
  ------------------
 1699|       |    // Scale step for bilinear sampling renders last pixel once for upsample.
 1700|  13.3k|    if (dst_width <= Abs(src_width)) {
  ------------------
  |  Branch (1700:9): [True: 3.87k, False: 9.51k]
  ------------------
 1701|  3.87k|      *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  241|  3.87k|#define FixedDiv FixedDiv_X86
  ------------------
 1702|  3.87k|      *x = CENTERSTART(*dx, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  | 1665|  3.87k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1665:28): [True: 0, False: 3.87k]
  |  |  ------------------
  ------------------
 1703|  9.51k|    } else if (src_width > 1 && dst_width > 1) {
  ------------------
  |  Branch (1703:16): [True: 9.51k, False: 0]
  |  Branch (1703:33): [True: 9.51k, False: 0]
  ------------------
 1704|  9.51k|      *dx = FixedDiv1(Abs(src_width), dst_width);
  ------------------
  |  |  242|  9.51k|#define FixedDiv1 FixedDiv1_X86
  ------------------
 1705|  9.51k|      *x = 0;
 1706|  9.51k|    }
 1707|  13.3k|    if (dst_height <= src_height) {
  ------------------
  |  Branch (1707:9): [True: 6.47k, False: 6.90k]
  ------------------
 1708|  6.47k|      *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  241|  6.47k|#define FixedDiv FixedDiv_X86
  ------------------
 1709|  6.47k|      *y = CENTERSTART(*dy, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  | 1665|  6.47k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1665:28): [True: 0, False: 6.47k]
  |  |  ------------------
  ------------------
 1710|  6.90k|    } else if (src_height > 1 && dst_height > 1) {
  ------------------
  |  Branch (1710:16): [True: 6.90k, False: 0]
  |  Branch (1710:34): [True: 6.90k, False: 0]
  ------------------
 1711|  6.90k|      *dy = FixedDiv1(src_height, dst_height);
  ------------------
  |  |  242|  6.90k|#define FixedDiv1 FixedDiv1_X86
  ------------------
 1712|  6.90k|      *y = 0;
 1713|  6.90k|    }
 1714|  13.3k|  } else if (filtering == kFilterLinear) {
  ------------------
  |  Branch (1714:14): [True: 2.56k, False: 1.22k]
  ------------------
 1715|       |    // Scale step for bilinear sampling renders last pixel once for upsample.
 1716|  2.56k|    if (dst_width <= Abs(src_width)) {
  ------------------
  |  Branch (1716:9): [True: 1.47k, False: 1.08k]
  ------------------
 1717|  1.47k|      *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  241|  1.47k|#define FixedDiv FixedDiv_X86
  ------------------
 1718|  1.47k|      *x = CENTERSTART(*dx, -32768);  // Subtract 0.5 (32768) to center filter.
  ------------------
  |  | 1665|  1.47k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1665:28): [True: 0, False: 1.47k]
  |  |  ------------------
  ------------------
 1719|  1.47k|    } else if (src_width > 1 && dst_width > 1) {
  ------------------
  |  Branch (1719:16): [True: 1.08k, False: 0]
  |  Branch (1719:33): [True: 1.08k, False: 0]
  ------------------
 1720|  1.08k|      *dx = FixedDiv1(Abs(src_width), dst_width);
  ------------------
  |  |  242|  1.08k|#define FixedDiv1 FixedDiv1_X86
  ------------------
 1721|  1.08k|      *x = 0;
 1722|  1.08k|    }
 1723|  2.56k|    *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  241|  2.56k|#define FixedDiv FixedDiv_X86
  ------------------
 1724|  2.56k|    *y = *dy >> 1;
 1725|  2.56k|  } else {
 1726|       |    // Scale step for point sampling duplicates all pixels equally.
 1727|  1.22k|    *dx = FixedDiv(Abs(src_width), dst_width);
  ------------------
  |  |  241|  1.22k|#define FixedDiv FixedDiv_X86
  ------------------
 1728|  1.22k|    *dy = FixedDiv(src_height, dst_height);
  ------------------
  |  |  241|  1.22k|#define FixedDiv FixedDiv_X86
  ------------------
 1729|  1.22k|    *x = CENTERSTART(*dx, 0);
  ------------------
  |  | 1665|  1.22k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1665:28): [True: 0, False: 1.22k]
  |  |  ------------------
  ------------------
 1730|  1.22k|    *y = CENTERSTART(*dy, 0);
  ------------------
  |  | 1665|  1.22k|#define CENTERSTART(dx, s) (dx < 0) ? -((-dx >> 1) + s) : ((dx >> 1) + s)
  |  |  ------------------
  |  |  |  Branch (1665:28): [True: 0, False: 1.22k]
  |  |  ------------------
  ------------------
 1731|  1.22k|  }
 1732|       |  // Negative src_width means horizontally mirror.
 1733|  19.6k|  if (src_width < 0) {
  ------------------
  |  Branch (1733:7): [True: 0, False: 19.6k]
  ------------------
 1734|      0|    *x += (dst_width - 1) * *dx;
 1735|      0|    *dx = -*dx;
 1736|       |    // src_width = -src_width;   // Caller must do this.
 1737|      0|  }
 1738|  19.6k|}
scale_common.cc:_ZN6libyuvL3AbsEi:
   32|  35.5k|static __inline int Abs(int v) {
   33|  35.5k|  return v >= 0 ? v : -v;
  ------------------
  |  Branch (33:10): [True: 35.5k, False: 0]
  ------------------
   34|  35.5k|}

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

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

avifGetPixelFormatInfo:
   40|   106k|{
   41|   106k|    memset(info, 0, sizeof(avifPixelFormatInfo));
   42|       |
   43|   106k|    switch (format) {
   44|  58.6k|        case AVIF_PIXEL_FORMAT_YUV444:
  ------------------
  |  Branch (44:9): [True: 58.6k, False: 48.3k]
  ------------------
   45|  58.6k|            info->chromaShiftX = 0;
   46|  58.6k|            info->chromaShiftY = 0;
   47|  58.6k|            break;
   48|       |
   49|  4.90k|        case AVIF_PIXEL_FORMAT_YUV422:
  ------------------
  |  Branch (49:9): [True: 4.90k, False: 102k]
  ------------------
   50|  4.90k|            info->chromaShiftX = 1;
   51|  4.90k|            info->chromaShiftY = 0;
   52|  4.90k|            break;
   53|       |
   54|  26.0k|        case AVIF_PIXEL_FORMAT_YUV420:
  ------------------
  |  Branch (54:9): [True: 26.0k, False: 80.9k]
  ------------------
   55|  26.0k|            info->chromaShiftX = 1;
   56|  26.0k|            info->chromaShiftY = 1;
   57|  26.0k|            break;
   58|       |
   59|  15.0k|        case AVIF_PIXEL_FORMAT_YUV400:
  ------------------
  |  Branch (59:9): [True: 15.0k, False: 91.9k]
  ------------------
   60|  15.0k|            info->monochrome = AVIF_TRUE;
  ------------------
  |  |   88|  15.0k|#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|  15.0k|            info->chromaShiftX = 1;
   64|  15.0k|            info->chromaShiftY = 1;
   65|  15.0k|            break;
   66|       |
   67|  2.32k|        case AVIF_PIXEL_FORMAT_NONE:
  ------------------
  |  Branch (67:9): [True: 2.32k, False: 104k]
  ------------------
   68|  2.32k|        case AVIF_PIXEL_FORMAT_COUNT:
  ------------------
  |  Branch (68:9): [True: 0, False: 106k]
  ------------------
   69|  2.32k|        default:
  ------------------
  |  Branch (69:9): [True: 0, False: 106k]
  ------------------
   70|  2.32k|            break;
   71|   106k|    }
   72|   106k|}
avifImageSetDefaults:
  135|   727k|{
  136|   727k|    memset(image, 0, sizeof(avifImage));
  137|   727k|    image->yuvRange = AVIF_RANGE_FULL;
  138|   727k|    image->colorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
  139|   727k|    image->transferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
  140|   727k|    image->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
  141|   727k|}
avifImageCreate:
  144|   720k|{
  145|       |    // width and height are checked when actually used, for example by avifImageAllocatePlanes().
  146|   720k|    AVIF_CHECKERR(depth <= 16, NULL); // avifImage only supports up to 16 bits per sample. See avifImageUsesU16().
  ------------------
  |  |   45|   720k|    do {                        \
  |  |   46|   720k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 720k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   720k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 720k]
  |  |  ------------------
  ------------------
  147|       |    // Cast to silence "comparison of unsigned expression is always true" warning.
  148|   720k|    AVIF_CHECKERR((int)yuvFormat >= AVIF_PIXEL_FORMAT_NONE && yuvFormat < AVIF_PIXEL_FORMAT_COUNT, NULL);
  ------------------
  |  |   45|   720k|    do {                        \
  |  |   46|  1.44M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:15): [True: 720k, False: 0]
  |  |  |  Branch (46:15): [True: 720k, False: 0]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   720k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 720k]
  |  |  ------------------
  ------------------
  149|       |
  150|   720k|    avifImage * image = (avifImage *)avifAlloc(sizeof(avifImage));
  151|   720k|    AVIF_CHECKERR(image, NULL);
  ------------------
  |  |   45|   720k|    do {                        \
  |  |   46|   720k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 720k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   720k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 720k]
  |  |  ------------------
  ------------------
  152|   720k|    avifImageSetDefaults(image);
  153|   720k|    image->width = width;
  154|   720k|    image->height = height;
  155|   720k|    image->depth = depth;
  156|   720k|    image->yuvFormat = yuvFormat;
  157|   720k|    return image;
  158|   720k|}
avifImageCreateEmpty:
  161|   720k|{
  162|   720k|    return avifImageCreate(0, 0, 0, AVIF_PIXEL_FORMAT_NONE);
  163|   720k|}
avifImageCopyNoAlloc:
  166|  11.7k|{
  167|  11.7k|    dstImage->width = srcImage->width;
  168|  11.7k|    dstImage->height = srcImage->height;
  169|  11.7k|    dstImage->depth = srcImage->depth;
  170|  11.7k|    dstImage->yuvFormat = srcImage->yuvFormat;
  171|  11.7k|    dstImage->yuvRange = srcImage->yuvRange;
  172|  11.7k|    dstImage->yuvChromaSamplePosition = srcImage->yuvChromaSamplePosition;
  173|  11.7k|    dstImage->alphaPremultiplied = srcImage->alphaPremultiplied;
  174|       |
  175|  11.7k|    dstImage->colorPrimaries = srcImage->colorPrimaries;
  176|  11.7k|    dstImage->transferCharacteristics = srcImage->transferCharacteristics;
  177|  11.7k|    dstImage->matrixCoefficients = srcImage->matrixCoefficients;
  178|  11.7k|    dstImage->clli = srcImage->clli;
  179|       |
  180|  11.7k|    dstImage->transformFlags = srcImage->transformFlags;
  181|  11.7k|    dstImage->pasp = srcImage->pasp;
  182|  11.7k|    dstImage->clap = srcImage->clap;
  183|  11.7k|    dstImage->irot = srcImage->irot;
  184|  11.7k|    dstImage->imir = srcImage->imir;
  185|  11.7k|}
avifImageCopySamples:
  188|  6.71k|{
  189|  6.71k|    assert(srcImage->depth == dstImage->depth);
  190|  6.71k|    if (planes & AVIF_PLANES_YUV) {
  ------------------
  |  Branch (190:9): [True: 6.30k, False: 411]
  ------------------
  191|  6.30k|        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|  6.30k|    }
  195|  6.71k|    const size_t bytesPerPixel = avifImageUsesU16(srcImage) ? 2 : 1;
  ------------------
  |  Branch (195:34): [True: 3.76k, False: 2.95k]
  ------------------
  196|       |
  197|  6.71k|    const avifBool skipColor = !(planes & AVIF_PLANES_YUV);
  198|  6.71k|    const avifBool skipAlpha = !(planes & AVIF_PLANES_A);
  199|  33.5k|    for (int c = AVIF_CHAN_Y; c <= AVIF_CHAN_A; ++c) {
  ------------------
  |  Branch (199:31): [True: 26.8k, False: 6.71k]
  ------------------
  200|  26.8k|        const avifBool alpha = c == AVIF_CHAN_A;
  201|  26.8k|        if ((skipColor && !alpha) || (skipAlpha && alpha)) {
  ------------------
  |  Branch (201:14): [True: 1.64k, False: 25.2k]
  |  Branch (201:27): [True: 1.23k, False: 411]
  |  Branch (201:39): [True: 8.44k, False: 17.1k]
  |  Branch (201:52): [True: 2.11k, False: 6.33k]
  ------------------
  202|  3.34k|            continue;
  203|  3.34k|        }
  204|       |
  205|  23.5k|        const uint32_t planeWidth = avifImagePlaneWidth(srcImage, c);
  206|  23.5k|        const uint32_t planeHeight = avifImagePlaneHeight(srcImage, c);
  207|  23.5k|        const uint8_t * srcRow = avifImagePlane(srcImage, c);
  208|  23.5k|        uint8_t * dstRow = avifImagePlane(dstImage, c);
  209|  23.5k|        const uint32_t srcRowBytes = avifImagePlaneRowBytes(srcImage, c);
  210|  23.5k|        const uint32_t dstRowBytes = avifImagePlaneRowBytes(dstImage, c);
  211|  23.5k|        assert(!srcRow == !dstRow);
  212|  23.5k|        if (!srcRow) {
  ------------------
  |  Branch (212:13): [True: 6.38k, False: 17.1k]
  ------------------
  213|  6.38k|            continue;
  214|  6.38k|        }
  215|  23.5k|        assert(planeWidth == avifImagePlaneWidth(dstImage, c));
  216|  17.1k|        assert(planeHeight == avifImagePlaneHeight(dstImage, c));
  217|       |
  218|  17.1k|        const size_t planeWidthBytes = planeWidth * bytesPerPixel;
  219|  11.2M|        for (uint32_t y = 0; y < planeHeight; ++y) {
  ------------------
  |  Branch (219:30): [True: 11.2M, False: 17.1k]
  ------------------
  220|  11.2M|            memcpy(dstRow, srcRow, planeWidthBytes);
  221|  11.2M|            srcRow += srcRowBytes;
  222|  11.2M|            dstRow += dstRowBytes;
  223|  11.2M|        }
  224|  17.1k|    }
  225|  6.71k|}
avifImageCopy:
  252|  4.19k|{
  253|       |    // Disallow self copy even though it could be supported easily. Self copy is
  254|       |    // unlikely to be needed, so it almost always indicates a programming error.
  255|  4.19k|    AVIF_CHECKERR(dstImage != srcImage, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   45|  4.19k|    do {                        \
  |  |   46|  4.19k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 4.19k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  4.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 4.19k]
  |  |  ------------------
  ------------------
  256|  4.19k|    avifImageFreePlanes(dstImage, AVIF_PLANES_ALL);
  257|  4.19k|    avifImageCopyNoAlloc(dstImage, srcImage);
  258|       |
  259|  4.19k|    AVIF_CHECKRES(avifImageSetProfileICC(dstImage, srcImage->icc.data, srcImage->icc.size));
  ------------------
  |  |   54|  4.19k|    do {                                  \
  |  |   55|  4.19k|        const avifResult result__ = (A);  \
  |  |   56|  4.19k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 4.19k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  4.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 4.19k]
  |  |  ------------------
  ------------------
  260|       |
  261|  4.19k|    AVIF_CHECKRES(avifRWDataSet(&dstImage->exif, srcImage->exif.data, srcImage->exif.size));
  ------------------
  |  |   54|  4.19k|    do {                                  \
  |  |   55|  4.19k|        const avifResult result__ = (A);  \
  |  |   56|  4.19k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 4.19k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  4.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 4.19k]
  |  |  ------------------
  ------------------
  262|  4.19k|    AVIF_CHECKRES(avifImageSetMetadataXMP(dstImage, srcImage->xmp.data, srcImage->xmp.size));
  ------------------
  |  |   54|  4.19k|    do {                                  \
  |  |   55|  4.19k|        const avifResult result__ = (A);  \
  |  |   56|  4.19k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 4.19k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  4.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 4.19k]
  |  |  ------------------
  ------------------
  263|       |
  264|  4.19k|    AVIF_CHECKRES(avifImageCopyProperties(dstImage, srcImage));
  ------------------
  |  |   54|  4.19k|    do {                                  \
  |  |   55|  4.19k|        const avifResult result__ = (A);  \
  |  |   56|  4.19k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 4.19k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  4.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 4.19k]
  |  |  ------------------
  ------------------
  265|       |
  266|  4.19k|    if ((planes & AVIF_PLANES_YUV) && srcImage->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (266:9): [True: 4.19k, False: 0]
  |  Branch (266:39): [True: 4.16k, False: 27]
  ------------------
  267|  4.16k|        if ((srcImage->yuvFormat != AVIF_PIXEL_FORMAT_YUV400) &&
  ------------------
  |  Branch (267:13): [True: 3.07k, False: 1.09k]
  ------------------
  268|  3.07k|            (!srcImage->yuvPlanes[AVIF_CHAN_U] || !srcImage->yuvPlanes[AVIF_CHAN_V])) {
  ------------------
  |  Branch (268:14): [True: 0, False: 3.07k]
  |  Branch (268:51): [True: 0, False: 3.07k]
  ------------------
  269|      0|            return AVIF_RESULT_INVALID_ARGUMENT;
  270|      0|        }
  271|  4.16k|        const avifResult allocationResult = avifImageAllocatePlanes(dstImage, AVIF_PLANES_YUV);
  272|  4.16k|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (272:13): [True: 0, False: 4.16k]
  ------------------
  273|      0|            return allocationResult;
  274|      0|        }
  275|  4.16k|    }
  276|  4.19k|    if ((planes & AVIF_PLANES_A) && srcImage->alphaPlane) {
  ------------------
  |  Branch (276:9): [True: 4.19k, False: 0]
  |  Branch (276:37): [True: 262, False: 3.93k]
  ------------------
  277|    262|        const avifResult allocationResult = avifImageAllocatePlanes(dstImage, AVIF_PLANES_A);
  278|    262|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (278:13): [True: 0, False: 262]
  ------------------
  279|      0|            return allocationResult;
  280|      0|        }
  281|    262|    }
  282|  4.19k|    avifImageCopySamples(dstImage, srcImage, planes);
  283|       |
  284|  4.19k|    if (srcImage->gainMap) {
  ------------------
  |  Branch (284:9): [True: 52, False: 4.14k]
  ------------------
  285|     52|        if (!dstImage->gainMap) {
  ------------------
  |  Branch (285:13): [True: 52, False: 0]
  ------------------
  286|     52|            dstImage->gainMap = avifGainMapCreate();
  287|     52|            AVIF_CHECKERR(dstImage->gainMap, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|     52|    do {                        \
  |  |   46|     52|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 52]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     52|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 52]
  |  |  ------------------
  ------------------
  288|     52|        }
  289|    208|        for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (289:25): [True: 156, False: 52]
  ------------------
  290|    156|            dstImage->gainMap->gainMapMin[c] = srcImage->gainMap->gainMapMin[c];
  291|    156|            dstImage->gainMap->gainMapMax[c] = srcImage->gainMap->gainMapMax[c];
  292|    156|            dstImage->gainMap->gainMapGamma[c] = srcImage->gainMap->gainMapGamma[c];
  293|    156|            dstImage->gainMap->baseOffset[c] = srcImage->gainMap->baseOffset[c];
  294|    156|            dstImage->gainMap->alternateOffset[c] = srcImage->gainMap->alternateOffset[c];
  295|    156|        }
  296|     52|        dstImage->gainMap->baseHdrHeadroom = srcImage->gainMap->baseHdrHeadroom;
  297|     52|        dstImage->gainMap->alternateHdrHeadroom = srcImage->gainMap->alternateHdrHeadroom;
  298|     52|        dstImage->gainMap->useBaseColorSpace = srcImage->gainMap->useBaseColorSpace;
  299|     52|        AVIF_CHECKRES(avifRWDataSet(&dstImage->gainMap->altICC, srcImage->gainMap->altICC.data, srcImage->gainMap->altICC.size));
  ------------------
  |  |   54|     52|    do {                                  \
  |  |   55|     52|        const avifResult result__ = (A);  \
  |  |   56|     52|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 52]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     52|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 52]
  |  |  ------------------
  ------------------
  300|     52|        dstImage->gainMap->altColorPrimaries = srcImage->gainMap->altColorPrimaries;
  301|     52|        dstImage->gainMap->altTransferCharacteristics = srcImage->gainMap->altTransferCharacteristics;
  302|     52|        dstImage->gainMap->altMatrixCoefficients = srcImage->gainMap->altMatrixCoefficients;
  303|     52|        dstImage->gainMap->altDepth = srcImage->gainMap->altDepth;
  304|     52|        dstImage->gainMap->altPlaneCount = srcImage->gainMap->altPlaneCount;
  305|     52|        dstImage->gainMap->altCLLI = srcImage->gainMap->altCLLI;
  306|       |
  307|     52|        if (srcImage->gainMap->image) {
  ------------------
  |  Branch (307:13): [True: 48, False: 4]
  ------------------
  308|     48|            if (!dstImage->gainMap->image) {
  ------------------
  |  Branch (308:17): [True: 48, False: 0]
  ------------------
  309|     48|                dstImage->gainMap->image = avifImageCreateEmpty();
  310|     48|                AVIF_CHECKERR(dstImage->gainMap->image, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|     48|    do {                        \
  |  |   46|     48|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 48]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     48|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 48]
  |  |  ------------------
  ------------------
  311|     48|            }
  312|     48|            AVIF_CHECKRES(avifImageCopy(dstImage->gainMap->image, srcImage->gainMap->image, planes));
  ------------------
  |  |   54|     48|    do {                                  \
  |  |   55|     48|        const avifResult result__ = (A);  \
  |  |   56|     48|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 48]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     48|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 48]
  |  |  ------------------
  ------------------
  313|     48|        } else if (dstImage->gainMap->image) {
  ------------------
  |  Branch (313:20): [True: 0, False: 4]
  ------------------
  314|      0|            avifImageDestroy(dstImage->gainMap->image);
  315|      0|            dstImage->gainMap->image = NULL;
  316|      0|        }
  317|  4.14k|    } else if (dstImage->gainMap) {
  ------------------
  |  Branch (317:16): [True: 0, False: 4.14k]
  ------------------
  318|      0|        avifGainMapDestroy(dstImage->gainMap);
  319|      0|        dstImage->gainMap = NULL;
  320|      0|    }
  321|       |
  322|  4.19k|    return AVIF_RESULT_OK;
  323|  4.19k|}
avifImageSetViewRect:
  326|  7.56k|{
  327|  7.56k|    AVIF_CHECKERR(dstImage != srcImage, AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   45|  7.56k|    do {                        \
  |  |   46|  7.56k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 7.56k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  7.56k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 7.56k]
  |  |  ------------------
  ------------------
  328|  7.56k|    avifPixelFormatInfo formatInfo;
  329|  7.56k|    avifGetPixelFormatInfo(srcImage->yuvFormat, &formatInfo);
  330|  7.56k|    if ((rect->width > srcImage->width) || (rect->height > srcImage->height) || (rect->x > (srcImage->width - rect->width)) ||
  ------------------
  |  Branch (330:9): [True: 0, False: 7.56k]
  |  Branch (330:44): [True: 0, False: 7.56k]
  |  Branch (330:81): [True: 0, False: 7.56k]
  ------------------
  331|  7.56k|        (rect->y > (srcImage->height - rect->height))) {
  ------------------
  |  Branch (331:9): [True: 0, False: 7.56k]
  ------------------
  332|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  333|      0|    }
  334|  7.56k|    if (!formatInfo.monochrome && ((rect->x & formatInfo.chromaShiftX) || (rect->y & formatInfo.chromaShiftY))) {
  ------------------
  |  Branch (334:9): [True: 7.25k, False: 312]
  |  Branch (334:36): [True: 0, False: 7.25k]
  |  Branch (334:75): [True: 0, False: 7.25k]
  ------------------
  335|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  336|      0|    }
  337|  7.56k|    avifImageFreePlanes(dstImage, AVIF_PLANES_ALL); // dstImage->imageOwnsYUVPlanes and dstImage->imageOwnsAlphaPlane set to AVIF_FALSE.
  338|  7.56k|    avifImageCopyNoAlloc(dstImage, srcImage);
  339|  7.56k|    dstImage->width = rect->width;
  340|  7.56k|    dstImage->height = rect->height;
  341|  7.56k|    const uint32_t pixelBytes = (srcImage->depth > 8) ? 2 : 1;
  ------------------
  |  Branch (341:33): [True: 3.45k, False: 4.10k]
  ------------------
  342|  7.56k|    if (srcImage->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (342:9): [True: 6.74k, False: 822]
  ------------------
  343|  26.9k|        for (int yuvPlane = AVIF_CHAN_Y; yuvPlane <= AVIF_CHAN_V; ++yuvPlane) {
  ------------------
  |  Branch (343:42): [True: 20.2k, False: 6.74k]
  ------------------
  344|  20.2k|            if (srcImage->yuvRowBytes[yuvPlane]) {
  ------------------
  |  Branch (344:17): [True: 19.6k, False: 624]
  ------------------
  345|  19.6k|                const size_t planeX = (yuvPlane == AVIF_CHAN_Y) ? rect->x : (rect->x >> formatInfo.chromaShiftX);
  ------------------
  |  Branch (345:39): [True: 6.74k, False: 12.8k]
  ------------------
  346|  19.6k|                const size_t planeY = (yuvPlane == AVIF_CHAN_Y) ? rect->y : (rect->y >> formatInfo.chromaShiftY);
  ------------------
  |  Branch (346:39): [True: 6.74k, False: 12.8k]
  ------------------
  347|  19.6k|                dstImage->yuvPlanes[yuvPlane] =
  348|  19.6k|                    srcImage->yuvPlanes[yuvPlane] + planeY * srcImage->yuvRowBytes[yuvPlane] + planeX * pixelBytes;
  349|  19.6k|                dstImage->yuvRowBytes[yuvPlane] = srcImage->yuvRowBytes[yuvPlane];
  350|  19.6k|            }
  351|  20.2k|        }
  352|  6.74k|    }
  353|  7.56k|    if (srcImage->alphaPlane) {
  ------------------
  |  Branch (353:9): [True: 1.23k, False: 6.33k]
  ------------------
  354|  1.23k|        dstImage->alphaPlane = srcImage->alphaPlane + (size_t)rect->y * srcImage->alphaRowBytes + (size_t)rect->x * pixelBytes;
  355|  1.23k|        dstImage->alphaRowBytes = srcImage->alphaRowBytes;
  356|  1.23k|    }
  357|  7.56k|    return AVIF_RESULT_OK;
  358|  7.56k|}
avifImageDestroy:
  361|   720k|{
  362|   720k|    if (image->gainMap) {
  ------------------
  |  Branch (362:9): [True: 227, False: 719k]
  ------------------
  363|    227|        avifGainMapDestroy(image->gainMap);
  364|    227|    }
  365|   720k|    avifImageFreePlanes(image, AVIF_PLANES_ALL);
  366|   720k|    avifRWDataFree(&image->icc);
  367|   720k|    avifRWDataFree(&image->exif);
  368|   720k|    avifRWDataFree(&image->xmp);
  369|   732k|    for (size_t i = 0; i < image->numProperties; ++i) {
  ------------------
  |  Branch (369:24): [True: 12.3k, False: 720k]
  ------------------
  370|  12.3k|        avifRWDataFree(&image->properties[i].boxPayload);
  371|  12.3k|    }
  372|   720k|    avifFree(image->properties);
  373|       |    image->properties = NULL;
  374|   720k|    image->numProperties = 0;
  375|   720k|    avifFree(image);
  376|   720k|}
avifImageSetProfileICC:
  379|  4.19k|{
  380|  4.19k|    return avifRWDataSet(&image->icc, icc, iccSize);
  381|  4.19k|}
avifImageSetMetadataXMP:
  384|  5.81k|{
  385|  5.81k|    return avifRWDataSet(&image->xmp, xmp, xmpSize);
  386|  5.81k|}
avifImagePushProperty:
  389|  9.17k|{
  390|  9.17k|    AVIF_CHECKERR(image->numProperties < SIZE_MAX / sizeof(avifImageItemProperty), AVIF_RESULT_INVALID_ARGUMENT);
  ------------------
  |  |   45|  9.17k|    do {                        \
  |  |   46|  9.17k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 9.17k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  9.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 9.17k]
  |  |  ------------------
  ------------------
  391|       |    // Shallow copy the current properties.
  392|  9.17k|    const size_t numProperties = image->numProperties + 1;
  393|  9.17k|    avifImageItemProperty * const properties = (avifImageItemProperty *)avifAlloc(numProperties * sizeof(properties[0]));
  394|  9.17k|    AVIF_CHECKERR(properties != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  9.17k|    do {                        \
  |  |   46|  9.17k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 9.17k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  9.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 9.17k]
  |  |  ------------------
  ------------------
  395|  9.17k|    if (image->numProperties != 0) {
  ------------------
  |  Branch (395:9): [True: 1.17k, False: 8.00k]
  ------------------
  396|  1.17k|        memcpy(properties, image->properties, image->numProperties * sizeof(properties[0]));
  397|  1.17k|    }
  398|       |    // Free the old array and replace it by the new one.
  399|  9.17k|    avifFree(image->properties);
  400|  9.17k|    image->properties = properties;
  401|  9.17k|    image->numProperties = numProperties;
  402|       |    // Set the new property.
  403|  9.17k|    avifImageItemProperty * const property = &image->properties[image->numProperties - 1];
  404|  9.17k|    memset(property, 0, sizeof(*property));
  405|  9.17k|    memcpy(property->boxtype, boxtype, sizeof(property->boxtype));
  406|  9.17k|    memcpy(property->usertype, usertype, sizeof(property->usertype));
  407|  9.17k|    AVIF_CHECKRES(avifRWDataSet(&property->boxPayload, boxPayload, boxPayloadSize));
  ------------------
  |  |   54|  9.17k|    do {                                  \
  |  |   55|  9.17k|        const avifResult result__ = (A);  \
  |  |   56|  9.17k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 9.17k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  9.17k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 9.17k]
  |  |  ------------------
  ------------------
  408|  9.17k|    return AVIF_RESULT_OK;
  409|  9.17k|}
avifImageAllocatePlanes:
  432|  14.8k|{
  433|  14.8k|    if (image->width == 0 || image->height == 0 || image->depth == 0 || image->depth > 16) {
  ------------------
  |  Branch (433:9): [True: 0, False: 14.8k]
  |  Branch (433:30): [True: 0, False: 14.8k]
  |  Branch (433:52): [True: 0, False: 14.8k]
  |  Branch (433:73): [True: 0, False: 14.8k]
  ------------------
  434|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  435|      0|    }
  436|  14.8k|    const uint32_t channelSize = avifImageUsesU16(image) ? 2 : 1;
  ------------------
  |  Branch (436:34): [True: 8.74k, False: 6.15k]
  ------------------
  437|  14.8k|    if (image->width > UINT32_MAX / channelSize) {
  ------------------
  |  Branch (437:9): [True: 0, False: 14.8k]
  ------------------
  438|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  439|      0|    }
  440|  14.8k|    const uint32_t fullRowBytes = channelSize * image->width;
  441|  14.8k|    if (image->height > PTRDIFF_MAX / fullRowBytes) {
  ------------------
  |  Branch (441:9): [True: 0, False: 14.8k]
  ------------------
  442|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  443|      0|    }
  444|  14.8k|    const size_t fullSize = (size_t)fullRowBytes * image->height;
  445|       |
  446|  14.8k|    if ((planes & AVIF_PLANES_YUV) && (image->yuvFormat != AVIF_PIXEL_FORMAT_NONE)) {
  ------------------
  |  Branch (446:9): [True: 13.4k, False: 1.49k]
  |  Branch (446:39): [True: 13.4k, False: 0]
  ------------------
  447|  13.4k|        avifPixelFormatInfo info;
  448|  13.4k|        avifGetPixelFormatInfo(image->yuvFormat, &info);
  449|       |
  450|  13.4k|        image->imageOwnsYUVPlanes = AVIF_TRUE;
  ------------------
  |  |   88|  13.4k|#define AVIF_TRUE 1
  ------------------
  451|  13.4k|        if (!image->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (451:13): [True: 13.4k, False: 0]
  ------------------
  452|  13.4k|            image->yuvPlanes[AVIF_CHAN_Y] = (uint8_t *)avifAlloc(fullSize);
  453|  13.4k|            if (!image->yuvPlanes[AVIF_CHAN_Y]) {
  ------------------
  |  Branch (453:17): [True: 0, False: 13.4k]
  ------------------
  454|      0|                return AVIF_RESULT_OUT_OF_MEMORY;
  455|      0|            }
  456|  13.4k|            image->yuvRowBytes[AVIF_CHAN_Y] = fullRowBytes;
  457|  13.4k|        }
  458|       |
  459|  13.4k|        if (!info.monochrome) {
  ------------------
  |  Branch (459:13): [True: 10.3k, False: 3.02k]
  ------------------
  460|       |            // Intermediary computation as 64 bits in case width or height is exactly UINT32_MAX.
  461|  10.3k|            const uint32_t shiftedW = (uint32_t)(((uint64_t)image->width + info.chromaShiftX) >> info.chromaShiftX);
  462|  10.3k|            const uint32_t shiftedH = (uint32_t)(((uint64_t)image->height + info.chromaShiftY) >> info.chromaShiftY);
  463|       |
  464|       |            // These are less than or equal to fullRowBytes/fullSize. No need to check overflows.
  465|  10.3k|            const uint32_t uvRowBytes = channelSize * shiftedW;
  466|  10.3k|            const size_t uvSize = (size_t)uvRowBytes * shiftedH;
  467|       |
  468|  31.1k|            for (int uvPlane = AVIF_CHAN_U; uvPlane <= AVIF_CHAN_V; ++uvPlane) {
  ------------------
  |  Branch (468:45): [True: 20.7k, False: 10.3k]
  ------------------
  469|  20.7k|                if (!image->yuvPlanes[uvPlane]) {
  ------------------
  |  Branch (469:21): [True: 20.7k, False: 0]
  ------------------
  470|  20.7k|                    image->yuvPlanes[uvPlane] = (uint8_t *)avifAlloc(uvSize);
  471|  20.7k|                    if (!image->yuvPlanes[uvPlane]) {
  ------------------
  |  Branch (471:25): [True: 0, False: 20.7k]
  ------------------
  472|      0|                        return AVIF_RESULT_OUT_OF_MEMORY;
  473|      0|                    }
  474|  20.7k|                    image->yuvRowBytes[uvPlane] = uvRowBytes;
  475|  20.7k|                }
  476|  20.7k|            }
  477|  10.3k|        }
  478|  13.4k|    }
  479|  14.8k|    if (planes & AVIF_PLANES_A) {
  ------------------
  |  Branch (479:9): [True: 1.49k, False: 13.4k]
  ------------------
  480|  1.49k|        image->imageOwnsAlphaPlane = AVIF_TRUE;
  ------------------
  |  |   88|  1.49k|#define AVIF_TRUE 1
  ------------------
  481|  1.49k|        if (!image->alphaPlane) {
  ------------------
  |  Branch (481:13): [True: 1.49k, False: 0]
  ------------------
  482|  1.49k|            image->alphaPlane = (uint8_t *)avifAlloc(fullSize);
  483|  1.49k|            if (!image->alphaPlane) {
  ------------------
  |  Branch (483:17): [True: 0, False: 1.49k]
  ------------------
  484|      0|                return AVIF_RESULT_OUT_OF_MEMORY;
  485|      0|            }
  486|  1.49k|            image->alphaRowBytes = fullRowBytes;
  487|  1.49k|        }
  488|  1.49k|    }
  489|  14.8k|    return AVIF_RESULT_OK;
  490|  14.8k|}
avifImageFreePlanes:
  493|   773k|{
  494|   773k|    if ((planes & AVIF_PLANES_YUV) && (image->yuvFormat != AVIF_PIXEL_FORMAT_NONE)) {
  ------------------
  |  Branch (494:9): [True: 770k, False: 3.40k]
  |  Branch (494:39): [True: 48.4k, False: 722k]
  ------------------
  495|  48.4k|        if (image->imageOwnsYUVPlanes) {
  ------------------
  |  Branch (495:13): [True: 13.4k, False: 35.0k]
  ------------------
  496|  13.4k|            avifFree(image->yuvPlanes[AVIF_CHAN_Y]);
  497|  13.4k|            avifFree(image->yuvPlanes[AVIF_CHAN_U]);
  498|  13.4k|            avifFree(image->yuvPlanes[AVIF_CHAN_V]);
  499|  13.4k|        }
  500|  48.4k|        image->yuvPlanes[AVIF_CHAN_Y] = NULL;
  501|  48.4k|        image->yuvRowBytes[AVIF_CHAN_Y] = 0;
  502|  48.4k|        image->yuvPlanes[AVIF_CHAN_U] = NULL;
  503|  48.4k|        image->yuvRowBytes[AVIF_CHAN_U] = 0;
  504|  48.4k|        image->yuvPlanes[AVIF_CHAN_V] = NULL;
  505|  48.4k|        image->yuvRowBytes[AVIF_CHAN_V] = 0;
  506|  48.4k|        image->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  48.4k|#define AVIF_FALSE 0
  ------------------
  507|  48.4k|    }
  508|   773k|    if (planes & AVIF_PLANES_A) {
  ------------------
  |  Branch (508:9): [True: 757k, False: 16.6k]
  ------------------
  509|   757k|        if (image->imageOwnsAlphaPlane) {
  ------------------
  |  Branch (509:13): [True: 1.08k, False: 756k]
  ------------------
  510|  1.08k|            avifFree(image->alphaPlane);
  511|  1.08k|        }
  512|   757k|        image->alphaPlane = NULL;
  513|   757k|        image->alphaRowBytes = 0;
  514|   757k|        image->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|   757k|#define AVIF_FALSE 0
  ------------------
  515|   757k|    }
  516|   773k|}
avifImageStealPlanes:
  519|  7.51k|{
  520|  7.51k|    avifImageFreePlanes(dstImage, planes);
  521|       |
  522|  7.51k|    if (planes & AVIF_PLANES_YUV) {
  ------------------
  |  Branch (522:9): [True: 7.09k, False: 424]
  ------------------
  523|  7.09k|        dstImage->yuvPlanes[AVIF_CHAN_Y] = srcImage->yuvPlanes[AVIF_CHAN_Y];
  524|  7.09k|        dstImage->yuvRowBytes[AVIF_CHAN_Y] = srcImage->yuvRowBytes[AVIF_CHAN_Y];
  525|  7.09k|        dstImage->yuvPlanes[AVIF_CHAN_U] = srcImage->yuvPlanes[AVIF_CHAN_U];
  526|  7.09k|        dstImage->yuvRowBytes[AVIF_CHAN_U] = srcImage->yuvRowBytes[AVIF_CHAN_U];
  527|  7.09k|        dstImage->yuvPlanes[AVIF_CHAN_V] = srcImage->yuvPlanes[AVIF_CHAN_V];
  528|  7.09k|        dstImage->yuvRowBytes[AVIF_CHAN_V] = srcImage->yuvRowBytes[AVIF_CHAN_V];
  529|       |
  530|  7.09k|        srcImage->yuvPlanes[AVIF_CHAN_Y] = NULL;
  531|  7.09k|        srcImage->yuvRowBytes[AVIF_CHAN_Y] = 0;
  532|  7.09k|        srcImage->yuvPlanes[AVIF_CHAN_U] = NULL;
  533|  7.09k|        srcImage->yuvRowBytes[AVIF_CHAN_U] = 0;
  534|  7.09k|        srcImage->yuvPlanes[AVIF_CHAN_V] = NULL;
  535|  7.09k|        srcImage->yuvRowBytes[AVIF_CHAN_V] = 0;
  536|       |
  537|  7.09k|        dstImage->yuvFormat = srcImage->yuvFormat;
  538|  7.09k|        dstImage->imageOwnsYUVPlanes = srcImage->imageOwnsYUVPlanes;
  539|  7.09k|        srcImage->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  7.09k|#define AVIF_FALSE 0
  ------------------
  540|  7.09k|    }
  541|  7.51k|    if (planes & AVIF_PLANES_A) {
  ------------------
  |  Branch (541:9): [True: 535, False: 6.98k]
  ------------------
  542|    535|        dstImage->alphaPlane = srcImage->alphaPlane;
  543|    535|        dstImage->alphaRowBytes = srcImage->alphaRowBytes;
  544|       |
  545|    535|        srcImage->alphaPlane = NULL;
  546|    535|        srcImage->alphaRowBytes = 0;
  547|       |
  548|    535|        dstImage->imageOwnsAlphaPlane = srcImage->imageOwnsAlphaPlane;
  549|    535|        srcImage->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|    535|#define AVIF_FALSE 0
  ------------------
  550|    535|    }
  551|  7.51k|}
avifImageUsesU16:
  554|   702M|{
  555|   702M|    return (image->depth > 8);
  556|   702M|}
avifImagePlane:
  587|   702M|{
  588|   702M|    if ((channel == AVIF_CHAN_Y) || (channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (588:9): [True: 234M, False: 468M]
  |  Branch (588:37): [True: 234M, False: 234M]
  |  Branch (588:65): [True: 234M, False: 10.5k]
  ------------------
  589|   702M|        return image->yuvPlanes[channel];
  590|   702M|    }
  591|  10.5k|    if (channel == AVIF_CHAN_A) {
  ------------------
  |  Branch (591:9): [True: 10.5k, False: 0]
  ------------------
  592|  10.5k|        return image->alphaPlane;
  593|  10.5k|    }
  594|      0|    return NULL;
  595|  10.5k|}
avifImagePlaneRowBytes:
  598|   702M|{
  599|   702M|    if ((channel == AVIF_CHAN_Y) || (channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (599:9): [True: 234M, False: 468M]
  |  Branch (599:37): [True: 234M, False: 234M]
  |  Branch (599:65): [True: 234M, False: 10.5k]
  ------------------
  600|   702M|        return image->yuvRowBytes[channel];
  601|   702M|    }
  602|  10.5k|    if (channel == AVIF_CHAN_A) {
  ------------------
  |  Branch (602:9): [True: 10.5k, False: 0]
  ------------------
  603|  10.5k|        return image->alphaRowBytes;
  604|  10.5k|    }
  605|      0|    return 0;
  606|  10.5k|}
avifImagePlaneWidth:
  609|  70.2k|{
  610|  70.2k|    if (channel == AVIF_CHAN_Y) {
  ------------------
  |  Branch (610:9): [True: 19.7k, False: 50.4k]
  ------------------
  611|  19.7k|        return image->width;
  612|  19.7k|    }
  613|  50.4k|    if ((channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (613:9): [True: 27.3k, False: 23.1k]
  |  Branch (613:37): [True: 17.8k, False: 5.29k]
  ------------------
  614|  45.1k|        avifPixelFormatInfo formatInfo;
  615|  45.1k|        avifGetPixelFormatInfo(image->yuvFormat, &formatInfo);
  616|  45.1k|        if (formatInfo.monochrome) {
  ------------------
  |  Branch (616:13): [True: 6.38k, False: 38.7k]
  ------------------
  617|  6.38k|            return 0;
  618|  6.38k|        }
  619|  38.7k|        return (image->width + formatInfo.chromaShiftX) >> formatInfo.chromaShiftX;
  620|  45.1k|    }
  621|  5.29k|    if ((channel == AVIF_CHAN_A) && image->alphaPlane) {
  ------------------
  |  Branch (621:9): [True: 5.29k, False: 0]
  |  Branch (621:37): [True: 1.36k, False: 3.93k]
  ------------------
  622|  1.36k|        return image->width;
  623|  1.36k|    }
  624|  3.93k|    return 0;
  625|  5.29k|}
avifImagePlaneHeight:
  628|  56.6k|{
  629|  56.6k|    if (channel == AVIF_CHAN_Y) {
  ------------------
  |  Branch (629:9): [True: 15.4k, False: 41.1k]
  ------------------
  630|  15.4k|        return image->height;
  631|  15.4k|    }
  632|  41.1k|    if ((channel == AVIF_CHAN_U) || (channel == AVIF_CHAN_V)) {
  ------------------
  |  Branch (632:9): [True: 23.0k, False: 18.1k]
  |  Branch (632:37): [True: 13.5k, False: 4.60k]
  ------------------
  633|  36.5k|        avifPixelFormatInfo formatInfo;
  634|  36.5k|        avifGetPixelFormatInfo(image->yuvFormat, &formatInfo);
  635|  36.5k|        if (formatInfo.monochrome) {
  ------------------
  |  Branch (635:13): [True: 4.29k, False: 32.2k]
  ------------------
  636|  4.29k|            return 0;
  637|  4.29k|        }
  638|  32.2k|        return (image->height + formatInfo.chromaShiftY) >> formatInfo.chromaShiftY;
  639|  36.5k|    }
  640|  4.60k|    if ((channel == AVIF_CHAN_A) && image->alphaPlane) {
  ------------------
  |  Branch (640:9): [True: 4.60k, False: 0]
  |  Branch (640:37): [True: 673, False: 3.93k]
  ------------------
  641|    673|        return image->height;
  642|    673|    }
  643|  3.93k|    return 0;
  644|  4.60k|}
avifDimensionsTooLarge:
  647|   724k|{
  648|   724k|    if ((imageSizeLimit != 0) && (width > (imageSizeLimit / height))) {
  ------------------
  |  Branch (648:9): [True: 724k, False: 0]
  |  Branch (648:34): [True: 71, False: 724k]
  ------------------
  649|     71|        return AVIF_TRUE;
  ------------------
  |  |   88|     71|#define AVIF_TRUE 1
  ------------------
  650|     71|    }
  651|   724k|    if ((imageDimensionLimit != 0) && ((width > imageDimensionLimit) || (height > imageDimensionLimit))) {
  ------------------
  |  Branch (651:9): [True: 724k, False: 0]
  |  Branch (651:40): [True: 15, False: 724k]
  |  Branch (651:73): [True: 22, False: 724k]
  ------------------
  652|     37|        return AVIF_TRUE;
  ------------------
  |  |   88|     37|#define AVIF_TRUE 1
  ------------------
  653|     37|    }
  654|   724k|    return AVIF_FALSE;
  ------------------
  |  |   89|   724k|#define AVIF_FALSE 0
  ------------------
  655|   724k|}
avifCodecDestroy:
  660|  14.2k|{
  661|  14.2k|    if (codec && codec->destroyInternal) {
  ------------------
  |  Branch (661:9): [True: 14.2k, False: 0]
  |  Branch (661:18): [True: 14.2k, False: 0]
  ------------------
  662|  14.2k|        codec->destroyInternal(codec);
  663|  14.2k|    }
  664|  14.2k|    avifFree(codec);
  665|  14.2k|}
avifCropRectFromCleanApertureBox:
  788|    276|{
  789|    276|    avifDiagnosticsClearError(diag);
  790|       |
  791|       |    // ISO/IEC 14496-12:2022, Section 12.1.4.1:
  792|       |    //   For horizOff and vertOff, D shall be strictly positive and N may be
  793|       |    //   positive or negative. For cleanApertureWidth and cleanApertureHeight,
  794|       |    //   N shall be positive and D shall be strictly positive.
  795|       |
  796|    276|    const int32_t widthN = (int32_t)clap->widthN;
  797|    276|    const int32_t widthD = (int32_t)clap->widthD;
  798|    276|    const int32_t heightN = (int32_t)clap->heightN;
  799|    276|    const int32_t heightD = (int32_t)clap->heightD;
  800|    276|    const int32_t horizOffN = (int32_t)clap->horizOffN;
  801|    276|    const int32_t horizOffD = (int32_t)clap->horizOffD;
  802|    276|    const int32_t vertOffN = (int32_t)clap->vertOffN;
  803|    276|    const int32_t vertOffD = (int32_t)clap->vertOffD;
  804|    276|    if ((widthD <= 0) || (heightD <= 0) || (horizOffD <= 0) || (vertOffD <= 0)) {
  ------------------
  |  Branch (804:9): [True: 8, False: 268]
  |  Branch (804:26): [True: 6, False: 262]
  |  Branch (804:44): [True: 5, False: 257]
  |  Branch (804:64): [True: 5, False: 252]
  ------------------
  805|     24|        avifDiagnosticsPrintf(diag, "[Strict] clap contains a denominator that is not strictly positive");
  806|     24|        return AVIF_FALSE;
  ------------------
  |  |   89|     24|#define AVIF_FALSE 0
  ------------------
  807|     24|    }
  808|    252|    if ((widthN < 0) || (heightN < 0)) {
  ------------------
  |  Branch (808:9): [True: 2, False: 250]
  |  Branch (808:25): [True: 10, False: 240]
  ------------------
  809|     12|        avifDiagnosticsPrintf(diag, "[Strict] clap width or height is negative");
  810|     12|        return AVIF_FALSE;
  ------------------
  |  |   89|     12|#define AVIF_FALSE 0
  ------------------
  811|     12|    }
  812|       |
  813|       |    // ISO/IEC 23000-22:2019/Amd. 2:2021, Section 7.3.6.7:
  814|       |    //   - cleanApertureWidth and cleanApertureHeight shall be integers;
  815|       |    //   - The leftmost pixel and the topmost line of the clean aperture as
  816|       |    //     defined in ISO/IEC 14496-12:2020, Section 12.1.4.1 shall be integers;
  817|       |    //   ...
  818|       |
  819|    240|    if ((widthN % widthD) != 0) {
  ------------------
  |  Branch (819:9): [True: 3, False: 237]
  ------------------
  820|      3|        avifDiagnosticsPrintf(diag, "[Strict] clap width %d/%d is not an integer", widthN, widthD);
  821|      3|        return AVIF_FALSE;
  ------------------
  |  |   89|      3|#define AVIF_FALSE 0
  ------------------
  822|      3|    }
  823|    237|    if ((heightN % heightD) != 0) {
  ------------------
  |  Branch (823:9): [True: 3, False: 234]
  ------------------
  824|      3|        avifDiagnosticsPrintf(diag, "[Strict] clap height %d/%d is not an integer", heightN, heightD);
  825|      3|        return AVIF_FALSE;
  ------------------
  |  |   89|      3|#define AVIF_FALSE 0
  ------------------
  826|      3|    }
  827|    234|    const int32_t clapW = widthN / widthD;
  828|    234|    const int32_t clapH = heightN / heightD;
  829|       |
  830|    234|    if ((imageW > INT32_MAX) || (imageH > INT32_MAX)) {
  ------------------
  |  Branch (830:9): [True: 0, False: 234]
  |  Branch (830:33): [True: 0, False: 234]
  ------------------
  831|      0|        avifDiagnosticsPrintf(diag, "[Strict] image width %u or height %u is greater than INT32_MAX", imageW, imageH);
  832|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  833|      0|    }
  834|    234|    avifFraction uncroppedCenterX = calcCenter((int32_t)imageW);
  835|    234|    avifFraction uncroppedCenterY = calcCenter((int32_t)imageH);
  836|       |
  837|    234|    avifFraction horizOff;
  838|    234|    horizOff.n = horizOffN;
  839|    234|    horizOff.d = horizOffD;
  840|    234|    avifFraction croppedCenterX;
  841|    234|    if (!avifFractionAdd(uncroppedCenterX, horizOff, &croppedCenterX)) {
  ------------------
  |  Branch (841:9): [True: 2, False: 232]
  ------------------
  842|      2|        avifDiagnosticsPrintf(diag, "[Strict] croppedCenterX overflowed");
  843|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
  844|      2|    }
  845|       |
  846|    232|    avifFraction vertOff;
  847|    232|    vertOff.n = vertOffN;
  848|    232|    vertOff.d = vertOffD;
  849|    232|    avifFraction croppedCenterY;
  850|    232|    if (!avifFractionAdd(uncroppedCenterY, vertOff, &croppedCenterY)) {
  ------------------
  |  Branch (850:9): [True: 11, False: 221]
  ------------------
  851|     11|        avifDiagnosticsPrintf(diag, "[Strict] croppedCenterY overflowed");
  852|     11|        return AVIF_FALSE;
  ------------------
  |  |   89|     11|#define AVIF_FALSE 0
  ------------------
  853|     11|    }
  854|       |
  855|    221|    avifFraction halfW;
  856|    221|    halfW.n = clapW;
  857|    221|    halfW.d = 2;
  858|    221|    avifFraction cropX;
  859|    221|    if (!avifFractionSub(croppedCenterX, halfW, &cropX)) {
  ------------------
  |  Branch (859:9): [True: 12, False: 209]
  ------------------
  860|     12|        avifDiagnosticsPrintf(diag, "[Strict] cropX overflowed");
  861|     12|        return AVIF_FALSE;
  ------------------
  |  |   89|     12|#define AVIF_FALSE 0
  ------------------
  862|     12|    }
  863|    209|    if ((cropX.n % cropX.d) != 0) {
  ------------------
  |  Branch (863:9): [True: 48, False: 161]
  ------------------
  864|     48|        avifDiagnosticsPrintf(diag, "[Strict] calculated crop X offset %d/%d is not an integer", cropX.n, cropX.d);
  865|     48|        return AVIF_FALSE;
  ------------------
  |  |   89|     48|#define AVIF_FALSE 0
  ------------------
  866|     48|    }
  867|       |
  868|    161|    avifFraction halfH;
  869|    161|    halfH.n = clapH;
  870|    161|    halfH.d = 2;
  871|    161|    avifFraction cropY;
  872|    161|    if (!avifFractionSub(croppedCenterY, halfH, &cropY)) {
  ------------------
  |  Branch (872:9): [True: 12, False: 149]
  ------------------
  873|     12|        avifDiagnosticsPrintf(diag, "[Strict] cropY overflowed");
  874|     12|        return AVIF_FALSE;
  ------------------
  |  |   89|     12|#define AVIF_FALSE 0
  ------------------
  875|     12|    }
  876|    149|    if ((cropY.n % cropY.d) != 0) {
  ------------------
  |  Branch (876:9): [True: 9, False: 140]
  ------------------
  877|      9|        avifDiagnosticsPrintf(diag, "[Strict] calculated crop Y offset %d/%d is not an integer", cropY.n, cropY.d);
  878|      9|        return AVIF_FALSE;
  ------------------
  |  |   89|      9|#define AVIF_FALSE 0
  ------------------
  879|      9|    }
  880|       |
  881|    140|    if ((cropX.n < 0) || (cropY.n < 0)) {
  ------------------
  |  Branch (881:9): [True: 6, False: 134]
  |  Branch (881:26): [True: 5, False: 129]
  ------------------
  882|     11|        avifDiagnosticsPrintf(diag, "[Strict] at least one crop offset is not positive");
  883|     11|        return AVIF_FALSE;
  ------------------
  |  |   89|     11|#define AVIF_FALSE 0
  ------------------
  884|     11|    }
  885|       |
  886|    129|    cropRect->x = (uint32_t)(cropX.n / cropX.d);
  887|    129|    cropRect->y = (uint32_t)(cropY.n / cropY.d);
  888|    129|    cropRect->width = (uint32_t)clapW;
  889|    129|    cropRect->height = (uint32_t)clapH;
  890|    129|    return avifCropRectIsValid(cropRect, imageW, imageH, diag);
  891|    140|}
avifIsAlpha:
 1021|   607k|{
 1022|   607k|    if (itemCategory == AVIF_ITEM_ALPHA) {
  ------------------
  |  Branch (1022:9): [True: 59.2k, False: 548k]
  ------------------
 1023|  59.2k|        return AVIF_TRUE;
  ------------------
  |  |   88|  59.2k|#define AVIF_TRUE 1
  ------------------
 1024|  59.2k|    }
 1025|   548k|    if (itemCategory >= AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA &&
  ------------------
  |  Branch (1025:9): [True: 0, False: 548k]
  ------------------
 1026|      0|        itemCategory < AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS) {
  ------------------
  |  |  431|      0|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  ------------------
  |  Branch (1026:9): [True: 0, False: 0]
  ------------------
 1027|      0|        return AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
 1028|      0|    }
 1029|   548k|    return AVIF_FALSE;
  ------------------
  |  |   89|   548k|#define AVIF_FALSE 0
  ------------------
 1030|   548k|}
avifAreGridDimensionsValid:
 1035|    356|{
 1036|       |    // ISO/IEC 23000-22:2019, Section 7.3.11.4.2:
 1037|       |    //   - the tile_width shall be greater than or equal to 64, and should be a multiple of 64
 1038|       |    //   - the tile_height shall be greater than or equal to 64, and should be a multiple of 64
 1039|       |    // The "should" part is ignored here.
 1040|    356|    if ((tileW < 64) || (tileH < 64)) {
  ------------------
  |  Branch (1040:9): [True: 1, False: 355]
  |  Branch (1040:25): [True: 1, False: 354]
  ------------------
 1041|      2|        avifDiagnosticsPrintf(diag,
 1042|      2|                              "Grid image tile width (%u) or height (%u) cannot be smaller than 64. "
 1043|      2|                              "See MIAF (ISO/IEC 23000-22:2019), Section 7.3.11.4.2",
 1044|      2|                              tileW,
 1045|      2|                              tileH);
 1046|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
 1047|      2|    }
 1048|       |
 1049|       |    // ISO/IEC 23000-22:2019, Section 7.3.11.4.2:
 1050|       |    //   - when the images are in the 4:2:2 chroma sampling format the horizontal tile offsets and widths,
 1051|       |    //     and the output width, shall be even numbers;
 1052|       |    //   - when the images are in the 4:2:0 chroma sampling format both the horizontal and vertical tile
 1053|       |    //     offsets and widths, and the output width and height, shall be even numbers.
 1054|       |    // If the rules above were not respected, the following problematic situation may happen:
 1055|       |    //   Some 4:2:0 image is 650 pixels wide and has 10 cell columns, each being 65 pixels wide.
 1056|       |    //   The chroma plane of the whole image is 325 pixels wide. The chroma plane of each cell is 33 pixels wide.
 1057|       |    //   33*10 - 325 gives 5 extra pixels with no specified destination in the reconstructed image.
 1058|       |
 1059|       |    // Tile offsets are not enforced since they depend on tile size (ISO/IEC 23008-12:2017, Section 6.6.2.3.1):
 1060|       |    //   The reconstructed image is formed by tiling the input images into a grid [...] without gap or overlap
 1061|    354|    if ((((yuvFormat == AVIF_PIXEL_FORMAT_YUV420) || (yuvFormat == AVIF_PIXEL_FORMAT_YUV422)) &&
  ------------------
  |  Branch (1061:11): [True: 51, False: 303]
  |  Branch (1061:54): [True: 10, False: 293]
  ------------------
 1062|     61|         (((imageW % 2) != 0) || ((tileW % 2) != 0))) ||
  ------------------
  |  Branch (1062:11): [True: 1, False: 60]
  |  Branch (1062:34): [True: 1, False: 59]
  ------------------
 1063|    352|        ((yuvFormat == AVIF_PIXEL_FORMAT_YUV420) && (((imageH % 2) != 0) || ((tileH % 2) != 0)))) {
  ------------------
  |  Branch (1063:10): [True: 49, False: 303]
  |  Branch (1063:54): [True: 1, False: 48]
  |  Branch (1063:77): [True: 1, False: 47]
  ------------------
 1064|      4|        avifDiagnosticsPrintf(diag,
 1065|      4|                              "Grid image width (%u) or height (%u) or tile width (%u) or height (%u) "
 1066|      4|                              "shall be even if chroma is subsampled in that dimension. "
 1067|      4|                              "See MIAF (ISO/IEC 23000-22:2019), Section 7.3.11.4.2",
 1068|      4|                              imageW,
 1069|      4|                              imageH,
 1070|      4|                              tileW,
 1071|      4|                              tileH);
 1072|      4|        return AVIF_FALSE;
  ------------------
  |  |   89|      4|#define AVIF_FALSE 0
  ------------------
 1073|      4|    }
 1074|    350|    return AVIF_TRUE;
  ------------------
  |  |   88|    350|#define AVIF_TRUE 1
  ------------------
 1075|    354|}
avifCodecTypeFromChoice:
 1255|  14.2k|{
 1256|  14.2k|    struct AvailableCodec * availableCodec = findAvailableCodec(choice, requiredFlags);
 1257|  14.2k|    if (availableCodec) {
  ------------------
  |  Branch (1257:9): [True: 14.2k, False: 0]
  ------------------
 1258|  14.2k|        return availableCodec->type;
 1259|  14.2k|    }
 1260|      0|    return AVIF_CODEC_TYPE_UNKNOWN;
 1261|  14.2k|}
avifCodecCreate:
 1274|  14.2k|{
 1275|  14.2k|    *codec = NULL;
 1276|  14.2k|    struct AvailableCodec * availableCodec = findAvailableCodec(choice, requiredFlags);
 1277|  14.2k|    AVIF_CHECKERR(availableCodec != NULL, AVIF_RESULT_NO_CODEC_AVAILABLE);
  ------------------
  |  |   45|  14.2k|    do {                        \
  |  |   46|  14.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 14.2k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  14.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 14.2k]
  |  |  ------------------
  ------------------
 1278|  14.2k|    *codec = availableCodec->create();
 1279|  14.2k|    AVIF_CHECKERR(*codec != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  14.2k|    do {                        \
  |  |   46|  14.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 14.2k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  14.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 14.2k]
  |  |  ------------------
  ------------------
 1280|  14.2k|    return AVIF_RESULT_OK;
 1281|  14.2k|}
avifGainMapCreate:
 1321|    227|{
 1322|    227|    avifGainMap * gainMap = (avifGainMap *)avifAlloc(sizeof(avifGainMap));
 1323|    227|    if (!gainMap) {
  ------------------
  |  Branch (1323:9): [True: 0, False: 227]
  ------------------
 1324|      0|        return NULL;
 1325|      0|    }
 1326|    227|    avifGainMapSetDefaults(gainMap);
 1327|       |    // Note that some functions like avifDecoderFindGainMapItem() allocate avifGainMap directly on
 1328|       |    // the stack instead of calling avifGainMapCreate() to simplify error handling. This works under
 1329|       |    // the assumption that no complex initialization (such as dynamic allocation of fields) takes
 1330|       |    // place here. If this function becomes more complex than one alloc + setDefaults, such code
 1331|       |    // might need to be changed.
 1332|    227|    return gainMap;
 1333|    227|}
avifGainMapSetDefaults:
 1336|  1.58k|{
 1337|  1.58k|    memset(gainMap, 0, sizeof(avifGainMap));
 1338|  1.58k|    gainMap->altColorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
 1339|  1.58k|    gainMap->altTransferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
 1340|  1.58k|    gainMap->altMatrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
 1341|  1.58k|    gainMap->altYUVRange = AVIF_RANGE_FULL;
 1342|  1.58k|    gainMap->useBaseColorSpace = AVIF_TRUE;
  ------------------
  |  |   88|  1.58k|#define AVIF_TRUE 1
  ------------------
 1343|       |    // Set all denominators to valid values (1).
 1344|  6.34k|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (1344:21): [True: 4.76k, False: 1.58k]
  ------------------
 1345|  4.76k|        gainMap->gainMapMin[i].d = 1;
 1346|  4.76k|        gainMap->gainMapMax[i].d = 1;
 1347|  4.76k|        gainMap->gainMapGamma[i].n = 1;
 1348|  4.76k|        gainMap->gainMapGamma[i].d = 1;
 1349|  4.76k|        gainMap->baseOffset[i].d = 1;
 1350|  4.76k|        gainMap->alternateOffset[i].d = 1;
 1351|  4.76k|    }
 1352|  1.58k|    gainMap->baseHdrHeadroom.d = 1;
 1353|  1.58k|    gainMap->alternateHdrHeadroom.d = 1;
 1354|  1.58k|}
avifGainMapDestroy:
 1357|    227|{
 1358|    227|    if (gainMap->image) {
  ------------------
  |  Branch (1358:9): [True: 192, False: 35]
  ------------------
 1359|    192|        avifImageDestroy(gainMap->image);
 1360|    192|    }
 1361|    227|    avifRWDataFree(&gainMap->altICC);
 1362|    227|    avifFree(gainMap);
 1363|    227|}
avif.c:avifImageCopyProperties:
  228|  4.19k|{
  229|  4.19k|    for (size_t i = 0; i < dstImage->numProperties; ++i) {
  ------------------
  |  Branch (229:24): [True: 0, False: 4.19k]
  ------------------
  230|      0|        avifRWDataFree(&dstImage->properties[i].boxPayload);
  231|      0|    }
  232|  4.19k|    avifFree(dstImage->properties);
  233|  4.19k|    dstImage->properties = NULL;
  234|  4.19k|    dstImage->numProperties = 0;
  235|       |
  236|  4.19k|    if (srcImage->numProperties != 0) {
  ------------------
  |  Branch (236:9): [True: 2.66k, False: 1.52k]
  ------------------
  237|  2.66k|        dstImage->properties = (avifImageItemProperty *)avifCalloc(srcImage->numProperties, sizeof(srcImage->properties[0]));
  238|  2.66k|        AVIF_CHECKERR(dstImage->properties != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  2.66k|    do {                        \
  |  |   46|  2.66k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 2.66k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  2.66k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2.66k]
  |  |  ------------------
  ------------------
  239|  2.66k|        dstImage->numProperties = srcImage->numProperties;
  240|  5.86k|        for (size_t i = 0; i < srcImage->numProperties; ++i) {
  ------------------
  |  Branch (240:28): [True: 3.19k, False: 2.66k]
  ------------------
  241|  3.19k|            memcpy(dstImage->properties[i].boxtype, srcImage->properties[i].boxtype, sizeof(srcImage->properties[i].boxtype));
  242|  3.19k|            memcpy(dstImage->properties[i].usertype, srcImage->properties[i].usertype, sizeof(srcImage->properties[i].usertype));
  243|  3.19k|            AVIF_CHECKRES(avifRWDataSet(&dstImage->properties[i].boxPayload,
  ------------------
  |  |   54|  3.19k|    do {                                  \
  |  |   55|  3.19k|        const avifResult result__ = (A);  \
  |  |   56|  3.19k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 3.19k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  3.19k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 3.19k]
  |  |  ------------------
  ------------------
  244|  3.19k|                                        srcImage->properties[i].boxPayload.data,
  245|  3.19k|                                        srcImage->properties[i].boxPayload.size));
  246|  3.19k|        }
  247|  2.66k|    }
  248|  4.19k|    return AVIF_RESULT_OK;
  249|  4.19k|}
avif.c:calcCenter:
  753|    468|{
  754|    468|    avifFraction f;
  755|    468|    f.n = dim >> 1;
  756|    468|    f.d = 1;
  757|    468|    if ((dim % 2) != 0) {
  ------------------
  |  Branch (757:9): [True: 27, False: 441]
  ------------------
  758|     27|        f.n = dim;
  759|     27|        f.d = 2;
  760|     27|    }
  761|    468|    return f;
  762|    468|}
avif.c:avifCropRectIsValid:
  770|    129|{
  771|    129|    if ((cropRect->width == 0) || (cropRect->height == 0)) {
  ------------------
  |  Branch (771:9): [True: 0, False: 129]
  |  Branch (771:35): [True: 0, False: 129]
  ------------------
  772|      0|        avifDiagnosticsPrintf(diag, "[Strict] crop rect width and height must be nonzero");
  773|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  774|      0|    }
  775|    129|    if ((cropRect->x > (UINT32_MAX - cropRect->width)) || ((cropRect->x + cropRect->width) > imageW) ||
  ------------------
  |  Branch (775:9): [True: 0, False: 129]
  |  Branch (775:59): [True: 4, False: 125]
  ------------------
  776|    125|        (cropRect->y > (UINT32_MAX - cropRect->height)) || ((cropRect->y + cropRect->height) > imageH)) {
  ------------------
  |  Branch (776:9): [True: 0, False: 125]
  |  Branch (776:60): [True: 0, False: 125]
  ------------------
  777|      4|        avifDiagnosticsPrintf(diag, "[Strict] crop rect is out of the image's bounds");
  778|      4|        return AVIF_FALSE;
  ------------------
  |  |   89|      4|#define AVIF_FALSE 0
  ------------------
  779|      4|    }
  780|    125|    return AVIF_TRUE;
  ------------------
  |  |   88|    125|#define AVIF_TRUE 1
  ------------------
  781|    129|}
avif.c:findAvailableCodec:
 1228|  28.4k|{
 1229|  28.4k|    for (int i = 0; i < availableCodecsCount; ++i) {
  ------------------
  |  Branch (1229:21): [True: 28.4k, False: 0]
  ------------------
 1230|  28.4k|        if ((choice != AVIF_CODEC_CHOICE_AUTO) && (availableCodecs[i].choice != choice)) {
  ------------------
  |  Branch (1230:13): [True: 0, False: 28.4k]
  |  Branch (1230:51): [True: 0, False: 0]
  ------------------
 1231|      0|            continue;
 1232|      0|        }
 1233|  28.4k|        if (requiredFlags && ((availableCodecs[i].flags & requiredFlags) != requiredFlags)) {
  ------------------
  |  Branch (1233:13): [True: 28.4k, False: 0]
  |  Branch (1233:30): [True: 0, False: 28.4k]
  ------------------
 1234|      0|            continue;
 1235|      0|        }
 1236|  28.4k|        if ((choice == AVIF_CODEC_CHOICE_AUTO) && (availableCodecs[i].choice == AVIF_CODEC_CHOICE_AVM)) {
  ------------------
  |  Branch (1236:13): [True: 28.4k, False: 0]
  |  Branch (1236:51): [True: 0, False: 28.4k]
  ------------------
 1237|       |            // AV2 is experimental and cannot be the default, it must be explicitly selected.
 1238|      0|            continue;
 1239|      0|        }
 1240|  28.4k|        return &availableCodecs[i];
 1241|  28.4k|    }
 1242|      0|    return NULL;
 1243|  28.4k|}

avifCodecCreateDav1d:
  234|  14.2k|{
  235|  14.2k|    avifCodec * codec = (avifCodec *)avifCalloc(1, sizeof(avifCodec));
  236|  14.2k|    if (codec == NULL) {
  ------------------
  |  Branch (236:9): [True: 0, False: 14.2k]
  ------------------
  237|      0|        return NULL;
  238|      0|    }
  239|  14.2k|    codec->getNextImage = dav1dCodecGetNextImage;
  240|  14.2k|    codec->destroyInternal = dav1dCodecDestroyInternal;
  241|       |
  242|  14.2k|    codec->internal = (struct avifCodecInternal *)avifCalloc(1, sizeof(struct avifCodecInternal));
  243|  14.2k|    if (codec->internal == NULL) {
  ------------------
  |  Branch (243:9): [True: 0, False: 14.2k]
  ------------------
  244|      0|        avifFree(codec);
  245|      0|        return NULL;
  246|      0|    }
  247|  14.2k|    return codec;
  248|  14.2k|}
codec_dav1d.c:dav1dCodecGetNextImage:
   63|  16.0k|{
   64|  16.0k|    if (codec->internal->dav1dContext == NULL) {
  ------------------
  |  Branch (64:9): [True: 14.0k, False: 2.00k]
  ------------------
   65|  14.0k|        Dav1dSettings dav1dSettings;
   66|  14.0k|        dav1d_default_settings(&dav1dSettings);
   67|       |        // Give all available threads to decode a single frame as fast as possible
   68|  14.0k|#if DAV1D_API_VERSION_MAJOR >= 6
   69|  14.0k|        dav1dSettings.max_frame_delay = 1;
   70|  14.0k|        dav1dSettings.n_threads = AVIF_CLAMP(codec->maxThreads, 1, DAV1D_MAX_THREADS);
  ------------------
  |  |   18|  14.0k|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  ------------------
  |  |  |  Branch (18:35): [True: 0, False: 14.0k]
  |  |  |  Branch (18:60): [True: 0, False: 14.0k]
  |  |  ------------------
  ------------------
   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|  14.0k|        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: 14.0k]
  ------------------
   80|  14.0k|        dav1dSettings.logger.cookie = codec;
   81|  14.0k|        dav1dSettings.logger.callback = avifDav1dLogCallback;
   82|  14.0k|        dav1dSettings.operating_point = codec->operatingPoint;
   83|  14.0k|        dav1dSettings.all_layers = codec->allLayers;
   84|       |
   85|  14.0k|        if (dav1d_open(&codec->internal->dav1dContext, &dav1dSettings) != 0) {
  ------------------
  |  Branch (85:13): [True: 0, False: 14.0k]
  ------------------
   86|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
   87|      0|        }
   88|  14.0k|    }
   89|       |
   90|  16.0k|    avifBool gotPicture = AVIF_FALSE;
  ------------------
  |  |   89|  16.0k|#define AVIF_FALSE 0
  ------------------
   91|  16.0k|    Dav1dPicture nextFrame;
   92|  16.0k|    memset(&nextFrame, 0, sizeof(Dav1dPicture));
   93|       |
   94|  16.0k|    Dav1dData dav1dData;
   95|  16.0k|    if (dav1d_data_wrap(&dav1dData, sample->data.data, sample->data.size, avifDav1dFreeCallback, NULL) != 0) {
  ------------------
  |  Branch (95:9): [True: 0, False: 16.0k]
  ------------------
   96|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
   97|      0|    }
   98|       |
   99|  16.0k|    int res;
  100|  16.0k|    for (;;) {
  101|  16.0k|        if (dav1dData.data) {
  ------------------
  |  Branch (101:13): [True: 16.0k, False: 0]
  ------------------
  102|  16.0k|            res = dav1d_send_data(codec->internal->dav1dContext, &dav1dData);
  103|  16.0k|            if ((res < 0) && (res != DAV1D_ERR(EAGAIN))) {
  ------------------
  |  Branch (103:17): [True: 4.01k, False: 11.9k]
  |  Branch (103:30): [True: 4.01k, False: 0]
  ------------------
  104|  4.01k|                dav1d_data_unref(&dav1dData);
  105|  4.01k|                return AVIF_FALSE;
  ------------------
  |  |   89|  4.01k|#define AVIF_FALSE 0
  ------------------
  106|  4.01k|            }
  107|  16.0k|        }
  108|       |
  109|  11.9k|        res = dav1d_get_picture(codec->internal->dav1dContext, &nextFrame);
  110|  11.9k|        if (res == DAV1D_ERR(EAGAIN)) {
  ------------------
  |  Branch (110:13): [True: 219, False: 11.7k]
  ------------------
  111|    219|            if (dav1dData.data) {
  ------------------
  |  Branch (111:17): [True: 0, False: 219]
  ------------------
  112|       |                // send more data
  113|      0|                continue;
  114|      0|            }
  115|    219|            return AVIF_FALSE;
  ------------------
  |  |   89|    219|#define AVIF_FALSE 0
  ------------------
  116|  11.7k|        } else if (res < 0) {
  ------------------
  |  Branch (116:20): [True: 0, False: 11.7k]
  ------------------
  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|  11.7k|        } else {
  123|       |            // Got a picture!
  124|  11.7k|            if ((sample->spatialID != AVIF_SPATIAL_ID_UNSET) && (sample->spatialID != nextFrame.frame_hdr->spatial_id)) {
  ------------------
  |  |  468|  11.7k|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  |  Branch (124:17): [True: 0, False: 11.7k]
  |  Branch (124:65): [True: 0, False: 0]
  ------------------
  125|       |                // Layer selection: skip this unwanted layer
  126|      0|                dav1d_picture_unref(&nextFrame);
  127|  11.7k|            } else {
  128|  11.7k|                gotPicture = AVIF_TRUE;
  ------------------
  |  |   88|  11.7k|#define AVIF_TRUE 1
  ------------------
  129|  11.7k|                break;
  130|  11.7k|            }
  131|  11.7k|        }
  132|  11.9k|    }
  133|  11.7k|    if (dav1dData.data) {
  ------------------
  |  Branch (133:9): [True: 0, False: 11.7k]
  ------------------
  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|  11.7k|    Dav1dPicture bufferedFrame;
  143|  11.7k|    memset(&bufferedFrame, 0, sizeof(Dav1dPicture));
  144|  13.7k|    do {
  145|  13.7k|        res = dav1d_get_picture(codec->internal->dav1dContext, &bufferedFrame);
  146|  13.7k|        if (res < 0) {
  ------------------
  |  Branch (146:13): [True: 11.7k, False: 2.00k]
  ------------------
  147|  11.7k|            if (res != DAV1D_ERR(EAGAIN)) {
  ------------------
  |  Branch (147:17): [True: 1.66k, False: 10.1k]
  ------------------
  148|  1.66k|                if (gotPicture) {
  ------------------
  |  Branch (148:21): [True: 1.66k, False: 0]
  ------------------
  149|  1.66k|                    dav1d_picture_unref(&nextFrame);
  150|  1.66k|                }
  151|  1.66k|                return AVIF_FALSE;
  ------------------
  |  |   89|  1.66k|#define AVIF_FALSE 0
  ------------------
  152|  1.66k|            }
  153|  11.7k|        } else {
  154|  2.00k|            dav1d_picture_unref(&bufferedFrame);
  155|  2.00k|        }
  156|  13.7k|    } while (res == 0);
  ------------------
  |  Branch (156:14): [True: 2.00k, False: 10.1k]
  ------------------
  157|       |
  158|  10.1k|    if (gotPicture) {
  ------------------
  |  Branch (158:9): [True: 10.1k, False: 0]
  ------------------
  159|  10.1k|        dav1d_picture_unref(&codec->internal->dav1dPicture);
  160|  10.1k|        codec->internal->dav1dPicture = nextFrame;
  161|  10.1k|        codec->internal->colorRange = codec->internal->dav1dPicture.seq_hdr->color_range ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED;
  ------------------
  |  Branch (161:39): [True: 4.40k, False: 5.70k]
  ------------------
  162|  10.1k|        codec->internal->hasPicture = AVIF_TRUE;
  ------------------
  |  |   88|  10.1k|#define AVIF_TRUE 1
  ------------------
  163|  10.1k|    } 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|  10.1k|    Dav1dPicture * dav1dImage = &codec->internal->dav1dPicture;
  172|  10.1k|    avifBool isColor = !alpha;
  173|  10.1k|    if (isColor) {
  ------------------
  |  Branch (173:9): [True: 9.23k, False: 873]
  ------------------
  174|       |        // Color (YUV) planes - set image to correct size / format, fill color
  175|       |
  176|  9.23k|        avifPixelFormat yuvFormat = AVIF_PIXEL_FORMAT_NONE;
  177|  9.23k|        switch (dav1dImage->p.layout) {
  ------------------
  |  Branch (177:17): [True: 9.23k, False: 0]
  ------------------
  178|  1.97k|            case DAV1D_PIXEL_LAYOUT_I400:
  ------------------
  |  Branch (178:13): [True: 1.97k, False: 7.26k]
  ------------------
  179|  1.97k|                yuvFormat = AVIF_PIXEL_FORMAT_YUV400;
  180|  1.97k|                break;
  181|  2.32k|            case DAV1D_PIXEL_LAYOUT_I420:
  ------------------
  |  Branch (181:13): [True: 2.32k, False: 6.91k]
  ------------------
  182|  2.32k|                yuvFormat = AVIF_PIXEL_FORMAT_YUV420;
  183|  2.32k|                break;
  184|    430|            case DAV1D_PIXEL_LAYOUT_I422:
  ------------------
  |  Branch (184:13): [True: 430, False: 8.80k]
  ------------------
  185|    430|                yuvFormat = AVIF_PIXEL_FORMAT_YUV422;
  186|    430|                break;
  187|  4.51k|            case DAV1D_PIXEL_LAYOUT_I444:
  ------------------
  |  Branch (187:13): [True: 4.51k, False: 4.72k]
  ------------------
  188|  4.51k|                yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  189|  4.51k|                break;
  190|  9.23k|        }
  191|       |
  192|  9.23k|        image->width = dav1dImage->p.w;
  193|  9.23k|        image->height = dav1dImage->p.h;
  194|  9.23k|        image->depth = dav1dImage->p.bpc;
  195|       |
  196|  9.23k|        image->yuvFormat = yuvFormat;
  197|  9.23k|        image->yuvRange = codec->internal->colorRange;
  198|  9.23k|        image->yuvChromaSamplePosition = (avifChromaSamplePosition)dav1dImage->seq_hdr->chr;
  199|       |
  200|  9.23k|        image->colorPrimaries = (avifColorPrimaries)dav1dImage->seq_hdr->pri;
  201|  9.23k|        image->transferCharacteristics = (avifTransferCharacteristics)dav1dImage->seq_hdr->trc;
  202|  9.23k|        image->matrixCoefficients = (avifMatrixCoefficients)dav1dImage->seq_hdr->mtrx;
  203|       |
  204|       |        // Steal the pointers from the decoder's image directly
  205|  9.23k|        avifImageFreePlanes(image, AVIF_PLANES_YUV);
  206|  9.23k|        int yuvPlaneCount = (yuvFormat == AVIF_PIXEL_FORMAT_YUV400) ? 1 : 3;
  ------------------
  |  Branch (206:29): [True: 1.97k, False: 7.26k]
  ------------------
  207|  33.0k|        for (int yuvPlane = 0; yuvPlane < yuvPlaneCount; ++yuvPlane) {
  ------------------
  |  Branch (207:32): [True: 23.7k, False: 9.23k]
  ------------------
  208|  23.7k|            image->yuvPlanes[yuvPlane] = dav1dImage->data[yuvPlane];
  209|  23.7k|            image->yuvRowBytes[yuvPlane] = (uint32_t)dav1dImage->stride[(yuvPlane == AVIF_CHAN_Y) ? 0 : 1];
  ------------------
  |  Branch (209:73): [True: 9.23k, False: 14.5k]
  ------------------
  210|  23.7k|        }
  211|  9.23k|        image->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  9.23k|#define AVIF_FALSE 0
  ------------------
  212|  9.23k|    } else {
  213|       |        // Alpha plane - set image to correct size, fill alpha
  214|       |
  215|    873|        image->width = dav1dImage->p.w;
  216|    873|        image->height = dav1dImage->p.h;
  217|    873|        image->depth = dav1dImage->p.bpc;
  218|       |
  219|    873|        avifImageFreePlanes(image, AVIF_PLANES_A);
  220|    873|        image->alphaPlane = dav1dImage->data[0];
  221|    873|        image->alphaRowBytes = (uint32_t)dav1dImage->stride[0];
  222|    873|        *isLimitedRangeAlpha = (codec->internal->colorRange == AVIF_RANGE_LIMITED);
  223|    873|        image->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|    873|#define AVIF_FALSE 0
  ------------------
  224|    873|    }
  225|  10.1k|    return AVIF_TRUE;
  ------------------
  |  |   88|  10.1k|#define AVIF_TRUE 1
  ------------------
  226|  10.1k|}
codec_dav1d.c:avifDav1dLogCallback:
   42|  7.19k|{
   43|  7.19k|    avifCodec * codec = (avifCodec *)cookie;
   44|  7.19k|    vsnprintf(codec->diag->error, AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE, format, ap);
  ------------------
  |  |   91|  7.19k|#define AVIF_DIAGNOSTICS_ERROR_BUFFER_SIZE 256
  ------------------
   45|  7.19k|}
codec_dav1d.c:avifDav1dFreeCallback:
   35|  16.0k|{
   36|       |    // This data is owned by the decoder; nothing to free here
   37|  16.0k|    (void)buf;
   38|  16.0k|    (void)cookie;
   39|  16.0k|}
codec_dav1d.c:dav1dCodecDestroyInternal:
   48|  14.2k|{
   49|  14.2k|    if (codec->internal->hasPicture) {
  ------------------
  |  Branch (49:9): [True: 8.21k, False: 6.00k]
  ------------------
   50|  8.21k|        dav1d_picture_unref(&codec->internal->dav1dPicture);
   51|  8.21k|    }
   52|  14.2k|    if (codec->internal->dav1dContext) {
  ------------------
  |  Branch (52:9): [True: 14.0k, False: 214]
  ------------------
   53|  14.0k|        dav1d_close(&codec->internal->dav1dContext);
   54|  14.0k|    }
   55|  14.2k|    avifFree(codec->internal);
   56|  14.2k|}

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

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

avifGainMapValidateMetadata:
  442|    257|{
  443|    968|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (443:21): [True: 738, False: 230]
  ------------------
  444|    738|        if (gainMap->gainMapMin[i].d == 0 || gainMap->gainMapMax[i].d == 0 || gainMap->gainMapGamma[i].d == 0 ||
  ------------------
  |  Branch (444:13): [True: 3, False: 735]
  |  Branch (444:46): [True: 4, False: 731]
  |  Branch (444:79): [True: 3, False: 728]
  ------------------
  445|    728|            gainMap->baseOffset[i].d == 0 || gainMap->alternateOffset[i].d == 0) {
  ------------------
  |  Branch (445:13): [True: 3, False: 725]
  |  Branch (445:46): [True: 3, False: 722]
  ------------------
  446|     16|            avifDiagnosticsPrintf(diag, "Per-channel denominator is 0 in gain map metadata");
  447|     16|            return AVIF_RESULT_INVALID_ARGUMENT;
  448|     16|        }
  449|    722|        if ((int64_t)gainMap->gainMapMax[i].n * gainMap->gainMapMin[i].d <
  ------------------
  |  Branch (449:13): [True: 8, False: 714]
  ------------------
  450|    722|            (int64_t)gainMap->gainMapMin[i].n * gainMap->gainMapMax[i].d) {
  451|      8|            avifDiagnosticsPrintf(diag, "Per-channel max is less than per-channel min in gain map metadata");
  452|      8|            return AVIF_RESULT_INVALID_ARGUMENT;
  453|      8|        }
  454|    714|        if (gainMap->gainMapGamma[i].n == 0) {
  ------------------
  |  Branch (454:13): [True: 3, False: 711]
  ------------------
  455|      3|            avifDiagnosticsPrintf(diag, "Per-channel gamma is 0 in gain map metadata");
  456|      3|            return AVIF_RESULT_INVALID_ARGUMENT;
  457|      3|        }
  458|    714|    }
  459|    230|    if (gainMap->baseHdrHeadroom.d == 0 || gainMap->alternateHdrHeadroom.d == 0) {
  ------------------
  |  Branch (459:9): [True: 3, False: 227]
  |  Branch (459:44): [True: 4, False: 223]
  ------------------
  460|      7|        avifDiagnosticsPrintf(diag, "Headroom denominator is 0 in gain map metadata");
  461|      7|        return AVIF_RESULT_INVALID_ARGUMENT;
  462|      7|    }
  463|    223|    if (gainMap->useBaseColorSpace != 0 && gainMap->useBaseColorSpace != 1) {
  ------------------
  |  Branch (463:9): [True: 40, False: 183]
  |  Branch (463:44): [True: 0, False: 40]
  ------------------
  464|      0|        avifDiagnosticsPrintf(diag, "useBaseColorSpace is %d in gain map metadata", gainMap->useBaseColorSpace);
  465|      0|        return AVIF_RESULT_INVALID_ARGUMENT;
  466|      0|    }
  467|    223|    return AVIF_RESULT_OK;
  468|    223|}

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

avifAlloc:
    9|  27.9M|{
   10|       |    // malloc(0) is implementation-defined (see
   11|       |    // https://en.cppreference.com/w/cpp/memory/c/malloc), so collapse the
   12|       |    // zero-size case to a deterministic NULL return. Callers must either treat
   13|       |    // 0 as an allocation failure or guard against it before calling.
   14|  27.9M|    if (size == 0) {
  ------------------
  |  Branch (14:9): [True: 0, False: 27.9M]
  ------------------
   15|      0|        return NULL;
   16|      0|    }
   17|  27.9M|    return malloc(size);
   18|  27.9M|}
avifCalloc:
   21|  31.1k|{
   22|  31.1k|    return calloc(count, size);
   23|  31.1k|}
avifFree:
   26|  34.7M|{
   27|  34.7M|    free(p);
   28|  34.7M|}

avifSequenceHeaderParse:
  713|   396k|{
  714|   396k|    switch (codecType) {
  715|   396k|        case AVIF_CODEC_TYPE_AV1:
  ------------------
  |  Branch (715:9): [True: 396k, False: 0]
  ------------------
  716|   396k|            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: 396k]
  ------------------
  722|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  723|   396k|    }
  724|   396k|}
obu.c:av1SequenceHeaderParse:
  597|   396k|{
  598|   396k|    avifROData obus = *sample;
  599|       |
  600|       |    // Find the sequence header OBU
  601|   530k|    while (obus.size > 0) {
  ------------------
  |  Branch (601:12): [True: 530k, False: 373]
  ------------------
  602|   530k|        avifBits bits;
  603|   530k|        avifBitsInit(&bits, obus.data, obus.size);
  604|       |
  605|       |        // obu_header()
  606|   530k|        const uint32_t obu_forbidden_bit = avifBitsRead(&bits, 1);
  607|   530k|        if (obu_forbidden_bit != 0) {
  ------------------
  |  Branch (607:13): [True: 371k, False: 158k]
  ------------------
  608|   371k|            return AVIF_FALSE;
  ------------------
  |  |   89|   371k|#define AVIF_FALSE 0
  ------------------
  609|   371k|        }
  610|   158k|        const uint32_t obu_type = avifBitsRead(&bits, 4);
  611|   158k|        const uint32_t obu_extension_flag = avifBitsRead(&bits, 1);
  612|   158k|        const uint32_t obu_has_size_field = avifBitsRead(&bits, 1);
  613|   158k|        avifBitsRead(&bits, 1); // obu_reserved_1bit
  614|       |
  615|   158k|        if (obu_extension_flag) {   // obu_extension_header()
  ------------------
  |  Branch (615:13): [True: 40.5k, False: 118k]
  ------------------
  616|  40.5k|            avifBitsRead(&bits, 8); // temporal_id, spatial_id, extension_header_reserved_3bits
  617|  40.5k|        }
  618|       |
  619|   158k|        uint32_t obu_size = 0;
  620|   158k|        if (obu_has_size_field)
  ------------------
  |  Branch (620:13): [True: 158k, False: 384]
  ------------------
  621|   158k|            obu_size = avifBitsReadUleb128(&bits);
  622|    384|        else
  623|    384|            obu_size = (int)obus.size - 1 - obu_extension_flag;
  624|       |
  625|   158k|        if (bits.error) {
  ------------------
  |  Branch (625:13): [True: 1.99k, False: 156k]
  ------------------
  626|  1.99k|            return AVIF_FALSE;
  ------------------
  |  |   89|  1.99k|#define AVIF_FALSE 0
  ------------------
  627|  1.99k|        }
  628|       |
  629|   156k|        const uint32_t init_bit_pos = avifBitsReadPos(&bits);
  630|   156k|        const uint32_t init_byte_pos = init_bit_pos >> 3;
  631|   156k|        if (obu_size > obus.size - init_byte_pos)
  ------------------
  |  Branch (631:13): [True: 5.47k, False: 151k]
  ------------------
  632|  5.47k|            return AVIF_FALSE;
  ------------------
  |  |   89|  5.47k|#define AVIF_FALSE 0
  ------------------
  633|       |
  634|   151k|        if (obu_type == 1) { // Sequence Header
  ------------------
  |  Branch (634:13): [True: 16.3k, False: 134k]
  ------------------
  635|  16.3k|            avifBits seqHdrBits;
  636|  16.3k|            avifBitsInit(&seqHdrBits, obus.data + init_byte_pos, obu_size);
  637|  16.3k|            return parseAV1SequenceHeader(&seqHdrBits, header);
  638|  16.3k|        }
  639|       |
  640|       |        // Skip this OBU
  641|   134k|        obus.data += (size_t)obu_size + init_byte_pos;
  642|   134k|        obus.size -= (size_t)obu_size + init_byte_pos;
  643|   134k|    }
  644|    373|    return AVIF_FALSE;
  ------------------
  |  |   89|    373|#define AVIF_FALSE 0
  ------------------
  645|   396k|}
obu.c:avifBitsInit:
   63|   546k|{
   64|   546k|    bits->ptr = bits->start = data;
   65|   546k|    bits->end = &bits->start[size];
   66|   546k|    bits->bitsLeft = 0;
   67|   546k|    bits->state = 0;
   68|   546k|    bits->error = 0;
   69|   546k|    bits->eof = (size == 0);
   70|   546k|}
obu.c:avifBitsRead:
   89|  1.88M|{
   90|  1.88M|    if (n > bits->bitsLeft)
  ------------------
  |  Branch (90:9): [True: 961k, False: 927k]
  ------------------
   91|   961k|        avifBitsRefill(bits, n);
   92|       |
   93|  1.88M|    const uint64_t state = bits->state;
   94|  1.88M|    bits->bitsLeft -= n;
   95|  1.88M|    bits->state <<= n;
   96|       |
   97|  1.88M|    return (uint32_t)(state >> (64 - n));
   98|  1.88M|}
obu.c:avifBitsRefill:
   73|   961k|{
   74|   961k|    uint64_t state = 0;
   75|  1.02M|    do {
   76|  1.02M|        state <<= 8;
   77|  1.02M|        bits->bitsLeft += 8;
   78|  1.02M|        if (!bits->eof)
  ------------------
  |  Branch (78:13): [True: 974k, False: 48.2k]
  ------------------
   79|   974k|            state |= *bits->ptr++;
   80|  1.02M|        if (bits->ptr >= bits->end) {
  ------------------
  |  Branch (80:13): [True: 59.7k, False: 962k]
  ------------------
   81|  59.7k|            bits->error = bits->eof;
   82|  59.7k|            bits->eof = 1;
   83|  59.7k|        }
   84|  1.02M|    } while (n > bits->bitsLeft);
  ------------------
  |  Branch (84:14): [True: 60.5k, False: 961k]
  ------------------
   85|   961k|    bits->state |= state << (64 - bits->bitsLeft);
   86|   961k|}
obu.c:avifBitsReadUleb128:
  101|   158k|{
  102|   158k|    uint64_t val = 0;
  103|   158k|    uint32_t more;
  104|   158k|    uint32_t i = 0;
  105|       |
  106|   171k|    do {
  107|   171k|        const uint32_t v = avifBitsRead(bits, 8);
  108|   171k|        more = v & 0x80;
  109|   171k|        val |= ((uint64_t)(v & 0x7F)) << i;
  110|   171k|        i += 7;
  111|   171k|    } while (more && i < 56);
  ------------------
  |  Branch (111:14): [True: 13.8k, False: 158k]
  |  Branch (111:22): [True: 13.7k, False: 91]
  ------------------
  112|       |
  113|   158k|    if (val > UINT32_MAX || more) {
  ------------------
  |  Branch (113:9): [True: 380, False: 157k]
  |  Branch (113:29): [True: 1, False: 157k]
  ------------------
  114|    381|        bits->error = 1;
  115|    381|        return 0;
  116|    381|    }
  117|       |
  118|   157k|    return (uint32_t)val;
  119|   158k|}
obu.c:avifBitsReadPos:
   58|   156k|{
   59|   156k|    return (uint32_t)(bits->ptr - bits->start) * 8 - bits->bitsLeft;
   60|   156k|}
obu.c:parseAV1SequenceHeader:
  446|  16.3k|{
  447|  16.3k|    AVIF_CHECK(parseAV1SequenceHeaderProfile(bits, header));
  ------------------
  |  |   36|  16.3k|    do {                        \
  |  |   37|  16.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 206, False: 16.1k]
  |  |  ------------------
  |  |   38|    206|            avifBreakOnError(); \
  |  |   39|    206|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    206|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    206|        }                       \
  |  |   41|  16.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  448|  16.1k|    AVIF_CHECK(parseSequenceHeaderLevelIdxAndTier(bits, header));
  ------------------
  |  |   36|  16.1k|    do {                        \
  |  |   37|  16.1k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2.27k, False: 13.8k]
  |  |  ------------------
  |  |   38|  2.27k|            avifBreakOnError(); \
  |  |   39|  2.27k|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|  2.27k|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|  2.27k|        }                       \
  |  |   41|  16.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 13.8k]
  |  |  ------------------
  ------------------
  449|       |
  450|  13.8k|    AVIF_CHECK(parseSequenceHeaderFrameMaxDimensions(bits, header));
  ------------------
  |  |   36|  13.8k|    do {                        \
  |  |   37|  13.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 572, False: 13.3k]
  |  |  ------------------
  |  |   38|    572|            avifBreakOnError(); \
  |  |   39|    572|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    572|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    572|        }                       \
  |  |   41|  13.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 13.3k]
  |  |  ------------------
  ------------------
  451|  13.3k|    avifBitsRead(bits, 1); // use_128x128_superblock
  452|  13.3k|    AVIF_CHECK(parseSequenceHeaderEnabledFeatures(bits, header));
  ------------------
  |  |   36|  13.3k|    do {                        \
  |  |   37|  13.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 712, False: 12.6k]
  |  |  ------------------
  |  |   38|    712|            avifBreakOnError(); \
  |  |   39|    712|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    712|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    712|        }                       \
  |  |   41|  13.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.6k]
  |  |  ------------------
  ------------------
  453|       |
  454|  12.6k|    avifBitsRead(bits, 3); // enable_superres, enable_cdef, enable_restoration
  455|       |
  456|  12.6k|    AVIF_CHECK(parseAV1SequenceHeaderColorConfig(bits, header));
  ------------------
  |  |   36|  12.6k|    do {                        \
  |  |   37|  12.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1.80k, False: 10.8k]
  |  |  ------------------
  |  |   38|  1.80k|            avifBreakOnError(); \
  |  |   39|  1.80k|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|  1.80k|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|  1.80k|        }                       \
  |  |   41|  12.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  457|  10.8k|    if (!header->av1C.monochrome) {
  ------------------
  |  Branch (457:9): [True: 7.97k, False: 2.82k]
  ------------------
  458|  7.97k|        avifBitsRead(bits, 1); // separate_uv_delta_q
  459|  7.97k|    }
  460|       |
  461|  10.8k|    avifBitsRead(bits, 1); // film_grain_params_present
  462|  10.8k|    return !bits->error;
  463|  12.6k|}
obu.c:parseAV1SequenceHeaderProfile:
  153|  16.3k|{
  154|  16.3k|    uint32_t seq_profile = avifBitsRead(bits, 3);
  155|  16.3k|    if (seq_profile > 2) {
  ------------------
  |  Branch (155:9): [True: 140, False: 16.2k]
  ------------------
  156|    140|        return AVIF_FALSE;
  ------------------
  |  |   89|    140|#define AVIF_FALSE 0
  ------------------
  157|    140|    }
  158|  16.2k|    header->av1C.seqProfile = (uint8_t)seq_profile;
  159|  16.2k|    return !bits->error;
  160|  16.3k|}
obu.c:parseSequenceHeaderLevelIdxAndTier:
  175|  16.1k|{
  176|  16.1k|    uint32_t still_picture = avifBitsRead(bits, 1);
  177|  16.1k|    header->reduced_still_picture_header = (uint8_t)avifBitsRead(bits, 1);
  178|  16.1k|    if (header->reduced_still_picture_header && !still_picture) {
  ------------------
  |  Branch (178:9): [True: 8.19k, False: 7.97k]
  |  Branch (178:49): [True: 66, False: 8.12k]
  ------------------
  179|     66|        return AVIF_FALSE;
  ------------------
  |  |   89|     66|#define AVIF_FALSE 0
  ------------------
  180|     66|    }
  181|       |
  182|  16.1k|    if (header->reduced_still_picture_header) {
  ------------------
  |  Branch (182:9): [True: 8.12k, False: 7.97k]
  ------------------
  183|  8.12k|        header->av1C.seqLevelIdx0 = (uint8_t)avifBitsRead(bits, 5);
  184|  8.12k|        header->av1C.seqTier0 = 0;
  185|  8.12k|    } else {
  186|  7.97k|        uint32_t timing_info_present_flag = avifBitsRead(bits, 1);
  187|  7.97k|        uint32_t decoder_model_info_present_flag = 0;
  188|  7.97k|        uint32_t buffer_delay_length = 0;
  189|  7.97k|        if (timing_info_present_flag) { // timing_info()
  ------------------
  |  Branch (189:13): [True: 2.85k, False: 5.12k]
  ------------------
  190|  2.85k|            avifBitsRead(bits, 32);     // num_units_in_display_tick
  191|  2.85k|            avifBitsRead(bits, 32);     // time_scale
  192|  2.85k|            uint32_t equal_picture_interval = avifBitsRead(bits, 1);
  193|  2.85k|            if (equal_picture_interval) {
  ------------------
  |  Branch (193:17): [True: 1.23k, False: 1.62k]
  ------------------
  194|  1.23k|                uint32_t num_ticks_per_picture_minus_1 = avifBitsReadVLC(bits);
  195|  1.23k|                if (num_ticks_per_picture_minus_1 == 0xFFFFFFFFU)
  ------------------
  |  Branch (195:21): [True: 74, False: 1.15k]
  ------------------
  196|     74|                    return AVIF_FALSE;
  ------------------
  |  |   89|     74|#define AVIF_FALSE 0
  ------------------
  197|  1.23k|            }
  198|       |
  199|  2.78k|            decoder_model_info_present_flag = avifBitsRead(bits, 1);
  200|  2.78k|            if (decoder_model_info_present_flag) { // decoder_model_info()
  ------------------
  |  Branch (200:17): [True: 1.56k, False: 1.21k]
  ------------------
  201|  1.56k|                buffer_delay_length = avifBitsRead(bits, 5) + 1;
  202|  1.56k|                avifBitsRead(bits, 32); // num_units_in_decoding_tick
  203|  1.56k|                avifBitsRead(bits, 10); // buffer_removal_time_length_minus_1, frame_presentation_time_length_minus_1
  204|  1.56k|            }
  205|  2.78k|        }
  206|       |
  207|  7.90k|        uint32_t initial_display_delay_present_flag = avifBitsRead(bits, 1);
  208|  7.90k|        uint32_t operating_points_cnt = avifBitsRead(bits, 5) + 1;
  209|  56.6k|        for (uint32_t i = 0; i < operating_points_cnt; i++) {
  ------------------
  |  Branch (209:30): [True: 48.7k, False: 7.90k]
  ------------------
  210|  48.7k|            avifBitsRead(bits, 12); // operating_point_idc
  211|  48.7k|            uint32_t seq_level_idx = avifBitsRead(bits, 5);
  212|  48.7k|            if (i == 0) {
  ------------------
  |  Branch (212:17): [True: 7.90k, False: 40.8k]
  ------------------
  213|  7.90k|                header->av1C.seqLevelIdx0 = (uint8_t)seq_level_idx;
  214|  7.90k|                header->av1C.seqTier0 = 0;
  215|  7.90k|            }
  216|  48.7k|            if (seq_level_idx > 7) {
  ------------------
  |  Branch (216:17): [True: 20.3k, False: 28.4k]
  ------------------
  217|  20.3k|                uint32_t seq_tier = avifBitsRead(bits, 1);
  218|  20.3k|                if (i == 0) {
  ------------------
  |  Branch (218:21): [True: 2.46k, False: 17.8k]
  ------------------
  219|  2.46k|                    header->av1C.seqTier0 = (uint8_t)seq_tier;
  220|  2.46k|                }
  221|  20.3k|            }
  222|  48.7k|            if (decoder_model_info_present_flag) {
  ------------------
  |  Branch (222:17): [True: 18.1k, False: 30.6k]
  ------------------
  223|  18.1k|                uint32_t decoder_model_present_for_this_op = avifBitsRead(bits, 1);
  224|  18.1k|                if (decoder_model_present_for_this_op) {     // operating_parameters_info()
  ------------------
  |  Branch (224:21): [True: 4.18k, False: 13.9k]
  ------------------
  225|  4.18k|                    avifBitsRead(bits, buffer_delay_length); // decoder_buffer_delay
  226|  4.18k|                    avifBitsRead(bits, buffer_delay_length); // encoder_buffer_delay
  227|  4.18k|                    avifBitsRead(bits, 1);                   // low_delay_mode_flag
  228|  4.18k|                }
  229|  18.1k|            }
  230|  48.7k|            if (initial_display_delay_present_flag) {
  ------------------
  |  Branch (230:17): [True: 28.3k, False: 20.4k]
  ------------------
  231|  28.3k|                uint32_t initial_display_delay_present_for_this_op = avifBitsRead(bits, 1);
  232|  28.3k|                if (initial_display_delay_present_for_this_op) {
  ------------------
  |  Branch (232:21): [True: 8.12k, False: 20.2k]
  ------------------
  233|  8.12k|                    avifBitsRead(bits, 4); // initial_display_delay_minus_1
  234|  8.12k|                }
  235|  28.3k|            }
  236|  48.7k|        }
  237|  7.90k|    }
  238|  16.0k|    return !bits->error;
  239|  16.1k|}
obu.c:avifBitsReadVLC:
  122|  1.23k|{
  123|  1.23k|    int numBits = 0;
  124|  8.59k|    while (!avifBitsRead(bits, 1))
  ------------------
  |  Branch (124:12): [True: 7.43k, False: 1.15k]
  ------------------
  125|  7.43k|        if (++numBits == 32)
  ------------------
  |  Branch (125:13): [True: 74, False: 7.36k]
  ------------------
  126|     74|            return 0xFFFFFFFFU;
  127|  1.15k|    return numBits ? ((1U << numBits) - 1) + avifBitsRead(bits, numBits) : 0;
  ------------------
  |  Branch (127:12): [True: 875, False: 284]
  ------------------
  128|  1.23k|}
obu.c:parseSequenceHeaderFrameMaxDimensions:
  242|  13.8k|{
  243|  13.8k|    uint32_t frame_width_bits = avifBitsRead(bits, 4) + 1;
  244|  13.8k|    uint32_t frame_height_bits = avifBitsRead(bits, 4) + 1;
  245|  13.8k|    header->maxWidth = avifBitsRead(bits, frame_width_bits) + 1;   // max_frame_width
  246|  13.8k|    header->maxHeight = avifBitsRead(bits, frame_height_bits) + 1; // max_frame_height
  247|  13.8k|    uint32_t frame_id_numbers_present_flag = 0;
  248|  13.8k|    if (!header->reduced_still_picture_header) {
  ------------------
  |  Branch (248:9): [True: 5.83k, False: 8.06k]
  ------------------
  249|  5.83k|        frame_id_numbers_present_flag = avifBitsRead(bits, 1);
  250|  5.83k|    }
  251|  13.8k|    if (frame_id_numbers_present_flag) {
  ------------------
  |  Branch (251:9): [True: 1.12k, False: 12.7k]
  ------------------
  252|  1.12k|        avifBitsRead(bits, 7); // delta_frame_id_length_minus_2, additional_frame_id_length_minus_1
  253|  1.12k|    }
  254|  13.8k|    return !bits->error;
  255|  13.8k|}
obu.c:parseSequenceHeaderEnabledFeatures:
  258|  13.3k|{
  259|  13.3k|    avifBitsRead(bits, 2); // enable_filter_intra, enable_intra_edge_filter
  260|       |
  261|  13.3k|    if (!header->reduced_still_picture_header) {
  ------------------
  |  Branch (261:9): [True: 5.33k, False: 7.98k]
  ------------------
  262|  5.33k|        avifBitsRead(bits, 4); // enable_interintra_compound, enable_masked_compound, enable_warped_motion, enable_dual_filter
  263|  5.33k|        uint32_t enable_order_hint = avifBitsRead(bits, 1);
  264|  5.33k|        if (enable_order_hint) {
  ------------------
  |  Branch (264:13): [True: 3.10k, False: 2.22k]
  ------------------
  265|  3.10k|            avifBitsRead(bits, 2); // enable_jnt_comp, enable_ref_frame_mvs
  266|  3.10k|        }
  267|       |
  268|  5.33k|        uint32_t seq_force_screen_content_tools = 0;
  269|  5.33k|        uint32_t seq_choose_screen_content_tools = avifBitsRead(bits, 1);
  270|  5.33k|        if (seq_choose_screen_content_tools) {
  ------------------
  |  Branch (270:13): [True: 3.00k, False: 2.32k]
  ------------------
  271|  3.00k|            seq_force_screen_content_tools = 2;
  272|  3.00k|        } else {
  273|  2.32k|            seq_force_screen_content_tools = avifBitsRead(bits, 1);
  274|  2.32k|        }
  275|  5.33k|        if (seq_force_screen_content_tools > 0) {
  ------------------
  |  Branch (275:13): [True: 4.01k, False: 1.32k]
  ------------------
  276|  4.01k|            uint32_t seq_choose_integer_mv = avifBitsRead(bits, 1);
  277|  4.01k|            if (!seq_choose_integer_mv) {
  ------------------
  |  Branch (277:17): [True: 833, False: 3.17k]
  ------------------
  278|    833|                avifBitsRead(bits, 1); // seq_force_integer_mv
  279|    833|            }
  280|  4.01k|        }
  281|  5.33k|        if (enable_order_hint) {
  ------------------
  |  Branch (281:13): [True: 3.10k, False: 2.22k]
  ------------------
  282|  3.10k|            avifBitsRead(bits, 3); // order_hint_bits_minus_1
  283|  3.10k|        }
  284|  5.33k|    }
  285|       |
  286|  13.3k|    return !bits->error;
  287|  13.3k|}
obu.c:parseAV1SequenceHeaderColorConfig:
  291|  12.6k|{
  292|  12.6k|    header->bitDepth = 8;
  293|  12.6k|    header->chromaSamplePosition = AVIF_CHROMA_SAMPLE_POSITION_UNKNOWN;
  294|  12.6k|    header->av1C.chromaSamplePosition = (uint8_t)header->chromaSamplePosition;
  295|  12.6k|    uint32_t high_bitdepth = avifBitsRead(bits, 1);
  296|  12.6k|    header->av1C.highBitdepth = (uint8_t)high_bitdepth;
  297|  12.6k|    if ((header->av1C.seqProfile == 2) && high_bitdepth) {
  ------------------
  |  Branch (297:9): [True: 5.24k, False: 7.36k]
  |  Branch (297:43): [True: 4.19k, False: 1.05k]
  ------------------
  298|  4.19k|        uint32_t twelve_bit = avifBitsRead(bits, 1);
  299|  4.19k|        header->bitDepth = twelve_bit ? 12 : 10;
  ------------------
  |  Branch (299:28): [True: 3.80k, False: 393]
  ------------------
  300|  4.19k|        header->av1C.twelveBit = (uint8_t)twelve_bit;
  301|  8.41k|    } else /* if (seq_profile <= 2) */ {
  302|  8.41k|        header->bitDepth = high_bitdepth ? 10 : 8;
  ------------------
  |  Branch (302:28): [True: 3.29k, False: 5.12k]
  ------------------
  303|  8.41k|        header->av1C.twelveBit = 0;
  304|  8.41k|    }
  305|  12.6k|    uint32_t mono_chrome = 0;
  306|  12.6k|    if (header->av1C.seqProfile != 1) {
  ------------------
  |  Branch (306:9): [True: 9.77k, False: 2.84k]
  ------------------
  307|  9.77k|        mono_chrome = avifBitsRead(bits, 1);
  308|  9.77k|    }
  309|  12.6k|    header->av1C.monochrome = (uint8_t)mono_chrome;
  310|  12.6k|    uint32_t color_description_present_flag = avifBitsRead(bits, 1);
  311|  12.6k|    if (color_description_present_flag) {
  ------------------
  |  Branch (311:9): [True: 4.04k, False: 8.56k]
  ------------------
  312|  4.04k|        header->colorPrimaries = (avifColorPrimaries)avifBitsRead(bits, 8);                   // color_primaries
  313|  4.04k|        header->transferCharacteristics = (avifTransferCharacteristics)avifBitsRead(bits, 8); // transfer_characteristics
  314|  4.04k|        header->matrixCoefficients = (avifMatrixCoefficients)avifBitsRead(bits, 8);           // matrix_coefficients
  315|  8.56k|    } else {
  316|  8.56k|        header->colorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
  317|  8.56k|        header->transferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
  318|  8.56k|        header->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
  319|  8.56k|    }
  320|  12.6k|    if (mono_chrome) {
  ------------------
  |  Branch (320:9): [True: 3.13k, False: 9.47k]
  ------------------
  321|  3.13k|        header->range = avifBitsRead(bits, 1) ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED; // color_range
  ------------------
  |  Branch (321:25): [True: 1.07k, False: 2.06k]
  ------------------
  322|  3.13k|        header->av1C.chromaSubsamplingX = 1;
  323|  3.13k|        header->av1C.chromaSubsamplingY = 1;
  324|  3.13k|        header->yuvFormat = AVIF_PIXEL_FORMAT_YUV400;
  325|  9.47k|    } else if (header->colorPrimaries == AVIF_COLOR_PRIMARIES_BT709 &&
  ------------------
  |  Branch (325:16): [True: 383, False: 9.09k]
  ------------------
  326|    383|               header->transferCharacteristics == AVIF_TRANSFER_CHARACTERISTICS_SRGB &&
  ------------------
  |  Branch (326:16): [True: 252, False: 131]
  ------------------
  327|    252|               header->matrixCoefficients == AVIF_MATRIX_COEFFICIENTS_IDENTITY) {
  ------------------
  |  Branch (327:16): [True: 78, False: 174]
  ------------------
  328|     78|        header->range = AVIF_RANGE_FULL;
  329|     78|        header->av1C.chromaSubsamplingX = 0;
  330|     78|        header->av1C.chromaSubsamplingY = 0;
  331|     78|        header->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  332|  9.39k|    } else {
  333|  9.39k|        uint32_t subsampling_x = 0;
  334|  9.39k|        uint32_t subsampling_y = 0;
  335|  9.39k|        header->range = avifBitsRead(bits, 1) ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED; // color_range
  ------------------
  |  Branch (335:25): [True: 2.77k, False: 6.62k]
  ------------------
  336|  9.39k|        switch (header->av1C.seqProfile) {
  337|  3.28k|            case 0:
  ------------------
  |  Branch (337:13): [True: 3.28k, False: 6.11k]
  ------------------
  338|  3.28k|                subsampling_x = 1;
  339|  3.28k|                subsampling_y = 1;
  340|  3.28k|                header->yuvFormat = AVIF_PIXEL_FORMAT_YUV420;
  341|  3.28k|                break;
  342|  2.78k|            case 1:
  ------------------
  |  Branch (342:13): [True: 2.78k, False: 6.60k]
  ------------------
  343|  2.78k|                subsampling_x = 0;
  344|  2.78k|                subsampling_y = 0;
  345|  2.78k|                header->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  346|  2.78k|                break;
  347|  3.32k|            case 2:
  ------------------
  |  Branch (347:13): [True: 3.32k, False: 6.06k]
  ------------------
  348|  3.32k|                if (header->bitDepth == 12) {
  ------------------
  |  Branch (348:21): [True: 2.58k, False: 741]
  ------------------
  349|  2.58k|                    subsampling_x = avifBitsRead(bits, 1);
  350|  2.58k|                    if (subsampling_x) {
  ------------------
  |  Branch (350:25): [True: 628, False: 1.95k]
  ------------------
  351|    628|                        subsampling_y = avifBitsRead(bits, 1);
  352|    628|                    }
  353|  2.58k|                } else {
  354|    741|                    subsampling_x = 1;
  355|    741|                    subsampling_y = 0;
  356|    741|                }
  357|  3.32k|                if (subsampling_x) {
  ------------------
  |  Branch (357:21): [True: 1.36k, False: 1.95k]
  ------------------
  358|  1.36k|                    header->yuvFormat = subsampling_y ? AVIF_PIXEL_FORMAT_YUV420 : AVIF_PIXEL_FORMAT_YUV422;
  ------------------
  |  Branch (358:41): [True: 471, False: 898]
  ------------------
  359|  1.95k|                } else {
  360|  1.95k|                    header->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
  361|  1.95k|                }
  362|  3.32k|                break;
  363|      0|            default:
  ------------------
  |  Branch (363:13): [True: 0, False: 9.39k]
  ------------------
  364|      0|                return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  365|  9.39k|        }
  366|       |
  367|  9.39k|        if (subsampling_x && subsampling_y) {
  ------------------
  |  Branch (367:13): [True: 4.64k, False: 4.74k]
  |  Branch (367:30): [True: 3.75k, False: 898]
  ------------------
  368|  3.75k|            header->chromaSamplePosition = (avifChromaSamplePosition)avifBitsRead(bits, 2); // chroma_sample_position
  369|  3.75k|            header->av1C.chromaSamplePosition = (uint8_t)header->chromaSamplePosition;
  370|  3.75k|        }
  371|  9.39k|        header->av1C.chromaSubsamplingX = (uint8_t)subsampling_x;
  372|  9.39k|        header->av1C.chromaSubsamplingY = (uint8_t)subsampling_y;
  373|  9.39k|    }
  374|       |
  375|  12.6k|    return !bits->error;
  376|  12.6k|}

avifRWDataRealloc:
    9|  2.32M|{
   10|  2.32M|    if (raw->size != newSize) {
  ------------------
  |  Branch (10:9): [True: 1.84M, False: 480k]
  ------------------
   11|  1.84M|        if (newSize == 0) {
  ------------------
  |  Branch (11:13): [True: 0, False: 1.84M]
  ------------------
   12|       |            // avifAlloc(0) returns NULL, so handle the shrink-to-zero case by freeing the buffer.
   13|      0|            avifRWDataFree(raw);
   14|      0|            return AVIF_RESULT_OK;
   15|      0|        }
   16|  1.84M|        uint8_t * newData = (uint8_t *)avifAlloc(newSize);
   17|  1.84M|        AVIF_CHECKERR(newData, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  1.84M|    do {                        \
  |  |   46|  1.84M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.84M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.84M]
  |  |  ------------------
  ------------------
   18|  1.84M|        if (raw->size) {
  ------------------
  |  Branch (18:13): [True: 3.14k, False: 1.83M]
  ------------------
   19|  3.14k|            memcpy(newData, raw->data, AVIF_MIN(raw->size, newSize));
  ------------------
  |  |   19|  3.14k|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 3.14k, False: 1]
  |  |  ------------------
  ------------------
   20|  3.14k|        }
   21|  1.84M|        avifFree(raw->data);
   22|  1.84M|        raw->data = newData;
   23|  1.84M|        raw->size = newSize;
   24|  1.84M|    }
   25|  2.32M|    return AVIF_RESULT_OK;
   26|  2.32M|}
avifRWDataSet:
   29|  1.65M|{
   30|  1.65M|    if (len) {
  ------------------
  |  Branch (30:9): [True: 1.59M, False: 57.4k]
  ------------------
   31|  1.59M|        AVIF_CHECKRES(avifRWDataRealloc(raw, len));
  ------------------
  |  |   54|  1.59M|    do {                                  \
  |  |   55|  1.59M|        const avifResult result__ = (A);  \
  |  |   56|  1.59M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.59M]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.59M]
  |  |  ------------------
  ------------------
   32|  1.59M|        memcpy(raw->data, data, len);
   33|  1.59M|    } else {
   34|  57.4k|        avifRWDataFree(raw);
   35|  57.4k|    }
   36|  1.65M|    return AVIF_RESULT_OK;
   37|  1.65M|}
avifRWDataFree:
   40|  6.02M|{
   41|  6.02M|    avifFree(raw->data);
   42|       |    raw->data = NULL;
   43|  6.02M|    raw->size = 0;
   44|  6.02M|}

avifCodecDecodeInputCreate:
  554|   336k|{
  555|   336k|    avifCodecDecodeInput * decodeInput = (avifCodecDecodeInput *)avifAlloc(sizeof(avifCodecDecodeInput));
  556|   336k|    if (decodeInput == NULL) {
  ------------------
  |  Branch (556:9): [True: 0, False: 336k]
  ------------------
  557|      0|        return NULL;
  558|      0|    }
  559|   336k|    memset(decodeInput, 0, sizeof(avifCodecDecodeInput));
  560|   336k|    if (!avifArrayCreate(&decodeInput->samples, sizeof(avifDecodeSample), 1)) {
  ------------------
  |  Branch (560:9): [True: 0, False: 336k]
  ------------------
  561|      0|        avifFree(decodeInput);
  562|      0|        return NULL;
  563|      0|    }
  564|   336k|    return decodeInput;
  565|   336k|}
avifCodecDecodeInputDestroy:
  568|   336k|{
  569|   723k|    for (uint32_t sampleIndex = 0; sampleIndex < decodeInput->samples.count; ++sampleIndex) {
  ------------------
  |  Branch (569:36): [True: 386k, False: 336k]
  ------------------
  570|   386k|        avifDecodeSample * sample = &decodeInput->samples.sample[sampleIndex];
  571|   386k|        if (sample->ownsData) {
  ------------------
  |  Branch (571:13): [True: 4.45k, False: 382k]
  ------------------
  572|  4.45k|            avifRWDataFree((avifRWData *)&sample->data);
  573|  4.45k|        }
  574|   386k|    }
  575|   336k|    avifArrayDestroy(&decodeInput->samples);
  576|   336k|    avifFree(decodeInput);
  577|   336k|}
avifPeekCompatibleFileType:
 5150|    208|{
 5151|    208|    BEGIN_STREAM(s, input->data, input->size, NULL, NULL);
  ------------------
  |  |  810|    208|    avifROStream VARNAME;                               \
  |  |  811|    208|    avifROData VARNAME##_roData;                        \
  |  |  812|    208|    VARNAME##_roData.data = PTR;                        \
  |  |  813|    208|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|    208|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 5152|       |
 5153|    208|    avifBoxHeader header;
 5154|    208|    if (!avifROStreamReadBoxHeaderPartial(&s, &header, /*topLevel=*/AVIF_TRUE) || memcmp(header.type, "ftyp", 4)) {
  ------------------
  |  |   88|    208|#define AVIF_TRUE 1
  ------------------
  |  Branch (5154:9): [True: 0, False: 208]
  |  Branch (5154:83): [True: 70, False: 138]
  ------------------
 5155|     70|        return AVIF_FALSE;
  ------------------
  |  |   89|     70|#define AVIF_FALSE 0
  ------------------
 5156|     70|    }
 5157|    138|    if (header.isSizeZeroBox) {
  ------------------
  |  Branch (5157:9): [True: 0, False: 138]
  ------------------
 5158|       |        // The ftyp box goes on till the end of the file. Either there is no brand requiring anything in the file but a
 5159|       |        // FileTypebox (so not AVIF), or it is invalid.
 5160|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5161|      0|    }
 5162|    138|    AVIF_CHECK(avifROStreamHasBytesLeft(&s, header.size));
  ------------------
  |  |   36|    138|    do {                        \
  |  |   37|    138|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 138]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    138|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 138]
  |  |  ------------------
  ------------------
 5163|       |
 5164|    138|    avifFileType ftyp;
 5165|    138|    memset(&ftyp, 0, sizeof(avifFileType));
 5166|    138|    avifBool parsed = avifParseFileTypeBox(&ftyp, avifROStreamCurrent(&s), header.size, NULL);
 5167|    138|    if (!parsed) {
  ------------------
  |  Branch (5167:9): [True: 0, False: 138]
  ------------------
 5168|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5169|      0|    }
 5170|    138|    return avifFileTypeIsCompatible(&ftyp);
 5171|    138|}
avifDecoderCreate:
 5186|  13.3k|{
 5187|  13.3k|    avifDecoder * decoder = (avifDecoder *)avifAlloc(sizeof(avifDecoder));
 5188|  13.3k|    if (decoder == NULL) {
  ------------------
  |  Branch (5188:9): [True: 0, False: 13.3k]
  ------------------
 5189|      0|        return NULL;
 5190|      0|    }
 5191|  13.3k|    memset(decoder, 0, sizeof(avifDecoder));
 5192|  13.3k|    decoder->maxThreads = 1;
 5193|  13.3k|    decoder->imageSizeLimit = AVIF_DEFAULT_IMAGE_SIZE_LIMIT;
  ------------------
  |  |   95|  13.3k|#define AVIF_DEFAULT_IMAGE_SIZE_LIMIT (16384 * 16384)
  ------------------
 5194|  13.3k|    decoder->imageDimensionLimit = AVIF_DEFAULT_IMAGE_DIMENSION_LIMIT;
  ------------------
  |  |   98|  13.3k|#define AVIF_DEFAULT_IMAGE_DIMENSION_LIMIT 32768
  ------------------
 5195|  13.3k|    decoder->imageCountLimit = AVIF_DEFAULT_IMAGE_COUNT_LIMIT;
  ------------------
  |  |  101|  13.3k|#define AVIF_DEFAULT_IMAGE_COUNT_LIMIT (12 * 3600 * 60)
  ------------------
 5196|  13.3k|    decoder->strictFlags = AVIF_STRICT_ENABLED;
 5197|  13.3k|    decoder->imageContentToDecode = AVIF_IMAGE_CONTENT_DECODE_DEFAULT;
 5198|  13.3k|    return decoder;
 5199|  13.3k|}
avifDecoderDestroy:
 5216|  13.3k|{
 5217|  13.3k|    avifDecoderCleanup(decoder);
 5218|  13.3k|    avifIODestroy(decoder->io);
 5219|  13.3k|    avifFree(decoder);
 5220|  13.3k|}
avifDecoderSetIO:
 5229|  20.1k|{
 5230|  20.1k|    avifIODestroy(decoder->io);
 5231|  20.1k|    decoder->io = io;
 5232|  20.1k|}
avifDecoderParse:
 5401|  1.79M|{
 5402|  1.79M|    avifDiagnosticsClearError(&decoder->diag);
 5403|       |
 5404|       |    // Alpha only is not currently supported.
 5405|  1.79M|    if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) == AVIF_IMAGE_CONTENT_ALPHA) {
  ------------------
  |  Branch (5405:9): [True: 2, False: 1.79M]
  ------------------
 5406|      2|        avifDiagnosticsPrintf(&decoder->diag, "imageContentToDecode set to only alpha is not supported");
 5407|      2|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5408|      2|    }
 5409|  1.79M|    if (!decoder->io || !decoder->io->read) {
  ------------------
  |  Branch (5409:9): [True: 0, False: 1.79M]
  |  Branch (5409:25): [True: 0, False: 1.79M]
  ------------------
 5410|      0|        return AVIF_RESULT_IO_NOT_SET;
 5411|      0|    }
 5412|       |
 5413|       |    // Cleanup anything lingering in the decoder
 5414|  1.79M|    avifDecoderCleanup(decoder);
 5415|       |
 5416|       |    // -----------------------------------------------------------------------
 5417|       |    // Parse BMFF boxes
 5418|       |
 5419|  1.79M|    decoder->data = avifDecoderDataCreate();
 5420|  1.79M|    AVIF_CHECKERR(decoder->data != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  1.79M|    do {                        \
  |  |   46|  1.79M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.79M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.79M]
  |  |  ------------------
  ------------------
 5421|  1.79M|    decoder->data->diag = &decoder->diag;
 5422|       |
 5423|  1.79M|    AVIF_CHECKRES(avifParse(decoder));
  ------------------
  |  |   54|  1.79M|    do {                                  \
  |  |   55|  1.79M|        const avifResult result__ = (A);  \
  |  |   56|  1.79M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1.42M, False: 370k]
  |  |  ------------------
  |  |   57|  1.42M|            avifBreakOnError();           \
  |  |   58|  1.42M|            return result__;              \
  |  |   59|  1.42M|        }                                 \
  |  |   60|  1.79M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 370k]
  |  |  ------------------
  ------------------
 5424|       |
 5425|       |    // Walk the decoded items (if any) and harvest ispe
 5426|   370k|    avifDecoderData * data = decoder->data;
 5427|  1.57M|    for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5427:34): [True: 1.20M, False: 370k]
  ------------------
 5428|  1.20M|        avifDecoderItem * item = data->meta->items.item[itemIndex];
 5429|  1.20M|        if (avifDecoderItemShouldBeSkipped(item)) {
  ------------------
  |  Branch (5429:13): [True: 595k, False: 604k]
  ------------------
 5430|   595k|            continue;
 5431|   595k|        }
 5432|       |
 5433|   604k|        const avifProperty * ispeProp = avifPropertyArrayFind(&item->properties, "ispe");
 5434|   604k|        if (ispeProp) {
  ------------------
  |  Branch (5434:13): [True: 604k, False: 71]
  ------------------
 5435|   604k|            item->width = ispeProp->u.ispe.width;
 5436|   604k|            item->height = ispeProp->u.ispe.height;
 5437|       |
 5438|   604k|            if ((item->width == 0) || (item->height == 0)) {
  ------------------
  |  Branch (5438:17): [True: 1, False: 604k]
  |  Branch (5438:39): [True: 1, False: 604k]
  ------------------
 5439|      2|                avifDiagnosticsPrintf(data->diag, "Item ID [%u] has an invalid size [%ux%u]", item->id, item->width, item->height);
 5440|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5441|      2|            }
 5442|   604k|            if (avifDimensionsTooLarge(item->width, item->height, decoder->imageSizeLimit, decoder->imageDimensionLimit)) {
  ------------------
  |  Branch (5442:17): [True: 89, False: 604k]
  ------------------
 5443|     89|                avifDiagnosticsPrintf(data->diag, "Item ID [%u] dimensions are too large [%ux%u]", item->id, item->width, item->height);
 5444|     89|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5445|     89|            }
 5446|   604k|        } else {
 5447|     71|            const avifProperty * auxCProp = avifPropertyArrayFind(&item->properties, "auxC");
 5448|     71|            if (auxCProp && isAlphaURN(auxCProp->u.auxC.auxType)) {
  ------------------
  |  Branch (5448:17): [True: 61, False: 10]
  |  Branch (5448:29): [True: 1, False: 60]
  ------------------
 5449|      1|                if (decoder->strictFlags & AVIF_STRICT_ALPHA_ISPE_REQUIRED) {
  ------------------
  |  Branch (5449:21): [True: 1, False: 0]
  ------------------
 5450|      1|                    avifDiagnosticsPrintf(data->diag,
 5451|      1|                                          "[Strict] Alpha auxiliary image item ID [%u] is missing a mandatory ispe property",
 5452|      1|                                          item->id);
 5453|      1|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 5454|      1|                }
 5455|     70|            } else {
 5456|     70|                avifDiagnosticsPrintf(data->diag, "Item ID [%u] is missing a mandatory ispe property", item->id);
 5457|     70|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5458|     70|            }
 5459|     71|        }
 5460|   604k|    }
 5461|   370k|    return avifDecoderReset(decoder);
 5462|   370k|}
avifDecoderReset:
 6192|   370k|{
 6193|   370k|    avifDiagnosticsClearError(&decoder->diag);
 6194|       |
 6195|   370k|    avifDecoderData * data = decoder->data;
 6196|   370k|    if (!data) {
  ------------------
  |  Branch (6196:9): [True: 0, False: 370k]
  ------------------
 6197|       |        // Nothing to reset.
 6198|      0|        return AVIF_RESULT_OK;
 6199|      0|    }
 6200|       |
 6201|  3.33M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6201:21): [True: 2.96M, False: 370k]
  ------------------
 6202|  2.96M|        memset(&data->tileInfos[c].grid, 0, sizeof(data->tileInfos[c].grid));
 6203|  2.96M|    }
 6204|   370k|    avifDecoderDataClearTiles(data);
 6205|   370k|    data->sampleTransformNumInputImageItems = 0;
 6206|   370k|    avifArrayDestroy(&data->meta->sampleTransformExpression);
 6207|   370k|    data->meta->sampleTransformDepth = 0;
 6208|       |
 6209|       |    // Prepare / cleanup decoded image state
 6210|   370k|    if (decoder->image) {
  ------------------
  |  Branch (6210:9): [True: 0, False: 370k]
  ------------------
 6211|      0|        avifImageDestroy(decoder->image);
 6212|      0|    }
 6213|   370k|    decoder->image = avifImageCreateEmpty();
 6214|   370k|    AVIF_CHECKERR(decoder->image, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   370k|    do {                        \
  |  |   46|   370k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 370k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   370k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 370k]
  |  |  ------------------
  ------------------
 6215|   370k|    decoder->progressiveState = AVIF_PROGRESSIVE_STATE_UNAVAILABLE;
 6216|   370k|    data->cicpSet = AVIF_FALSE;
  ------------------
  |  |   89|   370k|#define AVIF_FALSE 0
  ------------------
 6217|       |
 6218|   370k|    memset(&decoder->ioStats, 0, sizeof(decoder->ioStats));
 6219|       |
 6220|       |    // Alpha only is not currently supported.
 6221|   370k|    if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) == AVIF_IMAGE_CONTENT_ALPHA) {
  ------------------
  |  Branch (6221:9): [True: 0, False: 370k]
  ------------------
 6222|      0|        avifDiagnosticsPrintf(&decoder->diag, "imageContentToDecode set to only alpha is not supported");
 6223|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 6224|      0|    }
 6225|       |
 6226|       |    // -----------------------------------------------------------------------
 6227|       |    // Build decode input
 6228|       |
 6229|   370k|    data->sourceSampleTable = NULL; // Reset
 6230|   370k|    if (decoder->requestedSource == AVIF_DECODER_SOURCE_AUTO) {
  ------------------
  |  Branch (6230:9): [True: 370k, False: 0]
  ------------------
 6231|       |        // Honor the major brand (avif or avis) if present, otherwise prefer avis (tracks) if possible.
 6232|   370k|        if (!memcmp(data->majorBrand, "avis", 4)) {
  ------------------
  |  Branch (6232:13): [True: 57.4k, False: 312k]
  ------------------
 6233|  57.4k|            data->source = AVIF_DECODER_SOURCE_TRACKS;
 6234|   312k|        } else if (!memcmp(data->majorBrand, "avif", 4)) {
  ------------------
  |  Branch (6234:20): [True: 264k, False: 47.6k]
  ------------------
 6235|   264k|            data->source = AVIF_DECODER_SOURCE_PRIMARY_ITEM;
 6236|   264k|        } else if (data->tracks.count > 0) {
  ------------------
  |  Branch (6236:20): [True: 14.4k, False: 33.2k]
  ------------------
 6237|  14.4k|            data->source = AVIF_DECODER_SOURCE_TRACKS;
 6238|  33.2k|        } else {
 6239|  33.2k|            data->source = AVIF_DECODER_SOURCE_PRIMARY_ITEM;
 6240|  33.2k|        }
 6241|   370k|    } else {
 6242|      0|        data->source = decoder->requestedSource;
 6243|      0|    }
 6244|       |
 6245|   370k|    avifCodecType colorCodecType = AVIF_CODEC_TYPE_UNKNOWN;
 6246|   370k|    const avifPropertyArray * colorProperties = NULL;
 6247|   370k|    const avifPropertyArray * alphaProperties = NULL;
 6248|   370k|    const avifPropertyArray * gainMapProperties = NULL;
 6249|   370k|    if (data->source == AVIF_DECODER_SOURCE_TRACKS) {
  ------------------
  |  Branch (6249:9): [True: 71.8k, False: 298k]
  ------------------
 6250|  71.8k|        avifTrack * colorTrack = NULL;
 6251|  71.8k|        avifTrack * alphaTrack = NULL;
 6252|       |
 6253|       |        // Find primary track - this probably needs some better detection
 6254|  71.8k|        uint32_t colorTrackIndex = 0;
 6255|  72.2k|        for (; colorTrackIndex < data->tracks.count; ++colorTrackIndex) {
  ------------------
  |  Branch (6255:16): [True: 72.2k, False: 38]
  ------------------
 6256|  72.2k|            avifTrack * track = &data->tracks.track[colorTrackIndex];
 6257|  72.2k|            if (!track->sampleTable) {
  ------------------
  |  Branch (6257:17): [True: 210, False: 72.0k]
  ------------------
 6258|    210|                continue;
 6259|    210|            }
 6260|  72.0k|            if (!track->id) { // trak box might be missing a tkhd box inside, skip it
  ------------------
  |  Branch (6260:17): [True: 44, False: 71.9k]
  ------------------
 6261|     44|                continue;
 6262|     44|            }
 6263|  71.9k|            if (!track->sampleTable->chunks.count) {
  ------------------
  |  Branch (6263:17): [True: 53, False: 71.9k]
  ------------------
 6264|     53|                continue;
 6265|     53|            }
 6266|  71.9k|            colorCodecType = avifSampleTableGetCodecType(track->sampleTable);
 6267|  71.9k|            if (colorCodecType == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (6267:17): [True: 97, False: 71.8k]
  ------------------
 6268|     97|                continue;
 6269|     97|            }
 6270|  71.8k|            if (avifHasReference(&track->references, "auxl")) {
  ------------------
  |  Branch (6270:17): [True: 1, False: 71.8k]
  ------------------
 6271|      1|                continue;
 6272|      1|            }
 6273|       |            // HEIF (ISO/IEC 23008-12:2022), Section 7.1:
 6274|       |            //   In order to distinguish image sequences from video, the handler type in the
 6275|       |            //   HandlerBox of the track is 'pict' to indicate an image sequence track.
 6276|       |            // But we do not check the handler type because it may break some existing files.
 6277|       |
 6278|       |            // Found one!
 6279|  71.8k|            break;
 6280|  71.8k|        }
 6281|  71.8k|        if (colorTrackIndex == data->tracks.count) {
  ------------------
  |  Branch (6281:13): [True: 38, False: 71.8k]
  ------------------
 6282|     38|            avifDiagnosticsPrintf(&decoder->diag, "Failed to find AV1 color track");
 6283|     38|            return AVIF_RESULT_NO_CONTENT;
 6284|     38|        }
 6285|  71.8k|        colorTrack = &data->tracks.track[colorTrackIndex];
 6286|       |
 6287|  71.8k|        colorProperties = avifSampleTableGetProperties(colorTrack->sampleTable, colorCodecType);
 6288|  71.8k|        if (!colorProperties) {
  ------------------
  |  Branch (6288:13): [True: 0, False: 71.8k]
  ------------------
 6289|      0|            avifDiagnosticsPrintf(&decoder->diag, "Failed to find AV1 color track's color properties");
 6290|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 6291|      0|        }
 6292|       |
 6293|       |        // Find Exif and/or XMP metadata, if any
 6294|  71.8k|        if (colorTrack->meta) {
  ------------------
  |  Branch (6294:13): [True: 71.8k, False: 0]
  ------------------
 6295|       |            // See the comment above avifDecoderFindMetadata() for the explanation of using 0 here
 6296|  71.8k|            avifResult findResult = avifDecoderFindMetadata(decoder, colorTrack->meta, decoder->image, 0);
 6297|  71.8k|            if (findResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6297:17): [True: 38.0k, False: 33.8k]
  ------------------
 6298|  38.0k|                return findResult;
 6299|  38.0k|            }
 6300|  71.8k|        }
 6301|       |
 6302|  33.8k|        uint32_t alphaTrackIndex = 0;
 6303|  33.8k|        avifCodecType alphaCodecType = AVIF_CODEC_TYPE_UNKNOWN;
 6304|  92.6k|        for (; alphaTrackIndex < data->tracks.count; ++alphaTrackIndex) {
  ------------------
  |  Branch (6304:16): [True: 58.8k, False: 33.7k]
  ------------------
 6305|  58.8k|            avifTrack * track = &data->tracks.track[alphaTrackIndex];
 6306|  58.8k|            if (!track->sampleTable) {
  ------------------
  |  Branch (6306:17): [True: 6.80k, False: 52.0k]
  ------------------
 6307|  6.80k|                continue;
 6308|  6.80k|            }
 6309|  52.0k|            if (!track->id) {
  ------------------
  |  Branch (6309:17): [True: 6.64k, False: 45.4k]
  ------------------
 6310|  6.64k|                continue;
 6311|  6.64k|            }
 6312|  45.4k|            if (!track->sampleTable->chunks.count) {
  ------------------
  |  Branch (6312:17): [True: 3.56k, False: 41.8k]
  ------------------
 6313|  3.56k|                continue;
 6314|  3.56k|            }
 6315|  41.8k|            alphaCodecType = avifSampleTableGetCodecType(track->sampleTable);
 6316|  41.8k|            if (alphaCodecType == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (6316:17): [True: 3.25k, False: 38.6k]
  ------------------
 6317|  3.25k|                continue;
 6318|  3.25k|            }
 6319|  38.6k|            const avifPropertyArray * properties = avifSampleTableGetProperties(track->sampleTable, alphaCodecType);
 6320|  38.6k|            const avifProperty * auxiProp = properties ? avifPropertyArrayFind(properties, "auxi") : NULL;
  ------------------
  |  Branch (6320:45): [True: 38.6k, False: 0]
  ------------------
 6321|       |            // If auxi is present, check that it contains the alpha URN.
 6322|       |            // If auxi is not present, assume that the track is alpha. This is for backward compatibility with
 6323|       |            // old versions of libavif that did not write this property, see
 6324|       |            // https://github.com/AOMediaCodec/libavif/commit/98faa17
 6325|  38.6k|            if (auxiProp && !isAlphaURN(auxiProp->u.auxC.auxType)) {
  ------------------
  |  Branch (6325:17): [True: 4.92k, False: 33.6k]
  |  Branch (6325:29): [True: 4.64k, False: 281]
  ------------------
 6326|  4.64k|                continue;
 6327|  4.64k|            }
 6328|       |            // Do not check the track's handlerType. It should be "auxv" according to
 6329|       |            // HEIF (ISO/IEC 23008-12:2022), Section 7.5.3.1, but old versions of libavif used to write
 6330|       |            // "pict" instead. See https://github.com/AOMediaCodec/libavif/commit/65d0af9
 6331|       |
 6332|  33.9k|            if (avifReferences(&track->references, "auxl", colorTrack->id)) {
  ------------------
  |  Branch (6332:17): [True: 14, False: 33.9k]
  ------------------
 6333|       |                // Found it!
 6334|     14|                alphaProperties = properties;
 6335|     14|                break;
 6336|     14|            }
 6337|  33.9k|        }
 6338|  33.8k|        if (alphaTrackIndex != data->tracks.count) {
  ------------------
  |  Branch (6338:13): [True: 14, False: 33.7k]
  ------------------
 6339|     14|            alphaTrack = &data->tracks.track[alphaTrackIndex];
 6340|     14|        }
 6341|       |
 6342|  33.8k|        const uint8_t operatingPoint = 0; // No way to set operating point via tracks
 6343|  33.8k|        avifTile * colorTile = NULL;
 6344|  33.8k|        if (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR) {
  ------------------
  |  Branch (6344:13): [True: 33.7k, False: 78]
  ------------------
 6345|  33.7k|            colorTile = avifDecoderDataCreateTile(data, colorCodecType, colorTrack->width, colorTrack->height, operatingPoint);
 6346|  33.7k|            AVIF_CHECKERR(colorTile != 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]
  |  |  ------------------
  ------------------
 6347|  33.7k|            AVIF_CHECKRES(avifCodecDecodeInputFillFromSampleTable(colorTile->input,
  ------------------
  |  |   54|  33.7k|    do {                                  \
  |  |   55|  33.7k|        const avifResult result__ = (A);  \
  |  |   56|  33.7k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 139, False: 33.5k]
  |  |  ------------------
  |  |   57|    139|            avifBreakOnError();           \
  |  |   58|    139|            return result__;              \
  |  |   59|    139|        }                                 \
  |  |   60|  33.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 33.5k]
  |  |  ------------------
  ------------------
 6348|  33.7k|                                                                  colorTrack->sampleTable,
 6349|  33.7k|                                                                  decoder->imageCountLimit,
 6350|  33.7k|                                                                  decoder->io->sizeHint,
 6351|  33.7k|                                                                  data->diag));
 6352|  33.5k|            data->tileInfos[AVIF_ITEM_COLOR].tileCount = 1;
 6353|  33.5k|        }
 6354|       |
 6355|  33.6k|        if (alphaTrack && (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_ALPHA)) {
  ------------------
  |  Branch (6355:13): [True: 12, False: 33.6k]
  |  Branch (6355:27): [True: 10, False: 2]
  ------------------
 6356|     10|            avifTile * alphaTile = avifDecoderDataCreateTile(data, alphaCodecType, alphaTrack->width, alphaTrack->height, operatingPoint);
 6357|     10|            AVIF_CHECKERR(alphaTile != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|     10|    do {                        \
  |  |   46|     10|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 10]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10]
  |  |  ------------------
  ------------------
 6358|     10|            AVIF_CHECKRES(avifCodecDecodeInputFillFromSampleTable(alphaTile->input,
  ------------------
  |  |   54|     10|    do {                                  \
  |  |   55|     10|        const avifResult result__ = (A);  \
  |  |   56|     10|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 9]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 9]
  |  |  ------------------
  ------------------
 6359|     10|                                                                  alphaTrack->sampleTable,
 6360|     10|                                                                  decoder->imageCountLimit,
 6361|     10|                                                                  decoder->io->sizeHint,
 6362|     10|                                                                  data->diag));
 6363|      9|            alphaTile->input->itemCategory = AVIF_ITEM_ALPHA;
 6364|      9|            data->tileInfos[AVIF_ITEM_ALPHA].tileCount = 1;
 6365|      9|        }
 6366|       |
 6367|       |        // Stash off sample table for future timing information
 6368|  33.6k|        data->sourceSampleTable = colorTrack->sampleTable;
 6369|       |
 6370|       |        // Image sequence timing
 6371|  33.6k|        decoder->imageIndex = -1;
 6372|  33.6k|        uint32_t imageCount;
 6373|  33.6k|        if (colorTile) {
  ------------------
  |  Branch (6373:13): [True: 33.5k, False: 78]
  ------------------
 6374|  33.5k|            imageCount = colorTile->input->samples.count;
 6375|  33.5k|        } else {
 6376|     78|            imageCount = 0;
 6377|    149|            for (uint32_t chunkIndex = 0; chunkIndex < colorTrack->sampleTable->chunks.count; ++chunkIndex) {
  ------------------
  |  Branch (6377:43): [True: 79, False: 70]
  ------------------
 6378|       |                // First, figure out how many samples are in this chunk
 6379|     79|                uint32_t sampleCount = avifGetSampleCountOfChunk(&colorTrack->sampleTable->sampleToChunks, chunkIndex);
 6380|     79|                if (sampleCount == 0) {
  ------------------
  |  Branch (6380:21): [True: 7, False: 72]
  ------------------
 6381|       |                    // chunks with 0 samples are invalid
 6382|      7|                    avifDiagnosticsPrintf(data->diag, "Sample table contains a chunk with 0 samples");
 6383|      7|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 6384|      7|                }
 6385|     72|                if (imageCount > UINT32_MAX - sampleCount) {
  ------------------
  |  Branch (6385:21): [True: 1, False: 71]
  ------------------
 6386|      1|                    avifDiagnosticsPrintf(data->diag, "Total number of samples exceeds UINT32_MAX");
 6387|      1|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 6388|      1|                }
 6389|     71|                imageCount += sampleCount;
 6390|     71|            }
 6391|     78|        }
 6392|  33.6k|        if (imageCount > INT_MAX) {
  ------------------
  |  Branch (6392:13): [True: 12, False: 33.6k]
  ------------------
 6393|     12|            avifDiagnosticsPrintf(data->diag, "Total number of samples exceeds INT_MAX");
 6394|     12|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 6395|     12|        }
 6396|  33.6k|        decoder->imageCount = (int)imageCount;
 6397|  33.6k|        decoder->timescale = colorTrack->mediaTimescale;
 6398|  33.6k|        decoder->durationInTimescales = colorTrack->mediaDuration;
 6399|  33.6k|        if (colorTrack->mediaTimescale) {
  ------------------
  |  Branch (6399:13): [True: 20.2k, False: 13.4k]
  ------------------
 6400|  20.2k|            decoder->duration = (double)decoder->durationInTimescales / (double)colorTrack->mediaTimescale;
 6401|  20.2k|        } else {
 6402|  13.4k|            decoder->duration = 0;
 6403|  13.4k|        }
 6404|       |        // If the alphaTrack->repetitionCount and colorTrack->repetitionCount are different, we will simply use the
 6405|       |        // colorTrack's repetitionCount.
 6406|  33.6k|        decoder->repetitionCount = colorTrack->repetitionCount;
 6407|       |
 6408|  33.6k|        memset(&decoder->imageTiming, 0, sizeof(decoder->imageTiming)); // to be set in avifDecoderNextImage()
 6409|       |
 6410|  33.6k|        decoder->image->width = colorTrack->width;
 6411|  33.6k|        decoder->image->height = colorTrack->height;
 6412|  33.6k|        decoder->alphaPresent = (alphaTrack != NULL);
 6413|  33.6k|        decoder->image->alphaPremultiplied = decoder->alphaPresent && avifReferences(&colorTrack->references, "prem", alphaTrack->id);
  ------------------
  |  Branch (6413:46): [True: 11, False: 33.6k]
  |  Branch (6413:71): [True: 0, False: 11]
  ------------------
 6414|   298k|    } else {
 6415|       |        // Create from items
 6416|       |
 6417|   298k|        if (data->meta->primaryItemID == 0) {
  ------------------
  |  Branch (6417:13): [True: 59, False: 298k]
  ------------------
 6418|       |            // A primary item is required
 6419|     59|            avifDiagnosticsPrintf(&decoder->diag, "Primary item not specified");
 6420|     59|            return AVIF_RESULT_MISSING_IMAGE_ITEM;
 6421|     59|        }
 6422|       |
 6423|       |        // Main item of each group category (top-level item such as grid or single tile), if any.
 6424|   298k|        avifDecoderItem * mainItems[AVIF_ITEM_CATEGORY_COUNT];
 6425|   298k|        avifCodecType codecType[AVIF_ITEM_CATEGORY_COUNT];
 6426|  2.68M|        for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6426:25): [True: 2.38M, False: 298k]
  ------------------
 6427|  2.38M|            mainItems[c] = NULL;
 6428|  2.38M|            codecType[c] = AVIF_CODEC_TYPE_UNKNOWN;
 6429|  2.38M|        }
 6430|       |
 6431|       |        // Mandatory primary color item
 6432|   298k|        mainItems[AVIF_ITEM_COLOR] = avifMetaFindColorItem(data->meta);
 6433|   298k|        if (!mainItems[AVIF_ITEM_COLOR]) {
  ------------------
  |  Branch (6433:13): [True: 101, False: 298k]
  ------------------
 6434|    101|            avifDiagnosticsPrintf(&decoder->diag, "Primary item not found");
 6435|    101|            return AVIF_RESULT_MISSING_IMAGE_ITEM;
 6436|    101|        }
 6437|   298k|        AVIF_CHECKRES(avifDecoderItemReadAndParse(decoder,
  ------------------
  |  |   54|   298k|    do {                                  \
  |  |   55|   298k|        const avifResult result__ = (A);  \
  |  |   56|   298k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 358, False: 297k]
  |  |  ------------------
  |  |   57|    358|            avifBreakOnError();           \
  |  |   58|    358|            return result__;              \
  |  |   59|    358|        }                                 \
  |  |   60|   298k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 297k]
  |  |  ------------------
  ------------------
 6438|   298k|                                                  mainItems[AVIF_ITEM_COLOR],
 6439|   298k|                                                  /*isItemInInput=*/AVIF_TRUE,
 6440|   298k|                                                  &data->tileInfos[AVIF_ITEM_COLOR].grid,
 6441|   298k|                                                  &codecType[AVIF_ITEM_COLOR]));
 6442|   297k|        colorProperties = &mainItems[AVIF_ITEM_COLOR]->properties;
 6443|   297k|        colorCodecType = codecType[AVIF_ITEM_COLOR];
 6444|       |
 6445|       |        // Optional alpha auxiliary item
 6446|   297k|        avifBool isAlphaItemInInput;
 6447|   297k|        AVIF_CHECKRES(avifMetaFindAlphaItem(data->meta,
  ------------------
  |  |   54|   297k|    do {                                  \
  |  |   55|   297k|        const avifResult result__ = (A);  \
  |  |   56|   297k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 297k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|   297k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 297k]
  |  |  ------------------
  ------------------
 6448|   297k|                                            mainItems[AVIF_ITEM_COLOR],
 6449|   297k|                                            &data->tileInfos[AVIF_ITEM_COLOR],
 6450|   297k|                                            &mainItems[AVIF_ITEM_ALPHA],
 6451|   297k|                                            &data->tileInfos[AVIF_ITEM_ALPHA],
 6452|   297k|                                            &isAlphaItemInInput));
 6453|   297k|        if (mainItems[AVIF_ITEM_ALPHA]) {
  ------------------
  |  Branch (6453:13): [True: 32.5k, False: 265k]
  ------------------
 6454|  32.5k|            AVIF_CHECKRES(avifDecoderItemReadAndParse(decoder,
  ------------------
  |  |   54|  32.5k|    do {                                  \
  |  |   55|  32.5k|        const avifResult result__ = (A);  \
  |  |   56|  32.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 6, False: 32.5k]
  |  |  ------------------
  |  |   57|      6|            avifBreakOnError();           \
  |  |   58|      6|            return result__;              \
  |  |   59|      6|        }                                 \
  |  |   60|  32.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 32.5k]
  |  |  ------------------
  ------------------
 6455|  32.5k|                                                      mainItems[AVIF_ITEM_ALPHA],
 6456|  32.5k|                                                      isAlphaItemInInput,
 6457|  32.5k|                                                      &data->tileInfos[AVIF_ITEM_ALPHA].grid,
 6458|  32.5k|                                                      &codecType[AVIF_ITEM_ALPHA]));
 6459|  32.5k|        }
 6460|       |
 6461|       |        // Section 10.2.6 of 23008-12:2024/AMD 1:2024(E):
 6462|       |        //   'tmap' brand
 6463|       |        //   This brand enables file players to identify and decode HEIF files containing tone-map derived image
 6464|       |        //   items. When present, this brand shall be among the brands included in the compatible_brands
 6465|       |        //   array of the FileTypeBox.
 6466|       |        //
 6467|       |        // If the file contains a 'tmap' item but doesn't have the 'tmap' brand, it is technically invalid.
 6468|       |        // However, we don't report any error because in order to do detect this case consistently, we would
 6469|       |        // need to remove the early exit in avifParse() to check if a 'tmap' item might be present
 6470|       |        // further down the file. Instead, we simply ignore tmap items in files that lack the 'tmap' brand.
 6471|   297k|        if (avifBrandArrayHasBrand(&data->compatibleBrands, "tmap")) {
  ------------------
  |  Branch (6471:13): [True: 51.1k, False: 246k]
  ------------------
 6472|  51.1k|            avifDecoderItem * gainMapItem;
 6473|  51.1k|            avifCodecType gainMapCodecType;
 6474|  51.1k|            AVIF_CHECKRES(avifDecoderFindGainMapItem(decoder, mainItems[AVIF_ITEM_COLOR], &gainMapItem, &gainMapCodecType));
  ------------------
  |  |   54|  51.1k|    do {                                  \
  |  |   55|  51.1k|        const avifResult result__ = (A);  \
  |  |   56|  51.1k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 42.1k, False: 8.99k]
  |  |  ------------------
  |  |   57|  42.1k|            avifBreakOnError();           \
  |  |   58|  42.1k|            return result__;              \
  |  |   59|  42.1k|        }                                 \
  |  |   60|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 8.99k]
  |  |  ------------------
  ------------------
 6475|  8.99k|            if (gainMapItem != NULL && decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_GAIN_MAP) {
  ------------------
  |  Branch (6475:17): [True: 175, False: 8.81k]
  |  Branch (6475:40): [True: 144, False: 31]
  ------------------
 6476|    144|                mainItems[AVIF_ITEM_GAIN_MAP] = gainMapItem;
 6477|    144|                codecType[AVIF_ITEM_GAIN_MAP] = gainMapCodecType;
 6478|    144|            }
 6479|  8.99k|        }
 6480|       |
 6481|       |        // AVIF_ITEM_SAMPLE_TRANSFORM (not used through mainItems because not a coded item (well grids are not coded items either but it's different)).
 6482|   255k|        avifDecoderItem * const sampleTransformItem = avifDecoderDataFindSampleTransformImageItem(data);
 6483|   255k|        if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR) &&
  ------------------
  |  Branch (6483:13): [True: 255k, False: 224]
  ------------------
 6484|   255k|            (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_SAMPLE_TRANSFORMS) && sampleTransformItem != NULL) {
  ------------------
  |  Branch (6484:13): [True: 129k, False: 125k]
  |  Branch (6484:87): [True: 214, False: 129k]
  ------------------
 6485|    214|            AVIF_ASSERT_OR_RETURN(data->sampleTransformNumInputImageItems == 0);
  ------------------
  |  |   64|    214|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    214|    do {                        \
  |  |  |  |   46|    214|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 214]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    214|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 214]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6486|       |
 6487|    870|            for (uint32_t i = 0; i < data->meta->items.count; ++i) {
  ------------------
  |  Branch (6487:34): [True: 656, False: 214]
  ------------------
 6488|    656|                avifDecoderItem * inputImageItem = data->meta->items.item[i];
 6489|    656|                if (avifIsDimgInput(sampleTransformItem, inputImageItem->id, NULL)) {
  ------------------
  |  Branch (6489:21): [True: 425, False: 231]
  ------------------
 6490|    425|                    ++data->sampleTransformNumInputImageItems;
 6491|    425|                }
 6492|    656|            }
 6493|       |            // A 'sato' derived image item must reference at least one input image item via 'iref dimg'.
 6494|    214|            if (data->sampleTransformNumInputImageItems == 0) {
  ------------------
  |  Branch (6494:17): [True: 1, False: 213]
  ------------------
 6495|      1|                avifDiagnosticsPrintf(data->diag, "Box[sato] item %u has no input image items", sampleTransformItem->id);
 6496|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 6497|      1|            }
 6498|       |            // Check max number of input items allowed by the format.
 6499|    213|            if (data->sampleTransformNumInputImageItems > 32) {
  ------------------
  |  Branch (6499:17): [True: 0, False: 213]
  ------------------
 6500|      0|                avifDiagnosticsPrintf(data->diag,
 6501|      0|                                      "Box[sato] too many input items, format allows up to 32, got %d",
 6502|      0|                                      data->sampleTransformNumInputImageItems);
 6503|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 6504|      0|            }
 6505|       |            // Check max number of input items supported by this implementation.
 6506|    213|            AVIF_CHECKERR(data->sampleTransformNumInputImageItems <= AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS,
  ------------------
  |  |   45|    213|    do {                        \
  |  |   46|    213|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 213]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    213|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 213]
  |  |  ------------------
  ------------------
 6507|    213|                          AVIF_RESULT_NOT_IMPLEMENTED);
 6508|       |
 6509|    213|            uint32_t numExtraInputImageItems = 0;
 6510|    848|            for (uint32_t i = 0; i < data->meta->items.count; ++i) {
  ------------------
  |  Branch (6510:34): [True: 645, False: 203]
  ------------------
 6511|    645|                avifDecoderItem * inputImageItem = data->meta->items.item[i];
 6512|    645|                uint32_t inputDimgIdx;
 6513|    645|                if (!avifIsDimgInput(sampleTransformItem, inputImageItem->id, &inputDimgIdx)) {
  ------------------
  |  Branch (6513:21): [True: 222, False: 423]
  ------------------
 6514|    222|                    continue;
 6515|    222|                }
 6516|    423|                if (avifDecoderItemShouldBeSkipped(inputImageItem)) {
  ------------------
  |  Branch (6516:21): [True: 10, False: 413]
  ------------------
 6517|     10|                    avifDiagnosticsPrintf(data->diag, "Box[sato] input item %u is not a supported image type", inputImageItem->id);
 6518|     10|                    return AVIF_RESULT_DECODE_SAMPLE_TRANSFORM_FAILED;
 6519|     10|                }
 6520|       |
 6521|    413|                AVIF_ASSERT_OR_RETURN(inputDimgIdx < AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS);
  ------------------
  |  |   64|    413|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    413|    do {                        \
  |  |  |  |   46|    413|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 413]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    413|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6522|    413|                avifItemCategory * category = &data->sampleTransformInputImageItems[inputDimgIdx];
 6523|    413|                avifBool foundItem = AVIF_FALSE;
  ------------------
  |  |   89|    413|#define AVIF_FALSE 0
  ------------------
 6524|  2.03k|                for (int c = AVIF_ITEM_COLOR; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6524:47): [True: 1.83k, False: 203]
  ------------------
 6525|  1.83k|                    if (mainItems[c] && inputImageItem->id == mainItems[c]->id) {
  ------------------
  |  Branch (6525:25): [True: 413, False: 1.42k]
  |  Branch (6525:41): [True: 210, False: 203]
  ------------------
 6526|    210|                        *category = c;
 6527|    210|                        AVIF_CHECKERR(*category == AVIF_ITEM_COLOR, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    210|    do {                        \
  |  |   46|    210|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 210]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    210|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 210]
  |  |  ------------------
  ------------------
 6528|    210|                        foundItem = AVIF_TRUE;
  ------------------
  |  |   88|    210|#define AVIF_TRUE 1
  ------------------
 6529|    210|                        break;
 6530|    210|                    }
 6531|  1.83k|                }
 6532|    413|                if (foundItem) {
  ------------------
  |  Branch (6532:21): [True: 210, False: 203]
  ------------------
 6533|    210|                    continue;
 6534|    210|                }
 6535|    203|                AVIF_CHECKERR(numExtraInputImageItems < AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    203|    do {                        \
  |  |   46|    203|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 203]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 6536|    203|                *category = (avifItemCategory)(AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR + numExtraInputImageItems);
 6537|    203|                const avifItemCategory alphaCategory =
 6538|    203|                    (avifItemCategory)(AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + numExtraInputImageItems);
 6539|    203|                mainItems[*category] = inputImageItem;
 6540|    203|                ++numExtraInputImageItems;
 6541|       |
 6542|    203|                AVIF_CHECKRES(avifDecoderItemReadAndParse(decoder,
  ------------------
  |  |   54|    203|    do {                                  \
  |  |   55|    203|        const avifResult result__ = (A);  \
  |  |   56|    203|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 203]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 6543|    203|                                                          inputImageItem,
 6544|    203|                                                          /*isItemInInput=*/AVIF_TRUE,
 6545|    203|                                                          &data->tileInfos[*category].grid,
 6546|    203|                                                          &codecType[*category]));
 6547|       |
 6548|       |                // Optional alpha auxiliary item
 6549|    203|                if (!(decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_ALPHA)) {
  ------------------
  |  Branch (6549:21): [True: 0, False: 203]
  ------------------
 6550|      0|                    continue;
 6551|      0|                }
 6552|    203|                avifBool isAlphaInputImageItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|    203|#define AVIF_FALSE 0
  ------------------
 6553|    203|                AVIF_CHECKRES(avifMetaFindAlphaItem(data->meta,
  ------------------
  |  |   54|    203|    do {                                  \
  |  |   55|    203|        const avifResult result__ = (A);  \
  |  |   56|    203|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 203]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 6554|    203|                                                    mainItems[*category],
 6555|    203|                                                    &data->tileInfos[*category],
 6556|    203|                                                    &mainItems[alphaCategory],
 6557|    203|                                                    &data->tileInfos[alphaCategory],
 6558|    203|                                                    &isAlphaInputImageItemInInput));
 6559|       |
 6560|    203|                AVIF_CHECKERR(!mainItems[alphaCategory] == !mainItems[AVIF_ITEM_ALPHA], AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    203|    do {                        \
  |  |   46|    203|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 203]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 6561|    203|                if (mainItems[alphaCategory] != NULL) {
  ------------------
  |  Branch (6561:21): [True: 0, False: 203]
  ------------------
 6562|      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]
  |  |  ------------------
  ------------------
 6563|      0|                    AVIF_CHECKERR(avifReferences(&mainItems[*category]->references, "prem", 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]
  |  |  ------------------
  ------------------
 6564|      0|                                      avifReferences(&mainItems[AVIF_ITEM_COLOR]->references, "prem", mainItems[AVIF_ITEM_ALPHA]->id),
 6565|      0|                                  AVIF_RESULT_NOT_IMPLEMENTED);
 6566|      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]
  |  |  ------------------
  ------------------
 6567|      0|                                                              mainItems[alphaCategory],
 6568|      0|                                                              isAlphaInputImageItemInInput,
 6569|      0|                                                              &data->tileInfos[alphaCategory].grid,
 6570|      0|                                                              &codecType[alphaCategory]));
 6571|      0|                }
 6572|    203|            }
 6573|       |
 6574|    203|            AVIF_ASSERT_OR_RETURN(data->meta->sampleTransformExpression.tokens == NULL);
  ------------------
  |  |   64|    203|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    203|    do {                        \
  |  |  |  |   46|    203|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 203]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    203|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 203]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6575|    203|            avifROData satoData;
 6576|    203|            AVIF_CHECKRES(avifDecoderItemRead(sampleTransformItem, decoder->io, &satoData, 0, 0, data->diag));
  ------------------
  |  |   54|    203|    do {                                  \
  |  |   55|    203|        const avifResult result__ = (A);  \
  |  |   56|    203|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 200]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 200]
  |  |  ------------------
  ------------------
 6577|    200|            AVIF_CHECKRES(avifParseSampleTransformImageBox(satoData.data,
  ------------------
  |  |   54|    200|    do {                                  \
  |  |   55|    200|        const avifResult result__ = (A);  \
  |  |   56|    200|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 52, False: 148]
  |  |  ------------------
  |  |   57|     52|            avifBreakOnError();           \
  |  |   58|     52|            return result__;              \
  |  |   59|     52|        }                                 \
  |  |   60|    200|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 148]
  |  |  ------------------
  ------------------
 6578|    200|                                                           satoData.size,
 6579|    200|                                                           data->sampleTransformNumInputImageItems,
 6580|    200|                                                           &data->meta->sampleTransformExpression,
 6581|    200|                                                           data->diag));
 6582|    148|            AVIF_CHECKRES(avifDecoderSampleTransformItemValidateProperties(sampleTransformItem, data->diag));
  ------------------
  |  |   54|    148|    do {                                  \
  |  |   55|    148|        const avifResult result__ = (A);  \
  |  |   56|    148|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 10, False: 138]
  |  |  ------------------
  |  |   57|     10|            avifBreakOnError();           \
  |  |   58|     10|            return result__;              \
  |  |   59|     10|        }                                 \
  |  |   60|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 138]
  |  |  ------------------
  ------------------
 6583|    138|            const avifProperty * pixiProp = avifPropertyArrayFind(&sampleTransformItem->properties, "pixi");
 6584|    138|            AVIF_ASSERT_OR_RETURN(pixiProp != NULL);
  ------------------
  |  |   64|    138|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    138|    do {                        \
  |  |  |  |   46|    138|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 138]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    138|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 138]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6585|    138|            data->meta->sampleTransformDepth = pixiProp->u.pixi.planeDepths[0];
 6586|    138|        }
 6587|       |
 6588|       |        // Find Exif and/or XMP metadata, if any
 6589|   255k|        AVIF_CHECKRES(avifDecoderFindMetadata(decoder, data->meta, decoder->image, mainItems[AVIF_ITEM_COLOR]->id));
  ------------------
  |  |   54|   255k|    do {                                  \
  |  |   55|   255k|        const avifResult result__ = (A);  \
  |  |   56|   255k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 4.23k, False: 251k]
  |  |  ------------------
  |  |   57|  4.23k|            avifBreakOnError();           \
  |  |   58|  4.23k|            return result__;              \
  |  |   59|  4.23k|        }                                 \
  |  |   60|   255k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 251k]
  |  |  ------------------
  ------------------
 6590|       |
 6591|       |        // Set all counts and timing to safe-but-uninteresting values
 6592|   251k|        decoder->imageIndex = -1;
 6593|   251k|        decoder->imageCount = 1;
 6594|   251k|        decoder->imageTiming.timescale = 1;
 6595|   251k|        decoder->imageTiming.pts = 0;
 6596|   251k|        decoder->imageTiming.ptsInTimescales = 0;
 6597|   251k|        decoder->imageTiming.duration = 1;
 6598|   251k|        decoder->imageTiming.durationInTimescales = 1;
 6599|   251k|        decoder->timescale = 1;
 6600|   251k|        decoder->duration = 1;
 6601|   251k|        decoder->durationInTimescales = 1;
 6602|       |
 6603|  2.25M|        for (int c = AVIF_ITEM_COLOR; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6603:39): [True: 2.00M, False: 250k]
  ------------------
 6604|  2.00M|            if (!mainItems[c]) {
  ------------------
  |  Branch (6604:17): [True: 1.72M, False: 279k]
  ------------------
 6605|  1.72M|                continue;
 6606|  1.72M|            }
 6607|   279k|            AVIF_ASSERT_OR_RETURN(c != AVIF_ITEM_SAMPLE_TRANSFORM); // See sampleTransformItem.
  ------------------
  |  |   64|   279k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   279k|    do {                        \
  |  |  |  |   46|   279k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 279k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   279k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 279k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6608|       |
 6609|   279k|            if (avifIsAlpha((avifItemCategory)c) && !mainItems[c]->width && !mainItems[c]->height) {
  ------------------
  |  Branch (6609:17): [True: 28.2k, False: 251k]
  |  Branch (6609:53): [True: 0, False: 28.2k]
  |  Branch (6609:77): [True: 0, False: 0]
  ------------------
 6610|       |                // NON-STANDARD: Alpha subimage does not have an ispe property; adopt width/height from color item
 6611|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6612|      0|                mainItems[c]->width = mainItems[AVIF_ITEM_COLOR]->width;
 6613|      0|                mainItems[c]->height = mainItems[AVIF_ITEM_COLOR]->height;
 6614|      0|            }
 6615|       |
 6616|   279k|            AVIF_CHECKRES(avifDecoderAdoptGridTileCodecTypeIfNeeded(decoder, mainItems[c], &data->tileInfos[c]));
  ------------------
  |  |   54|   279k|    do {                                  \
  |  |   55|   279k|        const avifResult result__ = (A);  \
  |  |   56|   279k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 50, False: 279k]
  |  |  ------------------
  |  |   57|     50|            avifBreakOnError();           \
  |  |   58|     50|            return result__;              \
  |  |   59|     50|        }                                 \
  |  |   60|   279k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 279k]
  |  |  ------------------
  ------------------
 6617|       |
 6618|   279k|            if (c == AVIF_ITEM_COLOR) {
  ------------------
  |  Branch (6618:17): [True: 251k, False: 28.4k]
  ------------------
 6619|   251k|                if (!(decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR)) {
  ------------------
  |  Branch (6619:21): [True: 192, False: 250k]
  ------------------
 6620|    192|                    continue;
 6621|    192|                }
 6622|   251k|            } else if (c == AVIF_ITEM_ALPHA) {
  ------------------
  |  Branch (6622:24): [True: 28.2k, False: 278]
  ------------------
 6623|  28.2k|                if (!(decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_ALPHA)) {
  ------------------
  |  Branch (6623:21): [True: 366, False: 27.8k]
  ------------------
 6624|    366|                    continue;
 6625|    366|                }
 6626|  28.2k|            } else if (c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR || c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_1_COLOR) {
  ------------------
  |  Branch (6626:24): [True: 138, False: 140]
  |  Branch (6626:73): [True: 0, False: 140]
  ------------------
 6627|    138|                AVIF_ASSERT_OR_RETURN((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR) &&
  ------------------
  |  |   64|    138|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    138|    do {                        \
  |  |  |  |   46|    276|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 138, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 138, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    138|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 138]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6628|    138|                                      (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_SAMPLE_TRANSFORMS));
 6629|    140|            } else if (c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA || c == AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_1_ALPHA) {
  ------------------
  |  Branch (6629:24): [True: 0, False: 140]
  |  Branch (6629:73): [True: 0, False: 140]
  ------------------
 6630|      0|                AVIF_ASSERT_OR_RETURN((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_ALPHA) &&
  ------------------
  |  |   64|      0|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|      0|    do {                        \
  |  |  |  |   46|      0|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 0, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6631|      0|                                      (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_SAMPLE_TRANSFORMS));
 6632|    140|            } else {
 6633|    140|                AVIF_ASSERT_OR_RETURN(c == AVIF_ITEM_GAIN_MAP);
  ------------------
  |  |   64|    140|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    140|    do {                        \
  |  |  |  |   46|    140|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 140]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    140|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 140]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6634|    140|                if (!(decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_GAIN_MAP)) {
  ------------------
  |  Branch (6634:21): [True: 0, False: 140]
  ------------------
 6635|      0|                    continue;
 6636|      0|                }
 6637|    140|            }
 6638|       |
 6639|   279k|            AVIF_CHECKRES(avifDecoderGenerateImageTiles(decoder, &data->tileInfos[c], mainItems[c], (avifItemCategory)c));
  ------------------
  |  |   54|   279k|    do {                                  \
  |  |   55|   279k|        const avifResult result__ = (A);  \
  |  |   56|   279k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 503, False: 278k]
  |  |  ------------------
  |  |   57|    503|            avifBreakOnError();           \
  |  |   58|    503|            return result__;              \
  |  |   59|    503|        }                                 \
  |  |   60|   279k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 278k]
  |  |  ------------------
  ------------------
 6640|       |
 6641|   278k|            avifStrictFlags strictFlags = decoder->strictFlags;
 6642|   278k|            if (avifIsAlpha((avifItemCategory)c) && !isAlphaItemInInput) {
  ------------------
  |  Branch (6642:17): [True: 27.8k, False: 250k]
  |  Branch (6642:53): [True: 4.32k, False: 23.5k]
  ------------------
 6643|       |                // In this case, the made up grid item will not have an associated pixi property. So validate everything else
 6644|       |                // but the pixi property.
 6645|  4.32k|                strictFlags &= ~(avifStrictFlags)AVIF_STRICT_PIXI_REQUIRED;
 6646|  4.32k|            }
 6647|   278k|            AVIF_CHECKRES(
  ------------------
  |  |   54|   278k|    do {                                  \
  |  |   55|   278k|        const avifResult result__ = (A);  \
  |  |   56|   278k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 205, False: 278k]
  |  |  ------------------
  |  |   57|    205|            avifBreakOnError();           \
  |  |   58|    205|            return result__;              \
  |  |   59|    205|        }                                 \
  |  |   60|   278k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 278k]
  |  |  ------------------
  ------------------
 6648|   278k|                avifDecoderItemValidateProperties(mainItems[c], avifGetConfigurationPropertyName(codecType[c]), &decoder->diag, strictFlags));
 6649|   278k|        }
 6650|       |
 6651|   250k|        if (mainItems[AVIF_ITEM_COLOR]->progressive) {
  ------------------
  |  Branch (6651:13): [True: 119, False: 250k]
  ------------------
 6652|    119|            decoder->progressiveState = AVIF_PROGRESSIVE_STATE_AVAILABLE;
 6653|       |            // data->tileInfos[AVIF_ITEM_COLOR].firstTileIndex is not yet defined but will be set to 0 a few lines below.
 6654|    119|            const avifTile * colorTile = &data->tiles.tile[0];
 6655|    119|            if (colorTile->input->samples.count > 1) {
  ------------------
  |  Branch (6655:17): [True: 0, False: 119]
  ------------------
 6656|      0|                decoder->progressiveState = AVIF_PROGRESSIVE_STATE_ACTIVE;
 6657|      0|                decoder->imageCount = (int)colorTile->input->samples.count;
 6658|      0|            }
 6659|    119|        }
 6660|       |
 6661|   250k|        decoder->image->width = mainItems[AVIF_ITEM_COLOR]->width;
 6662|   250k|        decoder->image->height = mainItems[AVIF_ITEM_COLOR]->height;
 6663|   250k|        decoder->alphaPresent = (mainItems[AVIF_ITEM_ALPHA] != NULL);
 6664|   250k|        decoder->image->alphaPremultiplied =
 6665|   250k|            decoder->alphaPresent && avifReferences(&mainItems[AVIF_ITEM_COLOR]->references, "prem", mainItems[AVIF_ITEM_ALPHA]->id);
  ------------------
  |  Branch (6665:13): [True: 28.2k, False: 222k]
  |  Branch (6665:38): [True: 0, False: 28.2k]
  ------------------
 6666|       |
 6667|   250k|        if (mainItems[AVIF_ITEM_ALPHA]) {
  ------------------
  |  Branch (6667:13): [True: 28.2k, False: 222k]
  ------------------
 6668|  28.2k|            alphaProperties = &mainItems[AVIF_ITEM_ALPHA]->properties;
 6669|  28.2k|        }
 6670|   250k|        if (mainItems[AVIF_ITEM_GAIN_MAP]) {
  ------------------
  |  Branch (6670:13): [True: 108, False: 250k]
  ------------------
 6671|    108|            AVIF_ASSERT_OR_RETURN(decoder->image->gainMap && decoder->image->gainMap->image);
  ------------------
  |  |   64|    108|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    108|    do {                        \
  |  |  |  |   46|    216|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 108, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 108, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    108|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 108]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6672|    108|            decoder->image->gainMap->image->width = mainItems[AVIF_ITEM_GAIN_MAP]->width;
 6673|    108|            decoder->image->gainMap->image->height = mainItems[AVIF_ITEM_GAIN_MAP]->height;
 6674|       |            // Must be called after avifDecoderAdoptGridTileCodecType() which among other things copies the
 6675|       |            // codec config property from the first tile of a grid to the grid item (when grids are used).
 6676|    108|            AVIF_CHECKRES(avifReadCodecConfigProperty(decoder->image->gainMap->image,
  ------------------
  |  |   54|    108|    do {                                  \
  |  |   55|    108|        const avifResult result__ = (A);  \
  |  |   56|    108|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 108]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    108|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 108]
  |  |  ------------------
  ------------------
 6677|    108|                                                      &mainItems[AVIF_ITEM_GAIN_MAP]->properties,
 6678|    108|                                                      codecType[AVIF_ITEM_GAIN_MAP]));
 6679|    108|            gainMapProperties = &mainItems[AVIF_ITEM_GAIN_MAP]->properties;
 6680|    108|        }
 6681|   250k|    }
 6682|       |
 6683|   284k|    uint32_t firstTileIndex = 0;
 6684|  2.55M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (6684:21): [True: 2.27M, False: 284k]
  ------------------
 6685|  2.27M|        data->tileInfos[c].firstTileIndex = firstTileIndex;
 6686|  2.27M|        firstTileIndex += data->tileInfos[c].tileCount;
 6687|  2.27M|    }
 6688|       |
 6689|       |    // Sanity check tiles
 6690|   619k|    for (uint32_t tileIndex = 0; tileIndex < data->tiles.count; ++tileIndex) {
  ------------------
  |  Branch (6690:34): [True: 335k, False: 284k]
  ------------------
 6691|   335k|        avifTile * tile = &data->tiles.tile[tileIndex];
 6692|   721k|        for (uint32_t sampleIndex = 0; sampleIndex < tile->input->samples.count; ++sampleIndex) {
  ------------------
  |  Branch (6692:40): [True: 386k, False: 335k]
  ------------------
 6693|   386k|            avifDecodeSample * sample = &tile->input->samples.sample[sampleIndex];
 6694|   386k|            if (!sample->size) {
  ------------------
  |  Branch (6694:17): [True: 4, False: 386k]
  ------------------
 6695|       |                // Every sample must have some data
 6696|      4|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 6697|      4|            }
 6698|       |
 6699|   386k|            if (tile->input->itemCategory == AVIF_ITEM_COLOR) {
  ------------------
  |  Branch (6699:17): [True: 352k, False: 33.4k]
  ------------------
 6700|   352k|                decoder->ioStats.colorOBUSize += sample->size;
 6701|   352k|            } else if (tile->input->itemCategory == AVIF_ITEM_ALPHA) {
  ------------------
  |  Branch (6701:24): [True: 33.0k, False: 407]
  ------------------
 6702|  33.0k|                decoder->ioStats.alphaOBUSize += sample->size;
 6703|  33.0k|            }
 6704|   386k|        }
 6705|   335k|    }
 6706|       |
 6707|   284k|    AVIF_CHECKRES(avifReadColorProperties(decoder->io,
  ------------------
  |  |   54|   284k|    do {                                  \
  |  |   55|   568k|        const avifResult result__ = (A);  \
  |  |  ------------------
  |  |  |  Branch (55:38): [True: 0, False: 284k]
  |  |  ------------------
  |  |   56|   284k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 2, False: 284k]
  |  |  ------------------
  |  |   57|      2|            avifBreakOnError();           \
  |  |   58|      2|            return result__;              \
  |  |   59|      2|        }                                 \
  |  |   60|   284k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 284k]
  |  |  ------------------
  ------------------
 6708|   284k|                                          colorProperties,
 6709|   284k|                                          decoder->ignoreICC ? NULL : &decoder->image->icc,
 6710|   284k|                                          &decoder->image->colorPrimaries,
 6711|   284k|                                          &decoder->image->transferCharacteristics,
 6712|   284k|                                          &decoder->image->matrixCoefficients,
 6713|   284k|                                          &decoder->image->yuvRange,
 6714|   284k|                                          &data->cicpSet));
 6715|       |
 6716|   284k|    const avifProperty * clliProp = avifPropertyArrayFind(colorProperties, "clli");
 6717|   284k|    if (clliProp) {
  ------------------
  |  Branch (6717:9): [True: 650, False: 283k]
  ------------------
 6718|    650|        decoder->image->clli = clliProp->u.clli;
 6719|    650|    }
 6720|       |
 6721|       |    // Transformations
 6722|   284k|    const avifProperty * paspProp = avifPropertyArrayFind(colorProperties, "pasp");
 6723|   284k|    if (paspProp) {
  ------------------
  |  Branch (6723:9): [True: 0, False: 284k]
  ------------------
 6724|      0|        decoder->image->transformFlags |= AVIF_TRANSFORM_PASP;
 6725|      0|        decoder->image->pasp = paspProp->u.pasp;
 6726|      0|    }
 6727|   284k|    const avifProperty * clapProp = avifPropertyArrayFind(colorProperties, "clap");
 6728|   284k|    if (clapProp) {
  ------------------
  |  Branch (6728:9): [True: 127, False: 283k]
  ------------------
 6729|    127|        decoder->image->transformFlags |= AVIF_TRANSFORM_CLAP;
 6730|    127|        decoder->image->clap = clapProp->u.clap;
 6731|    127|    }
 6732|   284k|    const avifProperty * irotProp = avifPropertyArrayFind(colorProperties, "irot");
 6733|   284k|    if (irotProp) {
  ------------------
  |  Branch (6733:9): [True: 4.04k, False: 280k]
  ------------------
 6734|  4.04k|        decoder->image->transformFlags |= AVIF_TRANSFORM_IROT;
 6735|  4.04k|        decoder->image->irot = irotProp->u.irot;
 6736|  4.04k|    }
 6737|   284k|    const avifProperty * imirProp = avifPropertyArrayFind(colorProperties, "imir");
 6738|   284k|    if (imirProp) {
  ------------------
  |  Branch (6738:9): [True: 301, False: 283k]
  ------------------
 6739|    301|        decoder->image->transformFlags |= AVIF_TRANSFORM_IMIR;
 6740|    301|        decoder->image->imir = imirProp->u.imir;
 6741|    301|    }
 6742|   284k|    if (alphaProperties) {
  ------------------
  |  Branch (6742:9): [True: 28.2k, False: 255k]
  ------------------
 6743|  28.2k|        AVIF_CHECKRES(avifDecoderCheckAlphaProperties(decoder, alphaProperties));
  ------------------
  |  |   54|  28.2k|    do {                                  \
  |  |   55|  28.2k|        const avifResult result__ = (A);  \
  |  |   56|  28.2k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 28.2k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|  28.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 28.2k]
  |  |  ------------------
  ------------------
 6744|  28.2k|    }
 6745|   284k|    if (gainMapProperties) {
  ------------------
  |  Branch (6745:9): [True: 107, False: 284k]
  ------------------
 6746|    107|        AVIF_CHECKRES(avifDecoderCheckGainMapProperties(decoder, gainMapProperties));
  ------------------
  |  |   54|    107|    do {                                  \
  |  |   55|    107|        const avifResult result__ = (A);  \
  |  |   56|    107|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 107]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    107|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 107]
  |  |  ------------------
  ------------------
 6747|    107|    }
 6748|       |
 6749|   284k|    if (!data->cicpSet && (data->tiles.count > 0)) {
  ------------------
  |  Branch (6749:9): [True: 283k, False: 1.08k]
  |  Branch (6749:27): [True: 282k, False: 97]
  ------------------
 6750|   282k|        avifTile * firstTile = &data->tiles.tile[0];
 6751|   282k|        if (firstTile->input->samples.count > 0) {
  ------------------
  |  Branch (6751:13): [True: 282k, False: 0]
  ------------------
 6752|   282k|            avifDecodeSample * sample = &firstTile->input->samples.sample[0];
 6753|       |
 6754|       |            // Harvest CICP from the AV1's sequence header, which should be very close to the front
 6755|       |            // of the first sample. Read in successively larger chunks until we successfully parse the sequence.
 6756|   282k|            static const size_t searchSampleChunkIncrement = 64;
 6757|   282k|            static const size_t searchSampleSizeMax = 4096;
 6758|   282k|            size_t searchSampleSize = 0;
 6759|   666k|            do {
 6760|   666k|                searchSampleSize += searchSampleChunkIncrement;
 6761|   666k|                if (searchSampleSize > sample->size) {
  ------------------
  |  Branch (6761:21): [True: 39.4k, False: 627k]
  ------------------
 6762|  39.4k|                    searchSampleSize = sample->size;
 6763|  39.4k|                }
 6764|       |
 6765|   666k|                avifResult prepareResult = avifDecoderPrepareSample(decoder, sample, searchSampleSize);
 6766|   666k|                if (prepareResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6766:21): [True: 270k, False: 396k]
  ------------------
 6767|   270k|                    return prepareResult;
 6768|   270k|                }
 6769|       |
 6770|   396k|                avifSequenceHeader sequenceHeader;
 6771|   396k|                if (avifSequenceHeaderParse(&sequenceHeader, &sample->data, firstTile->codecType)) {
  ------------------
  |  Branch (6771:21): [True: 10.3k, False: 385k]
  ------------------
 6772|  10.3k|                    data->cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|  10.3k|#define AVIF_TRUE 1
  ------------------
 6773|  10.3k|                    decoder->image->colorPrimaries = sequenceHeader.colorPrimaries;
 6774|  10.3k|                    decoder->image->transferCharacteristics = sequenceHeader.transferCharacteristics;
 6775|  10.3k|                    decoder->image->matrixCoefficients = sequenceHeader.matrixCoefficients;
 6776|  10.3k|                    decoder->image->yuvRange = sequenceHeader.range;
 6777|  10.3k|                    break;
 6778|  10.3k|                }
 6779|   396k|            } while (searchSampleSize != sample->size && searchSampleSize < searchSampleSizeMax);
  ------------------
  |  Branch (6779:22): [True: 383k, False: 1.89k]
  |  Branch (6779:58): [True: 383k, False: 3]
  ------------------
 6780|   282k|        }
 6781|   282k|    }
 6782|       |
 6783|  13.4k|    AVIF_CHECKRES(avifReadCodecConfigProperty(decoder->image, colorProperties, colorCodecType));
  ------------------
  |  |   54|  13.4k|    do {                                  \
  |  |   55|  13.4k|        const avifResult result__ = (A);  \
  |  |   56|  13.4k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 10, False: 13.4k]
  |  |  ------------------
  |  |   57|     10|            avifBreakOnError();           \
  |  |   58|     10|            return result__;              \
  |  |   59|     10|        }                                 \
  |  |   60|  13.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 13.4k]
  |  |  ------------------
  ------------------
 6784|  13.4k|    if (decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (6784:9): [True: 136, False: 13.2k]
  ------------------
 6785|    136|        AVIF_ASSERT_OR_RETURN(decoder->data->meta->sampleTransformDepth != 0);
  ------------------
  |  |   64|    136|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    136|    do {                        \
  |  |  |  |   46|    136|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 136]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    136|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 136]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6786|    136|        decoder->image->depth = decoder->data->meta->sampleTransformDepth;
 6787|    136|    }
 6788|       |
 6789|       |    // Expose as raw bytes all other properties that libavif does not care about.
 6790|  67.2k|    for (size_t i = 0; i < colorProperties->count; ++i) {
  ------------------
  |  Branch (6790:24): [True: 53.8k, False: 13.4k]
  ------------------
 6791|  53.8k|        const avifProperty * property = &colorProperties->prop[i];
 6792|  53.8k|        if (property->isOpaque) {
  ------------------
  |  Branch (6792:13): [True: 9.15k, False: 44.6k]
  ------------------
 6793|  9.15k|            AVIF_CHECKRES(avifImagePushProperty(decoder->image,
  ------------------
  |  |   54|  9.15k|    do {                                  \
  |  |   55|  9.15k|        const avifResult result__ = (A);  \
  |  |   56|  9.15k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 9.15k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  9.15k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 9.15k]
  |  |  ------------------
  ------------------
 6794|  9.15k|                                                property->type,
 6795|  9.15k|                                                property->u.opaque.usertype,
 6796|  9.15k|                                                property->u.opaque.boxPayload.data,
 6797|  9.15k|                                                property->u.opaque.boxPayload.size));
 6798|  9.15k|        }
 6799|  53.8k|    }
 6800|       |
 6801|  13.4k|    if (gainMapProperties) {
  ------------------
  |  Branch (6801:9): [True: 107, False: 13.3k]
  ------------------
 6802|    530|        for (size_t i = 0; i < gainMapProperties->count; ++i) {
  ------------------
  |  Branch (6802:28): [True: 423, False: 107]
  ------------------
 6803|    423|            const avifProperty * property = &gainMapProperties->prop[i];
 6804|    423|            if (property->isOpaque) {
  ------------------
  |  Branch (6804:17): [True: 26, False: 397]
  ------------------
 6805|     26|                AVIF_CHECKRES(avifImagePushProperty(decoder->image->gainMap->image,
  ------------------
  |  |   54|     26|    do {                                  \
  |  |   55|     26|        const avifResult result__ = (A);  \
  |  |   56|     26|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 26]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     26|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 26]
  |  |  ------------------
  ------------------
 6806|     26|                                                    property->type,
 6807|     26|                                                    property->u.opaque.usertype,
 6808|     26|                                                    property->u.opaque.boxPayload.data,
 6809|     26|                                                    property->u.opaque.boxPayload.size));
 6810|     26|            }
 6811|    423|        }
 6812|    107|    }
 6813|  13.4k|    return AVIF_RESULT_OK;
 6814|  13.4k|}
avifDecoderNextImage:
 7134|   309k|{
 7135|   309k|    avifDiagnosticsClearError(&decoder->diag);
 7136|       |
 7137|   309k|    if (!decoder->data || decoder->data->tiles.count == 0) {
  ------------------
  |  Branch (7137:9): [True: 0, False: 309k]
  |  Branch (7137:27): [True: 168, False: 309k]
  ------------------
 7138|       |        // Nothing has been parsed yet
 7139|    168|        return AVIF_RESULT_NO_CONTENT;
 7140|    168|    }
 7141|       |
 7142|   309k|    if (!decoder->io || !decoder->io->read) {
  ------------------
  |  Branch (7142:9): [True: 0, False: 309k]
  |  Branch (7142:25): [True: 0, False: 309k]
  ------------------
 7143|      0|        return AVIF_RESULT_IO_NOT_SET;
 7144|      0|    }
 7145|       |
 7146|   309k|    if (avifDecoderDataFrameFullyDecoded(decoder->data)) {
  ------------------
  |  Branch (7146:9): [True: 0, False: 309k]
  ------------------
 7147|       |        // A frame was decoded during the last avifDecoderNextImage() call.
 7148|      0|        for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7148:25): [True: 0, False: 0]
  ------------------
 7149|      0|            decoder->data->tileInfos[c].decodedTileCount = 0;
 7150|      0|        }
 7151|      0|    }
 7152|       |
 7153|   309k|    AVIF_ASSERT_OR_RETURN(decoder->data->tiles.count == (decoder->data->tileInfos[AVIF_ITEM_CATEGORY_COUNT - 1].firstTileIndex +
  ------------------
  |  |   64|   309k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   309k|    do {                        \
  |  |  |  |   46|   309k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 309k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   309k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 309k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7154|   309k|                                                         decoder->data->tileInfos[AVIF_ITEM_CATEGORY_COUNT - 1].tileCount));
 7155|       |
 7156|   309k|    const uint32_t nextImageIndex = (uint32_t)(decoder->imageIndex + 1);
 7157|       |
 7158|       |    // Ensure that we have created the codecs before proceeding with the decoding.
 7159|   309k|    if (!decoder->data->tiles.tile[0].codec) {
  ------------------
  |  Branch (7159:9): [True: 13.2k, False: 296k]
  ------------------
 7160|  13.2k|        AVIF_CHECKRES(avifDecoderCreateCodecs(decoder));
  ------------------
  |  |   54|  13.2k|    do {                                  \
  |  |   55|  13.2k|        const avifResult result__ = (A);  \
  |  |   56|  13.2k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 13.2k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  13.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 13.2k]
  |  |  ------------------
  ------------------
 7161|  13.2k|    }
 7162|       |
 7163|       |    // Acquire all sample data for the current image first, allowing for any read call to bail out
 7164|       |    // with AVIF_RESULT_WAITING_ON_IO harmlessly / idempotently, unless decoder->allowIncremental.
 7165|   309k|    avifResult prepareTileResult[AVIF_ITEM_CATEGORY_COUNT];
 7166|  2.78M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7166:21): [True: 2.47M, False: 309k]
  ------------------
 7167|  2.47M|        prepareTileResult[c] = avifDecoderPrepareTiles(decoder, nextImageIndex, &decoder->data->tileInfos[c]);
 7168|  2.47M|        if (!decoder->allowIncremental || (prepareTileResult[c] != AVIF_RESULT_WAITING_ON_IO)) {
  ------------------
  |  Branch (7168:13): [True: 80.9k, False: 2.39M]
  |  Branch (7168:43): [True: 2.06M, False: 325k]
  ------------------
 7169|  2.15M|            AVIF_CHECKRES(prepareTileResult[c]);
  ------------------
  |  |   54|  2.15M|    do {                                  \
  |  |   55|  2.15M|        const avifResult result__ = (A);  \
  |  |   56|  2.15M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 99, False: 2.15M]
  |  |  ------------------
  |  |   57|     99|            avifBreakOnError();           \
  |  |   58|     99|            return result__;              \
  |  |   59|     99|        }                                 \
  |  |   60|  2.15M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 2.15M]
  |  |  ------------------
  ------------------
 7170|  2.15M|        }
 7171|  2.47M|    }
 7172|       |
 7173|       |    // Decode all available color tiles now, then all available alpha tiles, then all available bit
 7174|       |    // depth extension tiles. The order of appearance of the tiles in the bitstream is left to the
 7175|       |    // encoder's choice, and decoding as many as possible of each category in parallel is beneficial
 7176|       |    // for incremental decoding, as pixel rows need all channels to be decoded before being
 7177|       |    // accessible to the user.
 7178|  2.73M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7178:21): [True: 2.43M, False: 303k]
  ------------------
 7179|  2.43M|        AVIF_CHECKRES(avifDecoderDecodeTiles(decoder, nextImageIndex, &decoder->data->tileInfos[c]));
  ------------------
  |  |   54|  2.43M|    do {                                  \
  |  |   55|  2.43M|        const avifResult result__ = (A);  \
  |  |   56|  2.43M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 5.97k, False: 2.42M]
  |  |  ------------------
  |  |   57|  5.97k|            avifBreakOnError();           \
  |  |   58|  5.97k|            return result__;              \
  |  |   59|  5.97k|        }                                 \
  |  |   60|  2.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 2.42M]
  |  |  ------------------
  ------------------
 7180|  2.43M|    }
 7181|       |
 7182|   303k|    if (!avifDecoderDataFrameFullyDecoded(decoder->data)) {
  ------------------
  |  Branch (7182:9): [True: 296k, False: 7.17k]
  ------------------
 7183|   296k|        AVIF_ASSERT_OR_RETURN(decoder->allowIncremental);
  ------------------
  |  |   64|   296k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   296k|    do {                        \
  |  |  |  |   46|   296k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 296k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   296k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 296k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7184|       |        // The image is not completely decoded. There should be no error unrelated to missing bytes,
 7185|       |        // and at least some missing bytes.
 7186|   296k|        avifResult firstNonOkResult = AVIF_RESULT_OK;
 7187|  2.66M|        for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7187:25): [True: 2.37M, False: 296k]
  ------------------
 7188|  2.37M|            AVIF_ASSERT_OR_RETURN(prepareTileResult[c] == AVIF_RESULT_OK || prepareTileResult[c] == AVIF_RESULT_WAITING_ON_IO);
  ------------------
  |  |   64|  2.37M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  2.37M|    do {                        \
  |  |  |  |   46|  2.69M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 2.04M, False: 325k]
  |  |  |  |  |  Branch (46:15): [True: 325k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  2.37M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 2.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7189|  2.37M|            if (firstNonOkResult == AVIF_RESULT_OK) {
  ------------------
  |  Branch (7189:17): [True: 296k, False: 2.07M]
  ------------------
 7190|   296k|                firstNonOkResult = prepareTileResult[c];
 7191|   296k|            }
 7192|  2.37M|        }
 7193|   296k|        AVIF_ASSERT_OR_RETURN(firstNonOkResult != AVIF_RESULT_OK);
  ------------------
  |  |   64|   296k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   296k|    do {                        \
  |  |  |  |   46|   296k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 296k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   296k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 296k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7194|       |        // Return the "not enough bytes" status now instead of moving on to the next frame.
 7195|   296k|        return AVIF_RESULT_WAITING_ON_IO;
 7196|   296k|    }
 7197|  64.6k|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7197:21): [True: 57.4k, False: 7.17k]
  ------------------
 7198|  57.4k|        AVIF_ASSERT_OR_RETURN(prepareTileResult[c] == AVIF_RESULT_OK);
  ------------------
  |  |   64|  57.4k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  57.4k|    do {                        \
  |  |  |  |   46|  57.4k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 57.4k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  57.4k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 57.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7199|  57.4k|    }
 7200|       |
 7201|       |    // If decoder->data->tileInfos[AVIF_ITEM_COLOR].tileCount == 0, it means
 7202|       |    // decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR was equal to 0.
 7203|       |    // Only apply Sample Transforms if there is a color item to apply it onto.
 7204|  7.17k|    if (decoder->data->tileInfos[AVIF_ITEM_COLOR].tileCount != 0 && decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (7204:9): [True: 7.13k, False: 47]
  |  Branch (7204:69): [True: 113, False: 7.01k]
  ------------------
 7205|    113|        AVIF_CHECKRES(avifDecoderApplySampleTransform(decoder, decoder->image));
  ------------------
  |  |   54|    113|    do {                                  \
  |  |   55|    113|        const avifResult result__ = (A);  \
  |  |   56|    113|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 112]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|    113|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 112]
  |  |  ------------------
  ------------------
 7206|    113|    }
 7207|       |
 7208|       |    // Only advance decoder->imageIndex once the image is completely decoded, so that
 7209|       |    // avifDecoderNthImage(decoder, decoder->imageIndex + 1) is equivalent to avifDecoderNextImage(decoder)
 7210|       |    // if the previous call to avifDecoderNextImage() returned AVIF_RESULT_WAITING_ON_IO.
 7211|  7.17k|    decoder->imageIndex = (int)nextImageIndex;
 7212|       |    // The decoded tile counts will be reset to 0 the next time avifDecoderNextImage() is called,
 7213|       |    // for avifDecoderDecodedRowCount() to work until then.
 7214|  7.17k|    if (decoder->data->sourceSampleTable) {
  ------------------
  |  Branch (7214:9): [True: 491, False: 6.68k]
  ------------------
 7215|       |        // Decoding from a track! Provide timing information.
 7216|       |
 7217|    491|        avifResult timingResult = avifDecoderNthImageTiming(decoder, decoder->imageIndex, &decoder->imageTiming);
 7218|    491|        if (timingResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7218:13): [True: 0, False: 491]
  ------------------
 7219|      0|            return timingResult;
 7220|      0|        }
 7221|    491|    }
 7222|  7.17k|    return AVIF_RESULT_OK;
 7223|  7.17k|}
avifDecoderNthImageTiming:
 7226|    491|{
 7227|    491|    if (!decoder->data) {
  ------------------
  |  Branch (7227:9): [True: 0, False: 491]
  ------------------
 7228|       |        // Nothing has been parsed yet
 7229|      0|        return AVIF_RESULT_NO_CONTENT;
 7230|      0|    }
 7231|       |
 7232|    491|    if ((frameIndex > INT_MAX) || ((int)frameIndex >= decoder->imageCount)) {
  ------------------
  |  Branch (7232:9): [True: 0, False: 491]
  |  Branch (7232:35): [True: 0, False: 491]
  ------------------
 7233|       |        // Impossible index
 7234|      0|        return AVIF_RESULT_NO_IMAGES_REMAINING;
 7235|      0|    }
 7236|       |
 7237|    491|    if (!decoder->data->sourceSampleTable) {
  ------------------
  |  Branch (7237:9): [True: 0, False: 491]
  ------------------
 7238|       |        // There isn't any real timing associated with this decode, so
 7239|       |        // just hand back the defaults chosen in avifDecoderReset().
 7240|      0|        *outTiming = decoder->imageTiming;
 7241|      0|        return AVIF_RESULT_OK;
 7242|      0|    }
 7243|       |
 7244|    491|    outTiming->timescale = decoder->timescale;
 7245|    491|    outTiming->ptsInTimescales = 0;
 7246|    491|    for (uint32_t imageIndex = 0; imageIndex < frameIndex; ++imageIndex) {
  ------------------
  |  Branch (7246:35): [True: 0, False: 491]
  ------------------
 7247|      0|        outTiming->ptsInTimescales += avifSampleTableGetImageDelta(decoder->data->sourceSampleTable, imageIndex);
 7248|      0|    }
 7249|    491|    outTiming->durationInTimescales = avifSampleTableGetImageDelta(decoder->data->sourceSampleTable, frameIndex);
 7250|       |
 7251|    491|    if (outTiming->timescale > 0) {
  ------------------
  |  Branch (7251:9): [True: 179, False: 312]
  ------------------
 7252|    179|        outTiming->pts = (double)outTiming->ptsInTimescales / (double)outTiming->timescale;
 7253|    179|        outTiming->duration = (double)outTiming->durationInTimescales / (double)outTiming->timescale;
 7254|    312|    } else {
 7255|    312|        outTiming->pts = 0.0;
 7256|    312|        outTiming->duration = 0.0;
 7257|    312|    }
 7258|    491|    return AVIF_RESULT_OK;
 7259|    491|}
avifDecoderNthImage:
 7262|   144k|{
 7263|   144k|    avifDiagnosticsClearError(&decoder->diag);
 7264|       |
 7265|   144k|    if (!decoder->data) {
  ------------------
  |  Branch (7265:9): [True: 0, False: 144k]
  ------------------
 7266|       |        // Nothing has been parsed yet
 7267|      0|        return AVIF_RESULT_NO_CONTENT;
 7268|      0|    }
 7269|       |
 7270|   144k|    if ((frameIndex > INT_MAX) || ((int)frameIndex >= decoder->imageCount)) {
  ------------------
  |  Branch (7270:9): [True: 0, False: 144k]
  |  Branch (7270:35): [True: 0, False: 144k]
  ------------------
 7271|       |        // Impossible index
 7272|      0|        return AVIF_RESULT_NO_IMAGES_REMAINING;
 7273|      0|    }
 7274|       |
 7275|   144k|    int requestedIndex = (int)frameIndex;
 7276|   144k|    if (requestedIndex == (decoder->imageIndex + 1)) {
  ------------------
  |  Branch (7276:9): [True: 144k, False: 0]
  ------------------
 7277|       |        // It's just the next image (already partially decoded or not at all), nothing special here
 7278|   144k|        return avifDecoderNextImage(decoder);
 7279|   144k|    }
 7280|       |
 7281|      0|    if (requestedIndex == decoder->imageIndex) {
  ------------------
  |  Branch (7281:9): [True: 0, False: 0]
  ------------------
 7282|      0|        if (avifDecoderDataFrameFullyDecoded(decoder->data)) {
  ------------------
  |  Branch (7282:13): [True: 0, False: 0]
  ------------------
 7283|       |            // The current fully decoded image (decoder->imageIndex) is requested, nothing to do
 7284|      0|            return AVIF_RESULT_OK;
 7285|      0|        }
 7286|       |        // The next image (decoder->imageIndex + 1) is partially decoded but
 7287|       |        // the previous image (decoder->imageIndex) is requested.
 7288|       |        // Fall through to resetting the decoder data and start decoding from
 7289|       |        // the nearest key frame.
 7290|      0|    }
 7291|       |
 7292|      0|    int nearestKeyFrame = (int)avifDecoderNearestKeyframe(decoder, frameIndex);
 7293|      0|    if ((nearestKeyFrame > (decoder->imageIndex + 1)) || (requestedIndex <= decoder->imageIndex)) {
  ------------------
  |  Branch (7293:9): [True: 0, False: 0]
  |  Branch (7293:58): [True: 0, False: 0]
  ------------------
 7294|       |        // If we get here, we need to start decoding from the nearest key frame.
 7295|       |        // So discard the unused decoder state and its previous frames. This
 7296|       |        // will force the setup of new AV1 decoder (avifCodec) instances in
 7297|       |        // avifDecoderNextImage().
 7298|      0|        decoder->imageIndex = nearestKeyFrame - 1; // prepare to read nearest keyframe
 7299|      0|        avifDecoderDataResetCodec(decoder->data);
 7300|      0|    }
 7301|      0|    for (;;) {
 7302|      0|        avifResult result = avifDecoderNextImage(decoder);
 7303|      0|        if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7303:13): [True: 0, False: 0]
  ------------------
 7304|      0|            return result;
 7305|      0|        }
 7306|       |
 7307|      0|        if (requestedIndex == decoder->imageIndex) {
  ------------------
  |  Branch (7307:13): [True: 0, False: 0]
  ------------------
 7308|      0|            break;
 7309|      0|        }
 7310|      0|    }
 7311|      0|    return AVIF_RESULT_OK;
 7312|      0|}
avifDecoderDecodedRowCount:
 7375|   299k|{
 7376|   299k|    if (decoder->data->tileInfos[AVIF_ITEM_COLOR].tileCount == 0) {
  ------------------
  |  Branch (7376:9): [True: 20, False: 299k]
  ------------------
 7377|       |        // decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR
 7378|       |        // was likely 0 when avifDecoderNextImage() was called.
 7379|       |        // avifDecoderDecodedRowCount() only describes decoder->image->yuvPlanes[0].
 7380|       |        // There is no available luma plane, so return 0 decoded rows.
 7381|     20|        return 0;
 7382|     20|    }
 7383|       |
 7384|   299k|    uint32_t minRowCount = decoder->image->height;
 7385|  2.69M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7385:21): [True: 2.39M, False: 299k]
  ------------------
 7386|  2.39M|        if (c == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (7386:13): [True: 299k, False: 2.09M]
  ------------------
 7387|   299k|            const avifImage * const gainMap = decoder->image->gainMap ? decoder->image->gainMap->image : NULL;
  ------------------
  |  Branch (7387:47): [True: 12, False: 299k]
  ------------------
 7388|   299k|            if (gainMap != NULL && gainMap->height != 0 && decoder->data->tileInfos[AVIF_ITEM_GAIN_MAP].tileCount != 0) {
  ------------------
  |  Branch (7388:17): [True: 10, False: 299k]
  |  Branch (7388:36): [True: 10, False: 0]
  |  Branch (7388:60): [True: 10, False: 0]
  ------------------
 7389|     10|                uint32_t gainMapRowCount = avifGetDecodedRowCount(decoder, &decoder->data->tileInfos[AVIF_ITEM_GAIN_MAP], gainMap);
 7390|     10|                if (gainMap->height != decoder->image->height) {
  ------------------
  |  Branch (7390:21): [True: 10, False: 0]
  ------------------
 7391|     10|                    const uint32_t scaledGainMapRowCount =
 7392|     10|                        (uint32_t)floorf((float)gainMapRowCount / gainMap->height * decoder->image->height);
 7393|       |                    // Make sure it matches the formula described in the comment of avifDecoderDecodedRowCount() in avif.h.
 7394|     10|                    AVIF_CHECKERR((uint32_t)lround((double)scaledGainMapRowCount / decoder->image->height *
  ------------------
  |  |   45|     10|    do {                        \
  |  |   46|     10|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 10]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10]
  |  |  ------------------
  ------------------
 7395|     10|                                                   decoder->image->gainMap->image->height) <= gainMapRowCount,
 7396|     10|                                  0);
 7397|     10|                    gainMapRowCount = scaledGainMapRowCount;
 7398|     10|                }
 7399|     10|                minRowCount = AVIF_MIN(minRowCount, gainMapRowCount);
  ------------------
  |  |   19|     10|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 0, False: 10]
  |  |  ------------------
  ------------------
 7400|     10|            }
 7401|   299k|            continue;
 7402|   299k|        }
 7403|  2.09M|        const uint32_t rowCount = avifGetDecodedRowCount(decoder, &decoder->data->tileInfos[c], decoder->image);
 7404|  2.09M|        minRowCount = AVIF_MIN(minRowCount, rowCount);
  ------------------
  |  |   19|  2.09M|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 1.74M, False: 346k]
  |  |  ------------------
  ------------------
 7405|  2.09M|    }
 7406|   299k|    return minRowCount;
 7407|   299k|}
avifDecoderRead:
 7410|  13.3k|{
 7411|  13.3k|    avifResult result = avifDecoderParse(decoder);
 7412|  13.3k|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7412:9): [True: 2.96k, False: 10.3k]
  ------------------
 7413|  2.96k|        return result;
 7414|  2.96k|    }
 7415|  10.3k|    result = avifDecoderNextImage(decoder);
 7416|  10.3k|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (7416:9): [True: 6.22k, False: 4.14k]
  ------------------
 7417|  6.22k|        return result;
 7418|  6.22k|    }
 7419|       |    // If decoder->image->imageOwnsYUVPlanes is true and decoder->image is not used after this call,
 7420|       |    // the ownership of the planes in decoder->image could be transferred here instead of copied.
 7421|       |    // However most codec_*.c implementations allocate the output buffer themselves and return a
 7422|       |    // view, unless some postprocessing is applied (container-level grid reconstruction for
 7423|       |    // example), so the first condition rarely holds.
 7424|       |    // The second condition does not hold either: it is not required by the documentation in avif.h.
 7425|  4.14k|    return avifImageCopy(image, decoder->image, AVIF_PLANES_ALL);
 7426|  10.3k|}
read.c:avifParseFileTypeBox:
 4891|  1.68M|{
 4892|  1.68M|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ftyp]");
  ------------------
  |  |  810|  1.68M|    avifROStream VARNAME;                               \
  |  |  811|  1.68M|    avifROData VARNAME##_roData;                        \
  |  |  812|  1.68M|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  1.68M|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  1.68M|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4893|       |
 4894|  1.68M|    AVIF_CHECK(avifROStreamRead(&s, ftyp->majorBrand, 4));
  ------------------
  |  |   36|  1.68M|    do {                        \
  |  |   37|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 8, False: 1.68M]
  |  |  ------------------
  |  |   38|      8|            avifBreakOnError(); \
  |  |   39|      8|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      8|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      8|        }                       \
  |  |   41|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
 4895|  1.68M|    AVIF_CHECK(avifROStreamRead(&s, ftyp->minorVersion, 4));
  ------------------
  |  |   36|  1.68M|    do {                        \
  |  |   37|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 1.68M]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
 4896|       |
 4897|  1.68M|    size_t compatibleBrandsBytes = avifROStreamRemainingBytes(&s);
 4898|  1.68M|    if ((compatibleBrandsBytes % 4) != 0) {
  ------------------
  |  Branch (4898:9): [True: 8, False: 1.68M]
  ------------------
 4899|      8|        avifDiagnosticsPrintf(diag, "Box[ftyp] contains a compatible brands section that isn't divisible by 4 [%zu]", compatibleBrandsBytes);
 4900|      8|        return AVIF_FALSE;
  ------------------
  |  |   89|      8|#define AVIF_FALSE 0
  ------------------
 4901|      8|    }
 4902|  1.68M|    ftyp->compatibleBrands = avifROStreamCurrent(&s);
 4903|  1.68M|    AVIF_CHECK(avifROStreamSkip(&s, compatibleBrandsBytes));
  ------------------
  |  |   36|  1.68M|    do {                        \
  |  |   37|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 1.68M]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
 4904|  1.68M|    ftyp->compatibleBrandsCount = (int)compatibleBrandsBytes / 4;
 4905|       |
 4906|  1.68M|    return AVIF_TRUE;
  ------------------
  |  |   88|  1.68M|#define AVIF_TRUE 1
  ------------------
 4907|  1.68M|}
read.c:avifFileTypeIsCompatible:
 5141|  1.68M|{
 5142|  1.68M|    return avifFileTypeHasBrand(ftyp, "avif") || avifFileTypeHasBrand(ftyp, "avis")
  ------------------
  |  Branch (5142:12): [True: 1.48M, False: 197k]
  |  Branch (5142:50): [True: 197k, False: 7]
  ------------------
 5143|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5144|       |           || avifFileTypeHasBrand(ftyp, "mif3")
 5145|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 5146|  1.68M|        ;
 5147|  1.68M|}
read.c:avifFileTypeHasBrand:
 5126|  6.92M|{
 5127|  6.92M|    if (!memcmp(ftyp->majorBrand, brand, 4)) {
  ------------------
  |  Branch (5127:9): [True: 2.64M, False: 4.28M]
  ------------------
 5128|  2.64M|        return AVIF_TRUE;
  ------------------
  |  |   88|  2.64M|#define AVIF_TRUE 1
  ------------------
 5129|  2.64M|    }
 5130|       |
 5131|  20.0M|    for (int compatibleBrandIndex = 0; compatibleBrandIndex < ftyp->compatibleBrandsCount; ++compatibleBrandIndex) {
  ------------------
  |  Branch (5131:40): [True: 16.8M, False: 3.22M]
  ------------------
 5132|  16.8M|        const uint8_t * compatibleBrand = &ftyp->compatibleBrands[4 * compatibleBrandIndex];
 5133|  16.8M|        if (!memcmp(compatibleBrand, brand, 4)) {
  ------------------
  |  Branch (5133:13): [True: 1.06M, False: 15.7M]
  ------------------
 5134|  1.06M|            return AVIF_TRUE;
  ------------------
  |  |   88|  1.06M|#define AVIF_TRUE 1
  ------------------
 5135|  1.06M|        }
 5136|  16.8M|    }
 5137|  3.22M|    return AVIF_FALSE;
  ------------------
  |  |   89|  3.22M|#define AVIF_FALSE 0
  ------------------
 5138|  4.28M|}
read.c:avifDecoderCleanup:
 5202|  1.80M|{
 5203|  1.80M|    if (decoder->data) {
  ------------------
  |  Branch (5203:9): [True: 1.79M, False: 13.3k]
  ------------------
 5204|  1.79M|        avifDecoderDataDestroy(decoder->data);
 5205|  1.79M|        decoder->data = NULL;
 5206|  1.79M|    }
 5207|       |
 5208|  1.80M|    if (decoder->image) {
  ------------------
  |  Branch (5208:9): [True: 370k, False: 1.43M]
  ------------------
 5209|   370k|        avifImageDestroy(decoder->image);
 5210|       |        decoder->image = NULL;
 5211|   370k|    }
 5212|  1.80M|    avifDiagnosticsClearError(&decoder->diag);
 5213|  1.80M|}
read.c:avifDecoderDataDestroy:
 1216|  1.79M|{
 1217|  1.79M|    if (data->meta) {
  ------------------
  |  Branch (1217:9): [True: 1.79M, False: 0]
  ------------------
 1218|  1.79M|        avifMetaDestroy(data->meta);
 1219|  1.79M|    }
 1220|  1.93M|    for (uint32_t i = 0; i < data->tracks.count; ++i) {
  ------------------
  |  Branch (1220:26): [True: 135k, False: 1.79M]
  ------------------
 1221|   135k|        avifTrack * track = &data->tracks.track[i];
 1222|   135k|        if (track->sampleTable) {
  ------------------
  |  Branch (1222:13): [True: 113k, False: 22.0k]
  ------------------
 1223|   113k|            avifSampleTableDestroy(track->sampleTable);
 1224|   113k|        }
 1225|   135k|        if (track->meta) {
  ------------------
  |  Branch (1225:13): [True: 135k, False: 0]
  ------------------
 1226|   135k|            avifMetaDestroy(track->meta);
 1227|   135k|        }
 1228|   135k|        avifArrayDestroy(&track->references);
 1229|   135k|    }
 1230|  1.79M|    avifArrayDestroy(&data->tracks);
 1231|  1.79M|    avifDecoderDataClearTiles(data);
 1232|  1.79M|    avifArrayDestroy(&data->tiles);
 1233|  1.79M|    avifArrayDestroy(&data->compatibleBrands);
 1234|  1.79M|    avifFree(data);
 1235|  1.79M|}
read.c:avifMetaDestroy:
  940|  1.93M|{
  941|  3.61M|    for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (941:26): [True: 1.68M, False: 1.93M]
  ------------------
  942|  1.68M|        avifDecoderItem * item = meta->items.item[i];
  943|  1.68M|        avifPropertyArrayDestroy(&item->properties);
  944|  1.68M|        avifArrayDestroy(&item->extents);
  945|  1.68M|        avifArrayDestroy(&item->references);
  946|  1.68M|        avifArrayDestroy(&item->dimgInputs);
  947|  1.68M|        if (item->ownsMergedExtents) {
  ------------------
  |  Branch (947:13): [True: 246k, False: 1.43M]
  ------------------
  948|   246k|            avifRWDataFree(&item->mergedExtents);
  949|   246k|        }
  950|  1.68M|        avifFree(item);
  951|  1.68M|    }
  952|  1.93M|    avifArrayDestroy(&meta->items);
  953|  1.93M|    avifPropertyArrayDestroy(&meta->properties);
  954|  1.93M|    avifRWDataFree(&meta->idat);
  955|  1.93M|    avifArrayDestroy(&meta->sampleTransformExpression);
  956|  1.99M|    for (uint32_t i = 0; i < meta->entityToGroups.count; ++i) {
  ------------------
  |  Branch (956:26): [True: 62.6k, False: 1.93M]
  ------------------
  957|  62.6k|        avifArrayDestroy(&meta->entityToGroups.groups[i].entityIDs);
  958|  62.6k|    }
  959|  1.93M|    avifArrayDestroy(&meta->entityToGroups);
  960|  1.93M|    avifFree(meta);
  961|  1.93M|}
read.c:avifPropertyArrayDestroy:
  402|  3.71M|{
  403|  11.6M|    for (size_t i = 0; i < array->count; ++i) {
  ------------------
  |  Branch (403:24): [True: 7.89M, False: 3.71M]
  ------------------
  404|  7.89M|        if (array->prop[i].isOpaque) {
  ------------------
  |  Branch (404:13): [True: 1.61M, False: 6.28M]
  ------------------
  405|  1.61M|            avifRWDataFree(&array->prop[i].u.opaque.boxPayload);
  406|  1.61M|        }
  407|  7.89M|    }
  408|  3.71M|    avifArrayDestroy(array);
  409|  3.71M|}
read.c:avifSampleTableDestroy:
  412|   113k|{
  413|   113k|    avifArrayDestroy(&sampleTable->chunks);
  414|   216k|    for (uint32_t i = 0; i < sampleTable->sampleDescriptions.count; ++i) {
  ------------------
  |  Branch (414:26): [True: 103k, False: 113k]
  ------------------
  415|   103k|        avifSampleDescription * description = &sampleTable->sampleDescriptions.description[i];
  416|   103k|        avifPropertyArrayDestroy(&description->properties);
  417|   103k|    }
  418|   113k|    avifArrayDestroy(&sampleTable->sampleDescriptions);
  419|   113k|    avifArrayDestroy(&sampleTable->sampleToChunks);
  420|   113k|    avifArrayDestroy(&sampleTable->sampleSizes);
  421|   113k|    avifArrayDestroy(&sampleTable->timeToSamples);
  422|   113k|    avifArrayDestroy(&sampleTable->syncSamples);
  423|   113k|    avifFree(sampleTable);
  424|   113k|}
read.c:avifMetaFindOrCreateItem:
  981|  5.17M|{
  982|  5.17M|    *item = NULL;
  983|  5.17M|    AVIF_ASSERT_OR_RETURN(itemID != 0);
  ------------------
  |  |   64|  5.17M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  5.17M|    do {                        \
  |  |  |  |   46|  5.17M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 5.17M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  5.17M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 5.17M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  984|       |
  985|  12.2M|    for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (985:26): [True: 10.5M, False: 1.68M]
  ------------------
  986|  10.5M|        if (meta->items.item[i]->id == itemID) {
  ------------------
  |  Branch (986:13): [True: 3.49M, False: 7.05M]
  ------------------
  987|  3.49M|            *item = meta->items.item[i];
  988|  3.49M|            return AVIF_RESULT_OK;
  989|  3.49M|        }
  990|  10.5M|    }
  991|       |
  992|  1.68M|    avifDecoderItem ** itemPtr = (avifDecoderItem **)avifArrayPush(&meta->items);
  993|  1.68M|    AVIF_CHECKERR(itemPtr != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  1.68M|    do {                        \
  |  |   46|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.68M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
  994|  1.68M|    *item = (avifDecoderItem *)avifAlloc(sizeof(avifDecoderItem));
  995|  1.68M|    if (*item == NULL) {
  ------------------
  |  Branch (995:9): [True: 0, False: 1.68M]
  ------------------
  996|      0|        avifArrayPop(&meta->items);
  997|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
  998|      0|    }
  999|  1.68M|    memset(*item, 0, sizeof(avifDecoderItem));
 1000|       |
 1001|  1.68M|    *itemPtr = *item;
 1002|  1.68M|    if (!avifArrayCreate(&(*item)->properties, sizeof(avifProperty), 16)) {
  ------------------
  |  Branch (1002:9): [True: 0, False: 1.68M]
  ------------------
 1003|      0|        avifFree(*item);
 1004|      0|        *item = NULL;
 1005|      0|        avifArrayPop(&meta->items);
 1006|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 1007|      0|    }
 1008|  1.68M|    if (!avifArrayCreate(&(*item)->extents, sizeof(avifExtent), 1)) {
  ------------------
  |  Branch (1008:9): [True: 0, False: 1.68M]
  ------------------
 1009|      0|        avifPropertyArrayDestroy(&(*item)->properties);
 1010|      0|        avifFree(*item);
 1011|      0|        *item = NULL;
 1012|      0|        avifArrayPop(&meta->items);
 1013|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 1014|      0|    }
 1015|  1.68M|    if (!avifArrayCreate(&(*item)->references, sizeof(avifItemReference), 1)) {
  ------------------
  |  Branch (1015:9): [True: 0, False: 1.68M]
  ------------------
 1016|      0|        avifArrayDestroy(&(*item)->extents);
 1017|      0|        avifPropertyArrayDestroy(&(*item)->properties);
 1018|      0|        avifFree(*item);
 1019|      0|        *item = NULL;
 1020|      0|        avifArrayPop(&meta->items);
 1021|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 1022|      0|    }
 1023|  1.68M|    if (!avifArrayCreate(&(*item)->dimgInputs, sizeof(uint32_t), 1)) {
  ------------------
  |  Branch (1023:9): [True: 0, False: 1.68M]
  ------------------
 1024|      0|        avifArrayDestroy(&(*item)->references);
 1025|      0|        avifArrayDestroy(&(*item)->extents);
 1026|      0|        avifPropertyArrayDestroy(&(*item)->properties);
 1027|      0|        avifFree(*item);
 1028|      0|        *item = NULL;
 1029|      0|        avifArrayPop(&meta->items);
 1030|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 1031|      0|    }
 1032|  1.68M|    (*item)->id = itemID;
 1033|  1.68M|    (*item)->meta = meta;
 1034|  1.68M|    return AVIF_RESULT_OK;
 1035|  1.68M|}
read.c:avifDecoderDataCreate:
 1087|  1.79M|{
 1088|  1.79M|    avifDecoderData * data = (avifDecoderData *)avifAlloc(sizeof(avifDecoderData));
 1089|  1.79M|    if (data == NULL) {
  ------------------
  |  Branch (1089:9): [True: 0, False: 1.79M]
  ------------------
 1090|      0|        return NULL;
 1091|      0|    }
 1092|  1.79M|    memset(data, 0, sizeof(avifDecoderData));
 1093|  1.79M|    data->meta = avifMetaCreate();
 1094|  1.79M|    if (data->meta == NULL || !avifArrayCreate(&data->tracks, sizeof(avifTrack), 2) ||
  ------------------
  |  Branch (1094:9): [True: 0, False: 1.79M]
  |  Branch (1094:31): [True: 0, False: 1.79M]
  ------------------
 1095|  1.79M|        !avifArrayCreate(&data->tiles, sizeof(avifTile), 8)) {
  ------------------
  |  Branch (1095:9): [True: 0, False: 1.79M]
  ------------------
 1096|      0|        avifDecoderDataDestroy(data);
 1097|      0|        return NULL;
 1098|      0|    }
 1099|  1.79M|    return data;
 1100|  1.79M|}
read.c:avifMetaCreate:
  925|  1.93M|{
  926|  1.93M|    avifMeta * meta = (avifMeta *)avifAlloc(sizeof(avifMeta));
  927|  1.93M|    if (meta == NULL) {
  ------------------
  |  Branch (927:9): [True: 0, False: 1.93M]
  ------------------
  928|      0|        return NULL;
  929|      0|    }
  930|  1.93M|    memset(meta, 0, sizeof(avifMeta));
  931|  1.93M|    if (!avifArrayCreate(&meta->items, sizeof(avifDecoderItem *), 8) || !avifArrayCreate(&meta->properties, sizeof(avifProperty), 16) ||
  ------------------
  |  Branch (931:9): [True: 0, False: 1.93M]
  |  Branch (931:73): [True: 0, False: 1.93M]
  ------------------
  932|  1.93M|        !avifArrayCreate(&meta->entityToGroups, sizeof(avifEntityToGroup), 1)) {
  ------------------
  |  Branch (932:9): [True: 0, False: 1.93M]
  ------------------
  933|      0|        avifMetaDestroy(meta);
  934|      0|        return NULL;
  935|      0|    }
  936|  1.93M|    return meta;
  937|  1.93M|}
read.c:avifParse:
 4913|  1.79M|{
 4914|       |    // Note: this top-level function is the only avifParse*() function that returns avifResult instead of avifBool.
 4915|       |    // Be sure to use AVIF_CHECKERR() in this function with an explicit error result instead of simply using AVIF_CHECK().
 4916|       |
 4917|  1.79M|    avifResult readResult;
 4918|  1.79M|    uint64_t parseOffset = 0;
 4919|  1.79M|    avifDecoderData * data = decoder->data;
 4920|  1.79M|    avifBool ftypSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4921|  1.79M|    avifBool metaSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4922|  1.79M|    avifBool metaIsSizeZero = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4923|  1.79M|    avifBool moovSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4924|  1.79M|    avifBool needsMeta = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4925|  1.79M|    avifBool needsMoov = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4926|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4927|       |    avifBool miniSeen = AVIF_FALSE;
 4928|       |    avifBool needsMini = AVIF_FALSE;
 4929|       |#endif
 4930|  1.79M|    avifBool needsTmap = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4931|  1.79M|    avifBool tmapSeen = AVIF_FALSE;
  ------------------
  |  |   89|  1.79M|#define AVIF_FALSE 0
  ------------------
 4932|  1.79M|    avifFileType ftyp = { 0 };
 4933|       |
 4934|  3.84M|    for (;;) {
 4935|       |        // Read just enough to get the next box header (a max of 32 bytes)
 4936|  3.84M|        avifROData headerContents;
 4937|  3.84M|        if ((decoder->io->sizeHint > 0) && (parseOffset > decoder->io->sizeHint)) {
  ------------------
  |  Branch (4937:13): [True: 1.55M, False: 2.29M]
  |  Branch (4937:44): [True: 191, False: 1.55M]
  ------------------
 4938|    191|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 4939|    191|        }
 4940|  3.84M|        readResult = decoder->io->read(decoder->io, 0, parseOffset, 32, &headerContents);
 4941|  3.84M|        if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (4941:13): [True: 236k, False: 3.61M]
  ------------------
 4942|   236k|            return readResult;
 4943|   236k|        }
 4944|  3.61M|        if (!headerContents.size) {
  ------------------
  |  Branch (4944:13): [True: 93, False: 3.61M]
  ------------------
 4945|       |            // If we got AVIF_RESULT_OK from the reader but received 0 bytes,
 4946|       |            // we've reached the end of the file with no errors. Hooray!
 4947|     93|            break;
 4948|     93|        }
 4949|       |
 4950|       |        // Parse the header, and find out how many bytes it actually was
 4951|  3.61M|        BEGIN_STREAM(headerStream, headerContents.data, headerContents.size, &decoder->diag, "File-level box header");
  ------------------
  |  |  810|  3.61M|    avifROStream VARNAME;                               \
  |  |  811|  3.61M|    avifROData VARNAME##_roData;                        \
  |  |  812|  3.61M|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  3.61M|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  3.61M|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4952|  3.61M|        avifBoxHeader header;
 4953|  3.61M|        AVIF_CHECKERR(avifROStreamReadBoxHeaderPartial(&headerStream, &header, /*topLevel=*/AVIF_TRUE), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.61M|    do {                        \
  |  |   46|  3.61M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 27, False: 3.61M]
  |  |  ------------------
  |  |   47|     27|            avifBreakOnError(); \
  |  |   48|     27|            return ERR;         \
  |  |   49|     27|        }                       \
  |  |   50|  3.61M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.61M]
  |  |  ------------------
  ------------------
 4954|  3.61M|        parseOffset += avifROStreamOffset(&headerStream);
 4955|  3.61M|        AVIF_ASSERT_OR_RETURN(decoder->io->sizeHint == 0 || parseOffset <= decoder->io->sizeHint);
  ------------------
  |  |   64|  3.61M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  3.61M|    do {                        \
  |  |  |  |   46|  5.07M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 2.15M, False: 1.46M]
  |  |  |  |  |  Branch (46:15): [True: 1.46M, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  3.61M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 3.61M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4956|       |
 4957|       |        // Try to get the remainder of the box, if necessary
 4958|  3.61M|        uint64_t boxOffset = 0;
 4959|  3.61M|        avifROData boxContents = AVIF_DATA_EMPTY;
  ------------------
  |  |  254|  3.61M|#define AVIF_DATA_EMPTY { NULL, 0 }
  ------------------
 4960|       |
 4961|  3.61M|        avifBool isFtyp = AVIF_FALSE, isMeta = AVIF_FALSE, isMoov = AVIF_FALSE;
  ------------------
  |  |   89|  3.61M|#define AVIF_FALSE 0
  ------------------
                      avifBool isFtyp = AVIF_FALSE, isMeta = AVIF_FALSE, isMoov = AVIF_FALSE;
  ------------------
  |  |   89|  3.61M|#define AVIF_FALSE 0
  ------------------
                      avifBool isFtyp = AVIF_FALSE, isMeta = AVIF_FALSE, isMoov = AVIF_FALSE;
  ------------------
  |  |   89|  3.61M|#define AVIF_FALSE 0
  ------------------
 4962|  3.61M|        avifBool isNonSkippableVariableLengthBox = AVIF_FALSE;
  ------------------
  |  |   89|  3.61M|#define AVIF_FALSE 0
  ------------------
 4963|  3.61M|        if (!memcmp(header.type, "ftyp", 4)) {
  ------------------
  |  Branch (4963:13): [True: 1.68M, False: 1.92M]
  ------------------
 4964|  1.68M|            isFtyp = AVIF_TRUE;
  ------------------
  |  |   88|  1.68M|#define AVIF_TRUE 1
  ------------------
 4965|  1.68M|            isNonSkippableVariableLengthBox = AVIF_TRUE;
  ------------------
  |  |   88|  1.68M|#define AVIF_TRUE 1
  ------------------
 4966|  1.92M|        } else if (!memcmp(header.type, "meta", 4)) {
  ------------------
  |  Branch (4966:20): [True: 1.50M, False: 420k]
  ------------------
 4967|  1.50M|            isMeta = AVIF_TRUE;
  ------------------
  |  |   88|  1.50M|#define AVIF_TRUE 1
  ------------------
 4968|  1.50M|            isNonSkippableVariableLengthBox = AVIF_TRUE;
  ------------------
  |  |   88|  1.50M|#define AVIF_TRUE 1
  ------------------
 4969|  1.50M|            metaIsSizeZero = header.isSizeZeroBox;
 4970|  1.50M|        } else if (!memcmp(header.type, "moov", 4)) {
  ------------------
  |  Branch (4970:20): [True: 340k, False: 80.5k]
  ------------------
 4971|   340k|            isMoov = AVIF_TRUE;
  ------------------
  |  |   88|   340k|#define AVIF_TRUE 1
  ------------------
 4972|   340k|            isNonSkippableVariableLengthBox = AVIF_TRUE;
  ------------------
  |  |   88|   340k|#define AVIF_TRUE 1
  ------------------
 4973|   340k|        }
 4974|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 4975|       |        avifBool isMini = AVIF_FALSE;
 4976|       |        if (!isNonSkippableVariableLengthBox && !memcmp(header.type, "mini", 4)) {
 4977|       |            isMini = AVIF_TRUE;
 4978|       |            isNonSkippableVariableLengthBox = AVIF_TRUE;
 4979|       |        }
 4980|       |#endif
 4981|       |
 4982|  3.61M|        if (!isFtyp && (isNonSkippableVariableLengthBox || !memcmp(header.type, "free", 4) || !memcmp(header.type, "skip", 4) ||
  ------------------
  |  Branch (4982:13): [True: 1.92M, False: 1.68M]
  |  Branch (4982:25): [True: 1.84M, False: 80.5k]
  |  Branch (4982:60): [True: 2, False: 80.5k]
  |  Branch (4982:95): [True: 0, False: 80.5k]
  ------------------
 4983|  1.84M|                        !memcmp(header.type, "mdat", 4))) {
  ------------------
  |  Branch (4983:25): [True: 2, False: 80.5k]
  ------------------
 4984|       |            // Section 6.3.4 of ISO/IEC 14496-12:
 4985|       |            //   The FileTypeBox shall occur before any variable-length box (e.g. movie, free space, media data).
 4986|  1.84M|            AVIF_CHECKERR(ftypSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.84M|    do {                        \
  |  |   46|  1.84M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 1.84M]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  1.84M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.84M]
  |  |  ------------------
  ------------------
 4987|  1.84M|        }
 4988|       |
 4989|  3.61M|        if (isNonSkippableVariableLengthBox) {
  ------------------
  |  Branch (4989:13): [True: 3.52M, False: 80.5k]
  ------------------
 4990|  3.52M|            boxOffset = parseOffset;
 4991|  3.52M|            size_t sizeToRead;
 4992|  3.52M|            if (header.isSizeZeroBox) {
  ------------------
  |  Branch (4992:17): [True: 10.4k, False: 3.51M]
  ------------------
 4993|       |                // The box body goes till the end of the file.
 4994|  10.4k|                if (decoder->io->sizeHint != 0 && decoder->io->sizeHint - parseOffset < SIZE_MAX) {
  ------------------
  |  Branch (4994:21): [True: 5.32k, False: 5.13k]
  |  Branch (4994:51): [True: 5.32k, False: 0]
  ------------------
 4995|  5.32k|                    sizeToRead = (size_t)(decoder->io->sizeHint - parseOffset);
 4996|  5.32k|                } else {
 4997|  5.13k|                    sizeToRead = SIZE_MAX; // This will get truncated. See the documentation of avifIOReadFunc.
 4998|  5.13k|                }
 4999|  3.51M|            } else {
 5000|  3.51M|                sizeToRead = header.size;
 5001|  3.51M|            }
 5002|  3.52M|            readResult = decoder->io->read(decoder->io, 0, parseOffset, sizeToRead, &boxContents);
 5003|  3.52M|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5003:17): [True: 1.18M, False: 2.34M]
  ------------------
 5004|  1.18M|                return readResult;
 5005|  1.18M|            }
 5006|  2.34M|            if (header.isSizeZeroBox) {
  ------------------
  |  Branch (5006:17): [True: 983, False: 2.34M]
  ------------------
 5007|    983|                header.size = boxContents.size;
 5008|  2.34M|            } else if (boxContents.size != header.size) {
  ------------------
  |  Branch (5008:24): [True: 100, False: 2.34M]
  ------------------
 5009|       |                // A truncated box, bail out
 5010|    100|                return AVIF_RESULT_TRUNCATED_DATA;
 5011|    100|            }
 5012|  2.34M|        } else if (header.isSizeZeroBox) {
  ------------------
  |  Branch (5012:20): [True: 1, False: 80.5k]
  ------------------
 5013|       |            // An unknown top level box with size 0 was found. If we reach here it means we haven't completed parsing successfully
 5014|       |            // since there are no further boxes left.
 5015|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 5016|  80.5k|        } else if (header.size > (UINT64_MAX - parseOffset)) {
  ------------------
  |  Branch (5016:20): [True: 2, False: 80.5k]
  ------------------
 5017|      2|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 5018|      2|        }
 5019|  2.42M|        parseOffset += header.size;
 5020|       |
 5021|  2.42M|        if (isFtyp) {
  ------------------
  |  Branch (5021:13): [True: 1.68M, False: 741k]
  ------------------
 5022|  1.68M|            AVIF_CHECKERR(!ftypSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.68M|    do {                        \
  |  |   46|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.68M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
 5023|  1.68M|            AVIF_CHECKERR(avifParseFileTypeBox(&ftyp, boxContents.data, boxContents.size, data->diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.68M|    do {                        \
  |  |   46|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 18, False: 1.68M]
  |  |  ------------------
  |  |   47|     18|            avifBreakOnError(); \
  |  |   48|     18|            return ERR;         \
  |  |   49|     18|        }                       \
  |  |   50|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
 5024|  1.68M|            AVIF_CHECKERR(avifFileTypeIsCompatible(&ftyp), AVIF_RESULT_INVALID_FTYP);
  ------------------
  |  |   45|  1.68M|    do {                        \
  |  |   46|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 7, False: 1.68M]
  |  |  ------------------
  |  |   47|      7|            avifBreakOnError(); \
  |  |   48|      7|            return ERR;         \
  |  |   49|      7|        }                       \
  |  |   50|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
 5025|  1.68M|            ftypSeen = AVIF_TRUE;
  ------------------
  |  |   88|  1.68M|#define AVIF_TRUE 1
  ------------------
 5026|  1.68M|            memcpy(data->majorBrand, ftyp.majorBrand, 4); // Remember the major brand for future AVIF_DECODER_SOURCE_AUTO decisions
 5027|  1.68M|            if (ftyp.compatibleBrandsCount > 0) {
  ------------------
  |  Branch (5027:17): [True: 1.68M, False: 3]
  ------------------
 5028|  1.68M|                AVIF_CHECKERR(avifArrayCreate(&data->compatibleBrands, sizeof(avifBrand), ftyp.compatibleBrandsCount),
  ------------------
  |  |   45|  1.68M|    do {                        \
  |  |   46|  1.68M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.68M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.68M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.68M]
  |  |  ------------------
  ------------------
 5029|  1.68M|                              AVIF_RESULT_OUT_OF_MEMORY);
 5030|  1.68M|                memcpy(data->compatibleBrands.brand, ftyp.compatibleBrands, sizeof(avifBrand) * ftyp.compatibleBrandsCount);
 5031|  1.68M|                data->compatibleBrands.count = ftyp.compatibleBrandsCount;
 5032|  1.68M|            }
 5033|  1.68M|            needsMeta = avifFileTypeHasBrand(&ftyp, "avif");
 5034|  1.68M|            needsMoov = avifFileTypeHasBrand(&ftyp, "avis");
 5035|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5036|       |            needsMini = avifFileTypeHasBrand(&ftyp, "mif3");
 5037|       |            if (needsMini) {
 5038|       |                AVIF_CHECKERR(!needsMeta, AVIF_RESULT_INVALID_FTYP);
 5039|       |                // Section O.2.1.2 of ISO/IEC 23008-12:2014, CDAM 2:
 5040|       |                //   When the 'mif3' brand is present as the major_brand of the FileTypeBox,
 5041|       |                //   the minor_version of the FileTypeBox shall be 0 or a brand that is either
 5042|       |                //   structurally compatible with the 'mif3' brand, such as a codec brand
 5043|       |                //   complying with the 'mif3' structural brand, or a brand to which the file
 5044|       |                //   conforms after the equivalent MetaBox has been transformed from
 5045|       |                //   MinimizedImageBox as specified in Clause O.4.
 5046|       |                AVIF_CHECKERR(!memcmp(ftyp.minorVersion, "\0\0\0\0", 4) || !memcmp(ftyp.minorVersion, "avif", 4),
 5047|       |                              AVIF_RESULT_BMFF_PARSE_FAILED);
 5048|       |            }
 5049|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 5050|  1.68M|            needsTmap = avifFileTypeHasBrand(&ftyp, "tmap");
 5051|  1.68M|            if (needsTmap) {
  ------------------
  |  Branch (5051:17): [True: 121k, False: 1.56M]
  ------------------
 5052|   121k|                needsMeta = AVIF_TRUE;
  ------------------
  |  |   88|   121k|#define AVIF_TRUE 1
  ------------------
 5053|   121k|            }
 5054|  1.68M|        } else if (isMeta) {
  ------------------
  |  Branch (5054:20): [True: 589k, False: 152k]
  ------------------
 5055|   589k|            AVIF_CHECKERR(!metaSeen, 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]
  |  |  ------------------
  ------------------
 5056|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5057|       |            AVIF_CHECKERR(!miniSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 5058|       |#endif
 5059|   589k|            AVIF_CHECKRES(avifParseMetaBox(data->meta, boxOffset, boxContents.data, boxContents.size, data->diag));
  ------------------
  |  |   54|   589k|    do {                                  \
  |  |   55|   589k|        const avifResult result__ = (A);  \
  |  |   56|   589k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 929, False: 588k]
  |  |  ------------------
  |  |   57|    929|            avifBreakOnError();           \
  |  |   58|    929|            return result__;              \
  |  |   59|    929|        }                                 \
  |  |   60|   589k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 588k]
  |  |  ------------------
  ------------------
 5060|   588k|            metaSeen = AVIF_TRUE;
  ------------------
  |  |   88|   588k|#define AVIF_TRUE 1
  ------------------
 5061|       |
 5062|  1.88M|            for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5062:42): [True: 1.35M, False: 536k]
  ------------------
 5063|  1.35M|                if (!memcmp(data->meta->items.item[itemIndex]->type, "tmap", 4)) {
  ------------------
  |  Branch (5063:21): [True: 51.5k, False: 1.30M]
  ------------------
 5064|  51.5k|                    tmapSeen = AVIF_TRUE;
  ------------------
  |  |   88|  51.5k|#define AVIF_TRUE 1
  ------------------
 5065|  51.5k|                    break;
 5066|  51.5k|                }
 5067|  1.35M|            }
 5068|       |
 5069|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5070|       |        } else if (isMini) {
 5071|       |            AVIF_CHECKERR(!metaSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 5072|       |            AVIF_CHECKERR(!miniSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 5073|       |            const avifBool isAvifAccordingToMinorVersion = !memcmp(ftyp.minorVersion, "avif", 4);
 5074|       |            AVIF_CHECKRES(
 5075|       |                avifParseMinimizedImageBox(data, boxOffset, boxContents.data, boxContents.size, isAvifAccordingToMinorVersion, data->diag));
 5076|       |            miniSeen = AVIF_TRUE;
 5077|       |#endif
 5078|   588k|        } else if (isMoov) {
  ------------------
  |  Branch (5078:20): [True: 72.1k, False: 80.5k]
  ------------------
 5079|  72.1k|            AVIF_CHECKERR(!moovSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  72.1k|    do {                        \
  |  |   46|  72.1k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 72.1k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  72.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 72.1k]
  |  |  ------------------
  ------------------
 5080|  72.1k|            AVIF_CHECKRES(
  ------------------
  |  |   54|  72.1k|    do {                                  \
  |  |   55|  72.1k|        const avifResult result__ = (A);  \
  |  |   56|  72.1k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 229, False: 71.9k]
  |  |  ------------------
  |  |   57|    229|            avifBreakOnError();           \
  |  |   58|    229|            return result__;              \
  |  |   59|    229|        }                                 \
  |  |   60|  72.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 71.9k]
  |  |  ------------------
  ------------------
 5081|  72.1k|                avifParseMovieBox(data, boxOffset, boxContents.data, boxContents.size, decoder->imageSizeLimit, decoder->imageDimensionLimit));
 5082|  71.9k|            moovSeen = AVIF_TRUE;
  ------------------
  |  |   88|  71.9k|#define AVIF_TRUE 1
  ------------------
 5083|  71.9k|            decoder->imageSequenceTrackPresent = AVIF_TRUE;
  ------------------
  |  |   88|  71.9k|#define AVIF_TRUE 1
  ------------------
 5084|  71.9k|        }
 5085|       |
 5086|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5087|       |        if (ftypSeen && !needsMini) {
 5088|       |            // When MinimizedImageBox is present in a file, the 'mif3' brand or a derived brand that implies the 'mif3'
 5089|       |            // brand shall be the major brand or present among the compatible brands in the FileTypeBox.
 5090|       |            AVIF_CHECKERR(!miniSeen, AVIF_RESULT_BMFF_PARSE_FAILED);
 5091|       |        }
 5092|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 5093|       |
 5094|       |        // See if there is enough information to consider Parse() a success and early-out:
 5095|       |        // * If the brand 'avif' is present, require a meta box
 5096|       |        // * If the brand 'avis' is present, require a moov box
 5097|       |        // * If AVIF_ENABLE_EXPERIMENTAL_MINI is defined and the brand 'mif3' is present, require a mini box
 5098|  2.42M|        avifBool sawEverythingNeeded = ftypSeen && (!needsMeta || metaSeen) && (!needsMoov || moovSeen) && (!needsTmap || tmapSeen);
  ------------------
  |  Branch (5098:40): [True: 2.42M, False: 260]
  |  Branch (5098:53): [True: 386k, False: 2.03M]
  |  Branch (5098:67): [True: 550k, False: 1.48M]
  |  Branch (5098:81): [True: 298k, False: 638k]
  |  Branch (5098:95): [True: 71.8k, False: 566k]
  |  Branch (5098:109): [True: 319k, False: 51.1k]
  |  Branch (5098:123): [True: 51.1k, False: 34]
  ------------------
 5099|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5100|       |        sawEverythingNeeded = sawEverythingNeeded && (!needsMini || miniSeen);
 5101|       |#endif
 5102|  2.42M|        if (sawEverythingNeeded) {
  ------------------
  |  Branch (5102:13): [True: 370k, False: 2.05M]
  ------------------
 5103|   370k|            return AVIF_RESULT_OK;
 5104|   370k|        }
 5105|  2.42M|    }
 5106|     93|    if (!ftypSeen) {
  ------------------
  |  Branch (5106:9): [True: 17, False: 76]
  ------------------
 5107|     17|        return AVIF_RESULT_INVALID_FTYP;
 5108|     17|    }
 5109|     76|    if ((needsMeta && !metaSeen) || (needsMoov && !moovSeen)) {
  ------------------
  |  Branch (5109:10): [True: 63, False: 13]
  |  Branch (5109:23): [True: 62, False: 1]
  |  Branch (5109:38): [True: 13, False: 1]
  |  Branch (5109:51): [True: 13, False: 0]
  ------------------
 5110|     75|        return AVIF_RESULT_TRUNCATED_DATA;
 5111|     75|    }
 5112|      1|    if (needsTmap && !tmapSeen) {
  ------------------
  |  Branch (5112:9): [True: 1, False: 0]
  |  Branch (5112:22): [True: 1, False: 0]
  ------------------
 5113|      1|        return metaIsSizeZero ? AVIF_RESULT_TRUNCATED_DATA : AVIF_RESULT_BMFF_PARSE_FAILED;
  ------------------
  |  Branch (5113:16): [True: 0, False: 1]
  ------------------
 5114|      1|    }
 5115|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 5116|       |    if (needsMini && !miniSeen) {
 5117|       |        return AVIF_RESULT_TRUNCATED_DATA;
 5118|       |    }
 5119|       |#endif
 5120|      0|    return AVIF_RESULT_OK;
 5121|      1|}
read.c:avifParseMetaBox:
 3553|   638k|{
 3554|   638k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[meta]");
  ------------------
  |  |  810|   638k|    avifROStream VARNAME;                               \
  |  |  811|   638k|    avifROData VARNAME##_roData;                        \
  |  |  812|   638k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   638k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   638k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3555|       |
 3556|   638k|    uint32_t flags;
 3557|   638k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, 0, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   638k|    do {                        \
  |  |   46|   638k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 12, False: 638k]
  |  |  ------------------
  |  |   47|     12|            avifBreakOnError(); \
  |  |   48|     12|            return ERR;         \
  |  |   49|     12|        }                       \
  |  |   50|   638k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 638k]
  |  |  ------------------
  ------------------
 3558|       |
 3559|   638k|    ++meta->idatID; // for tracking idat
 3560|       |
 3561|   638k|    avifBool firstBox = AVIF_TRUE;
  ------------------
  |  |   88|   638k|#define AVIF_TRUE 1
  ------------------
 3562|   638k|    uint32_t uniqueBoxFlags = 0;
 3563|  4.08M|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3563:12): [True: 3.44M, False: 637k]
  ------------------
 3564|  3.44M|        avifBoxHeader header;
 3565|  3.44M|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.44M|    do {                        \
  |  |   46|  3.44M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 119, False: 3.44M]
  |  |  ------------------
  |  |   47|    119|            avifBreakOnError(); \
  |  |   48|    119|            return ERR;         \
  |  |   49|    119|        }                       \
  |  |   50|  3.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.44M]
  |  |  ------------------
  ------------------
 3566|       |
 3567|  3.44M|        if (firstBox) {
  ------------------
  |  Branch (3567:13): [True: 637k, False: 2.81M]
  ------------------
 3568|   637k|            if (!memcmp(header.type, "hdlr", 4)) {
  ------------------
  |  Branch (3568:17): [True: 637k, False: 2]
  ------------------
 3569|   637k|                uint8_t handlerType[4];
 3570|   637k|                AVIF_CHECKERR(avifParseHandlerBox(avifROStreamCurrent(&s), header.size, handlerType, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   637k|    do {                        \
  |  |   46|   637k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 56, False: 637k]
  |  |  ------------------
  |  |   47|     56|            avifBreakOnError(); \
  |  |   48|     56|            return ERR;         \
  |  |   49|     56|        }                       \
  |  |   50|   637k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 637k]
  |  |  ------------------
  ------------------
 3571|       |                // HEIF (ISO/IEC 23008-12:2022), Section 6.2:
 3572|       |                //   The handler type for the MetaBox shall be 'pict'.
 3573|   637k|                if (memcmp(handlerType, "pict", 4) != 0) {
  ------------------
  |  Branch (3573:21): [True: 4, False: 637k]
  ------------------
 3574|      4|                    avifDiagnosticsPrintf(diag, "Box[hdlr] handler_type is not 'pict'");
 3575|      4|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 3576|      4|                }
 3577|   637k|                firstBox = AVIF_FALSE;
  ------------------
  |  |   89|   637k|#define AVIF_FALSE 0
  ------------------
 3578|   637k|            } else {
 3579|       |                // hdlr must be the first box!
 3580|      2|                avifDiagnosticsPrintf(diag, "Box[meta] does not have a Box[hdlr] as its first child box");
 3581|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3582|      2|            }
 3583|  2.81M|        } else if (!memcmp(header.type, "hdlr", 4)) {
  ------------------
  |  Branch (3583:20): [True: 1, False: 2.81M]
  ------------------
 3584|      1|            avifDiagnosticsPrintf(diag, "Box[meta] contains a duplicate unique box of type 'hdlr'");
 3585|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3586|  2.81M|        } else if (!memcmp(header.type, "iloc", 4)) {
  ------------------
  |  Branch (3586:20): [True: 592k, False: 2.21M]
  ------------------
 3587|   592k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_ILOC, "meta", "iloc", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   592k|    do {                        \
  |  |   46|   592k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 592k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   592k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 592k]
  |  |  ------------------
  ------------------
 3588|   592k|            AVIF_CHECKRES(avifParseItemLocationBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   592k|    do {                                  \
  |  |   55|   592k|        const avifResult result__ = (A);  \
  |  |   56|   592k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 359, False: 591k]
  |  |  ------------------
  |  |   57|    359|            avifBreakOnError();           \
  |  |   58|    359|            return result__;              \
  |  |   59|    359|        }                                 \
  |  |   60|   592k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 591k]
  |  |  ------------------
  ------------------
 3589|  2.21M|        } else if (!memcmp(header.type, "pitm", 4)) {
  ------------------
  |  Branch (3589:20): [True: 558k, False: 1.66M]
  ------------------
 3590|   558k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_PITM, "meta", "pitm", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   558k|    do {                        \
  |  |   46|   558k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 558k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   558k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 558k]
  |  |  ------------------
  ------------------
 3591|   558k|            AVIF_CHECKERR(avifParsePrimaryItemBox(meta, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   558k|    do {                        \
  |  |   46|   558k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 558k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   558k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 558k]
  |  |  ------------------
  ------------------
 3592|  1.66M|        } else if (!memcmp(header.type, "idat", 4)) {
  ------------------
  |  Branch (3592:20): [True: 242, False: 1.66M]
  ------------------
 3593|    242|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IDAT, "meta", "idat", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    242|    do {                        \
  |  |   46|    242|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 242]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    242|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 242]
  |  |  ------------------
  ------------------
 3594|    242|            AVIF_CHECKERR(avifParseItemDataBox(meta, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    242|    do {                        \
  |  |   46|    242|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 241]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    242|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 241]
  |  |  ------------------
  ------------------
 3595|  1.66M|        } else if (!memcmp(header.type, "iprp", 4)) {
  ------------------
  |  Branch (3595:20): [True: 554k, False: 1.10M]
  ------------------
 3596|   554k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IPRP, "meta", "iprp", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   554k|    do {                        \
  |  |   46|   554k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 554k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   554k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 554k]
  |  |  ------------------
  ------------------
 3597|   554k|            AVIF_CHECKRES(avifParseItemPropertiesBox(meta, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   554k|    do {                                  \
  |  |   55|   554k|        const avifResult result__ = (A);  \
  |  |   56|   554k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 177, False: 553k]
  |  |  ------------------
  |  |   57|    177|            avifBreakOnError();           \
  |  |   58|    177|            return result__;              \
  |  |   59|    177|        }                                 \
  |  |   60|   554k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 553k]
  |  |  ------------------
  ------------------
 3598|  1.10M|        } else if (!memcmp(header.type, "iinf", 4)) {
  ------------------
  |  Branch (3598:20): [True: 604k, False: 501k]
  ------------------
 3599|   604k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IINF, "meta", "iinf", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   604k|    do {                        \
  |  |   46|   604k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 604k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   604k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 604k]
  |  |  ------------------
  ------------------
 3600|   604k|            AVIF_CHECKRES(avifParseItemInfoBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   604k|    do {                                  \
  |  |   55|   604k|        const avifResult result__ = (A);  \
  |  |   56|   604k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 113, False: 604k]
  |  |  ------------------
  |  |   57|    113|            avifBreakOnError();           \
  |  |   58|    113|            return result__;              \
  |  |   59|    113|        }                                 \
  |  |   60|   604k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 604k]
  |  |  ------------------
  ------------------
 3601|   604k|        } else if (!memcmp(header.type, "iref", 4)) {
  ------------------
  |  Branch (3601:20): [True: 165k, False: 335k]
  ------------------
 3602|   165k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_IREF, "meta", "iref", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   165k|    do {                        \
  |  |   46|   165k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 165k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   165k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 165k]
  |  |  ------------------
  ------------------
 3603|   165k|            AVIF_CHECKRES(avifParseItemReferenceBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   165k|    do {                                  \
  |  |   55|   165k|        const avifResult result__ = (A);  \
  |  |   56|   165k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 65, False: 165k]
  |  |  ------------------
  |  |   57|     65|            avifBreakOnError();           \
  |  |   58|     65|            return result__;              \
  |  |   59|     65|        }                                 \
  |  |   60|   165k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 165k]
  |  |  ------------------
  ------------------
 3604|   335k|        } else if (!memcmp(header.type, "grpl", 4)) {
  ------------------
  |  Branch (3604:20): [True: 64.2k, False: 271k]
  ------------------
 3605|  64.2k|            AVIF_CHECKERR(uniqueBoxSeen(&uniqueBoxFlags, AVIF_UNIQUE_GRPL, "meta", "grpl", diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  64.2k|    do {                        \
  |  |   46|  64.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 64.2k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  64.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 64.2k]
  |  |  ------------------
  ------------------
 3606|  64.2k|            AVIF_CHECKRES(avifParseGroupsListBox(meta, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  64.2k|    do {                                  \
  |  |   55|  64.2k|        const avifResult result__ = (A);  \
  |  |   56|  64.2k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 14, False: 64.2k]
  |  |  ------------------
  |  |   57|     14|            avifBreakOnError();           \
  |  |   58|     14|            return result__;              \
  |  |   59|     14|        }                                 \
  |  |   60|  64.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 64.2k]
  |  |  ------------------
  ------------------
 3607|  64.2k|        }
 3608|       |
 3609|  3.44M|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.44M|    do {                        \
  |  |   46|  3.44M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.44M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.44M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.44M]
  |  |  ------------------
  ------------------
 3610|  3.44M|    }
 3611|   637k|    if (firstBox) {
  ------------------
  |  Branch (3611:9): [True: 1, False: 637k]
  ------------------
 3612|       |        // The meta box must not be empty (it must contain at least a hdlr box)
 3613|      1|        avifDiagnosticsPrintf(diag, "Box[meta] has no child boxes");
 3614|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3615|      1|    }
 3616|   637k|    return AVIF_RESULT_OK;
 3617|   637k|}
read.c:avifParseHandlerBox:
 2052|   742k|{
 2053|   742k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[hdlr]");
  ------------------
  |  |  810|   742k|    avifROStream VARNAME;                               \
  |  |  811|   742k|    avifROData VARNAME##_roData;                        \
  |  |  812|   742k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   742k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   742k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2054|       |
 2055|   742k|    AVIF_CHECK(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL));
  ------------------
  |  |   36|   742k|    do {                        \
  |  |   37|   742k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 742k]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|   742k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 742k]
  |  |  ------------------
  ------------------
 2056|       |
 2057|   742k|    uint32_t predefined;
 2058|   742k|    AVIF_CHECK(avifROStreamReadU32(&s, &predefined)); // unsigned int(32) pre_defined = 0;
  ------------------
  |  |   36|   742k|    do {                        \
  |  |   37|   742k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 742k]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|   742k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 742k]
  |  |  ------------------
  ------------------
 2059|   742k|    if (predefined != 0) {
  ------------------
  |  Branch (2059:9): [True: 42, False: 742k]
  ------------------
 2060|     42|        avifDiagnosticsPrintf(diag, "Box[hdlr] contains a pre_defined value that is nonzero");
 2061|     42|        return AVIF_FALSE;
  ------------------
  |  |   89|     42|#define AVIF_FALSE 0
  ------------------
 2062|     42|    }
 2063|       |
 2064|   742k|    AVIF_CHECK(avifROStreamRead(&s, handlerType, 4)); // unsigned int(32) handler_type;
  ------------------
  |  |   36|   742k|    do {                        \
  |  |   37|   742k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 742k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   742k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 742k]
  |  |  ------------------
  ------------------
 2065|       |
 2066|  2.97M|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (2066:21): [True: 2.22M, False: 742k]
  ------------------
 2067|  2.22M|        uint32_t reserved;
 2068|  2.22M|        AVIF_CHECK(avifROStreamReadU32(&s, &reserved)); // const unsigned int(32)[3] reserved = 0;
  ------------------
  |  |   36|  2.22M|    do {                        \
  |  |   37|  2.22M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 2.22M]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|  2.22M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 2.22M]
  |  |  ------------------
  ------------------
 2069|  2.22M|    }
 2070|       |
 2071|       |    // Verify that a valid string is here, but don't bother to store it
 2072|   742k|    AVIF_CHECK(avifROStreamReadString(&s, NULL, 0)); // string name;
  ------------------
  |  |   36|   742k|    do {                        \
  |  |   37|   742k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 7, False: 742k]
  |  |  ------------------
  |  |   38|      7|            avifBreakOnError(); \
  |  |   39|      7|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      7|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      7|        }                       \
  |  |   41|   742k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 742k]
  |  |  ------------------
  ------------------
 2073|   742k|    return AVIF_TRUE;
  ------------------
  |  |   88|   742k|#define AVIF_TRUE 1
  ------------------
 2074|   742k|}
read.c:uniqueBoxSeen:
  835|  2.53M|{
  836|  2.53M|    const uint32_t flag = 1 << whichFlag;
  837|  2.53M|    if (*uniqueBoxFlags & flag) {
  ------------------
  |  Branch (837:9): [True: 3, False: 2.53M]
  ------------------
  838|       |        // This box has already been seen. Error!
  839|      3|        avifDiagnosticsPrintf(diagnostics, "Box[%s] contains a duplicate unique box of type '%s'", parentBoxType, boxType);
  840|      3|        return AVIF_FALSE;
  ------------------
  |  |   89|      3|#define AVIF_FALSE 0
  ------------------
  841|      3|    }
  842|       |
  843|       |    // Mark this box as seen.
  844|  2.53M|    *uniqueBoxFlags |= flag;
  845|  2.53M|    return AVIF_TRUE;
  ------------------
  |  |   88|  2.53M|#define AVIF_TRUE 1
  ------------------
  846|  2.53M|}
read.c:avifParseItemLocationBox:
 2077|   592k|{
 2078|   592k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iloc]");
  ------------------
  |  |  810|   592k|    avifROStream VARNAME;                               \
  |  |  811|   592k|    avifROData VARNAME##_roData;                        \
  |  |  812|   592k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   592k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   592k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2079|       |
 2080|       |    // Section 8.11.3.2 of ISO/IEC 14496-12.
 2081|   592k|    uint8_t version;
 2082|   592k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   592k|    do {                        \
  |  |   46|   592k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 592k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   592k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 592k]
  |  |  ------------------
  ------------------
 2083|   592k|    if (version > 2) {
  ------------------
  |  Branch (2083:9): [True: 2, False: 592k]
  ------------------
 2084|      2|        avifDiagnosticsPrintf(diag, "Box[iloc] has an unsupported version [%u]", version);
 2085|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2086|      2|    }
 2087|       |
 2088|   592k|    uint8_t offsetSize, lengthSize, baseOffsetSize, indexSize = 0;
 2089|   592k|    uint32_t reserved;
 2090|   592k|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &offsetSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) offset_size;
  ------------------
  |  |   45|   592k|    do {                        \
  |  |   46|   592k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 592k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   592k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 592k]
  |  |  ------------------
  ------------------
 2091|   592k|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &lengthSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) length_size;
  ------------------
  |  |   45|   592k|    do {                        \
  |  |   46|   592k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 592k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   592k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 592k]
  |  |  ------------------
  ------------------
 2092|   592k|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &baseOffsetSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) base_offset_size;
  ------------------
  |  |   45|   592k|    do {                        \
  |  |   46|   592k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 592k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   592k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 592k]
  |  |  ------------------
  ------------------
 2093|   592k|    if (version == 1 || version == 2) {
  ------------------
  |  Branch (2093:9): [True: 29.9k, False: 562k]
  |  Branch (2093:25): [True: 2.43k, False: 559k]
  ------------------
 2094|  32.4k|        AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &indexSize, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) index_size;
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
 2095|   559k|    } else {
 2096|   559k|        AVIF_CHECKERR(avifROStreamReadBitsU32(&s, &reserved, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) reserved;
  ------------------
  |  |   45|   559k|    do {                        \
  |  |   46|   559k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 559k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   559k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 559k]
  |  |  ------------------
  ------------------
 2097|   559k|    }
 2098|       |
 2099|       |    // Section 8.11.3.3 of ISO/IEC 14496-12.
 2100|   592k|    if ((offsetSize != 0 && offsetSize != 4 && offsetSize != 8) || (lengthSize != 0 && lengthSize != 4 && lengthSize != 8) ||
  ------------------
  |  Branch (2100:10): [True: 588k, False: 4.17k]
  |  Branch (2100:29): [True: 2.94k, False: 585k]
  |  Branch (2100:48): [True: 8, False: 2.93k]
  |  Branch (2100:69): [True: 588k, False: 4.10k]
  |  Branch (2100:88): [True: 10.0k, False: 578k]
  |  Branch (2100:107): [True: 2, False: 10.0k]
  ------------------
 2101|   592k|        (baseOffsetSize != 0 && baseOffsetSize != 4 && baseOffsetSize != 8) || (indexSize != 0 && indexSize != 4 && indexSize != 8)) {
  ------------------
  |  Branch (2101:10): [True: 121k, False: 470k]
  |  Branch (2101:33): [True: 42.5k, False: 79.0k]
  |  Branch (2101:56): [True: 5, False: 42.5k]
  |  Branch (2101:81): [True: 8.64k, False: 583k]
  |  Branch (2101:99): [True: 4.70k, False: 3.94k]
  |  Branch (2101:117): [True: 3, False: 4.69k]
  ------------------
 2102|     18|        avifDiagnosticsPrintf(diag, "Box[iloc] has an invalid size");
 2103|     18|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2104|     18|    }
 2105|       |
 2106|   592k|    uint16_t tmp16;
 2107|   592k|    uint32_t itemCount;
 2108|   592k|    if (version < 2) {
  ------------------
  |  Branch (2108:9): [True: 589k, False: 2.43k]
  ------------------
 2109|   589k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_count;
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
 2110|   589k|        itemCount = tmp16;
 2111|   589k|    } else {
 2112|  2.43k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &itemCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) item_count;
  ------------------
  |  |   45|  2.43k|    do {                        \
  |  |   46|  2.43k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 2.42k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  2.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2.42k]
  |  |  ------------------
  ------------------
 2113|  2.43k|    }
 2114|  1.90M|    for (uint32_t i = 0; i < itemCount; ++i) {
  ------------------
  |  Branch (2114:26): [True: 1.31M, False: 591k]
  ------------------
 2115|  1.31M|        uint32_t itemID;
 2116|  1.31M|        if (version < 2) {
  ------------------
  |  Branch (2116:13): [True: 1.30M, False: 2.46k]
  ------------------
 2117|  1.30M|            AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_ID;
  ------------------
  |  |   45|  1.30M|    do {                        \
  |  |   46|  1.30M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 24, False: 1.30M]
  |  |  ------------------
  |  |   47|     24|            avifBreakOnError(); \
  |  |   48|     24|            return ERR;         \
  |  |   49|     24|        }                       \
  |  |   50|  1.30M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.30M]
  |  |  ------------------
  ------------------
 2118|  1.30M|            itemID = tmp16;
 2119|  1.30M|        } else {
 2120|  2.46k|            AVIF_CHECKERR(avifROStreamReadU32(&s, &itemID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) item_ID;
  ------------------
  |  |   45|  2.46k|    do {                        \
  |  |   46|  2.46k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 21, False: 2.44k]
  |  |  ------------------
  |  |   47|     21|            avifBreakOnError(); \
  |  |   48|     21|            return ERR;         \
  |  |   49|     21|        }                       \
  |  |   50|  2.46k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2.44k]
  |  |  ------------------
  ------------------
 2121|  2.46k|        }
 2122|  1.31M|        AVIF_CHECKRES(avifCheckItemID("iloc", itemID, diag));
  ------------------
  |  |   54|  1.31M|    do {                                  \
  |  |   55|  1.31M|        const avifResult result__ = (A);  \
  |  |   56|  1.31M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 1.31M]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 2123|       |
 2124|  1.31M|        avifDecoderItem * item;
 2125|  1.31M|        AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, itemID, &item));
  ------------------
  |  |   54|  1.31M|    do {                                  \
  |  |   55|  1.31M|        const avifResult result__ = (A);  \
  |  |   56|  1.31M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.31M]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 2126|  1.31M|        if (item->extents.count > 0) {
  ------------------
  |  Branch (2126:13): [True: 17, False: 1.31M]
  ------------------
 2127|       |            // This item has already been given extents via this iloc box. This is invalid.
 2128|     17|            avifDiagnosticsPrintf(diag, "Item ID [%u] contains duplicate sets of extents", itemID);
 2129|     17|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2130|     17|        }
 2131|       |
 2132|  1.31M|        if (version == 1 || version == 2) {
  ------------------
  |  Branch (2132:13): [True: 27.8k, False: 1.28M]
  |  Branch (2132:29): [True: 2.44k, False: 1.27M]
  ------------------
 2133|  30.2k|            AVIF_CHECKERR(avifROStreamReadBitsU32(&s, &reserved, /*bitCount=*/12), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(12) reserved = 0;
  ------------------
  |  |   45|  30.2k|    do {                        \
  |  |   46|  30.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 33, False: 30.2k]
  |  |  ------------------
  |  |   47|     33|            avifBreakOnError(); \
  |  |   48|     33|            return ERR;         \
  |  |   49|     33|        }                       \
  |  |   50|  30.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 30.2k]
  |  |  ------------------
  ------------------
 2134|  30.2k|            if (reserved) {
  ------------------
  |  Branch (2134:17): [True: 68, False: 30.1k]
  ------------------
 2135|     68|                avifDiagnosticsPrintf(diag, "Box[iloc] has a non null reserved field [%u]", reserved);
 2136|     68|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2137|     68|            }
 2138|  30.1k|            uint8_t constructionMethod;
 2139|  30.1k|            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &constructionMethod, /*bitCount=*/4),
  ------------------
  |  |   45|  30.1k|    do {                        \
  |  |   46|  30.1k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 30.1k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  30.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 30.1k]
  |  |  ------------------
  ------------------
 2140|  30.1k|                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) construction_method;
 2141|  30.1k|            if (constructionMethod != 0 /* file offset */ && constructionMethod != 1 /* idat offset */) {
  ------------------
  |  Branch (2141:17): [True: 4.41k, False: 25.7k]
  |  Branch (2141:62): [True: 2, False: 4.41k]
  ------------------
 2142|       |                // construction method 2 (item offset) unsupported
 2143|      2|                avifDiagnosticsPrintf(diag, "Box[iloc] has an unsupported construction method [%u]", constructionMethod);
 2144|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2145|      2|            }
 2146|  30.1k|            if (constructionMethod == 1) {
  ------------------
  |  Branch (2146:17): [True: 4.41k, False: 25.7k]
  ------------------
 2147|  4.41k|                item->idatStored = AVIF_TRUE;
  ------------------
  |  |   88|  4.41k|#define AVIF_TRUE 1
  ------------------
 2148|  4.41k|            }
 2149|  30.1k|        }
 2150|       |
 2151|  1.31M|        uint16_t dataReferenceIndex;
 2152|  1.31M|        AVIF_CHECKERR(avifROStreamReadU16(&s, &dataReferenceIndex), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) data_reference_index;
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 21, False: 1.31M]
  |  |  ------------------
  |  |   47|     21|            avifBreakOnError(); \
  |  |   48|     21|            return ERR;         \
  |  |   49|     21|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 2153|  1.31M|        uint64_t baseOffset;
 2154|  1.31M|        AVIF_CHECKERR(avifROStreamReadUX8(&s, &baseOffset, baseOffsetSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(base_offset_size*8) base_offset;
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 1.31M]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 2155|  1.31M|        uint16_t extentCount;
 2156|  1.31M|        AVIF_CHECKERR(avifROStreamReadU16(&s, &extentCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) extent_count;
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 1.31M]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 2157|  14.2M|        for (int extentIter = 0; extentIter < extentCount; ++extentIter) {
  ------------------
  |  Branch (2157:34): [True: 12.8M, False: 1.30M]
  ------------------
 2158|  12.8M|            if ((version == 1 || version == 2) && indexSize > 0) {
  ------------------
  |  Branch (2158:18): [True: 694k, False: 12.1M]
  |  Branch (2158:34): [True: 1.30M, False: 10.8M]
  |  Branch (2158:51): [True: 100, False: 1.99M]
  ------------------
 2159|       |                // Section 8.11.3.1 of ISO/IEC 14496-12:
 2160|       |                //   The item_reference_index is only used for the method item_offset; it indicates the 1-based index
 2161|       |                //   of the item reference with referenceType 'iloc' linked from this item. If index_size is 0, then
 2162|       |                //   the value 1 is implied; the value 0 is reserved.
 2163|    100|                uint64_t itemReferenceIndex; // Ignored unless construction_method=2 which is unsupported, but still read it.
 2164|    100|                AVIF_CHECKERR(avifROStreamReadUX8(&s, &itemReferenceIndex, indexSize),
  ------------------
  |  |   45|    100|    do {                        \
  |  |   46|    100|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 12, False: 88]
  |  |  ------------------
  |  |   47|     12|            avifBreakOnError(); \
  |  |   48|     12|            return ERR;         \
  |  |   49|     12|        }                       \
  |  |   50|    100|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 88]
  |  |  ------------------
  ------------------
 2165|    100|                              AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(index_size*8) item_reference_index;
 2166|    100|            }
 2167|       |
 2168|  12.8M|            uint64_t extentOffset;
 2169|  12.8M|            AVIF_CHECKERR(avifROStreamReadUX8(&s, &extentOffset, offsetSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(offset_size*8) extent_offset;
  ------------------
  |  |   45|  12.8M|    do {                        \
  |  |   46|  12.8M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 84, False: 12.8M]
  |  |  ------------------
  |  |   47|     84|            avifBreakOnError(); \
  |  |   48|     84|            return ERR;         \
  |  |   49|     84|        }                       \
  |  |   50|  12.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 12.8M]
  |  |  ------------------
  ------------------
 2170|  12.8M|            uint64_t extentLength;
 2171|  12.8M|            AVIF_CHECKERR(avifROStreamReadUX8(&s, &extentLength, lengthSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(length_size*8) extent_length;
  ------------------
  |  |   45|  12.8M|    do {                        \
  |  |   46|  12.8M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 25, False: 12.8M]
  |  |  ------------------
  |  |   47|     25|            avifBreakOnError(); \
  |  |   48|     25|            return ERR;         \
  |  |   49|     25|        }                       \
  |  |   50|  12.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 12.8M]
  |  |  ------------------
  ------------------
 2172|       |
 2173|  12.8M|            avifExtent * extent = (avifExtent *)avifArrayPush(&item->extents);
 2174|  12.8M|            AVIF_CHECKERR(extent != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  12.8M|    do {                        \
  |  |   46|  12.8M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 12.8M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  12.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 12.8M]
  |  |  ------------------
  ------------------
 2175|  12.8M|            if (extentOffset > UINT64_MAX - baseOffset) {
  ------------------
  |  Branch (2175:17): [True: 2, False: 12.8M]
  ------------------
 2176|      2|                avifDiagnosticsPrintf(diag,
 2177|      2|                                      "Item ID [%u] contains an extent offset which overflows: [base: %" PRIu64 " offset:%" PRIu64 "]",
 2178|      2|                                      itemID,
 2179|      2|                                      baseOffset,
 2180|      2|                                      extentOffset);
 2181|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2182|      2|            }
 2183|  12.8M|            uint64_t offset = baseOffset + extentOffset;
 2184|  12.8M|            extent->offset = offset;
 2185|       |#if UINT64_MAX > SIZE_MAX
 2186|       |            if (extentLength > SIZE_MAX) {
 2187|       |                avifDiagnosticsPrintf(diag, "Item ID [%u] contains an extent length which overflows: [%" PRIu64 "]", itemID, extentLength);
 2188|       |                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2189|       |            }
 2190|       |#endif
 2191|  12.8M|            extent->size = (size_t)extentLength;
 2192|  12.8M|            if (extent->size > SIZE_MAX - item->size) {
  ------------------
  |  Branch (2192:17): [True: 11, False: 12.8M]
  ------------------
 2193|     11|                avifDiagnosticsPrintf(diag,
 2194|     11|                                      "Item ID [%u] contains an extent length which overflows the item size: [%zu, %zu]",
 2195|     11|                                      itemID,
 2196|     11|                                      extent->size,
 2197|     11|                                      item->size);
 2198|     11|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2199|     11|            }
 2200|  12.8M|            item->size += extent->size;
 2201|  12.8M|        }
 2202|  1.31M|    }
 2203|   591k|    return AVIF_RESULT_OK;
 2204|   592k|}
read.c:avifCheckItemID:
  964|  4.43M|{
  965|       |    // Section 8.11.1.1 of ISO/IEC 14496-12 about MetaBox definition:
  966|       |    //   The item_ID value of 0 should not be used
  967|       |    // Section 8.11.6 of ISO/IEC 14496-12 about ItemInfoEntry syntax and semantics:
  968|       |    //   item_ID contains either 0 for the primary resource (e.g. the XML contained in an XMLBox)
  969|       |    //   or the ID of the item for which the following information is defined.
  970|       |    // Assuming 'infe' is the only way to properly define an item in AVIF, a compliant item cannot have an ID of zero.
  971|       |    // One way to bypass that rule would be to have 'infe' with item_ID being 0, referring to "the primary resource",
  972|       |    // and 'pitm' defining "the primary resource" as the item with an item_ID of 0. libavif considers that as invalid.
  973|  4.43M|    if (itemID == 0) {
  ------------------
  |  Branch (973:9): [True: 17, False: 4.43M]
  ------------------
  974|     17|        avifDiagnosticsPrintf(diag, "Box[%.4s] has an invalid item ID [%u]", boxFourcc, itemID);
  975|     17|        return AVIF_RESULT_BMFF_PARSE_FAILED;
  976|     17|    }
  977|  4.43M|    return AVIF_RESULT_OK;
  978|  4.43M|}
read.c:avifParsePrimaryItemBox:
 3248|   558k|{
 3249|   558k|    if (meta->primaryItemID > 0) {
  ------------------
  |  Branch (3249:9): [True: 0, False: 558k]
  ------------------
 3250|       |        // Illegal to have multiple pitm boxes, bail out
 3251|      0|        avifDiagnosticsPrintf(diag, "Multiple boxes of unique Box[pitm] found");
 3252|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 3253|      0|    }
 3254|       |
 3255|   558k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[pitm]");
  ------------------
  |  |  810|   558k|    avifROStream VARNAME;                               \
  |  |  811|   558k|    avifROData VARNAME##_roData;                        \
  |  |  812|   558k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   558k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   558k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3256|       |
 3257|   558k|    uint8_t version;
 3258|   558k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, NULL));
  ------------------
  |  |   36|   558k|    do {                        \
  |  |   37|   558k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 558k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   558k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 558k]
  |  |  ------------------
  ------------------
 3259|       |
 3260|   558k|    if (version == 0) {
  ------------------
  |  Branch (3260:9): [True: 558k, False: 10]
  ------------------
 3261|   558k|        uint16_t tmp16;
 3262|   558k|        AVIF_CHECK(avifROStreamReadU16(&s, &tmp16)); // unsigned int(16) item_ID;
  ------------------
  |  |   36|   558k|    do {                        \
  |  |   37|   558k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 558k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   558k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 558k]
  |  |  ------------------
  ------------------
 3263|   558k|        meta->primaryItemID = tmp16;
 3264|   558k|    } else {
 3265|     10|        AVIF_CHECK(avifROStreamReadU32(&s, &meta->primaryItemID)); // unsigned int(32) item_ID;
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
 3266|     10|    }
 3267|   558k|    return AVIF_TRUE;
  ------------------
  |  |   88|   558k|#define AVIF_TRUE 1
  ------------------
 3268|   558k|}
read.c:avifParseItemDataBox:
 3271|    242|{
 3272|       |    // Check to see if we've already seen an idat box for this meta box. If so, bail out
 3273|    242|    if (meta->idat.size > 0) {
  ------------------
  |  Branch (3273:9): [True: 0, False: 242]
  ------------------
 3274|      0|        avifDiagnosticsPrintf(diag, "Meta box contains multiple idat boxes");
 3275|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 3276|      0|    }
 3277|    242|    if (rawLen == 0) {
  ------------------
  |  Branch (3277:9): [True: 1, False: 241]
  ------------------
 3278|      1|        avifDiagnosticsPrintf(diag, "idat box has a length of 0");
 3279|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3280|      1|    }
 3281|       |
 3282|    241|    if (avifRWDataSet(&meta->idat, raw, rawLen) != AVIF_RESULT_OK) {
  ------------------
  |  Branch (3282:9): [True: 0, False: 241]
  ------------------
 3283|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 3284|      0|    }
 3285|    241|    return AVIF_TRUE;
  ------------------
  |  |   88|    241|#define AVIF_TRUE 1
  ------------------
 3286|    241|}
read.c:avifParseItemPropertiesBox:
 3289|   554k|{
 3290|   554k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iprp]");
  ------------------
  |  |  810|   554k|    avifROStream VARNAME;                               \
  |  |  811|   554k|    avifROData VARNAME##_roData;                        \
  |  |  812|   554k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   554k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   554k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3291|       |
 3292|   554k|    avifBoxHeader ipcoHeader;
 3293|   554k|    AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &ipcoHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   554k|    do {                        \
  |  |   46|   554k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 554k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   554k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 554k]
  |  |  ------------------
  ------------------
 3294|   554k|    if (memcmp(ipcoHeader.type, "ipco", 4)) {
  ------------------
  |  Branch (3294:9): [True: 2, False: 554k]
  ------------------
 3295|      2|        avifDiagnosticsPrintf(diag, "Failed to find Box[ipco] as the first box in Box[iprp]");
 3296|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3297|      2|    }
 3298|       |
 3299|       |    // Read all item properties inside of ItemPropertyContainerBox
 3300|   554k|    AVIF_CHECKRES(avifParseItemPropertyContainerBox(&meta->properties,
  ------------------
  |  |   54|   554k|    do {                                  \
  |  |   55|   554k|        const avifResult result__ = (A);  \
  |  |   56|   554k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 69, False: 554k]
  |  |  ------------------
  |  |   57|     69|            avifBreakOnError();           \
  |  |   58|     69|            return result__;              \
  |  |   59|     69|        }                                 \
  |  |   60|   554k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 554k]
  |  |  ------------------
  ------------------
 3301|   554k|                                                    rawOffset + avifROStreamOffset(&s),
 3302|   554k|                                                    avifROStreamCurrent(&s),
 3303|   554k|                                                    ipcoHeader.size,
 3304|   554k|                                                    /*isTrack=*/AVIF_FALSE,
 3305|   554k|                                                    diag));
 3306|   554k|    AVIF_CHECKERR(avifROStreamSkip(&s, ipcoHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   554k|    do {                        \
  |  |   46|   554k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 554k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   554k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 554k]
  |  |  ------------------
  ------------------
 3307|       |
 3308|   554k|    uint32_t versionAndFlagsSeen[MAX_IPMA_VERSION_AND_FLAGS_SEEN];
 3309|   554k|    uint32_t versionAndFlagsSeenCount = 0;
 3310|       |
 3311|       |    // Now read all ItemPropertyAssociation until the end of the box, and make associations
 3312|  1.10M|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3312:12): [True: 552k, False: 553k]
  ------------------
 3313|   552k|        avifBoxHeader ipmaHeader;
 3314|   552k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &ipmaHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   552k|    do {                        \
  |  |   46|   552k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 5, False: 552k]
  |  |  ------------------
  |  |   47|      5|            avifBreakOnError(); \
  |  |   48|      5|            return ERR;         \
  |  |   49|      5|        }                       \
  |  |   50|   552k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 552k]
  |  |  ------------------
  ------------------
 3315|       |
 3316|   552k|        if (!memcmp(ipmaHeader.type, "ipma", 4)) {
  ------------------
  |  Branch (3316:13): [True: 552k, False: 1]
  ------------------
 3317|   552k|            uint32_t versionAndFlags;
 3318|   552k|            AVIF_CHECKRES(avifParseItemPropertyAssociation(meta, avifROStreamCurrent(&s), ipmaHeader.size, diag, &versionAndFlags));
  ------------------
  |  |   54|   552k|    do {                                  \
  |  |   55|   552k|        const avifResult result__ = (A);  \
  |  |   56|   552k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 99, False: 552k]
  |  |  ------------------
  |  |   57|     99|            avifBreakOnError();           \
  |  |   58|     99|            return result__;              \
  |  |   59|     99|        }                                 \
  |  |   60|   552k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 552k]
  |  |  ------------------
  ------------------
 3319|   552k|            for (uint32_t i = 0; i < versionAndFlagsSeenCount; ++i) {
  ------------------
  |  Branch (3319:34): [True: 0, False: 552k]
  ------------------
 3320|      0|                if (versionAndFlagsSeen[i] == versionAndFlags) {
  ------------------
  |  Branch (3320:21): [True: 0, False: 0]
  ------------------
 3321|       |                    // BMFF (ISO/IEC 14496-12:2022) 8.11.14.1 - There shall be at most one
 3322|       |                    // ItemPropertyAssociationBox with a given pair of values of version and
 3323|       |                    // flags.
 3324|      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");
 3325|      0|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 3326|      0|                }
 3327|      0|            }
 3328|   552k|            if (versionAndFlagsSeenCount == MAX_IPMA_VERSION_AND_FLAGS_SEEN) {
  ------------------
  |  |   39|   552k|#define MAX_IPMA_VERSION_AND_FLAGS_SEEN 4
  ------------------
  |  Branch (3328:17): [True: 0, False: 552k]
  ------------------
 3329|      0|                avifDiagnosticsPrintf(diag, "Exceeded possible count of unique ipma version and flags tuples");
 3330|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3331|      0|            }
 3332|   552k|            versionAndFlagsSeen[versionAndFlagsSeenCount] = versionAndFlags;
 3333|   552k|            ++versionAndFlagsSeenCount;
 3334|   552k|        } else {
 3335|       |            // These must all be type ipma
 3336|      1|            avifDiagnosticsPrintf(diag, "Box[iprp] contains a box that isn't type 'ipma'");
 3337|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3338|      1|        }
 3339|       |
 3340|   552k|        AVIF_CHECKERR(avifROStreamSkip(&s, ipmaHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   552k|    do {                        \
  |  |   46|   552k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 552k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   552k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 552k]
  |  |  ------------------
  ------------------
 3341|   552k|    }
 3342|   553k|    return AVIF_RESULT_OK;
 3343|   554k|}
read.c:avifParseItemPropertyContainerBox:
 3018|   634k|{
 3019|   634k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ipco]");
  ------------------
  |  |  810|   634k|    avifROStream VARNAME;                               \
  |  |  811|   634k|    avifROData VARNAME##_roData;                        \
  |  |  812|   634k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   634k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   634k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3020|       |
 3021|  4.25M|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3021:12): [True: 3.62M, False: 634k]
  ------------------
 3022|  3.62M|        avifBoxHeader header;
 3023|  3.62M|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.62M|    do {                        \
  |  |   46|  3.62M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 14, False: 3.62M]
  |  |  ------------------
  |  |   47|     14|            avifBreakOnError(); \
  |  |   48|     14|            return ERR;         \
  |  |   49|     14|        }                       \
  |  |   50|  3.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.62M]
  |  |  ------------------
  ------------------
 3024|       |
 3025|  3.62M|        avifProperty * prop = (avifProperty *)avifArrayPush(properties);
 3026|  3.62M|        AVIF_CHECKERR(prop != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  3.62M|    do {                        \
  |  |   46|  3.62M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.62M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.62M]
  |  |  ------------------
  ------------------
 3027|  3.62M|        memcpy(prop->type, header.type, 4);
 3028|  3.62M|        prop->isOpaque = AVIF_FALSE;
  ------------------
  |  |   89|  3.62M|#define AVIF_FALSE 0
  ------------------
 3029|  3.62M|        if (!memcmp(header.type, "ispe", 4)) {
  ------------------
  |  Branch (3029:13): [True: 639k, False: 2.98M]
  ------------------
 3030|   639k|            AVIF_CHECKERR(avifParseImageSpatialExtentsProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|   639k|    do {                        \
  |  |   46|   639k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 639k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   639k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 639k]
  |  |  ------------------
  ------------------
 3031|   639k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3032|  2.98M|        } else if ((!memcmp(header.type, "auxC", 4) && !isTrack) || (!memcmp(header.type, "auxi", 4) && isTrack)) {
  ------------------
  |  Branch (3032:21): [True: 190k, False: 2.79M]
  |  Branch (3032:56): [True: 190k, False: 223]
  |  Branch (3032:70): [True: 9.02k, False: 2.78M]
  |  Branch (3032:105): [True: 7.20k, False: 1.81k]
  ------------------
 3033|   197k|            AVIF_CHECKERR(avifParseAuxiliaryTypeProperty(prop, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   197k|    do {                        \
  |  |   46|   197k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 197k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   197k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 197k]
  |  |  ------------------
  ------------------
 3034|  2.78M|        } else if (!memcmp(header.type, "colr", 4)) {
  ------------------
  |  Branch (3034:20): [True: 428k, False: 2.35M]
  ------------------
 3035|   428k|            AVIF_CHECKERR(avifParseColourInformationBox(prop, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|   428k|    do {                        \
  |  |   46|   428k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 7, False: 428k]
  |  |  ------------------
  |  |   47|      7|            avifBreakOnError(); \
  |  |   48|      7|            return ERR;         \
  |  |   49|      7|        }                       \
  |  |   50|   428k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 428k]
  |  |  ------------------
  ------------------
 3036|   428k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3037|  2.35M|        } else if (!memcmp(header.type, "av1C", 4)) {
  ------------------
  |  Branch (3037:20): [True: 790k, False: 1.56M]
  ------------------
 3038|   790k|            AVIF_CHECKERR(avifParseCodecConfigurationBoxProperty(prop, avifROStreamCurrent(&s), header.size, "av1C", diag),
  ------------------
  |  |   45|   790k|    do {                        \
  |  |   46|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 790k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 3039|   790k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3040|       |#if defined(AVIF_CODEC_AVM)
 3041|       |        } else if (!memcmp(header.type, "av2C", 4)) {
 3042|       |            AVIF_CHECKERR(avifParseCodecConfigurationBoxProperty(prop, avifROStreamCurrent(&s), header.size, "av2C", diag),
 3043|       |                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3044|       |#endif
 3045|  1.56M|        } else if (!memcmp(header.type, "pasp", 4)) {
  ------------------
  |  Branch (3045:20): [True: 3, False: 1.56M]
  ------------------
 3046|      3|            AVIF_CHECKERR(avifParsePixelAspectRatioBoxProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|      3|    do {                        \
  |  |   46|      3|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 1]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 3047|      3|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3048|  1.56M|        } else if (!memcmp(header.type, "clap", 4)) {
  ------------------
  |  Branch (3048:20): [True: 590, False: 1.56M]
  ------------------
 3049|    590|            AVIF_CHECKERR(avifParseCleanApertureBoxProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|    590|    do {                        \
  |  |   46|    590|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 8, False: 582]
  |  |  ------------------
  |  |   47|      8|            avifBreakOnError(); \
  |  |   48|      8|            return ERR;         \
  |  |   49|      8|        }                       \
  |  |   50|    590|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 582]
  |  |  ------------------
  ------------------
 3050|    590|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3051|  1.56M|        } else if (!memcmp(header.type, "irot", 4)) {
  ------------------
  |  Branch (3051:20): [True: 4.05k, False: 1.56M]
  ------------------
 3052|  4.05k|            AVIF_CHECKERR(avifParseImageRotationProperty(prop, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  4.05k|    do {                        \
  |  |   46|  4.05k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 4.05k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 4.05k]
  |  |  ------------------
  ------------------
 3053|  1.56M|        } else if (!memcmp(header.type, "imir", 4)) {
  ------------------
  |  Branch (3053:20): [True: 580, False: 1.56M]
  ------------------
 3054|    580|            AVIF_CHECKERR(avifParseImageMirrorProperty(prop, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    580|    do {                        \
  |  |   46|    580|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 578]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|    580|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 578]
  |  |  ------------------
  ------------------
 3055|  1.56M|        } else if (!memcmp(header.type, "pixi", 4)) {
  ------------------
  |  Branch (3055:20): [True: 707k, False: 854k]
  ------------------
 3056|   707k|            AVIF_CHECKRES(avifParsePixelInformationProperty(prop, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   707k|    do {                                  \
  |  |   55|   707k|        const avifResult result__ = (A);  \
  |  |   56|   707k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 13, False: 707k]
  |  |  ------------------
  |  |   57|     13|            avifBreakOnError();           \
  |  |   58|     13|            return result__;              \
  |  |   59|     13|        }                                 \
  |  |   60|   707k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 707k]
  |  |  ------------------
  ------------------
 3057|   854k|        } else if (!memcmp(header.type, "a1op", 4)) {
  ------------------
  |  Branch (3057:20): [True: 3, False: 854k]
  ------------------
 3058|      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]
  |  |  ------------------
  ------------------
 3059|      3|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3060|   854k|        } else if (!memcmp(header.type, "lsel", 4)) {
  ------------------
  |  Branch (3060:20): [True: 0, False: 854k]
  ------------------
 3061|      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]
  |  |  ------------------
  ------------------
 3062|   854k|        } else if (!memcmp(header.type, "a1lx", 4)) {
  ------------------
  |  Branch (3062:20): [True: 285, False: 854k]
  ------------------
 3063|    285|            AVIF_CHECKERR(avifParseAV1LayeredImageIndexingProperty(prop, avifROStreamCurrent(&s), header.size, diag),
  ------------------
  |  |   45|    285|    do {                        \
  |  |   46|    285|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 8, False: 277]
  |  |  ------------------
  |  |   47|      8|            avifBreakOnError(); \
  |  |   48|      8|            return ERR;         \
  |  |   49|      8|        }                       \
  |  |   50|    285|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 277]
  |  |  ------------------
  ------------------
 3064|    285|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3065|   854k|        } else if (!memcmp(header.type, "clli", 4)) {
  ------------------
  |  Branch (3065:20): [True: 663, False: 853k]
  ------------------
 3066|    663|            AVIF_CHECKRES(avifParseContentLightLevelInformationBox(prop, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|    663|    do {                                  \
  |  |   55|    663|        const avifResult result__ = (A);  \
  |  |   56|    663|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 660]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|    663|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 660]
  |  |  ------------------
  ------------------
 3067|   853k|        } else {
 3068|   853k|            prop->isOpaque = AVIF_TRUE;
  ------------------
  |  |   88|   853k|#define AVIF_TRUE 1
  ------------------
 3069|   853k|            memset(&prop->u.opaque, 0, sizeof(prop->u.opaque));
 3070|   853k|            memcpy(prop->u.opaque.usertype, header.usertype, sizeof(prop->u.opaque.usertype));
 3071|   853k|            AVIF_CHECKRES(avifRWDataSet(&prop->u.opaque.boxPayload, avifROStreamCurrent(&s), header.size));
  ------------------
  |  |   54|   853k|    do {                                  \
  |  |   55|   853k|        const avifResult result__ = (A);  \
  |  |   56|   853k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 853k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   853k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 853k]
  |  |  ------------------
  ------------------
 3072|   853k|        }
 3073|       |
 3074|  3.62M|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  3.62M|    do {                        \
  |  |   46|  3.62M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.62M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.62M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.62M]
  |  |  ------------------
  ------------------
 3075|  3.62M|    }
 3076|   634k|    return AVIF_RESULT_OK;
 3077|   634k|}
read.c:avifParseImageSpatialExtentsProperty:
 2571|   639k|{
 2572|   639k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ispe]");
  ------------------
  |  |  810|   639k|    avifROStream VARNAME;                               \
  |  |  811|   639k|    avifROData VARNAME##_roData;                        \
  |  |  812|   639k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   639k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   639k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2573|   639k|    AVIF_CHECK(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL));
  ------------------
  |  |   36|   639k|    do {                        \
  |  |   37|   639k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 639k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   639k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 639k]
  |  |  ------------------
  ------------------
 2574|       |
 2575|   639k|    avifImageSpatialExtents * ispe = &prop->u.ispe;
 2576|   639k|    AVIF_CHECK(avifROStreamReadU32(&s, &ispe->width));
  ------------------
  |  |   36|   639k|    do {                        \
  |  |   37|   639k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 639k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   639k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 639k]
  |  |  ------------------
  ------------------
 2577|   639k|    AVIF_CHECK(avifROStreamReadU32(&s, &ispe->height));
  ------------------
  |  |   36|   639k|    do {                        \
  |  |   37|   639k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 639k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   639k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 639k]
  |  |  ------------------
  ------------------
 2578|   639k|    return AVIF_TRUE;
  ------------------
  |  |   88|   639k|#define AVIF_TRUE 1
  ------------------
 2579|   639k|}
read.c:avifParseAuxiliaryTypeProperty:
 2582|   197k|{
 2583|   197k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[auxC]");
  ------------------
  |  |  810|   197k|    avifROStream VARNAME;                               \
  |  |  811|   197k|    avifROData VARNAME##_roData;                        \
  |  |  812|   197k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   197k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   197k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2584|   197k|    AVIF_CHECK(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL));
  ------------------
  |  |   36|   197k|    do {                        \
  |  |   37|   197k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 197k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   197k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 197k]
  |  |  ------------------
  ------------------
 2585|       |
 2586|   197k|    AVIF_CHECK(avifROStreamReadString(&s, prop->u.auxC.auxType, AUXTYPE_SIZE));
  ------------------
  |  |   36|   197k|    do {                        \
  |  |   37|   197k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 197k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   197k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 197k]
  |  |  ------------------
  ------------------
 2587|   197k|    return AVIF_TRUE;
  ------------------
  |  |   88|   197k|#define AVIF_TRUE 1
  ------------------
 2588|   197k|}
read.c:avifParseColourInformationBox:
 2591|   428k|{
 2592|   428k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[colr]");
  ------------------
  |  |  810|   428k|    avifROStream VARNAME;                               \
  |  |  811|   428k|    avifROData VARNAME##_roData;                        \
  |  |  812|   428k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   428k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   428k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2593|       |
 2594|   428k|    avifColourInformationBox * colr = &prop->u.colr;
 2595|   428k|    colr->hasICC = AVIF_FALSE;
  ------------------
  |  |   89|   428k|#define AVIF_FALSE 0
  ------------------
 2596|   428k|    colr->hasNCLX = AVIF_FALSE;
  ------------------
  |  |   89|   428k|#define AVIF_FALSE 0
  ------------------
 2597|       |
 2598|   428k|    uint8_t colorType[4]; // unsigned int(32) colour_type;
 2599|   428k|    AVIF_CHECK(avifROStreamRead(&s, colorType, 4));
  ------------------
  |  |   36|   428k|    do {                        \
  |  |   37|   428k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 428k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   428k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 428k]
  |  |  ------------------
  ------------------
 2600|   428k|    if (!memcmp(colorType, "rICC", 4) || !memcmp(colorType, "prof", 4)) {
  ------------------
  |  Branch (2600:9): [True: 0, False: 428k]
  |  Branch (2600:42): [True: 61, False: 428k]
  ------------------
 2601|       |        // Remember the offset of the ICC payload relative to the beginning of the stream. A direct pointer cannot be stored
 2602|       |        // because decoder->io->persistent could have been AVIF_FALSE when obtaining raw through decoder->io->read().
 2603|       |        // The bytes could be copied now instead of remembering the offset, but it is as invasive as passing rawOffset everywhere.
 2604|     61|        colr->iccOffset = rawOffset + avifROStreamOffset(&s);
 2605|     61|        colr->iccSize = avifROStreamRemainingBytes(&s);
 2606|     61|        if (colr->iccSize == 0) {
  ------------------
  |  Branch (2606:13): [True: 0, False: 61]
  ------------------
 2607|      0|            avifDiagnosticsPrintf(diag, "Box[colr] contains empty ICC_profile");
 2608|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 2609|      0|        }
 2610|     61|        colr->hasICC = AVIF_TRUE;
  ------------------
  |  |   88|     61|#define AVIF_TRUE 1
  ------------------
 2611|   428k|    } else if (!memcmp(colorType, "nclx", 4)) {
  ------------------
  |  Branch (2611:16): [True: 185k, False: 243k]
  ------------------
 2612|   185k|        AVIF_CHECK(avifROStreamReadU16(&s, &colr->colorPrimaries));          // unsigned int(16) colour_primaries;
  ------------------
  |  |   36|   185k|    do {                        \
  |  |   37|   185k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 185k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   185k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 185k]
  |  |  ------------------
  ------------------
 2613|   185k|        AVIF_CHECK(avifROStreamReadU16(&s, &colr->transferCharacteristics)); // unsigned int(16) transfer_characteristics;
  ------------------
  |  |   36|   185k|    do {                        \
  |  |   37|   185k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 185k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   185k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 185k]
  |  |  ------------------
  ------------------
 2614|   185k|        AVIF_CHECK(avifROStreamReadU16(&s, &colr->matrixCoefficients));      // unsigned int(16) matrix_coefficients;
  ------------------
  |  |   36|   185k|    do {                        \
  |  |   37|   185k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 185k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   185k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 185k]
  |  |  ------------------
  ------------------
 2615|   185k|        uint8_t full_range_flag;
 2616|   185k|        AVIF_CHECK(avifROStreamReadBitsU8(&s, &full_range_flag, /*bitCount=*/1)); // unsigned int(1) full_range_flag;
  ------------------
  |  |   36|   185k|    do {                        \
  |  |   37|   185k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 185k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   185k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 185k]
  |  |  ------------------
  ------------------
 2617|   185k|        colr->range = full_range_flag ? AVIF_RANGE_FULL : AVIF_RANGE_LIMITED;
  ------------------
  |  Branch (2617:23): [True: 168k, False: 16.2k]
  ------------------
 2618|   185k|        uint8_t reserved;
 2619|   185k|        AVIF_CHECK(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/7)); // unsigned int(7) reserved = 0;
  ------------------
  |  |   36|   185k|    do {                        \
  |  |   37|   185k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 185k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   185k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 185k]
  |  |  ------------------
  ------------------
 2620|   185k|        if (reserved) {
  ------------------
  |  Branch (2620:13): [True: 2, False: 185k]
  ------------------
 2621|      2|            avifDiagnosticsPrintf(diag, "Box[colr] contains nonzero reserved bits [%u]", reserved);
 2622|      2|            return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
 2623|      2|        }
 2624|   185k|        colr->hasNCLX = AVIF_TRUE;
  ------------------
  |  |   88|   185k|#define AVIF_TRUE 1
  ------------------
 2625|   185k|    }
 2626|   428k|    return AVIF_TRUE;
  ------------------
  |  |   88|   428k|#define AVIF_TRUE 1
  ------------------
 2627|   428k|}
read.c:avifParseCodecConfigurationBoxProperty:
 2802|   790k|{
 2803|   790k|    char diagContext[10];
 2804|   790k|    snprintf(diagContext, sizeof(diagContext), "Box[%.4s]", configPropName); // "Box[av1C]" or "Box[av2C]"
 2805|   790k|    BEGIN_STREAM(s, raw, rawLen, diag, diagContext);
  ------------------
  |  |  810|   790k|    avifROStream VARNAME;                               \
  |  |  811|   790k|    avifROData VARNAME##_roData;                        \
  |  |  812|   790k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   790k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   790k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2806|   790k|    return avifParseCodecConfiguration(&s, &prop->u.av1C, configPropName, diag);
 2807|   790k|}
read.c:avifParseCodecConfiguration:
 2748|   790k|{
 2749|   790k|    const size_t av1COffset = avifROStreamOffset(s);
 2750|       |
 2751|   790k|    uint32_t marker, version;
 2752|   790k|    AVIF_CHECK(avifROStreamReadBitsU32(s, &marker, /*bitCount=*/1)); // unsigned int (1) marker = 1;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 790k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2753|   790k|    if (!marker) {
  ------------------
  |  Branch (2753:9): [True: 1, False: 790k]
  ------------------
 2754|      1|        avifDiagnosticsPrintf(diag, "%.4s contains illegal marker: [%u]", configPropName, marker);
 2755|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2756|      1|    }
 2757|   790k|    AVIF_CHECK(avifROStreamReadBitsU32(s, &version, /*bitCount=*/7)); // unsigned int (7) version = 1;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2758|   790k|    if (version != 1) {
  ------------------
  |  Branch (2758:9): [True: 1, False: 790k]
  ------------------
 2759|      1|        avifDiagnosticsPrintf(diag, "%.4s contains illegal version: [%u]", configPropName, version);
 2760|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2761|      1|    }
 2762|       |
 2763|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->seqProfile, /*bitCount=*/3));         // unsigned int (3) seq_profile;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 790k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2764|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->seqLevelIdx0, /*bitCount=*/5));       // unsigned int (5) seq_level_idx_0;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2765|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->seqTier0, /*bitCount=*/1));           // unsigned int (1) seq_tier_0;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 790k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2766|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->highBitdepth, /*bitCount=*/1));       // unsigned int (1) high_bitdepth;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2767|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->twelveBit, /*bitCount=*/1));          // unsigned int (1) twelve_bit;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2768|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->monochrome, /*bitCount=*/1));         // unsigned int (1) monochrome;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2769|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->chromaSubsamplingX, /*bitCount=*/1)); // unsigned int (1) chroma_subsampling_x;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2770|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->chromaSubsamplingY, /*bitCount=*/1)); // unsigned int (1) chroma_subsampling_y;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2771|   790k|    AVIF_CHECK(avifROStreamReadBitsU8(s, &config->chromaSamplePosition, /*bitCount=*/2)); // unsigned int (2) chroma_sample_position;
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2772|       |
 2773|       |    // unsigned int (3) reserved = 0;
 2774|       |    // unsigned int (1) initial_presentation_delay_present;
 2775|       |    // if (initial_presentation_delay_present) {
 2776|       |    //   unsigned int (4) initial_presentation_delay_minus_one;
 2777|       |    // } else {
 2778|       |    //   unsigned int (4) reserved = 0;
 2779|       |    // }
 2780|   790k|    AVIF_CHECK(avifROStreamSkip(s, /*byteCount=*/1));
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 790k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2781|       |
 2782|       |    // According to section 2.2.1 of AV1 Image File Format specification v1.1.0:
 2783|       |    //   - Sequence Header OBUs should not be present in the AV1CodecConfigurationBox.
 2784|       |    //   - If a Sequence Header OBU is present in the AV1CodecConfigurationBox,
 2785|       |    //     it shall match the Sequence Header OBU in the AV1 Image Item Data.
 2786|       |    //   - Metadata OBUs, if present, shall match the values given in other item properties,
 2787|       |    //     such as the PixelInformationProperty or ColourInformationBox.
 2788|       |    // See https://aomediacodec.github.io/av1-avif/v1.1.0.html#av1-configuration-item-property.
 2789|       |    // For simplicity, the constraints above are not enforced.
 2790|       |    // The following is skipped by avifParseItemPropertyContainerBox().
 2791|       |    // unsigned int (8) configOBUs[];
 2792|       |
 2793|   790k|    AVIF_CHECK(avifROStreamOffset(s) - av1COffset == 4); // Make sure avifParseCodecConfiguration() reads exactly 4 bytes.
  ------------------
  |  |   36|   790k|    do {                        \
  |  |   37|   790k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 790k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   790k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 790k]
  |  |  ------------------
  ------------------
 2794|   790k|    return AVIF_TRUE;
  ------------------
  |  |   88|   790k|#define AVIF_TRUE 1
  ------------------
 2795|   790k|}
read.c:avifParsePixelAspectRatioBoxProperty:
 2810|      3|{
 2811|      3|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[pasp]");
  ------------------
  |  |  810|      3|    avifROStream VARNAME;                               \
  |  |  811|      3|    avifROData VARNAME##_roData;                        \
  |  |  812|      3|    VARNAME##_roData.data = PTR;                        \
  |  |  813|      3|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|      3|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2812|       |
 2813|      3|    avifPixelAspectRatioBox * pasp = &prop->u.pasp;
 2814|      3|    AVIF_CHECK(avifROStreamReadU32(&s, &pasp->hSpacing)); // unsigned int(32) hSpacing;
  ------------------
  |  |   36|      3|    do {                        \
  |  |   37|      3|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 2]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 2815|      2|    AVIF_CHECK(avifROStreamReadU32(&s, &pasp->vSpacing)); // unsigned int(32) vSpacing;
  ------------------
  |  |   36|      2|    do {                        \
  |  |   37|      2|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 1]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 2816|      1|    return AVIF_TRUE;
  ------------------
  |  |   88|      1|#define AVIF_TRUE 1
  ------------------
 2817|      2|}
read.c:avifParseCleanApertureBoxProperty:
 2820|    590|{
 2821|    590|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[clap]");
  ------------------
  |  |  810|    590|    avifROStream VARNAME;                               \
  |  |  811|    590|    avifROData VARNAME##_roData;                        \
  |  |  812|    590|    VARNAME##_roData.data = PTR;                        \
  |  |  813|    590|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|    590|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2822|       |
 2823|    590|    avifCleanApertureBox * clap = &prop->u.clap;
 2824|    590|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->widthN));    // unsigned int(32) cleanApertureWidthN;
  ------------------
  |  |   36|    590|    do {                        \
  |  |   37|    590|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 589]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    590|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 589]
  |  |  ------------------
  ------------------
 2825|    589|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->widthD));    // unsigned int(32) cleanApertureWidthD;
  ------------------
  |  |   36|    589|    do {                        \
  |  |   37|    589|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 588]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    589|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 588]
  |  |  ------------------
  ------------------
 2826|    588|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->heightN));   // unsigned int(32) cleanApertureHeightN;
  ------------------
  |  |   36|    588|    do {                        \
  |  |   37|    588|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 587]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    588|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 587]
  |  |  ------------------
  ------------------
 2827|    587|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->heightD));   // unsigned int(32) cleanApertureHeightD;
  ------------------
  |  |   36|    587|    do {                        \
  |  |   37|    587|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 586]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    587|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 586]
  |  |  ------------------
  ------------------
 2828|    586|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->horizOffN)); // unsigned int(32) horizOffN;
  ------------------
  |  |   36|    586|    do {                        \
  |  |   37|    586|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 585]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    586|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 585]
  |  |  ------------------
  ------------------
 2829|    585|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->horizOffD)); // unsigned int(32) horizOffD;
  ------------------
  |  |   36|    585|    do {                        \
  |  |   37|    585|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 584]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    585|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 584]
  |  |  ------------------
  ------------------
 2830|    584|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->vertOffN));  // unsigned int(32) vertOffN;
  ------------------
  |  |   36|    584|    do {                        \
  |  |   37|    584|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 583]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    584|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 583]
  |  |  ------------------
  ------------------
 2831|    583|    AVIF_CHECK(avifROStreamReadU32(&s, &clap->vertOffD));  // unsigned int(32) vertOffD;
  ------------------
  |  |   36|    583|    do {                        \
  |  |   37|    583|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 582]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    583|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 582]
  |  |  ------------------
  ------------------
 2832|    582|    return AVIF_TRUE;
  ------------------
  |  |   88|    582|#define AVIF_TRUE 1
  ------------------
 2833|    583|}
read.c:avifParseImageRotationProperty:
 2836|  4.05k|{
 2837|  4.05k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[irot]");
  ------------------
  |  |  810|  4.05k|    avifROStream VARNAME;                               \
  |  |  811|  4.05k|    avifROData VARNAME##_roData;                        \
  |  |  812|  4.05k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  4.05k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  4.05k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2838|       |
 2839|  4.05k|    avifImageRotation * irot = &prop->u.irot;
 2840|  4.05k|    uint8_t reserved;
 2841|  4.05k|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/6)); // unsigned int (6) reserved = 0;
  ------------------
  |  |   36|  4.05k|    do {                        \
  |  |   37|  4.05k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 4.05k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 4.05k]
  |  |  ------------------
  ------------------
 2842|  4.05k|    if (reserved) {
  ------------------
  |  Branch (2842:9): [True: 1, False: 4.05k]
  ------------------
 2843|      1|        avifDiagnosticsPrintf(diag, "Box[irot] contains nonzero reserved bits [%u]", reserved);
 2844|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2845|      1|    }
 2846|  4.05k|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &irot->angle, /*bitCount=*/2)); // unsigned int (2) angle;
  ------------------
  |  |   36|  4.05k|    do {                        \
  |  |   37|  4.05k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 4.05k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  4.05k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 4.05k]
  |  |  ------------------
  ------------------
 2847|  4.05k|    return AVIF_TRUE;
  ------------------
  |  |   88|  4.05k|#define AVIF_TRUE 1
  ------------------
 2848|  4.05k|}
read.c:avifParseImageMirrorProperty:
 2851|    580|{
 2852|    580|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[imir]");
  ------------------
  |  |  810|    580|    avifROStream VARNAME;                               \
  |  |  811|    580|    avifROData VARNAME##_roData;                        \
  |  |  812|    580|    VARNAME##_roData.data = PTR;                        \
  |  |  813|    580|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|    580|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2853|       |
 2854|    580|    avifImageMirror * imir = &prop->u.imir;
 2855|    580|    uint8_t reserved;
 2856|    580|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/7)); // unsigned int(7) reserved = 0;
  ------------------
  |  |   36|    580|    do {                        \
  |  |   37|    580|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 579]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    580|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 579]
  |  |  ------------------
  ------------------
 2857|    579|    if (reserved) {
  ------------------
  |  Branch (2857:9): [True: 1, False: 578]
  ------------------
 2858|      1|        avifDiagnosticsPrintf(diag, "Box[imir] contains nonzero reserved bits [%u]", reserved);
 2859|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2860|      1|    }
 2861|    578|    AVIF_CHECK(avifROStreamReadBitsU8(&s, &imir->axis, /*bitCount=*/1)); // unsigned int(1) axis;
  ------------------
  |  |   36|    578|    do {                        \
  |  |   37|    578|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 578]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    578|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 578]
  |  |  ------------------
  ------------------
 2862|    578|    return AVIF_TRUE;
  ------------------
  |  |   88|    578|#define AVIF_TRUE 1
  ------------------
 2863|    578|}
read.c:avifParsePixelInformationProperty:
 2866|   707k|{
 2867|   707k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[pixi]");
  ------------------
  |  |  810|   707k|    avifROStream VARNAME;                               \
  |  |  811|   707k|    avifROData VARNAME##_roData;                        \
  |  |  812|   707k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   707k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   707k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2868|   707k|    uint32_t flags = 0; // px_flags
 2869|   707k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   707k|    do {                        \
  |  |   46|   707k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 707k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   707k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 707k]
  |  |  ------------------
  ------------------
 2870|       |
 2871|   707k|    avifPixelInformationProperty * pixi = &prop->u.pixi;
 2872|   707k|    AVIF_CHECKERR(avifROStreamRead(&s, &pixi->planeCount, 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int (8) num_channels;
  ------------------
  |  |   45|   707k|    do {                        \
  |  |   46|   707k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 707k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   707k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 707k]
  |  |  ------------------
  ------------------
 2873|   707k|    if (pixi->planeCount < 1 || pixi->planeCount > MAX_PIXI_PLANE_DEPTHS) {
  ------------------
  |  |  122|   707k|#define MAX_PIXI_PLANE_DEPTHS 4
  ------------------
  |  Branch (2873:9): [True: 1, False: 707k]
  |  Branch (2873:33): [True: 2, False: 707k]
  ------------------
 2874|      3|        avifDiagnosticsPrintf(diag, "Box[pixi] contains unsupported plane count [%u]", pixi->planeCount);
 2875|      3|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2876|      3|    }
 2877|  2.36M|    for (uint8_t i = 0; i < pixi->planeCount; ++i) {
  ------------------
  |  Branch (2877:25): [True: 1.66M, False: 707k]
  ------------------
 2878|  1.66M|        AVIF_CHECKERR(avifROStreamRead(&s, &pixi->planeDepths[i], 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int (8) bits_per_channel;
  ------------------
  |  |   45|  1.66M|    do {                        \
  |  |   46|  1.66M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 1.66M]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  1.66M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.66M]
  |  |  ------------------
  ------------------
 2879|  1.66M|        if (pixi->planeDepths[i] == 0) {
  ------------------
  |  Branch (2879:13): [True: 1, False: 1.66M]
  ------------------
 2880|      1|            avifDiagnosticsPrintf(diag, "Box[pixi] plane depth shall not be 0 for channel %u", i);
 2881|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2882|      1|        }
 2883|  1.66M|        if (pixi->planeDepths[i] > 16) {
  ------------------
  |  Branch (2883:13): [True: 3, False: 1.66M]
  ------------------
 2884|      3|            avifDiagnosticsPrintf(diag, "Box[pixi] plane depth %d is not supported", (int)pixi->planeDepths[i]);
 2885|      3|            return AVIF_RESULT_NOT_IMPLEMENTED;
 2886|      3|        }
 2887|  1.66M|        if (pixi->planeDepths[i] != pixi->planeDepths[0]) {
  ------------------
  |  Branch (2887:13): [True: 3, False: 1.66M]
  ------------------
 2888|      3|            avifDiagnosticsPrintf(diag,
 2889|      3|                                  "Box[pixi] contains unsupported mismatched plane depths [%u != %u]",
 2890|      3|                                  pixi->planeDepths[i],
 2891|      3|                                  pixi->planeDepths[0]);
 2892|      3|            return AVIF_RESULT_NOT_IMPLEMENTED;
 2893|      3|        }
 2894|  1.66M|    }
 2895|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI)
 2896|       |    if (flags & 1) {
 2897|       |        for (uint8_t i = 0; i < pixi->planeCount; ++i) {
 2898|       |            uint8_t channelIdc, reserved, componentFormat, channelLabelFlag;
 2899|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &channelIdc, /*bitCount=*/3), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(3) channel_idc;
 2900|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(1) reserved = 0;
 2901|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &componentFormat, /*bitCount=*/2), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(2) component_format;
 2902|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &pixi->subsamplingFlag[i], /*bitCount=*/1),
 2903|       |                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(1) subsampling_flag;
 2904|       |            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &channelLabelFlag, /*bitCount=*/1),
 2905|       |                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(1) channel_label_flag;
 2906|       |            if (pixi->subsamplingFlag[i]) {
 2907|       |                AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &pixi->subsamplingType[i], /*bitCount=*/4),
 2908|       |                              AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) subsampling_type;
 2909|       |                AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &pixi->subsamplingLocation[i], /*bitCount=*/4),
 2910|       |                              AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) subsampling_location;
 2911|       |            }
 2912|       |
 2913|       |            // ISO/IEC 23008-12:2024/CDAM 2:2025 section 6.5.6.3:
 2914|       |            //   This field indicates the contents of the channel. A value of 0 indicates colour/grayscale. A value of
 2915|       |            //   1 indicates alpha. A value of 2 indicates depth. Values 3-7 are reserved for future use. At most one
 2916|       |            //   channel shall have a channel_idc of 1.
 2917|       |            if (channelIdc != 0) {
 2918|       |                avifDiagnosticsPrintf(diag, "Box[pixi] contains unsupported channel_idc %u for channel %u", channelIdc, i);
 2919|       |                return AVIF_RESULT_NOT_IMPLEMENTED;
 2920|       |            }
 2921|       |            if (reserved != 0) {
 2922|       |                avifDiagnosticsPrintf(diag, "Box[pixi] contains non-zero reserved field %u for channel %u", reserved, i);
 2923|       |                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2924|       |            }
 2925|       |            // ISO/IEC 23008-12:2024/CDAM 2:2025 section 6.5.6.3:
 2926|       |            //   component_format: This field indicates the data type of the channel as defined by the component_format
 2927|       |            //   values in ISO/IEC 23001-17 where component_bit_depth is considered to be equal to bits_per_channel.
 2928|       |            // ISO/IEC 23001-17 section 5.2.1.2:
 2929|       |            //   component_format: When equal to 0, component value is an unsigned integer coded on component_bit_depth bits.
 2930|       |            if (componentFormat != 0) {
 2931|       |                avifDiagnosticsPrintf(diag, "Box[pixi] contains unsupported component_format %u for channel %u", componentFormat, i);
 2932|       |                return AVIF_RESULT_NOT_IMPLEMENTED;
 2933|       |            }
 2934|       |            if (pixi->subsamplingFlag[i]) {
 2935|       |                if (pixi->subsamplingType[i] >= AVIF_PIXI_SUBSAMPLING_RESERVED) {
 2936|       |                    avifDiagnosticsPrintf(diag,
 2937|       |                                          "Box[pixi] contains reserved subsampling_type %u for channel %u",
 2938|       |                                          pixi->subsamplingType[i],
 2939|       |                                          i);
 2940|       |                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 2941|       |                }
 2942|       |                if (pixi->subsamplingLocation[i] > 4) {
 2943|       |                    avifDiagnosticsPrintf(diag,
 2944|       |                                          "Box[pixi] contains reserved subsampling_location %u for channel %u",
 2945|       |                                          pixi->subsamplingLocation[i],
 2946|       |                                          i);
 2947|       |                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 2948|       |                }
 2949|       |            }
 2950|       |            if (channelLabelFlag) {
 2951|       |                AVIF_CHECKERR(avifROStreamReadString(&s, NULL, 0), AVIF_RESULT_BMFF_PARSE_FAILED); // utf8string channel_label; (skipped)
 2952|       |            }
 2953|       |        }
 2954|       |    }
 2955|       |#endif // AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI
 2956|   707k|    return AVIF_RESULT_OK;
 2957|   707k|}
read.c:avifParseOperatingPointSelectorProperty:
 2960|      3|{
 2961|      3|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[a1op]");
  ------------------
  |  |  810|      3|    avifROStream VARNAME;                               \
  |  |  811|      3|    avifROData VARNAME##_roData;                        \
  |  |  812|      3|    VARNAME##_roData.data = PTR;                        \
  |  |  813|      3|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|      3|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2962|       |
 2963|      3|    avifOperatingPointSelectorProperty * a1op = &prop->u.a1op;
 2964|      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]
  |  |  ------------------
  ------------------
 2965|      3|    if (a1op->opIndex > 31) { // 31 is AV1's max operating point value
  ------------------
  |  Branch (2965:9): [True: 1, False: 2]
  ------------------
 2966|      1|        avifDiagnosticsPrintf(diag, "Box[a1op] contains an unsupported operating point [%u]", a1op->opIndex);
 2967|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2968|      1|    }
 2969|      2|    return AVIF_TRUE;
  ------------------
  |  |   88|      2|#define AVIF_TRUE 1
  ------------------
 2970|      3|}
read.c:avifParseAV1LayeredImageIndexingProperty:
 2986|    285|{
 2987|    285|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[a1lx]");
  ------------------
  |  |  810|    285|    avifROStream VARNAME;                               \
  |  |  811|    285|    avifROData VARNAME##_roData;                        \
  |  |  812|    285|    VARNAME##_roData.data = PTR;                        \
  |  |  813|    285|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|    285|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2988|       |
 2989|    285|    avifAV1LayeredImageIndexingProperty * a1lx = &prop->u.a1lx;
 2990|       |
 2991|    285|    uint8_t largeSize = 0;
 2992|    285|    AVIF_CHECK(avifROStreamRead(&s, &largeSize, 1));
  ------------------
  |  |   36|    285|    do {                        \
  |  |   37|    285|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 284]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    285|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 284]
  |  |  ------------------
  ------------------
 2993|    284|    if (largeSize & 0xFE) {
  ------------------
  |  Branch (2993:9): [True: 1, False: 283]
  ------------------
 2994|      1|        avifDiagnosticsPrintf(diag, "Box[a1lx] has bits set in the reserved section [%u]", largeSize);
 2995|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 2996|      1|    }
 2997|       |
 2998|  1.12k|    for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (2998:21): [True: 843, False: 277]
  ------------------
 2999|    843|        if (largeSize) {
  ------------------
  |  Branch (2999:13): [True: 9, False: 834]
  ------------------
 3000|      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]
  |  |  ------------------
  ------------------
 3001|    834|        } else {
 3002|    834|            uint16_t layerSize16;
 3003|    834|            AVIF_CHECK(avifROStreamReadU16(&s, &layerSize16));
  ------------------
  |  |   36|    834|    do {                        \
  |  |   37|    834|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 831]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|    834|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 831]
  |  |  ------------------
  ------------------
 3004|    831|            a1lx->layerSize[i] = (uint32_t)layerSize16;
 3005|    831|        }
 3006|    843|    }
 3007|       |
 3008|       |    // Layer sizes will be validated later (when the item's size is known)
 3009|    277|    return AVIF_TRUE;
  ------------------
  |  |   88|    277|#define AVIF_TRUE 1
  ------------------
 3010|    283|}
read.c:avifParseContentLightLevelInformationBox:
 2636|    663|{
 2637|    663|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[clli]");
  ------------------
  |  |  810|    663|    avifROStream VARNAME;                               \
  |  |  811|    663|    avifROData VARNAME##_roData;                        \
  |  |  812|    663|    VARNAME##_roData.data = PTR;                        \
  |  |  813|    663|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|    663|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2638|    663|    AVIF_CHECKRES(avifParseContentLightLevelInformation(&s, &prop->u.clli));
  ------------------
  |  |   54|    663|    do {                                  \
  |  |   55|    663|        const avifResult result__ = (A);  \
  |  |   56|    663|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 3, False: 660]
  |  |  ------------------
  |  |   57|      3|            avifBreakOnError();           \
  |  |   58|      3|            return result__;              \
  |  |   59|      3|        }                                 \
  |  |   60|    663|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 660]
  |  |  ------------------
  ------------------
 2639|    660|    return AVIF_RESULT_OK;
 2640|    663|}
read.c:avifParseContentLightLevelInformation:
 2630|    663|{
 2631|    663|    AVIF_CHECKERR(avifROStreamReadBitsU16(s, &clli->maxCLL, 16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) max_content_light_level
  ------------------
  |  |   45|    663|    do {                        \
  |  |   46|    663|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 662]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    663|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 662]
  |  |  ------------------
  ------------------
 2632|    662|    AVIF_CHECKERR(avifROStreamReadBitsU16(s, &clli->maxPALL, 16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) max_pic_average_light_level
  ------------------
  |  |   45|    662|    do {                        \
  |  |   46|    662|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 660]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|    662|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 660]
  |  |  ------------------
  ------------------
 2633|    660|    return AVIF_RESULT_OK;
 2634|    662|}
read.c:avifParseItemPropertyAssociation:
 3080|   552k|{
 3081|       |    // NOTE: If this function ever adds support for versions other than [0,1] or flags other than
 3082|       |    //       [0,1], please increase the value of MAX_IPMA_VERSION_AND_FLAGS_SEEN accordingly.
 3083|       |
 3084|   552k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[ipma]");
  ------------------
  |  |  810|   552k|    avifROStream VARNAME;                               \
  |  |  811|   552k|    avifROData VARNAME##_roData;                        \
  |  |  812|   552k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   552k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   552k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3085|       |
 3086|   552k|    uint8_t version;
 3087|   552k|    uint32_t flags;
 3088|   552k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   552k|    do {                        \
  |  |   46|   552k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 552k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   552k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 552k]
  |  |  ------------------
  ------------------
 3089|   552k|    avifBool propertyIndexIsU15 = ((flags & 0x1) != 0);
 3090|   552k|    *outVersionAndFlags = ((uint32_t)version << 24) | flags;
 3091|       |
 3092|   552k|    uint32_t entryCount;
 3093|   552k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   552k|    do {                        \
  |  |   46|   552k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 552k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   552k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 552k]
  |  |  ------------------
  ------------------
 3094|   552k|    unsigned int prevItemID = 0;
 3095|  1.63M|    for (uint32_t entryIndex = 0; entryIndex < entryCount; ++entryIndex) {
  ------------------
  |  Branch (3095:35): [True: 1.07M, False: 552k]
  ------------------
 3096|       |        // ISO/IEC 14496-12, Seventh edition, 2022-01, Section 8.11.14.1:
 3097|       |        //   Each ItemPropertyAssociationBox shall be ordered by increasing item_ID, and there shall
 3098|       |        //   be at most one occurrence of a given item_ID, in the set of ItemPropertyAssociationBox
 3099|       |        //   boxes.
 3100|  1.07M|        unsigned int itemID;
 3101|  1.07M|        if (version < 1) {
  ------------------
  |  Branch (3101:13): [True: 1.06M, False: 10.9k]
  ------------------
 3102|  1.06M|            uint16_t tmp;
 3103|  1.06M|            AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.06M|    do {                        \
  |  |   46|  1.06M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 8, False: 1.06M]
  |  |  ------------------
  |  |   47|      8|            avifBreakOnError(); \
  |  |   48|      8|            return ERR;         \
  |  |   49|      8|        }                       \
  |  |   50|  1.06M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.06M]
  |  |  ------------------
  ------------------
 3104|  1.06M|            itemID = tmp;
 3105|  1.06M|        } else {
 3106|  10.9k|            AVIF_CHECKERR(avifROStreamReadU32(&s, &itemID), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  10.9k|    do {                        \
  |  |   46|  10.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 14, False: 10.9k]
  |  |  ------------------
  |  |   47|     14|            avifBreakOnError(); \
  |  |   48|     14|            return ERR;         \
  |  |   49|     14|        }                       \
  |  |   50|  10.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 10.9k]
  |  |  ------------------
  ------------------
 3107|  10.9k|        }
 3108|  1.07M|        AVIF_CHECKRES(avifCheckItemID("ipma", itemID, diag));
  ------------------
  |  |   54|  1.07M|    do {                                  \
  |  |   55|  1.07M|        const avifResult result__ = (A);  \
  |  |   56|  1.07M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 1.07M]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|  1.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
 3109|  1.07M|        if (itemID <= prevItemID) {
  ------------------
  |  Branch (3109:13): [True: 1, False: 1.07M]
  ------------------
 3110|      1|            avifDiagnosticsPrintf(diag, "Box[ipma] item IDs are not ordered by increasing ID");
 3111|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3112|      1|        }
 3113|  1.07M|        prevItemID = itemID;
 3114|       |
 3115|  1.07M|        avifDecoderItem * item;
 3116|  1.07M|        AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, itemID, &item));
  ------------------
  |  |   54|  1.07M|    do {                                  \
  |  |   55|  1.07M|        const avifResult result__ = (A);  \
  |  |   56|  1.07M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.07M]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
 3117|  1.07M|        if (item->ipmaSeen) {
  ------------------
  |  Branch (3117:13): [True: 0, False: 1.07M]
  ------------------
 3118|      0|            avifDiagnosticsPrintf(diag, "Duplicate Box[ipma] for item ID [%u]", itemID);
 3119|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3120|      0|        }
 3121|  1.07M|        item->ipmaSeen = AVIF_TRUE;
  ------------------
  |  |   88|  1.07M|#define AVIF_TRUE 1
  ------------------
 3122|       |
 3123|  1.07M|        uint8_t associationCount;
 3124|  1.07M|        AVIF_CHECKERR(avifROStreamRead(&s, &associationCount, 1), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.07M|    do {                        \
  |  |   46|  1.07M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 1.07M]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  1.07M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.07M]
  |  |  ------------------
  ------------------
 3125|  5.35M|        for (uint8_t associationIndex = 0; associationIndex < associationCount; ++associationIndex) {
  ------------------
  |  Branch (3125:44): [True: 4.27M, False: 1.07M]
  ------------------
 3126|  4.27M|            uint8_t essential;
 3127|  4.27M|            AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &essential, /*bitCount=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // bit(1) essential;
  ------------------
  |  |   45|  4.27M|    do {                        \
  |  |   46|  4.27M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 15, False: 4.27M]
  |  |  ------------------
  |  |   47|     15|            avifBreakOnError(); \
  |  |   48|     15|            return ERR;         \
  |  |   49|     15|        }                       \
  |  |   50|  4.27M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 4.27M]
  |  |  ------------------
  ------------------
 3128|  4.27M|            uint32_t propertyIndex;
 3129|  4.27M|            AVIF_CHECKERR(avifROStreamReadBitsU32(&s, &propertyIndex, /*bitCount=*/propertyIndexIsU15 ? 15 : 7),
  ------------------
  |  |   45|  4.27M|    do {                        \
  |  |   46|  8.54M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 4.27M]
  |  |  |  Branch (46:15): [True: 29, False: 4.27M]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  4.27M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 4.27M]
  |  |  ------------------
  ------------------
 3130|  4.27M|                          AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(7/15) property_index;
 3131|       |
 3132|       |            // ISO/IEC 14496-12 Section 8.11.14.3:
 3133|       |            //   0 indicating that no property is associated (the essential indicator shall also be 0)
 3134|  4.27M|            if (propertyIndex == 0) {
  ------------------
  |  Branch (3134:17): [True: 24.0k, False: 4.24M]
  ------------------
 3135|  24.0k|                if (essential) {
  ------------------
  |  Branch (3135:21): [True: 2, False: 24.0k]
  ------------------
 3136|      2|                    avifDiagnosticsPrintf(diag, "Box[ipma] for item ID [%u] contains an illegal essential property index 0", itemID);
 3137|      2|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 3138|      2|                }
 3139|  24.0k|                continue;
 3140|  24.0k|            }
 3141|  4.24M|            --propertyIndex; // 1-indexed
 3142|       |
 3143|  4.24M|            if (propertyIndex >= meta->properties.count) {
  ------------------
  |  Branch (3143:17): [True: 47, False: 4.24M]
  ------------------
 3144|     47|                avifDiagnosticsPrintf(diag,
 3145|     47|                                      "Box[ipma] for item ID [%u] contains an illegal property index [%u] (out of [%u] properties)",
 3146|     47|                                      itemID,
 3147|     47|                                      propertyIndex,
 3148|     47|                                      meta->properties.count);
 3149|     47|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3150|     47|            }
 3151|       |
 3152|       |            // Copy property to item
 3153|  4.24M|            const avifProperty * srcProp = &meta->properties.prop[propertyIndex];
 3154|       |
 3155|       |            // Some properties are supported and parsed by libavif.
 3156|       |            // Other properties are forwarded to the user as opaque blobs.
 3157|  4.24M|            const avifBool supportedType = !srcProp->isOpaque;
 3158|  4.24M|            if (supportedType) {
  ------------------
  |  Branch (3158:17): [True: 3.48M, False: 759k]
  ------------------
 3159|  3.48M|                if (essential) {
  ------------------
  |  Branch (3159:21): [True: 857k, False: 2.63M]
  ------------------
 3160|       |                    // Verify that it is legal for this property to be flagged as essential. Any
 3161|       |                    // types in this list are *required* in the spec to not be flagged as essential
 3162|       |                    // when associated with an item.
 3163|   857k|                    static const char * const nonessentialTypes[] = {
 3164|       |
 3165|       |                        // AVIF: Section 2.3.2.3.2: "If associated, it shall not be marked as essential."
 3166|   857k|                        "a1lx"
 3167|       |
 3168|   857k|                    };
 3169|   857k|                    size_t nonessentialTypesCount = sizeof(nonessentialTypes) / sizeof(nonessentialTypes[0]);
 3170|  1.71M|                    for (size_t i = 0; i < nonessentialTypesCount; ++i) {
  ------------------
  |  Branch (3170:40): [True: 857k, False: 857k]
  ------------------
 3171|   857k|                        if (!memcmp(srcProp->type, nonessentialTypes[i], 4)) {
  ------------------
  |  Branch (3171:29): [True: 1, False: 857k]
  ------------------
 3172|      1|                            avifDiagnosticsPrintf(diag,
 3173|      1|                                                  "Item ID [%u] has a %s property association which must not be marked essential, but is",
 3174|      1|                                                  itemID,
 3175|      1|                                                  nonessentialTypes[i]);
 3176|      1|                            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3177|      1|                        }
 3178|   857k|                    }
 3179|  2.63M|                } else {
 3180|       |                    // Verify that it is legal for this property to not be flagged as essential. Any
 3181|       |                    // types in this list are *required* in the spec to be flagged as essential when
 3182|       |                    // associated with an item.
 3183|  2.63M|                    static const char * const essentialTypes[] = {
 3184|       |
 3185|       |                        // AVIF: Section 2.3.2.1.1: "If associated, it shall be marked as essential."
 3186|  2.63M|                        "a1op",
 3187|       |
 3188|       |                        // HEIF: Section 6.5.11.1: "essential shall be equal to 1 for an 'lsel' item property."
 3189|  2.63M|                        "lsel",
 3190|       |
 3191|       |                        // MIAF 2019/Amd. 2:2021: Section 7.3.9:
 3192|       |                        //   All transformative properties associated with coded and derived images shall be
 3193|       |                        //   marked as essential
 3194|       |                        // It makes no sense to allow for non-essential crop/orientation associated with an item
 3195|       |                        // that is not a coded or derived image, so for simplicity 'item' is not checked here.
 3196|  2.63M|                        "clap",
 3197|  2.63M|                        "irot",
 3198|  2.63M|                        "imir"
 3199|       |
 3200|  2.63M|                    };
 3201|  2.63M|                    size_t essentialTypesCount = sizeof(essentialTypes) / sizeof(essentialTypes[0]);
 3202|  15.7M|                    for (size_t i = 0; i < essentialTypesCount; ++i) {
  ------------------
  |  Branch (3202:40): [True: 13.1M, False: 2.63M]
  ------------------
 3203|  13.1M|                        if (!memcmp(srcProp->type, essentialTypes[i], 4)) {
  ------------------
  |  Branch (3203:29): [True: 4, False: 13.1M]
  ------------------
 3204|      4|                            avifDiagnosticsPrintf(diag,
 3205|      4|                                                  "Item ID [%u] has a %s property association which must be marked essential, but is not",
 3206|      4|                                                  itemID,
 3207|      4|                                                  essentialTypes[i]);
 3208|      4|                            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3209|      4|                        }
 3210|  13.1M|                    }
 3211|  2.63M|                }
 3212|       |
 3213|       |                // Supported and valid; associate it with this item.
 3214|  3.48M|                avifProperty * dstProp = (avifProperty *)avifArrayPush(&item->properties);
 3215|  3.48M|                AVIF_CHECKERR(dstProp != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  3.48M|    do {                        \
  |  |   46|  3.48M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 3.48M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  3.48M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.48M]
  |  |  ------------------
  ------------------
 3216|  3.48M|                *dstProp = *srcProp;
 3217|  3.48M|            } else {
 3218|   759k|                if (essential) {
  ------------------
  |  Branch (3218:21): [True: 141k, False: 618k]
  ------------------
 3219|       |                    // ISO/IEC 23008-12 Section 10.2.1:
 3220|       |                    //   Under any brand, the primary item (or an alternative if alternative support is required)
 3221|       |                    //   shall be processable by a reader implementing only the required features of that brand.
 3222|       |                    //   Specifically, given that each brand has a set of properties that a reader is required to
 3223|       |                    //   support: the item shall not have properties that are marked as essential and are outside
 3224|       |                    //   this set.
 3225|       |                    // It is assumed that this rule also applies to items the primary item depends on (such as
 3226|       |                    // the cells of a grid).
 3227|       |
 3228|       |                    // Discovered an essential item property that libavif doesn't support!
 3229|       |                    // Make a note to ignore this item later.
 3230|   141k|                    item->hasUnsupportedEssentialProperty = AVIF_TRUE;
  ------------------
  |  |   88|   141k|#define AVIF_TRUE 1
  ------------------
 3231|   141k|                }
 3232|       |
 3233|       |                // Will be forwarded to the user through avifImage::properties.
 3234|   759k|                avifProperty * dstProp = (avifProperty *)avifArrayPush(&item->properties);
 3235|   759k|                AVIF_CHECKERR(dstProp != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   759k|    do {                        \
  |  |   46|   759k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 759k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   759k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 759k]
  |  |  ------------------
  ------------------
 3236|   759k|                dstProp->isOpaque = AVIF_TRUE;
  ------------------
  |  |   88|   759k|#define AVIF_TRUE 1
  ------------------
 3237|   759k|                memcpy(dstProp->type, srcProp->type, sizeof(dstProp->type));
 3238|   759k|                memcpy(dstProp->u.opaque.usertype, srcProp->u.opaque.usertype, sizeof(dstProp->u.opaque.usertype));
 3239|   759k|                AVIF_CHECKRES(
  ------------------
  |  |   54|   759k|    do {                                  \
  |  |   55|   759k|        const avifResult result__ = (A);  \
  |  |   56|   759k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 759k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   759k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 759k]
  |  |  ------------------
  ------------------
 3240|   759k|                    avifRWDataSet(&dstProp->u.opaque.boxPayload, srcProp->u.opaque.boxPayload.data, srcProp->u.opaque.boxPayload.size));
 3241|   759k|            }
 3242|  4.24M|        }
 3243|  1.07M|    }
 3244|   552k|    return AVIF_RESULT_OK;
 3245|   552k|}
read.c:avifParseItemInfoBox:
 3397|   604k|{
 3398|   604k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iinf]");
  ------------------
  |  |  810|   604k|    avifROStream VARNAME;                               \
  |  |  811|   604k|    avifROData VARNAME##_roData;                        \
  |  |  812|   604k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   604k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   604k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3399|       |
 3400|   604k|    uint8_t version;
 3401|   604k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   604k|    do {                        \
  |  |   46|   604k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 604k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   604k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 604k]
  |  |  ------------------
  ------------------
 3402|   604k|    uint32_t entryCount;
 3403|   604k|    if (version == 0) {
  ------------------
  |  Branch (3403:9): [True: 601k, False: 3.87k]
  ------------------
 3404|   601k|        uint16_t tmp;
 3405|   601k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) entry_count;
  ------------------
  |  |   45|   601k|    do {                        \
  |  |   46|   601k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 601k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   601k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 601k]
  |  |  ------------------
  ------------------
 3406|   601k|        entryCount = tmp;
 3407|   601k|    } else if (version == 1) {
  ------------------
  |  Branch (3407:16): [True: 3.87k, False: 2]
  ------------------
 3408|  3.87k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  3.87k|    do {                        \
  |  |   46|  3.87k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 3.87k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  3.87k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 3.87k]
  |  |  ------------------
  ------------------
 3409|  3.87k|    } else {
 3410|      2|        avifDiagnosticsPrintf(diag, "Box[iinf] has an unsupported version %u", version);
 3411|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3412|      2|    }
 3413|       |
 3414|  1.92M|    for (uint32_t entryIndex = 0; entryIndex < entryCount; ++entryIndex) {
  ------------------
  |  Branch (3414:35): [True: 1.31M, False: 604k]
  ------------------
 3415|  1.31M|        avifBoxHeader infeHeader;
 3416|  1.31M|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &infeHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 51, False: 1.31M]
  |  |  ------------------
  |  |   47|     51|            avifBreakOnError(); \
  |  |   48|     51|            return ERR;         \
  |  |   49|     51|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3417|       |
 3418|  1.31M|        if (!memcmp(infeHeader.type, "infe", 4)) {
  ------------------
  |  Branch (3418:13): [True: 1.31M, False: 1]
  ------------------
 3419|  1.31M|            AVIF_CHECKRES(avifParseItemInfoEntry(meta, avifROStreamCurrent(&s), infeHeader.size, diag));
  ------------------
  |  |   54|  1.31M|    do {                                  \
  |  |   55|  1.31M|        const avifResult result__ = (A);  \
  |  |   56|  1.31M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 56, False: 1.31M]
  |  |  ------------------
  |  |   57|     56|            avifBreakOnError();           \
  |  |   58|     56|            return result__;              \
  |  |   59|     56|        }                                 \
  |  |   60|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3420|  1.31M|        } else {
 3421|       |            // These must all be type infe
 3422|      1|            avifDiagnosticsPrintf(diag, "Box[iinf] contains a box that isn't type 'infe'");
 3423|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 3424|      1|        }
 3425|       |
 3426|  1.31M|        AVIF_CHECKERR(avifROStreamSkip(&s, infeHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.31M]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3427|  1.31M|    }
 3428|       |
 3429|   604k|    return AVIF_RESULT_OK;
 3430|   604k|}
read.c:avifParseItemInfoEntry:
 3346|  1.31M|{
 3347|       |    // Section 8.11.6.2 of ISO/IEC 14496-12.
 3348|  1.31M|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[infe]");
  ------------------
  |  |  810|  1.31M|    avifROStream VARNAME;                               \
  |  |  811|  1.31M|    avifROData VARNAME##_roData;                        \
  |  |  812|  1.31M|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  1.31M|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  1.31M|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3349|       |
 3350|  1.31M|    uint8_t version;
 3351|  1.31M|    uint32_t flags;
 3352|  1.31M|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, &flags), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 1.31M]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3353|       |    // Version 2+ is required for item_type
 3354|  1.31M|    if (version != 2 && version != 3) {
  ------------------
  |  Branch (3354:9): [True: 6.09k, False: 1.31M]
  |  Branch (3354:25): [True: 8, False: 6.08k]
  ------------------
 3355|      8|        avifDiagnosticsPrintf(s.diag, "%s: Expecting box version 2 or 3, got version %u", s.diagContext, version);
 3356|      8|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3357|      8|    }
 3358|       |    // Ignore flags&1. A value of 1 corresponds to a hidden image item (not intended to be displayed).
 3359|       |    // There could be files wrongly setting that flag to 1 for items output as "to be displayed"
 3360|       |    // by libavif so far, so keep that lenient behavior for simplicity and backward compatibility.
 3361|       |
 3362|  1.31M|    uint32_t itemID;
 3363|  1.31M|    if (version == 2) {
  ------------------
  |  Branch (3363:9): [True: 1.31M, False: 6.08k]
  ------------------
 3364|  1.31M|        uint16_t tmp;
 3365|  1.31M|        AVIF_CHECKERR(avifROStreamReadU16(&s, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_ID;
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 1.31M]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3366|  1.31M|        itemID = tmp;
 3367|  1.31M|    } else {
 3368|  6.08k|        AVIF_ASSERT_OR_RETURN(version == 3);
  ------------------
  |  |   64|  6.08k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  6.08k|    do {                        \
  |  |  |  |   46|  6.08k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 6.08k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  6.08k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 6.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3369|  6.08k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &itemID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) item_ID;
  ------------------
  |  |   45|  6.08k|    do {                        \
  |  |   46|  6.08k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 6.08k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  6.08k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 6.08k]
  |  |  ------------------
  ------------------
 3370|  6.08k|    }
 3371|  1.31M|    AVIF_CHECKRES(avifCheckItemID("infe", itemID, diag));
  ------------------
  |  |   54|  1.31M|    do {                                  \
  |  |   55|  1.31M|        const avifResult result__ = (A);  \
  |  |   56|  1.31M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 2, False: 1.31M]
  |  |  ------------------
  |  |   57|      2|            avifBreakOnError();           \
  |  |   58|      2|            return result__;              \
  |  |   59|      2|        }                                 \
  |  |   60|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3372|  1.31M|    uint16_t itemProtectionIndex;
 3373|  1.31M|    AVIF_CHECKERR(avifROStreamReadU16(&s, &itemProtectionIndex), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) item_protection_index;
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 1.31M]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3374|  1.31M|    uint8_t itemType[4];
 3375|  1.31M|    AVIF_CHECKERR(avifROStreamRead(&s, itemType, 4), AVIF_RESULT_BMFF_PARSE_FAILED);   // unsigned int(32) item_type;
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 10, False: 1.31M]
  |  |  ------------------
  |  |   47|     10|            avifBreakOnError(); \
  |  |   48|     10|            return ERR;         \
  |  |   49|     10|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3376|  1.31M|    AVIF_CHECKERR(avifROStreamReadString(&s, NULL, 0), AVIF_RESULT_BMFF_PARSE_FAILED); // utf8string item_name; (skipped)
  ------------------
  |  |   45|  1.31M|    do {                        \
  |  |   46|  1.31M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 26, False: 1.31M]
  |  |  ------------------
  |  |   47|     26|            avifBreakOnError(); \
  |  |   48|     26|            return ERR;         \
  |  |   49|     26|        }                       \
  |  |   50|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3377|  1.31M|    avifContentType contentType;
 3378|  1.31M|    if (!memcmp(itemType, "mime", 4)) {
  ------------------
  |  Branch (3378:9): [True: 116k, False: 1.20M]
  ------------------
 3379|   116k|        AVIF_CHECKERR(avifROStreamReadString(&s, contentType.contentType, CONTENTTYPE_SIZE), AVIF_RESULT_BMFF_PARSE_FAILED); // utf8string content_type;
  ------------------
  |  |   45|   116k|    do {                        \
  |  |   46|   116k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 116k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   116k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 116k]
  |  |  ------------------
  ------------------
 3380|       |        // utf8string content_encoding; //optional
 3381|  1.20M|    } else {
 3382|       |        // if (item_type == 'uri ') {
 3383|       |        //  utf8string item_uri_type;
 3384|       |        // }
 3385|  1.20M|        memset(&contentType, 0, sizeof(contentType));
 3386|  1.20M|    }
 3387|       |
 3388|  1.31M|    avifDecoderItem * item;
 3389|  1.31M|    AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, itemID, &item));
  ------------------
  |  |   54|  1.31M|    do {                                  \
  |  |   55|  1.31M|        const avifResult result__ = (A);  \
  |  |   56|  1.31M|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.31M]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
 3390|       |
 3391|  1.31M|    memcpy(item->type, itemType, sizeof(itemType));
 3392|  1.31M|    item->contentType = contentType;
 3393|  1.31M|    return AVIF_RESULT_OK;
 3394|  1.31M|}
read.c:avifParseItemReferenceBox:
 3433|   165k|{
 3434|   165k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[iref]");
  ------------------
  |  |  810|   165k|    avifROStream VARNAME;                               \
  |  |  811|   165k|    avifROData VARNAME##_roData;                        \
  |  |  812|   165k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   165k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   165k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3435|       |
 3436|   165k|    uint8_t version;
 3437|   165k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   165k|    do {                        \
  |  |   46|   165k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 165k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   165k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 165k]
  |  |  ------------------
  ------------------
 3438|   165k|    if (version > 1) {
  ------------------
  |  Branch (3438:9): [True: 14.8k, False: 150k]
  ------------------
 3439|       |        // iref versions > 1 are not supported. Skip it.
 3440|  14.8k|        return AVIF_RESULT_OK;
 3441|  14.8k|    }
 3442|       |
 3443|   434k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3443:12): [True: 284k, False: 150k]
  ------------------
 3444|   284k|        avifBoxHeader irefHeader;
 3445|   284k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &irefHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   284k|    do {                        \
  |  |   46|   284k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 284k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   284k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 284k]
  |  |  ------------------
  ------------------
 3446|       |
 3447|   284k|        BEGIN_STREAM(refStream, avifROStreamCurrent(&s), irefHeader.size, diag, "Box[iref] SingleItemTypeReference");
  ------------------
  |  |  810|   284k|    avifROStream VARNAME;                               \
  |  |  811|   284k|    avifROData VARNAME##_roData;                        \
  |  |  812|   284k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   284k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   284k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3448|       |
 3449|   284k|        uint32_t fromID = 0;
 3450|   284k|        if (version == 0) {
  ------------------
  |  Branch (3450:13): [True: 284k, False: 42]
  ------------------
 3451|   284k|            uint16_t tmp;
 3452|   284k|            AVIF_CHECKERR(avifROStreamReadU16(&refStream, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) from_item_ID;
  ------------------
  |  |   45|   284k|    do {                        \
  |  |   46|   284k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 284k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   284k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 284k]
  |  |  ------------------
  ------------------
 3453|   284k|            fromID = tmp;
 3454|   284k|        } else {
 3455|       |            // version == 1
 3456|     42|            AVIF_CHECKERR(avifROStreamReadU32(&refStream, &fromID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) from_item_ID;
  ------------------
  |  |   45|     42|    do {                        \
  |  |   46|     42|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 41]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|     42|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 41]
  |  |  ------------------
  ------------------
 3457|     42|        }
 3458|       |        // ISO 14496-12 section 8.11.12.1: "index values start at 1"
 3459|   284k|        AVIF_CHECKRES(avifCheckItemID("iref", fromID, diag));
  ------------------
  |  |   54|   284k|    do {                                  \
  |  |   55|   284k|        const avifResult result__ = (A);  \
  |  |   56|   284k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 284k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|   284k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 284k]
  |  |  ------------------
  ------------------
 3460|       |
 3461|   284k|        avifDecoderItem * item;
 3462|   284k|        AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, fromID, &item));
  ------------------
  |  |   54|   284k|    do {                                  \
  |  |   55|   284k|        const avifResult result__ = (A);  \
  |  |   56|   284k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 284k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   284k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 284k]
  |  |  ------------------
  ------------------
 3463|   284k|        if (!memcmp(irefHeader.type, "dimg", 4)) {
  ------------------
  |  Branch (3463:13): [True: 93.2k, False: 191k]
  ------------------
 3464|  93.2k|            if (item->hasDimgFrom) {
  ------------------
  |  Branch (3464:17): [True: 1, False: 93.2k]
  ------------------
 3465|       |                // ISO/IEC 23008-12 (HEIF) 6.6.1: The number of SingleItemTypeReferenceBoxes with the box type 'dimg'
 3466|       |                // and with the same value of from_item_ID shall not be greater than 1.
 3467|      1|                avifDiagnosticsPrintf(diag, "Box[iinf] contains duplicate boxes of type 'dimg' with the same from_item_ID value %u", fromID);
 3468|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3469|      1|            }
 3470|  93.2k|            item->hasDimgFrom = AVIF_TRUE;
  ------------------
  |  |   88|  93.2k|#define AVIF_TRUE 1
  ------------------
 3471|  93.2k|        }
 3472|       |
 3473|   284k|        uint16_t referenceCount = 0;
 3474|   284k|        AVIF_CHECKERR(avifROStreamReadU16(&refStream, &referenceCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) reference_count;
  ------------------
  |  |   45|   284k|    do {                        \
  |  |   46|   284k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 284k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   284k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 284k]
  |  |  ------------------
  ------------------
 3475|       |
 3476|   723k|        for (uint16_t refIndex = 0; refIndex < referenceCount; ++refIndex) {
  ------------------
  |  Branch (3476:37): [True: 438k, False: 284k]
  ------------------
 3477|   438k|            uint32_t toID = 0;
 3478|   438k|            if (version == 0) {
  ------------------
  |  Branch (3478:17): [True: 438k, False: 211]
  ------------------
 3479|   438k|                uint16_t tmp;
 3480|   438k|                AVIF_CHECKERR(avifROStreamReadU16(&refStream, &tmp), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(16) to_item_ID;
  ------------------
  |  |   45|   438k|    do {                        \
  |  |   46|   438k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 8, False: 438k]
  |  |  ------------------
  |  |   47|      8|            avifBreakOnError(); \
  |  |   48|      8|            return ERR;         \
  |  |   49|      8|        }                       \
  |  |   50|   438k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 438k]
  |  |  ------------------
  ------------------
 3481|   438k|                toID = tmp;
 3482|   438k|            } else {
 3483|       |                // version == 1
 3484|    211|                AVIF_CHECKERR(avifROStreamReadU32(&refStream, &toID), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) to_item_ID;
  ------------------
  |  |   45|    211|    do {                        \
  |  |   46|    211|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 30, False: 181]
  |  |  ------------------
  |  |   47|     30|            avifBreakOnError(); \
  |  |   48|     30|            return ERR;         \
  |  |   49|     30|        }                       \
  |  |   50|    211|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 181]
  |  |  ------------------
  ------------------
 3485|    211|            }
 3486|   438k|            AVIF_CHECKRES(avifCheckItemID("iref", toID, diag));
  ------------------
  |  |   54|   438k|    do {                                  \
  |  |   55|   438k|        const avifResult result__ = (A);  \
  |  |   56|   438k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 10, False: 438k]
  |  |  ------------------
  |  |   57|     10|            avifBreakOnError();           \
  |  |   58|     10|            return result__;              \
  |  |   59|     10|        }                                 \
  |  |   60|   438k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 438k]
  |  |  ------------------
  ------------------
 3487|       |
 3488|       |            // Read this reference as "{fromID} is a {irefType} for {toID}"
 3489|   438k|            if (!memcmp(irefHeader.type, "thmb", 4) || !memcmp(irefHeader.type, "auxl", 4) ||
  ------------------
  |  Branch (3489:17): [True: 0, False: 438k]
  |  Branch (3489:56): [True: 137k, False: 301k]
  ------------------
 3490|   301k|                !memcmp(irefHeader.type, "cdsc", 4) || !memcmp(irefHeader.type, "prem", 4)) {
  ------------------
  |  Branch (3490:17): [True: 33.5k, False: 268k]
  |  Branch (3490:56): [True: 0, False: 268k]
  ------------------
 3491|       |                // Section 8.11.12.1 of ISO/IEC 14496-12:
 3492|       |                //   The items linked to are then represented by an array of to_item_IDs;
 3493|       |                //   within a given array, a given value shall occur at most once.
 3494|       |                // That last requirement is not checked for these reference types.
 3495|       |                // Several boxes of the same type may also share a from_item_ID, so an item can
 3496|       |                // be the source of more than one reference of a given type. Every target is kept.
 3497|   170k|                AVIF_CHECKRES(avifAddReference(&item->references, (const char *)irefHeader.type, toID));
  ------------------
  |  |   54|   170k|    do {                                  \
  |  |   55|   170k|        const avifResult result__ = (A);  \
  |  |   56|   170k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 170k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   170k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 170k]
  |  |  ------------------
  ------------------
 3498|   268k|            } else if (!memcmp(irefHeader.type, "dimg", 4)) {
  ------------------
  |  Branch (3498:24): [True: 239k, False: 28.6k]
  ------------------
 3499|       |                // derived images refer in the opposite direction
 3500|   239k|                avifDecoderItem * dimgInput;
 3501|   239k|                AVIF_CHECKRES(avifMetaFindOrCreateItem(meta, toID, &dimgInput));
  ------------------
  |  |   54|   239k|    do {                                  \
  |  |   55|   239k|        const avifResult result__ = (A);  \
  |  |   56|   239k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 239k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   239k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 239k]
  |  |  ------------------
  ------------------
 3502|       |
 3503|       |                // Section 8.11.12.1 of ISO/IEC 14496-12:
 3504|       |                //   The items linked to are then represented by an array of to_item_IDs;
 3505|       |                //   within a given array, a given value shall occur at most once.
 3506|   239k|                AVIF_CHECKERR(!avifIsDimgInput(item, toID, NULL), AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|   239k|    do {                        \
  |  |   46|   239k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 239k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|   239k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 239k]
  |  |  ------------------
  ------------------
 3507|   239k|                AVIF_CHECKRES(avifAddDimgInput(item, dimgInput));
  ------------------
  |  |   54|   239k|    do {                                  \
  |  |   55|   239k|        const avifResult result__ = (A);  \
  |  |   56|   239k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 239k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   239k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 239k]
  |  |  ------------------
  ------------------
 3508|   239k|            }
 3509|   438k|        }
 3510|       |
 3511|   284k|        AVIF_CHECKERR(avifROStreamSkip(&s, irefHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
 3512|   284k|    }
 3513|       |
 3514|   150k|    return AVIF_RESULT_OK;
 3515|   150k|}
read.c:avifAddReference:
  286|   213k|{
  287|   213k|    avifItemReference * reference = (avifItemReference *)avifArrayPush(references);
  288|   213k|    AVIF_CHECKERR(reference != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   213k|    do {                        \
  |  |   46|   213k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 213k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   213k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 213k]
  |  |  ------------------
  ------------------
  289|   213k|    memcpy(reference->type, type, 4);
  290|   213k|    reference->toID = toID;
  291|   213k|    return AVIF_RESULT_OK;
  292|   213k|}
read.c:avifAddDimgInput:
  277|   248k|{
  278|   248k|    uint32_t * dimgInput = (uint32_t *)avifArrayPush(&derivedItem->dimgInputs);
  279|   248k|    AVIF_CHECKERR(dimgInput != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   248k|    do {                        \
  |  |   46|   248k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 248k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   248k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 248k]
  |  |  ------------------
  ------------------
  280|   248k|    *dimgInput = inputItem->id;
  281|   248k|    return AVIF_RESULT_OK;
  282|   248k|}
read.c:avifParseGroupsListBox:
 3518|  64.2k|{
 3519|  64.2k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[grpl]");
  ------------------
  |  |  810|  64.2k|    avifROStream VARNAME;                               \
  |  |  811|  64.2k|    avifROData VARNAME##_roData;                        \
  |  |  812|  64.2k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  64.2k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  64.2k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3520|       |
 3521|   126k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3521:12): [True: 62.6k, False: 64.2k]
  ------------------
 3522|  62.6k|        avifBoxHeader groupHeader;
 3523|  62.6k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &groupHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  62.6k|    do {                        \
  |  |   46|  62.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 62.6k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 62.6k]
  |  |  ------------------
  ------------------
 3524|  62.6k|        BEGIN_STREAM(groupStream, avifROStreamCurrent(&s), groupHeader.size, diag, "Box[grpl] EntityToGroup");
  ------------------
  |  |  810|  62.6k|    avifROStream VARNAME;                               \
  |  |  811|  62.6k|    avifROData VARNAME##_roData;                        \
  |  |  812|  62.6k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  62.6k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  62.6k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3525|       |        // We don't check the flag or version as they depend on the grouping type (and for simplicity).
 3526|       |        // ISO/IEC 14496-12:2024 Section 8.15.3.2
 3527|       |        //   version shall be 0 unless defined otherwise for the grouping_type. Any values of flags such that
 3528|       |        //   (flags & 0x000FFF) is not equal to 0 are reserved. The values of flags shall be such that (flags
 3529|       |        //   & 0xFFF000) is equal to 0 unless defined otherwise for the grouping_type.
 3530|  62.6k|        AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&groupStream, NULL, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  62.6k|    do {                        \
  |  |   46|  62.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 62.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 62.6k]
  |  |  ------------------
  ------------------
 3531|       |
 3532|  62.6k|        avifEntityToGroup * group = avifArrayPush(&meta->entityToGroups);
 3533|  62.6k|        AVIF_CHECKERR(group != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  62.6k|    do {                        \
  |  |   46|  62.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 62.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 62.6k]
  |  |  ------------------
  ------------------
 3534|  62.6k|        AVIF_CHECKERR(avifArrayCreate(&group->entityIDs, sizeof(uint32_t), 2), AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  62.6k|    do {                        \
  |  |   46|  62.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 62.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 62.6k]
  |  |  ------------------
  ------------------
 3535|       |
 3536|  62.6k|        memcpy(group->groupingType, groupHeader.type, 4);
 3537|  62.6k|        AVIF_CHECKERR(avifROStreamReadU32(&groupStream, &group->groupID), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  62.6k|    do {                        \
  |  |   46|  62.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 62.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 62.6k]
  |  |  ------------------
  ------------------
 3538|  62.6k|        uint32_t numEntitiesInGroup;
 3539|  62.6k|        AVIF_CHECKERR(avifROStreamReadU32(&groupStream, &numEntitiesInGroup), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  62.6k|    do {                        \
  |  |   46|  62.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 62.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 62.6k]
  |  |  ------------------
  ------------------
 3540|   179k|        for (uint32_t i = 0; i < numEntitiesInGroup; ++i) {
  ------------------
  |  Branch (3540:30): [True: 116k, False: 62.6k]
  ------------------
 3541|   116k|            uint32_t * entityId = avifArrayPush(&group->entityIDs);
 3542|   116k|            AVIF_CHECKERR(entityId != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   116k|    do {                        \
  |  |   46|   116k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 116k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   116k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 116k]
  |  |  ------------------
  ------------------
 3543|   116k|            AVIF_CHECKERR(avifROStreamReadU32(&groupStream, entityId), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   116k|    do {                        \
  |  |   46|   116k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 9, False: 116k]
  |  |  ------------------
  |  |   47|      9|            avifBreakOnError(); \
  |  |   48|      9|            return ERR;         \
  |  |   49|      9|        }                       \
  |  |   50|   116k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 116k]
  |  |  ------------------
  ------------------
 3544|   116k|        }
 3545|       |
 3546|  62.6k|        AVIF_CHECKERR(avifROStreamSkip(&s, groupHeader.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  62.6k|    do {                        \
  |  |   46|  62.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 62.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  62.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 62.6k]
  |  |  ------------------
  ------------------
 3547|  62.6k|    }
 3548|       |
 3549|  64.2k|    return AVIF_RESULT_OK;
 3550|  64.2k|}
read.c:avifParseMovieBox:
 4136|  72.1k|{
 4137|  72.1k|    BEGIN_STREAM(s, raw, rawLen, data->diag, "Box[moov]");
  ------------------
  |  |  810|  72.1k|    avifROStream VARNAME;                               \
  |  |  811|  72.1k|    avifROData VARNAME##_roData;                        \
  |  |  812|  72.1k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  72.1k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  72.1k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4138|       |
 4139|  72.1k|    avifBool hasTrak = AVIF_FALSE;
  ------------------
  |  |   89|  72.1k|#define AVIF_FALSE 0
  ------------------
 4140|   311k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (4140:12): [True: 239k, False: 71.9k]
  ------------------
 4141|   239k|        avifBoxHeader header;
 4142|   239k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   239k|    do {                        \
  |  |   46|   239k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 32, False: 239k]
  |  |  ------------------
  |  |   47|     32|            avifBreakOnError(); \
  |  |   48|     32|            return ERR;         \
  |  |   49|     32|        }                       \
  |  |   50|   239k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 239k]
  |  |  ------------------
  ------------------
 4143|       |
 4144|   239k|        if (!memcmp(header.type, "trak", 4)) {
  ------------------
  |  Branch (4144:13): [True: 135k, False: 103k]
  ------------------
 4145|   135k|            AVIF_CHECKRES(avifParseTrackBox(data, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size));
  ------------------
  |  |   54|   135k|    do {                                  \
  |  |   55|   135k|        const avifResult result__ = (A);  \
  |  |   56|   135k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 189, False: 135k]
  |  |  ------------------
  |  |   57|    189|            avifBreakOnError();           \
  |  |   58|    189|            return result__;              \
  |  |   59|    189|        }                                 \
  |  |   60|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
 4146|   135k|            hasTrak = AVIF_TRUE;
  ------------------
  |  |   88|   135k|#define AVIF_TRUE 1
  ------------------
 4147|       |
 4148|   135k|            const avifTrack * track = &data->tracks.track[data->tracks.count - 1];
 4149|   135k|            if (!memcmp(track->handlerType, "pict", 4) || !memcmp(track->handlerType, "vide", 4) ||
  ------------------
  |  Branch (4149:17): [True: 59.0k, False: 76.0k]
  |  Branch (4149:59): [True: 0, False: 76.0k]
  ------------------
 4150|  93.9k|                !memcmp(track->handlerType, "auxv", 4)) {
  ------------------
  |  Branch (4150:17): [True: 34.9k, False: 41.1k]
  ------------------
 4151|  93.9k|                if ((track->width == 0) || (track->height == 0)) {
  ------------------
  |  Branch (4151:21): [True: 1, False: 93.9k]
  |  Branch (4151:44): [True: 1, False: 93.9k]
  ------------------
 4152|      2|                    avifDiagnosticsPrintf(data->diag, "Track ID [%u] has an invalid size [%ux%u]", track->id, track->width, track->height);
 4153|      2|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 4154|      2|                }
 4155|  93.9k|                if (avifDimensionsTooLarge(track->width, track->height, imageSizeLimit, imageDimensionLimit)) {
  ------------------
  |  Branch (4155:21): [True: 4, False: 93.9k]
  ------------------
 4156|      4|                    avifDiagnosticsPrintf(data->diag,
 4157|      4|                                          "Track ID [%u] dimensions are too large [%ux%u]",
 4158|      4|                                          track->id,
 4159|      4|                                          track->width,
 4160|      4|                                          track->height);
 4161|      4|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 4162|      4|                }
 4163|  93.9k|            }
 4164|   135k|        }
 4165|       |
 4166|   238k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   238k|    do {                        \
  |  |   46|   238k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 238k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   238k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 238k]
  |  |  ------------------
  ------------------
 4167|   238k|    }
 4168|  71.9k|    if (!hasTrak) {
  ------------------
  |  Branch (4168:9): [True: 2, False: 71.9k]
  ------------------
 4169|      2|        avifDiagnosticsPrintf(data->diag, "moov box does not contain any tracks");
 4170|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 4171|      2|    }
 4172|  71.9k|    return AVIF_RESULT_OK;
 4173|  71.9k|}
read.c:avifParseTrackBox:
 4051|   135k|{
 4052|   135k|    BEGIN_STREAM(s, raw, rawLen, data->diag, "Box[trak]");
  ------------------
  |  |  810|   135k|    avifROStream VARNAME;                               \
  |  |  811|   135k|    avifROData VARNAME##_roData;                        \
  |  |  812|   135k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   135k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   135k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4053|       |
 4054|   135k|    avifTrack * track = avifDecoderDataCreateTrack(data);
 4055|   135k|    AVIF_CHECKERR(track != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   135k|    do {                        \
  |  |   46|   135k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 135k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
 4056|       |
 4057|   135k|    avifBool edtsBoxSeen = AVIF_FALSE;
  ------------------
  |  |   89|   135k|#define AVIF_FALSE 0
  ------------------
 4058|   135k|    avifBool tkhdSeen = AVIF_FALSE;
  ------------------
  |  |   89|   135k|#define AVIF_FALSE 0
  ------------------
 4059|   628k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (4059:12): [True: 493k, False: 135k]
  ------------------
 4060|   493k|        avifBoxHeader header;
 4061|   493k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   493k|    do {                        \
  |  |   46|   493k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 28, False: 492k]
  |  |  ------------------
  |  |   47|     28|            avifBreakOnError(); \
  |  |   48|     28|            return ERR;         \
  |  |   49|     28|        }                       \
  |  |   50|   493k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 492k]
  |  |  ------------------
  ------------------
 4062|       |
 4063|   492k|        if (!memcmp(header.type, "tkhd", 4)) {
  ------------------
  |  Branch (4063:13): [True: 135k, False: 357k]
  ------------------
 4064|   135k|            if (tkhdSeen) {
  ------------------
  |  Branch (4064:17): [True: 1, False: 135k]
  ------------------
 4065|      1|                avifDiagnosticsPrintf(data->diag, "Box[trak] contains a duplicate unique box of type 'tkhd'");
 4066|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 4067|      1|            }
 4068|   135k|            AVIF_CHECKERR(avifParseTrackHeaderBox(track, avifROStreamCurrent(&s), header.size, data->diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   135k|    do {                        \
  |  |   46|   135k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 16, False: 135k]
  |  |  ------------------
  |  |   47|     16|            avifBreakOnError(); \
  |  |   48|     16|            return ERR;         \
  |  |   49|     16|        }                       \
  |  |   50|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
 4069|   135k|            tkhdSeen = AVIF_TRUE;
  ------------------
  |  |   88|   135k|#define AVIF_TRUE 1
  ------------------
 4070|   357k|        } else if (!memcmp(header.type, "meta", 4)) {
  ------------------
  |  Branch (4070:20): [True: 48.9k, False: 308k]
  ------------------
 4071|  48.9k|            AVIF_CHECKRES(
  ------------------
  |  |   54|  48.9k|    do {                                  \
  |  |   55|  48.9k|        const avifResult result__ = (A);  \
  |  |   56|  48.9k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 48.9k]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|  48.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 48.9k]
  |  |  ------------------
  ------------------
 4072|  48.9k|                avifParseMetaBox(track->meta, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, data->diag));
 4073|   308k|        } else if (!memcmp(header.type, "mdia", 4)) {
  ------------------
  |  Branch (4073:20): [True: 116k, False: 192k]
  ------------------
 4074|   116k|            AVIF_CHECKRES(avifParseMediaBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, data->diag));
  ------------------
  |  |   54|   116k|    do {                                  \
  |  |   55|   116k|        const avifResult result__ = (A);  \
  |  |   56|   116k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 118, False: 116k]
  |  |  ------------------
  |  |   57|    118|            avifBreakOnError();           \
  |  |   58|    118|            return result__;              \
  |  |   59|    118|        }                                 \
  |  |   60|   116k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 116k]
  |  |  ------------------
  ------------------
 4075|   192k|        } else if (!memcmp(header.type, "tref", 4)) {
  ------------------
  |  Branch (4075:20): [True: 50.5k, False: 141k]
  ------------------
 4076|  50.5k|            AVIF_CHECKRES(avifTrackReferenceBox(track, avifROStreamCurrent(&s), header.size, data->diag));
  ------------------
  |  |   54|  50.5k|    do {                                  \
  |  |   55|  50.5k|        const avifResult result__ = (A);  \
  |  |   56|  50.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 5, False: 50.5k]
  |  |  ------------------
  |  |   57|      5|            avifBreakOnError();           \
  |  |   58|      5|            return result__;              \
  |  |   59|      5|        }                                 \
  |  |   60|  50.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 50.5k]
  |  |  ------------------
  ------------------
 4077|   141k|        } else if (!memcmp(header.type, "edts", 4)) {
  ------------------
  |  Branch (4077:20): [True: 110k, False: 30.7k]
  ------------------
 4078|   110k|            if (edtsBoxSeen) {
  ------------------
  |  Branch (4078:17): [True: 0, False: 110k]
  ------------------
 4079|      0|                avifDiagnosticsPrintf(data->diag, "Box[trak] contains a duplicate unique box of type 'edts'");
 4080|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 4081|      0|            }
 4082|   110k|            AVIF_CHECKERR(avifParseEditBox(track, avifROStreamCurrent(&s), header.size, data->diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   110k|    do {                        \
  |  |   46|   110k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 16, False: 110k]
  |  |  ------------------
  |  |   47|     16|            avifBreakOnError(); \
  |  |   48|     16|            return ERR;         \
  |  |   49|     16|        }                       \
  |  |   50|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
 4083|   110k|            edtsBoxSeen = AVIF_TRUE;
  ------------------
  |  |   88|   110k|#define AVIF_TRUE 1
  ------------------
 4084|   110k|        }
 4085|       |
 4086|   492k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   492k|    do {                        \
  |  |   46|   492k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 492k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   492k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 492k]
  |  |  ------------------
  ------------------
 4087|   492k|    }
 4088|   135k|    if (!tkhdSeen) {
  ------------------
  |  Branch (4088:9): [True: 3, False: 135k]
  ------------------
 4089|      3|        avifDiagnosticsPrintf(data->diag, "Box[trak] does not contain a mandatory [tkhd] box");
 4090|      3|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 4091|      3|    }
 4092|   135k|    if (!edtsBoxSeen) {
  ------------------
  |  Branch (4092:9): [True: 24.3k, False: 110k]
  ------------------
 4093|  24.3k|        track->repetitionCount = AVIF_REPETITION_COUNT_UNKNOWN;
  ------------------
  |  |  122|  24.3k|#define AVIF_REPETITION_COUNT_UNKNOWN -2
  ------------------
 4094|   110k|    } else if (track->isRepeating) {
  ------------------
  |  Branch (4094:16): [True: 104k, False: 6.40k]
  ------------------
 4095|   104k|        if (track->trackDuration == AVIF_INDEFINITE_DURATION64) {
  ------------------
  |  |  842|   104k|#define AVIF_INDEFINITE_DURATION64 UINT64_MAX
  ------------------
  |  Branch (4095:13): [True: 98.1k, False: 6.20k]
  ------------------
 4096|       |            // If isRepeating is true and the track duration is unknown/indefinite, then set the repetition count to infinite
 4097|       |            // (Section 9.6.1 of ISO/IEC 23008-12 Part 12).
 4098|  98.1k|            track->repetitionCount = AVIF_REPETITION_COUNT_INFINITE;
  ------------------
  |  |  119|  98.1k|#define AVIF_REPETITION_COUNT_INFINITE -1
  ------------------
 4099|  98.1k|        } else {
 4100|       |            // Section 9.6.1. of ISO/IEC 23008-12 Part 12: 1, the entire edit list is repeated a sufficient number of times to
 4101|       |            // equal the track duration.
 4102|       |            //
 4103|       |            // Since libavif uses repetitionCount (which is 0-based), we subtract the value by 1 to derive the number of
 4104|       |            // repetitions.
 4105|  6.20k|            AVIF_ASSERT_OR_RETURN(track->segmentDuration != 0);
  ------------------
  |  |   64|  6.20k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  6.20k|    do {                        \
  |  |  |  |   46|  6.20k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 6.20k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  6.20k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 6.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4106|       |            // We specifically check for trackDuration == 0 here and not when it is actually read in order to accept files which
 4107|       |            // inadvertently has a trackDuration of 0 without any edit lists.
 4108|  6.20k|            if (track->trackDuration == 0) {
  ------------------
  |  Branch (4108:17): [True: 1, False: 6.20k]
  ------------------
 4109|      1|                avifDiagnosticsPrintf(data->diag, "Invalid track duration 0.");
 4110|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 4111|      1|            }
 4112|  6.20k|            const uint64_t repetitionCount =
 4113|  6.20k|                (track->trackDuration / track->segmentDuration) + (track->trackDuration % track->segmentDuration != 0) - 1;
 4114|  6.20k|            if (repetitionCount > INT_MAX) {
  ------------------
  |  Branch (4114:17): [True: 1.64k, False: 4.55k]
  ------------------
 4115|       |                // repetitionCount does not fit in an integer and hence it is
 4116|       |                // likely to be a very large value. So, we just set it to
 4117|       |                // infinite.
 4118|  1.64k|                track->repetitionCount = AVIF_REPETITION_COUNT_INFINITE;
  ------------------
  |  |  119|  1.64k|#define AVIF_REPETITION_COUNT_INFINITE -1
  ------------------
 4119|  4.55k|            } else {
 4120|  4.55k|                track->repetitionCount = (int)repetitionCount;
 4121|  4.55k|            }
 4122|  6.20k|        }
 4123|   104k|    } else {
 4124|  6.40k|        track->repetitionCount = 0;
 4125|  6.40k|    }
 4126|       |
 4127|   135k|    return AVIF_RESULT_OK;
 4128|   135k|}
read.c:avifDecoderDataCreateTrack:
 1162|   135k|{
 1163|   135k|    avifTrack * track = (avifTrack *)avifArrayPush(&data->tracks);
 1164|   135k|    if (track == NULL) {
  ------------------
  |  Branch (1164:9): [True: 0, False: 135k]
  ------------------
 1165|      0|        return NULL;
 1166|      0|    }
 1167|   135k|    track->meta = avifMetaCreate();
 1168|   135k|    if (track->meta == NULL) {
  ------------------
  |  Branch (1168:9): [True: 0, False: 135k]
  ------------------
 1169|      0|        avifArrayPop(&data->tracks);
 1170|      0|        return NULL;
 1171|      0|    }
 1172|   135k|    if (!avifArrayCreate(&track->references, sizeof(avifItemReference), 1)) {
  ------------------
  |  Branch (1172:9): [True: 0, False: 135k]
  ------------------
 1173|      0|        avifMetaDestroy(track->meta);
 1174|      0|        avifArrayPop(&data->tracks);
 1175|      0|        return NULL;
 1176|      0|    }
 1177|   135k|    return track;
 1178|   135k|}
read.c:avifParseTrackHeaderBox:
 3620|   135k|{
 3621|   135k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[tkhd]");
  ------------------
  |  |  810|   135k|    avifROStream VARNAME;                               \
  |  |  811|   135k|    avifROData VARNAME##_roData;                        \
  |  |  812|   135k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   135k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   135k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3622|       |
 3623|   135k|    uint8_t version;
 3624|   135k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, NULL));
  ------------------
  |  |   36|   135k|    do {                        \
  |  |   37|   135k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 135k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
 3625|       |
 3626|   135k|    uint32_t ignored32, trackID;
 3627|   135k|    uint64_t ignored64;
 3628|   135k|    if (version == 1) {
  ------------------
  |  Branch (3628:9): [True: 108k, False: 27.2k]
  ------------------
 3629|   108k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));            // unsigned int(64) creation_time;
  ------------------
  |  |   36|   108k|    do {                        \
  |  |   37|   108k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 108k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 3630|   108k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));            // unsigned int(64) modification_time;
  ------------------
  |  |   36|   108k|    do {                        \
  |  |   37|   108k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 108k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 3631|   108k|        AVIF_CHECK(avifROStreamReadU32(&s, &trackID));              // unsigned int(32) track_ID;
  ------------------
  |  |   36|   108k|    do {                        \
  |  |   37|   108k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 108k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 3632|   108k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));            // const unsigned int(32) reserved = 0;
  ------------------
  |  |   36|   108k|    do {                        \
  |  |   37|   108k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 108k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 3633|   108k|        AVIF_CHECK(avifROStreamReadU64(&s, &track->trackDuration)); // unsigned int(64) duration;
  ------------------
  |  |   36|   108k|    do {                        \
  |  |   37|   108k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 108k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   108k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 108k]
  |  |  ------------------
  ------------------
 3634|   108k|    } else if (version == 0) {
  ------------------
  |  Branch (3634:16): [True: 27.2k, False: 1]
  ------------------
 3635|  27.2k|        uint32_t trackDuration;
 3636|  27.2k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));     // unsigned int(32) creation_time;
  ------------------
  |  |   36|  27.2k|    do {                        \
  |  |   37|  27.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.2k]
  |  |  ------------------
  ------------------
 3637|  27.2k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));     // unsigned int(32) modification_time;
  ------------------
  |  |   36|  27.2k|    do {                        \
  |  |   37|  27.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.2k]
  |  |  ------------------
  ------------------
 3638|  27.2k|        AVIF_CHECK(avifROStreamReadU32(&s, &trackID));       // unsigned int(32) track_ID;
  ------------------
  |  |   36|  27.2k|    do {                        \
  |  |   37|  27.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 27.2k]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|  27.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.2k]
  |  |  ------------------
  ------------------
 3639|  27.2k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));     // const unsigned int(32) reserved = 0;
  ------------------
  |  |   36|  27.2k|    do {                        \
  |  |   37|  27.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.2k]
  |  |  ------------------
  ------------------
 3640|  27.2k|        AVIF_CHECK(avifROStreamReadU32(&s, &trackDuration)); // unsigned int(32) duration;
  ------------------
  |  |   36|  27.2k|    do {                        \
  |  |   37|  27.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 27.1k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  27.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 27.1k]
  |  |  ------------------
  ------------------
 3641|  27.1k|        track->trackDuration = (trackDuration == AVIF_INDEFINITE_DURATION32) ? AVIF_INDEFINITE_DURATION64 : trackDuration;
  ------------------
  |  |  843|  27.1k|#define AVIF_INDEFINITE_DURATION32 UINT32_MAX
  ------------------
                      track->trackDuration = (trackDuration == AVIF_INDEFINITE_DURATION32) ? AVIF_INDEFINITE_DURATION64 : trackDuration;
  ------------------
  |  |  842|  27.1k|#define AVIF_INDEFINITE_DURATION64 UINT64_MAX
  ------------------
  |  Branch (3641:32): [True: 1, False: 27.1k]
  ------------------
 3642|  27.1k|    } else {
 3643|       |        // Unsupported version
 3644|      1|        avifDiagnosticsPrintf(diag, "Box[tkhd] has an unsupported version [%u]", version);
 3645|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3646|      1|    }
 3647|   135k|    track->id = trackID;
 3648|       |
 3649|       |    // Skipping the following 52 bytes here:
 3650|       |    // ------------------------------------
 3651|       |    // const unsigned int(32)[2] reserved = 0;
 3652|       |    // template int(16) layer = 0;
 3653|       |    // template int(16) alternate_group = 0;
 3654|       |    // template int(16) volume = {if track_is_audio 0x0100 else 0};
 3655|       |    // const unsigned int(16) reserved = 0;
 3656|       |    // template int(32)[9] matrix= { 0x00010000,0,0,0,0x00010000,0,0,0,0x40000000 }; // unity matrix
 3657|   135k|    AVIF_CHECK(avifROStreamSkip(&s, 52));
  ------------------
  |  |   36|   135k|    do {                        \
  |  |   37|   135k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 135k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
 3658|       |
 3659|   135k|    uint32_t width, height;
 3660|   135k|    AVIF_CHECK(avifROStreamReadU32(&s, &width));  // unsigned int(32) width;
  ------------------
  |  |   36|   135k|    do {                        \
  |  |   37|   135k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 135k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
 3661|   135k|    AVIF_CHECK(avifROStreamReadU32(&s, &height)); // unsigned int(32) height;
  ------------------
  |  |   36|   135k|    do {                        \
  |  |   37|   135k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 135k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   135k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 135k]
  |  |  ------------------
  ------------------
 3662|   135k|    track->width = width >> 16;
 3663|   135k|    track->height = height >> 16;
 3664|       |
 3665|       |    // TODO: support scaling based on width/height track header info?
 3666|       |
 3667|   135k|    return AVIF_TRUE;
  ------------------
  |  |   88|   135k|#define AVIF_TRUE 1
  ------------------
 3668|   135k|}
read.c:avifParseMediaBox:
 3928|   116k|{
 3929|   116k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[mdia]");
  ------------------
  |  |  810|   116k|    avifROStream VARNAME;                               \
  |  |  811|   116k|    avifROData VARNAME##_roData;                        \
  |  |  812|   116k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   116k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   116k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3930|       |
 3931|   466k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3931:12): [True: 350k, False: 116k]
  ------------------
 3932|   350k|        avifBoxHeader header;
 3933|   350k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   350k|    do {                        \
  |  |   46|   350k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 350k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   350k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 350k]
  |  |  ------------------
  ------------------
 3934|       |
 3935|   350k|        if (!memcmp(header.type, "mdhd", 4)) {
  ------------------
  |  Branch (3935:13): [True: 93.0k, False: 257k]
  ------------------
 3936|  93.0k|            AVIF_CHECKERR(avifParseMediaHeaderBox(track, avifROStreamCurrent(&s), header.size, diag), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  93.0k|    do {                        \
  |  |   46|  93.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 10, False: 92.9k]
  |  |  ------------------
  |  |   47|     10|            avifBreakOnError(); \
  |  |   48|     10|            return ERR;         \
  |  |   49|     10|        }                       \
  |  |   50|  93.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 92.9k]
  |  |  ------------------
  ------------------
 3937|   257k|        } else if (!memcmp(header.type, "minf", 4)) {
  ------------------
  |  Branch (3937:20): [True: 114k, False: 142k]
  ------------------
 3938|   114k|            AVIF_CHECKRES(
  ------------------
  |  |   54|   114k|    do {                                  \
  |  |   55|   114k|        const avifResult result__ = (A);  \
  |  |   56|   114k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 100, False: 114k]
  |  |  ------------------
  |  |   57|    100|            avifBreakOnError();           \
  |  |   58|    100|            return result__;              \
  |  |   59|    100|        }                                 \
  |  |   60|   114k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 114k]
  |  |  ------------------
  ------------------
 3939|   114k|                avifParseMediaInformationBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
 3940|   142k|        } else if (!memcmp(header.type, "hdlr", 4)) {
  ------------------
  |  Branch (3940:20): [True: 104k, False: 37.6k]
  ------------------
 3941|   104k|            AVIF_CHECKERR(avifParseHandlerBox(avifROStreamCurrent(&s), header.size, track->handlerType, diag),
  ------------------
  |  |   45|   104k|    do {                        \
  |  |   46|   104k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 104k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   104k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 3942|   104k|                          AVIF_RESULT_BMFF_PARSE_FAILED);
 3943|   104k|        }
 3944|       |
 3945|   350k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   350k|    do {                        \
  |  |   46|   350k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 350k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   350k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 350k]
  |  |  ------------------
  ------------------
 3946|   350k|    }
 3947|   116k|    return AVIF_RESULT_OK;
 3948|   116k|}
read.c:avifParseMediaHeaderBox:
 3671|  93.0k|{
 3672|  93.0k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[mdhd]");
  ------------------
  |  |  810|  93.0k|    avifROStream VARNAME;                               \
  |  |  811|  93.0k|    avifROData VARNAME##_roData;                        \
  |  |  812|  93.0k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  93.0k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  93.0k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3673|       |
 3674|  93.0k|    uint8_t version;
 3675|  93.0k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, NULL));
  ------------------
  |  |   36|  93.0k|    do {                        \
  |  |   37|  93.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 93.0k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  93.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 93.0k]
  |  |  ------------------
  ------------------
 3676|       |
 3677|  93.0k|    uint32_t ignored32, mediaTimescale, mediaDuration32;
 3678|  93.0k|    uint64_t ignored64, mediaDuration64;
 3679|  93.0k|    if (version == 1) {
  ------------------
  |  Branch (3679:9): [True: 75.2k, False: 17.7k]
  ------------------
 3680|  75.2k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));       // unsigned int(64) creation_time;
  ------------------
  |  |   36|  75.2k|    do {                        \
  |  |   37|  75.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 75.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  75.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 75.2k]
  |  |  ------------------
  ------------------
 3681|  75.2k|        AVIF_CHECK(avifROStreamReadU64(&s, &ignored64));       // unsigned int(64) modification_time;
  ------------------
  |  |   36|  75.2k|    do {                        \
  |  |   37|  75.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 75.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  75.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 75.2k]
  |  |  ------------------
  ------------------
 3682|  75.2k|        AVIF_CHECK(avifROStreamReadU32(&s, &mediaTimescale));  // unsigned int(32) timescale;
  ------------------
  |  |   36|  75.2k|    do {                        \
  |  |   37|  75.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 75.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  75.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 75.2k]
  |  |  ------------------
  ------------------
 3683|  75.2k|        AVIF_CHECK(avifROStreamReadU64(&s, &mediaDuration64)); // unsigned int(64) duration;
  ------------------
  |  |   36|  75.2k|    do {                        \
  |  |   37|  75.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 75.2k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  75.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 75.2k]
  |  |  ------------------
  ------------------
 3684|  75.2k|        track->mediaDuration = mediaDuration64;
 3685|  75.2k|    } else if (version == 0) {
  ------------------
  |  Branch (3685:16): [True: 17.7k, False: 1]
  ------------------
 3686|  17.7k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));       // unsigned int(32) creation_time;
  ------------------
  |  |   36|  17.7k|    do {                        \
  |  |   37|  17.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 17.7k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  17.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 17.7k]
  |  |  ------------------
  ------------------
 3687|  17.7k|        AVIF_CHECK(avifROStreamReadU32(&s, &ignored32));       // unsigned int(32) modification_time;
  ------------------
  |  |   36|  17.7k|    do {                        \
  |  |   37|  17.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 17.7k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  17.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 17.7k]
  |  |  ------------------
  ------------------
 3688|  17.7k|        AVIF_CHECK(avifROStreamReadU32(&s, &mediaTimescale));  // unsigned int(32) timescale;
  ------------------
  |  |   36|  17.7k|    do {                        \
  |  |   37|  17.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 17.7k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  17.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 17.7k]
  |  |  ------------------
  ------------------
 3689|  17.7k|        AVIF_CHECK(avifROStreamReadU32(&s, &mediaDuration32)); // unsigned int(32) duration;
  ------------------
  |  |   36|  17.7k|    do {                        \
  |  |   37|  17.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 17.7k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  17.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 17.7k]
  |  |  ------------------
  ------------------
 3690|  17.7k|        track->mediaDuration = (uint64_t)mediaDuration32;
 3691|  17.7k|    } else {
 3692|       |        // Unsupported version
 3693|      1|        avifDiagnosticsPrintf(diag, "Box[mdhd] has an unsupported version [%u]", version);
 3694|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 3695|      1|    }
 3696|       |
 3697|  92.9k|    track->mediaTimescale = mediaTimescale;
 3698|  92.9k|    return AVIF_TRUE;
  ------------------
  |  |   88|  92.9k|#define AVIF_TRUE 1
  ------------------
 3699|  93.0k|}
read.c:avifParseMediaInformationBox:
 3911|   114k|{
 3912|   114k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[minf]");
  ------------------
  |  |  810|   114k|    avifROStream VARNAME;                               \
  |  |  811|   114k|    avifROData VARNAME##_roData;                        \
  |  |  812|   114k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   114k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   114k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3913|       |
 3914|   458k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3914:12): [True: 343k, False: 114k]
  ------------------
 3915|   343k|        avifBoxHeader header;
 3916|   343k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   343k|    do {                        \
  |  |   46|   343k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 5, False: 343k]
  |  |  ------------------
  |  |   47|      5|            avifBreakOnError(); \
  |  |   48|      5|            return ERR;         \
  |  |   49|      5|        }                       \
  |  |   50|   343k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 343k]
  |  |  ------------------
  ------------------
 3917|       |
 3918|   343k|        if (!memcmp(header.type, "stbl", 4)) {
  ------------------
  |  Branch (3918:13): [True: 113k, False: 230k]
  ------------------
 3919|   113k|            AVIF_CHECKRES(avifParseSampleTableBox(track, rawOffset + avifROStreamOffset(&s), avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   113k|    do {                                  \
  |  |   55|   113k|        const avifResult result__ = (A);  \
  |  |   56|   113k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 95, False: 113k]
  |  |  ------------------
  |  |   57|     95|            avifBreakOnError();           \
  |  |   58|     95|            return result__;              \
  |  |   59|     95|        }                                 \
  |  |   60|   113k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 113k]
  |  |  ------------------
  ------------------
 3920|   113k|        }
 3921|       |
 3922|   343k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   343k|    do {                        \
  |  |   46|   343k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 343k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   343k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 343k]
  |  |  ------------------
  ------------------
 3923|   343k|    }
 3924|   114k|    return AVIF_RESULT_OK;
 3925|   114k|}
read.c:avifParseSampleTableBox:
 3870|   113k|{
 3871|   113k|    if (track->sampleTable) {
  ------------------
  |  Branch (3871:9): [True: 0, False: 113k]
  ------------------
 3872|       |        // A TrackBox may only have one SampleTable
 3873|      0|        avifDiagnosticsPrintf(diag, "Duplicate Box[stbl] for a single track detected");
 3874|      0|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3875|      0|    }
 3876|   113k|    track->sampleTable = avifSampleTableCreate();
 3877|   113k|    AVIF_CHECKERR(track->sampleTable != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   113k|    do {                        \
  |  |   46|   113k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 113k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   113k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 113k]
  |  |  ------------------
  ------------------
 3878|       |
 3879|   113k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stbl]");
  ------------------
  |  |  810|   113k|    avifROStream VARNAME;                               \
  |  |  811|   113k|    avifROData VARNAME##_roData;                        \
  |  |  812|   113k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   113k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   113k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3880|       |
 3881|   785k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3881:12): [True: 672k, False: 113k]
  ------------------
 3882|   672k|        avifBoxHeader header;
 3883|   672k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   672k|    do {                        \
  |  |   46|   672k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 12, False: 672k]
  |  |  ------------------
  |  |   47|     12|            avifBreakOnError(); \
  |  |   48|     12|            return ERR;         \
  |  |   49|     12|        }                       \
  |  |   50|   672k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 672k]
  |  |  ------------------
  ------------------
 3884|       |
 3885|   672k|        if (!memcmp(header.type, "stco", 4)) {
  ------------------
  |  Branch (3885:13): [True: 105k, False: 566k]
  ------------------
 3886|   105k|            AVIF_CHECKRES(avifParseChunkOffsetBox(track->sampleTable, AVIF_FALSE, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   105k|    do {                                  \
  |  |   55|   105k|        const avifResult result__ = (A);  \
  |  |   56|   105k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 16, False: 105k]
  |  |  ------------------
  |  |   57|     16|            avifBreakOnError();           \
  |  |   58|     16|            return result__;              \
  |  |   59|     16|        }                                 \
  |  |   60|   105k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 105k]
  |  |  ------------------
  ------------------
 3887|   566k|        } else if (!memcmp(header.type, "co64", 4)) {
  ------------------
  |  Branch (3887:20): [True: 0, False: 566k]
  ------------------
 3888|      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]
  |  |  ------------------
  ------------------
 3889|   566k|        } else if (!memcmp(header.type, "stsc", 4)) {
  ------------------
  |  Branch (3889:20): [True: 112k, False: 453k]
  ------------------
 3890|   112k|            AVIF_CHECKRES(avifParseSampleToChunkBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   112k|    do {                                  \
  |  |   55|   112k|        const avifResult result__ = (A);  \
  |  |   56|   112k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 24, False: 112k]
  |  |  ------------------
  |  |   57|     24|            avifBreakOnError();           \
  |  |   58|     24|            return result__;              \
  |  |   59|     24|        }                                 \
  |  |   60|   112k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 3891|   453k|        } else if (!memcmp(header.type, "stsz", 4)) {
  ------------------
  |  Branch (3891:20): [True: 112k, False: 341k]
  ------------------
 3892|   112k|            AVIF_CHECKRES(avifParseSampleSizeBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|   112k|    do {                                  \
  |  |   55|   112k|        const avifResult result__ = (A);  \
  |  |   56|   112k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 12, False: 112k]
  |  |  ------------------
  |  |   57|     12|            avifBreakOnError();           \
  |  |   58|     12|            return result__;              \
  |  |   59|     12|        }                                 \
  |  |   60|   112k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 3893|   341k|        } else if (!memcmp(header.type, "stss", 4)) {
  ------------------
  |  Branch (3893:20): [True: 83.1k, False: 258k]
  ------------------
 3894|  83.1k|            AVIF_CHECKRES(avifParseSyncSampleBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  83.1k|    do {                                  \
  |  |   55|  83.1k|        const avifResult result__ = (A);  \
  |  |   56|  83.1k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 11, False: 83.0k]
  |  |  ------------------
  |  |   57|     11|            avifBreakOnError();           \
  |  |   58|     11|            return result__;              \
  |  |   59|     11|        }                                 \
  |  |   60|  83.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 83.0k]
  |  |  ------------------
  ------------------
 3895|   258k|        } else if (!memcmp(header.type, "stts", 4)) {
  ------------------
  |  Branch (3895:20): [True: 95.8k, False: 162k]
  ------------------
 3896|  95.8k|            AVIF_CHECKRES(avifParseTimeToSampleBox(track->sampleTable, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   54|  95.8k|    do {                                  \
  |  |   55|  95.8k|        const avifResult result__ = (A);  \
  |  |   56|  95.8k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 8, False: 95.7k]
  |  |  ------------------
  |  |   57|      8|            avifBreakOnError();           \
  |  |   58|      8|            return result__;              \
  |  |   59|      8|        }                                 \
  |  |   60|  95.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 95.7k]
  |  |  ------------------
  ------------------
 3897|   162k|        } else if (!memcmp(header.type, "stsd", 4)) {
  ------------------
  |  Branch (3897:20): [True: 104k, False: 57.8k]
  ------------------
 3898|   104k|            AVIF_CHECKRES(avifParseSampleDescriptionBox(track->sampleTable,
  ------------------
  |  |   54|   104k|    do {                                  \
  |  |   55|   104k|        const avifResult result__ = (A);  \
  |  |   56|   104k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 12, False: 104k]
  |  |  ------------------
  |  |   57|     12|            avifBreakOnError();           \
  |  |   58|     12|            return result__;              \
  |  |   59|     12|        }                                 \
  |  |   60|   104k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 3899|   104k|                                                        rawOffset + avifROStreamOffset(&s),
 3900|   104k|                                                        avifROStreamCurrent(&s),
 3901|   104k|                                                        header.size,
 3902|   104k|                                                        diag));
 3903|   104k|        }
 3904|       |
 3905|   672k|        AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   672k|    do {                        \
  |  |   46|   672k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 672k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   672k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 672k]
  |  |  ------------------
  ------------------
 3906|   672k|    }
 3907|   113k|    return AVIF_RESULT_OK;
 3908|   113k|}
read.c:avifSampleTableCreate:
  383|   113k|{
  384|   113k|    avifSampleTable * sampleTable = (avifSampleTable *)avifAlloc(sizeof(avifSampleTable));
  385|   113k|    if (sampleTable == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 113k]
  ------------------
  386|      0|        return NULL;
  387|      0|    }
  388|   113k|    memset(sampleTable, 0, sizeof(avifSampleTable));
  389|   113k|    if (!avifArrayCreate(&sampleTable->chunks, sizeof(avifSampleTableChunk), 16) ||
  ------------------
  |  Branch (389:9): [True: 0, False: 113k]
  ------------------
  390|   113k|        !avifArrayCreate(&sampleTable->sampleDescriptions, sizeof(avifSampleDescription), 2) ||
  ------------------
  |  Branch (390:9): [True: 0, False: 113k]
  ------------------
  391|   113k|        !avifArrayCreate(&sampleTable->sampleToChunks, sizeof(avifSampleTableSampleToChunk), 16) ||
  ------------------
  |  Branch (391:9): [True: 0, False: 113k]
  ------------------
  392|   113k|        !avifArrayCreate(&sampleTable->sampleSizes, sizeof(avifSampleTableSampleSize), 16) ||
  ------------------
  |  Branch (392:9): [True: 0, False: 113k]
  ------------------
  393|   113k|        !avifArrayCreate(&sampleTable->timeToSamples, sizeof(avifSampleTableTimeToSample), 16) ||
  ------------------
  |  Branch (393:9): [True: 0, False: 113k]
  ------------------
  394|   113k|        !avifArrayCreate(&sampleTable->syncSamples, sizeof(avifSyncSample), 16)) {
  ------------------
  |  Branch (394:9): [True: 0, False: 113k]
  ------------------
  395|      0|        avifSampleTableDestroy(sampleTable);
  396|      0|        return NULL;
  397|      0|    }
  398|   113k|    return sampleTable;
  399|   113k|}
read.c:avifParseChunkOffsetBox:
 3702|   105k|{
 3703|   105k|    BEGIN_STREAM(s, raw, rawLen, diag, largeOffsets ? "Box[co64]" : "Box[stco]");
  ------------------
  |  |  810|   105k|    avifROStream VARNAME;                               \
  |  |  811|   105k|    avifROData VARNAME##_roData;                        \
  |  |  812|   105k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   105k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   211k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  |  |  ------------------
  |  |  |  Branch (814:58): [True: 0, False: 105k]
  |  |  ------------------
  ------------------
 3704|       |
 3705|   105k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   105k|    do {                        \
  |  |   46|   105k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 4, False: 105k]
  |  |  ------------------
  |  |   47|      4|            avifBreakOnError(); \
  |  |   48|      4|            return ERR;         \
  |  |   49|      4|        }                       \
  |  |   50|   105k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 105k]
  |  |  ------------------
  ------------------
 3706|       |
 3707|   105k|    uint32_t entryCount;
 3708|   105k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|   105k|    do {                        \
  |  |   46|   105k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 105k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   105k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 105k]
  |  |  ------------------
  ------------------
 3709|   210k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3709:26): [True: 104k, False: 105k]
  ------------------
 3710|   104k|        uint64_t offset;
 3711|   104k|        if (largeOffsets) {
  ------------------
  |  Branch (3711:13): [True: 0, False: 104k]
  ------------------
 3712|      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]
  |  |  ------------------
  ------------------
 3713|   104k|        } else {
 3714|   104k|            uint32_t offset32;
 3715|   104k|            AVIF_CHECKERR(avifROStreamReadU32(&s, &offset32), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) chunk_offset;
  ------------------
  |  |   45|   104k|    do {                        \
  |  |   46|   104k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 11, False: 104k]
  |  |  ------------------
  |  |   47|     11|            avifBreakOnError(); \
  |  |   48|     11|            return ERR;         \
  |  |   49|     11|        }                       \
  |  |   50|   104k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 3716|   104k|            offset = (uint64_t)offset32;
 3717|   104k|        }
 3718|       |
 3719|   104k|        avifSampleTableChunk * chunk = (avifSampleTableChunk *)avifArrayPush(&sampleTable->chunks);
 3720|   104k|        AVIF_CHECKERR(chunk != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   104k|    do {                        \
  |  |   46|   104k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 104k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   104k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 3721|   104k|        chunk->offset = offset;
 3722|   104k|    }
 3723|   105k|    return AVIF_RESULT_OK;
 3724|   105k|}
read.c:avifParseSampleToChunkBox:
 3727|   112k|{
 3728|   112k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stsc]");
  ------------------
  |  |  810|   112k|    avifROStream VARNAME;                               \
  |  |  811|   112k|    avifROData VARNAME##_roData;                        \
  |  |  812|   112k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   112k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   112k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3729|       |
 3730|   112k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   112k|    do {                        \
  |  |   46|   112k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 112k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   112k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 3731|       |
 3732|   112k|    uint32_t entryCount;
 3733|   112k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|   112k|    do {                        \
  |  |   46|   112k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 112k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   112k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 3734|   112k|    uint32_t prevFirstChunk = 0;
 3735|   224k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3735:26): [True: 111k, False: 112k]
  ------------------
 3736|   111k|        avifSampleTableSampleToChunk * sampleToChunk = (avifSampleTableSampleToChunk *)avifArrayPush(&sampleTable->sampleToChunks);
 3737|   111k|        AVIF_CHECKERR(sampleToChunk != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   111k|    do {                        \
  |  |   46|   111k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 111k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   111k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 111k]
  |  |  ------------------
  ------------------
 3738|   111k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleToChunk->firstChunk), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) first_chunk;
  ------------------
  |  |   45|   111k|    do {                        \
  |  |   46|   111k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 7, False: 111k]
  |  |  ------------------
  |  |   47|      7|            avifBreakOnError(); \
  |  |   48|      7|            return ERR;         \
  |  |   49|      7|        }                       \
  |  |   50|   111k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 111k]
  |  |  ------------------
  ------------------
 3739|   111k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleToChunk->samplesPerChunk), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) samples_per_chunk;
  ------------------
  |  |   45|   111k|    do {                        \
  |  |   46|   111k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 111k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   111k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 111k]
  |  |  ------------------
  ------------------
 3740|   111k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleToChunk->sampleDescriptionIndex),
  ------------------
  |  |   45|   111k|    do {                        \
  |  |   46|   111k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 111k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|   111k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 111k]
  |  |  ------------------
  ------------------
 3741|   111k|                      AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_description_index;
 3742|       |        // The first_chunk fields should start with 1 and be strictly increasing.
 3743|   111k|        if (i == 0) {
  ------------------
  |  Branch (3743:13): [True: 111k, False: 29]
  ------------------
 3744|   111k|            if (sampleToChunk->firstChunk != 1) {
  ------------------
  |  Branch (3744:17): [True: 4, False: 111k]
  ------------------
 3745|      4|                avifDiagnosticsPrintf(diag, "Box[stsc] does not begin with chunk 1 [%u]", sampleToChunk->firstChunk);
 3746|      4|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3747|      4|            }
 3748|   111k|        } else {
 3749|     29|            if (sampleToChunk->firstChunk <= prevFirstChunk) {
  ------------------
  |  Branch (3749:17): [True: 7, False: 22]
  ------------------
 3750|      7|                avifDiagnosticsPrintf(diag, "Box[stsc] chunks are not strictly increasing");
 3751|      7|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3752|      7|            }
 3753|     29|        }
 3754|   111k|        prevFirstChunk = sampleToChunk->firstChunk;
 3755|   111k|    }
 3756|   112k|    return AVIF_RESULT_OK;
 3757|   112k|}
read.c:avifParseSampleSizeBox:
 3760|   112k|{
 3761|   112k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stsz]");
  ------------------
  |  |  810|   112k|    avifROStream VARNAME;                               \
  |  |  811|   112k|    avifROData VARNAME##_roData;                        \
  |  |  812|   112k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   112k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   112k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3762|       |
 3763|   112k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   112k|    do {                        \
  |  |   46|   112k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 112k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   112k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 3764|       |
 3765|   112k|    uint32_t allSamplesSize, sampleCount;
 3766|   112k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &allSamplesSize), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_size;
  ------------------
  |  |   45|   112k|    do {                        \
  |  |   46|   112k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 112k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   112k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 3767|   112k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleCount), AVIF_RESULT_BMFF_PARSE_FAILED);    // unsigned int(32) sample_count;
  ------------------
  |  |   45|   112k|    do {                        \
  |  |   46|   112k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 112k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   112k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 112k]
  |  |  ------------------
  ------------------
 3768|       |
 3769|   112k|    if (allSamplesSize > 0) {
  ------------------
  |  Branch (3769:9): [True: 26.6k, False: 85.9k]
  ------------------
 3770|  26.6k|        sampleTable->allSamplesSize = allSamplesSize;
 3771|  85.9k|    } else {
 3772|   515k|        for (uint32_t i = 0; i < sampleCount; ++i) {
  ------------------
  |  Branch (3772:30): [True: 429k, False: 85.9k]
  ------------------
 3773|   429k|            avifSampleTableSampleSize * sampleSize = (avifSampleTableSampleSize *)avifArrayPush(&sampleTable->sampleSizes);
 3774|   429k|            AVIF_CHECKERR(sampleSize != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   429k|    do {                        \
  |  |   46|   429k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 429k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   429k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 429k]
  |  |  ------------------
  ------------------
 3775|   429k|            AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleSize->size), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_size;
  ------------------
  |  |   45|   429k|    do {                        \
  |  |   46|   429k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 9, False: 429k]
  |  |  ------------------
  |  |   47|      9|            avifBreakOnError(); \
  |  |   48|      9|            return ERR;         \
  |  |   49|      9|        }                       \
  |  |   50|   429k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 429k]
  |  |  ------------------
  ------------------
 3776|   429k|        }
 3777|  85.9k|    }
 3778|   112k|    return AVIF_RESULT_OK;
 3779|   112k|}
read.c:avifParseSyncSampleBox:
 3782|  83.1k|{
 3783|  83.1k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stss]");
  ------------------
  |  |  810|  83.1k|    avifROStream VARNAME;                               \
  |  |  811|  83.1k|    avifROData VARNAME##_roData;                        \
  |  |  812|  83.1k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  83.1k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  83.1k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3784|       |
 3785|  83.1k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  83.1k|    do {                        \
  |  |   46|  83.1k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 83.1k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  83.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 83.1k]
  |  |  ------------------
  ------------------
 3786|       |
 3787|  83.1k|    uint32_t entryCount;
 3788|  83.1k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  83.1k|    do {                        \
  |  |   46|  83.1k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 83.1k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  83.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 83.1k]
  |  |  ------------------
  ------------------
 3789|       |
 3790|   167k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3790:26): [True: 84.5k, False: 83.0k]
  ------------------
 3791|  84.5k|        uint32_t sampleNumber = 0;
 3792|  84.5k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &sampleNumber), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_number;
  ------------------
  |  |   45|  84.5k|    do {                        \
  |  |   46|  84.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 9, False: 84.4k]
  |  |  ------------------
  |  |   47|      9|            avifBreakOnError(); \
  |  |   48|      9|            return ERR;         \
  |  |   49|      9|        }                       \
  |  |   50|  84.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 84.4k]
  |  |  ------------------
  ------------------
 3793|  84.4k|        avifSyncSample * syncSample = (avifSyncSample *)avifArrayPush(&sampleTable->syncSamples);
 3794|  84.4k|        AVIF_CHECKERR(syncSample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  84.4k|    do {                        \
  |  |   46|  84.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 84.4k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  84.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 84.4k]
  |  |  ------------------
  ------------------
 3795|  84.4k|        syncSample->sampleNumber = sampleNumber;
 3796|  84.4k|    }
 3797|  83.0k|    return AVIF_RESULT_OK;
 3798|  83.1k|}
read.c:avifParseTimeToSampleBox:
 3801|  95.8k|{
 3802|  95.8k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stts]");
  ------------------
  |  |  810|  95.8k|    avifROStream VARNAME;                               \
  |  |  811|  95.8k|    avifROData VARNAME##_roData;                        \
  |  |  812|  95.8k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  95.8k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  95.8k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3803|       |
 3804|  95.8k|    AVIF_CHECKERR(avifROStreamReadAndEnforceVersion(&s, /*enforcedVersion=*/0, /*flags=*/NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  95.8k|    do {                        \
  |  |   46|  95.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 95.7k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  95.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 95.7k]
  |  |  ------------------
  ------------------
 3805|       |
 3806|  95.7k|    uint32_t entryCount;
 3807|  95.7k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|  95.7k|    do {                        \
  |  |   46|  95.7k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 95.7k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  95.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 95.7k]
  |  |  ------------------
  ------------------
 3808|       |
 3809|   189k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3809:26): [True: 94.0k, False: 95.7k]
  ------------------
 3810|  94.0k|        avifSampleTableTimeToSample * timeToSample = (avifSampleTableTimeToSample *)avifArrayPush(&sampleTable->timeToSamples);
 3811|  94.0k|        AVIF_CHECKERR(timeToSample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  94.0k|    do {                        \
  |  |   46|  94.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 94.0k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  94.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 94.0k]
  |  |  ------------------
  ------------------
 3812|  94.0k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &timeToSample->sampleCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_count;
  ------------------
  |  |   45|  94.0k|    do {                        \
  |  |   46|  94.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 94.0k]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|  94.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 94.0k]
  |  |  ------------------
  ------------------
 3813|  94.0k|        AVIF_CHECKERR(avifROStreamReadU32(&s, &timeToSample->sampleDelta), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) sample_delta;
  ------------------
  |  |   45|  94.0k|    do {                        \
  |  |   46|  94.0k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 4, False: 94.0k]
  |  |  ------------------
  |  |   47|      4|            avifBreakOnError(); \
  |  |   48|      4|            return ERR;         \
  |  |   49|      4|        }                       \
  |  |   50|  94.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 94.0k]
  |  |  ------------------
  ------------------
 3814|  94.0k|    }
 3815|  95.7k|    return AVIF_RESULT_OK;
 3816|  95.7k|}
read.c:avifParseSampleDescriptionBox:
 3823|   104k|{
 3824|   104k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[stsd]");
  ------------------
  |  |  810|   104k|    avifROStream VARNAME;                               \
  |  |  811|   104k|    avifROData VARNAME##_roData;                        \
  |  |  812|   104k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   104k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   104k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3825|       |
 3826|   104k|    uint8_t version;
 3827|   104k|    AVIF_CHECKERR(avifROStreamReadVersionAndFlags(&s, &version, NULL), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   104k|    do {                        \
  |  |   46|   104k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 104k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   104k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 3828|       |
 3829|       |    // Section 8.5.2.3 of ISO/IEC 14496-12:
 3830|       |    //   version is set to zero. A version number of 1 shall be treated as a version of 0.
 3831|   104k|    if (version != 0 && version != 1) {
  ------------------
  |  Branch (3831:9): [True: 4.21k, False: 100k]
  |  Branch (3831:25): [True: 1, False: 4.20k]
  ------------------
 3832|      1|        avifDiagnosticsPrintf(diag, "Box[stsd]: Expecting box version 0 or 1, got version %u", version);
 3833|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 3834|      1|    }
 3835|       |
 3836|   104k|    uint32_t entryCount;
 3837|   104k|    AVIF_CHECKERR(avifROStreamReadU32(&s, &entryCount), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(32) entry_count;
  ------------------
  |  |   45|   104k|    do {                        \
  |  |   46|   104k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 104k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|   104k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 3838|       |
 3839|   207k|    for (uint32_t i = 0; i < entryCount; ++i) {
  ------------------
  |  Branch (3839:26): [True: 103k, False: 104k]
  ------------------
 3840|   103k|        avifBoxHeader sampleEntryHeader;
 3841|   103k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &sampleEntryHeader), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   103k|    do {                        \
  |  |   46|   103k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 6, False: 103k]
  |  |  ------------------
  |  |   47|      6|            avifBreakOnError(); \
  |  |   48|      6|            return ERR;         \
  |  |   49|      6|        }                       \
  |  |   50|   103k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 3842|       |
 3843|   103k|        avifSampleDescription * description = (avifSampleDescription *)avifArrayPush(&sampleTable->sampleDescriptions);
 3844|   103k|        AVIF_CHECKERR(description != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   103k|    do {                        \
  |  |   46|   103k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 103k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   103k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 3845|   103k|        if (!avifArrayCreate(&description->properties, sizeof(avifProperty), 16)) {
  ------------------
  |  Branch (3845:13): [True: 0, False: 103k]
  ------------------
 3846|      0|            avifArrayPop(&sampleTable->sampleDescriptions);
 3847|      0|            return AVIF_RESULT_OUT_OF_MEMORY;
 3848|      0|        }
 3849|   103k|        memcpy(description->format, sampleEntryHeader.type, sizeof(description->format));
 3850|   103k|        const size_t sampleEntryBytes = sampleEntryHeader.size;
 3851|   103k|        if (avifGetCodecType(description->format) != AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (3851:13): [True: 80.1k, False: 23.2k]
  ------------------
 3852|  80.1k|            if (sampleEntryBytes < VISUALSAMPLEENTRY_SIZE) {
  ------------------
  |  Branch (3852:17): [True: 1, False: 80.1k]
  ------------------
 3853|      1|                avifDiagnosticsPrintf(diag, "Not enough bytes to parse VisualSampleEntry");
 3854|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 3855|      1|            }
 3856|  80.1k|            AVIF_CHECKRES(avifParseItemPropertyContainerBox(&description->properties,
  ------------------
  |  |   54|  80.1k|    do {                                  \
  |  |   55|  80.1k|        const avifResult result__ = (A);  \
  |  |   56|  80.1k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 2, False: 80.1k]
  |  |  ------------------
  |  |   57|      2|            avifBreakOnError();           \
  |  |   58|      2|            return result__;              \
  |  |   59|      2|        }                                 \
  |  |   60|  80.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 80.1k]
  |  |  ------------------
  ------------------
 3857|  80.1k|                                                            rawOffset + avifROStreamOffset(&s) + VISUALSAMPLEENTRY_SIZE,
 3858|  80.1k|                                                            avifROStreamCurrent(&s) + VISUALSAMPLEENTRY_SIZE,
 3859|  80.1k|                                                            sampleEntryBytes - VISUALSAMPLEENTRY_SIZE,
 3860|  80.1k|                                                            /*isTrack=*/AVIF_TRUE,
 3861|  80.1k|                                                            diag));
 3862|  80.1k|        }
 3863|       |
 3864|   103k|        AVIF_CHECKERR(avifROStreamSkip(&s, sampleEntryBytes), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|   103k|    do {                        \
  |  |   46|   103k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 103k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   103k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 3865|   103k|    }
 3866|   104k|    return AVIF_RESULT_OK;
 3867|   104k|}
read.c:avifGetCodecType:
   45|  2.93M|{
   46|  2.93M|    if (!memcmp(fourcc, "av01", 4)) {
  ------------------
  |  Branch (46:9): [True: 2.30M, False: 622k]
  ------------------
   47|  2.30M|        return AVIF_CODEC_TYPE_AV1;
   48|  2.30M|    }
   49|       |#if defined(AVIF_CODEC_AVM)
   50|       |    if (!memcmp(fourcc, "av02", 4)) {
   51|       |        return AVIF_CODEC_TYPE_AV2;
   52|       |    }
   53|       |#endif
   54|   622k|    return AVIF_CODEC_TYPE_UNKNOWN;
   55|  2.93M|}
read.c:avifTrackReferenceBox:
 3951|  50.5k|{
 3952|  50.5k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[tref]");
  ------------------
  |  |  810|  50.5k|    avifROStream VARNAME;                               \
  |  |  811|  50.5k|    avifROData VARNAME##_roData;                        \
  |  |  812|  50.5k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  50.5k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  50.5k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3953|       |
 3954|   100k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (3954:12): [True: 50.4k, False: 50.5k]
  ------------------
 3955|  50.4k|        avifBoxHeader header;
 3956|  50.4k|        AVIF_CHECKERR(avifROStreamReadBoxHeader(&s, &header), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  50.4k|    do {                        \
  |  |   46|  50.4k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 4, False: 50.4k]
  |  |  ------------------
  |  |   47|      4|            avifBreakOnError(); \
  |  |   48|      4|            return ERR;         \
  |  |   49|      4|        }                       \
  |  |   50|  50.4k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 50.4k]
  |  |  ------------------
  ------------------
 3957|       |
 3958|  50.4k|        if (!memcmp(header.type, "auxl", 4) || !memcmp(header.type, "prem", 4)) {
  ------------------
  |  Branch (3958:13): [True: 43.5k, False: 6.91k]
  |  Branch (3958:48): [True: 0, False: 6.91k]
  ------------------
 3959|       |            // Refuse a box that holds no track_ID at all.
 3960|  43.5k|            AVIF_CHECKERR(header.size >= sizeof(uint32_t), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  43.5k|    do {                        \
  |  |   46|  43.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 43.5k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  43.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 43.5k]
  |  |  ------------------
  ------------------
 3961|       |            // Section 8.3.3.2 of ISO/IEC 14496-12:
 3962|       |            //   unsigned int(32) track_IDs[];
 3963|       |            // There is no count field: the number of track_IDs follows from the box size.
 3964|       |            // Bytes that do not make up a whole track_ID are skipped.
 3965|  43.5k|            const size_t numTrackIDs = header.size / sizeof(uint32_t);
 3966|  87.0k|            for (size_t i = 0; i < numTrackIDs; ++i) {
  ------------------
  |  Branch (3966:32): [True: 43.5k, False: 43.5k]
  ------------------
 3967|  43.5k|                uint32_t toID;
 3968|  43.5k|                AVIF_CHECKERR(avifROStreamReadU32(&s, &toID), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  43.5k|    do {                        \
  |  |   46|  43.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 43.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  43.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 43.5k]
  |  |  ------------------
  ------------------
 3969|  43.5k|                if (toID == 0) {
  ------------------
  |  Branch (3969:21): [True: 222, False: 43.3k]
  ------------------
 3970|       |                    // Section 8.3.3.3 of ISO/IEC 14496-12:
 3971|       |                    //   The value 0 shall not be present.
 3972|       |                    // Skip it instead of rejecting for backward compatibility.
 3973|    222|                    continue;
 3974|    222|                }
 3975|  43.3k|                AVIF_CHECKRES(avifAddReference(&track->references, (const char *)header.type, toID));
  ------------------
  |  |   54|  43.3k|    do {                                  \
  |  |   55|  43.3k|        const avifResult result__ = (A);  \
  |  |   56|  43.3k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 43.3k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  43.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 43.3k]
  |  |  ------------------
  ------------------
 3976|  43.3k|            }
 3977|  43.5k|            AVIF_CHECKERR(avifROStreamSkip(&s, header.size - numTrackIDs * sizeof(uint32_t)), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  43.5k|    do {                        \
  |  |   46|  43.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 43.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  43.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 43.5k]
  |  |  ------------------
  ------------------
 3978|  43.5k|        } else {
 3979|  6.91k|            AVIF_CHECKERR(avifROStreamSkip(&s, header.size), AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|  6.91k|    do {                        \
  |  |   46|  6.91k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 6.91k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  6.91k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 6.91k]
  |  |  ------------------
  ------------------
 3980|  6.91k|        }
 3981|  50.4k|    }
 3982|  50.5k|    return AVIF_RESULT_OK;
 3983|  50.5k|}
read.c:avifParseEditBox:
 4025|   110k|{
 4026|   110k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[edts]");
  ------------------
  |  |  810|   110k|    avifROStream VARNAME;                               \
  |  |  811|   110k|    avifROData VARNAME##_roData;                        \
  |  |  812|   110k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   110k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   110k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 4027|       |
 4028|   110k|    avifBool elstBoxSeen = AVIF_FALSE;
  ------------------
  |  |   89|   110k|#define AVIF_FALSE 0
  ------------------
 4029|   221k|    while (avifROStreamHasBytesLeft(&s, 1)) {
  ------------------
  |  Branch (4029:12): [True: 110k, False: 110k]
  ------------------
 4030|   110k|        avifBoxHeader header;
 4031|   110k|        AVIF_CHECK(avifROStreamReadBoxHeader(&s, &header));
  ------------------
  |  |   36|   110k|    do {                        \
  |  |   37|   110k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 6, False: 110k]
  |  |  ------------------
  |  |   38|      6|            avifBreakOnError(); \
  |  |   39|      6|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      6|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      6|        }                       \
  |  |   41|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
 4032|       |
 4033|   110k|        if (!memcmp(header.type, "elst", 4)) {
  ------------------
  |  Branch (4033:13): [True: 110k, False: 11]
  ------------------
 4034|   110k|            if (elstBoxSeen) {
  ------------------
  |  Branch (4034:17): [True: 0, False: 110k]
  ------------------
 4035|      0|                avifDiagnosticsPrintf(diag, "More than one [elst] Box was found.");
 4036|      0|                return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 4037|      0|            }
 4038|   110k|            AVIF_CHECK(avifParseEditListBox(track, avifROStreamCurrent(&s), header.size, diag));
  ------------------
  |  |   36|   110k|    do {                        \
  |  |   37|   110k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 8, False: 110k]
  |  |  ------------------
  |  |   38|      8|            avifBreakOnError(); \
  |  |   39|      8|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      8|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      8|        }                       \
  |  |   41|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
 4039|   110k|            elstBoxSeen = AVIF_TRUE;
  ------------------
  |  |   88|   110k|#define AVIF_TRUE 1
  ------------------
 4040|   110k|        }
 4041|   110k|        AVIF_CHECK(avifROStreamSkip(&s, header.size));
  ------------------
  |  |   36|   110k|    do {                        \
  |  |   37|   110k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 110k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
 4042|   110k|    }
 4043|   110k|    if (!elstBoxSeen) {
  ------------------
  |  Branch (4043:9): [True: 2, False: 110k]
  ------------------
 4044|      2|        avifDiagnosticsPrintf(diag, "Box[edts] contains no [elst] Box.");
 4045|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
 4046|      2|    }
 4047|   110k|    return AVIF_TRUE;
  ------------------
  |  |   88|   110k|#define AVIF_TRUE 1
  ------------------
 4048|   110k|}
read.c:avifParseEditListBox:
 3986|   110k|{
 3987|   110k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[elst]");
  ------------------
  |  |  810|   110k|    avifROStream VARNAME;                               \
  |  |  811|   110k|    avifROData VARNAME##_roData;                        \
  |  |  812|   110k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|   110k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|   110k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 3988|       |
 3989|   110k|    uint8_t version;
 3990|   110k|    uint32_t flags;
 3991|   110k|    AVIF_CHECK(avifROStreamReadVersionAndFlags(&s, &version, &flags));
  ------------------
  |  |   36|   110k|    do {                        \
  |  |   37|   110k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 110k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
 3992|       |
 3993|   110k|    if ((flags & 1) == 0) {
  ------------------
  |  Branch (3993:9): [True: 6.43k, False: 104k]
  ------------------
 3994|  6.43k|        track->isRepeating = AVIF_FALSE;
  ------------------
  |  |   89|  6.43k|#define AVIF_FALSE 0
  ------------------
 3995|  6.43k|        return AVIF_TRUE;
  ------------------
  |  |   88|  6.43k|#define AVIF_TRUE 1
  ------------------
 3996|  6.43k|    }
 3997|       |
 3998|   104k|    track->isRepeating = AVIF_TRUE;
  ------------------
  |  |   88|   104k|#define AVIF_TRUE 1
  ------------------
 3999|   104k|    uint32_t entryCount;
 4000|   104k|    AVIF_CHECK(avifROStreamReadU32(&s, &entryCount)); // unsigned int(32) entry_count;
  ------------------
  |  |   36|   104k|    do {                        \
  |  |   37|   104k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 104k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   104k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 104k]
  |  |  ------------------
  ------------------
 4001|   104k|    if (entryCount != 1) {
  ------------------
  |  Branch (4001:9): [True: 2, False: 104k]
  ------------------
 4002|      2|        avifDiagnosticsPrintf(diag, "Box[elst] contains an entry_count != 1 [%u]", entryCount);
 4003|      2|        return AVIF_FALSE;
  ------------------
  |  |   89|      2|#define AVIF_FALSE 0
  ------------------
 4004|      2|    }
 4005|       |
 4006|   104k|    if (version == 1) {
  ------------------
  |  Branch (4006:9): [True: 101k, False: 2.50k]
  ------------------
 4007|   101k|        AVIF_CHECK(avifROStreamReadU64(&s, &track->segmentDuration)); // unsigned int(64) segment_duration;
  ------------------
  |  |   36|   101k|    do {                        \
  |  |   37|   101k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 101k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|   101k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 101k]
  |  |  ------------------
  ------------------
 4008|   101k|    } else if (version == 0) {
  ------------------
  |  Branch (4008:16): [True: 2.50k, False: 1]
  ------------------
 4009|  2.50k|        uint32_t segmentDuration;
 4010|  2.50k|        AVIF_CHECK(avifROStreamReadU32(&s, &segmentDuration)); // unsigned int(32) segment_duration;
  ------------------
  |  |   36|  2.50k|    do {                        \
  |  |   37|  2.50k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 2.50k]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|  2.50k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 2.50k]
  |  |  ------------------
  ------------------
 4011|  2.50k|        track->segmentDuration = segmentDuration;
 4012|  2.50k|    } else {
 4013|       |        // Unsupported version
 4014|      1|        avifDiagnosticsPrintf(diag, "Box[elst] has an unsupported version [%u]", version);
 4015|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 4016|      1|    }
 4017|   104k|    if (track->segmentDuration == 0) {
  ------------------
  |  Branch (4017:9): [True: 1, False: 104k]
  ------------------
 4018|      1|        avifDiagnosticsPrintf(diag, "Box[elst] Invalid value for segment_duration (0).");
 4019|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
 4020|      1|    }
 4021|   104k|    return AVIF_TRUE;
  ------------------
  |  |   88|   104k|#define AVIF_TRUE 1
  ------------------
 4022|   104k|}
read.c:avifDecoderItemShouldBeSkipped:
 5394|  2.41M|{
 5395|  2.41M|    return !item->size || item->hasUnsupportedEssentialProperty ||
  ------------------
  |  Branch (5395:12): [True: 459k, False: 1.95M]
  |  Branch (5395:27): [True: 85.7k, False: 1.87M]
  ------------------
 5396|  1.87M|           (avifGetCodecType(item->type) == AVIF_CODEC_TYPE_UNKNOWN && memcmp(item->type, "grid", 4)) ||
  ------------------
  |  Branch (5396:13): [True: 575k, False: 1.29M]
  |  Branch (5396:72): [True: 476k, False: 98.8k]
  ------------------
 5397|  1.39M|           avifHasReference(&item->references, "thmb");
  ------------------
  |  Branch (5397:12): [True: 0, False: 1.39M]
  ------------------
 5398|  2.41M|}
read.c:avifPropertyArrayFind:
  200|  4.03M|{
  201|  17.6M|    for (uint32_t propertyIndex = 0; propertyIndex < properties->count; ++propertyIndex) {
  ------------------
  |  Branch (201:38): [True: 14.9M, False: 2.73M]
  ------------------
  202|  14.9M|        const avifProperty * prop = &properties->prop[propertyIndex];
  203|  14.9M|        if (!memcmp(prop->type, type, 4)) {
  ------------------
  |  Branch (203:13): [True: 1.30M, False: 13.6M]
  ------------------
  204|  1.30M|            return prop;
  205|  1.30M|        }
  206|  14.9M|    }
  207|  2.73M|    return NULL;
  208|  4.03M|}
read.c:isAlphaURN:
 2044|  58.4k|{
 2045|  58.4k|    return !strcmp(urn, AVIF_URN_ALPHA0) || !strcmp(urn, AVIF_URN_ALPHA1);
  ------------------
  |  |   78|  58.4k|#define AVIF_URN_ALPHA0 "urn:mpeg:mpegB:cicp:systems:auxiliary:alpha"
  ------------------
                  return !strcmp(urn, AVIF_URN_ALPHA0) || !strcmp(urn, AVIF_URN_ALPHA1);
  ------------------
  |  |   79|  17.0k|#define AVIF_URN_ALPHA1 "urn:mpeg:hevc:2015:auxid:1"
  ------------------
  |  Branch (2045:12): [True: 41.3k, False: 17.0k]
  |  Branch (2045:45): [True: 0, False: 17.0k]
  ------------------
 2046|  58.4k|}
read.c:avifDecoderDataClearTiles:
 1181|  2.16M|{
 1182|  2.50M|    for (unsigned int i = 0; i < data->tiles.count; ++i) {
  ------------------
  |  Branch (1182:30): [True: 336k, False: 2.16M]
  ------------------
 1183|   336k|        avifTile * tile = &data->tiles.tile[i];
 1184|   336k|        if (tile->input) {
  ------------------
  |  Branch (1184:13): [True: 336k, False: 0]
  ------------------
 1185|   336k|            avifCodecDecodeInputDestroy(tile->input);
 1186|   336k|            tile->input = NULL;
 1187|   336k|        }
 1188|   336k|        if (tile->codec) {
  ------------------
  |  Branch (1188:13): [True: 17.1k, False: 319k]
  ------------------
 1189|       |            // Check if tile->codec was created separately and destroy it in that case.
 1190|  17.1k|            if (tile->codec != data->codec && tile->codec != data->codecAlpha) {
  ------------------
  |  Branch (1190:17): [True: 1.64k, False: 15.5k]
  |  Branch (1190:47): [True: 1.63k, False: 9]
  ------------------
 1191|  1.63k|                avifCodecDestroy(tile->codec);
 1192|  1.63k|            }
 1193|  17.1k|            tile->codec = NULL;
 1194|  17.1k|        }
 1195|   336k|        if (tile->image) {
  ------------------
  |  Branch (1195:13): [True: 336k, False: 0]
  ------------------
 1196|   336k|            avifImageDestroy(tile->image);
 1197|   336k|            tile->image = NULL;
 1198|   336k|        }
 1199|   336k|    }
 1200|  2.16M|    data->tiles.count = 0;
 1201|  19.4M|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (1201:21): [True: 17.3M, False: 2.16M]
  ------------------
 1202|  17.3M|        data->tileInfos[c].tileCount = 0;
 1203|  17.3M|        data->tileInfos[c].decodedTileCount = 0;
 1204|  17.3M|    }
 1205|  2.16M|    if (data->codec) {
  ------------------
  |  Branch (1205:9): [True: 12.5k, False: 2.15M]
  ------------------
 1206|  12.5k|        avifCodecDestroy(data->codec);
 1207|  12.5k|        data->codec = NULL;
 1208|  12.5k|    }
 1209|  2.16M|    if (data->codecAlpha) {
  ------------------
  |  Branch (1209:9): [True: 9, False: 2.16M]
  ------------------
 1210|      9|        avifCodecDestroy(data->codecAlpha);
 1211|       |        data->codecAlpha = NULL;
 1212|      9|    }
 1213|  2.16M|}
read.c:avifSampleTableGetCodecType:
  442|   113k|{
  443|   115k|    for (uint32_t i = 0; i < sampleTable->sampleDescriptions.count; ++i) {
  ------------------
  |  Branch (443:26): [True: 112k, False: 3.35k]
  ------------------
  444|   112k|        const avifCodecType codecType = avifGetCodecType(sampleTable->sampleDescriptions.description[i].format);
  445|   112k|        if (codecType != AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (445:13): [True: 110k, False: 2.06k]
  ------------------
  446|   110k|            return codecType;
  447|   110k|        }
  448|   112k|    }
  449|  3.35k|    return AVIF_CODEC_TYPE_UNKNOWN;
  450|   113k|}
read.c:avifHasReference:
  308|  1.62M|{
  309|  1.79M|    for (uint32_t i = 0; i < references->count; ++i) {
  ------------------
  |  Branch (309:26): [True: 165k, False: 1.62M]
  ------------------
  310|   165k|        if (!memcmp(references->ref[i].type, type, 4)) {
  ------------------
  |  Branch (310:13): [True: 1, False: 165k]
  ------------------
  311|      1|            return AVIF_TRUE;
  ------------------
  |  |   88|      1|#define AVIF_TRUE 1
  ------------------
  312|      1|        }
  313|   165k|    }
  314|  1.62M|    return AVIF_FALSE;
  ------------------
  |  |   89|  1.62M|#define AVIF_FALSE 0
  ------------------
  315|  1.62M|}
read.c:avifSampleTableGetProperties:
  518|   110k|{
  519|   110k|    for (uint32_t i = 0; i < sampleTable->sampleDescriptions.count; ++i) {
  ------------------
  |  Branch (519:26): [True: 110k, False: 0]
  ------------------
  520|   110k|        const avifSampleDescription * description = &sampleTable->sampleDescriptions.description[i];
  521|   110k|        if (avifGetCodecType(description->format) == codecType) {
  ------------------
  |  Branch (521:13): [True: 110k, False: 0]
  ------------------
  522|   110k|            return &description->properties;
  523|   110k|        }
  524|   110k|    }
  525|      0|    return NULL;
  526|   110k|}
read.c:avifDecoderFindMetadata:
 1980|   327k|{
 1981|   327k|    if (decoder->ignoreExif && decoder->ignoreXMP) {
  ------------------
  |  Branch (1981:9): [True: 0, False: 327k]
  |  Branch (1981:32): [True: 0, False: 0]
  ------------------
 1982|       |        // Nothing to do!
 1983|      0|        return AVIF_RESULT_OK;
 1984|      0|    }
 1985|       |
 1986|  1.07M|    for (uint32_t itemIndex = 0; itemIndex < meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (1986:34): [True: 785k, False: 285k]
  ------------------
 1987|   785k|        avifDecoderItem * item = meta->items.item[itemIndex];
 1988|   785k|        if (!item->size) {
  ------------------
  |  Branch (1988:13): [True: 212k, False: 573k]
  ------------------
 1989|   212k|            continue;
 1990|   212k|        }
 1991|   573k|        if (item->hasUnsupportedEssentialProperty) {
  ------------------
  |  Branch (1991:13): [True: 20.8k, False: 552k]
  ------------------
 1992|       |            // An essential property isn't supported by libavif; ignore the item.
 1993|  20.8k|            continue;
 1994|  20.8k|        }
 1995|       |
 1996|   552k|        if ((colorId > 0) && !avifReferences(&item->references, "cdsc", colorId)) {
  ------------------
  |  Branch (1996:13): [True: 458k, False: 94.3k]
  |  Branch (1996:30): [True: 453k, False: 4.95k]
  ------------------
 1997|       |            // Not a content description (metadata) for the colorOBU, skip it
 1998|   453k|            continue;
 1999|   453k|        }
 2000|       |
 2001|  99.3k|        if (!decoder->ignoreExif && !memcmp(item->type, "Exif", 4)) {
  ------------------
  |  Branch (2001:13): [True: 99.3k, False: 0]
  |  Branch (2001:37): [True: 12.0k, False: 87.2k]
  ------------------
 2002|  12.0k|            avifROData exifContents;
 2003|  12.0k|            avifResult readResult = avifDecoderItemRead(item, decoder->io, &exifContents, 0, 0, &decoder->diag);
 2004|  12.0k|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (2004:17): [True: 7.63k, False: 4.45k]
  ------------------
 2005|  7.63k|                return readResult;
 2006|  7.63k|            }
 2007|       |
 2008|       |            // Advance past Annex A.2.1's header
 2009|  4.45k|            BEGIN_STREAM(exifBoxStream, exifContents.data, exifContents.size, &decoder->diag, "Exif header");
  ------------------
  |  |  810|  4.45k|    avifROStream VARNAME;                               \
  |  |  811|  4.45k|    avifROData VARNAME##_roData;                        \
  |  |  812|  4.45k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  4.45k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  4.45k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2010|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 2011|       |            // The MinimizedImageBox does not signal the exifTiffHeaderOffset.
 2012|       |            if (!meta->fromMiniBox)
 2013|       |#endif
 2014|  4.45k|            {
 2015|  4.45k|                uint32_t exifTiffHeaderOffset;
 2016|  4.45k|                AVIF_CHECKERR(avifROStreamReadU32(&exifBoxStream, &exifTiffHeaderOffset),
  ------------------
  |  |   45|  4.45k|    do {                        \
  |  |   46|  4.45k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 4.45k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  4.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 4.45k]
  |  |  ------------------
  ------------------
 2017|  4.45k|                              AVIF_RESULT_INVALID_EXIF_PAYLOAD); // unsigned int(32) exif_tiff_header_offset;
 2018|  4.45k|                size_t expectedExifTiffHeaderOffset;
 2019|  4.45k|                AVIF_CHECKRES(avifGetExifTiffHeaderOffset(avifROStreamCurrent(&exifBoxStream),
  ------------------
  |  |   54|  4.45k|    do {                                  \
  |  |   55|  4.45k|        const avifResult result__ = (A);  \
  |  |   56|  4.45k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 6, False: 4.44k]
  |  |  ------------------
  |  |   57|      6|            avifBreakOnError();           \
  |  |   58|      6|            return result__;              \
  |  |   59|      6|        }                                 \
  |  |   60|  4.45k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 4.44k]
  |  |  ------------------
  ------------------
 2020|  4.45k|                                                          avifROStreamRemainingBytes(&exifBoxStream),
 2021|  4.45k|                                                          &expectedExifTiffHeaderOffset));
 2022|  4.44k|                AVIF_CHECKERR(exifTiffHeaderOffset == expectedExifTiffHeaderOffset, AVIF_RESULT_INVALID_EXIF_PAYLOAD);
  ------------------
  |  |   45|  4.44k|    do {                        \
  |  |   46|  4.44k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 4, False: 4.44k]
  |  |  ------------------
  |  |   47|      4|            avifBreakOnError(); \
  |  |   48|      4|            return ERR;         \
  |  |   49|      4|        }                       \
  |  |   50|  4.44k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 4.44k]
  |  |  ------------------
  ------------------
 2023|  4.44k|            }
 2024|       |
 2025|  4.44k|            AVIF_CHECKRES(avifRWDataSet(&image->exif, avifROStreamCurrent(&exifBoxStream), avifROStreamRemainingBytes(&exifBoxStream)));
  ------------------
  |  |   54|  4.44k|    do {                                  \
  |  |   55|  4.44k|        const avifResult result__ = (A);  \
  |  |   56|  4.44k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 4.44k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  4.44k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 4.44k]
  |  |  ------------------
  ------------------
 2026|  87.2k|        } else if (!decoder->ignoreXMP && !memcmp(item->type, "mime", 4) &&
  ------------------
  |  Branch (2026:20): [True: 87.2k, False: 0]
  |  Branch (2026:43): [True: 45.5k, False: 41.7k]
  ------------------
 2027|  45.5k|                   !strcmp(item->contentType.contentType, AVIF_CONTENT_TYPE_XMP)) {
  ------------------
  |  |   81|  45.5k|#define AVIF_CONTENT_TYPE_XMP "application/rdf+xml"
  ------------------
  |  Branch (2027:20): [True: 36.2k, False: 9.30k]
  ------------------
 2028|  36.2k|            avifROData xmpContents;
 2029|  36.2k|            avifResult readResult = avifDecoderItemRead(item, decoder->io, &xmpContents, 0, 0, &decoder->diag);
 2030|  36.2k|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (2030:17): [True: 34.5k, False: 1.62k]
  ------------------
 2031|  34.5k|                return readResult;
 2032|  34.5k|            }
 2033|       |
 2034|  1.62k|            AVIF_CHECKRES(avifImageSetMetadataXMP(image, xmpContents.data, xmpContents.size));
  ------------------
  |  |   54|  1.62k|    do {                                  \
  |  |   55|  1.62k|        const avifResult result__ = (A);  \
  |  |   56|  1.62k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.62k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.62k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.62k]
  |  |  ------------------
  ------------------
 2035|  1.62k|        }
 2036|  99.3k|    }
 2037|   285k|    return AVIF_RESULT_OK;
 2038|   327k|}
read.c:avifReferences:
  296|  1.15M|{
  297|  1.27M|    for (uint32_t i = 0; i < references->count; ++i) {
  ------------------
  |  Branch (297:26): [True: 186k, False: 1.09M]
  ------------------
  298|   186k|        const avifItemReference * reference = &references->ref[i];
  299|   186k|        if (!memcmp(reference->type, type, 4) && reference->toID == toID) {
  ------------------
  |  Branch (299:13): [True: 108k, False: 77.6k]
  |  Branch (299:50): [True: 68.6k, False: 39.7k]
  ------------------
  300|  68.6k|            return AVIF_TRUE;
  ------------------
  |  |   88|  68.6k|#define AVIF_TRUE 1
  ------------------
  301|  68.6k|        }
  302|   186k|    }
  303|  1.09M|    return AVIF_FALSE;
  ------------------
  |  |   89|  1.09M|#define AVIF_FALSE 0
  ------------------
  304|  1.15M|}
read.c:avifDecoderDataCreateTile:
 1131|   336k|{
 1132|   336k|    avifTile * tile = (avifTile *)avifArrayPush(&data->tiles);
 1133|   336k|    if (tile == NULL) {
  ------------------
  |  Branch (1133:9): [True: 0, False: 336k]
  ------------------
 1134|      0|        return NULL;
 1135|      0|    }
 1136|   336k|    tile->codecType = codecType;
 1137|   336k|    tile->image = avifImageCreateEmpty();
 1138|   336k|    if (!tile->image) {
  ------------------
  |  Branch (1138:9): [True: 0, False: 336k]
  ------------------
 1139|      0|        goto error;
 1140|      0|    }
 1141|   336k|    tile->input = avifCodecDecodeInputCreate();
 1142|   336k|    if (!tile->input) {
  ------------------
  |  Branch (1142:9): [True: 0, False: 336k]
  ------------------
 1143|      0|        goto error;
 1144|      0|    }
 1145|   336k|    tile->width = width;
 1146|   336k|    tile->height = height;
 1147|   336k|    tile->operatingPoint = operatingPoint;
 1148|   336k|    return tile;
 1149|       |
 1150|      0|error:
 1151|      0|    if (tile->input) {
  ------------------
  |  Branch (1151:9): [True: 0, False: 0]
  ------------------
 1152|      0|        avifCodecDecodeInputDestroy(tile->input);
 1153|      0|    }
 1154|      0|    if (tile->image) {
  ------------------
  |  Branch (1154:9): [True: 0, False: 0]
  ------------------
 1155|      0|        avifImageDestroy(tile->image);
 1156|      0|    }
 1157|      0|    avifArrayPop(&data->tiles);
 1158|       |    return NULL;
 1159|   336k|}
read.c:avifCodecDecodeInputFillFromSampleTable:
  598|  33.7k|{
  599|  33.7k|    if (imageCountLimit) {
  ------------------
  |  Branch (599:9): [True: 33.7k, False: 0]
  ------------------
  600|       |        // Verify that the we're not about to exceed the frame count limit.
  601|       |
  602|  33.7k|        uint32_t imageCountLeft = imageCountLimit;
  603|  68.0k|        for (uint32_t chunkIndex = 0; chunkIndex < sampleTable->chunks.count; ++chunkIndex) {
  ------------------
  |  Branch (603:39): [True: 34.3k, False: 33.7k]
  ------------------
  604|       |            // First, figure out how many samples are in this chunk
  605|  34.3k|            uint32_t sampleCount = avifGetSampleCountOfChunk(&sampleTable->sampleToChunks, chunkIndex);
  606|  34.3k|            if (sampleCount == 0) {
  ------------------
  |  Branch (606:17): [True: 6, False: 34.3k]
  ------------------
  607|       |                // chunks with 0 samples are invalid
  608|      6|                avifDiagnosticsPrintf(diag, "Sample table contains a chunk with 0 samples");
  609|      6|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  610|      6|            }
  611|       |
  612|  34.3k|            if (sampleCount > imageCountLeft) {
  ------------------
  |  Branch (612:17): [True: 21, False: 34.2k]
  ------------------
  613|       |                // This file exceeds the imageCountLimit, bail out
  614|     21|                avifDiagnosticsPrintf(diag, "Exceeded avifDecoder's imageCountLimit");
  615|     21|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  616|     21|            }
  617|  34.2k|            imageCountLeft -= sampleCount;
  618|  34.2k|        }
  619|  33.7k|    }
  620|       |
  621|  33.7k|    uint32_t sampleSizeIndex = 0;
  622|  67.8k|    for (uint32_t chunkIndex = 0; chunkIndex < sampleTable->chunks.count; ++chunkIndex) {
  ------------------
  |  Branch (622:35): [True: 34.2k, False: 33.6k]
  ------------------
  623|  34.2k|        avifSampleTableChunk * chunk = &sampleTable->chunks.chunk[chunkIndex];
  624|       |
  625|       |        // First, figure out how many samples are in this chunk
  626|  34.2k|        uint32_t sampleCount = avifGetSampleCountOfChunk(&sampleTable->sampleToChunks, chunkIndex);
  627|  34.2k|        if (sampleCount == 0) {
  ------------------
  |  Branch (627:13): [True: 0, False: 34.2k]
  ------------------
  628|       |            // chunks with 0 samples are invalid
  629|      0|            avifDiagnosticsPrintf(diag, "Sample table contains a chunk with 0 samples");
  630|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
  631|      0|        }
  632|       |
  633|  34.2k|        uint64_t sampleOffset = chunk->offset;
  634|   118k|        for (uint32_t sampleIndex = 0; sampleIndex < sampleCount; ++sampleIndex) {
  ------------------
  |  Branch (634:40): [True: 84.5k, False: 34.1k]
  ------------------
  635|  84.5k|            uint32_t sampleSize = sampleTable->allSamplesSize;
  636|  84.5k|            if (sampleSize == 0) {
  ------------------
  |  Branch (636:17): [True: 60.6k, False: 23.8k]
  ------------------
  637|  60.6k|                if (sampleSizeIndex >= sampleTable->sampleSizes.count) {
  ------------------
  |  Branch (637:21): [True: 6, False: 60.6k]
  ------------------
  638|       |                    // We've run out of samples to sum
  639|      6|                    avifDiagnosticsPrintf(diag, "Truncated sample table");
  640|      6|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
  641|      6|                }
  642|  60.6k|                avifSampleTableSampleSize * sampleSizePtr = &sampleTable->sampleSizes.sampleSize[sampleSizeIndex];
  643|  60.6k|                sampleSize = sampleSizePtr->size;
  644|  60.6k|            }
  645|       |
  646|  84.5k|            avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  647|  84.5k|            AVIF_CHECKERR(sample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  84.5k|    do {                        \
  |  |   46|  84.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 84.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  84.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 84.5k]
  |  |  ------------------
  ------------------
  648|  84.5k|            sample->offset = sampleOffset;
  649|  84.5k|            sample->size = sampleSize;
  650|  84.5k|            sample->spatialID = AVIF_SPATIAL_ID_UNSET; // Not filtering by spatial_id
  ------------------
  |  |  468|  84.5k|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  651|  84.5k|            sample->sync = AVIF_FALSE;                 // to potentially be set to true following the outer loop
  ------------------
  |  |   89|  84.5k|#define AVIF_FALSE 0
  ------------------
  652|       |
  653|  84.5k|            if (sampleSize > UINT64_MAX - sampleOffset) {
  ------------------
  |  Branch (653:17): [True: 0, False: 84.5k]
  ------------------
  654|      0|                avifDiagnosticsPrintf(diag,
  655|      0|                                      "Sample table contains an offset/size pair which overflows: [%" PRIu64 " / %u]",
  656|      0|                                      sampleOffset,
  657|      0|                                      sampleSize);
  658|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  659|      0|            }
  660|  84.5k|            if (sizeHint && ((sampleOffset + sampleSize) > sizeHint)) {
  ------------------
  |  Branch (660:17): [True: 11.3k, False: 73.2k]
  |  Branch (660:29): [True: 107, False: 11.1k]
  ------------------
  661|    107|                avifDiagnosticsPrintf(diag, "Exceeded avifIO's sizeHint, possibly truncated data");
  662|    107|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  663|    107|            }
  664|       |
  665|  84.4k|            sampleOffset += sampleSize;
  666|  84.4k|            ++sampleSizeIndex;
  667|  84.4k|        }
  668|  34.2k|    }
  669|       |
  670|       |    // Mark appropriate samples as sync
  671|  55.6k|    for (uint32_t syncSampleIndex = 0; syncSampleIndex < sampleTable->syncSamples.count; ++syncSampleIndex) {
  ------------------
  |  Branch (671:40): [True: 22.0k, False: 33.6k]
  ------------------
  672|  22.0k|        uint32_t frameIndex = sampleTable->syncSamples.syncSample[syncSampleIndex].sampleNumber - 1; // sampleNumber is 1-based
  673|  22.0k|        if (frameIndex < decodeInput->samples.count) {
  ------------------
  |  Branch (673:13): [True: 6.48k, False: 15.5k]
  ------------------
  674|  6.48k|            decodeInput->samples.sample[frameIndex].sync = AVIF_TRUE;
  ------------------
  |  |   88|  6.48k|#define AVIF_TRUE 1
  ------------------
  675|  6.48k|        }
  676|  22.0k|    }
  677|       |
  678|       |    // Assume frame 0 is sync, just in case the stss box is absent in the BMFF. (Unnecessary?)
  679|  33.6k|    if (decodeInput->samples.count > 0) {
  ------------------
  |  Branch (679:9): [True: 33.6k, False: 0]
  ------------------
  680|  33.6k|        decodeInput->samples.sample[0].sync = AVIF_TRUE;
  ------------------
  |  |   88|  33.6k|#define AVIF_TRUE 1
  ------------------
  681|  33.6k|    }
  682|  33.6k|    return AVIF_RESULT_OK;
  683|  33.7k|}
read.c:avifGetSampleCountOfChunk:
  581|  68.6k|{
  582|  68.6k|    uint32_t sampleCount = 0;
  583|  68.6k|    for (int sampleToChunkIndex = sampleToChunks->count - 1; sampleToChunkIndex >= 0; --sampleToChunkIndex) {
  ------------------
  |  Branch (583:62): [True: 68.6k, False: 11]
  ------------------
  584|  68.6k|        const avifSampleTableSampleToChunk * sampleToChunk = &sampleToChunks->sampleToChunk[sampleToChunkIndex];
  585|  68.6k|        if (sampleToChunk->firstChunk <= (chunkIndex + 1)) {
  ------------------
  |  Branch (585:13): [True: 68.6k, False: 0]
  ------------------
  586|  68.6k|            sampleCount = sampleToChunk->samplesPerChunk;
  587|  68.6k|            break;
  588|  68.6k|        }
  589|  68.6k|    }
  590|  68.6k|    return sampleCount;
  591|  68.6k|}
read.c:avifMetaFindColorItem:
 5578|   298k|{
 5579|   317k|    for (uint32_t itemIndex = 0; itemIndex < meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5579:34): [True: 317k, False: 101]
  ------------------
 5580|   317k|        avifDecoderItem * item = meta->items.item[itemIndex];
 5581|   317k|        if (avifDecoderItemShouldBeSkipped(item)) {
  ------------------
  |  Branch (5581:13): [True: 16.0k, False: 301k]
  ------------------
 5582|  16.0k|            continue;
 5583|  16.0k|        }
 5584|   301k|        if (item->id == meta->primaryItemID) {
  ------------------
  |  Branch (5584:13): [True: 298k, False: 3.18k]
  ------------------
 5585|   298k|            return item;
 5586|   298k|        }
 5587|   301k|    }
 5588|    101|    return NULL;
 5589|   298k|}
read.c:avifDecoderItemReadAndParse:
 2537|   331k|{
 2538|   331k|    if (!memcmp(item->type, "grid", 4)) {
  ------------------
  |  Branch (2538:9): [True: 21.3k, False: 309k]
  ------------------
 2539|  21.3k|        if (isItemInInput) {
  ------------------
  |  Branch (2539:13): [True: 16.9k, False: 4.33k]
  ------------------
 2540|  16.9k|            avifROData readData;
 2541|  16.9k|            AVIF_CHECKRES(avifDecoderItemRead(item, decoder->io, &readData, 0, 0, decoder->data->diag));
  ------------------
  |  |   54|  16.9k|    do {                                  \
  |  |   55|  16.9k|        const avifResult result__ = (A);  \
  |  |   56|  16.9k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 336, False: 16.6k]
  |  |  ------------------
  |  |   57|    336|            avifBreakOnError();           \
  |  |   58|    336|            return result__;              \
  |  |   59|    336|        }                                 \
  |  |   60|  16.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2542|  16.6k|            AVIF_CHECKRES(avifParseImageGridBox(grid,
  ------------------
  |  |   54|  16.6k|    do {                                  \
  |  |   55|  16.6k|        const avifResult result__ = (A);  \
  |  |   56|  16.6k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 30, False: 16.6k]
  |  |  ------------------
  |  |   57|     30|            avifBreakOnError();           \
  |  |   58|     30|            return result__;              \
  |  |   59|     30|        }                                 \
  |  |   60|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2543|  16.6k|                                                readData.data,
 2544|  16.6k|                                                readData.size,
 2545|  16.6k|                                                decoder->imageSizeLimit,
 2546|  16.6k|                                                decoder->imageDimensionLimit,
 2547|  16.6k|                                                decoder->data->diag));
 2548|       |            // Validate that there are exactly the same number of dimg items to form the grid.
 2549|  16.6k|            uint32_t dimgItemCount = 0;
 2550|   121k|            for (uint32_t i = 0; i < item->meta->items.count; ++i) {
  ------------------
  |  Branch (2550:34): [True: 105k, False: 16.6k]
  ------------------
 2551|   105k|                if (avifIsDimgInput(item, item->meta->items.item[i]->id, NULL)) {
  ------------------
  |  Branch (2551:21): [True: 36.3k, False: 68.8k]
  ------------------
 2552|  36.3k|                    ++dimgItemCount;
 2553|  36.3k|                }
 2554|   105k|            }
 2555|  16.6k|            AVIF_CHECKERR(dimgItemCount == grid->rows * grid->columns, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  16.6k|    do {                        \
  |  |   46|  16.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 3, False: 16.6k]
  |  |  ------------------
  |  |   47|      3|            avifBreakOnError(); \
  |  |   48|      3|            return ERR;         \
  |  |   49|      3|        }                       \
  |  |   50|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2556|  16.6k|        } else {
 2557|       |            // item was generated for convenience and is not part of the bitstream.
 2558|       |            // grid information should already be set.
 2559|  4.33k|            AVIF_ASSERT_OR_RETURN(grid->rows > 0 && grid->columns > 0);
  ------------------
  |  |   64|  4.33k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  4.33k|    do {                        \
  |  |  |  |   46|  8.67k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 4.33k, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 4.33k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  4.33k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 4.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2560|  4.33k|        }
 2561|  20.9k|        *codecType = avifDecoderItemGetGridCodecType(item);
 2562|  20.9k|        AVIF_CHECKERR(*codecType != AVIF_CODEC_TYPE_UNKNOWN, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  20.9k|    do {                        \
  |  |   46|  20.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 9, False: 20.9k]
  |  |  ------------------
  |  |   47|      9|            avifBreakOnError(); \
  |  |   48|      9|            return ERR;         \
  |  |   49|      9|        }                       \
  |  |   50|  20.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 20.9k]
  |  |  ------------------
  ------------------
 2563|   309k|    } else {
 2564|   309k|        *codecType = avifGetCodecType(item->type);
 2565|   309k|        AVIF_ASSERT_OR_RETURN(*codecType != AVIF_CODEC_TYPE_UNKNOWN);
  ------------------
  |  |   64|   309k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   309k|    do {                        \
  |  |  |  |   46|   309k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 309k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   309k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 309k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2566|   309k|    }
 2567|   330k|    return AVIF_RESULT_OK;
 2568|   331k|}
read.c:avifParseImageGridBox:
 2212|  16.6k|{
 2213|  16.6k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[grid]");
  ------------------
  |  |  810|  16.6k|    avifROStream VARNAME;                               \
  |  |  811|  16.6k|    avifROData VARNAME##_roData;                        \
  |  |  812|  16.6k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  16.6k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  16.6k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2214|       |
 2215|  16.6k|    uint8_t version, flags;
 2216|  16.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &version, 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) version = 0;
  ------------------
  |  |   45|  16.6k|    do {                        \
  |  |   46|  16.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 16.6k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2217|  16.6k|    if (version != 0) {
  ------------------
  |  Branch (2217:9): [True: 5, False: 16.6k]
  ------------------
 2218|      5|        avifDiagnosticsPrintf(diag, "Box[grid] has unsupported version [%u]", version);
 2219|      5|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2220|      5|    }
 2221|  16.6k|    uint8_t rowsMinusOne, columnsMinusOne;
 2222|  16.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &flags, 1), AVIF_RESULT_BMFF_PARSE_FAILED);           // unsigned int(8) flags;
  ------------------
  |  |   45|  16.6k|    do {                        \
  |  |   46|  16.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 16.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2223|  16.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &rowsMinusOne, 1), AVIF_RESULT_BMFF_PARSE_FAILED);    // unsigned int(8) rows_minus_one;
  ------------------
  |  |   45|  16.6k|    do {                        \
  |  |   46|  16.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 16.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2224|  16.6k|    AVIF_CHECKERR(avifROStreamRead(&s, &columnsMinusOne, 1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) columns_minus_one;
  ------------------
  |  |   45|  16.6k|    do {                        \
  |  |   46|  16.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 16.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2225|  16.6k|    grid->rows = (uint32_t)rowsMinusOne + 1;
 2226|  16.6k|    grid->columns = (uint32_t)columnsMinusOne + 1;
 2227|       |
 2228|  16.6k|    uint32_t fieldLength = ((flags & 1) + 1) * 16;
 2229|  16.6k|    if (fieldLength == 16) {
  ------------------
  |  Branch (2229:9): [True: 16.6k, False: 10]
  ------------------
 2230|  16.6k|        uint16_t outputWidth16, outputHeight16;
 2231|  16.6k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &outputWidth16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_width;
  ------------------
  |  |   45|  16.6k|    do {                        \
  |  |   46|  16.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 16.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2232|  16.6k|        AVIF_CHECKERR(avifROStreamReadU16(&s, &outputHeight16), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_height;
  ------------------
  |  |   45|  16.6k|    do {                        \
  |  |   46|  16.6k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 16.6k]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|  16.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.6k]
  |  |  ------------------
  ------------------
 2233|  16.6k|        grid->outputWidth = outputWidth16;
 2234|  16.6k|        grid->outputHeight = outputHeight16;
 2235|  16.6k|    } else {
 2236|     10|        if (fieldLength != 32) {
  ------------------
  |  Branch (2236:13): [True: 0, False: 10]
  ------------------
 2237|       |            // This should be impossible
 2238|      0|            avifDiagnosticsPrintf(diag, "Grid box contains illegal field length: [%u]", fieldLength);
 2239|      0|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 2240|      0|        }
 2241|     10|        AVIF_CHECKERR(avifROStreamReadU32(&s, &grid->outputWidth), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_width;
  ------------------
  |  |   45|     10|    do {                        \
  |  |   46|     10|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 9]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 9]
  |  |  ------------------
  ------------------
 2242|      9|        AVIF_CHECKERR(avifROStreamReadU32(&s, &grid->outputHeight), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(FieldLength) output_height;
  ------------------
  |  |   45|      9|    do {                        \
  |  |   46|      9|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 7]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 7]
  |  |  ------------------
  ------------------
 2243|      9|    }
 2244|  16.6k|    if ((grid->outputWidth == 0) || (grid->outputHeight == 0)) {
  ------------------
  |  Branch (2244:9): [True: 1, False: 16.6k]
  |  Branch (2244:37): [True: 1, False: 16.6k]
  ------------------
 2245|      2|        avifDiagnosticsPrintf(diag, "Grid box contains illegal dimensions: [%u x %u]", grid->outputWidth, grid->outputHeight);
 2246|      2|        return AVIF_RESULT_INVALID_IMAGE_GRID;
 2247|      2|    }
 2248|  16.6k|    if (avifDimensionsTooLarge(grid->outputWidth, grid->outputHeight, imageSizeLimit, imageDimensionLimit)) {
  ------------------
  |  Branch (2248:9): [True: 14, False: 16.6k]
  ------------------
 2249|     14|        avifDiagnosticsPrintf(diag, "Grid box dimensions are too large: [%u x %u]", grid->outputWidth, grid->outputHeight);
 2250|     14|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2251|     14|    }
 2252|  16.6k|    if (avifROStreamRemainingBytes(&s) != 0) {
  ------------------
  |  Branch (2252:9): [True: 1, False: 16.6k]
  ------------------
 2253|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2254|      1|    }
 2255|  16.6k|    return AVIF_RESULT_OK;
 2256|  16.6k|}
read.c:avifDecoderItemGetGridCodecType:
 1664|  20.9k|{
 1665|  52.4k|    for (uint32_t i = 0; i < gridItem->meta->items.count; ++i) {
  ------------------
  |  Branch (1665:26): [True: 52.3k, False: 9]
  ------------------
 1666|  52.3k|        avifDecoderItem * item = gridItem->meta->items.item[i];
 1667|  52.3k|        const avifCodecType tileCodecType = avifGetCodecType(item->type);
 1668|  52.3k|        if (avifIsDimgInput(gridItem, item->id, NULL) && (tileCodecType != AVIF_CODEC_TYPE_UNKNOWN)) {
  ------------------
  |  Branch (1668:13): [True: 21.0k, False: 31.3k]
  |  Branch (1668:58): [True: 20.9k, False: 58]
  ------------------
 1669|  20.9k|            return tileCodecType;
 1670|  20.9k|        }
 1671|  52.3k|    }
 1672|      9|    return AVIF_CODEC_TYPE_UNKNOWN;
 1673|  20.9k|}
read.c:avifMetaFindAlphaItem:
 5613|   297k|{
 5614|  1.17M|    for (uint32_t itemIndex = 0; itemIndex < meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5614:34): [True: 901k, False: 269k]
  ------------------
 5615|   901k|        avifDecoderItem * item = meta->items.item[itemIndex];
 5616|   901k|        if (avifDecoderItemShouldBeSkipped(item)) {
  ------------------
  |  Branch (5616:13): [True: 410k, False: 490k]
  ------------------
 5617|   410k|            continue;
 5618|   410k|        }
 5619|   490k|        if (avifDecoderItemIsAlphaAux(item, colorItem->id)) {
  ------------------
  |  Branch (5619:13): [True: 28.2k, False: 462k]
  ------------------
 5620|  28.2k|            *alphaItem = item;
 5621|  28.2k|            *isAlphaItemInInput = AVIF_TRUE;
  ------------------
  |  |   88|  28.2k|#define AVIF_TRUE 1
  ------------------
 5622|  28.2k|            return AVIF_RESULT_OK;
 5623|  28.2k|        }
 5624|   490k|    }
 5625|   269k|    if (memcmp(colorItem->type, "grid", 4)) {
  ------------------
  |  Branch (5625:9): [True: 253k, False: 16.3k]
  ------------------
 5626|   253k|        *alphaItem = NULL;
 5627|   253k|        *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|   253k|#define AVIF_FALSE 0
  ------------------
 5628|   253k|        return AVIF_RESULT_OK;
 5629|   253k|    }
 5630|       |    // 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.
 5631|  16.3k|    const uint32_t tileCount = colorInfo->grid.rows * colorInfo->grid.columns;
 5632|  16.3k|    if (tileCount == 0) {
  ------------------
  |  Branch (5632:9): [True: 0, False: 16.3k]
  ------------------
 5633|      0|        *alphaItem = NULL;
 5634|      0|        *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5635|      0|        return AVIF_RESULT_OK;
 5636|      0|    }
 5637|       |    // Keep the same 'dimg' order as it defines where each tile is located in the reconstructed image.
 5638|  16.3k|    uint32_t * dimgIdxToAlphaItemIdx = (uint32_t *)avifAlloc(tileCount * sizeof(uint32_t));
 5639|  16.3k|    AVIF_CHECKERR(dimgIdxToAlphaItemIdx != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  16.3k|    do {                        \
  |  |   46|  16.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 16.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  16.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 16.3k]
  |  |  ------------------
  ------------------
 5640|  16.3k|    const uint32_t itemIndexNotSet = UINT32_MAX;
 5641|  50.4k|    for (uint32_t dimgIdx = 0; dimgIdx < tileCount; ++dimgIdx) {
  ------------------
  |  Branch (5641:32): [True: 34.0k, False: 16.3k]
  ------------------
 5642|  34.0k|        dimgIdxToAlphaItemIdx[dimgIdx] = itemIndexNotSet;
 5643|  34.0k|    }
 5644|  16.3k|    uint32_t alphaItemCount = 0;
 5645|  54.4k|    for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (5645:26): [True: 50.1k, False: 4.33k]
  ------------------
 5646|  50.1k|        const avifDecoderItem * const item = meta->items.item[i];
 5647|  50.1k|        uint32_t colorTileIdx;
 5648|  50.1k|        if (avifIsDimgInput(colorItem, item->id, &colorTileIdx)) {
  ------------------
  |  Branch (5648:13): [True: 24.8k, False: 25.2k]
  ------------------
 5649|  24.8k|            avifBool seenAlphaForCurrentItem = AVIF_FALSE;
  ------------------
  |  |   89|  24.8k|#define AVIF_FALSE 0
  ------------------
 5650|   173k|            for (uint32_t j = 0; j < meta->items.count; ++j) {
  ------------------
  |  Branch (5650:34): [True: 148k, False: 24.8k]
  ------------------
 5651|   148k|                avifDecoderItem * auxlItem = meta->items.item[j];
 5652|   148k|                if (avifDecoderItemIsAlphaAux(auxlItem, item->id)) {
  ------------------
  |  Branch (5652:21): [True: 12.8k, False: 135k]
  ------------------
 5653|  12.8k|                    if (seenAlphaForCurrentItem || colorTileIdx >= tileCount || dimgIdxToAlphaItemIdx[colorTileIdx] != itemIndexNotSet) {
  ------------------
  |  Branch (5653:25): [True: 1, False: 12.8k]
  |  Branch (5653:52): [True: 0, False: 12.8k]
  |  Branch (5653:81): [True: 0, False: 12.8k]
  ------------------
 5654|       |                        // One of the following invalid cases:
 5655|       |                        // * Multiple items are claiming to be the alpha auxiliary of the current item.
 5656|       |                        // * There are too many items in the dimg array (also checked later in avifFillDimgIdxToItemIdxArray()).
 5657|       |                        // * There is a repetition in the dimg array (also checked later in avifFillDimgIdxToItemIdxArray()).
 5658|      1|                        avifFree(dimgIdxToAlphaItemIdx);
 5659|      1|                        return AVIF_RESULT_INVALID_IMAGE_GRID;
 5660|      1|                    }
 5661|  12.8k|                    dimgIdxToAlphaItemIdx[colorTileIdx] = j;
 5662|  12.8k|                    ++alphaItemCount;
 5663|  12.8k|                    seenAlphaForCurrentItem = AVIF_TRUE;
  ------------------
  |  |   88|  12.8k|#define AVIF_TRUE 1
  ------------------
 5664|  12.8k|                }
 5665|   148k|            }
 5666|  24.8k|            if (!seenAlphaForCurrentItem) {
  ------------------
  |  Branch (5666:17): [True: 12.0k, False: 12.8k]
  ------------------
 5667|       |                // No alpha auxiliary item was found for the current item. Treat this as an image without alpha.
 5668|  12.0k|                avifFree(dimgIdxToAlphaItemIdx);
 5669|  12.0k|                *alphaItem = NULL;
 5670|  12.0k|                *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|  12.0k|#define AVIF_FALSE 0
  ------------------
 5671|  12.0k|                return AVIF_RESULT_OK;
 5672|  12.0k|            }
 5673|  24.8k|        }
 5674|  50.1k|    }
 5675|  4.33k|    if (alphaItemCount != tileCount) {
  ------------------
  |  Branch (5675:9): [True: 0, False: 4.33k]
  ------------------
 5676|      0|        avifFree(dimgIdxToAlphaItemIdx);
 5677|      0|        return AVIF_RESULT_INVALID_IMAGE_GRID;
 5678|      0|    }
 5679|       |    // Find an unused ID.
 5680|  4.33k|    avifResult result;
 5681|  4.33k|    if (meta->items.count >= UINT32_MAX - 1) {
  ------------------
  |  Branch (5681:9): [True: 0, False: 4.33k]
  ------------------
 5682|       |        // In the improbable case where all IDs are used.
 5683|      0|        result = AVIF_RESULT_DECODE_ALPHA_FAILED;
 5684|  4.33k|    } else {
 5685|  4.33k|        uint32_t newItemID = 0;
 5686|  4.33k|        avifBool isUsed;
 5687|  17.3k|        do {
 5688|  17.3k|            ++newItemID;
 5689|  17.3k|            isUsed = AVIF_FALSE;
  ------------------
  |  |   89|  17.3k|#define AVIF_FALSE 0
  ------------------
 5690|  52.2k|            for (uint32_t i = 0; i < meta->items.count; ++i) {
  ------------------
  |  Branch (5690:34): [True: 47.8k, False: 4.33k]
  ------------------
 5691|  47.8k|                if (meta->items.item[i]->id == newItemID) {
  ------------------
  |  Branch (5691:21): [True: 13.0k, False: 34.8k]
  ------------------
 5692|  13.0k|                    isUsed = AVIF_TRUE;
  ------------------
  |  |   88|  13.0k|#define AVIF_TRUE 1
  ------------------
 5693|  13.0k|                    break;
 5694|  13.0k|                }
 5695|  47.8k|            }
 5696|  17.3k|        } while (isUsed && newItemID != 0);
  ------------------
  |  Branch (5696:18): [True: 13.0k, False: 4.33k]
  |  Branch (5696:28): [True: 13.0k, False: 0]
  ------------------
 5697|  4.33k|        result = avifMetaFindOrCreateItem(meta, newItemID, alphaItem); // Create new empty item.
 5698|  4.33k|    }
 5699|  4.33k|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5699:9): [True: 0, False: 4.33k]
  ------------------
 5700|      0|        avifFree(dimgIdxToAlphaItemIdx);
 5701|      0|        return result;
 5702|      0|    }
 5703|  4.33k|    memcpy((*alphaItem)->type, "grid", 4); // Make it a grid and register alpha items as its tiles.
 5704|  4.33k|    (*alphaItem)->width = colorItem->width;
 5705|  4.33k|    (*alphaItem)->height = colorItem->height;
 5706|  13.0k|    for (uint32_t dimgIdx = 0; dimgIdx < tileCount; ++dimgIdx) {
  ------------------
  |  Branch (5706:32): [True: 8.67k, False: 4.33k]
  ------------------
 5707|  8.67k|        if (dimgIdxToAlphaItemIdx[dimgIdx] >= meta->items.count) {
  ------------------
  |  Branch (5707:13): [True: 0, False: 8.67k]
  ------------------
 5708|      0|            avifFree(dimgIdxToAlphaItemIdx);
 5709|      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]
  |  |  ------------------
  ------------------
 5710|      0|        }
 5711|  8.67k|        avifDecoderItem * alphaTileItem = meta->items.item[dimgIdxToAlphaItemIdx[dimgIdx]];
 5712|       |        // The alpha grid is synthesized here rather than read from a file, so one item
 5713|       |        // may stand in for several cells: an auxiliary item can be the alpha of more
 5714|       |        // than one color tile.
 5715|  8.67k|        const avifResult addResult = avifAddDimgInput(*alphaItem, alphaTileItem);
 5716|  8.67k|        if (addResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5716:13): [True: 0, False: 8.67k]
  ------------------
 5717|      0|            avifFree(dimgIdxToAlphaItemIdx);
 5718|      0|            return addResult;
 5719|      0|        }
 5720|  8.67k|    }
 5721|  4.33k|    avifFree(dimgIdxToAlphaItemIdx);
 5722|  4.33k|    *isAlphaItemInInput = AVIF_FALSE;
  ------------------
  |  |   89|  4.33k|#define AVIF_FALSE 0
  ------------------
 5723|  4.33k|    alphaInfo->grid = colorInfo->grid;
 5724|  4.33k|    return AVIF_RESULT_OK;
 5725|  4.33k|}
read.c:avifDecoderItemIsAlphaAux:
 5594|   639k|{
 5595|   639k|    if (!avifReferences(&item->references, "auxl", colorItemId))
  ------------------
  |  Branch (5595:9): [True: 575k, False: 63.7k]
  ------------------
 5596|   575k|        return AVIF_FALSE;
  ------------------
  |  |   89|   575k|#define AVIF_FALSE 0
  ------------------
 5597|  63.7k|    const avifProperty * auxCProp = avifPropertyArrayFind(&item->properties, "auxC");
 5598|  63.7k|    return auxCProp && isAlphaURN(auxCProp->u.auxC.auxType);
  ------------------
  |  Branch (5598:12): [True: 53.4k, False: 10.2k]
  |  Branch (5598:24): [True: 41.0k, False: 12.3k]
  ------------------
 5599|   639k|}
read.c:avifBrandArrayHasBrand:
 5174|   297k|{
 5175|  1.44M|    for (uint32_t brandIndex = 0; brandIndex < brands->count; ++brandIndex) {
  ------------------
  |  Branch (5175:35): [True: 1.19M, False: 246k]
  ------------------
 5176|  1.19M|        if (!memcmp(brands->brand[brandIndex], brand, 4)) {
  ------------------
  |  Branch (5176:13): [True: 51.1k, False: 1.14M]
  ------------------
 5177|  51.1k|            return AVIF_TRUE;
  ------------------
  |  |   88|  51.1k|#define AVIF_TRUE 1
  ------------------
 5178|  51.1k|        }
 5179|  1.19M|    }
 5180|   246k|    return AVIF_FALSE;
  ------------------
  |  |   89|   246k|#define AVIF_FALSE 0
  ------------------
 5181|   297k|}
read.c:avifDecoderFindGainMapItem:
 5889|  51.1k|{
 5890|  51.1k|    *gainMapItem = NULL;
 5891|  51.1k|    *gainMapCodecType = AVIF_CODEC_TYPE_UNKNOWN;
 5892|       |
 5893|  51.1k|    avifDecoderData * data = decoder->data;
 5894|       |
 5895|       |    // Find tmap and gain map item ids.
 5896|  51.1k|    uint32_t gainMapItemID;
 5897|  51.1k|    avifDecoderItem * toneMappedImageItemTmp;
 5898|  51.1k|    AVIF_CHECKRES(avifDecoderDataFindToneMappedImageItem(data, colorItem, &toneMappedImageItemTmp, &gainMapItemID));
  ------------------
  |  |   54|  51.1k|    do {                                  \
  |  |   55|  51.1k|        const avifResult result__ = (A);  \
  |  |   56|  51.1k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 8, False: 51.1k]
  |  |  ------------------
  |  |   57|      8|            avifBreakOnError();           \
  |  |   58|      8|            return result__;              \
  |  |   59|      8|        }                                 \
  |  |   60|  51.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 51.1k]
  |  |  ------------------
  ------------------
 5899|  51.1k|    if (!toneMappedImageItemTmp || !gainMapItemID) {
  ------------------
  |  Branch (5899:9): [True: 3.71k, False: 47.4k]
  |  Branch (5899:36): [True: 0, False: 47.4k]
  ------------------
 5900|  3.71k|        return AVIF_RESULT_OK;
 5901|  3.71k|    }
 5902|       |
 5903|  47.4k|    if (!avifIsPreferredAlternativeTo(data, toneMappedImageItemTmp->id, colorItem->id)) {
  ------------------
  |  Branch (5903:9): [True: 4.01k, False: 43.3k]
  ------------------
 5904|  4.01k|        return AVIF_RESULT_OK;
 5905|  4.01k|    }
 5906|       |
 5907|       |    // Parse tmap item data (containing the gain map metadata).
 5908|  43.3k|    avifROData tmapData;
 5909|  43.3k|    AVIF_CHECKRES(avifDecoderItemRead(toneMappedImageItemTmp, decoder->io, &tmapData, 0, 0, data->diag));
  ------------------
  |  |   54|  43.3k|    do {                                  \
  |  |   55|  43.3k|        const avifResult result__ = (A);  \
  |  |   56|  43.3k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 42.0k, False: 1.36k]
  |  |  ------------------
  |  |   57|  42.0k|            avifBreakOnError();           \
  |  |   58|  42.0k|            return result__;              \
  |  |   59|  42.0k|        }                                 \
  |  |   60|  43.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.36k]
  |  |  ------------------
  ------------------
 5910|       |    // Allocate avifGainMap on the stack instead of using avifGainMapCreate() to simplify error handling.
 5911|  1.36k|    avifGainMap gainMapTmp;
 5912|  1.36k|    avifGainMapSetDefaults(&gainMapTmp);
 5913|  1.36k|    avifResult result = avifParseToneMappedImageBox(&gainMapTmp, tmapData.data, tmapData.size, data->diag);
 5914|  1.36k|    if (result == AVIF_RESULT_NOT_IMPLEMENTED) {
  ------------------
  |  Branch (5914:9): [True: 1.07k, False: 281]
  ------------------
 5915|       |        // Unsupported gain map version. Simply ignore the gain map.
 5916|  1.07k|        return AVIF_RESULT_OK;
 5917|  1.07k|    }
 5918|    281|    AVIF_CHECKRES(result);
  ------------------
  |  |   54|    281|    do {                                  \
  |  |   55|    281|        const avifResult result__ = (A);  \
  |  |   56|    281|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 58, False: 223]
  |  |  ------------------
  |  |   57|     58|            avifBreakOnError();           \
  |  |   58|     58|            return result__;              \
  |  |   59|     58|        }                                 \
  |  |   60|    281|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 223]
  |  |  ------------------
  ------------------
 5919|       |
 5920|    223|    avifDecoderItem * gainMapItemTmp;
 5921|    223|    AVIF_CHECKRES(avifMetaFindOrCreateItem(data->meta, gainMapItemID, &gainMapItemTmp));
  ------------------
  |  |   54|    223|    do {                                  \
  |  |   55|    223|        const avifResult result__ = (A);  \
  |  |   56|    223|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 223]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    223|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 223]
  |  |  ------------------
  ------------------
 5922|    223|    if (avifDecoderItemShouldBeSkipped(gainMapItemTmp)) {
  ------------------
  |  Branch (5922:9): [True: 28, False: 195]
  ------------------
 5923|     28|        return AVIF_RESULT_NOT_IMPLEMENTED;
 5924|     28|    }
 5925|       |
 5926|    195|    avifCodecType gainMapCodecTypeTmp;
 5927|    195|    result = avifDecoderItemReadAndParse(decoder,
 5928|    195|                                         gainMapItemTmp,
 5929|    195|                                         /*isItemInInput=*/AVIF_TRUE,
  ------------------
  |  |   88|    195|#define AVIF_TRUE 1
  ------------------
 5930|    195|                                         &data->tileInfos[AVIF_ITEM_GAIN_MAP].grid,
 5931|    195|                                         &gainMapCodecTypeTmp);
 5932|    195|    if (result == AVIF_RESULT_NOT_IMPLEMENTED) {
  ------------------
  |  Branch (5932:9): [True: 12, False: 183]
  ------------------
 5933|     12|        return AVIF_RESULT_OK;
 5934|     12|    }
 5935|    183|    AVIF_CHECKRES(result);
  ------------------
  |  |   54|    183|    do {                                  \
  |  |   55|    183|        const avifResult result__ = (A);  \
  |  |   56|    183|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 2, False: 181]
  |  |  ------------------
  |  |   57|      2|            avifBreakOnError();           \
  |  |   58|      2|            return result__;              \
  |  |   59|      2|        }                                 \
  |  |   60|    183|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 181]
  |  |  ------------------
  ------------------
 5936|       |
 5937|       |    // This may allocate gainMapTmp.altICC which must be freed in case of error.
 5938|    181|    result = avifReadColorProperties(decoder->io,
 5939|    181|                                     &toneMappedImageItemTmp->properties,
 5940|    181|                                     decoder->ignoreICC ? NULL : &gainMapTmp.altICC,
  ------------------
  |  Branch (5940:38): [True: 0, False: 181]
  ------------------
 5941|    181|                                     &gainMapTmp.altColorPrimaries,
 5942|    181|                                     &gainMapTmp.altTransferCharacteristics,
 5943|    181|                                     &gainMapTmp.altMatrixCoefficients,
 5944|    181|                                     &gainMapTmp.altYUVRange,
 5945|    181|                                     /*cicpSet=*/NULL);
 5946|    181|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5946:9): [True: 1, False: 180]
  ------------------
 5947|      1|        avifRWDataFree(&gainMapTmp.altICC);
 5948|      1|        return result;
 5949|      1|    }
 5950|       |
 5951|    180|    const avifProperty * clliProp = avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "clli");
 5952|    180|    if (clliProp) {
  ------------------
  |  Branch (5952:9): [True: 0, False: 180]
  ------------------
 5953|      0|        gainMapTmp.altCLLI = clliProp->u.clli;
 5954|      0|    }
 5955|       |
 5956|    180|    const avifProperty * pixiProp = avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "pixi");
 5957|    180|    if (pixiProp) {
  ------------------
  |  Branch (5957:9): [True: 120, False: 60]
  ------------------
 5958|    120|        gainMapTmp.altPlaneCount = pixiProp->u.pixi.planeCount;
 5959|    120|        gainMapTmp.altDepth = pixiProp->u.pixi.planeDepths[0];
 5960|    120|    }
 5961|       |
 5962|    180|    const avifProperty * ispeProp = avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "ispe");
 5963|    180|    if (!ispeProp) {
  ------------------
  |  Branch (5963:9): [True: 2, False: 178]
  ------------------
 5964|       |        // HEIF (ISO/IEC 23008-12:2022), Section 6.5.3.1:
 5965|       |        // Every image item shall be associated with one property of this type, prior to the association
 5966|       |        // of all transformative properties.
 5967|      2|        avifDiagnosticsPrintf(data->diag, "Box[tmap] missing mandatory ispe property");
 5968|      2|        avifRWDataFree(&gainMapTmp.altICC);
 5969|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 5970|      2|    }
 5971|    178|    if (ispeProp->u.ispe.width != colorItem->width || ispeProp->u.ispe.height != colorItem->height) {
  ------------------
  |  Branch (5971:9): [True: 1, False: 177]
  |  Branch (5971:55): [True: 1, False: 176]
  ------------------
 5972|      2|        avifDiagnosticsPrintf(data->diag, "Box[tmap] ispe property width/height does not match base image");
 5973|      2|        avifRWDataFree(&gainMapTmp.altICC);
 5974|      2|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 5975|      2|    }
 5976|       |
 5977|    176|    if (avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "pasp") ||
  ------------------
  |  Branch (5977:9): [True: 0, False: 176]
  ------------------
 5978|    176|        avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "clap") ||
  ------------------
  |  Branch (5978:9): [True: 0, False: 176]
  ------------------
 5979|    176|        avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "irot") ||
  ------------------
  |  Branch (5979:9): [True: 0, False: 176]
  ------------------
 5980|    176|        avifPropertyArrayFind(&toneMappedImageItemTmp->properties, "imir")) {
  ------------------
  |  Branch (5980:9): [True: 0, False: 176]
  ------------------
 5981|       |        // libavif requires the bitstream contain the same pasp, clap, irot, imir
 5982|       |        // properties for both the base and gain map image items used as input to
 5983|       |        // the tone-mapped derived image item. libavif also requires the tone-mapped
 5984|       |        // derived image item itself not be associated with these properties. This is
 5985|       |        // enforced at encoding. Other patterns are rejected at decoding.
 5986|      0|        avifDiagnosticsPrintf(data->diag,
 5987|      0|                              "Box[tmap] 'pasp', 'clap', 'irot' and 'imir' properties must be associated with base and gain map items instead of 'tmap'");
 5988|      0|        avifRWDataFree(&gainMapTmp.altICC);
 5989|      0|        return AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE;
 5990|      0|    }
 5991|       |
 5992|    176|    avifColorPrimaries colorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
 5993|    176|    avifTransferCharacteristics transferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
 5994|    176|    avifMatrixCoefficients matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
 5995|    176|    avifRange yuvRange = AVIF_RANGE_FULL;
 5996|    176|    avifBool cicpSet = AVIF_FALSE;
  ------------------
  |  |   89|    176|#define AVIF_FALSE 0
  ------------------
 5997|       |    // Look for a colr nclx box. Other colr box types (e.g. ICC) are not supported.
 5998|    176|    result =
 5999|    176|        avifReadColorNclxProperty(&gainMapItemTmp->properties, &colorPrimaries, &transferCharacteristics, &matrixCoefficients, &yuvRange, &cicpSet);
 6000|    176|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6000:9): [True: 1, False: 175]
  ------------------
 6001|      1|        avifRWDataFree(&gainMapTmp.altICC);
 6002|      1|        return result;
 6003|      1|    }
 6004|       |
 6005|       |    // -- Everything is valid, do memory allocations and fill in output data. --
 6006|       |
 6007|    175|    decoder->image->gainMap = avifGainMapCreate();
 6008|    175|    if (!decoder->image->gainMap) {
  ------------------
  |  Branch (6008:9): [True: 0, False: 175]
  ------------------
 6009|      0|        avifRWDataFree(&gainMapTmp.altICC);
 6010|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 6011|      0|    }
 6012|       |
 6013|    175|    if (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_GAIN_MAP) {
  ------------------
  |  Branch (6013:9): [True: 144, False: 31]
  ------------------
 6014|    144|        avifImage * image = avifImageCreateEmpty();
 6015|    144|        if (!image) {
  ------------------
  |  Branch (6015:13): [True: 0, False: 144]
  ------------------
 6016|      0|            avifRWDataFree(&gainMapTmp.altICC);
 6017|      0|            return AVIF_RESULT_OUT_OF_MEMORY;
 6018|      0|        }
 6019|    144|        if (cicpSet) {
  ------------------
  |  Branch (6019:13): [True: 55, False: 89]
  ------------------
 6020|     55|            image->colorPrimaries = colorPrimaries;
 6021|     55|            image->transferCharacteristics = transferCharacteristics;
 6022|     55|            image->matrixCoefficients = matrixCoefficients;
 6023|     55|            image->yuvRange = yuvRange;
 6024|     55|        }
 6025|    144|        gainMapTmp.image = image;
 6026|    144|    }
 6027|       |
 6028|       |    // Only set the output pointers after everything has been validated.
 6029|    175|    *decoder->image->gainMap = gainMapTmp;
 6030|    175|    *gainMapItem = gainMapItemTmp;
 6031|    175|    *gainMapCodecType = gainMapCodecTypeTmp;
 6032|    175|    return AVIF_RESULT_OK;
 6033|    175|}
read.c:avifDecoderDataFindToneMappedImageItem:
 5811|  51.1k|{
 5812|   192k|    for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (5812:34): [True: 188k, False: 3.71k]
  ------------------
 5813|   188k|        avifDecoderItem * item = data->meta->items.item[itemIndex];
 5814|   188k|        if (!item->size || item->hasUnsupportedEssentialProperty || avifHasReference(&item->references, "thmb")) {
  ------------------
  |  Branch (5814:13): [True: 21.3k, False: 167k]
  |  Branch (5814:28): [True: 23.7k, False: 143k]
  |  Branch (5814:69): [True: 0, False: 143k]
  ------------------
 5815|  45.1k|            continue;
 5816|  45.1k|        }
 5817|   143k|        if (!memcmp(item->type, "tmap", 4)) {
  ------------------
  |  Branch (5817:13): [True: 50.1k, False: 93.5k]
  ------------------
 5818|       |            // The tmap box should be associated (via 'iref'->'dimg') to two items:
 5819|       |            // the first one is the base image, the second one is the gain map.
 5820|  50.1k|            uint32_t dimgItemIDs[2] = { 0, 0 };
 5821|  50.1k|            uint32_t numDimgItemIDs = 0;
 5822|   415k|            for (uint32_t otherItemIndex = 0; otherItemIndex < data->meta->items.count; ++otherItemIndex) {
  ------------------
  |  Branch (5822:47): [True: 365k, False: 50.1k]
  ------------------
 5823|   365k|                avifDecoderItem * otherItem = data->meta->items.item[otherItemIndex];
 5824|   365k|                uint32_t otherDimgIdx;
 5825|   365k|                if (!avifIsDimgInput(item, otherItem->id, &otherDimgIdx)) {
  ------------------
  |  Branch (5825:21): [True: 265k, False: 100k]
  ------------------
 5826|   265k|                    continue;
 5827|   265k|                }
 5828|   100k|                if (otherDimgIdx < 2) {
  ------------------
  |  Branch (5828:21): [True: 100k, False: 19]
  ------------------
 5829|   100k|                    AVIF_ASSERT_OR_RETURN(dimgItemIDs[otherDimgIdx] == 0);
  ------------------
  |  |   64|   100k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   100k|    do {                        \
  |  |  |  |   46|   100k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 100k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   100k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 100k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5830|   100k|                    dimgItemIDs[otherDimgIdx] = otherItem->id;
 5831|   100k|                }
 5832|   100k|                numDimgItemIDs++;
 5833|   100k|            }
 5834|       |            // Even with numDimgItemIDs == 2, one of the ids could be 0 if there are duplicate entries in the 'dimg' box.
 5835|  50.1k|            if (numDimgItemIDs != 2 || dimgItemIDs[0] == 0 || dimgItemIDs[1] == 0) {
  ------------------
  |  Branch (5835:17): [True: 8, False: 50.0k]
  |  Branch (5835:40): [True: 0, False: 50.0k]
  |  Branch (5835:63): [True: 0, False: 50.0k]
  ------------------
 5836|      8|                avifDiagnosticsPrintf(data->diag, "box[dimg] for 'tmap' item %d must have exactly 2 entries with distinct ids", item->id);
 5837|      8|                return AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE;
 5838|      8|            }
 5839|  50.0k|            if (dimgItemIDs[0] != colorItem->id) {
  ------------------
  |  Branch (5839:17): [True: 2.68k, False: 47.4k]
  ------------------
 5840|  2.68k|                continue;
 5841|  2.68k|            }
 5842|       |
 5843|  47.4k|            *toneMappedImageItem = item;
 5844|  47.4k|            *gainMapItemID = dimgItemIDs[1];
 5845|  47.4k|            return AVIF_RESULT_OK;
 5846|  50.0k|        }
 5847|   143k|    }
 5848|  3.71k|    *toneMappedImageItem = NULL;
 5849|  3.71k|    *gainMapItemID = 0;
 5850|  3.71k|    return AVIF_RESULT_OK;
 5851|  51.1k|}
read.c:avifIsPreferredAlternativeTo:
 5857|  62.1k|{
 5858|  72.4k|    for (uint32_t i = 0; i < data->meta->entityToGroups.count; ++i) {
  ------------------
  |  Branch (5858:26): [True: 58.3k, False: 14.1k]
  ------------------
 5859|  58.3k|        avifEntityToGroup * group = &data->meta->entityToGroups.groups[i];
 5860|  58.3k|        if (memcmp(group->groupingType, "altr", 4) != 0) {
  ------------------
  |  Branch (5860:13): [True: 3.75k, False: 54.6k]
  ------------------
 5861|  3.75k|            continue;
 5862|  3.75k|        }
 5863|  54.6k|        avifBool id1Found = AVIF_FALSE;
  ------------------
  |  |   89|  54.6k|#define AVIF_FALSE 0
  ------------------
 5864|   110k|        for (uint32_t j = 0; j < group->entityIDs.count; ++j) {
  ------------------
  |  Branch (5864:30): [True: 104k, False: 6.58k]
  ------------------
 5865|   104k|            if (group->entityIDs.ids[j] == id1) {
  ------------------
  |  Branch (5865:17): [True: 45.7k, False: 58.6k]
  ------------------
 5866|  45.7k|                id1Found = AVIF_TRUE;
  ------------------
  |  |   88|  45.7k|#define AVIF_TRUE 1
  ------------------
 5867|  58.6k|            } else if (group->entityIDs.ids[j] == id2) {
  ------------------
  |  Branch (5867:24): [True: 48.0k, False: 10.5k]
  ------------------
 5868|       |                // Assume id2 is only present in one altr group, as per ISO/IEC 14496-12:2022
 5869|       |                // Section 8.15.3.1:
 5870|       |                // Any entity_id value shall be mapped to only one grouping of type 'altr'.
 5871|  48.0k|                return id1Found;
 5872|  48.0k|            }
 5873|   104k|        }
 5874|  54.6k|    }
 5875|  14.1k|    return AVIF_FALSE;
  ------------------
  |  |   89|  14.1k|#define AVIF_FALSE 0
  ------------------
 5876|  62.1k|}
read.c:avifParseToneMappedImageBox:
 2302|  1.36k|{
 2303|  1.36k|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[tmap]");
  ------------------
  |  |  810|  1.36k|    avifROStream VARNAME;                               \
  |  |  811|  1.36k|    avifROData VARNAME##_roData;                        \
  |  |  812|  1.36k|    VARNAME##_roData.data = PTR;                        \
  |  |  813|  1.36k|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|  1.36k|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2304|       |
 2305|  1.36k|    uint8_t version;
 2306|  1.36k|    AVIF_CHECKERR(avifROStreamRead(&s, &version, 1), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE); // unsigned int(8) version = 0;
  ------------------
  |  |   45|  1.36k|    do {                        \
  |  |   46|  1.36k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 1.36k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  1.36k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 1.36k]
  |  |  ------------------
  ------------------
 2307|  1.36k|    if (version != 0) {
  ------------------
  |  Branch (2307:9): [True: 492, False: 868]
  ------------------
 2308|    492|        avifDiagnosticsPrintf(diag, "Box[tmap] has unsupported version [%u]", version);
 2309|    492|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2310|    492|    }
 2311|       |
 2312|    868|    uint16_t minimumVersion;
 2313|    868|    AVIF_CHECKERR(avifROStreamReadU16(&s, &minimumVersion), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE); // unsigned int(16) minimum_version;
  ------------------
  |  |   45|    868|    do {                        \
  |  |   46|    868|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 867]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    868|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 867]
  |  |  ------------------
  ------------------
 2314|    867|    const uint16_t supportedMetadataVersion = 0;
 2315|    867|    if (minimumVersion > supportedMetadataVersion) {
  ------------------
  |  Branch (2315:9): [True: 587, False: 280]
  ------------------
 2316|    587|        avifDiagnosticsPrintf(diag, "Box[tmap] has unsupported minimum version [%u]", minimumVersion);
 2317|    587|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2318|    587|    }
 2319|    280|    uint16_t writerVersion;
 2320|    280|    AVIF_CHECKERR(avifROStreamReadU16(&s, &writerVersion), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE); // unsigned int(16) writer_version;
  ------------------
  |  |   45|    280|    do {                        \
  |  |   46|    280|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 279]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    280|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 279]
  |  |  ------------------
  ------------------
 2321|    279|    AVIF_CHECKERR(writerVersion >= minimumVersion, AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE);
  ------------------
  |  |   45|    279|    do {                        \
  |  |   46|    279|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 279]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    279|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 279]
  |  |  ------------------
  ------------------
 2322|       |
 2323|    279|    AVIF_CHECKERR(avifParseGainMapMetadata(gainMap, &s), AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE);
  ------------------
  |  |   45|    279|    do {                        \
  |  |   46|    279|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 21, False: 258]
  |  |  ------------------
  |  |   47|     21|            avifBreakOnError(); \
  |  |   48|     21|            return ERR;         \
  |  |   49|     21|        }                       \
  |  |   50|    279|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 258]
  |  |  ------------------
  ------------------
 2324|       |
 2325|    258|    if (writerVersion <= supportedMetadataVersion) {
  ------------------
  |  Branch (2325:9): [True: 27, False: 231]
  ------------------
 2326|     27|        AVIF_CHECKERR(avifROStreamRemainingBytes(&s) == 0, AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE);
  ------------------
  |  |   45|     27|    do {                        \
  |  |   46|     27|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 26]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|     27|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 26]
  |  |  ------------------
  ------------------
 2327|     27|    }
 2328|       |
 2329|    257|    if (avifGainMapValidateMetadata(gainMap, diag) != AVIF_RESULT_OK) {
  ------------------
  |  Branch (2329:9): [True: 34, False: 223]
  ------------------
 2330|     34|        return AVIF_RESULT_INVALID_TONE_MAPPED_IMAGE;
 2331|     34|    }
 2332|       |
 2333|    223|    return AVIF_RESULT_OK;
 2334|    257|}
read.c:avifParseGainMapMetadata:
 2259|    279|{
 2260|    279|    uint32_t isMultichannel;
 2261|    279|    AVIF_CHECK(avifROStreamReadBitsU32(s, &isMultichannel, 1)); // unsigned int(1) is_multichannel;
  ------------------
  |  |   36|    279|    do {                        \
  |  |   37|    279|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 277]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|    279|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 277]
  |  |  ------------------
  ------------------
 2262|    277|    const uint8_t channelCount = isMultichannel ? 3 : 1;
  ------------------
  |  Branch (2262:34): [True: 62, False: 215]
  ------------------
 2263|       |
 2264|    277|    uint32_t useBaseColorSpace;
 2265|    277|    AVIF_CHECK(avifROStreamReadBitsU32(s, &useBaseColorSpace, 1)); // unsigned int(1) use_base_colour_space;
  ------------------
  |  |   36|    277|    do {                        \
  |  |   37|    277|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 277]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    277|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 277]
  |  |  ------------------
  ------------------
 2266|    277|    gainMap->useBaseColorSpace = useBaseColorSpace ? AVIF_TRUE : AVIF_FALSE;
  ------------------
  |  |   88|     65|#define AVIF_TRUE 1
  ------------------
                  gainMap->useBaseColorSpace = useBaseColorSpace ? AVIF_TRUE : AVIF_FALSE;
  ------------------
  |  |   89|    489|#define AVIF_FALSE 0
  ------------------
  |  Branch (2266:34): [True: 65, False: 212]
  ------------------
 2267|       |
 2268|    277|    uint32_t reserved;
 2269|    277|    AVIF_CHECK(avifROStreamReadBitsU32(s, &reserved, 6)); // unsigned int(6) reserved;
  ------------------
  |  |   36|    277|    do {                        \
  |  |   37|    277|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 277]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    277|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 277]
  |  |  ------------------
  ------------------
 2270|       |
 2271|    277|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->baseHdrHeadroom.n));      // unsigned int(32) base_hdr_headroom_numerator;
  ------------------
  |  |   36|    277|    do {                        \
  |  |   37|    277|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 276]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    277|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 276]
  |  |  ------------------
  ------------------
 2272|    276|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->baseHdrHeadroom.d));      // unsigned int(32) base_hdr_headroom_denominator;
  ------------------
  |  |   36|    276|    do {                        \
  |  |   37|    276|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 275]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    276|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 275]
  |  |  ------------------
  ------------------
 2273|    275|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->alternateHdrHeadroom.n)); // unsigned int(32) alternate_hdr_headroom_numerator;
  ------------------
  |  |   36|    275|    do {                        \
  |  |   37|    275|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 274]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    275|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 274]
  |  |  ------------------
  ------------------
 2274|    274|    AVIF_CHECK(avifROStreamReadU32(s, &gainMap->alternateHdrHeadroom.d)); // unsigned int(32) alternate_hdr_headroom_denominator;
  ------------------
  |  |   36|    274|    do {                        \
  |  |   37|    274|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 271]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|    274|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 271]
  |  |  ------------------
  ------------------
 2275|       |
 2276|    640|    for (int c = 0; c < channelCount; ++c) {
  ------------------
  |  Branch (2276:21): [True: 382, False: 258]
  ------------------
 2277|    382|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->gainMapMin[c].n)); // int(32) gain_map_min_numerator;
  ------------------
  |  |   36|    382|    do {                        \
  |  |   37|    382|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 380]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|    382|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 380]
  |  |  ------------------
  ------------------
 2278|    380|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapMin[c].d));             // unsigned int(32) gain_map_min_denominator;
  ------------------
  |  |   36|    380|    do {                        \
  |  |   37|    380|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 379]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    380|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 379]
  |  |  ------------------
  ------------------
 2279|    379|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->gainMapMax[c].n)); // int(32) gain_map_max_numerator;
  ------------------
  |  |   36|    379|    do {                        \
  |  |   37|    379|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 378]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    379|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 378]
  |  |  ------------------
  ------------------
 2280|    378|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapMax[c].d));             // unsigned int(32) gain_map_max_denominator;
  ------------------
  |  |   36|    378|    do {                        \
  |  |   37|    378|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 377]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    378|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 377]
  |  |  ------------------
  ------------------
 2281|    377|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapGamma[c].n));           // unsigned int(32) gamma_numerator;
  ------------------
  |  |   36|    377|    do {                        \
  |  |   37|    377|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 376]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    377|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 376]
  |  |  ------------------
  ------------------
 2282|    376|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->gainMapGamma[c].d));           // unsigned int(32) gamma_denominator;
  ------------------
  |  |   36|    376|    do {                        \
  |  |   37|    376|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 375]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    376|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 375]
  |  |  ------------------
  ------------------
 2283|    375|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->baseOffset[c].n)); // int(32) base_offset_numerator;
  ------------------
  |  |   36|    375|    do {                        \
  |  |   37|    375|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 372]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|    375|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 372]
  |  |  ------------------
  ------------------
 2284|    372|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->baseOffset[c].d));             // unsigned int(32) base_offset_denominator;
  ------------------
  |  |   36|    372|    do {                        \
  |  |   37|    372|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 371]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    372|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 371]
  |  |  ------------------
  ------------------
 2285|    371|        AVIF_CHECK(avifROStreamReadU32(s, (uint32_t *)&gainMap->alternateOffset[c].n)); // int(32) alternate_offset_numerator;
  ------------------
  |  |   36|    371|    do {                        \
  |  |   37|    371|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 370]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    371|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 370]
  |  |  ------------------
  ------------------
 2286|    370|        AVIF_CHECK(avifROStreamReadU32(s, &gainMap->alternateOffset[c].d)); // unsigned int(32) alternate_offset_denominator;
  ------------------
  |  |   36|    370|    do {                        \
  |  |   37|    370|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 369]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    370|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 369]
  |  |  ------------------
  ------------------
 2287|    370|    }
 2288|       |
 2289|       |    // Fill the remaining values by copying those from the first channel.
 2290|    668|    for (int c = channelCount; c < 3; ++c) {
  ------------------
  |  Branch (2290:32): [True: 410, False: 258]
  ------------------
 2291|    410|        gainMap->gainMapMin[c] = gainMap->gainMapMin[0];
 2292|    410|        gainMap->gainMapMax[c] = gainMap->gainMapMax[0];
 2293|    410|        gainMap->gainMapGamma[c] = gainMap->gainMapGamma[0];
 2294|    410|        gainMap->baseOffset[c] = gainMap->baseOffset[0];
 2295|    410|        gainMap->alternateOffset[c] = gainMap->alternateOffset[0];
 2296|    410|    }
 2297|    258|    return AVIF_TRUE;
  ------------------
  |  |   88|    258|#define AVIF_TRUE 1
  ------------------
 2298|    271|}
read.c:avifReadColorNclxProperty:
 5743|   284k|{
 5744|   284k|    assert(cicpSet == NULL || *cicpSet == AVIF_FALSE);
 5745|   284k|    avifBool colrNCLXSeen = AVIF_FALSE;
  ------------------
  |  |   89|   284k|#define AVIF_FALSE 0
  ------------------
 5746|  1.49M|    for (uint32_t propertyIndex = 0; propertyIndex < properties->count; ++propertyIndex) {
  ------------------
  |  Branch (5746:38): [True: 1.21M, False: 284k]
  ------------------
 5747|  1.21M|        avifProperty * prop = &properties->prop[propertyIndex];
 5748|  1.21M|        if (!memcmp(prop->type, "colr", 4) && prop->u.colr.hasNCLX) {
  ------------------
  |  Branch (5748:13): [True: 69.3k, False: 1.14M]
  |  Branch (5748:47): [True: 1.24k, False: 68.1k]
  ------------------
 5749|  1.24k|            if (colrNCLXSeen) {
  ------------------
  |  Branch (5749:17): [True: 3, False: 1.24k]
  ------------------
 5750|      3|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5751|      3|            }
 5752|  1.24k|            colrNCLXSeen = AVIF_TRUE;
  ------------------
  |  |   88|  1.24k|#define AVIF_TRUE 1
  ------------------
 5753|  1.24k|            if (cicpSet != NULL) {
  ------------------
  |  Branch (5753:17): [True: 1.15k, False: 88]
  ------------------
 5754|  1.15k|                *cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|  1.15k|#define AVIF_TRUE 1
  ------------------
 5755|  1.15k|            }
 5756|  1.24k|            *colorPrimaries = prop->u.colr.colorPrimaries;
 5757|  1.24k|            *transferCharacteristics = prop->u.colr.transferCharacteristics;
 5758|  1.24k|            *matrixCoefficients = prop->u.colr.matrixCoefficients;
 5759|  1.24k|            *yuvRange = prop->u.colr.range;
 5760|  1.24k|        }
 5761|  1.21M|    }
 5762|   284k|    return AVIF_RESULT_OK;
 5763|   284k|}
read.c:avifDecoderDataFindSampleTransformImageItem:
 6120|   255k|{
 6121|   941k|    for (uint32_t itemIndex = 0; itemIndex < data->meta->items.count; ++itemIndex) {
  ------------------
  |  Branch (6121:34): [True: 687k, False: 253k]
  ------------------
 6122|   687k|        avifDecoderItem * item = data->meta->items.item[itemIndex];
 6123|   687k|        if (!memcmp(item->type, "sato", 4) && item->id != data->meta->primaryItemID && item->size != 0 &&
  ------------------
  |  Branch (6123:13): [True: 21.0k, False: 666k]
  |  Branch (6123:47): [True: 21.0k, False: 0]
  |  Branch (6123:88): [True: 17.9k, False: 3.18k]
  ------------------
 6124|  17.9k|            !item->hasUnsupportedEssentialProperty && !avifHasReference(&item->references, "thmb") &&
  ------------------
  |  Branch (6124:13): [True: 14.7k, False: 3.18k]
  |  Branch (6124:55): [True: 14.7k, False: 0]
  ------------------
 6125|  14.7k|            avifIsPreferredAlternativeTo(data, item->id, data->meta->primaryItemID)) {
  ------------------
  |  Branch (6125:13): [True: 1.84k, False: 12.8k]
  ------------------
 6126|  1.84k|            return item;
 6127|  1.84k|        }
 6128|   687k|    }
 6129|   253k|    return NULL;
 6130|   255k|}
read.c:avifIsDimgInput:
  263|   949k|{
  264|  2.40M|    for (uint32_t i = 0; i < derivedItem->dimgInputs.count; ++i) {
  ------------------
  |  Branch (264:26): [True: 1.68M, False: 720k]
  ------------------
  265|  1.68M|        if (derivedItem->dimgInputs.id[i] == inputItemID) {
  ------------------
  |  Branch (265:13): [True: 228k, False: 1.45M]
  ------------------
  266|   228k|            if (dimgIdx != NULL) {
  ------------------
  |  Branch (266:17): [True: 125k, False: 102k]
  ------------------
  267|   125k|                *dimgIdx = i;
  268|   125k|            }
  269|   228k|            return AVIF_TRUE;
  ------------------
  |  |   88|   228k|#define AVIF_TRUE 1
  ------------------
  270|   228k|        }
  271|  1.68M|    }
  272|   720k|    return AVIF_FALSE;
  ------------------
  |  |   89|   720k|#define AVIF_FALSE 0
  ------------------
  273|   949k|}
read.c:avifDecoderItemRead:
 1521|  1.05M|{
 1522|  1.05M|    if (item->mergedExtents.data && !item->partialMergedExtents) {
  ------------------
  |  Branch (1522:9): [True: 665k, False: 385k]
  |  Branch (1522:37): [True: 237, False: 664k]
  ------------------
 1523|       |        // Multiple extents have already been concatenated for this item, just return it
 1524|    237|        if (offset >= item->mergedExtents.size) {
  ------------------
  |  Branch (1524:13): [True: 0, False: 237]
  ------------------
 1525|      0|            avifDiagnosticsPrintf(diag, "Item ID %u read has overflowing offset", item->id);
 1526|      0|            return AVIF_RESULT_TRUNCATED_DATA;
 1527|      0|        }
 1528|    237|        outData->data = item->mergedExtents.data + offset;
 1529|    237|        outData->size = item->mergedExtents.size - offset;
 1530|    237|        return AVIF_RESULT_OK;
 1531|    237|    }
 1532|       |
 1533|  1.05M|    if (item->extents.count == 0) {
  ------------------
  |  Branch (1533:9): [True: 0, False: 1.05M]
  ------------------
 1534|      0|        avifDiagnosticsPrintf(diag, "Item ID %u has zero extents", item->id);
 1535|      0|        return AVIF_RESULT_TRUNCATED_DATA;
 1536|      0|    }
 1537|       |
 1538|       |    // Find this item's source of all extents' data, based on the construction method
 1539|  1.05M|    const avifRWData * idatBuffer = NULL;
 1540|  1.05M|    if (item->idatStored) {
  ------------------
  |  Branch (1540:9): [True: 433, False: 1.04M]
  ------------------
 1541|       |        // construction_method: idat(1)
 1542|       |
 1543|    433|        if (item->meta->idat.size > 0) {
  ------------------
  |  Branch (1543:13): [True: 432, False: 1]
  ------------------
 1544|    432|            idatBuffer = &item->meta->idat;
 1545|    432|        } else {
 1546|       |            // no associated idat box was found in the meta box, bail out
 1547|      1|            avifDiagnosticsPrintf(diag, "Item ID %u is stored in an idat, but no associated idat box was found", item->id);
 1548|      1|            return AVIF_RESULT_NO_CONTENT;
 1549|      1|        }
 1550|    433|    }
 1551|       |
 1552|       |    // Merge extents into a single contiguous buffer
 1553|  1.05M|    if ((io->sizeHint > 0) && (item->size > io->sizeHint)) {
  ------------------
  |  Branch (1553:9): [True: 376k, False: 673k]
  |  Branch (1553:31): [True: 30, False: 376k]
  ------------------
 1554|       |        // Sanity check: somehow the sum of extents exceeds the entire file or idat size!
 1555|     30|        avifDiagnosticsPrintf(diag, "Item ID %u reported size failed size hint sanity check. Truncated data?", item->id);
 1556|     30|        return AVIF_RESULT_TRUNCATED_DATA;
 1557|     30|    }
 1558|       |
 1559|  1.05M|    if (offset >= item->size) {
  ------------------
  |  Branch (1559:9): [True: 0, False: 1.05M]
  ------------------
 1560|      0|        avifDiagnosticsPrintf(diag, "Item ID %u read has overflowing offset", item->id);
 1561|      0|        return AVIF_RESULT_TRUNCATED_DATA;
 1562|      0|    }
 1563|  1.05M|    const size_t maxOutputSize = item->size - offset;
 1564|  1.05M|    const size_t readOutputSize = (partialByteCount && (partialByteCount < maxOutputSize)) ? partialByteCount : maxOutputSize;
  ------------------
  |  Branch (1564:36): [True: 941k, False: 108k]
  |  Branch (1564:56): [True: 595k, False: 346k]
  ------------------
 1565|  1.05M|    const size_t totalBytesToRead = offset + readOutputSize;
 1566|       |
 1567|       |    // If there is a single extent for this item and the source of the read buffer is going to be
 1568|       |    // persistent for the lifetime of the avifDecoder (whether it comes from its own internal
 1569|       |    // idatBuffer or from a known-persistent IO), we can avoid buffer duplication and just use the
 1570|       |    // preexisting buffer.
 1571|  1.05M|    avifBool singlePersistentBuffer = ((item->extents.count == 1) && (idatBuffer || io->persistent));
  ------------------
  |  Branch (1571:40): [True: 702k, False: 347k]
  |  Branch (1571:71): [True: 111, False: 702k]
  |  Branch (1571:85): [True: 323k, False: 379k]
  ------------------
 1572|  1.05M|    if (!singlePersistentBuffer) {
  ------------------
  |  Branch (1572:9): [True: 726k, False: 323k]
  ------------------
 1573|       |        // Always allocate the item's full size here, as progressive image decodes will do partial
 1574|       |        // reads into this buffer and begin feeding the buffer to the underlying AV1 decoder, but
 1575|       |        // will then write more into this buffer without flushing the AV1 decoder (which is still
 1576|       |        // holding the address of the previous allocation of this buffer). This strategy avoids
 1577|       |        // use-after-free issues in the AV1 decoder and unnecessary reallocs as a typical
 1578|       |        // progressive decode use case will eventually decode the final layer anyway.
 1579|   726k|        AVIF_CHECKRES(avifRWDataRealloc(&item->mergedExtents, item->size));
  ------------------
  |  |   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]
  |  |  ------------------
  ------------------
 1580|   726k|        item->ownsMergedExtents = AVIF_TRUE;
  ------------------
  |  |   88|   726k|#define AVIF_TRUE 1
  ------------------
 1581|   726k|    }
 1582|       |
 1583|       |    // Set this until we manage to fill the entire mergedExtents buffer
 1584|  1.05M|    item->partialMergedExtents = AVIF_TRUE;
  ------------------
  |  |   88|  1.05M|#define AVIF_TRUE 1
  ------------------
 1585|       |
 1586|  1.05M|    size_t writeOffset = 0; // Write offset for item->mergedExtents.data
 1587|  1.05M|    size_t remainingBytes = totalBytesToRead;
 1588|  1.10M|    for (uint32_t extentIter = 0; extentIter < item->extents.count; ++extentIter) {
  ------------------
  |  Branch (1588:35): [True: 1.10M, False: 0]
  ------------------
 1589|  1.10M|        avifExtent * extent = &item->extents.extent[extentIter];
 1590|       |
 1591|  1.10M|        size_t bytesToRead = extent->size;
 1592|  1.10M|        if (bytesToRead > remainingBytes) {
  ------------------
  |  Branch (1592:13): [True: 577k, False: 527k]
  ------------------
 1593|   577k|            bytesToRead = remainingBytes;
 1594|   577k|        }
 1595|       |
 1596|  1.10M|        avifROData offsetBuffer;
 1597|  1.10M|        if (idatBuffer) {
  ------------------
  |  Branch (1597:13): [True: 746, False: 1.10M]
  ------------------
 1598|    746|            if (extent->offset > idatBuffer->size) {
  ------------------
  |  Branch (1598:17): [True: 37, False: 709]
  ------------------
 1599|     37|                avifDiagnosticsPrintf(diag, "Item ID %u has impossible extent offset in idat buffer", item->id);
 1600|     37|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1601|     37|            }
 1602|       |            // Since extent->offset (a uint64_t) is not bigger than idatBuffer->size (a size_t),
 1603|       |            // it is safe to cast extent->offset to size_t.
 1604|    709|            const size_t extentOffset = (size_t)extent->offset;
 1605|    709|            if (extent->size > idatBuffer->size - extentOffset) {
  ------------------
  |  Branch (1605:17): [True: 10, False: 699]
  ------------------
 1606|     10|                avifDiagnosticsPrintf(diag, "Item ID %u has impossible extent size in idat buffer", item->id);
 1607|     10|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1608|     10|            }
 1609|    699|            offsetBuffer.data = idatBuffer->data + extentOffset;
 1610|    699|            offsetBuffer.size = idatBuffer->size - extentOffset;
 1611|  1.10M|        } else {
 1612|       |            // construction_method: file(0)
 1613|       |
 1614|  1.10M|            if ((io->sizeHint > 0) && (extent->offset > io->sizeHint)) {
  ------------------
  |  Branch (1614:17): [True: 394k, False: 710k]
  |  Branch (1614:39): [True: 67, False: 394k]
  ------------------
 1615|     67|                avifDiagnosticsPrintf(diag, "Item ID %u extent offset failed size hint sanity check. Truncated data?", item->id);
 1616|     67|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1617|     67|            }
 1618|  1.10M|            avifResult readResult = io->read(io, 0, extent->offset, bytesToRead, &offsetBuffer);
 1619|  1.10M|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (1619:17): [True: 632k, False: 471k]
  ------------------
 1620|   632k|                return readResult;
 1621|   632k|            }
 1622|   471k|            if (bytesToRead != offsetBuffer.size) {
  ------------------
  |  Branch (1622:17): [True: 181, False: 471k]
  ------------------
 1623|    181|                avifDiagnosticsPrintf(diag,
 1624|    181|                                      "Item ID %u tried to read %zu bytes, but only received %zu bytes",
 1625|    181|                                      item->id,
 1626|    181|                                      bytesToRead,
 1627|    181|                                      offsetBuffer.size);
 1628|    181|                return AVIF_RESULT_TRUNCATED_DATA;
 1629|    181|            }
 1630|   471k|        }
 1631|       |
 1632|   471k|        if (singlePersistentBuffer) {
  ------------------
  |  Branch (1632:13): [True: 160k, False: 311k]
  ------------------
 1633|   160k|            item->mergedExtents.data = (uint8_t *)offsetBuffer.data; // const_cast
 1634|   160k|            AVIF_ASSERT_OR_RETURN(bytesToRead <= offsetBuffer.size);
  ------------------
  |  |   64|   160k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   160k|    do {                        \
  |  |  |  |   46|   160k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 160k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   160k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 160k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1635|   160k|            item->mergedExtents.size = bytesToRead;
 1636|   311k|        } else {
 1637|   311k|            AVIF_ASSERT_OR_RETURN(item->ownsMergedExtents);
  ------------------
  |  |   64|   311k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   311k|    do {                        \
  |  |  |  |   46|   311k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   311k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1638|   311k|            AVIF_ASSERT_OR_RETURN(writeOffset < item->mergedExtents.size);
  ------------------
  |  |   64|   311k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   311k|    do {                        \
  |  |  |  |   46|   311k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   311k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1639|   311k|            AVIF_ASSERT_OR_RETURN(bytesToRead <= item->mergedExtents.size - writeOffset);
  ------------------
  |  |   64|   311k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   311k|    do {                        \
  |  |  |  |   46|   311k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 311k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   311k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 311k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1640|   311k|            memcpy(item->mergedExtents.data + writeOffset, offsetBuffer.data, bytesToRead);
 1641|   311k|            writeOffset += bytesToRead;
 1642|   311k|        }
 1643|       |
 1644|   471k|        remainingBytes -= bytesToRead;
 1645|   471k|        if (remainingBytes == 0) {
  ------------------
  |  Branch (1645:13): [True: 416k, False: 54.9k]
  ------------------
 1646|       |            // This happens when partialByteCount is set
 1647|   416k|            break;
 1648|   416k|        }
 1649|   471k|    }
 1650|   416k|    if (remainingBytes != 0) {
  ------------------
  |  Branch (1650:9): [True: 0, False: 416k]
  ------------------
 1651|       |        // This should be impossible?
 1652|      0|        avifDiagnosticsPrintf(diag, "Item ID %u has %zu unexpected trailing bytes", item->id, remainingBytes);
 1653|      0|        return AVIF_RESULT_TRUNCATED_DATA;
 1654|      0|    }
 1655|       |
 1656|   416k|    outData->data = item->mergedExtents.data + offset;
 1657|   416k|    outData->size = readOutputSize;
 1658|   416k|    item->partialMergedExtents = (item->size != totalBytesToRead);
 1659|   416k|    return AVIF_RESULT_OK;
 1660|   416k|}
read.c:avifParseSampleTransformImageBox:
 2378|    200|{
 2379|    200|    BEGIN_STREAM(s, raw, rawLen, diag, "Box[sato]");
  ------------------
  |  |  810|    200|    avifROStream VARNAME;                               \
  |  |  811|    200|    avifROData VARNAME##_roData;                        \
  |  |  812|    200|    VARNAME##_roData.data = PTR;                        \
  |  |  813|    200|    VARNAME##_roData.size = SIZE;                       \
  |  |  814|    200|    avifROStreamStart(&VARNAME, &VARNAME##_roData, DIAG, CONTEXT)
  ------------------
 2380|       |
 2381|    200|    uint8_t version, reserved, bitDepth;
 2382|    200|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &version, /*bitCount=*/2), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(2) version = 0;
  ------------------
  |  |   45|    200|    do {                        \
  |  |   46|    200|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 200]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    200|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 200]
  |  |  ------------------
  ------------------
 2383|    200|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &reserved, /*bitCount=*/4), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(4) reserved;
  ------------------
  |  |   45|    200|    do {                        \
  |  |   46|    200|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 200]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    200|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 200]
  |  |  ------------------
  ------------------
 2384|    200|    AVIF_CHECKERR(avifROStreamReadBitsU8(&s, &bitDepth, /*bitCount=*/2), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(2) bit_depth;
  ------------------
  |  |   45|    200|    do {                        \
  |  |   46|    200|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 200]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    200|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 200]
  |  |  ------------------
  ------------------
 2385|    200|    AVIF_CHECKERR(version == 0, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    200|    do {                        \
  |  |   46|    200|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 199]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    200|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 199]
  |  |  ------------------
  ------------------
 2386|    199|    AVIF_CHECKERR(bitDepth == AVIF_SAMPLE_TRANSFORM_BIT_DEPTH_32, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    199|    do {                        \
  |  |   46|    199|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 198]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    199|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 198]
  |  |  ------------------
  ------------------
 2387|       |
 2388|    198|    const avifResult result = avifParseSampleTransformTokens(&s, expression);
 2389|    198|    if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (2389:9): [True: 37, False: 161]
  ------------------
 2390|     37|        avifArrayDestroy(expression);
 2391|     37|        return result;
 2392|     37|    }
 2393|    161|    if (!avifSampleTransformExpressionIsValid(expression, numInputImageItems)) {
  ------------------
  |  Branch (2393:9): [True: 13, False: 148]
  ------------------
 2394|     13|        avifArrayDestroy(expression);
 2395|     13|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2396|     13|    }
 2397|    148|    return AVIF_RESULT_OK;
 2398|    161|}
read.c:avifParseSampleTransformTokens:
 2338|    198|{
 2339|    198|    uint8_t tokenCount;
 2340|    198|    AVIF_CHECKERR(avifROStreamRead(s, &tokenCount, /*size=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) token_count;
  ------------------
  |  |   45|    198|    do {                        \
  |  |   46|    198|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 197]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    198|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 197]
  |  |  ------------------
  ------------------
 2341|    197|    AVIF_CHECKERR(tokenCount != 0, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    197|    do {                        \
  |  |   46|    197|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 196]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    197|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 196]
  |  |  ------------------
  ------------------
 2342|    196|    AVIF_CHECKERR(avifArrayCreate(expression, sizeof(expression->tokens[0]), tokenCount), AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|    196|    do {                        \
  |  |   46|    196|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 196]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    196|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 196]
  |  |  ------------------
  ------------------
 2343|       |
 2344|  2.60k|    for (uint32_t t = 0; t < tokenCount; ++t) {
  ------------------
  |  Branch (2344:26): [True: 2.43k, False: 169]
  ------------------
 2345|  2.43k|        avifSampleTransformToken * token = (avifSampleTransformToken *)avifArrayPush(expression);
 2346|  2.43k|        AVIF_CHECKERR(token != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  2.43k|    do {                        \
  |  |   46|  2.43k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 2.43k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  2.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2.43k]
  |  |  ------------------
  ------------------
 2347|       |
 2348|  2.43k|        uint8_t tokenValue;
 2349|  2.43k|        AVIF_CHECKERR(avifROStreamRead(s, &tokenValue, /*size=*/1), AVIF_RESULT_BMFF_PARSE_FAILED); // unsigned int(8) token;
  ------------------
  |  |   45|  2.43k|    do {                        \
  |  |   46|  2.43k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 25, False: 2.40k]
  |  |  ------------------
  |  |   47|     25|            avifBreakOnError(); \
  |  |   48|     25|            return ERR;         \
  |  |   49|     25|        }                       \
  |  |   50|  2.43k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 2.40k]
  |  |  ------------------
  ------------------
 2350|  2.40k|        if (tokenValue == AVIF_SAMPLE_TRANSFORM_CONSTANT) {
  ------------------
  |  Branch (2350:13): [True: 338, False: 2.07k]
  ------------------
 2351|    338|            token->type = AVIF_SAMPLE_TRANSFORM_CONSTANT;
 2352|       |            // Two's complement representation is assumed here.
 2353|    338|            uint32_t constant;
 2354|    338|            AVIF_CHECKERR(avifROStreamReadU32(s, &constant), AVIF_RESULT_BMFF_PARSE_FAILED); // signed int(1<<(bit_depth+3)) constant;
  ------------------
  |  |   45|    338|    do {                        \
  |  |   46|    338|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 2, False: 336]
  |  |  ------------------
  |  |   47|      2|            avifBreakOnError(); \
  |  |   48|      2|            return ERR;         \
  |  |   49|      2|        }                       \
  |  |   50|    338|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 336]
  |  |  ------------------
  ------------------
 2355|    336|            token->constant = (int32_t)constant;
 2356|  2.07k|        } else if (tokenValue <= AVIF_SAMPLE_TRANSFORM_LAST_INPUT_IMAGE_ITEM_INDEX) {
  ------------------
  |  Branch (2356:20): [True: 529, False: 1.54k]
  ------------------
 2357|    529|            AVIF_ASSERT_OR_RETURN(tokenValue >= AVIF_SAMPLE_TRANSFORM_FIRST_INPUT_IMAGE_ITEM_INDEX);
  ------------------
  |  |   64|    529|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    529|    do {                        \
  |  |  |  |   46|    529|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 529]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    529|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 529]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2358|    529|            token->type = AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX;
 2359|    529|            token->inputImageItemIndex = tokenValue;
 2360|  1.54k|        } else if (tokenValue >= AVIF_SAMPLE_TRANSFORM_FIRST_UNARY_OPERATOR && tokenValue <= AVIF_SAMPLE_TRANSFORM_LAST_UNARY_OPERATOR) {
  ------------------
  |  Branch (2360:20): [True: 1.37k, False: 166]
  |  Branch (2360:80): [True: 184, False: 1.19k]
  ------------------
 2361|    184|            token->type = (avifSampleTransformTokenType)tokenValue; // unary operator
 2362|  1.35k|        } else if (tokenValue >= AVIF_SAMPLE_TRANSFORM_FIRST_BINARY_OPERATOR && tokenValue <= AVIF_SAMPLE_TRANSFORM_LAST_BINARY_OPERATOR) {
  ------------------
  |  Branch (2362:20): [True: 952, False: 405]
  |  Branch (2362:81): [True: 582, False: 370]
  ------------------
 2363|    582|            token->type = (avifSampleTransformTokenType)tokenValue; // binary operator
 2364|    775|        } else {
 2365|    775|            token->type = AVIF_SAMPLE_TRANSFORM_RESERVED;
 2366|    775|        }
 2367|  2.40k|    }
 2368|    169|    AVIF_CHECKERR(avifROStreamRemainingBytes(s) == 0, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    169|    do {                        \
  |  |   46|    169|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 8, False: 161]
  |  |  ------------------
  |  |   47|      8|            avifBreakOnError(); \
  |  |   48|      8|            return ERR;         \
  |  |   49|      8|        }                       \
  |  |   50|    169|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 161]
  |  |  ------------------
  ------------------
 2369|    161|    return AVIF_RESULT_OK;
 2370|    169|}
read.c:avifDecoderSampleTransformItemValidateProperties:
 2419|    148|{
 2420|    148|    AVIF_ASSERT_OR_RETURN(memcmp(satoItem->type, "sato", 4) == 0);
  ------------------
  |  |   64|    148|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    148|    do {                        \
  |  |  |  |   46|    148|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 148]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    148|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 148]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2421|    148|    const avifProperty * pixiProp = avifPropertyArrayFind(&satoItem->properties, "pixi");
 2422|    148|    if (!pixiProp) {
  ------------------
  |  Branch (2422:9): [True: 1, False: 147]
  ------------------
 2423|      1|        avifDiagnosticsPrintf(diag, "Item ID %u of type 'sato' is missing mandatory pixi property", satoItem->id);
 2424|      1|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2425|      1|    }
 2426|    437|    for (uint8_t i = 1; i < pixiProp->u.pixi.planeCount; ++i) {
  ------------------
  |  Branch (2426:25): [True: 290, False: 147]
  ------------------
 2427|       |        // This is enforced in avifParsePixelInformationProperty().
 2428|    290|        AVIF_ASSERT_OR_RETURN(pixiProp->u.pixi.planeDepths[i] == pixiProp->u.pixi.planeDepths[0]);
  ------------------
  |  |   64|    290|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    290|    do {                        \
  |  |  |  |   46|    290|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 290]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    290|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 290]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2429|    290|    }
 2430|    147|    AVIF_ASSERT_OR_RETURN(pixiProp->u.pixi.planeCount >= 1);
  ------------------
  |  |   64|    147|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    147|    do {                        \
  |  |  |  |   46|    147|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 147]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    147|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 147]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2431|    147|    const uint8_t depth = pixiProp->u.pixi.planeDepths[0];
 2432|    147|    if (depth != 8 && depth != 10 && depth != 12 && depth != 16) {
  ------------------
  |  Branch (2432:9): [True: 146, False: 1]
  |  Branch (2432:23): [True: 146, False: 0]
  |  Branch (2432:38): [True: 144, False: 2]
  |  Branch (2432:53): [True: 0, False: 144]
  ------------------
 2433|      0|        avifDiagnosticsPrintf(diag,
 2434|      0|                              "Item ID %u of type 'sato' with depth %u (specified by pixi property) is not supported",
 2435|      0|                              satoItem->id,
 2436|      0|                              depth);
 2437|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 2438|      0|    }
 2439|       |
 2440|    147|    const avifProperty * ispeProp = avifPropertyArrayFind(&satoItem->properties, "ispe");
 2441|    147|    if (!ispeProp) {
  ------------------
  |  Branch (2441:9): [True: 3, False: 144]
  ------------------
 2442|      3|        avifDiagnosticsPrintf(diag, "Item ID %u of type 'sato' is missing mandatory ispe property", satoItem->id);
 2443|      3|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 2444|      3|    }
 2445|       |
 2446|       |    // Check that all input image items of the 'sato' derived image item share the same properties.
 2447|    144|    for (uint32_t i = 0; i < satoItem->meta->items.count; ++i) {
  ------------------
  |  Branch (2447:26): [True: 144, False: 0]
  ------------------
 2448|    144|        avifDecoderItem * inputImageItem = satoItem->meta->items.item[i];
 2449|    144|        if (!avifIsDimgInput(satoItem, inputImageItem->id, NULL)) {
  ------------------
  |  Branch (2449:13): [True: 0, False: 144]
  ------------------
 2450|      0|            continue;
 2451|      0|        }
 2452|       |
 2453|       |        // Require all input image items of the 'sato' derived image item to be associated with a ImageSpatialExtentsProperty.
 2454|    144|        const avifProperty * inputImageItemIspeProp = avifPropertyArrayFind(&inputImageItem->properties, "ispe");
 2455|    144|        if (inputImageItemIspeProp == NULL) {
  ------------------
  |  Branch (2455:13): [True: 0, False: 144]
  ------------------
 2456|      0|            avifDiagnosticsPrintf(diag, "Item ID %u is missing mandatory ispe property", inputImageItem->id);
 2457|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2458|      0|        }
 2459|       |
 2460|       |        // The codec configuration property must be present, at least on the first cell for a 'grid' item.
 2461|    144|        const avifProperty * inputImageItemCodecConfig = avifDecoderItemCodecConfigOrFirstCellCodecConfig(inputImageItem);
 2462|    144|        if (inputImageItemCodecConfig == NULL) {
  ------------------
  |  Branch (2462:13): [True: 1, False: 143]
  ------------------
 2463|      1|            avifDiagnosticsPrintf(diag,
 2464|      1|                                  "Item ID %u of type '%.4s' is missing mandatory codec configuration property",
 2465|      1|                                  inputImageItem->id,
 2466|      1|                                  (const char *)inputImageItem->type);
 2467|      1|            return AVIF_RESULT_BMFF_PARSE_FAILED;
 2468|      1|        }
 2469|       |
 2470|    424|        for (uint32_t j = i + 1; j < satoItem->meta->items.count; ++j) {
  ------------------
  |  Branch (2470:34): [True: 286, False: 138]
  ------------------
 2471|    286|            avifDecoderItem * otherInputImageItem = satoItem->meta->items.item[j];
 2472|    286|            if (!avifIsDimgInput(satoItem, otherInputImageItem->id, NULL)) {
  ------------------
  |  Branch (2472:17): [True: 143, False: 143]
  ------------------
 2473|    143|                continue;
 2474|    143|            }
 2475|       |
 2476|       |            // Require all input image items of the 'sato' derived image item to be associated with a ImageSpatialExtentsProperty.
 2477|    143|            const avifProperty * otherInputImageItemIspeProp = avifPropertyArrayFind(&otherInputImageItem->properties, "ispe");
 2478|    143|            if (otherInputImageItemIspeProp == NULL) {
  ------------------
  |  Branch (2478:17): [True: 0, False: 143]
  ------------------
 2479|      0|                avifDiagnosticsPrintf(diag,
 2480|      0|                                      "Item ID %u of type '%.4s' is missing mandatory ispe property",
 2481|      0|                                      otherInputImageItem->id,
 2482|      0|                                      (const char *)otherInputImageItem->type);
 2483|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2484|      0|            }
 2485|       |
 2486|    143|            if (inputImageItemIspeProp->u.ispe.width != otherInputImageItemIspeProp->u.ispe.width ||
  ------------------
  |  Branch (2486:17): [True: 0, False: 143]
  ------------------
 2487|    143|                inputImageItemIspeProp->u.ispe.height != otherInputImageItemIspeProp->u.ispe.height) {
  ------------------
  |  Branch (2487:17): [True: 0, False: 143]
  ------------------
 2488|      0|                avifDiagnosticsPrintf(diag,
 2489|      0|                                      "The fields of the ispe property of item ID %u of type '%.4s' differs from item ID %u",
 2490|      0|                                      inputImageItem->id,
 2491|      0|                                      (const char *)inputImageItem->type,
 2492|      0|                                      otherInputImageItem->id);
 2493|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2494|      0|            }
 2495|       |
 2496|       |            // The codec configuration property must be present, at least on the first cell for a 'grid' item.
 2497|    143|            const avifProperty * otherInputImageItemCodecConfig = avifDecoderItemCodecConfigOrFirstCellCodecConfig(otherInputImageItem);
 2498|    143|            if (otherInputImageItemCodecConfig == NULL) {
  ------------------
  |  Branch (2498:17): [True: 1, False: 142]
  ------------------
 2499|      1|                avifDiagnosticsPrintf(diag,
 2500|      1|                                      "Item ID %u of type '%.4s' is missing mandatory codec configuration property",
 2501|      1|                                      otherInputImageItem->id,
 2502|      1|                                      (const char *)otherInputImageItem->type);
 2503|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2504|      1|            }
 2505|       |
 2506|    142|            if (inputImageItemCodecConfig->u.av1C.monochrome != otherInputImageItemCodecConfig->u.av1C.monochrome ||
  ------------------
  |  Branch (2506:17): [True: 1, False: 141]
  ------------------
 2507|    141|                inputImageItemCodecConfig->u.av1C.chromaSubsamplingX != otherInputImageItemCodecConfig->u.av1C.chromaSubsamplingX ||
  ------------------
  |  Branch (2507:17): [True: 1, False: 140]
  ------------------
 2508|    140|                inputImageItemCodecConfig->u.av1C.chromaSubsamplingY != otherInputImageItemCodecConfig->u.av1C.chromaSubsamplingY ||
  ------------------
  |  Branch (2508:17): [True: 1, False: 139]
  ------------------
 2509|    139|                inputImageItemCodecConfig->u.av1C.chromaSamplePosition != otherInputImageItemCodecConfig->u.av1C.chromaSamplePosition) {
  ------------------
  |  Branch (2509:17): [True: 1, False: 138]
  ------------------
 2510|      4|                avifDiagnosticsPrintf(diag,
 2511|      4|                                      "The plane count or subsampling in the codec configuration property of item ID %u of type '%.4s' differs from item ID %u",
 2512|      4|                                      inputImageItem->id,
 2513|      4|                                      (const char *)inputImageItem->type,
 2514|      4|                                      otherInputImageItem->id);
 2515|      4|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 2516|      4|            }
 2517|       |
 2518|       |            // If the input image item of the 'sato' derived image item is itself a grid,
 2519|       |            // its own input image items will be checked in avifDecoderItemValidateProperties().
 2520|    142|        }
 2521|    138|        break;
 2522|    143|    }
 2523|       |
 2524|    138|    AVIF_CHECKERR(avifPropertyArrayFind(&satoItem->properties, "clap") == NULL, AVIF_RESULT_NOT_IMPLEMENTED);
  ------------------
  |  |   45|    138|    do {                        \
  |  |   46|    138|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 138]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    138|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 138]
  |  |  ------------------
  ------------------
 2525|    138|    return AVIF_RESULT_OK;
 2526|    138|}
read.c:avifDecoderItemCodecConfigOrFirstCellCodecConfig:
 2401|    287|{
 2402|    287|    if (!memcmp(item->type, "grid", 4)) {
  ------------------
  |  Branch (2402:9): [True: 0, False: 287]
  ------------------
 2403|       |        // In case of a grid, return the codec configuration property of the first cell.
 2404|       |        // avifDecoderAdoptGridTileCodecType() copies that property from the first cell to the grid item anyway.
 2405|      0|        for (uint32_t i = 0; i < item->meta->items.count; ++i) {
  ------------------
  |  Branch (2405:30): [True: 0, False: 0]
  ------------------
 2406|      0|            avifDecoderItem * inputImageItem = item->meta->items.item[i];
 2407|      0|            if (avifIsDimgInput(item, inputImageItem->id, NULL)) {
  ------------------
  |  Branch (2407:17): [True: 0, False: 0]
  ------------------
 2408|      0|                return avifPropertyArrayFind(&inputImageItem->properties,
 2409|      0|                                             avifGetConfigurationPropertyName(avifGetCodecType(inputImageItem->type)));
 2410|      0|            }
 2411|      0|        }
 2412|       |        // The number of tiles was verified in avifDecoderItemReadAndParse().
 2413|      0|        assert(AVIF_FALSE);
 2414|      0|    }
 2415|    287|    return avifPropertyArrayFind(&item->properties, avifGetConfigurationPropertyName(avifGetCodecType(item->type)));
 2416|    287|}
read.c:avifDecoderAdoptGridTileCodecTypeIfNeeded:
 1775|   279k|{
 1776|   279k|    if ((info->grid.rows > 0) && (info->grid.columns > 0)) {
  ------------------
  |  Branch (1776:9): [True: 20.9k, False: 258k]
  |  Branch (1776:34): [True: 20.9k, False: 0]
  ------------------
 1777|       |        // The number of tiles was verified in avifDecoderItemReadAndParse().
 1778|  20.9k|        const uint32_t numTiles = info->grid.rows * info->grid.columns;
 1779|  20.9k|        uint32_t * dimgIdxToItemIdx = (uint32_t *)avifAlloc(numTiles * sizeof(uint32_t));
 1780|  20.9k|        AVIF_CHECKERR(dimgIdxToItemIdx != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  20.9k|    do {                        \
  |  |   46|  20.9k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 20.9k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  20.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 20.9k]
  |  |  ------------------
  ------------------
 1781|  20.9k|        avifResult result = avifFillDimgIdxToItemIdxArray(dimgIdxToItemIdx, numTiles, item);
 1782|  20.9k|        if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (1782:13): [True: 20.9k, False: 0]
  ------------------
 1783|  20.9k|            result = avifDecoderAdoptGridTileCodecType(decoder, item, dimgIdxToItemIdx, numTiles);
 1784|  20.9k|        }
 1785|  20.9k|        avifFree(dimgIdxToItemIdx);
 1786|  20.9k|        AVIF_CHECKRES(result);
  ------------------
  |  |   54|  20.9k|    do {                                  \
  |  |   55|  20.9k|        const avifResult result__ = (A);  \
  |  |   56|  20.9k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 50, False: 20.8k]
  |  |  ------------------
  |  |   57|     50|            avifBreakOnError();           \
  |  |   58|     50|            return result__;              \
  |  |   59|     50|        }                                 \
  |  |   60|  20.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 20.8k]
  |  |  ------------------
  ------------------
 1787|  20.9k|    }
 1788|   279k|    return AVIF_RESULT_OK;
 1789|   279k|}
read.c:avifFillDimgIdxToItemIdxArray:
 1678|  41.8k|{
 1679|       |    // The input items of a derived item are kept in 'dimg' order, so a cell index is a
 1680|       |    // position in that list.
 1681|  41.8k|    AVIF_CHECKERR(gridItem->dimgInputs.count == numExpectedTiles, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  41.8k|    do {                        \
  |  |   46|  41.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 41.8k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  41.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 41.8k]
  |  |  ------------------
  ------------------
 1682|   131k|    for (uint32_t dimgIdx = 0; dimgIdx < numExpectedTiles; ++dimgIdx) {
  ------------------
  |  Branch (1682:32): [True: 89.3k, False: 41.8k]
  ------------------
 1683|  89.3k|        const uint32_t inputItemID = gridItem->dimgInputs.id[dimgIdx];
 1684|  89.3k|        uint32_t itemIdx = UINT32_MAX;
 1685|   318k|        for (uint32_t i = 0; i < gridItem->meta->items.count; ++i) {
  ------------------
  |  Branch (1685:30): [True: 318k, False: 0]
  ------------------
 1686|   318k|            if (gridItem->meta->items.item[i]->id == inputItemID) {
  ------------------
  |  Branch (1686:17): [True: 89.3k, False: 229k]
  ------------------
 1687|  89.3k|                itemIdx = i;
 1688|  89.3k|                break;
 1689|  89.3k|            }
 1690|   318k|        }
 1691|  89.3k|        AVIF_CHECKERR(itemIdx != UINT32_MAX, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  89.3k|    do {                        \
  |  |   46|  89.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 89.3k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  89.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 89.3k]
  |  |  ------------------
  ------------------
 1692|  89.3k|        dimgIdxToItemIdx[dimgIdx] = itemIdx;
 1693|  89.3k|    }
 1694|  41.8k|    return AVIF_RESULT_OK;
 1695|  41.8k|}
read.c:avifDecoderAdoptGridTileCodecType:
 1703|  20.9k|{
 1704|  20.9k|    avifDecoderItem * firstTileItem = NULL;
 1705|  65.5k|    for (uint32_t dimgIdx = 0; dimgIdx < numTiles; ++dimgIdx) {
  ------------------
  |  Branch (1705:32): [True: 44.6k, False: 20.8k]
  ------------------
 1706|  44.6k|        const uint32_t itemIdx = dimgIdxToItemIdx[dimgIdx];
 1707|  44.6k|        AVIF_ASSERT_OR_RETURN(itemIdx < gridItem->meta->items.count);
  ------------------
  |  |   64|  44.6k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  44.6k|    do {                        \
  |  |  |  |   46|  44.6k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 44.6k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  44.6k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 44.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1708|  44.6k|        avifDecoderItem * item = gridItem->meta->items.item[itemIdx];
 1709|       |
 1710|       |        // According to HEIF (ISO 14496-12), Section 6.6.2.3.1, the SingleItemTypeReferenceBox of type 'dimg'
 1711|       |        // identifies the input images of the derived image item of type 'grid'. Since the reference_count
 1712|       |        // shall be equal to rows*columns, unknown tile item types cannot be skipped but must be considered
 1713|       |        // as errors.
 1714|  44.6k|        const avifCodecType tileCodecType = avifGetCodecType(item->type);
 1715|  44.6k|        if (tileCodecType == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (1715:13): [True: 43, False: 44.6k]
  ------------------
 1716|     43|            char type[4];
 1717|    215|            for (int j = 0; j < 4; j++) {
  ------------------
  |  Branch (1717:29): [True: 172, False: 43]
  ------------------
 1718|    172|                if (isprint((unsigned char)item->type[j])) {
  ------------------
  |  Branch (1718:21): [True: 37, False: 135]
  ------------------
 1719|     37|                    type[j] = item->type[j];
 1720|    135|                } else {
 1721|    135|                    type[j] = '.';
 1722|    135|                }
 1723|    172|            }
 1724|     43|            avifDiagnosticsPrintf(&decoder->diag,
 1725|     43|                                  "Tile item ID %u has an unknown item type '%.4s' (%02x%02x%02x%02x)",
 1726|     43|                                  item->id,
 1727|     43|                                  type,
 1728|     43|                                  item->type[0],
 1729|     43|                                  item->type[1],
 1730|     43|                                  item->type[2],
 1731|     43|                                  item->type[3]);
 1732|     43|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1733|     43|        }
 1734|       |
 1735|  44.6k|        if (item->hasUnsupportedEssentialProperty) {
  ------------------
  |  Branch (1735:13): [True: 4, False: 44.6k]
  ------------------
 1736|       |            // An essential property isn't supported by libavif; can't
 1737|       |            // decode a grid image if any tile in the grid isn't supported.
 1738|      4|            avifDiagnosticsPrintf(&decoder->diag, "Grid image contains tile with an unsupported property marked as essential");
 1739|      4|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1740|      4|        }
 1741|       |
 1742|  44.6k|        if (firstTileItem == NULL) {
  ------------------
  |  Branch (1742:13): [True: 20.9k, False: 23.7k]
  ------------------
 1743|  20.9k|            firstTileItem = item;
 1744|       |            // Adopt the configuration property of the first image item tile, so that it can be queried from
 1745|       |            // the top-level color/alpha item during avifDecoderReset().
 1746|  20.9k|            const avifCodecType codecType = avifGetCodecType(item->type);
 1747|  20.9k|            const char * configPropName = avifGetConfigurationPropertyName(codecType);
 1748|  20.9k|            const avifProperty * srcProp = avifPropertyArrayFind(&item->properties, configPropName);
 1749|  20.9k|            if (!srcProp) {
  ------------------
  |  Branch (1749:17): [True: 3, False: 20.8k]
  ------------------
 1750|      3|                avifDiagnosticsPrintf(&decoder->diag, "Grid image's first tile is missing an %s property", configPropName);
 1751|      3|                return AVIF_RESULT_INVALID_IMAGE_GRID;
 1752|      3|            }
 1753|  20.8k|            avifProperty * dstProp = (avifProperty *)avifArrayPush(&gridItem->properties);
 1754|  20.8k|            AVIF_CHECKERR(dstProp != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  20.8k|    do {                        \
  |  |   46|  20.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 20.8k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  20.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 20.8k]
  |  |  ------------------
  ------------------
 1755|  20.8k|            *dstProp = *srcProp;
 1756|       |
 1757|  23.7k|        } else if (memcmp(item->type, firstTileItem->type, 4)) {
  ------------------
  |  Branch (1757:20): [True: 0, False: 23.7k]
  ------------------
 1758|       |            // MIAF (ISO 23000-22:2019), Section 7.3.11.4.1:
 1759|       |            //   All input images of a grid image item shall use the same coding format [...]
 1760|       |            // The coding format is defined by the item type.
 1761|      0|            avifDiagnosticsPrintf(&decoder->diag,
 1762|      0|                                  "Tile item ID %u of type '%.4s' differs from other tile type '%.4s'",
 1763|      0|                                  item->id,
 1764|      0|                                  (const char *)item->type,
 1765|      0|                                  (const char *)firstTileItem->type);
 1766|      0|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1767|      0|        }
 1768|  44.6k|    }
 1769|  20.8k|    return AVIF_RESULT_OK;
 1770|  20.9k|}
read.c:avifDecoderGenerateImageTiles:
 6133|   279k|{
 6134|   279k|    const uint32_t previousTileCount = decoder->data->tiles.count;
 6135|   279k|    if ((info->grid.rows > 0) && (info->grid.columns > 0)) {
  ------------------
  |  Branch (6135:9): [True: 20.8k, False: 258k]
  |  Branch (6135:34): [True: 20.8k, False: 0]
  ------------------
 6136|       |        // The number of tiles was verified in avifDecoderItemReadAndParse().
 6137|  20.8k|        const uint32_t numTiles = info->grid.rows * info->grid.columns;
 6138|  20.8k|        uint32_t * dimgIdxToItemIdx = (uint32_t *)avifAlloc(numTiles * sizeof(uint32_t));
 6139|  20.8k|        AVIF_CHECKERR(dimgIdxToItemIdx != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  20.8k|    do {                        \
  |  |   46|  20.8k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 20.8k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  20.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 20.8k]
  |  |  ------------------
  ------------------
 6140|  20.8k|        avifResult result = avifFillDimgIdxToItemIdxArray(dimgIdxToItemIdx, numTiles, item);
 6141|  20.8k|        if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (6141:13): [True: 20.8k, False: 0]
  ------------------
 6142|  20.8k|            result = avifDecoderGenerateImageGridTiles(decoder, item, itemCategory, dimgIdxToItemIdx, numTiles);
 6143|  20.8k|        }
 6144|  20.8k|        avifFree(dimgIdxToItemIdx);
 6145|  20.8k|        AVIF_CHECKRES(result);
  ------------------
  |  |   54|  20.8k|    do {                                  \
  |  |   55|  20.8k|        const avifResult result__ = (A);  \
  |  |   56|  20.8k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 7, False: 20.8k]
  |  |  ------------------
  |  |   57|      7|            avifBreakOnError();           \
  |  |   58|      7|            return result__;              \
  |  |   59|      7|        }                                 \
  |  |   60|  20.8k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 20.8k]
  |  |  ------------------
  ------------------
 6146|   258k|    } else {
 6147|   258k|        AVIF_CHECKERR(item->size != 0, AVIF_RESULT_MISSING_IMAGE_ITEM);
  ------------------
  |  |   45|   258k|    do {                        \
  |  |   46|   258k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 258k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   258k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 258k]
  |  |  ------------------
  ------------------
 6148|       |
 6149|   258k|        const avifCodecType codecType = avifGetCodecType(item->type);
 6150|   258k|        AVIF_ASSERT_OR_RETURN(codecType != AVIF_CODEC_TYPE_UNKNOWN);
  ------------------
  |  |   64|   258k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   258k|    do {                        \
  |  |  |  |   46|   258k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 258k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   258k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 258k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6151|   258k|        avifTile * tile =
 6152|   258k|            avifDecoderDataCreateTile(decoder->data, codecType, item->width, item->height, avifDecoderItemOperatingPoint(item));
 6153|   258k|        AVIF_CHECKERR(tile, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   258k|    do {                        \
  |  |   46|   258k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 258k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   258k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 258k]
  |  |  ------------------
  ------------------
 6154|   258k|        AVIF_CHECKRES(avifCodecDecodeInputFillFromDecoderItem(tile->input,
  ------------------
  |  |   54|   258k|    do {                                  \
  |  |   55|   258k|        const avifResult result__ = (A);  \
  |  |   56|   258k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 496, False: 257k]
  |  |  ------------------
  |  |   57|    496|            avifBreakOnError();           \
  |  |   58|    496|            return result__;              \
  |  |   59|    496|        }                                 \
  |  |   60|   258k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 257k]
  |  |  ------------------
  ------------------
 6155|   258k|                                                              item,
 6156|   258k|                                                              decoder->allowProgressive,
 6157|   258k|                                                              decoder->imageCountLimit,
 6158|   258k|                                                              decoder->io->sizeHint,
 6159|   258k|                                                              &decoder->diag));
 6160|   257k|        tile->input->itemCategory = itemCategory;
 6161|   257k|    }
 6162|   278k|    info->tileCount = decoder->data->tiles.count - previousTileCount;
 6163|   278k|    return AVIF_RESULT_OK;
 6164|   279k|}
read.c:avifDecoderGenerateImageGridTiles:
 1797|  20.8k|{
 1798|  20.8k|    avifBool progressive = AVIF_TRUE;
  ------------------
  |  |   88|  20.8k|#define AVIF_TRUE 1
  ------------------
 1799|  65.3k|    for (uint32_t dimgIdx = 0; dimgIdx < numTiles; ++dimgIdx) {
  ------------------
  |  Branch (1799:32): [True: 44.5k, False: 20.8k]
  ------------------
 1800|  44.5k|        const uint32_t itemIdx = dimgIdxToItemIdx[dimgIdx];
 1801|  44.5k|        AVIF_ASSERT_OR_RETURN(itemIdx < gridItem->meta->items.count);
  ------------------
  |  |   64|  44.5k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  44.5k|    do {                        \
  |  |  |  |   46|  44.5k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 44.5k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  44.5k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 44.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1802|  44.5k|        avifDecoderItem * item = gridItem->meta->items.item[itemIdx];
 1803|       |
 1804|  44.5k|        const avifCodecType tileCodecType = avifGetCodecType(item->type);
 1805|  44.5k|        AVIF_CHECKERR(tileCodecType != AVIF_CODEC_TYPE_UNKNOWN, AVIF_RESULT_INVALID_IMAGE_GRID);
  ------------------
  |  |   45|  44.5k|    do {                        \
  |  |   46|  44.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 44.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  44.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 44.5k]
  |  |  ------------------
  ------------------
 1806|  44.5k|        const avifTile * tile =
 1807|  44.5k|            avifDecoderDataCreateTile(decoder->data, tileCodecType, item->width, item->height, avifDecoderItemOperatingPoint(item));
 1808|  44.5k|        AVIF_CHECKERR(tile != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  44.5k|    do {                        \
  |  |   46|  44.5k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 44.5k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  44.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 44.5k]
  |  |  ------------------
  ------------------
 1809|  44.5k|        AVIF_CHECKRES(avifCodecDecodeInputFillFromDecoderItem(tile->input,
  ------------------
  |  |   54|  44.5k|    do {                                  \
  |  |   55|  44.5k|        const avifResult result__ = (A);  \
  |  |   56|  44.5k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 7, False: 44.4k]
  |  |  ------------------
  |  |   57|      7|            avifBreakOnError();           \
  |  |   58|      7|            return result__;              \
  |  |   59|      7|        }                                 \
  |  |   60|  44.5k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 44.4k]
  |  |  ------------------
  ------------------
 1810|  44.5k|                                                              item,
 1811|  44.5k|                                                              decoder->allowProgressive,
 1812|  44.5k|                                                              decoder->imageCountLimit,
 1813|  44.5k|                                                              decoder->io->sizeHint,
 1814|  44.5k|                                                              &decoder->diag));
 1815|  44.4k|        tile->input->itemCategory = itemCategory;
 1816|       |
 1817|  44.4k|        if (!item->progressive) {
  ------------------
  |  Branch (1817:13): [True: 44.4k, False: 0]
  ------------------
 1818|  44.4k|            progressive = AVIF_FALSE;
  ------------------
  |  |   89|  44.4k|#define AVIF_FALSE 0
  ------------------
 1819|  44.4k|        }
 1820|  44.4k|    }
 1821|  20.8k|    if (itemCategory == AVIF_ITEM_COLOR && progressive) {
  ------------------
  |  Branch (1821:9): [True: 16.4k, False: 4.45k]
  |  Branch (1821:44): [True: 0, False: 16.4k]
  ------------------
 1822|       |        // If all the items that make up the grid are progressive, then propagate that status to the top-level grid item.
 1823|      0|        gridItem->progressive = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
 1824|      0|    }
 1825|  20.8k|    return AVIF_RESULT_OK;
 1826|  20.8k|}
read.c:avifDecoderItemOperatingPoint:
 1329|   302k|{
 1330|   302k|    const avifProperty * a1opProp = avifPropertyArrayFind(&item->properties, "a1op");
 1331|   302k|    if (a1opProp) {
  ------------------
  |  Branch (1331:9): [True: 0, False: 302k]
  ------------------
 1332|      0|        return a1opProp->u.a1op.opIndex;
 1333|      0|    }
 1334|   302k|    return 0; // default
 1335|   302k|}
read.c:avifCodecDecodeInputFillFromDecoderItem:
  691|   302k|{
  692|   302k|    if (sizeHint && (item->size > sizeHint)) {
  ------------------
  |  Branch (692:9): [True: 117k, False: 184k]
  |  Branch (692:21): [True: 497, False: 117k]
  ------------------
  693|    497|        avifDiagnosticsPrintf(diag, "Exceeded avifIO's sizeHint, possibly truncated data");
  694|    497|        return AVIF_RESULT_BMFF_PARSE_FAILED;
  695|    497|    }
  696|       |
  697|   302k|    uint8_t layerCount = 0;
  698|   302k|    size_t layerSizes[4] = { 0 };
  699|   302k|    const avifProperty * a1lxProp = avifPropertyArrayFind(&item->properties, "a1lx");
  700|   302k|    if (a1lxProp) {
  ------------------
  |  Branch (700:9): [True: 202, False: 302k]
  ------------------
  701|       |        // Calculate layer count and all layer sizes from the a1lx box, and then validate
  702|       |
  703|    202|        size_t remainingSize = item->size;
  704|    424|        for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (704:25): [True: 421, False: 3]
  ------------------
  705|    421|            ++layerCount;
  706|       |
  707|    421|            const size_t layerSize = (size_t)a1lxProp->u.a1lx.layerSize[i];
  708|    421|            if (layerSize) {
  ------------------
  |  Branch (708:17): [True: 228, False: 193]
  ------------------
  709|    228|                if (layerSize >= remainingSize) { // >= instead of > because there must be room for the last layer
  ------------------
  |  Branch (709:21): [True: 6, False: 222]
  ------------------
  710|      6|                    avifDiagnosticsPrintf(diag, "a1lx layer index [%d] does not fit in item size", i);
  711|      6|                    return AVIF_RESULT_BMFF_PARSE_FAILED;
  712|      6|                }
  713|    222|                layerSizes[i] = layerSize;
  714|    222|                remainingSize -= layerSize;
  715|    222|            } else {
  716|    193|                layerSizes[i] = remainingSize;
  717|    193|                remainingSize = 0;
  718|    193|                break;
  719|    193|            }
  720|    421|        }
  721|    196|        if (remainingSize > 0) {
  ------------------
  |  Branch (721:13): [True: 3, False: 193]
  ------------------
  722|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  723|      3|            ++layerCount;
  724|      3|            layerSizes[3] = remainingSize;
  725|      3|        }
  726|    196|    }
  727|       |
  728|   302k|    const avifProperty * lselProp = avifPropertyArrayFind(&item->properties, "lsel");
  729|       |    // Progressive images offer layers via the a1lxProp, but don't specify a layer selection with lsel.
  730|       |    //
  731|       |    // For backward compatibility with earlier drafts of AVIF spec v1.1.0, treat an absent lsel as
  732|       |    // equivalent to layer_id == 0xFFFF during the transitional period. Remove !lselProp when the test
  733|       |    // images have been updated to the v1.1.0 spec.
  734|   302k|    item->progressive = (a1lxProp && (!lselProp || (lselProp->u.lsel.layerID == 0xFFFF)));
  ------------------
  |  Branch (734:26): [True: 196, False: 302k]
  |  Branch (734:39): [True: 196, False: 0]
  |  Branch (734:52): [True: 0, False: 0]
  ------------------
  735|   302k|    if (lselProp && (lselProp->u.lsel.layerID != 0xFFFF)) {
  ------------------
  |  Branch (735:9): [True: 0, False: 302k]
  |  Branch (735:21): [True: 0, False: 0]
  ------------------
  736|       |        // Layer selection. This requires that the underlying AV1 codec decodes all layers,
  737|       |        // and then only returns the requested layer as a single frame. To the user of libavif,
  738|       |        // this appears to be a single frame.
  739|       |
  740|      0|        decodeInput->allLayers = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
  741|       |
  742|      0|        size_t sampleSize = 0;
  743|      0|        if (layerCount > 0) {
  ------------------
  |  Branch (743:13): [True: 0, False: 0]
  ------------------
  744|       |            // Optimization: If we're selecting a layer that doesn't require the entire image's payload (hinted via the a1lx box)
  745|       |
  746|      0|            if (lselProp->u.lsel.layerID >= layerCount) {
  ------------------
  |  Branch (746:17): [True: 0, False: 0]
  ------------------
  747|      0|                avifDiagnosticsPrintf(diag,
  748|      0|                                      "lsel property requests layer index [%u] which isn't present in a1lx property ([%u] layers)",
  749|      0|                                      lselProp->u.lsel.layerID,
  750|      0|                                      layerCount);
  751|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
  752|      0|            }
  753|       |
  754|      0|            for (uint8_t i = 0; i <= lselProp->u.lsel.layerID; ++i) {
  ------------------
  |  Branch (754:33): [True: 0, False: 0]
  ------------------
  755|      0|                sampleSize += layerSizes[i];
  756|      0|            }
  757|      0|        } else {
  758|       |            // This layer's payload subsection is unknown, just use the whole payload
  759|      0|            sampleSize = item->size;
  760|      0|        }
  761|       |
  762|      0|        avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  763|      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]
  |  |  ------------------
  ------------------
  764|      0|        sample->itemID = item->id;
  765|      0|        sample->offset = 0;
  766|      0|        sample->size = sampleSize;
  767|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  768|      0|        sample->spatialID = (uint8_t)lselProp->u.lsel.layerID;
  769|      0|        sample->sync = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
  770|   302k|    } else if (allowProgressive && item->progressive) {
  ------------------
  |  Branch (770:16): [True: 0, False: 302k]
  |  Branch (770:36): [True: 0, False: 0]
  ------------------
  771|       |        // Progressive image. Decode all layers and expose them all to the user.
  772|       |
  773|      0|        if (imageCountLimit && (layerCount > imageCountLimit)) {
  ------------------
  |  Branch (773:13): [True: 0, False: 0]
  |  Branch (773:32): [True: 0, False: 0]
  ------------------
  774|      0|            avifDiagnosticsPrintf(diag, "Exceeded avifDecoder's imageCountLimit (progressive)");
  775|      0|            return AVIF_RESULT_BMFF_PARSE_FAILED;
  776|      0|        }
  777|       |
  778|      0|        decodeInput->allLayers = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
  779|       |
  780|      0|        size_t offset = 0;
  781|      0|        for (int i = 0; i < layerCount; ++i) {
  ------------------
  |  Branch (781:25): [True: 0, False: 0]
  ------------------
  782|      0|            avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  783|      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]
  |  |  ------------------
  ------------------
  784|      0|            sample->itemID = item->id;
  785|      0|            sample->offset = offset;
  786|      0|            sample->size = layerSizes[i];
  787|      0|            sample->spatialID = AVIF_SPATIAL_ID_UNSET;
  ------------------
  |  |  468|      0|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  788|      0|            sample->sync = (i == 0); // Assume all layers depend on the first layer
  789|       |
  790|      0|            offset += layerSizes[i];
  791|      0|        }
  792|   302k|    } else {
  793|       |        // Typical case: Use the entire item's payload for a single frame output
  794|       |
  795|   302k|        avifDecodeSample * sample = (avifDecodeSample *)avifArrayPush(&decodeInput->samples);
  796|   302k|        AVIF_CHECKERR(sample != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|   302k|    do {                        \
  |  |   46|   302k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 302k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|   302k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 302k]
  |  |  ------------------
  ------------------
  797|   302k|        sample->itemID = item->id;
  798|   302k|        sample->offset = 0;
  799|   302k|        sample->size = item->size;
  800|   302k|        sample->spatialID = AVIF_SPATIAL_ID_UNSET;
  ------------------
  |  |  468|   302k|#define AVIF_SPATIAL_ID_UNSET 0xff
  ------------------
  801|   302k|        sample->sync = AVIF_TRUE;
  ------------------
  |  |   88|   302k|#define AVIF_TRUE 1
  ------------------
  802|   302k|    }
  803|   302k|    return AVIF_RESULT_OK;
  804|   302k|}
read.c:avifDecoderItemValidateProperties:
 1341|   278k|{
 1342|   278k|    const avifProperty * const configProp = avifPropertyArrayFind(&item->properties, configPropName);
 1343|   278k|    if (!configProp) {
  ------------------
  |  Branch (1343:9): [True: 3, False: 278k]
  ------------------
 1344|       |        // An item configuration property box is mandatory in all valid AVIF configurations. Bail out.
 1345|      3|        avifDiagnosticsPrintf(diag, "Item ID %u of type '%.4s' is missing mandatory %s property", item->id, (const char *)item->type, configPropName);
 1346|      3|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 1347|      3|    }
 1348|       |
 1349|   278k|    if (!memcmp(item->type, "grid", 4)) {
  ------------------
  |  Branch (1349:9): [True: 20.8k, False: 257k]
  ------------------
 1350|   154k|        for (uint32_t i = 0; i < item->meta->items.count; ++i) {
  ------------------
  |  Branch (1350:30): [True: 133k, False: 20.8k]
  ------------------
 1351|   133k|            avifDecoderItem * tile = item->meta->items.item[i];
 1352|   133k|            if (!avifIsDimgInput(item, tile->id, NULL)) {
  ------------------
  |  Branch (1352:17): [True: 89.5k, False: 44.4k]
  ------------------
 1353|  89.5k|                continue;
 1354|  89.5k|            }
 1355|       |            // Tile item types were checked in avifDecoderGenerateImageTiles(), no need to do it here.
 1356|       |
 1357|       |            // MIAF (ISO 23000-22:2019), Section 7.3.11.4.1:
 1358|       |            //   All input images of a grid image item shall use the same [...] chroma sampling format,
 1359|       |            //   and the same decoder configuration (see 7.3.6.2).
 1360|       |
 1361|       |            // The chroma sampling format is part of the decoder configuration.
 1362|  44.4k|            const avifProperty * tileConfigProp = avifPropertyArrayFind(&tile->properties, configPropName);
 1363|  44.4k|            if (!tileConfigProp) {
  ------------------
  |  Branch (1363:17): [True: 3, False: 44.4k]
  ------------------
 1364|      3|                avifDiagnosticsPrintf(diag,
 1365|      3|                                      "Tile item ID %u of type '%.4s' is missing mandatory %s property",
 1366|      3|                                      tile->id,
 1367|      3|                                      (const char *)tile->type,
 1368|      3|                                      configPropName);
 1369|      3|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1370|      3|            }
 1371|       |            // configProp was copied from a tile item to the grid item. Comparing tileConfigProp with it
 1372|       |            // is equivalent to comparing tileConfigProp with the configPropName from the first tile.
 1373|  44.4k|            if ((tileConfigProp->u.av1C.seqProfile != configProp->u.av1C.seqProfile) ||
  ------------------
  |  Branch (1373:17): [True: 2, False: 44.4k]
  ------------------
 1374|  44.4k|                (tileConfigProp->u.av1C.seqLevelIdx0 != configProp->u.av1C.seqLevelIdx0) ||
  ------------------
  |  Branch (1374:17): [True: 1, False: 44.4k]
  ------------------
 1375|  44.4k|                (tileConfigProp->u.av1C.seqTier0 != configProp->u.av1C.seqTier0) ||
  ------------------
  |  Branch (1375:17): [True: 1, False: 44.4k]
  ------------------
 1376|  44.4k|                (tileConfigProp->u.av1C.highBitdepth != configProp->u.av1C.highBitdepth) ||
  ------------------
  |  Branch (1376:17): [True: 1, False: 44.4k]
  ------------------
 1377|  44.4k|                (tileConfigProp->u.av1C.twelveBit != configProp->u.av1C.twelveBit) ||
  ------------------
  |  Branch (1377:17): [True: 1, False: 44.4k]
  ------------------
 1378|  44.4k|                (tileConfigProp->u.av1C.monochrome != configProp->u.av1C.monochrome) ||
  ------------------
  |  Branch (1378:17): [True: 1, False: 44.4k]
  ------------------
 1379|  44.4k|                (tileConfigProp->u.av1C.chromaSubsamplingX != configProp->u.av1C.chromaSubsamplingX) ||
  ------------------
  |  Branch (1379:17): [True: 1, False: 44.4k]
  ------------------
 1380|  44.4k|                (tileConfigProp->u.av1C.chromaSubsamplingY != configProp->u.av1C.chromaSubsamplingY) ||
  ------------------
  |  Branch (1380:17): [True: 1, False: 44.4k]
  ------------------
 1381|  44.4k|                (tileConfigProp->u.av1C.chromaSamplePosition != configProp->u.av1C.chromaSamplePosition)) {
  ------------------
  |  Branch (1381:17): [True: 1, False: 44.4k]
  ------------------
 1382|     10|                avifDiagnosticsPrintf(diag,
 1383|     10|                                      "The fields of the %s property of tile item ID %u of type '%.4s' differs from other tiles",
 1384|     10|                                      configPropName,
 1385|     10|                                      tile->id,
 1386|     10|                                      (const char *)tile->type);
 1387|     10|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1388|     10|            }
 1389|  44.4k|        }
 1390|  20.8k|    }
 1391|       |
 1392|   278k|    const avifProperty * pixiProp = avifPropertyArrayFind(&item->properties, "pixi");
 1393|   278k|    if (!pixiProp && (strictFlags & AVIF_STRICT_PIXI_REQUIRED)) {
  ------------------
  |  Branch (1393:9): [True: 4.36k, False: 274k]
  |  Branch (1393:22): [True: 36, False: 4.32k]
  ------------------
 1394|       |        // A pixi box is mandatory in all valid AVIF configurations. Bail out.
 1395|     36|        avifDiagnosticsPrintf(diag,
 1396|     36|                              "[Strict] Item ID %u of type '%.4s' is missing mandatory pixi property",
 1397|     36|                              item->id,
 1398|     36|                              (const char *)item->type);
 1399|     36|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 1400|     36|    }
 1401|       |
 1402|   278k|    if (pixiProp) {
  ------------------
  |  Branch (1402:9): [True: 274k, False: 4.32k]
  ------------------
 1403|   274k|        const uint32_t configDepth = avifCodecConfigurationBoxGetDepth(&configProp->u.av1C);
 1404|  1.03M|        for (uint8_t i = 0; i < pixiProp->u.pixi.planeCount; ++i) {
  ------------------
  |  Branch (1404:29): [True: 760k, False: 274k]
  ------------------
 1405|   760k|            if (pixiProp->u.pixi.planeDepths[i] != configDepth) {
  ------------------
  |  Branch (1405:17): [True: 2, False: 760k]
  ------------------
 1406|       |                // pixi depth must match configuration property depth
 1407|      2|                avifDiagnosticsPrintf(diag,
 1408|      2|                                      "Item ID %u depth specified by pixi property [%u] does not match %s property depth [%u]",
 1409|      2|                                      item->id,
 1410|      2|                                      pixiProp->u.pixi.planeDepths[i],
 1411|      2|                                      configPropName,
 1412|      2|                                      configDepth);
 1413|      2|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1414|      2|            }
 1415|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI)
 1416|       |            if (pixiProp->u.pixi.subsamplingFlag[i]) {
 1417|       |                if (pixiProp->u.pixi.subsamplingType[i] != avifCodecConfigurationBoxGetSubsamplingType(&configProp->u.av1C, i)) {
 1418|       |                    avifDiagnosticsPrintf(diag,
 1419|       |                                          "Item ID %u subsampling type specified by pixi property [%u] for channel %u does not match %s property [%u,%u]",
 1420|       |                                          item->id,
 1421|       |                                          pixiProp->u.pixi.subsamplingType[i],
 1422|       |                                          i,
 1423|       |                                          configPropName,
 1424|       |                                          configProp->u.av1C.chromaSubsamplingX,
 1425|       |                                          configProp->u.av1C.chromaSubsamplingY);
 1426|       |                    return AVIF_RESULT_BMFF_PARSE_FAILED;
 1427|       |                }
 1428|       |                if (configProp->u.av1C.chromaSamplePosition != AVIF_CHROMA_SAMPLE_POSITION_UNKNOWN) {
 1429|       |                    const avifChromaSamplePosition expectedChromaSamplePosition =
 1430|       |                        i == AVIF_CHAN_Y ? AVIF_CHROMA_SAMPLE_POSITION_COLOCATED : configProp->u.av1C.chromaSamplePosition;
 1431|       |                    if (avifSubsamplingLocationToChromaSamplePosition(pixiProp->u.pixi.subsamplingType[i],
 1432|       |                                                                      pixiProp->u.pixi.subsamplingLocation[i]) !=
 1433|       |                        expectedChromaSamplePosition) {
 1434|       |                        avifDiagnosticsPrintf(diag,
 1435|       |                                              "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]",
 1436|       |                                              item->id,
 1437|       |                                              pixiProp->u.pixi.subsamplingType[i],
 1438|       |                                              pixiProp->u.pixi.subsamplingLocation[i],
 1439|       |                                              i,
 1440|       |                                              configPropName,
 1441|       |                                              configProp->u.av1C.chromaSamplePosition);
 1442|       |                        return AVIF_RESULT_BMFF_PARSE_FAILED;
 1443|       |                    }
 1444|       |                }
 1445|       |            }
 1446|       |#endif // AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI
 1447|   760k|        }
 1448|   274k|    }
 1449|       |
 1450|       |#if defined(AVIF_ENABLE_EXPERIMENTAL_MINI)
 1451|       |    if (item->miniBoxPixelFormat != AVIF_PIXEL_FORMAT_NONE) {
 1452|       |        // This is a MinimizedImageBox ('mini').
 1453|       |
 1454|       |        avifPixelFormat av1CPixelFormat;
 1455|       |        if (configProp->u.av1C.monochrome) {
 1456|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV400;
 1457|       |        } else if (configProp->u.av1C.chromaSubsamplingY == 1) {
 1458|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV420;
 1459|       |        } else if (configProp->u.av1C.chromaSubsamplingX == 1) {
 1460|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV422;
 1461|       |        } else {
 1462|       |            av1CPixelFormat = AVIF_PIXEL_FORMAT_YUV444;
 1463|       |        }
 1464|       |        if (item->miniBoxPixelFormat != av1CPixelFormat) {
 1465|       |            avifDiagnosticsPrintf(diag,
 1466|       |                                  "Item ID %u format [%s] specified by MinimizedImageBox does not match %s property format [%s]",
 1467|       |                                  item->id,
 1468|       |                                  avifPixelFormatToString(item->miniBoxPixelFormat),
 1469|       |                                  configPropName,
 1470|       |                                  avifPixelFormatToString(av1CPixelFormat));
 1471|       |            return AVIF_RESULT_BMFF_PARSE_FAILED;
 1472|       |        }
 1473|       |
 1474|       |        if (configProp->u.av1C.chromaSamplePosition == /*CSP_UNKNOWN=*/0) {
 1475|       |            // Section 6.4.2. Color config semantics of AV1 specification says:
 1476|       |            //   CSP_UNKNOWN - the source video transfer function must be signaled outside the AV1 bitstream
 1477|       |            // See https://aomediacodec.github.io/av1-spec/#color-config-semantics
 1478|       |
 1479|       |            // So item->miniBoxChromaSamplePosition can differ and will override the AV1 value.
 1480|       |        } else if ((uint8_t)item->miniBoxChromaSamplePosition != configProp->u.av1C.chromaSamplePosition) {
 1481|       |            avifDiagnosticsPrintf(diag,
 1482|       |                                  "Item ID %u chroma sample position [%u] specified by MinimizedImageBox does not match %s property chroma sample position [%u]",
 1483|       |                                  item->id,
 1484|       |                                  (uint32_t)item->miniBoxChromaSamplePosition,
 1485|       |                                  configPropName,
 1486|       |                                  configProp->u.av1C.chromaSamplePosition);
 1487|       |            return AVIF_RESULT_BMFF_PARSE_FAILED;
 1488|       |        }
 1489|       |    }
 1490|       |#endif // AVIF_ENABLE_EXPERIMENTAL_MINI
 1491|       |
 1492|   278k|    if (strictFlags & AVIF_STRICT_CLAP_VALID) {
  ------------------
  |  Branch (1492:9): [True: 278k, False: 0]
  ------------------
 1493|   278k|        const avifProperty * clapProp = avifPropertyArrayFind(&item->properties, "clap");
 1494|   278k|        if (clapProp) {
  ------------------
  |  Branch (1494:13): [True: 276, False: 278k]
  ------------------
 1495|    276|            const avifProperty * ispeProp = avifPropertyArrayFind(&item->properties, "ispe");
 1496|    276|            if (!ispeProp) {
  ------------------
  |  Branch (1496:17): [True: 0, False: 276]
  ------------------
 1497|      0|                avifDiagnosticsPrintf(diag,
 1498|      0|                                      "[Strict] Item ID %u is missing an ispe property, so its clap property cannot be validated",
 1499|      0|                                      item->id);
 1500|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1501|      0|            }
 1502|       |
 1503|    276|            avifCropRect cropRect;
 1504|    276|            const uint32_t imageW = ispeProp->u.ispe.width;
 1505|    276|            const uint32_t imageH = ispeProp->u.ispe.height;
 1506|    276|            const avifBool validClap = avifCropRectFromCleanApertureBox(&cropRect, &clapProp->u.clap, imageW, imageH, diag);
 1507|    276|            if (!validClap) {
  ------------------
  |  Branch (1507:17): [True: 151, False: 125]
  ------------------
 1508|    151|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 1509|    151|            }
 1510|    276|        }
 1511|   278k|    }
 1512|   278k|    return AVIF_RESULT_OK;
 1513|   278k|}
read.c:avifCodecConfigurationBoxGetDepth:
  453|   287k|{
  454|   287k|    if (av1C->twelveBit) {
  ------------------
  |  Branch (454:9): [True: 21.4k, False: 266k]
  ------------------
  455|  21.4k|        return 12;
  456|   266k|    } else if (av1C->highBitdepth) {
  ------------------
  |  Branch (456:16): [True: 13.4k, False: 252k]
  ------------------
  457|  13.4k|        return 10;
  458|  13.4k|    }
  459|   252k|    return 8;
  460|   287k|}
read.c:avifGetConfigurationPropertyName:
   58|   313k|{
   59|   313k|    static const char kUnknown[] = "****";
   60|   313k|    switch (codecType) {
   61|   313k|        case AVIF_CODEC_TYPE_AV1:
  ------------------
  |  Branch (61:9): [True: 313k, False: 0]
  ------------------
   62|   313k|            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: 313k]
  ------------------
   68|       |            assert(AVIF_FALSE);
   69|      0|            return kUnknown; // Easier to deal with than NULL.
   70|   313k|    }
   71|   313k|}
read.c:avifReadCodecConfigProperty:
 6168|  13.5k|{
 6169|  13.5k|    const avifProperty * configProp = avifPropertyArrayFind(properties, avifGetConfigurationPropertyName(codecType));
 6170|  13.5k|    if (configProp) {
  ------------------
  |  Branch (6170:9): [True: 13.5k, False: 10]
  ------------------
 6171|  13.5k|        image->depth = avifCodecConfigurationBoxGetDepth(&configProp->u.av1C);
 6172|  13.5k|        if (configProp->u.av1C.monochrome) {
  ------------------
  |  Branch (6172:13): [True: 660, False: 12.8k]
  ------------------
 6173|    660|            image->yuvFormat = AVIF_PIXEL_FORMAT_YUV400;
 6174|  12.8k|        } else {
 6175|  12.8k|            if (configProp->u.av1C.chromaSubsamplingX && configProp->u.av1C.chromaSubsamplingY) {
  ------------------
  |  Branch (6175:17): [True: 5.46k, False: 7.39k]
  |  Branch (6175:58): [True: 3.04k, False: 2.42k]
  ------------------
 6176|  3.04k|                image->yuvFormat = AVIF_PIXEL_FORMAT_YUV420;
 6177|  9.81k|            } else if (configProp->u.av1C.chromaSubsamplingX) {
  ------------------
  |  Branch (6177:24): [True: 2.42k, False: 7.39k]
  ------------------
 6178|  2.42k|                image->yuvFormat = AVIF_PIXEL_FORMAT_YUV422;
 6179|  7.39k|            } else {
 6180|  7.39k|                image->yuvFormat = AVIF_PIXEL_FORMAT_YUV444;
 6181|  7.39k|            }
 6182|  12.8k|        }
 6183|  13.5k|        image->yuvChromaSamplePosition = (avifChromaSamplePosition)configProp->u.av1C.chromaSamplePosition;
 6184|  13.5k|    } else {
 6185|       |        // A configuration property box is mandatory in all valid AVIF configurations. Bail out.
 6186|     10|        return AVIF_RESULT_BMFF_PARSE_FAILED;
 6187|     10|    }
 6188|  13.5k|    return AVIF_RESULT_OK;
 6189|  13.5k|}
read.c:avifReadColorProperties:
 5780|   284k|{
 5781|       |    // Find and adopt all colr boxes "at most one for a given value of colour type" (HEIF 6.5.5.1, from Amendment 3)
 5782|       |    // Accept one of each type, and bail out if more than one of a given type is provided.
 5783|   284k|    avifBool colrICCSeen = AVIF_FALSE;
  ------------------
  |  |   89|   284k|#define AVIF_FALSE 0
  ------------------
 5784|  1.49M|    for (uint32_t propertyIndex = 0; propertyIndex < properties->count; ++propertyIndex) {
  ------------------
  |  Branch (5784:38): [True: 1.21M, False: 284k]
  ------------------
 5785|  1.21M|        avifProperty * prop = &properties->prop[propertyIndex];
 5786|  1.21M|        if (!memcmp(prop->type, "colr", 4) && prop->u.colr.hasICC) {
  ------------------
  |  Branch (5786:13): [True: 69.2k, False: 1.14M]
  |  Branch (5786:47): [True: 61, False: 69.2k]
  ------------------
 5787|     61|            if (colrICCSeen) {
  ------------------
  |  Branch (5787:17): [True: 1, False: 60]
  ------------------
 5788|      1|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5789|      1|            }
 5790|     60|            if (icc) {
  ------------------
  |  Branch (5790:17): [True: 60, False: 0]
  ------------------
 5791|     60|                avifROData iccRead;
 5792|     60|                AVIF_CHECKRES(io->read(io, 0, prop->u.colr.iccOffset, prop->u.colr.iccSize, &iccRead));
  ------------------
  |  |   54|     60|    do {                                  \
  |  |   55|     60|        const avifResult result__ = (A);  \
  |  |   56|     60|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 60]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
 5793|     60|                AVIF_CHECKRES(avifRWDataSet(icc, iccRead.data, iccRead.size));
  ------------------
  |  |   54|     60|    do {                                  \
  |  |   55|     60|        const avifResult result__ = (A);  \
  |  |   56|     60|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 60]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|     60|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 60]
  |  |  ------------------
  ------------------
 5794|     60|            }
 5795|     60|            colrICCSeen = AVIF_TRUE;
  ------------------
  |  |   88|     60|#define AVIF_TRUE 1
  ------------------
 5796|     60|        }
 5797|  1.21M|    }
 5798|   284k|    return avifReadColorNclxProperty(properties, colorPrimaries, transferCharacteristics, matrixCoefficients, yuvRange, cicpSet);
 5799|   284k|}
read.c:avifDecoderCheckAlphaProperties:
 6036|  28.2k|{
 6037|  28.2k|    const avifImage * image = decoder->image;
 6038|       |    // The 'clap', 'irot' and 'imir' transformative properties should be applied to the alpha
 6039|       |    // auxiliary image item before considering it a plane of the color image item.
 6040|       |    // Alternatively, inequality with the transformative properties attached to the color image item
 6041|       |    // should be treated as AVIF_RESULT_NOT_IMPLEMENTED.
 6042|       |    // The latter is easier and is the behavior of libavif.
 6043|       |
 6044|  28.2k|    const avifProperty * clapProp = avifPropertyArrayFind(alphaProperties, "clap");
 6045|  28.2k|    const avifProperty * irotProp = avifPropertyArrayFind(alphaProperties, "irot");
 6046|  28.2k|    const avifProperty * imirProp = avifPropertyArrayFind(alphaProperties, "imir");
 6047|  28.2k|    if (clapProp == NULL && irotProp == NULL && imirProp == NULL) {
  ------------------
  |  Branch (6047:9): [True: 28.2k, False: 0]
  |  Branch (6047:29): [True: 28.2k, False: 3]
  |  Branch (6047:49): [True: 28.2k, False: 0]
  ------------------
 6048|       |        // However, libavif up to version 1.3.0 generated images lacking transformative property
 6049|       |        // associations with alpha auxiliary image items, so be lenient on their absence for
 6050|       |        // backward compatibility with previously generated images.
 6051|  28.2k|        return AVIF_RESULT_OK;
 6052|  28.2k|    }
 6053|       |
 6054|       |    // HEIF (ISO/IEC 23008-12), Section 6.9.1:
 6055|       |    //   When the width or the height of the alpha plane differs from the width or the height of the
 6056|       |    //   master image, respectively, the alpha plane is resized to have the same width and height as
 6057|       |    //   those of the master image.
 6058|       |    // There is no need to enforce specific 'ispe' values describing the alpha item because
 6059|       |    // the alpha item must be resized to the dimensions of the associated color item.
 6060|       |
 6061|      3|    if (!clapProp != !(image->transformFlags & AVIF_TRANSFORM_CLAP) ||
  ------------------
  |  Branch (6061:9): [True: 0, False: 3]
  ------------------
 6062|      3|        (clapProp && (clapProp->u.clap.widthN != image->clap.widthN || clapProp->u.clap.widthD != image->clap.widthD ||
  ------------------
  |  Branch (6062:10): [True: 0, False: 3]
  |  Branch (6062:23): [True: 0, False: 0]
  |  Branch (6062:72): [True: 0, False: 0]
  ------------------
 6063|      0|                      clapProp->u.clap.heightN != image->clap.heightN || clapProp->u.clap.heightD != image->clap.heightD ||
  ------------------
  |  Branch (6063:23): [True: 0, False: 0]
  |  Branch (6063:74): [True: 0, False: 0]
  ------------------
 6064|      0|                      clapProp->u.clap.horizOffN != image->clap.horizOffN || clapProp->u.clap.horizOffD != image->clap.horizOffD ||
  ------------------
  |  Branch (6064:23): [True: 0, False: 0]
  |  Branch (6064:78): [True: 0, False: 0]
  ------------------
 6065|      0|                      clapProp->u.clap.vertOffN != image->clap.vertOffN || clapProp->u.clap.vertOffD != image->clap.vertOffD))) {
  ------------------
  |  Branch (6065:23): [True: 0, False: 0]
  |  Branch (6065:76): [True: 0, False: 0]
  ------------------
 6066|      0|        avifDiagnosticsPrintf(&decoder->diag, "Clean aperture property mismatch between alpha auxiliary image item and color item");
 6067|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 6068|      0|    }
 6069|      3|    if (!irotProp != !(image->transformFlags & AVIF_TRANSFORM_IROT) || (irotProp && irotProp->u.irot.angle != image->irot.angle)) {
  ------------------
  |  Branch (6069:9): [True: 1, False: 2]
  |  Branch (6069:73): [True: 2, False: 0]
  |  Branch (6069:85): [True: 0, False: 2]
  ------------------
 6070|      1|        avifDiagnosticsPrintf(&decoder->diag, "Rotation property mismatch between alpha auxiliary image item and color item");
 6071|      1|        return AVIF_RESULT_NOT_IMPLEMENTED;
 6072|      1|    }
 6073|      2|    if (!imirProp != !(image->transformFlags & AVIF_TRANSFORM_IMIR) || (imirProp && imirProp->u.imir.axis != image->imir.axis)) {
  ------------------
  |  Branch (6073:9): [True: 0, False: 2]
  |  Branch (6073:73): [True: 0, False: 2]
  |  Branch (6073:85): [True: 0, False: 0]
  ------------------
 6074|      0|        avifDiagnosticsPrintf(&decoder->diag, "Mirroring property mismatch between alpha auxiliary image item and color item");
 6075|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 6076|      0|    }
 6077|      2|    return AVIF_RESULT_OK;
 6078|      2|}
read.c:avifDecoderCheckGainMapProperties:
 6081|    107|{
 6082|    107|    const avifImage * image = decoder->image;
 6083|       |    // libavif requires the bitstream contain the same 'pasp', 'clap', 'irot', 'imir'
 6084|       |    // properties for both the base and gain map image items used as input to
 6085|       |    // the tone-mapped derived image item. libavif also requires the tone-mapped
 6086|       |    // derived image item itself not be associated with these properties. This is
 6087|       |    // enforced at encoding. Other patterns are rejected at decoding.
 6088|    107|    const avifProperty * paspProp = avifPropertyArrayFind(gainMapProperties, "pasp");
 6089|    107|    if (!paspProp != !(image->transformFlags & AVIF_TRANSFORM_PASP) ||
  ------------------
  |  Branch (6089:9): [True: 0, False: 107]
  ------------------
 6090|    107|        (paspProp && (paspProp->u.pasp.hSpacing != image->pasp.hSpacing || paspProp->u.pasp.vSpacing != image->pasp.vSpacing))) {
  ------------------
  |  Branch (6090:10): [True: 0, False: 107]
  |  Branch (6090:23): [True: 0, False: 0]
  |  Branch (6090:76): [True: 0, False: 0]
  ------------------
 6091|      0|        avifDiagnosticsPrintf(&decoder->diag,
 6092|      0|                              "Pixel aspect ratio property mismatch between input items of tone-mapping derived image item");
 6093|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 6094|      0|    }
 6095|    107|    const avifProperty * clapProp = avifPropertyArrayFind(gainMapProperties, "clap");
 6096|    107|    if (!clapProp != !(image->transformFlags & AVIF_TRANSFORM_CLAP) ||
  ------------------
  |  Branch (6096:9): [True: 0, False: 107]
  ------------------
 6097|    107|        (clapProp && (clapProp->u.clap.widthN != image->clap.widthN || clapProp->u.clap.widthD != image->clap.widthD ||
  ------------------
  |  Branch (6097:10): [True: 0, False: 107]
  |  Branch (6097:23): [True: 0, False: 0]
  |  Branch (6097:72): [True: 0, False: 0]
  ------------------
 6098|      0|                      clapProp->u.clap.heightN != image->clap.heightN || clapProp->u.clap.heightD != image->clap.heightD ||
  ------------------
  |  Branch (6098:23): [True: 0, False: 0]
  |  Branch (6098:74): [True: 0, False: 0]
  ------------------
 6099|      0|                      clapProp->u.clap.horizOffN != image->clap.horizOffN || clapProp->u.clap.horizOffD != image->clap.horizOffD ||
  ------------------
  |  Branch (6099:23): [True: 0, False: 0]
  |  Branch (6099:78): [True: 0, False: 0]
  ------------------
 6100|      0|                      clapProp->u.clap.vertOffN != image->clap.vertOffN || clapProp->u.clap.vertOffD != image->clap.vertOffD))) {
  ------------------
  |  Branch (6100:23): [True: 0, False: 0]
  |  Branch (6100:76): [True: 0, False: 0]
  ------------------
 6101|      0|        avifDiagnosticsPrintf(&decoder->diag, "Clean aperture property mismatch between input items of tone-mapping derived image item");
 6102|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 6103|      0|    }
 6104|    107|    const avifProperty * irotProp = avifPropertyArrayFind(gainMapProperties, "irot");
 6105|    107|    if (!irotProp != !(image->transformFlags & AVIF_TRANSFORM_IROT) || (irotProp && irotProp->u.irot.angle != image->irot.angle)) {
  ------------------
  |  Branch (6105:9): [True: 0, False: 107]
  |  Branch (6105:73): [True: 0, False: 107]
  |  Branch (6105:85): [True: 0, False: 0]
  ------------------
 6106|      0|        avifDiagnosticsPrintf(&decoder->diag, "Rotation property mismatch between input items of tone-mapping derived image item");
 6107|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 6108|      0|    }
 6109|    107|    const avifProperty * imirProp = avifPropertyArrayFind(gainMapProperties, "imir");
 6110|    107|    if (!imirProp != !(image->transformFlags & AVIF_TRANSFORM_IMIR) || (imirProp && imirProp->u.imir.axis != image->imir.axis)) {
  ------------------
  |  Branch (6110:9): [True: 0, False: 107]
  |  Branch (6110:73): [True: 0, False: 107]
  |  Branch (6110:85): [True: 0, False: 0]
  ------------------
 6111|      0|        avifDiagnosticsPrintf(&decoder->diag, "Mirroring property mismatch between input items of tone-mapping derived image item");
 6112|      0|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 6113|      0|    }
 6114|    107|    return AVIF_RESULT_OK;
 6115|    107|}
read.c:avifDecoderPrepareSample:
 5330|  1.00M|{
 5331|  1.00M|    if (!sample->data.size || sample->partialData) {
  ------------------
  |  Branch (5331:9): [True: 363k, False: 645k]
  |  Branch (5331:31): [True: 641k, False: 3.97k]
  ------------------
 5332|       |        // This sample hasn't been read from IO or had its extents fully merged yet.
 5333|       |
 5334|  1.00M|        size_t bytesToRead = sample->size;
 5335|  1.00M|        if (partialByteCount && (bytesToRead > partialByteCount)) {
  ------------------
  |  Branch (5335:13): [True: 666k, False: 338k]
  |  Branch (5335:33): [True: 626k, False: 40.0k]
  ------------------
 5336|   626k|            bytesToRead = partialByteCount;
 5337|   626k|        }
 5338|       |
 5339|  1.00M|        if (sample->itemID) {
  ------------------
  |  Branch (5339:13): [True: 941k, False: 63.4k]
  ------------------
 5340|       |            // The data comes from an item. Let avifDecoderItemRead() do the heavy lifting.
 5341|       |
 5342|   941k|            avifDecoderItem * item;
 5343|   941k|            AVIF_CHECKRES(avifMetaFindOrCreateItem(decoder->data->meta, sample->itemID, &item));
  ------------------
  |  |   54|   941k|    do {                                  \
  |  |   55|   941k|        const avifResult result__ = (A);  \
  |  |   56|   941k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 941k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|   941k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 941k]
  |  |  ------------------
  ------------------
 5344|   941k|            avifROData itemContents;
 5345|       |#if UINT64_MAX > SIZE_MAX
 5346|       |            if (sample->offset > SIZE_MAX) {
 5347|       |                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5348|       |            }
 5349|       |#endif
 5350|   941k|            size_t offset = (size_t)sample->offset;
 5351|   941k|            avifResult readResult = avifDecoderItemRead(item, decoder->io, &itemContents, offset, bytesToRead, &decoder->diag);
 5352|   941k|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5352:17): [True: 548k, False: 392k]
  ------------------
 5353|   548k|                return readResult;
 5354|   548k|            }
 5355|       |
 5356|       |            // avifDecoderItemRead is guaranteed to already be persisted by either the underlying IO
 5357|       |            // or by mergedExtents; just reuse the buffer here.
 5358|   392k|            sample->data = itemContents;
 5359|   392k|            sample->ownsData = AVIF_FALSE;
  ------------------
  |  |   89|   392k|#define AVIF_FALSE 0
  ------------------
 5360|   392k|            sample->partialData = item->partialMergedExtents;
 5361|   392k|        } else {
 5362|       |            // The data likely comes from a sample table. Pull the sample and make a copy if necessary.
 5363|       |
 5364|  63.4k|            avifROData sampleContents;
 5365|  63.4k|            if ((decoder->io->sizeHint > 0) && (sample->offset > decoder->io->sizeHint)) {
  ------------------
  |  Branch (5365:17): [True: 23.8k, False: 39.6k]
  |  Branch (5365:48): [True: 0, False: 23.8k]
  ------------------
 5366|      0|                return AVIF_RESULT_BMFF_PARSE_FAILED;
 5367|      0|            }
 5368|  63.4k|            avifResult readResult = decoder->io->read(decoder->io, 0, sample->offset, bytesToRead, &sampleContents);
 5369|  63.4k|            if (readResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (5369:17): [True: 47.3k, False: 16.1k]
  ------------------
 5370|  47.3k|                return readResult;
 5371|  47.3k|            }
 5372|  16.1k|            if (sampleContents.size != bytesToRead) {
  ------------------
  |  Branch (5372:17): [True: 0, False: 16.1k]
  ------------------
 5373|      0|                return AVIF_RESULT_TRUNCATED_DATA;
 5374|      0|            }
 5375|       |
 5376|  16.1k|            sample->ownsData = !decoder->io->persistent;
 5377|  16.1k|            sample->partialData = (bytesToRead != sample->size);
 5378|  16.1k|            if (decoder->io->persistent) {
  ------------------
  |  Branch (5378:17): [True: 8.54k, False: 7.60k]
  ------------------
 5379|  8.54k|                sample->data = sampleContents;
 5380|  8.54k|            } else {
 5381|  7.60k|                AVIF_CHECKRES(avifRWDataSet((avifRWData *)&sample->data, sampleContents.data, sampleContents.size));
  ------------------
  |  |   54|  7.60k|    do {                                  \
  |  |   55|  7.60k|        const avifResult result__ = (A);  \
  |  |   56|  7.60k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 7.60k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  7.60k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 7.60k]
  |  |  ------------------
  ------------------
 5382|  7.60k|            }
 5383|  16.1k|        }
 5384|  1.00M|    }
 5385|   412k|    return AVIF_RESULT_OK;
 5386|  1.00M|}
read.c:avifDecoderDataFrameFullyDecoded:
 7018|   613k|{
 7019|   671k|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (7019:21): [True: 664k, False: 7.17k]
  ------------------
 7020|   664k|        if (data->tileInfos[c].decodedTileCount != data->tileInfos[c].tileCount) {
  ------------------
  |  Branch (7020:13): [True: 605k, False: 58.8k]
  ------------------
 7021|   605k|            return AVIF_FALSE;
  ------------------
  |  |   89|   605k|#define AVIF_FALSE 0
  ------------------
 7022|   605k|        }
 7023|   664k|    }
 7024|  7.17k|    return AVIF_TRUE;
  ------------------
  |  |   88|  7.17k|#define AVIF_TRUE 1
  ------------------
 7025|   613k|}
read.c:avifDecoderCreateCodecs:
 5531|  13.2k|{
 5532|  13.2k|    avifDecoderData * data = decoder->data;
 5533|  13.2k|    avifDecoderDataResetCodec(data);
 5534|       |
 5535|  13.2k|    if (data->source == AVIF_DECODER_SOURCE_TRACKS) {
  ------------------
  |  Branch (5535:9): [True: 644, False: 12.6k]
  ------------------
 5536|       |        // In this case, we will use at most two codec instances (one for the color planes and one for the alpha plane).
 5537|       |        // Gain maps are not supported.
 5538|    644|        AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, &decoder->data->tiles.tile[0], &decoder->diag, &data->codec));
  ------------------
  |  |   54|    644|    do {                                  \
  |  |   55|    644|        const avifResult result__ = (A);  \
  |  |   56|    644|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 644]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|    644|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 644]
  |  |  ------------------
  ------------------
 5539|    644|        data->tiles.tile[0].codec = data->codec;
 5540|    644|        if (data->tiles.count > 1) {
  ------------------
  |  Branch (5540:13): [True: 9, False: 635]
  ------------------
 5541|      9|            AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, &decoder->data->tiles.tile[1], &decoder->diag, &data->codecAlpha));
  ------------------
  |  |   54|      9|    do {                                  \
  |  |   55|      9|        const avifResult result__ = (A);  \
  |  |   56|      9|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 9]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 9]
  |  |  ------------------
  ------------------
 5542|      9|            data->tiles.tile[1].codec = data->codecAlpha;
 5543|      9|        }
 5544|  12.6k|    } else {
 5545|       |        // In this case, we will use one codec instance when there is only one tile or when all of the following conditions are
 5546|       |        // met:
 5547|       |        //   - The image must have exactly one layer (i.e. decoder->imageCount == 1).
 5548|       |        //   - All the tiles must have the same operating point (because the codecs take operating point once at initialization
 5549|       |        //     and do not allow it to be changed later).
 5550|       |        //   - All the tiles must have the same value for allLayers (because the codecs take allLayers once at initialization
 5551|       |        //     and do not allow it to be changed later).
 5552|       |        //   - If the image has a single tile, it must not have a single tile alpha plane (in this case we will steal the planes
 5553|       |        //     from the decoder, so we cannot use the same decoder for both the color and the alpha planes).
 5554|       |        //   - All tiles have the same type (AV1 or AV2).
 5555|       |        //   - No tile buffer access after another tile was decoded (i.e. no Sample Transform compositing because it happens
 5556|       |        //     after decoding all tiles).
 5557|       |        // Otherwise, we will use |tiles.count| decoder instances (one instance for each tile).
 5558|  12.6k|        const avifBool canUseSingleCodecInstance =
 5559|  12.6k|            ((data->tiles.count == 1) || (decoder->imageCount == 1 && avifTilesCanBeDecodedWithSameCodecInstance(data))) &&
  ------------------
  |  Branch (5559:14): [True: 11.6k, False: 947]
  |  Branch (5559:43): [True: 947, False: 0]
  |  Branch (5559:71): [True: 275, False: 672]
  ------------------
 5560|  11.9k|            data->sampleTransformNumInputImageItems == 0;
  ------------------
  |  Branch (5560:13): [True: 11.9k, False: 0]
  ------------------
 5561|  12.6k|        if (canUseSingleCodecInstance) {
  ------------------
  |  Branch (5561:13): [True: 11.9k, False: 672]
  ------------------
 5562|  11.9k|            AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, &decoder->data->tiles.tile[0], &decoder->diag, &data->codec));
  ------------------
  |  |   54|  11.9k|    do {                                  \
  |  |   55|  11.9k|        const avifResult result__ = (A);  \
  |  |   56|  11.9k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 11.9k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  11.9k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 11.9k]
  |  |  ------------------
  ------------------
 5563|  26.8k|            for (unsigned int i = 0; i < decoder->data->tiles.count; ++i) {
  ------------------
  |  Branch (5563:38): [True: 14.8k, False: 11.9k]
  ------------------
 5564|  14.8k|                decoder->data->tiles.tile[i].codec = data->codec;
 5565|  14.8k|            }
 5566|  11.9k|        } else {
 5567|  2.31k|            for (unsigned int i = 0; i < decoder->data->tiles.count; ++i) {
  ------------------
  |  Branch (5567:38): [True: 1.63k, False: 672]
  ------------------
 5568|  1.63k|                avifTile * tile = &decoder->data->tiles.tile[i];
 5569|  1.63k|                AVIF_CHECKRES(avifCodecCreateInternal(decoder->codecChoice, tile, &decoder->diag, &tile->codec));
  ------------------
  |  |   54|  1.63k|    do {                                  \
  |  |   55|  1.63k|        const avifResult result__ = (A);  \
  |  |   56|  1.63k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 1.63k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  1.63k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 1.63k]
  |  |  ------------------
  ------------------
 5570|  1.63k|            }
 5571|    672|        }
 5572|  12.6k|    }
 5573|  13.2k|    return AVIF_RESULT_OK;
 5574|  13.2k|}
read.c:avifCodecCreateInternal:
 5465|  14.2k|{
 5466|       |#if defined(AVIF_CODEC_AVM)
 5467|       |    // AVIF_CODEC_CHOICE_AUTO leads to AVIF_CODEC_TYPE_AV1 by default. Reroute correctly.
 5468|       |    if (choice == AVIF_CODEC_CHOICE_AUTO && tile->codecType == AVIF_CODEC_TYPE_AV2) {
 5469|       |        choice = AVIF_CODEC_CHOICE_AVM;
 5470|       |    }
 5471|       |#endif
 5472|       |
 5473|  14.2k|    const avifCodecType codecTypeFromChoice = avifCodecTypeFromChoice(choice, AVIF_CODEC_FLAG_CAN_DECODE);
 5474|  14.2k|    if (codecTypeFromChoice == AVIF_CODEC_TYPE_UNKNOWN) {
  ------------------
  |  Branch (5474:9): [True: 0, False: 14.2k]
  ------------------
 5475|      0|        avifDiagnosticsPrintf(diag,
 5476|      0|                              "Tile type is %s but there is no compatible codec available to decode it",
 5477|      0|                              avifGetConfigurationPropertyName(tile->codecType));
 5478|      0|        return AVIF_RESULT_NO_CODEC_AVAILABLE;
 5479|  14.2k|    } else if (choice != AVIF_CODEC_CHOICE_AUTO && codecTypeFromChoice != tile->codecType) {
  ------------------
  |  Branch (5479:16): [True: 0, False: 14.2k]
  |  Branch (5479:52): [True: 0, False: 0]
  ------------------
 5480|      0|        avifDiagnosticsPrintf(diag,
 5481|      0|                              "Tile type is %s but incompatible %s codec was explicitly set as decoding implementation",
 5482|      0|                              avifGetConfigurationPropertyName(tile->codecType),
 5483|      0|                              avifCodecName(choice, AVIF_CODEC_FLAG_CAN_DECODE));
 5484|      0|        return AVIF_RESULT_DECODE_COLOR_FAILED;
 5485|      0|    }
 5486|       |
 5487|  14.2k|    AVIF_CHECKRES(avifCodecCreate(choice, AVIF_CODEC_FLAG_CAN_DECODE, codec));
  ------------------
  |  |   54|  14.2k|    do {                                  \
  |  |   55|  14.2k|        const avifResult result__ = (A);  \
  |  |   56|  14.2k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 0, False: 14.2k]
  |  |  ------------------
  |  |   57|      0|            avifBreakOnError();           \
  |  |   58|      0|            return result__;              \
  |  |   59|      0|        }                                 \
  |  |   60|  14.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 14.2k]
  |  |  ------------------
  ------------------
 5488|  14.2k|    AVIF_CHECKERR(*codec, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|  14.2k|    do {                        \
  |  |   46|  14.2k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 14.2k]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|  14.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 14.2k]
  |  |  ------------------
  ------------------
 5489|  14.2k|    (*codec)->diag = diag;
 5490|  14.2k|    (*codec)->operatingPoint = tile->operatingPoint;
 5491|  14.2k|    (*codec)->allLayers = tile->input->allLayers;
 5492|  14.2k|    return AVIF_RESULT_OK;
 5493|  14.2k|}
read.c:avifTilesCanBeDecodedWithSameCodecInstance:
 5496|    947|{
 5497|    947|    int32_t numImageBuffers = 0, numStolenImageBuffers = 0;
 5498|  8.52k|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (5498:21): [True: 7.57k, False: 947]
  ------------------
 5499|  7.57k|        if (data->tileInfos[c].tileCount > 0) {
  ------------------
  |  Branch (5499:13): [True: 1.73k, False: 5.83k]
  ------------------
 5500|  1.73k|            ++numImageBuffers;
 5501|  1.73k|        }
 5502|       |        // The sample operations require multiple buffers for compositing so no plane is stolen
 5503|       |        // when there is a 'sato' Sample Transform derived image item.
 5504|  7.57k|        if (c >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY && c <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY && data->tileInfos[c].tileCount > 0) {
  ------------------
  |  |  435|  15.1k|#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) {
  ------------------
  |  |  437|  11.3k|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS - 1)
  |  |  ------------------
  |  |  |  |  431|  3.78k|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (5504:13): [True: 3.78k, False: 3.78k]
  |  Branch (5504:56): [True: 3.78k, False: 0]
  |  Branch (5504:99): [True: 136, False: 3.65k]
  ------------------
 5505|    136|            continue;
 5506|    136|        }
 5507|  7.44k|        if (data->tileInfos[c].tileCount == 1) {
  ------------------
  |  Branch (5507:13): [True: 1.18k, False: 6.25k]
  ------------------
 5508|  1.18k|            ++numStolenImageBuffers;
 5509|  1.18k|        }
 5510|  7.44k|    }
 5511|    947|    if (numStolenImageBuffers > 0 && numImageBuffers > 1) {
  ------------------
  |  Branch (5511:9): [True: 672, False: 275]
  |  Branch (5511:38): [True: 672, False: 0]
  ------------------
 5512|       |        // 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
 5513|       |        // "stolen". Stealing either the color or the alpha plane (or gain map) will invalidate the other ones when decode is called the second
 5514|       |        // (or third) time.
 5515|    672|        return AVIF_FALSE;
  ------------------
  |  |   89|    672|#define AVIF_FALSE 0
  ------------------
 5516|    672|    }
 5517|    275|    const uint8_t firstTileOperatingPoint = data->tiles.tile[0].operatingPoint;
 5518|    275|    const avifBool firstTileAllLayers = data->tiles.tile[0].input->allLayers;
 5519|  3.22k|    for (unsigned int i = 1; i < data->tiles.count; ++i) {
  ------------------
  |  Branch (5519:30): [True: 2.94k, False: 275]
  ------------------
 5520|  2.94k|        const avifTile * tile = &data->tiles.tile[i];
 5521|  2.94k|        if (tile->operatingPoint != firstTileOperatingPoint || tile->input->allLayers != firstTileAllLayers) {
  ------------------
  |  Branch (5521:13): [True: 0, False: 2.94k]
  |  Branch (5521:64): [True: 0, False: 2.94k]
  ------------------
 5522|      0|            return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
 5523|      0|        }
 5524|       |        // avifDecoderItemValidateProperties() verified during avifDecoderParse() that all tiles
 5525|       |        // share the same coding format so no need to check for codecType equality here.
 5526|  2.94k|    }
 5527|    275|    return AVIF_TRUE;
  ------------------
  |  |   88|    275|#define AVIF_TRUE 1
  ------------------
 5528|    275|}
read.c:avifDecoderPrepareTiles:
 6817|  2.47M|{
 6818|  2.49M|    for (unsigned int tileIndex = info->decodedTileCount; tileIndex < info->tileCount; ++tileIndex) {
  ------------------
  |  Branch (6818:59): [True: 342k, False: 2.15M]
  ------------------
 6819|   342k|        avifTile * tile = &decoder->data->tiles.tile[info->firstTileIndex + tileIndex];
 6820|       |
 6821|   342k|        if (nextImageIndex >= tile->input->samples.count) {
  ------------------
  |  Branch (6821:13): [True: 0, False: 342k]
  ------------------
 6822|      0|            return AVIF_RESULT_NO_IMAGES_REMAINING;
 6823|      0|        }
 6824|       |
 6825|   342k|        avifDecodeSample * sample = &tile->input->samples.sample[nextImageIndex];
 6826|   342k|        avifResult prepareResult = avifDecoderPrepareSample(decoder, sample, 0);
 6827|   342k|        if (prepareResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6827:13): [True: 325k, False: 16.9k]
  ------------------
 6828|   325k|            return prepareResult;
 6829|   325k|        }
 6830|   342k|    }
 6831|  2.15M|    return AVIF_RESULT_OK;
 6832|  2.47M|}
read.c:avifDecoderDecodeTiles:
 6888|  2.43M|{
 6889|  2.43M|    const unsigned int oldDecodedTileCount = info->decodedTileCount;
 6890|  2.44M|    for (unsigned int tileIndex = oldDecodedTileCount; tileIndex < info->tileCount; ++tileIndex) {
  ------------------
  |  Branch (6890:56): [True: 341k, False: 2.10M]
  ------------------
 6891|   341k|        avifTile * tile = &decoder->data->tiles.tile[info->firstTileIndex + tileIndex];
 6892|       |
 6893|   341k|        const avifDecodeSample * sample = &tile->input->samples.sample[nextImageIndex];
 6894|   341k|        if (sample->data.size < sample->size) {
  ------------------
  |  Branch (6894:13): [True: 325k, False: 16.0k]
  ------------------
 6895|   325k|            AVIF_ASSERT_OR_RETURN(decoder->allowIncremental);
  ------------------
  |  |   64|   325k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   325k|    do {                        \
  |  |  |  |   46|   325k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 325k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   325k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 325k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6896|       |            // Data is missing but there is no error yet. Output available pixel rows.
 6897|   325k|            return AVIF_RESULT_OK;
 6898|   325k|        }
 6899|       |
 6900|  16.0k|        avifBool isLimitedRangeAlpha = AVIF_FALSE;
  ------------------
  |  |   89|  16.0k|#define AVIF_FALSE 0
  ------------------
 6901|  16.0k|        tile->codec->maxThreads = decoder->maxThreads;
 6902|  16.0k|        tile->codec->imageSizeLimit = decoder->imageSizeLimit;
 6903|  16.0k|        tile->codec->imageDimensionLimit = decoder->imageDimensionLimit;
 6904|  16.0k|        if (!tile->codec->getNextImage(tile->codec, sample, avifIsAlpha(tile->input->itemCategory), &isLimitedRangeAlpha, tile->image)) {
  ------------------
  |  Branch (6904:13): [True: 5.90k, False: 10.1k]
  ------------------
 6905|  5.90k|            avifDiagnosticsPrintf(&decoder->diag, "tile->codec->getNextImage() failed");
 6906|  5.90k|            return avifGetErrorForItemCategory(tile->input->itemCategory);
 6907|  5.90k|        }
 6908|       |
 6909|       |        // Section 2.3.4 of AV1 Codec ISO Media File Format Binding v1.2.0 says:
 6910|       |        //   the full_range_flag in the colr box shall match the color_range
 6911|       |        //   flag in the Sequence Header OBU.
 6912|       |        // See https://aomediacodec.github.io/av1-isobmff/v1.2.0.html#av1codecconfigurationbox-semantics.
 6913|       |        // If a 'colr' box of colour_type 'nclx' was parsed, a mismatch between
 6914|       |        // the 'colr' decoder->image->yuvRange and the AV1 OBU
 6915|       |        // tile->image->yuvRange should be treated as an error.
 6916|       |        // However codec_svt.c was not encoding the color_range field for
 6917|       |        // multiple years, so there probably are files in the wild that will
 6918|       |        // fail decoding if this is enforced. Thus this pattern is allowed.
 6919|       |        // Section 12.1.5.1 of ISO 14496-12 (ISOBMFF) says:
 6920|       |        //   If colour information is supplied in both this [colr] box, and also
 6921|       |        //   in the video bitstream, this box takes precedence, and over-rides
 6922|       |        //   the information in the bitstream.
 6923|       |        // So decoder->image->yuvRange is kept because it was either the 'colr'
 6924|       |        // value set when the 'colr' box was parsed, or it was the AV1 OBU value
 6925|       |        // extracted from the sequence header OBU of the first tile of the first
 6926|       |        // frame (if no 'colr' box of colour_type 'nclx' was found).
 6927|       |
 6928|       |        // Alpha plane with limited range is not allowed by the latest revision
 6929|       |        // of the specification. However, it was allowed in version 1.0.0 of the
 6930|       |        // specification. To allow such files, simply convert the alpha plane to
 6931|       |        // full range.
 6932|  10.1k|        if (avifIsAlpha(tile->input->itemCategory) && isLimitedRangeAlpha) {
  ------------------
  |  Branch (6932:13): [True: 873, False: 9.23k]
  |  Branch (6932:55): [True: 423, False: 450]
  ------------------
 6933|    423|            avifResult result = avifImageLimitedToFullAlpha(tile->image);
 6934|    423|            if (result != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6934:17): [True: 0, False: 423]
  ------------------
 6935|      0|                avifDiagnosticsPrintf(&decoder->diag, "avifImageLimitedToFullAlpha failed");
 6936|      0|                return result;
 6937|      0|            }
 6938|    423|        }
 6939|       |
 6940|       |        // Scale the decoded image so that it corresponds to this tile's output dimensions
 6941|  10.1k|        if ((tile->width != tile->image->width) || (tile->height != tile->image->height)) {
  ------------------
  |  Branch (6941:13): [True: 8.58k, False: 1.52k]
  |  Branch (6941:52): [True: 879, False: 650]
  ------------------
 6942|  9.46k|            if (avifImageScaleWithLimit(tile->image,
  ------------------
  |  Branch (6942:17): [True: 9, False: 9.45k]
  ------------------
 6943|  9.46k|                                        tile->width,
 6944|  9.46k|                                        tile->height,
 6945|  9.46k|                                        decoder->imageSizeLimit,
 6946|  9.46k|                                        decoder->imageDimensionLimit,
 6947|  9.46k|                                        &decoder->diag) != AVIF_RESULT_OK) {
 6948|      9|                return avifGetErrorForItemCategory(tile->input->itemCategory);
 6949|      9|            }
 6950|  9.46k|        }
 6951|       |
 6952|  10.1k|        ++info->decodedTileCount;
 6953|       |
 6954|  10.1k|        const avifBool isGrid = (info->grid.rows > 0) && (info->grid.columns > 0);
  ------------------
  |  Branch (6954:33): [True: 2.41k, False: 7.68k]
  |  Branch (6954:58): [True: 2.41k, False: 0]
  ------------------
 6955|  10.1k|        avifBool stealPlanes = !isGrid;
 6956|  10.1k|        if (decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (6956:13): [True: 248, False: 9.85k]
  ------------------
 6957|       |            // Keep everything as a copy for now.
 6958|    248|            stealPlanes = AVIF_FALSE;
  ------------------
  |  |   89|    248|#define AVIF_FALSE 0
  ------------------
 6959|    248|        }
 6960|  10.1k|        if (tile->input->itemCategory >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY &&
  ------------------
  |  |  435|  20.2k|#define AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR
  ------------------
  |  Branch (6960:13): [True: 113, False: 9.98k]
  ------------------
 6961|    113|            tile->input->itemCategory <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY) {
  ------------------
  |  |  437|    113|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS - 1)
  |  |  ------------------
  |  |  |  |  431|    113|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (6961:13): [True: 113, False: 0]
  ------------------
 6962|       |            // Keep Sample Transform input image item samples in tiles.
 6963|       |            // The expression will be applied in avifDecoderNextImage() below instead, once all the tiles are available.
 6964|    113|            continue;
 6965|    113|        }
 6966|       |
 6967|  9.98k|        if (!stealPlanes) {
  ------------------
  |  Branch (6967:13): [True: 2.55k, False: 7.43k]
  ------------------
 6968|  2.55k|            avifImage * dstImage = decoder->image;
 6969|  2.55k|            if (tile->input->itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (6969:17): [True: 189, False: 2.36k]
  ------------------
 6970|    189|                AVIF_ASSERT_OR_RETURN(dstImage->gainMap && dstImage->gainMap->image);
  ------------------
  |  |   64|    189|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    189|    do {                        \
  |  |  |  |   46|    378|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 189, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 189, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    189|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 189]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6971|    189|                dstImage = dstImage->gainMap->image;
 6972|    189|            }
 6973|  2.55k|            if (tileIndex == 0) {
  ------------------
  |  Branch (6973:17): [True: 495, False: 2.05k]
  ------------------
 6974|    495|                AVIF_CHECKRES(avifDecoderDataAllocateImagePlanes(decoder->data, info, dstImage, &decoder->data->cicpSet));
  ------------------
  |  |   54|    495|    do {                                  \
  |  |   55|    495|        const avifResult result__ = (A);  \
  |  |   56|    495|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 15, False: 480]
  |  |  ------------------
  |  |   57|     15|            avifBreakOnError();           \
  |  |   58|     15|            return result__;              \
  |  |   59|     15|        }                                 \
  |  |   60|    495|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 480]
  |  |  ------------------
  ------------------
 6975|    495|            }
 6976|  2.53k|            AVIF_CHECKRES(avifDecoderDataCopyTileToImage(decoder->data, info, dstImage, tile, tileIndex));
  ------------------
  |  |   54|  2.53k|    do {                                  \
  |  |   55|  2.53k|        const avifResult result__ = (A);  \
  |  |   56|  2.53k|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 14, False: 2.52k]
  |  |  ------------------
  |  |   57|     14|            avifBreakOnError();           \
  |  |   58|     14|            return result__;              \
  |  |   59|     14|        }                                 \
  |  |   60|  2.53k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 2.52k]
  |  |  ------------------
  ------------------
 6977|  7.43k|        } else {
 6978|  7.43k|            AVIF_ASSERT_OR_RETURN(info->tileCount == 1);
  ------------------
  |  |   64|  7.43k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  7.43k|    do {                        \
  |  |  |  |   46|  7.43k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 7.43k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  7.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 7.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6979|  7.43k|            AVIF_ASSERT_OR_RETURN(tileIndex == 0);
  ------------------
  |  |   64|  7.43k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  7.43k|    do {                        \
  |  |  |  |   46|  7.43k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 7.43k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  7.43k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 7.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6980|  7.43k|            avifImage * src = tile->image;
 6981|       |
 6982|  7.43k|            if (tile->input->itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (6982:17): [True: 35, False: 7.40k]
  ------------------
 6983|     35|                AVIF_ASSERT_OR_RETURN(decoder->image->gainMap && decoder->image->gainMap->image);
  ------------------
  |  |   64|     35|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     35|    do {                        \
  |  |  |  |   46|     70|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 35, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 35, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     35|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6984|     35|                decoder->image->gainMap->image->width = src->width;
 6985|     35|                decoder->image->gainMap->image->height = src->height;
 6986|     35|                decoder->image->gainMap->image->depth = src->depth;
 6987|  7.40k|            } else {
 6988|  7.40k|                if ((decoder->image->width != src->width) || (decoder->image->height != src->height) ||
  ------------------
  |  Branch (6988:21): [True: 3, False: 7.40k]
  |  Branch (6988:62): [True: 1, False: 7.39k]
  ------------------
 6989|  7.39k|                    (decoder->image->depth != src->depth)) {
  ------------------
  |  Branch (6989:21): [True: 4.14k, False: 3.25k]
  ------------------
 6990|  4.14k|                    if (avifIsAlpha(tile->input->itemCategory)) {
  ------------------
  |  Branch (6990:25): [True: 30, False: 4.11k]
  ------------------
 6991|     30|                        avifDiagnosticsPrintf(&decoder->diag,
 6992|     30|                                              "The color image item does not match the alpha image item in width, height, or bit depth");
 6993|     30|                        return AVIF_RESULT_DECODE_ALPHA_FAILED;
 6994|     30|                    }
 6995|  4.11k|                    avifImageFreePlanes(decoder->image, AVIF_PLANES_ALL);
 6996|       |
 6997|  4.11k|                    decoder->image->width = src->width;
 6998|  4.11k|                    decoder->image->height = src->height;
 6999|  4.11k|                    decoder->image->depth = src->depth;
 7000|  4.11k|                }
 7001|  7.40k|            }
 7002|       |
 7003|  7.40k|            if (avifIsAlpha(tile->input->itemCategory)) {
  ------------------
  |  Branch (7003:17): [True: 424, False: 6.98k]
  ------------------
 7004|    424|                avifImageStealPlanes(decoder->image, src, AVIF_PLANES_A);
 7005|  6.98k|            } else if (tile->input->itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (7005:24): [True: 35, False: 6.94k]
  ------------------
 7006|     35|                AVIF_ASSERT_OR_RETURN(decoder->image->gainMap && decoder->image->gainMap->image);
  ------------------
  |  |   64|     35|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     35|    do {                        \
  |  |  |  |   46|     70|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 35, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 35, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     35|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7007|     35|                avifImageStealPlanes(decoder->image->gainMap->image, src, AVIF_PLANES_YUV);
 7008|  6.94k|            } else { // AVIF_ITEM_COLOR
 7009|  6.94k|                avifImageStealPlanes(decoder->image, src, AVIF_PLANES_YUV);
 7010|  6.94k|            }
 7011|  7.40k|        }
 7012|  9.98k|    }
 7013|  2.10M|    return AVIF_RESULT_OK;
 7014|  2.43M|}
read.c:avifGetErrorForItemCategory:
 6877|  5.91k|{
 6878|  5.91k|    if (itemCategory == AVIF_ITEM_GAIN_MAP) {
  ------------------
  |  Branch (6878:9): [True: 12, False: 5.90k]
  ------------------
 6879|     12|        return AVIF_RESULT_DECODE_GAIN_MAP_FAILED;
 6880|     12|    }
 6881|  5.90k|    if (itemCategory >= AVIF_SAMPLE_TRANSFORM_MIN_CATEGORY && itemCategory <= AVIF_SAMPLE_TRANSFORM_MAX_CATEGORY) {
  ------------------
  |  |  435|  11.8k|#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) {
  ------------------
  |  |  437|     22|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS - 1)
  |  |  ------------------
  |  |  |  |  431|     22|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (6881:9): [True: 22, False: 5.87k]
  |  Branch (6881:63): [True: 22, False: 0]
  ------------------
 6882|     22|        return AVIF_RESULT_DECODE_SAMPLE_TRANSFORM_FAILED;
 6883|     22|    }
 6884|  5.87k|    return avifIsAlpha(itemCategory) ? AVIF_RESULT_DECODE_ALPHA_FAILED : AVIF_RESULT_DECODE_COLOR_FAILED;
  ------------------
  |  Branch (6884:12): [True: 44, False: 5.83k]
  ------------------
 6885|  5.90k|}
read.c:avifImageLimitedToFullAlpha:
 6835|    423|{
 6836|    423|    if (image->imageOwnsAlphaPlane) {
  ------------------
  |  Branch (6836:9): [True: 0, False: 423]
  ------------------
 6837|      0|        return AVIF_RESULT_NOT_IMPLEMENTED;
 6838|      0|    }
 6839|       |
 6840|    423|    const uint8_t * alphaPlane = image->alphaPlane;
 6841|    423|    const uint32_t alphaRowBytes = image->alphaRowBytes;
 6842|       |
 6843|       |    // We cannot do the range conversion in place since it will modify the
 6844|       |    // codec's internal frame buffers. Allocate memory for the conversion.
 6845|    423|    image->alphaPlane = NULL;
 6846|    423|    image->alphaRowBytes = 0;
 6847|    423|    const avifResult allocationResult = avifImageAllocatePlanes(image, AVIF_PLANES_A);
 6848|    423|    if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (6848:9): [True: 0, False: 423]
  ------------------
 6849|      0|        return allocationResult;
 6850|      0|    }
 6851|       |
 6852|    423|    if (image->depth > 8) {
  ------------------
  |  Branch (6852:9): [True: 201, False: 222]
  ------------------
 6853|  6.21k|        for (uint32_t j = 0; j < image->height; ++j) {
  ------------------
  |  Branch (6853:30): [True: 6.01k, False: 201]
  ------------------
 6854|  6.01k|            const uint8_t * srcRow = &alphaPlane[(size_t)j * alphaRowBytes];
 6855|  6.01k|            uint8_t * dstRow = &image->alphaPlane[(size_t)j * image->alphaRowBytes];
 6856|   666k|            for (uint32_t i = 0; i < image->width; ++i) {
  ------------------
  |  Branch (6856:34): [True: 660k, False: 6.01k]
  ------------------
 6857|   660k|                int srcAlpha = *((const uint16_t *)&srcRow[i * 2]);
 6858|   660k|                int dstAlpha = avifLimitedToFullY(image->depth, srcAlpha);
 6859|   660k|                *((uint16_t *)&dstRow[i * 2]) = (uint16_t)dstAlpha;
 6860|   660k|            }
 6861|  6.01k|        }
 6862|    222|    } else {
 6863|  4.16k|        for (uint32_t j = 0; j < image->height; ++j) {
  ------------------
  |  Branch (6863:30): [True: 3.94k, False: 222]
  ------------------
 6864|  3.94k|            const uint8_t * srcRow = &alphaPlane[(size_t)j * alphaRowBytes];
 6865|  3.94k|            uint8_t * dstRow = &image->alphaPlane[(size_t)j * image->alphaRowBytes];
 6866|   210k|            for (uint32_t i = 0; i < image->width; ++i) {
  ------------------
  |  Branch (6866:34): [True: 206k, False: 3.94k]
  ------------------
 6867|   206k|                int srcAlpha = srcRow[i];
 6868|   206k|                int dstAlpha = avifLimitedToFullY(image->depth, srcAlpha);
 6869|   206k|                dstRow[i] = (uint8_t)dstAlpha;
 6870|   206k|            }
 6871|  3.94k|        }
 6872|    222|    }
 6873|    423|    return AVIF_RESULT_OK;
 6874|    423|}
read.c:avifDecoderDataAllocateImagePlanes:
 1830|    495|{
 1831|    495|    const avifTile * tile = &data->tiles.tile[info->firstTileIndex];
 1832|    495|    uint32_t dstWidth;
 1833|    495|    uint32_t dstHeight;
 1834|       |
 1835|    495|    if (info->grid.rows > 0 && info->grid.columns > 0) {
  ------------------
  |  Branch (1835:9): [True: 360, False: 135]
  |  Branch (1835:32): [True: 360, False: 0]
  ------------------
 1836|    360|        const avifImageGrid * grid = &info->grid;
 1837|       |        // Validate grid image size and tile size.
 1838|       |        //
 1839|       |        // HEIF (ISO/IEC 23008-12:2017), Section 6.6.2.3.1:
 1840|       |        //   The tiled input images shall completely "cover" the reconstructed image grid canvas, ...
 1841|    360|        if ((((uint64_t)tile->image->width * grid->columns) < grid->outputWidth) ||
  ------------------
  |  Branch (1841:13): [True: 1, False: 359]
  ------------------
 1842|    359|            (((uint64_t)tile->image->height * grid->rows) < grid->outputHeight)) {
  ------------------
  |  Branch (1842:13): [True: 1, False: 358]
  ------------------
 1843|      2|            avifDiagnosticsPrintf(data->diag,
 1844|      2|                                  "Grid image tiles do not completely cover the image (HEIF (ISO/IEC 23008-12:2017), Section 6.6.2.3.1)");
 1845|      2|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1846|      2|        }
 1847|       |        // 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.
 1848|    358|        if ((((uint64_t)tile->image->width * (grid->columns - 1)) >= grid->outputWidth) ||
  ------------------
  |  Branch (1848:13): [True: 1, False: 357]
  ------------------
 1849|    357|            (((uint64_t)tile->image->height * (grid->rows - 1)) >= grid->outputHeight)) {
  ------------------
  |  Branch (1849:13): [True: 1, False: 356]
  ------------------
 1850|      2|            avifDiagnosticsPrintf(data->diag,
 1851|      2|                                  "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");
 1852|      2|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1853|      2|        }
 1854|    356|        if (!avifAreGridDimensionsValid(tile->image->yuvFormat,
  ------------------
  |  Branch (1854:13): [True: 6, False: 350]
  ------------------
 1855|    356|                                        grid->outputWidth,
 1856|    356|                                        grid->outputHeight,
 1857|    356|                                        tile->image->width,
 1858|    356|                                        tile->image->height,
 1859|    356|                                        data->diag)) {
 1860|      6|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1861|      6|        }
 1862|    350|        dstWidth = grid->outputWidth;
 1863|    350|        dstHeight = grid->outputHeight;
 1864|    350|    } else {
 1865|       |        // Only one tile. Width and height are inherited from the 'ispe' property of the corresponding avifDecoderItem.
 1866|    135|        dstWidth = tile->width;
 1867|    135|        dstHeight = tile->height;
 1868|    135|    }
 1869|       |
 1870|    485|    const avifBool alpha = avifIsAlpha(tile->input->itemCategory);
 1871|    485|    if (alpha) {
  ------------------
  |  Branch (1871:9): [True: 63, False: 422]
  ------------------
 1872|       |        // An alpha tile does not contain any YUV pixels.
 1873|     63|        AVIF_ASSERT_OR_RETURN(tile->image->yuvFormat == AVIF_PIXEL_FORMAT_NONE);
  ------------------
  |  |   64|     63|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|     63|    do {                        \
  |  |  |  |   46|     63|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 63]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|     63|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 63]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1874|     63|    }
 1875|       |
 1876|    485|    const uint32_t dstDepth = tile->image->depth;
 1877|       |
 1878|       |    // Lazily populate dstImage with the new frame's properties.
 1879|    485|    const avifBool dimsOrDepthIsDifferent = (dstImage->width != dstWidth) || (dstImage->height != dstHeight) ||
  ------------------
  |  Branch (1879:45): [True: 62, False: 423]
  |  Branch (1879:78): [True: 21, False: 402]
  ------------------
 1880|    402|                                            (dstImage->depth != dstDepth);
  ------------------
  |  Branch (1880:45): [True: 233, False: 169]
  ------------------
 1881|    485|    const avifBool yuvFormatIsDifferent = !alpha && (dstImage->yuvFormat != tile->image->yuvFormat);
  ------------------
  |  Branch (1881:43): [True: 422, False: 63]
  |  Branch (1881:53): [True: 57, False: 365]
  ------------------
 1882|    485|    if (dimsOrDepthIsDifferent || yuvFormatIsDifferent) {
  ------------------
  |  Branch (1882:9): [True: 316, False: 169]
  |  Branch (1882:35): [True: 8, False: 161]
  ------------------
 1883|    324|        if (alpha) {
  ------------------
  |  Branch (1883:13): [True: 5, False: 319]
  ------------------
 1884|       |            // Alpha doesn't match size, just bail out
 1885|      5|            avifDiagnosticsPrintf(data->diag, "Alpha plane dimensions do not match color plane dimensions");
 1886|      5|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1887|      5|        }
 1888|       |
 1889|    319|        if (dimsOrDepthIsDifferent) {
  ------------------
  |  Branch (1889:13): [True: 311, False: 8]
  ------------------
 1890|    311|            avifImageFreePlanes(dstImage, AVIF_PLANES_ALL);
 1891|    311|            dstImage->width = dstWidth;
 1892|    311|            dstImage->height = dstHeight;
 1893|    311|            dstImage->depth = dstDepth;
 1894|    311|        }
 1895|    319|        if (yuvFormatIsDifferent) {
  ------------------
  |  Branch (1895:13): [True: 57, False: 262]
  ------------------
 1896|     57|            avifImageFreePlanes(dstImage, AVIF_PLANES_YUV);
 1897|     57|            dstImage->yuvFormat = tile->image->yuvFormat;
 1898|     57|        }
 1899|       |        // Keep dstImage->yuvRange which is already set to its correct value
 1900|       |        // (extracted from the 'colr' box if parsed or from a Sequence Header OBU otherwise).
 1901|       |
 1902|    319|        if (!*cicpSet) {
  ------------------
  |  Branch (1902:13): [True: 12, False: 307]
  ------------------
 1903|     12|            *cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|     12|#define AVIF_TRUE 1
  ------------------
 1904|     12|            dstImage->colorPrimaries = tile->image->colorPrimaries;
 1905|     12|            dstImage->transferCharacteristics = tile->image->transferCharacteristics;
 1906|     12|            dstImage->matrixCoefficients = tile->image->matrixCoefficients;
 1907|     12|        }
 1908|    319|    }
 1909|       |
 1910|    480|    if (avifImageAllocatePlanes(dstImage, alpha ? AVIF_PLANES_A : AVIF_PLANES_YUV) != AVIF_RESULT_OK) {
  ------------------
  |  Branch (1910:9): [True: 0, False: 480]
  |  Branch (1910:43): [True: 58, False: 422]
  ------------------
 1911|      0|        avifDiagnosticsPrintf(data->diag, "Image allocation failure");
 1912|      0|        return AVIF_RESULT_OUT_OF_MEMORY;
 1913|      0|    }
 1914|    480|    return AVIF_RESULT_OK;
 1915|    480|}
read.c:avifDecoderDataCopyTileToImage:
 1924|  2.53k|{
 1925|  2.53k|    const avifTile * firstTile = &data->tiles.tile[info->firstTileIndex];
 1926|  2.53k|    if (tile != firstTile) {
  ------------------
  |  Branch (1926:9): [True: 2.05k, False: 480]
  ------------------
 1927|       |        // Check for tile consistency. All tiles in a grid image should match the first tile in the properties checked below.
 1928|  2.05k|        if ((tile->image->width != firstTile->image->width) || (tile->image->height != firstTile->image->height) ||
  ------------------
  |  Branch (1928:13): [True: 7, False: 2.04k]
  |  Branch (1928:64): [True: 1, False: 2.04k]
  ------------------
 1929|  2.04k|            (tile->image->depth != firstTile->image->depth) || (tile->image->yuvFormat != firstTile->image->yuvFormat) ||
  ------------------
  |  Branch (1929:13): [True: 1, False: 2.04k]
  |  Branch (1929:64): [True: 1, False: 2.04k]
  ------------------
 1930|  2.04k|            (tile->image->yuvRange != firstTile->image->yuvRange) || (tile->image->colorPrimaries != firstTile->image->colorPrimaries) ||
  ------------------
  |  Branch (1930:13): [True: 1, False: 2.04k]
  |  Branch (1930:70): [True: 1, False: 2.04k]
  ------------------
 1931|  2.04k|            (tile->image->transferCharacteristics != firstTile->image->transferCharacteristics) ||
  ------------------
  |  Branch (1931:13): [True: 1, False: 2.04k]
  ------------------
 1932|  2.04k|            (tile->image->matrixCoefficients != firstTile->image->matrixCoefficients)) {
  ------------------
  |  Branch (1932:13): [True: 1, False: 2.04k]
  ------------------
 1933|     14|            avifDiagnosticsPrintf(data->diag, "Grid image contains mismatched tiles");
 1934|     14|            return AVIF_RESULT_INVALID_IMAGE_GRID;
 1935|     14|        }
 1936|  2.05k|    }
 1937|       |
 1938|       |    // Only keep the relevant planes in the destination image. Otherwise,
 1939|       |    // unjustified failures may come from trying to copy alpha tiles with odd
 1940|       |    // coordinates into the dstImage when the chroma planes are subsampled.
 1941|  2.52k|    avifImage dstView;
 1942|  2.52k|    avifImageSetDefaults(&dstView);
 1943|  2.52k|    const avifCropRect srcViewRect = { 0, 0, dstImage->width, dstImage->height };
 1944|  2.52k|    AVIF_ASSERT_OR_RETURN(avifImageSetViewRect(&dstView, dstImage, &srcViewRect) == AVIF_RESULT_OK);
  ------------------
  |  |   64|  2.52k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  2.52k|    do {                        \
  |  |  |  |   46|  2.52k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  2.52k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 2.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1945|  2.52k|    if (avifIsAlpha(tile->input->itemCategory)) {
  ------------------
  |  Branch (1945:9): [True: 411, False: 2.11k]
  ------------------
 1946|    411|        avifImageFreePlanes(&dstView, AVIF_PLANES_YUV);
 1947|    411|        dstView.yuvFormat = AVIF_PIXEL_FORMAT_NONE;
 1948|  2.11k|    } else {
 1949|  2.11k|        avifImageFreePlanes(&dstView, AVIF_PLANES_A);
 1950|  2.11k|    }
 1951|       |
 1952|  2.52k|    avifImage srcTileView;
 1953|  2.52k|    avifImageSetDefaults(&srcTileView);
 1954|  2.52k|    avifImage dstTileView;
 1955|  2.52k|    avifImageSetDefaults(&dstTileView);
 1956|  2.52k|    avifCropRect dstTileViewRect = { 0, 0, firstTile->image->width, firstTile->image->height };
 1957|  2.52k|    if (info->grid.rows > 0 && info->grid.columns > 0) {
  ------------------
  |  Branch (1957:9): [True: 2.38k, False: 135]
  |  Branch (1957:32): [True: 2.38k, False: 0]
  ------------------
 1958|  2.38k|        unsigned int rowIndex = tileIndex / info->grid.columns;
 1959|  2.38k|        unsigned int colIndex = tileIndex % info->grid.columns;
 1960|  2.38k|        dstTileViewRect.x = firstTile->image->width * colIndex;
 1961|  2.38k|        dstTileViewRect.y = firstTile->image->height * rowIndex;
 1962|  2.38k|        if (dstTileViewRect.x + dstTileViewRect.width > info->grid.outputWidth) {
  ------------------
  |  Branch (1962:13): [True: 208, False: 2.17k]
  ------------------
 1963|    208|            dstTileViewRect.width = info->grid.outputWidth - dstTileViewRect.x;
 1964|    208|        }
 1965|  2.38k|        if (dstTileViewRect.y + dstTileViewRect.height > info->grid.outputHeight) {
  ------------------
  |  Branch (1965:13): [True: 122, False: 2.26k]
  ------------------
 1966|    122|            dstTileViewRect.height = info->grid.outputHeight - dstTileViewRect.y;
 1967|    122|        }
 1968|  2.38k|    }
 1969|  2.52k|    const avifCropRect srcTileViewRect = { 0, 0, dstTileViewRect.width, dstTileViewRect.height };
 1970|  2.52k|    AVIF_ASSERT_OR_RETURN(avifImageSetViewRect(&dstTileView, &dstView, &dstTileViewRect) == AVIF_RESULT_OK);
  ------------------
  |  |   64|  2.52k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  2.52k|    do {                        \
  |  |  |  |   46|  2.52k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  2.52k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 2.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1971|  2.52k|    AVIF_ASSERT_OR_RETURN(avifImageSetViewRect(&srcTileView, tile->image, &srcTileViewRect) == AVIF_RESULT_OK);
  ------------------
  |  |   64|  2.52k|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|  2.52k|    do {                        \
  |  |  |  |   46|  2.52k|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|  2.52k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 2.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1972|  2.52k|    avifImageCopySamples(&dstTileView, &srcTileView, avifIsAlpha(tile->input->itemCategory) ? AVIF_PLANES_A : AVIF_PLANES_YUV);
  ------------------
  |  Branch (1972:54): [True: 411, False: 2.11k]
  ------------------
 1973|  2.52k|    return AVIF_RESULT_OK;
 1974|  2.52k|}
read.c:avifDecoderApplySampleTransform:
 7098|    225|{
 7099|    225|    if (dstImage->depth != decoder->data->meta->sampleTransformDepth) {
  ------------------
  |  Branch (7099:9): [True: 112, False: 113]
  ------------------
 7100|    112|        AVIF_ASSERT_OR_RETURN(dstImage->yuvPlanes[0] != NULL);
  ------------------
  |  |   64|    112|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    112|    do {                        \
  |  |  |  |   46|    112|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 112]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    112|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 112]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7101|    112|        AVIF_ASSERT_OR_RETURN(dstImage->imageOwnsYUVPlanes);
  ------------------
  |  |   64|    112|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    112|    do {                        \
  |  |  |  |   46|    112|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 112]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    112|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 112]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7102|       |
 7103|       |        // Use a temporary buffer because dstImage may point to decoder->image, which could be an input image.
 7104|    112|        avifImage * dstImageWithCorrectDepth =
 7105|    112|            avifImageCreate(dstImage->width, dstImage->height, decoder->data->meta->sampleTransformDepth, dstImage->yuvFormat);
 7106|    112|        AVIF_CHECKERR(dstImageWithCorrectDepth != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|    112|    do {                        \
  |  |   46|    112|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 112]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    112|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 112]
  |  |  ------------------
  ------------------
 7107|    112|        dstImageWithCorrectDepth->yuvRange = dstImage->yuvRange;
 7108|    112|        avifResult result =
 7109|    112|            avifImageAllocatePlanes(dstImageWithCorrectDepth, dstImage->alphaPlane != NULL ? AVIF_PLANES_ALL : AVIF_PLANES_YUV);
  ------------------
  |  Branch (7109:63): [True: 0, False: 112]
  ------------------
 7110|    112|        if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (7110:13): [True: 112, False: 0]
  ------------------
 7111|    112|            result = avifDecoderApplySampleTransform(decoder, dstImageWithCorrectDepth);
 7112|    112|            if (result == AVIF_RESULT_OK) {
  ------------------
  |  Branch (7112:17): [True: 111, False: 1]
  ------------------
 7113|       |                // Keep the same dstImage object rather than swapping decoder->image, in case the user already accessed it.
 7114|    111|                avifImageFreePlanes(dstImage, AVIF_PLANES_ALL);
 7115|    111|                dstImage->depth = dstImageWithCorrectDepth->depth;
 7116|    111|                avifImageStealPlanes(dstImage, dstImageWithCorrectDepth, AVIF_PLANES_ALL);
 7117|    111|            }
 7118|    112|        }
 7119|    112|        avifImageDestroy(dstImageWithCorrectDepth);
 7120|    112|        return result;
 7121|    112|    }
 7122|       |
 7123|    113|    AVIF_CHECKRES(avifDecoderApplySampleTransformForPlanes(decoder, AVIF_PLANES_YUV, dstImage));
  ------------------
  |  |   54|    113|    do {                                  \
  |  |   55|    113|        const avifResult result__ = (A);  \
  |  |   56|    113|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 112]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|    113|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 112]
  |  |  ------------------
  ------------------
 7124|       |    // If decoder->data->tileInfos[AVIF_ITEM_ALPHA].tileCount == 0, it means
 7125|       |    // decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_ALPHA was equal to 0.
 7126|       |    // Only apply Sample Transforms for the alpha plane if there is an alpha item to apply it onto.
 7127|    112|    if (decoder->data->tileInfos[AVIF_ITEM_ALPHA].tileCount != 0) {
  ------------------
  |  Branch (7127:9): [True: 0, False: 112]
  ------------------
 7128|      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]
  |  |  ------------------
  ------------------
 7129|      0|    }
 7130|    112|    return AVIF_RESULT_OK;
 7131|    112|}
read.c:avifDecoderApplySampleTransformForPlanes:
 7086|    113|{
 7087|    113|    avifImage * toDestroy[AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS] = { NULL };
 7088|    113|    const avifResult result = avifDecoderApplySampleTransformForPlanesImpl(decoder, planes, dstImage, toDestroy);
 7089|    452|    for (uint32_t i = 0; i < AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS; ++i) {
  ------------------
  |  |  433|    452|    (1 /* for AVIF_ITEM_COLOR */ + AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS)
  |  |  ------------------
  |  |  |  |  431|    452|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  |  |  ------------------
  ------------------
  |  Branch (7089:26): [True: 339, False: 113]
  ------------------
 7090|    339|        if (toDestroy[i] != NULL) {
  ------------------
  |  Branch (7090:13): [True: 0, False: 339]
  ------------------
 7091|      0|            avifImageDestroy(toDestroy[i]);
 7092|      0|        }
 7093|    339|    }
 7094|    113|    return result;
 7095|    113|}
read.c:avifDecoderApplySampleTransformForPlanesImpl:
 7035|    113|{
 7036|    113|    AVIF_ASSERT_OR_RETURN(decoder->data->sampleTransformNumInputImageItems != 0);
  ------------------
  |  |   64|    113|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    113|    do {                        \
  |  |  |  |   46|    113|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 113]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    113|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 113]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7037|    113|    AVIF_ASSERT_OR_RETURN(decoder->data->sampleTransformNumInputImageItems <= AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS);
  ------------------
  |  |   64|    113|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    113|    do {                        \
  |  |  |  |   46|    113|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 113]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    113|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 113]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7038|    113|    const avifImage * inputImages[AVIF_SAMPLE_TRANSFORM_MAX_NUM_INPUT_IMAGE_ITEMS];
 7039|    339|    for (uint32_t i = 0; i < decoder->data->sampleTransformNumInputImageItems; ++i) {
  ------------------
  |  Branch (7039:26): [True: 226, False: 113]
  ------------------
 7040|    226|        avifItemCategory category = decoder->data->sampleTransformInputImageItems[i];
 7041|    226|        if (category == AVIF_ITEM_COLOR) {
  ------------------
  |  Branch (7041:13): [True: 113, False: 113]
  ------------------
 7042|       |            // If the primary image item was a grid, it was already aggregated
 7043|       |            // into this single output buffer in avifDecoderDecodeTiles().
 7044|    113|            inputImages[i] = decoder->image;
 7045|    113|        } else {
 7046|    113|            AVIF_ASSERT_OR_RETURN(category >= AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR &&
  ------------------
  |  |   64|    113|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    113|    do {                        \
  |  |  |  |   46|    226|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 113, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 113, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    113|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 113]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7047|    113|                                  category < AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR +
 7048|    113|                                                 AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS);
 7049|    113|            if (planes == AVIF_PLANES_A) {
  ------------------
  |  Branch (7049:17): [True: 0, False: 113]
  ------------------
 7050|      0|                category += AVIF_SAMPLE_TRANSFORM_MAX_NUM_EXTRA_INPUT_IMAGE_ITEMS;
  ------------------
  |  |  431|      0|    (AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_ALPHA - AVIF_ITEM_SAMPLE_TRANSFORM_INPUT_0_COLOR)
  ------------------
 7051|      0|            }
 7052|    113|            const avifTileInfo * info = &decoder->data->tileInfos[category];
 7053|    113|            AVIF_ASSERT_OR_RETURN(info != NULL);
  ------------------
  |  |   64|    113|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    113|    do {                        \
  |  |  |  |   46|    113|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 113]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    113|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 113]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7054|    113|            const avifTile * firstTile = &decoder->data->tiles.tile[info->firstTileIndex];
 7055|    113|            AVIF_ASSERT_OR_RETURN(firstTile != NULL && firstTile->image != NULL);
  ------------------
  |  |   64|    113|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    113|    do {                        \
  |  |  |  |   46|    226|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:15): [True: 113, False: 0]
  |  |  |  |  |  Branch (46:15): [True: 113, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    113|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 113]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7056|    113|            if (info->tileCount == 1) {
  ------------------
  |  Branch (7056:17): [True: 113, False: 0]
  ------------------
 7057|    113|                inputImages[i] = firstTile->image;
 7058|    113|            } else {
 7059|       |                // Combine the tiles into a single buffer used as one of the input images in avifImageApplyExpression().
 7060|      0|                reconstructedInputImages[i] = avifImageCreateEmpty();
 7061|      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]
  |  |  ------------------
  ------------------
 7062|      0|                avifImageCopyNoAlloc(reconstructedInputImages[i], firstTile->image);
 7063|      0|                reconstructedInputImages[i]->width = decoder->image->width;
 7064|      0|                reconstructedInputImages[i]->height = decoder->image->height;
 7065|      0|                avifBool cicpSet = AVIF_TRUE;
  ------------------
  |  |   88|      0|#define AVIF_TRUE 1
  ------------------
 7066|      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]
  |  |  ------------------
  ------------------
 7067|      0|                for (unsigned int tileIndex = 0; tileIndex < info->tileCount; ++tileIndex) {
  ------------------
  |  Branch (7067:50): [True: 0, False: 0]
  ------------------
 7068|      0|                    const avifTile * tile = firstTile + tileIndex;
 7069|      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]
  |  |  ------------------
  ------------------
 7070|      0|                }
 7071|      0|                inputImages[i] = reconstructedInputImages[i];
 7072|      0|            }
 7073|    113|        }
 7074|    226|    }
 7075|    113|    AVIF_CHECKRES(avifImageApplyExpression(dstImage,
  ------------------
  |  |   54|    113|    do {                                  \
  |  |   55|    113|        const avifResult result__ = (A);  \
  |  |   56|    113|        if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (56:13): [True: 1, False: 112]
  |  |  ------------------
  |  |   57|      1|            avifBreakOnError();           \
  |  |   58|      1|            return result__;              \
  |  |   59|      1|        }                                 \
  |  |   60|    113|    } while (0)
  |  |  ------------------
  |  |  |  Branch (60:14): [Folded, False: 112]
  |  |  ------------------
  ------------------
 7076|    113|                                           AVIF_SAMPLE_TRANSFORM_BIT_DEPTH_32,
 7077|    113|                                           &decoder->data->meta->sampleTransformExpression,
 7078|    113|                                           decoder->data->sampleTransformNumInputImageItems,
 7079|    113|                                           inputImages,
 7080|    113|                                           planes));
 7081|    112|    return AVIF_RESULT_OK;
 7082|    113|}
read.c:avifSampleTableGetImageDelta:
  427|    491|{
  428|    491|    uint32_t maxSampleIndex = 0;
  429|    491|    for (uint32_t i = 0; i < sampleTable->timeToSamples.count; ++i) {
  ------------------
  |  Branch (429:26): [True: 338, False: 153]
  ------------------
  430|    338|        const avifSampleTableTimeToSample * timeToSample = &sampleTable->timeToSamples.timeToSample[i];
  431|    338|        maxSampleIndex += timeToSample->sampleCount;
  432|    338|        if ((imageIndex < maxSampleIndex) || (i == (sampleTable->timeToSamples.count - 1))) {
  ------------------
  |  Branch (432:13): [True: 335, False: 3]
  |  Branch (432:46): [True: 3, False: 0]
  ------------------
  433|    338|            return timeToSample->sampleDelta;
  434|    338|        }
  435|    338|    }
  436|       |
  437|       |    // TODO: fail here?
  438|    153|    return 1;
  439|    491|}
read.c:avifDecoderDataResetCodec:
 1103|  13.2k|{
 1104|  30.4k|    for (unsigned int i = 0; i < data->tiles.count; ++i) {
  ------------------
  |  Branch (1104:30): [True: 17.1k, False: 13.2k]
  ------------------
 1105|  17.1k|        avifTile * tile = &data->tiles.tile[i];
 1106|  17.1k|        if (tile->image) {
  ------------------
  |  Branch (1106:13): [True: 17.1k, False: 0]
  ------------------
 1107|  17.1k|            avifImageFreePlanes(tile->image, AVIF_PLANES_ALL); // forget any pointers into codec image buffers
 1108|  17.1k|        }
 1109|  17.1k|        if (tile->codec) {
  ------------------
  |  Branch (1109:13): [True: 0, False: 17.1k]
  ------------------
 1110|       |            // Check if tile->codec was created separately and destroy it in that case.
 1111|      0|            if (tile->codec != data->codec && tile->codec != data->codecAlpha) {
  ------------------
  |  Branch (1111:17): [True: 0, False: 0]
  |  Branch (1111:47): [True: 0, False: 0]
  ------------------
 1112|      0|                avifCodecDestroy(tile->codec);
 1113|      0|            }
 1114|      0|            tile->codec = NULL;
 1115|      0|        }
 1116|  17.1k|    }
 1117|   119k|    for (int c = 0; c < AVIF_ITEM_CATEGORY_COUNT; ++c) {
  ------------------
  |  Branch (1117:21): [True: 105k, False: 13.2k]
  ------------------
 1118|   105k|        data->tileInfos[c].decodedTileCount = 0;
 1119|   105k|    }
 1120|  13.2k|    if (data->codec) {
  ------------------
  |  Branch (1120:9): [True: 0, False: 13.2k]
  ------------------
 1121|      0|        avifCodecDestroy(data->codec);
 1122|      0|        data->codec = NULL;
 1123|      0|    }
 1124|  13.2k|    if (data->codecAlpha) {
  ------------------
  |  Branch (1124:9): [True: 0, False: 13.2k]
  ------------------
 1125|      0|        avifCodecDestroy(data->codecAlpha);
 1126|       |        data->codecAlpha = NULL;
 1127|      0|    }
 1128|  13.2k|}
read.c:avifGetDecodedRowCount:
 7351|  2.09M|{
 7352|  2.09M|    if (info->decodedTileCount == info->tileCount) {
  ------------------
  |  Branch (7352:9): [True: 1.77M, False: 325k]
  ------------------
 7353|  1.77M|        return image->height;
 7354|  1.77M|    }
 7355|   325k|    if (info->decodedTileCount == 0) {
  ------------------
  |  Branch (7355:9): [True: 323k, False: 1.27k]
  ------------------
 7356|   323k|        return 0;
 7357|   323k|    }
 7358|       |
 7359|  1.27k|    if (decoder->data->meta->sampleTransformExpression.count > 0) {
  ------------------
  |  Branch (7359:9): [True: 0, False: 1.27k]
  ------------------
 7360|       |        // TODO(yguyon): Support incremental Sample Transforms
 7361|      0|        return 0;
 7362|      0|    }
 7363|       |
 7364|  1.27k|    if ((info->grid.rows > 0) && (info->grid.columns > 0)) {
  ------------------
  |  Branch (7364:9): [True: 1.27k, False: 0]
  |  Branch (7364:34): [True: 1.27k, False: 0]
  ------------------
 7365|       |        // Grid of AVIF tiles (not to be confused with AV1 tiles).
 7366|  1.27k|        const uint32_t tileHeight = decoder->data->tiles.tile[info->firstTileIndex].height;
 7367|  1.27k|        return AVIF_MIN((info->decodedTileCount / info->grid.columns) * tileHeight, image->height);
  ------------------
  |  |   19|  1.27k|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 1.27k, False: 0]
  |  |  ------------------
  ------------------
 7368|  1.27k|    } else {
 7369|       |        // Non-grid image.
 7370|      0|        return image->height;
 7371|      0|    }
 7372|  1.27k|}

avifLimitedToFullY:
 1783|   866k|{
 1784|   866k|    switch (depth) {
  ------------------
  |  Branch (1784:13): [True: 866k, False: 0]
  ------------------
 1785|   206k|        case 8:
  ------------------
  |  Branch (1785:9): [True: 206k, False: 660k]
  ------------------
 1786|   206k|            LIMITED_TO_FULL(16, 235, 255);
  ------------------
  |  | 1765|   206k|    v = (((v - MINLIMITEDY) * FULLY) + ((MAXLIMITEDY - MINLIMITEDY) / 2)) / (MAXLIMITEDY - MINLIMITEDY); \
  |  | 1766|   206k|    v = AVIF_CLAMP(v, 0, FULLY)
  |  |  ------------------
  |  |  |  |   18|   206k|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:35): [True: 443, False: 206k]
  |  |  |  |  |  Branch (18:60): [True: 10.3k, False: 195k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1787|   206k|            break;
 1788|   658k|        case 10:
  ------------------
  |  Branch (1788:9): [True: 658k, False: 208k]
  ------------------
 1789|   658k|            LIMITED_TO_FULL(64, 940, 1023);
  ------------------
  |  | 1765|   658k|    v = (((v - MINLIMITEDY) * FULLY) + ((MAXLIMITEDY - MINLIMITEDY) / 2)) / (MAXLIMITEDY - MINLIMITEDY); \
  |  | 1766|   658k|    v = AVIF_CLAMP(v, 0, FULLY)
  |  |  ------------------
  |  |  |  |   18|   658k|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:35): [True: 5.69k, False: 653k]
  |  |  |  |  |  Branch (18:60): [True: 3.17k, False: 649k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1790|   658k|            break;
 1791|  1.54k|        case 12:
  ------------------
  |  Branch (1791:9): [True: 1.54k, False: 865k]
  ------------------
 1792|  1.54k|            LIMITED_TO_FULL(256, 3760, 4095);
  ------------------
  |  | 1765|  1.54k|    v = (((v - MINLIMITEDY) * FULLY) + ((MAXLIMITEDY - MINLIMITEDY) / 2)) / (MAXLIMITEDY - MINLIMITEDY); \
  |  | 1766|  1.54k|    v = AVIF_CLAMP(v, 0, FULLY)
  |  |  ------------------
  |  |  |  |   18|  1.54k|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:35): [True: 279, False: 1.26k]
  |  |  |  |  |  Branch (18:60): [True: 255, False: 1.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1793|  1.54k|            break;
 1794|   866k|    }
 1795|   866k|    return v;
 1796|   866k|}

avifSampleTransformExpressionIsValid:
   14|    274|{
   15|    274|    uint32_t stackSize = 0;
   16|  2.14k|    for (uint32_t t = 0; t < tokens->count; ++t) {
  ------------------
  |  Branch (16:26): [True: 1.88k, False: 263]
  ------------------
   17|  1.88k|        const avifSampleTransformToken * token = &tokens->tokens[t];
   18|  1.88k|        AVIF_CHECK(token->type < AVIF_SAMPLE_TRANSFORM_RESERVED);
  ------------------
  |  |   36|  1.88k|    do {                        \
  |  |   37|  1.88k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 7, False: 1.87k]
  |  |  ------------------
  |  |   38|      7|            avifBreakOnError(); \
  |  |   39|      7|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      7|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      7|        }                       \
  |  |   41|  1.88k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.87k]
  |  |  ------------------
  ------------------
   19|  1.87k|        if (token->type == AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX) {
  ------------------
  |  Branch (19:13): [True: 531, False: 1.34k]
  ------------------
   20|       |            // inputImageItemIndex is 1-based.
   21|    531|            AVIF_CHECK(token->inputImageItemIndex != 0);
  ------------------
  |  |   36|    531|    do {                        \
  |  |   37|    531|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 531]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|    531|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 531]
  |  |  ------------------
  ------------------
   22|    531|            AVIF_CHECK(token->inputImageItemIndex <= numInputImageItems);
  ------------------
  |  |   36|    531|    do {                        \
  |  |   37|    531|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 530]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|    531|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 530]
  |  |  ------------------
  ------------------
   23|    531|        }
   24|  1.87k|        if (token->type < AVIF_SAMPLE_TRANSFORM_FIRST_UNARY_OPERATOR) {
  ------------------
  |  Branch (24:13): [True: 1.07k, False: 805]
  ------------------
   25|       |            // Likely an operand.
   26|  1.07k|            ++stackSize;
   27|  1.07k|        } else if (token->type < AVIF_SAMPLE_TRANSFORM_FIRST_BINARY_OPERATOR) {
  ------------------
  |  Branch (27:20): [True: 15, False: 790]
  ------------------
   28|       |            // Likely a unary operator.
   29|     15|            AVIF_CHECK(stackSize >= 1);
  ------------------
  |  |   36|     15|    do {                        \
  |  |   37|     15|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 1, False: 14]
  |  |  ------------------
  |  |   38|      1|            avifBreakOnError(); \
  |  |   39|      1|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      1|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      1|        }                       \
  |  |   41|     15|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 14]
  |  |  ------------------
  ------------------
   30|       |            // Pop one and push one.
   31|    790|        } else {
   32|       |            // Likely a binary operator.
   33|    790|            AVIF_CHECK(stackSize >= 2);
  ------------------
  |  |   36|    790|    do {                        \
  |  |   37|    790|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 788]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|    790|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 788]
  |  |  ------------------
  ------------------
   34|    788|            --stackSize; // Pop two and push one.
   35|    788|        }
   36|  1.87k|    }
   37|    263|    AVIF_CHECK(stackSize == 1);
  ------------------
  |  |   36|    263|    do {                        \
  |  |   37|    263|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 2, False: 261]
  |  |  ------------------
  |  |   38|      2|            avifBreakOnError(); \
  |  |   39|      2|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      2|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      2|        }                       \
  |  |   41|    263|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 261]
  |  |  ------------------
  ------------------
   38|    261|    return AVIF_TRUE;
  ------------------
  |  |   88|    261|#define AVIF_TRUE 1
  ------------------
   39|    263|}
avifImageApplyExpression:
  359|    113|{
  360|       |    // Check that the expression is valid.
  361|    113|    AVIF_ASSERT_OR_RETURN(avifSampleTransformExpressionIsValid(expression, numInputImageItems));
  ------------------
  |  |   64|    113|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|    113|    do {                        \
  |  |  |  |   46|    113|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 113]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|    113|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 113]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  362|    113|    const avifBool skipColor = !(planes & AVIF_PLANES_YUV);
  363|    113|    const avifBool skipAlpha = !(planes & AVIF_PLANES_A);
  364|    562|    for (int c = AVIF_CHAN_Y; c <= AVIF_CHAN_A; ++c) {
  ------------------
  |  Branch (364:31): [True: 450, False: 112]
  ------------------
  365|    450|        const avifBool alpha = c == AVIF_CHAN_A;
  366|    450|        if ((skipColor && !alpha) || (skipAlpha && alpha)) {
  ------------------
  |  Branch (366:14): [True: 0, False: 450]
  |  Branch (366:27): [True: 0, False: 0]
  |  Branch (366:39): [True: 450, False: 0]
  |  Branch (366:52): [True: 112, False: 338]
  ------------------
  367|    112|            continue;
  368|    112|        }
  369|       |
  370|    338|        const uint32_t planeWidth = avifImagePlaneWidth(dstImage, c);
  371|    338|        const uint32_t planeHeight = avifImagePlaneHeight(dstImage, c);
  372|  1.01k|        for (uint32_t i = 0; i < numInputImageItems; ++i) {
  ------------------
  |  Branch (372:30): [True: 676, False: 337]
  ------------------
  373|    676|            AVIF_CHECKERR(avifImagePlaneWidth(inputImageItems[i], c) == planeWidth, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    676|    do {                        \
  |  |   46|    676|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 1, False: 675]
  |  |  ------------------
  |  |   47|      1|            avifBreakOnError(); \
  |  |   48|      1|            return ERR;         \
  |  |   49|      1|        }                       \
  |  |   50|    676|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 675]
  |  |  ------------------
  ------------------
  374|    675|            AVIF_CHECKERR(avifImagePlaneHeight(inputImageItems[i], c) == planeHeight, AVIF_RESULT_BMFF_PARSE_FAILED);
  ------------------
  |  |   45|    675|    do {                        \
  |  |   46|    675|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 675]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    675|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 675]
  |  |  ------------------
  ------------------
  375|    675|        }
  376|    338|    }
  377|       |
  378|       |    // Then apply it. This part should not fail except for memory shortage reasons.
  379|    112|    if (bitDepth == AVIF_SAMPLE_TRANSFORM_BIT_DEPTH_32) {
  ------------------
  |  Branch (379:9): [True: 112, False: 0]
  ------------------
  380|    112|        uint32_t stackCapacity = expression->count / 2 + 1;
  381|    112|        int32_t * stack = avifAlloc(stackCapacity * sizeof(int32_t));
  382|    112|        AVIF_CHECKERR(stack != NULL, AVIF_RESULT_OUT_OF_MEMORY);
  ------------------
  |  |   45|    112|    do {                        \
  |  |   46|    112|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (46:13): [True: 0, False: 112]
  |  |  ------------------
  |  |   47|      0|            avifBreakOnError(); \
  |  |   48|      0|            return ERR;         \
  |  |   49|      0|        }                       \
  |  |   50|    112|    } while (0)
  |  |  ------------------
  |  |  |  Branch (50:14): [Folded, False: 112]
  |  |  ------------------
  ------------------
  383|    112|        const avifResult result = avifImageApplyExpression32b(dstImage, expression, inputImageItems, planes, stack, stackCapacity);
  384|    112|        avifFree(stack);
  385|    112|        return result;
  386|    112|    }
  387|      0|    return AVIF_RESULT_NOT_IMPLEMENTED;
  388|    112|}
sampletransform.c:avifImageApplyExpression32b:
  290|    112|{
  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|    112|    const int32_t minValue = 0;
  295|    112|    const int32_t maxValue = (1 << dstImage->depth) - 1;
  296|       |
  297|    112|    const avifBool skipColor = !(planes & AVIF_PLANES_YUV);
  298|    112|    const avifBool skipAlpha = !(planes & AVIF_PLANES_A);
  299|    560|    for (int c = AVIF_CHAN_Y; c <= AVIF_CHAN_A; ++c) {
  ------------------
  |  Branch (299:31): [True: 448, False: 112]
  ------------------
  300|    448|        const avifBool alpha = c == AVIF_CHAN_A;
  301|    448|        if ((skipColor && !alpha) || (skipAlpha && alpha)) {
  ------------------
  |  Branch (301:14): [True: 0, False: 448]
  |  Branch (301:27): [True: 0, False: 0]
  |  Branch (301:39): [True: 448, False: 0]
  |  Branch (301:52): [True: 112, False: 336]
  ------------------
  302|    112|            continue;
  303|    112|        }
  304|       |
  305|    336|        const uint32_t planeWidth = avifImagePlaneWidth(dstImage, c);
  306|    336|        const uint32_t planeHeight = avifImagePlaneHeight(dstImage, c);
  307|   227k|        for (uint32_t y = 0; y < planeHeight; ++y) {
  ------------------
  |  Branch (307:30): [True: 227k, False: 336]
  ------------------
  308|   234M|            for (uint32_t x = 0; x < planeWidth; ++x) {
  ------------------
  |  Branch (308:34): [True: 234M, False: 227k]
  ------------------
  309|   234M|                uint32_t stackSize = 0;
  310|  1.87G|                for (uint32_t t = 0; t < expression->count; ++t) {
  ------------------
  |  Branch (310:38): [True: 1.63G, False: 234M]
  ------------------
  311|  1.63G|                    const avifSampleTransformToken * token = &expression->tokens[t];
  312|  1.63G|                    if (token->type == AVIF_SAMPLE_TRANSFORM_CONSTANT) {
  ------------------
  |  Branch (312:25): [True: 468M, False: 1.17G]
  ------------------
  313|   468M|                        AVIF_ASSERT_OR_RETURN(stackSize < stackCapacity);
  ------------------
  |  |   64|   468M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   468M|    do {                        \
  |  |  |  |   46|   468M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 468M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   468M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 468M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  314|   468M|                        stack[stackSize++] = token->constant;
  315|  1.17G|                    } else if (token->type == AVIF_SAMPLE_TRANSFORM_INPUT_IMAGE_ITEM_INDEX) {
  ------------------
  |  Branch (315:32): [True: 468M, False: 702M]
  ------------------
  316|   468M|                        const avifImage * image = inputImageItems[token->inputImageItemIndex - 1]; // 1-based
  317|   468M|                        const uint8_t * row = avifImagePlane(image, c);
  318|   468M|                        AVIF_ASSERT_OR_RETURN(row != NULL);
  ------------------
  |  |   64|   468M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   468M|    do {                        \
  |  |  |  |   46|   468M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 468M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   468M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 468M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  319|   468M|                        row += (size_t)avifImagePlaneRowBytes(image, c) * y;
  320|   468M|                        AVIF_ASSERT_OR_RETURN(stackSize < stackCapacity);
  ------------------
  |  |   64|   468M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   468M|    do {                        \
  |  |  |  |   46|   468M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 468M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   468M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 468M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  321|   468M|                        stack[stackSize++] = avifImageUsesU16(image) ? ((const uint16_t *)row)[x] : row[x];
  ------------------
  |  Branch (321:46): [True: 362M, False: 106M]
  ------------------
  322|   702M|                    } else if (token->type == AVIF_SAMPLE_TRANSFORM_NEGATION || token->type == AVIF_SAMPLE_TRANSFORM_ABSOLUTE ||
  ------------------
  |  Branch (322:32): [True: 0, False: 702M]
  |  Branch (322:81): [True: 0, False: 702M]
  ------------------
  323|   702M|                               token->type == AVIF_SAMPLE_TRANSFORM_NOT || token->type == AVIF_SAMPLE_TRANSFORM_BSR) {
  ------------------
  |  Branch (323:32): [True: 0, False: 702M]
  |  Branch (323:76): [True: 0, False: 702M]
  ------------------
  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|   702M|                    } else {
  328|   702M|                        AVIF_ASSERT_OR_RETURN(stackSize >= 2);
  ------------------
  |  |   64|   702M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   702M|    do {                        \
  |  |  |  |   46|   702M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 702M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   702M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 702M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  329|   702M|                        stack[stackSize - 2] =
  330|   702M|                            avifSampleTransformOperation32bTwoOperands(stack[stackSize - 2], stack[stackSize - 1], token->type);
  331|   702M|                        stackSize--; // Pop two and push one.
  332|   702M|                    }
  333|  1.63G|                }
  334|   234M|                AVIF_ASSERT_OR_RETURN(stackSize == 1);
  ------------------
  |  |   64|   234M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   234M|    do {                        \
  |  |  |  |   46|   234M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 234M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   234M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 234M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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|   234M|                stack[0] = AVIF_CLAMP(stack[0], minValue, maxValue);
  ------------------
  |  |   18|   234M|#define AVIF_CLAMP(x, low, high) (((x) < (low)) ? (low) : (((high) < (x)) ? (high) : (x)))
  |  |  ------------------
  |  |  |  Branch (18:35): [True: 96.4M, False: 137M]
  |  |  |  Branch (18:60): [True: 96.0M, False: 41.8M]
  |  |  ------------------
  ------------------
  338|       |
  339|   234M|                uint8_t * row = avifImagePlane(dstImage, c);
  340|   234M|                AVIF_ASSERT_OR_RETURN(row != NULL);
  ------------------
  |  |   64|   234M|#define AVIF_ASSERT_OR_RETURN(A) AVIF_CHECKERR((A), AVIF_RESULT_INTERNAL_ERROR)
  |  |  ------------------
  |  |  |  |   45|   234M|    do {                        \
  |  |  |  |   46|   234M|        if (!(A)) {             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:13): [True: 0, False: 234M]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|            avifBreakOnError(); \
  |  |  |  |   48|      0|            return ERR;         \
  |  |  |  |   49|      0|        }                       \
  |  |  |  |   50|   234M|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:14): [Folded, False: 234M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  341|   234M|                row += (size_t)avifImagePlaneRowBytes(dstImage, c) * y;
  342|   234M|                if (avifImageUsesU16(dstImage)) {
  ------------------
  |  Branch (342:21): [True: 234M, False: 0]
  ------------------
  343|   234M|                    ((uint16_t *)row)[x] = (uint16_t)stack[0];
  344|   234M|                } else {
  345|      0|                    row[x] = (uint8_t)stack[0];
  346|      0|                }
  347|   234M|            }
  348|   227k|        }
  349|    336|    }
  350|    112|    return AVIF_RESULT_OK;
  351|    112|}
sampletransform.c:avifSampleTransformClamp32b:
  196|   567M|{
  197|   567M|    return value <= INT32_MIN ? INT32_MIN : value >= INT32_MAX ? INT32_MAX : (int32_t)value;
  ------------------
  |  Branch (197:12): [True: 131M, False: 435M]
  |  Branch (197:45): [True: 113M, False: 322M]
  ------------------
  198|   567M|}
sampletransform.c:avifSampleTransformOperation32bTwoOperands:
  227|   702M|{
  228|   702M|    switch (operator) {
  229|   103M|        case AVIF_SAMPLE_TRANSFORM_SUM:
  ------------------
  |  Branch (229:9): [True: 103M, False: 598M]
  ------------------
  230|   103M|            return avifSampleTransformClamp32b((int64_t)leftOperand + rightOperand);
  231|   109M|        case AVIF_SAMPLE_TRANSFORM_DIFFERENCE:
  ------------------
  |  Branch (231:9): [True: 109M, False: 593M]
  ------------------
  232|   109M|            return avifSampleTransformClamp32b((int64_t)leftOperand - rightOperand);
  233|   284M|        case AVIF_SAMPLE_TRANSFORM_PRODUCT:
  ------------------
  |  Branch (233:9): [True: 284M, False: 418M]
  ------------------
  234|   284M|            return avifSampleTransformClamp32b((int64_t)leftOperand * rightOperand);
  235|  69.4M|        case AVIF_SAMPLE_TRANSFORM_QUOTIENT:
  ------------------
  |  Branch (235:9): [True: 69.4M, False: 633M]
  ------------------
  236|  69.4M|            return rightOperand == 0 ? leftOperand : avifSampleTransformClamp32b((int64_t)leftOperand / rightOperand);
  ------------------
  |  Branch (236:20): [True: 234k, False: 69.1M]
  ------------------
  237|      0|        case AVIF_SAMPLE_TRANSFORM_AND:
  ------------------
  |  Branch (237:9): [True: 0, False: 702M]
  ------------------
  238|      0|            return leftOperand & rightOperand;
  239|   515k|        case AVIF_SAMPLE_TRANSFORM_OR:
  ------------------
  |  Branch (239:9): [True: 515k, False: 702M]
  ------------------
  240|   515k|            return leftOperand | rightOperand;
  241|  4.75M|        case AVIF_SAMPLE_TRANSFORM_XOR:
  ------------------
  |  Branch (241:9): [True: 4.75M, False: 698M]
  ------------------
  242|  4.75M|            return leftOperand ^ rightOperand;
  243|   107M|        case AVIF_SAMPLE_TRANSFORM_POW: {
  ------------------
  |  Branch (243:9): [True: 107M, False: 595M]
  ------------------
  244|   107M|            if (leftOperand == 0 || leftOperand == 1) {
  ------------------
  |  Branch (244:17): [True: 355k, False: 106M]
  |  Branch (244:37): [True: 0, False: 106M]
  ------------------
  245|   355k|                return leftOperand;
  246|   355k|            }
  247|   106M|            if (leftOperand == -1) {
  ------------------
  |  Branch (247:17): [True: 0, False: 106M]
  ------------------
  248|      0|                return (rightOperand % 2 == 0) ? 1 : -1;
  ------------------
  |  Branch (248:24): [True: 0, False: 0]
  ------------------
  249|      0|            }
  250|   106M|            if (rightOperand == 0) {
  ------------------
  |  Branch (250:17): [True: 504k, False: 106M]
  ------------------
  251|   504k|                return 1;
  252|   504k|            }
  253|   106M|            if (rightOperand == 1) {
  ------------------
  |  Branch (253:17): [True: 58.6k, False: 106M]
  ------------------
  254|  58.6k|                return leftOperand;
  255|  58.6k|            }
  256|   106M|            if (rightOperand < 0) {
  ------------------
  |  Branch (256:17): [True: 0, False: 106M]
  ------------------
  257|       |                // L^R is in ]-1:1[ here, so truncating it always gives 0.
  258|      0|                return 0;
  259|      0|            }
  260|   106M|            int64_t result = leftOperand;
  261|   158M|            for (int32_t i = 1; i < rightOperand; ++i) {
  ------------------
  |  Branch (261:33): [True: 158M, False: 88.0k]
  ------------------
  262|   158M|                result *= leftOperand;
  263|   158M|                if (result < INT32_MIN || result > INT32_MAX) {
  ------------------
  |  Branch (263:21): [True: 0, False: 158M]
  |  Branch (263:43): [True: 106M, False: 51.9M]
  ------------------
  264|   106M|                    return (leftOperand > 0 || rightOperand % 2 == 0) ? INT32_MAX : INT32_MIN;
  ------------------
  |  Branch (264:29): [True: 27.0M, False: 79.0M]
  |  Branch (264:48): [True: 40.3M, False: 38.7M]
  ------------------
  265|   106M|                }
  266|   158M|            }
  267|  88.0k|            return (int32_t)result;
  268|   106M|        }
  269|      0|        case AVIF_SAMPLE_TRANSFORM_MIN:
  ------------------
  |  Branch (269:9): [True: 0, False: 702M]
  ------------------
  270|      0|            return leftOperand <= rightOperand ? leftOperand : rightOperand;
  ------------------
  |  Branch (270:20): [True: 0, False: 0]
  ------------------
  271|  23.1M|        case AVIF_SAMPLE_TRANSFORM_MAX:
  ------------------
  |  Branch (271:9): [True: 23.1M, False: 679M]
  ------------------
  272|  23.1M|            return leftOperand <= rightOperand ? rightOperand : leftOperand;
  ------------------
  |  Branch (272:20): [True: 155k, False: 22.9M]
  ------------------
  273|      0|        default:
  ------------------
  |  Branch (273:9): [True: 0, False: 702M]
  ------------------
  274|      0|            assert(AVIF_FALSE);
  275|   702M|    }
  276|      0|    return 0;
  277|   702M|}

avifImageScaleWithLimit:
   30|  9.46k|{
   31|  9.46k|    if ((image->width == dstWidth) && (image->height == dstHeight)) {
  ------------------
  |  Branch (31:9): [True: 879, False: 8.58k]
  |  Branch (31:39): [True: 0, False: 879]
  ------------------
   32|       |        // Nothing to do
   33|      0|        return AVIF_RESULT_OK;
   34|      0|    }
   35|       |
   36|  9.46k|    if ((dstWidth == 0) || (dstHeight == 0)) {
  ------------------
  |  Branch (36:9): [True: 1, False: 9.46k]
  |  Branch (36:28): [True: 1, False: 9.45k]
  ------------------
   37|      2|        avifDiagnosticsPrintf(diag, "avifImageScaleWithLimit requested invalid dst dimensions [%ux%u]", dstWidth, dstHeight);
   38|      2|        return AVIF_RESULT_INVALID_ARGUMENT;
   39|      2|    }
   40|  9.45k|    if (avifDimensionsTooLarge(dstWidth, dstHeight, imageSizeLimit, imageDimensionLimit)) {
  ------------------
  |  Branch (40:9): [True: 1, False: 9.45k]
  ------------------
   41|      1|        avifDiagnosticsPrintf(diag, "avifImageScaleWithLimit requested dst dimensions that are too large [%ux%u]", dstWidth, dstHeight);
   42|      1|        return AVIF_RESULT_NOT_IMPLEMENTED;
   43|      1|    }
   44|       |
   45|  9.45k|    uint8_t * srcYUVPlanes[AVIF_PLANE_COUNT_YUV];
   46|  9.45k|    uint32_t srcYUVRowBytes[AVIF_PLANE_COUNT_YUV];
   47|  37.8k|    for (int i = 0; i < AVIF_PLANE_COUNT_YUV; ++i) {
  ------------------
  |  |  112|  37.8k|#define AVIF_PLANE_COUNT_YUV 3
  ------------------
  |  Branch (47:21): [True: 28.3k, False: 9.45k]
  ------------------
   48|  28.3k|        srcYUVPlanes[i] = image->yuvPlanes[i];
   49|  28.3k|        image->yuvPlanes[i] = NULL;
   50|  28.3k|        srcYUVRowBytes[i] = image->yuvRowBytes[i];
   51|  28.3k|        image->yuvRowBytes[i] = 0;
   52|  28.3k|    }
   53|  9.45k|    const avifBool srcImageOwnsYUVPlanes = image->imageOwnsYUVPlanes;
   54|  9.45k|    image->imageOwnsYUVPlanes = AVIF_FALSE;
  ------------------
  |  |   89|  9.45k|#define AVIF_FALSE 0
  ------------------
   55|       |
   56|  9.45k|    uint8_t * srcAlphaPlane = image->alphaPlane;
   57|  9.45k|    image->alphaPlane = NULL;
   58|  9.45k|    uint32_t srcAlphaRowBytes = image->alphaRowBytes;
   59|  9.45k|    image->alphaRowBytes = 0;
   60|  9.45k|    const avifBool srcImageOwnsAlphaPlane = image->imageOwnsAlphaPlane;
   61|  9.45k|    image->imageOwnsAlphaPlane = AVIF_FALSE;
  ------------------
  |  |   89|  9.45k|#define AVIF_FALSE 0
  ------------------
   62|       |
   63|  9.45k|    const uint32_t srcWidth = image->width;
   64|  9.45k|    const uint32_t srcHeight = image->height;
   65|  9.45k|    const uint32_t srcUVWidth = avifImagePlaneWidth(image, AVIF_CHAN_U);
   66|  9.45k|    const uint32_t srcUVHeight = avifImagePlaneHeight(image, AVIF_CHAN_U);
   67|  9.45k|    image->width = dstWidth;
   68|  9.45k|    image->height = dstHeight;
   69|       |
   70|  9.45k|    avifResult result = AVIF_RESULT_OK;
   71|  9.45k|    if (srcYUVPlanes[0] || srcAlphaPlane) {
  ------------------
  |  Branch (71:9): [True: 8.70k, False: 751]
  |  Branch (71:28): [True: 751, False: 0]
  ------------------
   72|       |        // A simple conservative check to avoid integer overflows in libyuv's ScalePlane() and
   73|       |        // ScalePlane_12() functions.
   74|  9.45k|        if (srcWidth > 16384) {
  ------------------
  |  Branch (74:13): [True: 0, False: 9.45k]
  ------------------
   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|  9.45k|        if (srcHeight > 16384) {
  ------------------
  |  Branch (79:13): [True: 6, False: 9.45k]
  ------------------
   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|  9.45k|    }
   85|       |
   86|  9.45k|    if (srcYUVPlanes[0]) {
  ------------------
  |  Branch (86:9): [True: 8.70k, False: 751]
  ------------------
   87|  8.70k|        const avifResult allocationResult = avifImageAllocatePlanes(image, AVIF_PLANES_YUV);
   88|  8.70k|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (88:13): [True: 0, False: 8.70k]
  ------------------
   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|  34.8k|        for (int i = 0; i < AVIF_PLANE_COUNT_YUV; ++i) {
  ------------------
  |  |  112|  34.8k|#define AVIF_PLANE_COUNT_YUV 3
  ------------------
  |  Branch (94:25): [True: 26.1k, False: 8.70k]
  ------------------
   95|  26.1k|            if (!srcYUVPlanes[i]) {
  ------------------
  |  Branch (95:17): [True: 3.80k, False: 22.2k]
  ------------------
   96|  3.80k|                continue;
   97|  3.80k|            }
   98|       |
   99|  22.2k|            const uint32_t srcW = (i == AVIF_CHAN_Y) ? srcWidth : srcUVWidth;
  ------------------
  |  Branch (99:35): [True: 8.70k, False: 13.5k]
  ------------------
  100|  22.2k|            const uint32_t srcH = (i == AVIF_CHAN_Y) ? srcHeight : srcUVHeight;
  ------------------
  |  Branch (100:35): [True: 8.70k, False: 13.5k]
  ------------------
  101|  22.2k|            const uint32_t dstW = avifImagePlaneWidth(image, i);
  102|  22.2k|            const uint32_t dstH = avifImagePlaneHeight(image, i);
  103|  22.2k|            if (image->depth > 8) {
  ------------------
  |  Branch (103:17): [True: 13.2k, False: 9.05k]
  ------------------
  104|  13.2k|                uint16_t * const srcPlane = (uint16_t *)srcYUVPlanes[i];
  105|  13.2k|                const uint32_t srcStride = srcYUVRowBytes[i] / 2;
  106|  13.2k|                uint16_t * const dstPlane = (uint16_t *)image->yuvPlanes[i];
  107|  13.2k|                const uint32_t dstStride = image->yuvRowBytes[i] / 2;
  108|  13.2k|#if LIBYUV_VERSION >= 1880
  109|  13.2k|                const int failure =
  110|  13.2k|                    ScalePlane_12(srcPlane, srcStride, srcW, srcH, dstPlane, dstStride, dstW, dstH, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|  13.2k|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  111|  13.2k|                if (failure) {
  ------------------
  |  Branch (111:21): [True: 0, False: 13.2k]
  ------------------
  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|  13.2k|            } else {
  122|  9.05k|                uint8_t * const srcPlane = srcYUVPlanes[i];
  123|  9.05k|                const uint32_t srcStride = srcYUVRowBytes[i];
  124|  9.05k|                uint8_t * const dstPlane = image->yuvPlanes[i];
  125|  9.05k|                const uint32_t dstStride = image->yuvRowBytes[i];
  126|  9.05k|#if LIBYUV_VERSION >= 1880
  127|  9.05k|                const int failure = ScalePlane(srcPlane, srcStride, srcW, srcH, dstPlane, dstStride, dstW, dstH, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|  9.05k|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  128|  9.05k|                if (failure) {
  ------------------
  |  Branch (128:21): [True: 0, False: 9.05k]
  ------------------
  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|  9.05k|            }
  137|  22.2k|        }
  138|  8.70k|    }
  139|       |
  140|  9.45k|    if (srcAlphaPlane) {
  ------------------
  |  Branch (140:9): [True: 751, False: 8.70k]
  ------------------
  141|    751|        const avifResult allocationResult = avifImageAllocatePlanes(image, AVIF_PLANES_A);
  142|    751|        if (allocationResult != AVIF_RESULT_OK) {
  ------------------
  |  Branch (142:13): [True: 0, False: 751]
  ------------------
  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|    751|        if (image->depth > 8) {
  ------------------
  |  Branch (148:13): [True: 257, False: 494]
  ------------------
  149|    257|            uint16_t * const srcPlane = (uint16_t *)srcAlphaPlane;
  150|    257|            const uint32_t srcStride = srcAlphaRowBytes / 2;
  151|    257|            uint16_t * const dstPlane = (uint16_t *)image->alphaPlane;
  152|    257|            const uint32_t dstStride = image->alphaRowBytes / 2;
  153|    257|#if LIBYUV_VERSION >= 1880
  154|    257|            const int failure =
  155|    257|                ScalePlane_12(srcPlane, srcStride, srcWidth, srcHeight, dstPlane, dstStride, dstWidth, dstHeight, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|    257|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  156|    257|            if (failure) {
  ------------------
  |  Branch (156:17): [True: 0, False: 257]
  ------------------
  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|    494|        } else {
  167|    494|            uint8_t * const srcPlane = srcAlphaPlane;
  168|    494|            const uint32_t srcStride = srcAlphaRowBytes;
  169|    494|            uint8_t * const dstPlane = image->alphaPlane;
  170|    494|            const uint32_t dstStride = image->alphaRowBytes;
  171|    494|#if LIBYUV_VERSION >= 1880
  172|    494|            const int failure =
  173|    494|                ScalePlane(srcPlane, srcStride, srcWidth, srcHeight, dstPlane, dstStride, dstWidth, dstHeight, AVIF_LIBYUV_FILTER_MODE);
  ------------------
  |  |   22|    494|#define AVIF_LIBYUV_FILTER_MODE kFilterBox
  ------------------
  174|    494|            if (failure) {
  ------------------
  |  Branch (174:17): [True: 0, False: 494]
  ------------------
  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|    494|        }
  183|    751|    }
  184|       |
  185|  9.45k|cleanup:
  186|  9.45k|    if (srcYUVPlanes[0] && srcImageOwnsYUVPlanes) {
  ------------------
  |  Branch (186:9): [True: 8.70k, False: 751]
  |  Branch (186:28): [True: 0, False: 8.70k]
  ------------------
  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|  9.45k|    if (srcAlphaPlane && srcImageOwnsAlphaPlane) {
  ------------------
  |  Branch (191:9): [True: 751, False: 8.70k]
  |  Branch (191:26): [True: 406, False: 345]
  ------------------
  192|    406|        avifFree(srcAlphaPlane);
  193|    406|    }
  194|  9.45k|    return result;
  195|  9.45k|}

avifROStreamCurrent:
   15|  15.4M|{
   16|  15.4M|    return stream->raw->data + stream->offset;
   17|  15.4M|}
avifROStreamStart:
   20|  16.5M|{
   21|  16.5M|    stream->raw = raw;
   22|  16.5M|    stream->offset = 0;
   23|  16.5M|    stream->numUsedBitsInPartialByte = 0;
   24|  16.5M|    stream->diag = diag;
   25|  16.5M|    stream->diagContext = diagContext;
   26|       |
   27|       |    // If diag is non-NULL, diagContext must also be non-NULL
   28|       |    assert(!stream->diag || stream->diagContext);
   29|  16.5M|}
avifROStreamHasBytesLeft:
   32|   119M|{
   33|   119M|    return byteCount <= (stream->raw->size - stream->offset);
   34|   119M|}
avifROStreamRemainingBytes:
   37|  4.08M|{
   38|  4.08M|    return stream->raw->size - stream->offset;
   39|  4.08M|}
avifROStreamOffset:
   42|  7.44M|{
   43|  7.44M|    return stream->offset;
   44|  7.44M|}
avifROStreamSkip:
   56|  22.8M|{
   57|  22.8M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
   58|  22.8M|    if (!avifROStreamHasBytesLeft(stream, byteCount)) {
  ------------------
  |  Branch (58:9): [True: 66, False: 22.8M]
  ------------------
   59|     66|        avifDiagnosticsPrintf(stream->diag, "%s: Failed to skip %zu bytes, truncated data?", stream->diagContext, byteCount);
   60|     66|        return AVIF_FALSE;
  ------------------
  |  |   89|     66|#define AVIF_FALSE 0
  ------------------
   61|     66|    }
   62|  22.8M|    stream->offset += byteCount;
   63|  22.8M|    return AVIF_TRUE;
  ------------------
  |  |   88|  22.8M|#define AVIF_TRUE 1
  ------------------
   64|  22.8M|}
avifROStreamRead:
   67|  71.0M|{
   68|  71.0M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
   69|  71.0M|    if (!avifROStreamHasBytesLeft(stream, size)) {
  ------------------
  |  Branch (69:9): [True: 562, False: 71.0M]
  ------------------
   70|    562|        avifDiagnosticsPrintf(stream->diag, "%s: Failed to read %zu bytes, truncated data?", stream->diagContext, size);
   71|    562|        return AVIF_FALSE;
  ------------------
  |  |   89|    562|#define AVIF_FALSE 0
  ------------------
   72|    562|    }
   73|       |
   74|  71.0M|    memcpy(data, stream->raw->data + stream->offset, size);
   75|  71.0M|    stream->offset += size;
   76|  71.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  71.0M|#define AVIF_TRUE 1
  ------------------
   77|  71.0M|}
avifROStreamReadUX8:
   80|  27.0M|{
   81|  27.0M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
   82|  27.0M|    if (factor == 0) {
  ------------------
  |  Branch (82:9): [True: 24.3M, False: 2.78M]
  ------------------
   83|       |        // Don't read anything, just set to 0
   84|  24.3M|        *v = 0;
   85|  24.3M|    } else if (factor == 1) {
  ------------------
  |  Branch (85:16): [True: 0, False: 2.78M]
  ------------------
   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|  2.78M|    } else if (factor == 2) {
  ------------------
  |  Branch (89:16): [True: 0, False: 2.78M]
  ------------------
   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|  2.78M|    } else if (factor == 4) {
  ------------------
  |  Branch (93:16): [True: 2.74M, False: 40.3k]
  ------------------
   94|  2.74M|        uint32_t tmp;
   95|  2.74M|        AVIF_CHECK(avifROStreamReadU32(stream, &tmp));
  ------------------
  |  |   36|  2.74M|    do {                        \
  |  |   37|  2.74M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 46, False: 2.74M]
  |  |  ------------------
  |  |   38|     46|            avifBreakOnError(); \
  |  |   39|     46|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     46|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     46|        }                       \
  |  |   41|  2.74M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 2.74M]
  |  |  ------------------
  ------------------
   96|  2.74M|        *v = tmp;
   97|  2.74M|    } else if (factor == 8) {
  ------------------
  |  Branch (97:16): [True: 40.3k, False: 0]
  ------------------
   98|  40.3k|        uint64_t tmp;
   99|  40.3k|        AVIF_CHECK(avifROStreamReadU64(stream, &tmp));
  ------------------
  |  |   36|  40.3k|    do {                        \
  |  |   37|  40.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 78, False: 40.2k]
  |  |  ------------------
  |  |   38|     78|            avifBreakOnError(); \
  |  |   39|     78|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     78|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     78|        }                       \
  |  |   41|  40.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 40.2k]
  |  |  ------------------
  ------------------
  100|  40.2k|        *v = tmp;
  101|  40.2k|    } 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|  27.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  27.0M|#define AVIF_TRUE 1
  ------------------
  107|  27.0M|}
avifROStreamReadU16:
  110|  10.9M|{
  111|  10.9M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  112|  10.9M|    AVIF_CHECK(avifROStreamRead(stream, (uint8_t *)v, sizeof(uint16_t)));
  ------------------
  |  |   36|  10.9M|    do {                        \
  |  |   37|  10.9M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 91, False: 10.9M]
  |  |  ------------------
  |  |   38|     91|            avifBreakOnError(); \
  |  |   39|     91|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     91|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     91|        }                       \
  |  |   41|  10.9M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 10.9M]
  |  |  ------------------
  ------------------
  113|  10.9M|    *v = avifNTOHS(*v);
  114|  10.9M|    return AVIF_TRUE;
  ------------------
  |  |   88|  10.9M|#define AVIF_TRUE 1
  ------------------
  115|  10.9M|}
avifROStreamReadU32:
  126|  26.4M|{
  127|  26.4M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  128|  26.4M|    AVIF_CHECK(avifROStreamRead(stream, (uint8_t *)v, sizeof(uint32_t)));
  ------------------
  |  |   36|  26.4M|    do {                        \
  |  |   37|  26.4M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 288, False: 26.4M]
  |  |  ------------------
  |  |   38|    288|            avifBreakOnError(); \
  |  |   39|    288|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|    288|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|    288|        }                       \
  |  |   41|  26.4M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 26.4M]
  |  |  ------------------
  ------------------
  129|  26.4M|    *v = avifNTOHL(*v);
  130|  26.4M|    return AVIF_TRUE;
  ------------------
  |  |   88|  26.4M|#define AVIF_TRUE 1
  ------------------
  131|  26.4M|}
avifROStreamReadU64:
  142|   692k|{
  143|   692k|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  144|   692k|    AVIF_CHECK(avifROStreamRead(stream, (uint8_t *)v, sizeof(uint64_t)));
  ------------------
  |  |   36|   692k|    do {                        \
  |  |   37|   692k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 89, False: 692k]
  |  |  ------------------
  |  |   38|     89|            avifBreakOnError(); \
  |  |   39|     89|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     89|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     89|        }                       \
  |  |   41|   692k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 692k]
  |  |  ------------------
  ------------------
  145|   692k|    *v = avifNTOH64(*v);
  146|   692k|    return AVIF_TRUE;
  ------------------
  |  |   88|   692k|#define AVIF_TRUE 1
  ------------------
  147|   692k|}
avifROStreamReadBitsU8:
  167|  13.6M|{
  168|  13.6M|    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
  ------------------
  |  |   36|  13.6M|    do {                        \
  |  |   37|  13.6M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 13.6M]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  13.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 13.6M]
  |  |  ------------------
  ------------------
  169|  13.6M|    uint32_t vU32;
  170|  13.6M|    AVIF_CHECK(avifROStreamReadBitsU32(stream, &vU32, bitCount));
  ------------------
  |  |   36|  13.6M|    do {                        \
  |  |   37|  13.6M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 23, False: 13.6M]
  |  |  ------------------
  |  |   38|     23|            avifBreakOnError(); \
  |  |   39|     23|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     23|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     23|        }                       \
  |  |   41|  13.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 13.6M]
  |  |  ------------------
  ------------------
  171|  13.6M|    *v = (uint8_t)vU32;
  172|  13.6M|    return AVIF_TRUE;
  ------------------
  |  |   88|  13.6M|#define AVIF_TRUE 1
  ------------------
  173|  13.6M|}
avifROStreamReadBitsU16:
  176|  1.32k|{
  177|  1.32k|    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
  ------------------
  |  |   36|  1.32k|    do {                        \
  |  |   37|  1.32k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 1.32k]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  1.32k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.32k]
  |  |  ------------------
  ------------------
  178|  1.32k|    uint32_t vU32;
  179|  1.32k|    AVIF_CHECK(avifROStreamReadBitsU32(stream, &vU32, bitCount));
  ------------------
  |  |   36|  1.32k|    do {                        \
  |  |   37|  1.32k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 1.32k]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|  1.32k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 1.32k]
  |  |  ------------------
  ------------------
  180|  1.32k|    *v = (uint16_t)vU32;
  181|  1.32k|    return AVIF_TRUE;
  ------------------
  |  |   88|  1.32k|#define AVIF_TRUE 1
  ------------------
  182|  1.32k|}
avifROStreamReadBitsU32:
  185|  20.0M|{
  186|  20.0M|    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
  ------------------
  |  |   36|  20.0M|    do {                        \
  |  |   37|  20.0M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 0, False: 20.0M]
  |  |  ------------------
  |  |   38|      0|            avifBreakOnError(); \
  |  |   39|      0|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      0|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      0|        }                       \
  |  |   41|  20.0M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 20.0M]
  |  |  ------------------
  ------------------
  187|  20.0M|    *v = 0;
  188|  40.1M|    while (bitCount) {
  ------------------
  |  Branch (188:12): [True: 20.0M, False: 20.0M]
  ------------------
  189|  20.0M|        if (stream->numUsedBitsInPartialByte == 0) {
  ------------------
  |  Branch (189:13): [True: 8.08M, False: 12.0M]
  ------------------
  190|  8.08M|            AVIF_CHECK(avifROStreamSkip(stream, sizeof(uint8_t))); // Book a new partial byte in the stream.
  ------------------
  |  |   36|  8.08M|    do {                        \
  |  |   37|  8.08M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 64, False: 8.08M]
  |  |  ------------------
  |  |   38|     64|            avifBreakOnError(); \
  |  |   39|     64|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     64|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     64|        }                       \
  |  |   41|  8.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 8.08M]
  |  |  ------------------
  ------------------
  191|  8.08M|        }
  192|  20.0M|        assert(stream->offset > 0);
  193|  20.0M|        const uint8_t * packedBits = stream->raw->data + stream->offset - 1;
  194|       |
  195|  20.0M|        const size_t numBits = AVIF_MIN(bitCount, 8 - stream->numUsedBitsInPartialByte);
  ------------------
  |  |   19|  20.0M|#define AVIF_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (19:25): [True: 12.0M, False: 8.08M]
  |  |  ------------------
  ------------------
  196|  20.0M|        stream->numUsedBitsInPartialByte += numBits;
  197|  20.0M|        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|  20.0M|        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|  20.0M|        *v |= bits << bitCount;
  205|       |
  206|  20.0M|        if (stream->numUsedBitsInPartialByte == 8) {
  ------------------
  |  Branch (206:13): [True: 8.08M, False: 12.0M]
  ------------------
  207|       |            // Start a new partial byte the next time a bit is needed.
  208|  8.08M|            stream->numUsedBitsInPartialByte = 0;
  209|  8.08M|        }
  210|  20.0M|    }
  211|  20.0M|    return AVIF_TRUE;
  ------------------
  |  |   88|  20.0M|#define AVIF_TRUE 1
  ------------------
  212|  20.0M|}
avifROStreamReadString:
  215|  2.37M|{
  216|  2.37M|    assert(stream->numUsedBitsInPartialByte == 0); // Byte alignment is required.
  217|       |
  218|       |    // Check for the presence of a null terminator in the stream.
  219|  2.37M|    size_t remainingBytes = avifROStreamRemainingBytes(stream);
  220|  2.37M|    const uint8_t * p = avifROStreamCurrent(stream);
  221|  2.37M|    avifBool foundNullTerminator = AVIF_FALSE;
  ------------------
  |  |   89|  2.37M|#define AVIF_FALSE 0
  ------------------
  222|  24.5M|    for (size_t i = 0; i < remainingBytes; ++i) {
  ------------------
  |  Branch (222:24): [True: 24.5M, False: 35]
  ------------------
  223|  24.5M|        if (p[i] == 0) {
  ------------------
  |  Branch (223:13): [True: 2.37M, False: 22.1M]
  ------------------
  224|  2.37M|            foundNullTerminator = AVIF_TRUE;
  ------------------
  |  |   88|  2.37M|#define AVIF_TRUE 1
  ------------------
  225|  2.37M|            break;
  226|  2.37M|        }
  227|  24.5M|    }
  228|  2.37M|    if (!foundNullTerminator) {
  ------------------
  |  Branch (228:9): [True: 35, False: 2.37M]
  ------------------
  229|     35|        avifDiagnosticsPrintf(stream->diag, "%s: Failed to find a NULL terminator when reading a string", stream->diagContext);
  230|     35|        return AVIF_FALSE;
  ------------------
  |  |   89|     35|#define AVIF_FALSE 0
  ------------------
  231|     35|    }
  232|       |
  233|  2.37M|    const char * streamString = (const char *)p;
  234|  2.37M|    size_t stringLen = strlen(streamString);
  235|  2.37M|    stream->offset += stringLen + 1; // update the stream to have read the "whole string" in
  236|       |
  237|  2.37M|    if (output && outputSize) {
  ------------------
  |  Branch (237:9): [True: 314k, False: 2.06M]
  |  Branch (237:19): [True: 314k, False: 0]
  ------------------
  238|       |        // clamp to our output buffer
  239|   314k|        if (stringLen >= outputSize) {
  ------------------
  |  Branch (239:13): [True: 1, False: 314k]
  ------------------
  240|      1|            stringLen = outputSize - 1;
  241|      1|        }
  242|   314k|        memcpy(output, streamString, stringLen);
  243|   314k|        output[stringLen] = 0;
  244|   314k|    }
  245|  2.37M|    return AVIF_TRUE;
  ------------------
  |  |   88|  2.37M|#define AVIF_TRUE 1
  ------------------
  246|  2.37M|}
avifROStreamReadBoxHeaderPartial:
  249|  15.8M|{
  250|       |    // Section 4.2.2 of ISO/IEC 14496-12.
  251|  15.8M|    size_t startOffset = stream->offset;
  252|       |
  253|  15.8M|    uint32_t smallSize;
  254|  15.8M|    AVIF_CHECK(avifROStreamReadU32(stream, &smallSize));   // unsigned int(32) size;
  ------------------
  |  |   36|  15.8M|    do {                        \
  |  |   37|  15.8M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 44, False: 15.8M]
  |  |  ------------------
  |  |   38|     44|            avifBreakOnError(); \
  |  |   39|     44|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     44|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     44|        }                       \
  |  |   41|  15.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 15.8M]
  |  |  ------------------
  ------------------
  255|  15.8M|    AVIF_CHECK(avifROStreamRead(stream, header->type, 4)); // unsigned int(32) type = boxtype;
  ------------------
  |  |   36|  15.8M|    do {                        \
  |  |   37|  15.8M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 20, False: 15.8M]
  |  |  ------------------
  |  |   38|     20|            avifBreakOnError(); \
  |  |   39|     20|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     20|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     20|        }                       \
  |  |   41|  15.8M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 15.8M]
  |  |  ------------------
  ------------------
  256|       |
  257|  15.8M|    uint64_t size = smallSize;
  258|  15.8M|    if (size == 1) {
  ------------------
  |  Branch (258:9): [True: 279, False: 15.8M]
  ------------------
  259|    279|        AVIF_CHECK(avifROStreamReadU64(stream, &size)); // unsigned int(64) largesize;
  ------------------
  |  |   36|    279|    do {                        \
  |  |   37|    279|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 275]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|    279|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 275]
  |  |  ------------------
  ------------------
  260|    279|    }
  261|       |
  262|  15.8M|    if (!memcmp(header->type, "uuid", 4)) {
  ------------------
  |  Branch (262:9): [True: 19.3k, False: 15.8M]
  ------------------
  263|  19.3k|        AVIF_CHECK(avifROStreamRead(stream, header->usertype, 16)); // unsigned int(8) usertype[16] = extended_type;
  ------------------
  |  |   36|  19.3k|    do {                        \
  |  |   37|  19.3k|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 3, False: 19.3k]
  |  |  ------------------
  |  |   38|      3|            avifBreakOnError(); \
  |  |   39|      3|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      3|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      3|        }                       \
  |  |   41|  19.3k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 19.3k]
  |  |  ------------------
  ------------------
  264|  15.8M|    } else {
  265|  15.8M|        memset(header->usertype, 0, sizeof(header->usertype));
  266|  15.8M|    }
  267|       |
  268|  15.8M|    size_t bytesRead = stream->offset - startOffset;
  269|  15.8M|    if (size == 0) {
  ------------------
  |  Branch (269:9): [True: 10.4k, False: 15.8M]
  ------------------
  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|  10.4k|        if (!topLevel) {
  ------------------
  |  Branch (274:13): [True: 9, False: 10.4k]
  ------------------
  275|      9|            avifDiagnosticsPrintf(stream->diag, "%s: Non-top-level box with size 0", stream->diagContext);
  276|      9|            return AVIF_FALSE;
  ------------------
  |  |   89|      9|#define AVIF_FALSE 0
  ------------------
  277|      9|        }
  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|  10.4k|        header->isSizeZeroBox = AVIF_TRUE;
  ------------------
  |  |   88|  10.4k|#define AVIF_TRUE 1
  ------------------
  284|  10.4k|        header->size = 0;
  285|  10.4k|        return AVIF_TRUE;
  ------------------
  |  |   88|  10.4k|#define AVIF_TRUE 1
  ------------------
  286|  10.4k|    }
  287|       |
  288|  15.8M|    if ((size < bytesRead) || ((size - bytesRead) > SIZE_MAX)) {
  ------------------
  |  Branch (288:9): [True: 2, False: 15.8M]
  |  Branch (288:31): [True: 0, False: 15.8M]
  ------------------
  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|  15.8M|    header->isSizeZeroBox = AVIF_FALSE;
  ------------------
  |  |   89|  15.8M|#define AVIF_FALSE 0
  ------------------
  293|  15.8M|    header->size = (size_t)(size - bytesRead);
  294|  15.8M|    return AVIF_TRUE;
  ------------------
  |  |   88|  15.8M|#define AVIF_TRUE 1
  ------------------
  295|  15.8M|}
avifROStreamReadBoxHeader:
  298|  12.2M|{
  299|  12.2M|    AVIF_CHECK(avifROStreamReadBoxHeaderPartial(stream, header, /*topLevel=*/AVIF_FALSE));
  ------------------
  |  |   36|  12.2M|    do {                        \
  |  |   37|  12.2M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 55, False: 12.2M]
  |  |  ------------------
  |  |   38|     55|            avifBreakOnError(); \
  |  |   39|     55|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     55|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     55|        }                       \
  |  |   41|  12.2M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 12.2M]
  |  |  ------------------
  ------------------
  300|  12.2M|    if (!avifROStreamHasBytesLeft(stream, header->size)) {
  ------------------
  |  Branch (300:9): [True: 242, False: 12.2M]
  ------------------
  301|    242|        avifDiagnosticsPrintf(stream->diag, "%s: Child box too large, possibly truncated data", stream->diagContext);
  302|    242|        return AVIF_FALSE;
  ------------------
  |  |   89|    242|#define AVIF_FALSE 0
  ------------------
  303|    242|    }
  304|  12.2M|    return AVIF_TRUE;
  ------------------
  |  |   88|  12.2M|#define AVIF_TRUE 1
  ------------------
  305|  12.2M|}
avifROStreamReadVersionAndFlags:
  308|  7.73M|{
  309|  7.73M|    uint8_t versionAndFlags[4];
  310|  7.73M|    AVIF_CHECK(avifROStreamRead(stream, versionAndFlags, 4));
  ------------------
  |  |   36|  7.73M|    do {                        \
  |  |   37|  7.73M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 15, False: 7.73M]
  |  |  ------------------
  |  |   38|     15|            avifBreakOnError(); \
  |  |   39|     15|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|     15|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|     15|        }                       \
  |  |   41|  7.73M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 7.73M]
  |  |  ------------------
  ------------------
  311|  7.73M|    if (version) {
  ------------------
  |  Branch (311:9): [True: 7.67M, False: 62.6k]
  ------------------
  312|  7.67M|        *version = versionAndFlags[0];
  313|  7.67M|    }
  314|  7.73M|    if (flags) {
  ------------------
  |  Branch (314:9): [True: 3.32M, False: 4.40M]
  ------------------
  315|  3.32M|        *flags = (versionAndFlags[1] << 16) + (versionAndFlags[2] << 8) + (versionAndFlags[3] << 0);
  316|  3.32M|    }
  317|  7.73M|    return AVIF_TRUE;
  ------------------
  |  |   88|  7.73M|#define AVIF_TRUE 1
  ------------------
  318|  7.73M|}
avifROStreamReadAndEnforceVersion:
  321|  3.43M|{
  322|  3.43M|    uint8_t version;
  323|  3.43M|    AVIF_CHECK(avifROStreamReadVersionAndFlags(stream, &version, flags));
  ------------------
  |  |   36|  3.43M|    do {                        \
  |  |   37|  3.43M|        if (!(A)) {             \
  |  |  ------------------
  |  |  |  Branch (37:13): [True: 4, False: 3.43M]
  |  |  ------------------
  |  |   38|      4|            avifBreakOnError(); \
  |  |   39|      4|            return AVIF_FALSE;  \
  |  |  ------------------
  |  |  |  |   89|      4|#define AVIF_FALSE 0
  |  |  ------------------
  |  |   40|      4|        }                       \
  |  |   41|  3.43M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (41:14): [Folded, False: 3.43M]
  |  |  ------------------
  ------------------
  324|  3.43M|    if (version != enforcedVersion) {
  ------------------
  |  Branch (324:9): [True: 22, False: 3.43M]
  ------------------
  325|     22|        avifDiagnosticsPrintf(stream->diag, "%s: Expecting box version %u, got version %u", stream->diagContext, enforcedVersion, version);
  326|     22|        return AVIF_FALSE;
  ------------------
  |  |   89|     22|#define AVIF_FALSE 0
  ------------------
  327|     22|    }
  328|  3.43M|    return AVIF_TRUE;
  ------------------
  |  |   88|  3.43M|#define AVIF_TRUE 1
  ------------------
  329|  3.43M|}

avifNTOHS:
   28|  10.9M|{
   29|  10.9M|    const uint8_t * data = (const uint8_t *)&s;
   30|  10.9M|    return (uint16_t)((data[1] << 0) | (data[0] << 8));
   31|  10.9M|}
avifNTOHL:
   51|  26.4M|{
   52|  26.4M|    const uint8_t * data = (const uint8_t *)&l;
   53|  26.4M|    return ((uint32_t)data[3] << 0) | ((uint32_t)data[2] << 8) | ((uint32_t)data[1] << 16) | ((uint32_t)data[0] << 24);
   54|  26.4M|}
avifNTOH64:
   78|   692k|{
   79|   692k|    const uint8_t * data = (const uint8_t *)&l;
   80|   692k|    return ((uint64_t)data[7] << 0) | ((uint64_t)data[6] << 8) | ((uint64_t)data[5] << 16) | ((uint64_t)data[4] << 24) |
   81|   692k|           ((uint64_t)data[3] << 32) | ((uint64_t)data[2] << 40) | ((uint64_t)data[1] << 48) | ((uint64_t)data[0] << 56);
   82|   692k|}
avifArrayCreate:
   88|  19.1M|{
   89|  19.1M|    avifArrayInternal * arr = (avifArrayInternal *)arrayStruct;
   90|  19.1M|    arr->elementSize = elementSize ? elementSize : 1;
  ------------------
  |  Branch (90:24): [True: 19.1M, False: 0]
  ------------------
   91|  19.1M|    arr->count = 0;
   92|  19.1M|    arr->capacity = initialCapacity;
   93|  19.1M|    if (arr->capacity > SIZE_MAX / arr->elementSize) {
  ------------------
  |  Branch (93:9): [True: 0, False: 19.1M]
  ------------------
   94|      0|        arr->ptr = NULL;
   95|      0|        arr->capacity = 0;
   96|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
   97|      0|    }
   98|  19.1M|    size_t byteCount = (size_t)arr->elementSize * arr->capacity;
   99|  19.1M|    arr->ptr = (uint8_t *)avifAlloc(byteCount);
  100|  19.1M|    if (!arr->ptr) {
  ------------------
  |  Branch (100:9): [True: 0, False: 19.1M]
  ------------------
  101|      0|        arr->capacity = 0;
  102|      0|        return AVIF_FALSE;
  ------------------
  |  |   89|      0|#define AVIF_FALSE 0
  ------------------
  103|      0|    }
  104|  19.1M|    memset(arr->ptr, 0, byteCount);
  105|  19.1M|    return AVIF_TRUE;
  ------------------
  |  |   88|  19.1M|#define AVIF_TRUE 1
  ------------------
  106|  19.1M|}
avifArrayPush:
  109|  24.8M|{
  110|  24.8M|    avifArrayInternal * arr = (avifArrayInternal *)arrayStruct;
  111|  24.8M|    if (arr->count == arr->capacity) {
  ------------------
  |  Branch (111:9): [True: 296k, False: 24.6M]
  ------------------
  112|   296k|        uint8_t * oldPtr = arr->ptr;
  113|   296k|        size_t oldByteCount = (size_t)arr->elementSize * arr->capacity;
  114|   296k|        if (oldByteCount > SIZE_MAX / 2 || arr->capacity > UINT32_MAX / 2) {
  ------------------
  |  Branch (114:13): [True: 0, False: 296k]
  |  Branch (114:44): [True: 0, False: 296k]
  ------------------
  115|      0|            return NULL;
  116|      0|        }
  117|   296k|        size_t newByteCount = oldByteCount * 2;
  118|   296k|        uint8_t * newPtr = (uint8_t *)avifAlloc(newByteCount);
  119|   296k|        if (newPtr == NULL) {
  ------------------
  |  Branch (119:13): [True: 0, False: 296k]
  ------------------
  120|      0|            return NULL;
  121|      0|        }
  122|   296k|        arr->ptr = newPtr;
  123|   296k|        memset(arr->ptr + oldByteCount, 0, oldByteCount);
  124|   296k|        memcpy(arr->ptr, oldPtr, oldByteCount);
  125|   296k|        arr->capacity *= 2;
  126|   296k|        avifFree(oldPtr);
  127|   296k|    }
  128|  24.8M|    ++arr->count;
  129|  24.8M|    return &arr->ptr[(arr->count - 1) * (size_t)arr->elementSize];
  130|  24.8M|}
avifArrayDestroy:
  141|  21.5M|{
  142|  21.5M|    avifArrayInternal * arr = (avifArrayInternal *)arrayStruct;
  143|  21.5M|    if (arr->ptr) {
  ------------------
  |  Branch (143:9): [True: 19.1M, False: 2.41M]
  ------------------
  144|  19.1M|        avifFree(arr->ptr);
  145|       |        arr->ptr = NULL;
  146|  19.1M|    }
  147|  21.5M|    memset(arr, 0, sizeof(avifArrayInternal));
  148|  21.5M|}
avifFractionSimplify:
  169|  2.50k|{
  170|  2.50k|    int64_t gcd = calcGCD(f->n, f->d);
  171|  2.50k|    if (gcd > 1) {
  ------------------
  |  Branch (171:9): [True: 418, False: 2.08k]
  ------------------
  172|    418|        f->n = (int32_t)(f->n / gcd);
  173|    418|        f->d = (int32_t)(f->d / gcd);
  174|    418|    }
  175|  2.50k|}
avifFractionCD:
  183|    848|{
  184|    848|    avifFractionSimplify(a);
  185|    848|    avifFractionSimplify(b);
  186|    848|    if (a->d != b->d) {
  ------------------
  |  Branch (186:9): [True: 222, False: 626]
  ------------------
  187|    222|        const int64_t ad = a->d;
  188|    222|        const int64_t bd = b->d;
  189|    222|        const int64_t anNew = a->n * bd;
  190|    222|        const int64_t adNew = a->d * bd;
  191|    222|        const int64_t bnNew = b->n * ad;
  192|    222|        const int64_t bdNew = b->d * ad;
  193|    222|        if (overflowsInt32(anNew) || overflowsInt32(adNew) || overflowsInt32(bnNew) || overflowsInt32(bdNew)) {
  ------------------
  |  Branch (193:13): [True: 13, False: 209]
  |  Branch (193:38): [True: 0, False: 209]
  |  Branch (193:63): [True: 20, False: 189]
  |  Branch (193:88): [True: 0, False: 189]
  ------------------
  194|     33|            return AVIF_FALSE;
  ------------------
  |  |   89|     33|#define AVIF_FALSE 0
  ------------------
  195|     33|        }
  196|    189|        a->n = (int32_t)anNew;
  197|    189|        a->d = (int32_t)adNew;
  198|    189|        b->n = (int32_t)bnNew;
  199|    189|        b->d = (int32_t)bdNew;
  200|    189|    }
  201|    815|    return AVIF_TRUE;
  ------------------
  |  |   88|    815|#define AVIF_TRUE 1
  ------------------
  202|    848|}
avifFractionAdd:
  205|    466|{
  206|    466|    if (!avifFractionCD(&a, &b)) {
  ------------------
  |  Branch (206:9): [True: 12, False: 454]
  ------------------
  207|     12|        return AVIF_FALSE;
  ------------------
  |  |   89|     12|#define AVIF_FALSE 0
  ------------------
  208|     12|    }
  209|       |
  210|    454|    const int64_t resultN = (int64_t)a.n + b.n;
  211|    454|    if (overflowsInt32(resultN)) {
  ------------------
  |  Branch (211:9): [True: 1, False: 453]
  ------------------
  212|      1|        return AVIF_FALSE;
  ------------------
  |  |   89|      1|#define AVIF_FALSE 0
  ------------------
  213|      1|    }
  214|    453|    result->n = (int32_t)resultN;
  215|    453|    result->d = a.d;
  216|       |
  217|    453|    avifFractionSimplify(result);
  218|    453|    return AVIF_TRUE;
  ------------------
  |  |   88|    453|#define AVIF_TRUE 1
  ------------------
  219|    454|}
avifFractionSub:
  222|    382|{
  223|    382|    if (!avifFractionCD(&a, &b)) {
  ------------------
  |  Branch (223:9): [True: 21, False: 361]
  ------------------
  224|     21|        return AVIF_FALSE;
  ------------------
  |  |   89|     21|#define AVIF_FALSE 0
  ------------------
  225|     21|    }
  226|       |
  227|    361|    const int64_t resultN = (int64_t)a.n - b.n;
  228|    361|    if (overflowsInt32(resultN)) {
  ------------------
  |  Branch (228:9): [True: 3, False: 358]
  ------------------
  229|      3|        return AVIF_FALSE;
  ------------------
  |  |   89|      3|#define AVIF_FALSE 0
  ------------------
  230|      3|    }
  231|    358|    result->n = (int32_t)resultN;
  232|    358|    result->d = a.d;
  233|       |
  234|    358|    avifFractionSimplify(result);
  235|    358|    return AVIF_TRUE;
  ------------------
  |  |   88|    358|#define AVIF_TRUE 1
  ------------------
  236|    361|}
utils.c:calcGCD:
  153|  2.50k|{
  154|  2.50k|    if (a < 0) {
  ------------------
  |  Branch (154:9): [True: 467, False: 2.04k]
  ------------------
  155|    467|        a *= -1;
  156|    467|    }
  157|  2.50k|    if (b < 0) {
  ------------------
  |  Branch (157:9): [True: 0, False: 2.50k]
  ------------------
  158|      0|        b *= -1;
  159|      0|    }
  160|  8.70k|    while (b != 0) {
  ------------------
  |  Branch (160:12): [True: 6.19k, False: 2.50k]
  ------------------
  161|  6.19k|        int64_t r = a % b;
  162|  6.19k|        a = b;
  163|  6.19k|        b = r;
  164|  6.19k|    }
  165|  2.50k|    return a;
  166|  2.50k|}
utils.c:overflowsInt32:
  178|  1.64k|{
  179|  1.64k|    return (x < INT32_MIN) || (x > INT32_MAX);
  ------------------
  |  Branch (179:12): [True: 7, False: 1.63k]
  |  Branch (179:31): [True: 30, False: 1.60k]
  ------------------
  180|  1.64k|}

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

_ZN4avif8testutil15GetSeedDataDirsEv:
  334|  13.3k|std::vector<std::string> GetSeedDataDirs() {
  335|  13.3k|  const char* var = std::getenv("TEST_DATA_DIRS");
  336|  13.3k|  std::vector<std::string> res;
  337|  13.3k|  if (var == nullptr || *var == 0) return res;
  ------------------
  |  Branch (337:7): [True: 0, False: 13.3k]
  |  Branch (337:25): [True: 0, False: 13.3k]
  ------------------
  338|  13.3k|  const char* var_start = var;
  339|   640k|  while (true) {
  ------------------
  |  Branch (339:10): [True: 640k, Folded]
  ------------------
  340|   640k|    if (*var == 0 || *var == ';') {
  ------------------
  |  Branch (340:9): [True: 13.3k, False: 626k]
  |  Branch (340:22): [True: 0, False: 626k]
  ------------------
  341|  13.3k|      res.push_back(std::string(var_start, var - var_start));
  342|  13.3k|      if (*var == 0) break;
  ------------------
  |  Branch (342:11): [True: 13.3k, False: 0]
  ------------------
  343|      0|      var_start = var + 1;
  344|      0|    }
  345|   626k|    ++var;
  346|   626k|  }
  347|  13.3k|  return res;
  348|  13.3k|}
_ZN4avif8testutil21GetTestImagesContentsEmRKNSt3__16vectorI17avifAppFileFormatNS1_9allocatorIS3_EEEE:
  351|      2|    size_t max_file_size, const std::vector<avifAppFileFormat>& image_formats) {
  352|       |  // Use an environment variable to get the test data directory because
  353|       |  // fuzztest seeds are created before the main() function is called, so the
  354|       |  // test has no chance to parse command line arguments.
  355|      2|  const std::vector<std::string> test_data_dirs = GetSeedDataDirs();
  356|      2|  if (test_data_dirs.empty()) {
  ------------------
  |  Branch (356:7): [True: 0, False: 2]
  ------------------
  357|       |    // Only a warning because this can happen when running the binary with
  358|       |    // --list_fuzz_tests (such as with gtest_discover_tests() in cmake).
  359|      0|    std::cerr << "WARNING: TEST_DATA_DIRS env variable not set, unable to read "
  360|      0|                 "seed files\n";
  361|      0|    return {};
  362|      0|  }
  363|       |
  364|      2|  std::vector<std::string> seeds;
  365|      2|  for (const std::string& test_data_dir : test_data_dirs) {
  ------------------
  |  Branch (365:41): [True: 2, False: 2]
  ------------------
  366|      2|    std::cout << "Reading seeds from " << test_data_dir
  367|      2|              << " (non recursively)\n";
  368|      2|    auto tuple_vector = fuzztest::ReadFilesFromDirectory(test_data_dir);
  369|      2|    seeds.reserve(tuple_vector.size());
  370|    214|    for (auto& [file_content] : tuple_vector) {
  ------------------
  |  Branch (370:31): [True: 214, False: 2]
  ------------------
  371|    214|      if (file_content.size() > max_file_size) continue;
  ------------------
  |  Branch (371:11): [True: 6, False: 208]
  ------------------
  372|    208|      if (!image_formats.empty()) {
  ------------------
  |  Branch (372:11): [True: 208, False: 0]
  ------------------
  373|    208|        const avifAppFileFormat format = avifGuessBufferFileFormat(
  374|    208|            reinterpret_cast<const uint8_t*>(file_content.data()),
  375|    208|            file_content.size());
  376|    208|        if (std::find(image_formats.begin(), image_formats.end(), format) ==
  ------------------
  |  Branch (376:13): [True: 70, False: 138]
  ------------------
  377|    208|            image_formats.end()) {
  378|     70|          continue;
  379|     70|        }
  380|    208|      }
  381|       |
  382|    138|      seeds.push_back(std::move(file_content));
  383|    138|    }
  384|      2|  }
  385|      2|  if (seeds.empty()) {
  ------------------
  |  Branch (385:7): [True: 0, False: 2]
  ------------------
  386|      0|    std::cerr << "ERROR: no files found that match the given file size and "
  387|      0|                 "format criteria\n";
  388|      0|    std::abort();
  389|      0|  }
  390|      2|  std::cout << "Returning " << seeds.size() << " seed images\n";
  391|      2|  return seeds;
  392|      2|}

_ZN4avif8testutil23ArbitraryImageWithSeedsERKNSt3__16vectorI17avifAppFileFormatNS1_9allocatorIS3_EEEE:
  488|      2|    const std::vector<avifAppFileFormat>& image_formats) {
  489|      2|  constexpr uint32_t kMaxSeedFileSize = 1024 * 1024;  // 1MB.
  490|      2|  return fuzztest::Arbitrary<std::string>()
  491|      2|      .WithMaxSize(kMaxSeedFileSize)
  492|      2|      .WithSeeds(GetTestImagesContents(kMaxSeedFileSize, image_formats));
  493|      2|}

_ZN4avif8testutil19DecodeIncrementallyERK10avifRWDataP11avifDecoderbbbRK9avifImagejbbb:
  299|  3.41k|                               bool expect_parse_success_from_partial_file) {
  300|       |  // AVIF cells are at least 64 pixels tall.
  301|  3.41k|  if (cell_height != reference.height) {
  ------------------
  |  Branch (301:7): [True: 0, False: 3.41k]
  ------------------
  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|  3.41k|  PartialData data = {
  307|  3.41k|      /*available=*/{encoded_avif.data, 0}, /*fullSize=*/encoded_avif.size,
  308|  3.41k|      /*nonpersistent_bytes=*/nullptr, /*num_nonpersistent_bytes=*/0};
  309|  3.41k|  avifIO io = {
  310|  3.41k|      /*destroy=*/nullptr, PartialRead,
  311|  3.41k|      /*write=*/nullptr,   give_size_hint ? encoded_avif.size : 0,
  ------------------
  |  Branch (311:28): [True: 1.38k, False: 2.03k]
  ------------------
  312|  3.41k|      is_persistent,       &data};
  313|  3.41k|  avifDecoderSetIO(decoder, &io);
  314|       |  // Reset the decoder's IO to nullptr before 'io' goes out of scope and becomes
  315|       |  // invalid.
  316|  3.41k|  auto cleanup_io_fn = [](avifDecoder* decoder) {
  317|  3.41k|    avifDecoderSetIO(decoder, nullptr);
  318|  3.41k|  };
  319|  3.41k|  std::unique_ptr<avifDecoder, decltype(cleanup_io_fn)> cleanup_io(
  320|  3.41k|      decoder, cleanup_io_fn);  // Call automatically at end of scope.
  321|       |
  322|  3.41k|  decoder->allowIncremental = AVIF_TRUE;
  ------------------
  |  |   88|  3.41k|#define AVIF_TRUE 1
  ------------------
  323|  3.41k|  const size_t step = std::max<size_t>(1, data.full_size / 10000);
  324|       |
  325|       |  // Parsing is not incremental.
  326|  3.41k|  avifResult parse_result = avifDecoderParse(decoder);
  327|  1.78M|  while (parse_result == AVIF_RESULT_WAITING_ON_IO) {
  ------------------
  |  Branch (327:10): [True: 1.77M, False: 3.41k]
  ------------------
  328|  1.77M|    if (data.available.size >= data.full_size) {
  ------------------
  |  Branch (328:9): [True: 0, False: 1.77M]
  ------------------
  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.77M|    data.available.size = std::min(data.available.size + step, data.full_size);
  334|  1.77M|    parse_result = avifDecoderParse(decoder);
  335|  1.77M|  }
  336|  3.41k|  if ((decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) &&
  ------------------
  |  Branch (336:7): [True: 3.39k, False: 20]
  ------------------
  337|  3.39k|      data.available.size == data.full_size &&
  ------------------
  |  Branch (337:7): [True: 1.21k, False: 2.18k]
  ------------------
  338|  1.21k|      expect_parse_success_from_partial_file) {
  ------------------
  |  Branch (338:7): [True: 0, False: 1.21k]
  ------------------
  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|  3.41k|  AVIF_CHECKRES(parse_result);
  ------------------
  |  |   52|  3.41k|  do {                                \
  |  |   53|  3.41k|    const avifResult result__ = (A);  \
  |  |   54|  3.41k|    if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (54:9): [True: 375, False: 3.04k]
  |  |  ------------------
  |  |   55|    375|      avifBreakOnError();             \
  |  |   56|    375|      return result__;                \
  |  |   57|    375|    }                                 \
  |  |   58|  3.41k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (58:12): [Folded, False: 3.04k]
  |  |  ------------------
  ------------------
  347|       |
  348|       |  // Decoding is incremental.
  349|  3.04k|  uint32_t previously_decoded_row_count = 0;
  350|  3.04k|  avifResult next_image_result = use_nth_image_api
  ------------------
  |  Branch (350:34): [True: 1.55k, False: 1.48k]
  ------------------
  351|  3.04k|                                     ? avifDecoderNthImage(decoder, 0)
  352|  3.04k|                                     : avifDecoderNextImage(decoder);
  353|   299k|  while (next_image_result == AVIF_RESULT_WAITING_ON_IO) {
  ------------------
  |  Branch (353:10): [True: 296k, False: 3.04k]
  ------------------
  354|   296k|    if (data.available.size >= data.full_size) {
  ------------------
  |  Branch (354:9): [True: 0, False: 296k]
  ------------------
  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|   296k|    const uint32_t decoded_row_count = avifDecoderDecodedRowCount(decoder);
  361|   296k|    if (decoded_row_count < previously_decoded_row_count) {
  ------------------
  |  Branch (361:9): [True: 0, False: 296k]
  ------------------
  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|   296k|    if (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) {
  ------------------
  |  Branch (366:9): [True: 296k, False: 0]
  ------------------
  367|   296k|      const uint32_t min_decoded_row_count = GetMinDecodedRowCount(
  368|   296k|          reference.height, cell_height, reference.alphaPlane != nullptr,
  369|   296k|          reference.gainMap != nullptr, data.available.size, data.full_size,
  370|   296k|          enable_fine_incremental_check);
  371|   296k|      if (decoded_row_count < min_decoded_row_count) {
  ------------------
  |  Branch (371:11): [True: 0, False: 296k]
  ------------------
  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|   296k|    } else if (decoded_row_count != 0) {
  ------------------
  |  Branch (378:16): [True: 0, False: 0]
  ------------------
  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|   296k|    ComparePartialYuva(reference, *decoder->image, decoded_row_count);
  386|       |
  387|   296k|    previously_decoded_row_count = decoded_row_count;
  388|   296k|    data.available.size = std::min(data.available.size + step, data.full_size);
  389|   296k|    next_image_result = use_nth_image_api ? avifDecoderNthImage(decoder, 0)
  ------------------
  |  Branch (389:25): [True: 142k, False: 153k]
  ------------------
  390|   296k|                                          : avifDecoderNextImage(decoder);
  391|   296k|  }
  392|  3.04k|  AVIF_CHECKRES(next_image_result);
  ------------------
  |  |   52|  3.04k|  do {                                \
  |  |   53|  3.04k|    const avifResult result__ = (A);  \
  |  |   54|  3.04k|    if (result__ != AVIF_RESULT_OK) { \
  |  |  ------------------
  |  |  |  Branch (54:9): [True: 10, False: 3.03k]
  |  |  ------------------
  |  |   55|     10|      avifBreakOnError();             \
  |  |   56|     10|      return result__;                \
  |  |   57|     10|    }                                 \
  |  |   58|  3.04k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (58:12): [Folded, False: 3.03k]
  |  |  ------------------
  ------------------
  393|  3.03k|  if (expect_whole_file_read) {
  ------------------
  |  Branch (393:7): [True: 3.03k, False: 0]
  ------------------
  394|  3.03k|    AVIF_CHECKERR(data.available.size == data.full_size,
  ------------------
  |  |   43|  3.03k|  do {                        \
  |  |   44|  3.03k|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, False: 3.03k]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|  3.03k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 3.03k]
  |  |  ------------------
  ------------------
  395|  3.03k|                  AVIF_RESULT_INVALID_ARGUMENT);
  396|  3.03k|  }
  397|  3.03k|  const uint32_t decoded_row_count = avifDecoderDecodedRowCount(decoder);
  398|  3.03k|  if (decoder->imageContentToDecode & AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA) {
  ------------------
  |  Branch (398:7): [True: 3.01k, False: 20]
  ------------------
  399|  3.01k|    AVIF_CHECKERR(decoded_row_count == decoder->image->height,
  ------------------
  |  |   43|  3.01k|  do {                        \
  |  |   44|  3.01k|    if (!(A)) {               \
  |  |  ------------------
  |  |  |  Branch (44:9): [True: 0, False: 3.01k]
  |  |  ------------------
  |  |   45|      0|      avifBreakOnError();     \
  |  |   46|      0|      return ERR;             \
  |  |   47|      0|    }                         \
  |  |   48|  3.01k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded, False: 3.01k]
  |  |  ------------------
  ------------------
  400|  3.01k|                  AVIF_RESULT_INVALID_ARGUMENT);
  401|  3.01k|    ComparePartialYuva(reference, *decoder->image, reference.height);
  402|  3.01k|  } else if (decoded_row_count != 0) {
  ------------------
  |  Branch (402:14): [True: 0, False: 20]
  ------------------
  403|       |    // avifDecoderDecodedRowCount() is only for decoder->image->yuvPlanes[0].
  404|      0|    printf(
  405|      0|        "ERROR: decoded row count shall be 0 unless "
  406|      0|        "decoder->imageContentToDecode&AVIF_IMAGE_CONTENT_COLOR_AND_ALPHA\n");
  407|      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]
  |  |  ------------------
  ------------------
  408|      0|  }
  409|  3.03k|  return AVIF_RESULT_OK;
  410|  3.03k|}
avifincrtest_helpers.cc:_ZN4avif8testutil12_GLOBAL__N_111PartialReadEP6avifIOjmmP10avifROData:
  144|  8.45M|                       uint64_t offset64, size_t size, avifROData* out) {
  145|  8.45M|  PartialData* data = reinterpret_cast<PartialData*>(io->data);
  146|  8.45M|  if ((read_flags != 0) || !data || (data->full_size < offset64)) {
  ------------------
  |  Branch (146:7): [True: 0, False: 8.45M]
  |  Branch (146:28): [True: 0, False: 8.45M]
  |  Branch (146:37): [True: 0, False: 8.45M]
  ------------------
  147|      0|    return AVIF_RESULT_IO_ERROR;
  148|      0|  }
  149|  8.45M|  const size_t offset = static_cast<size_t>(offset64);
  150|       |  // Use |offset| instead of |offset64| from this point on.
  151|  8.45M|  if (size > (data->full_size - offset)) {
  ------------------
  |  Branch (151:7): [True: 5.13k, False: 8.44M]
  ------------------
  152|  5.13k|    size = data->full_size - offset;
  153|  5.13k|  }
  154|  8.45M|  if (data->available.size < (offset + size)) {
  ------------------
  |  Branch (154:7): [True: 2.10M, False: 6.34M]
  ------------------
  155|  2.10M|    return AVIF_RESULT_WAITING_ON_IO;
  156|  2.10M|  }
  157|  6.34M|  if (io->persistent) {
  ------------------
  |  Branch (157:7): [True: 2.91M, False: 3.43M]
  ------------------
  158|  2.91M|    out->data = data->available.data + offset;
  159|  3.43M|  } else {
  160|       |    // Dedicated buffer containing just the available bytes and nothing more.
  161|  3.43M|    std::unique_ptr<uint8_t[]> bytes(new uint8_t[size]);
  162|  3.43M|    std::copy(data->available.data + offset,
  163|  3.43M|              data->available.data + offset + size, bytes.get());
  164|  3.43M|    out->data = bytes.get();
  165|       |    // Flip the previously returned bytes to make sure the values changed.
  166|   362M|    for (size_t i = 0; i < data->num_nonpersistent_bytes; ++i) {
  ------------------
  |  Branch (166:24): [True: 359M, False: 3.43M]
  ------------------
  167|   359M|      data->nonpersistent_bytes[i] = ~data->nonpersistent_bytes[i];
  168|   359M|    }
  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.43M|    data->nonpersistent_bytes = std::move(bytes);
  172|  3.43M|    data->num_nonpersistent_bytes = size;
  173|  3.43M|  }
  174|  6.34M|  out->size = size;
  175|  6.34M|  return AVIF_RESULT_OK;
  176|  8.45M|}
avifincrtest_helpers.cc:_ZN4avif8testutil12_GLOBAL__N_121GetMinDecodedRowCountEjjbbmmb:
   83|   296k|                               bool enable_fine_incremental_check) {
   84|       |  // The whole image should be available when the full input is.
   85|   296k|  if (available_byte_count >= byte_count) {
  ------------------
  |  Branch (85:7): [True: 0, False: 296k]
  ------------------
   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|   296k|  if (!enable_fine_incremental_check) return 0;
  ------------------
  |  Branch (91:7): [True: 296k, 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|   299k|                        uint32_t row_count) {
   28|   299k|  if (row_count == 0) {
  ------------------
  |  Branch (28:7): [True: 295k, False: 4.29k]
  ------------------
   29|   295k|    return;
   30|   295k|  }
   31|   299k|  ASSERT_EQ(image1.width, image2.width);
  ------------------
  |  Branch (31:3): [True: 4.29k, False: 0]
  |  Branch (31:3): [True: 0, False: 4.29k]
  |  Branch (31:3): [True: 4.29k, False: 0]
  ------------------
   32|  4.29k|  ASSERT_GE(image1.height, row_count);
  ------------------
  |  Branch (32:3): [True: 4.29k, False: 0]
  |  Branch (32:3): [True: 0, False: 4.29k]
  |  Branch (32:3): [True: 4.29k, False: 0]
  ------------------
   33|  4.29k|  ASSERT_GE(image2.height, row_count);
  ------------------
  |  Branch (33:3): [True: 4.29k, False: 0]
  |  Branch (33:3): [True: 0, False: 4.29k]
  |  Branch (33:3): [True: 4.29k, False: 0]
  ------------------
   34|  4.29k|  ASSERT_EQ(image1.depth, image2.depth);
  ------------------
  |  Branch (34:3): [True: 4.29k, False: 0]
  |  Branch (34:3): [True: 0, False: 4.29k]
  |  Branch (34:3): [True: 4.29k, False: 0]
  ------------------
   35|  4.29k|  ASSERT_EQ(image1.yuvFormat, image2.yuvFormat);
  ------------------
  |  Branch (35:3): [True: 4.29k, False: 0]
  |  Branch (35:3): [True: 0, False: 4.29k]
  |  Branch (35:3): [True: 4.29k, False: 0]
  ------------------
   36|  4.29k|  ASSERT_EQ(image1.yuvRange, image2.yuvRange);
  ------------------
  |  Branch (36:3): [True: 4.29k, False: 0]
  |  Branch (36:3): [True: 0, False: 4.29k]
  |  Branch (36:3): [True: 4.29k, False: 0]
  ------------------
   37|       |
   38|  4.29k|  avifPixelFormatInfo info;
   39|  4.29k|  avifGetPixelFormatInfo(image1.yuvFormat, &info);
   40|  4.29k|  const uint32_t uv_height =
   41|  4.29k|      info.monochrome ? 0
  ------------------
  |  Branch (41:7): [True: 1.04k, False: 3.25k]
  ------------------
   42|  4.29k|                      : ((row_count + info.chromaShiftY) >> info.chromaShiftY);
   43|  4.29k|  const size_t pixel_byte_count =
   44|  4.29k|      (image1.depth > 8) ? sizeof(uint16_t) : sizeof(uint8_t);
  ------------------
  |  Branch (44:7): [True: 2.14k, False: 2.15k]
  ------------------
   45|       |
   46|  4.29k|  if (image1.alphaPlane) {
  ------------------
  |  Branch (46:7): [True: 688, False: 3.61k]
  ------------------
   47|    688|    ASSERT_NE(image2.alphaPlane, nullptr);
  ------------------
  |  Branch (47:5): [True: 688, False: 0]
  |  Branch (47:5): [True: 0, False: 688]
  |  Branch (47:5): [True: 688, False: 0]
  ------------------
   48|    688|    ASSERT_EQ(image1.alphaPremultiplied, image2.alphaPremultiplied);
  ------------------
  |  Branch (48:5): [True: 688, False: 0]
  |  Branch (48:5): [True: 0, False: 688]
  |  Branch (48:5): [True: 688, False: 0]
  ------------------
   49|    688|  }
   50|       |
   51|  4.29k|  const int last_plane = image1.alphaPlane ? AVIF_CHAN_A : AVIF_CHAN_V;
  ------------------
  |  Branch (51:26): [True: 688, False: 3.61k]
  ------------------
   52|  17.8k|  for (int plane = AVIF_CHAN_Y; plane <= last_plane; ++plane) {
  ------------------
  |  Branch (52:33): [True: 13.5k, False: 4.29k]
  ------------------
   53|  13.5k|    const size_t width_byte_count =
   54|  13.5k|        avifImagePlaneWidth(&image1, plane) * pixel_byte_count;
   55|  13.5k|    const uint32_t height =
   56|  13.5k|        (plane == AVIF_CHAN_Y || plane == AVIF_CHAN_A) ? row_count : uv_height;
  ------------------
  |  Branch (56:10): [True: 4.29k, False: 9.28k]
  |  Branch (56:34): [True: 688, False: 8.59k]
  ------------------
   57|  13.5k|    const uint8_t* row1 = avifImagePlane(&image1, plane);
   58|  13.5k|    const uint8_t* row2 = avifImagePlane(&image2, plane);
   59|  13.5k|    const uint32_t row1_bytes = avifImagePlaneRowBytes(&image1, plane);
   60|  13.5k|    const uint32_t row2_bytes = avifImagePlaneRowBytes(&image2, plane);
   61|   970k|    for (uint32_t y = 0; y < height; ++y) {
  ------------------
  |  Branch (61:26): [True: 957k, False: 13.5k]
  ------------------
   62|   957k|      ASSERT_EQ(std::memcmp(row1, row2, width_byte_count), 0);
  ------------------
  |  Branch (62:7): [True: 957k, False: 0]
  |  Branch (62:7): [True: 0, False: 957k]
  |  Branch (62:7): [True: 957k, False: 0]
  ------------------
   63|   957k|      row1 += row1_bytes;
   64|   957k|      row2 += row2_bytes;
   65|   957k|    }
   66|  13.5k|  }
   67|       |
   68|  4.29k|  if (image1.gainMap != nullptr && image1.gainMap->image != nullptr &&
  ------------------
  |  Branch (68:7): [True: 12, False: 4.28k]
  |  Branch (68:36): [True: 10, False: 2]
  ------------------
   69|     10|      image2.gainMap != nullptr && image2.gainMap->image != nullptr) {
  ------------------
  |  Branch (69:7): [True: 10, False: 0]
  |  Branch (69:36): [True: 10, False: 0]
  ------------------
   70|     10|    const uint32_t gain_map_row_count = (uint32_t)roundf(
   71|     10|        (float)row_count / image1.height * image1.gainMap->image->height);
   72|     10|    ComparePartialYuva(*image1.gainMap->image, *image2.gainMap->image,
   73|     10|                       gain_map_row_count);
   74|     10|  }
   75|  4.29k|}
avifincrtest_helpers.cc:_ZZN4avif8testutil19DecodeIncrementallyERK10avifRWDataP11avifDecoderbbbRK9avifImagejbbbENK3$_0clES5_:
  316|  3.41k|  auto cleanup_io_fn = [](avifDecoder* decoder) {
  317|  3.41k|    avifDecoderSetIO(decoder, nullptr);
  318|  3.41k|  };

