_ZN2bt17DynamicByteBufferD2Ev:
  472|    268|  ~DynamicByteBuffer() override = default;
_ZN2bt10ByteBufferD2Ev:
   48|    268|  virtual ~ByteBuffer() = default;
_ZNK2bt10ByteBuffer2ToINS_2sm6HeaderEEEDav:
  129|    267|  [[nodiscard]] auto To() const {
  130|    267|    static_assert(std::is_trivially_copyable_v<T>,
  131|    267|                  "unsafe to copy representation");
  132|    267|    static_assert(std::is_default_constructible_v<T>);
  133|    267|    using OutType = std::remove_cv_t<bt_lib_cpp_type::ToStdArrayT<T>>;
  134|       |
  135|       |    // This is value-initialized in order to construct objects that have const
  136|       |    // members. The consideration for modifying the object through its
  137|       |    // representation even if the constituent types are cv-qualified is based on
  138|       |    // the potent rules for memcpy'ing "underlying bytes" at ISO/IEC
  139|       |    // 14882:2017(E) § 6.9 [basic.types] ¶ 4.2–4.3.
  140|    267|    OutType out{};
  141|    267|    CopyRaw(/*dst_data=*/std::addressof(out),
  142|    267|            /*dst_capacity=*/sizeof(out),
  143|    267|            /*src_offset=*/0,
  144|    267|            /*copy_size=*/sizeof(out));
  145|    267|    return out;
  146|    267|  }

_ZN2bt8internal11CheckFormatEPKcz:
  129|    133|constexpr void CheckFormat([[maybe_unused]] const char* fmt, ...) {}

_ZNK2bt14PacketViewBase4sizeEv:
   38|    220|  size_t size() const { return size_; }
_ZNK2bt14PacketViewBase12payload_sizeEv:
   39|    110|  size_t payload_size() const {
   40|    110|    PW_CHECK(size() >= header_size());
  ------------------
  |  |   39|    110|  do {                                                                         \
  |  |   40|    110|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 110]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    110|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   41|    110|    return size() - header_size();
   42|    110|  }
_ZN2bt14PacketViewBaseC2EmPKNS_10ByteBufferEm:
   67|    135|      : header_size_(header_size),
   68|    135|        buffer_(buffer),
   69|    135|        size_(header_size_ + payload_size) {
   70|    135|    PW_CHECK(buffer_);
  ------------------
  |  |   39|    135|  do {                                                                         \
  |  |   40|    135|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 135]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    135|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|    135|    PW_CHECK(buffer_->size() >= size_,
  ------------------
  |  |   39|    135|  do {                                                                         \
  |  |   40|    135|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 135]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    135|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   72|    135|             "view size %zu exceeds buffer size %zu",
   73|    135|             size_,
   74|    135|             buffer_->size());
   75|    135|  }
_ZNK2bt14PacketViewBase11header_sizeEv:
   88|    220|  size_t header_size() const { return header_size_; }
_ZNK2bt14PacketViewBase6bufferEv:
   90|    267|  const ByteBuffer* buffer() const { return buffer_; }
_ZNK2bt10PacketViewINS_2sm6HeaderEE6headerEv:
  176|    267|  HeaderType header() const { return buffer()->template To<HeaderType>(); }
_ZN2bt10PacketViewINS_2sm6HeaderEEC2EPKNS_10ByteBufferEm:
  174|    135|      : PacketViewBase(sizeof(HeaderType), buffer, payload_size) {}

_ZNK2bt2sm12PacketReader4codeEv:
   31|    267|  inline Code code() const { return header().code; }

_ZN2pw16pw_span_internal13ExtentStorageILm18446744073709551615EEC2Em:
  153|    798|  constexpr explicit ExtentStorage(size_t size) noexcept : size_(size) {}
_ZNK2pw16pw_span_internal13ExtentStorageILm18446744073709551615EE4sizeEv:
  154|  9.11k|  constexpr size_t size() const noexcept { return size_; }
_ZN2pw4spanIKSt4byteLm18446744073709551615EEC2EPS2_m:
  255|    133|      : ExtentStorage(size), data_(data) {
  256|    133|    _PW_SPAN_ASSERT(Extent == dynamic_extent || Extent == size);
  257|    133|  }
_ZNK2pw4spanIKSt4byteLm18446744073709551615EE4dataEv:
  400|  6.45k|  constexpr T* data() const noexcept { return data_; }
_ZNK2pw4spanIKSt4byteLm18446744073709551615EE4sizeEv:
  375|  6.72k|  constexpr size_t size() const noexcept { return ExtentStorage::size(); }
_ZNK2pw4spanIcLm18446744073709551615EE4sizeEv:
  375|  1.99k|  constexpr size_t size() const noexcept { return ExtentStorage::size(); }
_ZNK2pw4spanIcLm18446744073709551615EE5emptyEv:
  377|  1.06k|  [[nodiscard]] constexpr bool empty() const noexcept { return size() == 0; }
_ZNK2pw4spanIcLm18446744073709551615EE4dataEv:
  400|  1.06k|  constexpr T* data() const noexcept { return data_; }
_ZNK2pw4spanIcLm18446744073709551615EEixEm:
  380|    399|  constexpr T& operator[](size_t idx) const noexcept {
  381|       |    // Note: CHECK_LT is not constexpr, hence regular CHECK must be used.
  382|    399|    _PW_SPAN_ASSERT(idx < size());
  383|    399|    return *(data() + idx);
  384|    399|  }
_ZNK2pw4spanIKcLm18446744073709551615EE4dataEv:
  400|    665|  constexpr T* data() const noexcept { return data_; }
_ZNK2pw4spanIKcLm18446744073709551615EE4sizeEv:
  375|    399|  constexpr size_t size() const noexcept { return ExtentStorage::size(); }
_ZNK2pw4spanIcLm18446744073709551615EE7subspanEmm:
  367|    133|      size_t offset, size_t count = dynamic_extent) const noexcept {
  368|       |    // Note: CHECK_LE is not constexpr, hence regular CHECK must be used.
  369|    133|    _PW_SPAN_ASSERT(offset <= size());
  370|    133|    _PW_SPAN_ASSERT(count == dynamic_extent || count <= size() - offset);
  371|    133|    return {data() + offset, count != dynamic_extent ? count : size() - offset};
  ------------------
  |  Branch (371:30): [True: 0, False: 133]
  ------------------
  372|    133|  }
_ZN2pw4spanIcLm18446744073709551615EEC2ILm150EvEERAT__c:
  273|    133|  constexpr span(T (&array)[N]) noexcept : span(std::data(array), N) {}
_ZN2pw4spanIcLm18446744073709551615EEC2EPcm:
  255|    266|      : ExtentStorage(size), data_(data) {
  256|    266|    _PW_SPAN_ASSERT(Extent == dynamic_extent || Extent == size);
  257|    266|  }
_ZN2pw4spanIKcLm18446744073709551615EEC2INSt3__117basic_string_viewIcNS4_11char_traitsIcEEEEvEERT_:
  297|    133|      : span(std::data(container), std::size(container)) {}
_ZN2pw4spanIKcLm18446744073709551615EEC2EPS1_m:
  255|    399|      : ExtentStorage(size), data_(data) {
  256|    399|    _PW_SPAN_ASSERT(Extent == dynamic_extent || Extent == size);
  257|    399|  }
_ZN2pw8as_bytesIKcLm18446744073709551615EEENS_4spanIKSt4byteXqueqT0_L_ZNS_14dynamic_extentEEL_ZNS_14dynamic_extentEEmlstT_T0_EEENS2_IS5_XT0_EEE:
  425|    133|as_bytes(span<T, X> s) noexcept {
  426|    133|  return {reinterpret_cast<const std::byte*>(s.data()), s.size_bytes()};
  427|    133|}
_ZNK2pw4spanIKcLm18446744073709551615EE10size_bytesEv:
  376|    133|  constexpr size_t size_bytes() const noexcept { return size() * sizeof(T); }
_ZNK2pw4spanIKSt4byteLm18446744073709551615EE10size_bytesEv:
  376|  6.72k|  constexpr size_t size_bytes() const noexcept { return size() * sizeof(T); }
_ZNK2pw4spanIKSt4byteLm18446744073709551615EEixEm:
  380|  6.45k|  constexpr T& operator[](size_t idx) const noexcept {
  381|       |    // Note: CHECK_LT is not constexpr, hence regular CHECK must be used.
  382|  6.45k|    _PW_SPAN_ASSERT(idx < size());
  383|  6.45k|    return *(data() + idx);
  384|  6.45k|  }

_ZN2pw6StatusC2E9pw_Status:
  146|  7.25k|  constexpr Status(Code code = PW_STATUS_OK) : code_(code) {}
_ZNK2pw6Status2okEv:
  157|  6.72k|  [[nodiscard]] constexpr bool ok() const { return code_ == PW_STATUS_OK; }
_ZNK2pw6Status4codeEv:
  152|    798|  constexpr Code code() const { return code_; }
_ZN2pw8OkStatusEv:
  234|  7.12k|[[nodiscard]] constexpr Status OkStatus() { return Status(); }

_ZN2pw14StatusWithSizeC2ENS_6StatusEm:
  113|    133|      : StatusWithSize((static_cast<size_t>(status.code()) << kStatusShift) |
  114|    133|                       size) {}
_ZNK2pw14StatusWithSize4sizeEv:
  146|    266|  [[nodiscard]] constexpr size_t size() const { return size_ & kSizeMask; }
_ZNK2pw14StatusWithSize2okEv:
  152|    133|  [[nodiscard]] constexpr bool ok() const {
  153|    133|    return (size_ & kStatusMask) == 0u;
  154|    133|  }
_ZNK2pw14StatusWithSize11IgnoreErrorEv:
  159|    133|  constexpr void IgnoreError() const {}
_ZNK2pw14StatusWithSize6statusEv:
  161|    133|  [[nodiscard]] constexpr Status status() const {
  162|    133|    return static_cast<Status::Code>((size_ & kStatusMask) >> kStatusShift);
  163|    133|  }
_ZN2pw14StatusWithSizeC2ImvEET_:
  107|    266|  explicit constexpr StatusWithSize(T size) : size_(static_cast<size_t>(size)) {
  108|       |    // TODO(hepler): Add debug-only assert that size <= max_size().
  109|    266|  }
_ZN2pw14StatusWithSizeC2IivEET_:
  107|    133|  explicit constexpr StatusWithSize(T size) : size_(static_cast<size_t>(size)) {
  108|       |    // TODO(hepler): Add debug-only assert that size <= max_size().
  109|    133|  }

_ZN2pw13StringBuilderC2ENS_4spanIcLm18446744073709551615EEE:
   91|    133|      : buffer_(buffer), size_(&inline_size_), inline_size_(0) {
   92|    133|    NullTerminate();
   93|    133|  }
_ZNK2pw13StringBuilder4dataEv:
  114|    133|  const char* data() const { return buffer_.data(); }
_ZNK2pw13StringBuilder4viewEv:
  120|    133|  std::string_view view() const { return std::string_view(data(), size()); }
_ZNK2pw13StringBuildercvNSt3__117basic_string_viewIcNS1_11char_traitsIcEEEEEv:
  124|    133|  operator std::string_view() const { return view(); }
_ZNK2pw13StringBuilder4sizeEv:
  167|  1.46k|  size_t size() const { return *size_; }
_ZNK2pw13StringBuilder8max_sizeEv:
  170|    266|  size_t max_size() const { return buffer_.empty() ? 0u : buffer_.size() - 1; }
  ------------------
  |  Branch (170:36): [True: 0, False: 266]
  ------------------
_ZN2pw13StringBuilder10StatusCodeENS_6StatusE:
  291|    665|  static constexpr unsigned char StatusCode(Status status) {
  292|    665|    return static_cast<unsigned char>(status.code());
  293|    665|  }
_ZN2pw13StringBuilder13NullTerminateEv:
  301|    399|  constexpr void NullTerminate() {
  302|    399|    if (!buffer_.empty()) {
  ------------------
  |  Branch (302:9): [True: 399, False: 0]
  ------------------
  303|    399|      buffer_[size()] = '\0';
  304|    399|    }
  305|    399|  }
_ZN2pw13StringBuilderlsIPKcEERS0_RKT_:
  224|    133|  StringBuilder& operator<<(const T& value) {
  225|       |    /// For types compatible with `std::string_view`, use the `append` function,
  226|       |    /// which gives smaller code size.
  227|    133|    if constexpr (std::is_convertible_v<T, std::string_view>) {
  228|    133|      append(value);
  229|       |    } else if constexpr (std::is_convertible_v<T, span<const std::byte>>) {
  230|       |      WriteBytes(value);
  231|       |    } else {
  232|       |      HandleStatusWithSize(ToString(value, buffer_.subspan(size())));
  233|       |    }
  234|    133|    return *this;
  235|    133|  }
_ZN2pw12StringBufferILm150EEC2Ev:
  333|    133|  StringBuffer() : StringBuilder(buffer_) {}
_ZN2pw12StringBufferILm150EElsIPKcEERS1_OT_:
  387|    133|  StringBuffer& operator<<(T&& value) {
  388|    133|    static_cast<StringBuilder&>(*this) << std::forward<T>(value);
  389|    133|    return *this;
  390|    133|  }
_ZN2pw12StringBufferILm150EElsIRA3_KcEERS1_OT_:
  387|    133|  StringBuffer& operator<<(T&& value) {
  388|    133|    static_cast<StringBuilder&>(*this) << std::forward<T>(value);
  389|    133|    return *this;
  390|    133|  }
_ZN2pw13StringBuilderlsIA3_cEERS0_RKT_:
  224|    133|  StringBuilder& operator<<(const T& value) {
  225|       |    /// For types compatible with `std::string_view`, use the `append` function,
  226|       |    /// which gives smaller code size.
  227|    133|    if constexpr (std::is_convertible_v<T, std::string_view>) {
  228|    133|      append(value);
  229|       |    } else if constexpr (std::is_convertible_v<T, span<const std::byte>>) {
  230|       |      WriteBytes(value);
  231|       |    } else {
  232|       |      HandleStatusWithSize(ToString(value, buffer_.subspan(size())));
  233|       |    }
  234|    133|    return *this;
  235|    133|  }

_ZN2pw6string8internal13ClampedLengthEPKcm:
   30|    266|constexpr size_t ClampedLength(const char* str, size_t max_len) {
   31|    266|  size_t length = 0;
   32|       |
   33|    266|  if (str != nullptr) {
  ------------------
  |  Branch (33:7): [True: 266, False: 0]
  ------------------
   34|  2.66k|    for (; length < max_len; ++length) {
  ------------------
  |  Branch (34:12): [True: 2.66k, False: 0]
  ------------------
   35|  2.66k|      if (str[length] == '\0') {
  ------------------
  |  Branch (35:11): [True: 266, False: 2.39k]
  ------------------
   36|    266|        break;
   37|    266|      }
   38|  2.66k|    }
   39|    266|  }
   40|       |
   41|    266|  return length;
   42|    266|}

_ZN2pw6string14ClampedCStringENS_4spanIKcLm18446744073709551615EEE:
   58|    266|constexpr std::string_view ClampedCString(span<const char> str) {
   59|    266|  return std::string_view(str.data(),
   60|    266|                          internal::ClampedLength(str.data(), str.size()));
   61|    266|}
_ZN2pw6string14ClampedCStringEPKcm:
   63|    266|constexpr std::string_view ClampedCString(const char* str, size_t max_len) {
   64|    266|  return ClampedCString(span<const char>(str, max_len));
   65|    266|}

_ZNK2bt10ByteBuffer4CopyEPNS_17MutableByteBufferE:
   25|    134|void ByteBuffer::Copy(MutableByteBuffer* out_buffer) const {
   26|    134|  PW_CHECK(out_buffer);
  ------------------
  |  |   39|    134|  do {                                                                         \
  |  |   40|    134|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 134]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    134|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   27|    134|  CopyRaw(out_buffer->mutable_data(), out_buffer->size(), 0, size());
   28|    134|}
_ZNK2bt10ByteBuffer7CopyRawEPvmmm:
  110|    401|                         size_t copy_size) const {
  111|    401|  PW_CHECK(copy_size == 0 || dst_data != nullptr,
  ------------------
  |  |   39|    401|  do {                                                                         \
  |  |   40|    802|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:11): [True: 0, False: 401]
  |  |  |  Branch (40:11): [True: 401, False: 0]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    401|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  112|    401|           "%zu byte write to pointer %p",
  113|    401|           copy_size,
  114|    401|           dst_data);
  115|    401|  PW_CHECK(copy_size <= dst_capacity,
  ------------------
  |  |   39|    401|  do {                                                                         \
  |  |   40|    401|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 401]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    401|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  116|    401|           "destination not large enough (required: %zu, available: %zu)",
  117|    401|           copy_size,
  118|    401|           dst_capacity);
  119|    401|  PW_CHECK(src_offset <= this->size(),
  ------------------
  |  |   39|    401|  do {                                                                         \
  |  |   40|    401|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 401]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    401|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  120|    401|           "offset exceeds source range (begin: %zu, copy_size: %zu)",
  121|    401|           src_offset,
  122|    401|           this->size());
  123|    401|  PW_CHECK(
  ------------------
  |  |   39|    401|  do {                                                                         \
  |  |   40|    401|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 401]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    401|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  124|    401|      std::numeric_limits<size_t>::max() - copy_size >= src_offset,
  125|    401|      "end of source range overflows size_t (src_offset: %zu, copy_size: %zu)",
  126|    401|      src_offset,
  127|    401|      copy_size);
  128|    401|  PW_CHECK(src_offset + copy_size <= this->size(),
  ------------------
  |  |   39|    401|  do {                                                                         \
  |  |   40|    401|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 401]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    401|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|    401|           "end exceeds source range (end: %zu, copy_size: %zu)",
  130|    401|           src_offset + copy_size,
  131|    401|           this->size());
  132|       |
  133|       |  // Data pointers for zero-length buffers are nullptr, over which memcpy has
  134|       |  // undefined behavior, even for count = 0. Skip the memcpy invocation in that
  135|       |  // case.
  136|    401|  if (copy_size == 0) {
  ------------------
  |  Branch (136:7): [True: 0, False: 401]
  ------------------
  137|      0|    return;
  138|      0|  }
  139|    401|  std::memcpy(dst_data, data() + src_offset, copy_size);
  140|    401|}
_ZN2bt17DynamicByteBufferC2Em:
  170|    134|    : buffer_size_(buffer_size) {
  171|    134|  if (buffer_size == 0) {
  ------------------
  |  Branch (171:7): [True: 0, False: 134]
  ------------------
  172|      0|    return;
  173|      0|  }
  174|       |
  175|       |  // make_unique value-initializes the buffer to 0.
  176|    134|  buffer_ = std::make_unique<uint8_t[]>(buffer_size);
  177|       |
  178|       |  // TODO(armansito): For now this is dumb but we should properly handle the
  179|       |  // case when we're out of memory.
  180|    134|  PW_CHECK(buffer_.get(), "failed to allocate buffer");
  ------------------
  |  |   39|    134|  do {                                                                         \
  |  |   40|    134|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 134]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    134|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  181|    134|}
_ZN2bt17DynamicByteBufferC2ERKNS_10ByteBufferE:
  184|    134|    : buffer_size_(buffer.size()),
  185|    134|      buffer_(buffer.size() ? std::make_unique<uint8_t[]>(buffer.size())
  ------------------
  |  Branch (185:15): [True: 134, False: 0]
  ------------------
  186|    134|                            : nullptr) {
  187|    134|  PW_CHECK(!buffer_size_ || buffer_.get(),
  ------------------
  |  |   39|    134|  do {                                                                         \
  |  |   40|    268|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:11): [True: 0, False: 134]
  |  |  |  Branch (40:11): [True: 134, False: 0]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|  fflush(stdout);                                                \
  |  |  |  |  |  |   60|      0|  fprintf(stderr, "\033[31m" _PW_ASSERT_CRASH_BANNER "\033[0m"); \
  |  |  |  |  |  |   61|      0|  fprintf(stderr,                                     \
  |  |  |  |  |  |   62|      0|          "\033[41m\033[37m\033[1m%s:%d:\033[0m "     \
  |  |  |  |  |  |   63|      0|          "\033[1m"                                   \
  |  |  |  |  |  |   64|      0|          _PW_ASSERT_MACRO(macro)                     \
  |  |  |  |  |  |   65|      0|          " "                                         \
  |  |  |  |  |  |   66|      0|          "\033[31mFAILED!\033[0m\n\n"                \
  |  |  |  |  |  |   67|      0|          "  \033[33mFAILED ASSERTION\033[0m\n\n"                    \
  |  |  |  |  |  |   68|      0|          "    %s\n\n"                                \
  |  |  |  |  |  |   69|      0|          "  \033[33mFILE & LINE\033[0m\n\n"                         \
  |  |  |  |  |  |   70|      0|          "    %s:%d\n\n"                             \
  |  |  |  |  |  |   71|      0|          "  \033[33mFUNCTION\033[0m\n\n"                            \
  |  |  |  |  |  |   72|      0|          "    %s\n\n",                               \
  |  |  |  |  |  |   73|      0|          __FILE__,                                   \
  |  |  |  |  |  |   74|      0|          __LINE__,                                   \
  |  |  |  |  |  |   75|      0|          expression,                                 \
  |  |  |  |  |  |   76|      0|          __FILE__,                                   \
  |  |  |  |  |  |   77|      0|          __LINE__,                                   \
  |  |  |  |  |  |   78|      0|          _PW_ASSERT_ABORT_FUNCTION)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|      0|#define _PW_ASSERT_ABORT_FUNCTION __PRETTY_FUNCTION__
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    134|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  188|    134|           "|buffer| cannot be nullptr when |buffer_size| is non-zero");
  189|    134|  buffer.Copy(this);
  190|    134|}
_ZN2bt17DynamicByteBufferC2ERKS0_:
  193|    134|    : DynamicByteBuffer(static_cast<const ByteBuffer&>(buffer)) {}
_ZNK2bt17DynamicByteBuffer4dataEv:
  221|    401|const uint8_t* DynamicByteBuffer::data() const { return buffer_.get(); }
_ZN2bt17DynamicByteBuffer12mutable_dataEv:
  223|    268|uint8_t* DynamicByteBuffer::mutable_data() { return buffer_.get(); }
_ZNK2bt17DynamicByteBuffer4sizeEv:
  225|  2.01k|size_t DynamicByteBuffer::size() const { return buffer_size_; }

_ZN2bt13GetPwLogFlagsENS_11LogSeverityE:
   46|    133|unsigned int GetPwLogFlags(LogSeverity level) {
   47|    133|  if (g_printf_min_severity == -1) {
  ------------------
  |  Branch (47:7): [True: 133, False: 0]
  ------------------
   48|    133|    return 0;
   49|    133|  }
   50|      0|  return IsPrintfLogLevelEnabled(level) ? PW_LOG_FLAG_USE_PRINTF
  ------------------
  |  |   26|      0|#define PW_LOG_FLAG_USE_PRINTF 0
  ------------------
  |  Branch (50:10): [True: 0, False: 0]
  ------------------
   51|      0|                                        : PW_LOG_FLAG_IGNORE;
  ------------------
  |  |   31|      0|#define PW_LOG_FLAG_IGNORE 0
  ------------------
   52|    133|}

_ZN2bt2sm12PacketReaderC2EPKNS_10ByteBufferE:
   28|    135|    : PacketView<Header>(buffer, buffer->size() - sizeof(Header)) {}
_ZN2bt2sm17ValidPacketReaderC2EPKNS_10ByteBufferE:
   31|      1|    : PacketReader(buffer) {}
_ZN2bt2sm17ValidPacketReader8ParseSduERKNSt3__110unique_ptrINS_10ByteBufferENS2_14default_deleteIS4_EEEE:
   34|    134|    const ByteBufferPtr& sdu) {
   35|    134|  PW_CHECK(sdu);
  ------------------
  |  |   39|    134|  do {                                                                         \
  |  |   40|    134|    if (!(condition)) {                                                        \
  |  |  ------------------
  |  |  |  Branch (40:9): [True: 0, False: 134]
  |  |  ------------------
  |  |   41|      0|      _pw_assert_ConditionCannotContainThePercentCharacter(                    \
  |  |   42|      0|          #condition); /* cannot use '%' in PW_CHECK conditions */             \
  |  |   43|      0|      if (0) { /* Check args but don't execute to avoid multiple evaluation */ \
  |  |  ------------------
  |  |  |  Branch (43:11): [Folded - Ignored]
  |  |  ------------------
  |  |   44|      0|        _pw_assert_CheckMessageArguments(" " __VA_ARGS__);                     \
  |  |   45|      0|      }                                                                        \
  |  |   46|      0|      PW_HANDLE_ASSERT_FAILURE(#condition, "" __VA_ARGS__);                    \
  |  |  ------------------
  |  |  |  |   27|      0|  PW_ASSERT_PRINT_EXPRESSION("CHECK", condition_string); \
  |  |  |  |   28|      0|  _PW_ASSERT_PRINT_MESSAGE_AND_ABORT(__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |   49|      0|  fprintf(stderr, "  \033[33mMESSAGE\033[0m\n\n    " __VA_ARGS__); \
  |  |  |  |  |  |   50|      0|  fprintf(stderr, "\n\n");                                         \
  |  |  |  |  |  |   51|      0|  fflush(stderr);                                                  \
  |  |  |  |  |  |   52|      0|  abort()
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   47|      0|    }                                                                          \
  |  |   48|    134|  } while (0)
  |  |  ------------------
  |  |  |  Branch (48:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   36|    134|  size_t length = sdu->size();
   37|    134|  if (length < sizeof(Header)) {
  ------------------
  |  Branch (37:7): [True: 0, False: 134]
  ------------------
   38|      0|    bt_log(DEBUG, "sm", "PDU too short!");
  ------------------
  |  |  141|      0|  PW_LOG(static_cast<int>(bt::LogSeverity::level), \
  |  |  ------------------
  |  |  |  |   73|      0|  do {                                                                     \
  |  |  |  |   74|      0|    if (PW_LOG_ENABLE_IF(level, verbosity, module, flags)) {               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|      0|  ((int32_t)(level) >= (int32_t)(verbosity))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:3): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   75|      0|      PW_HANDLE_LOG(level, module, flags, __VA_ARGS__);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|  do {                                                    \
  |  |  |  |  |  |   56|      0|    pw_Log((level),                                       \
  |  |  |  |  |  |   57|      0|           (flags),                                       \
  |  |  |  |  |  |   58|      0|           module,                                        \
  |  |  |  |  |  |   59|      0|           __FILE__,                                      \
  |  |  |  |  |  |   60|      0|           __LINE__,                                      \
  |  |  |  |  |  |   61|      0|           __func__,                                      \
  |  |  |  |  |  |   62|      0|           message PW_COMMA_ARGS(__VA_ARGS__));           \
  |  |  |  |  |  |   63|      0|  } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                      \
  |  |  |  |   77|      0|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (77:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  142|      0|         PW_LOG_LEVEL,                             \
  |  |  143|      0|         tag,                                      \
  |  |  144|      0|         GetPwLogFlags(bt::LogSeverity::level),    \
  |  |  145|      0|         __VA_ARGS__);                             \
  |  |  146|      0|  ::bt::internal::CheckFormat(tag)
  ------------------
   39|      0|    return fit::error(ErrorCode::kInvalidParameters);
   40|      0|  }
   41|    134|  auto reader = PacketReader(sdu.get());
   42|    134|  auto expected_payload_size = kCodeToPayloadSize.find(reader.code());
   43|    134|  if (expected_payload_size == kCodeToPayloadSize.end()) {
  ------------------
  |  Branch (43:7): [True: 24, False: 110]
  ------------------
   44|     24|    bt_log(DEBUG, "sm", "smp code not recognized: %#.2X", reader.code());
  ------------------
  |  |  141|     24|  PW_LOG(static_cast<int>(bt::LogSeverity::level), \
  |  |  ------------------
  |  |  |  |   73|     24|  do {                                                                     \
  |  |  |  |   74|     24|    if (PW_LOG_ENABLE_IF(level, verbosity, module, flags)) {               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|     24|  ((int32_t)(level) >= (int32_t)(verbosity))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:3): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   75|     24|      PW_HANDLE_LOG(level, module, flags, __VA_ARGS__);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     24|  do {                                                    \
  |  |  |  |  |  |   56|     24|    pw_Log((level),                                       \
  |  |  |  |  |  |   57|     24|           (flags),                                       \
  |  |  |  |  |  |   58|     24|           module,                                        \
  |  |  |  |  |  |   59|     24|           __FILE__,                                      \
  |  |  |  |  |  |   60|     24|           __LINE__,                                      \
  |  |  |  |  |  |   61|     24|           __func__,                                      \
  |  |  |  |  |  |   62|     24|           message PW_COMMA_ARGS(__VA_ARGS__));           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|     24|  _PW_IF(PW_EMPTY_ARGS(__VA_ARGS__), _PW_EXPAND, _PW_COMMA_ARGS) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   21|     24|  _PW_PASTE2(_PW_IF_, boolean)(true_expr, false_expr)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   27|     24|#define _PW_PASTE2(a1, a2) _PW_PASTE2_EXPANDED(a1, a2)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   28|     24|#define _PW_PASTE2_EXPANDED(a1, a2) _PW_PASTE2_IMPL(a1, a2)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |   29|     24|#define _PW_PASTE2_IMPL(a1, a2) a1##a2
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|     24|  (PW_DROP_LAST_ARG_IF_EMPTY(__VA_ARGS__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|     24|  } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|     24|    }                                                                      \
  |  |  |  |   77|     24|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (77:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  142|     24|         PW_LOG_LEVEL,                             \
  |  |  143|     24|         tag,                                      \
  |  |  144|     24|         GetPwLogFlags(bt::LogSeverity::level),    \
  |  |  145|     24|         __VA_ARGS__);                             \
  |  |  146|     24|  ::bt::internal::CheckFormat(tag)
  ------------------
   45|     24|    return fit::error(ErrorCode::kCommandNotSupported);
   46|     24|  }
   47|    110|  if (reader.payload_size() != expected_payload_size->second) {
  ------------------
  |  Branch (47:7): [True: 109, False: 1]
  ------------------
   48|    109|    bt_log(DEBUG, "sm", "malformed packet with code %#.2X", reader.code());
  ------------------
  |  |  141|    109|  PW_LOG(static_cast<int>(bt::LogSeverity::level), \
  |  |  ------------------
  |  |  |  |   73|    109|  do {                                                                     \
  |  |  |  |   74|    109|    if (PW_LOG_ENABLE_IF(level, verbosity, module, flags)) {               \
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|    109|  ((int32_t)(level) >= (int32_t)(verbosity))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:3): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   75|    109|      PW_HANDLE_LOG(level, module, flags, __VA_ARGS__);                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|    109|  do {                                                    \
  |  |  |  |  |  |   56|    109|    pw_Log((level),                                       \
  |  |  |  |  |  |   57|    109|           (flags),                                       \
  |  |  |  |  |  |   58|    109|           module,                                        \
  |  |  |  |  |  |   59|    109|           __FILE__,                                      \
  |  |  |  |  |  |   60|    109|           __LINE__,                                      \
  |  |  |  |  |  |   61|    109|           __func__,                                      \
  |  |  |  |  |  |   62|    109|           message PW_COMMA_ARGS(__VA_ARGS__));           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|    109|  _PW_IF(PW_EMPTY_ARGS(__VA_ARGS__), _PW_EXPAND, _PW_COMMA_ARGS) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   21|    109|  _PW_PASTE2(_PW_IF_, boolean)(true_expr, false_expr)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   27|    109|#define _PW_PASTE2(a1, a2) _PW_PASTE2_EXPANDED(a1, a2)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |   28|    109|#define _PW_PASTE2_EXPANDED(a1, a2) _PW_PASTE2_IMPL(a1, a2)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |   29|    109|#define _PW_PASTE2_IMPL(a1, a2) a1##a2
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|    109|  (PW_DROP_LAST_ARG_IF_EMPTY(__VA_ARGS__))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   63|    109|  } while (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (63:12): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   76|    109|    }                                                                      \
  |  |  |  |   77|    109|  } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (77:12): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  142|    109|         PW_LOG_LEVEL,                             \
  |  |  143|    109|         tag,                                      \
  |  |  144|    109|         GetPwLogFlags(bt::LogSeverity::level),    \
  |  |  145|    109|         __VA_ARGS__);                             \
  |  |  146|    109|  ::bt::internal::CheckFormat(tag)
  ------------------
   49|    109|    return fit::error(ErrorCode::kInvalidParameters);
   50|    109|  }
   51|      1|  return fit::ok(ValidPacketReader(sdu.get()));
   52|    110|}

_ZN2bt2sm4fuzzEPKhm:
   22|    134|void fuzz(const uint8_t* data, size_t size) {
   23|    134|  DynamicByteBuffer buf(size);
   24|    134|  if (buf.size() != 0) {
  ------------------
  |  Branch (24:7): [True: 134, False: 0]
  ------------------
   25|    134|    memcpy(buf.mutable_data(), data, size);
   26|    134|  }
   27|    134|  ByteBufferPtr buf_ptr = std::make_unique<DynamicByteBuffer>(buf);
   28|    134|  [[maybe_unused]] fit::result<ErrorCode, ValidPacketReader> result =
   29|    134|      ValidPacketReader::ParseSdu(buf_ptr);
   30|    134|}
LLVMFuzzerTestOneInput:
   34|    134|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   35|    134|  bt::sm::fuzz(data, size);
   36|    134|  return 0;
   37|    134|}

pw_Log:
  101|    133|                       ...) {
  102|    133|  va_list args;
  103|    133|  va_start(args, message);
  104|    133|  pw_Log_HandleMessageVaList(level,
  105|    133|                             flags,
  106|    133|                             module_name,
  107|    133|                             file_name,
  108|    133|                             line_number,
  109|    133|                             function_name,
  110|    133|                             message,
  111|    133|                             args);
  112|    133|  va_end(args);
  113|    133|}
pw_Log_HandleMessageVaList:
  122|    133|                                           va_list args) {
  123|       |  // Accumulate the log message in this buffer, then output it.
  124|    133|  pw::StringBuffer<PW_LOG_BASIC_ENTRY_SIZE> buffer;
  125|       |
  126|       |  // Column: Timestamp
  127|       |  // Note that this macro method defaults to a no-op.
  128|    133|  PW_LOG_APPEND_TIMESTAMP(buffer);
  ------------------
  |  |   67|    133|  do {                                  \
  |  |   68|    133|  } while (0)
  |  |  ------------------
  |  |  |  Branch (68:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  129|       |
  130|       |  // Column: Filename
  131|       |#if PW_LOG_SHOW_FILENAME
  132|       |  buffer.Format(" %-30s:%4d |", GetFileBasename(file_name), line_number);
  133|       |#else
  134|    133|  static_cast<void>(file_name);
  135|    133|  static_cast<void>(line_number);
  136|    133|#endif
  137|       |
  138|       |  // Column: Function
  139|       |#if PW_LOG_SHOW_FUNCTION
  140|       |  buffer.Format(" %-30s |", function_name);
  141|       |#else
  142|    133|  static_cast<void>(function_name);
  143|    133|#endif
  144|       |
  145|       |  // Column: Module
  146|       |#if PW_LOG_SHOW_MODULE
  147|       |  buffer << " " BOLD;
  148|       |  buffer.Format("%3s", module_name);
  149|       |  buffer << RESET " ";
  150|       |#else
  151|    133|  static_cast<void>(module_name);
  152|    133|#endif  // PW_LOG_SHOW_MODULE
  153|       |
  154|       |  // Column: Flag
  155|       |#if PW_LOG_SHOW_FLAG
  156|       |#if PW_EMOJI
  157|       |  buffer << (flags ? "🚩" : "  ");
  158|       |#else
  159|       |  buffer << (flags ? "*" : "|");
  160|       |#endif  // PW_EMOJI
  161|       |  buffer << " ";
  162|       |#else
  163|    133|  static_cast<void>(flags);
  164|    133|#endif  // PW_LOG_SHOW_FLAG
  165|       |
  166|       |  // Column: Level
  167|    133|  buffer << LogLevelToLogLevelName(level) << "  ";
  168|       |
  169|       |  // Column: Message
  170|    133|  buffer.FormatVaList(message, args);
  171|       |
  172|       |  // All done; flush the log.
  173|    133|  write_log(buffer);
  174|    133|}
log_basic.cc:_ZN2pw9log_basic12_GLOBAL__N_122LogLevelToLogLevelNameEi:
   44|    133|const char* LogLevelToLogLevelName(int level) {
   45|    133|  switch (level) {
   46|       |    // clang-format off
   47|       |#if PW_EMOJI
   48|       |    case PW_LOG_LEVEL_DEBUG    : return "👾" RESET;
   49|       |    case PW_LOG_LEVEL_INFO     : return "ℹ️ " RESET;
   50|       |    case PW_LOG_LEVEL_WARN     : return "⚠️ " RESET;
   51|       |    case PW_LOG_LEVEL_ERROR    : return "❌" RESET;
   52|       |    case PW_LOG_LEVEL_CRITICAL : return "☠️ " RESET;
   53|       |    default: return "❔" RESET;
   54|       |#else
   55|    133|    case PW_LOG_LEVEL_DEBUG    : return BLUE     BOLD        "DBG" RESET;
  ------------------
  |  |   21|    133|#define PW_LOG_LEVEL_DEBUG    1
  ------------------
                  case PW_LOG_LEVEL_DEBUG    : return BLUE     BOLD        "DBG" RESET;
  ------------------
  |  |   32|    133|#define BLUE      "\033[96m"
  ------------------
                  case PW_LOG_LEVEL_DEBUG    : return BLUE     BOLD        "DBG" RESET;
  ------------------
  |  |   38|    133|#define RESET     "\033[0m"
  ------------------
  |  Branch (55:5): [True: 133, False: 0]
  ------------------
   56|      0|    case PW_LOG_LEVEL_INFO     : return MAGENTA  BOLD        "INF" RESET;
  ------------------
  |  |   22|      0|#define PW_LOG_LEVEL_INFO     2
  ------------------
                  case PW_LOG_LEVEL_INFO     : return MAGENTA  BOLD        "INF" RESET;
  ------------------
  |  |   28|      0|#define MAGENTA   "\033[35m"
  ------------------
                  case PW_LOG_LEVEL_INFO     : return MAGENTA  BOLD        "INF" RESET;
  ------------------
  |  |   38|      0|#define RESET     "\033[0m"
  ------------------
  |  Branch (56:5): [True: 0, False: 133]
  ------------------
   57|      0|    case PW_LOG_LEVEL_WARN     : return YELLOW   BOLD        "WRN" RESET;
  ------------------
  |  |   23|      0|#define PW_LOG_LEVEL_WARN     3
  ------------------
                  case PW_LOG_LEVEL_WARN     : return YELLOW   BOLD        "WRN" RESET;
  ------------------
  |  |   29|      0|#define YELLOW    "\033[33m"
  ------------------
                  case PW_LOG_LEVEL_WARN     : return YELLOW   BOLD        "WRN" RESET;
  ------------------
  |  |   38|      0|#define RESET     "\033[0m"
  ------------------
  |  Branch (57:5): [True: 0, False: 133]
  ------------------
   58|      0|    case PW_LOG_LEVEL_ERROR    : return RED      BOLD        "ERR" RESET;
  ------------------
  |  |   24|      0|#define PW_LOG_LEVEL_ERROR    4
  ------------------
                  case PW_LOG_LEVEL_ERROR    : return RED      BOLD        "ERR" RESET;
  ------------------
  |  |   30|      0|#define RED       "\033[31m"
  ------------------
                  case PW_LOG_LEVEL_ERROR    : return RED      BOLD        "ERR" RESET;
  ------------------
  |  |   38|      0|#define RESET     "\033[0m"
  ------------------
  |  Branch (58:5): [True: 0, False: 133]
  ------------------
   59|      0|    case PW_LOG_LEVEL_CRITICAL : return BLACK    BOLD RED_BG "FTL" RESET;
  ------------------
  |  |   25|      0|#define PW_LOG_LEVEL_CRITICAL 5
  ------------------
                  case PW_LOG_LEVEL_CRITICAL : return BLACK    BOLD RED_BG "FTL" RESET;
  ------------------
  |  |   33|      0|#define BLACK     "\033[30m"
  ------------------
                  case PW_LOG_LEVEL_CRITICAL : return BLACK    BOLD RED_BG "FTL" RESET;
  ------------------
  |  |   38|      0|#define RESET     "\033[0m"
  ------------------
  |  Branch (59:5): [True: 0, False: 133]
  ------------------
   60|      0|    default                    : return GREEN    BOLD        "UNK" RESET;
  ------------------
  |  |   31|      0|#define GREEN     "\033[32m"
  ------------------
                  default                    : return GREEN    BOLD        "UNK" RESET;
  ------------------
  |  |   38|      0|#define RESET     "\033[0m"
  ------------------
  |  Branch (60:5): [True: 0, False: 133]
  ------------------
   61|    133|#endif
   62|       |      // clang-format on
   63|    133|  }
   64|    133|}
log_basic.cc:_ZNK2pw9log_basic12_GLOBAL__N_13$_0clENSt3__117basic_string_viewIcNS3_11char_traitsIcEEEE:
   86|    133|void (*write_log)(std::string_view) = [](std::string_view log) {
   87|    133|  sys_io::WriteLine(log)
   88|    133|      .IgnoreError();  // TODO: b/242598609 - Handle Status properly
   89|    133|};

_ZN2pw6string12FormatVaListENS_4spanIcLm18446744073709551615EEEPKcP13__va_list_tag:
   32|    133|                            va_list args) {
   33|    133|  if (buffer.empty()) {
  ------------------
  |  Branch (33:7): [True: 0, False: 133]
  ------------------
   34|      0|    return StatusWithSize::ResourceExhausted();
   35|      0|  }
   36|       |
   37|    133|  const int result = std::vsnprintf(buffer.data(), buffer.size(), format, args);
   38|       |
   39|       |  // If an error occurred, the number of characters written is unknown.
   40|       |  // Discard any output by terminating the buffer.
   41|    133|  if (result < 0) {
  ------------------
  |  Branch (41:7): [True: 0, False: 133]
  ------------------
   42|      0|    buffer[0] = '\0';
   43|      0|    return StatusWithSize::InvalidArgument();
   44|      0|  }
   45|       |
   46|       |  // If result >= buffer.size(), the output was truncated and null-terminated.
   47|    133|  if (static_cast<unsigned>(result) >= buffer.size()) {
  ------------------
  |  Branch (47:7): [True: 0, False: 133]
  ------------------
   48|      0|    return StatusWithSize::ResourceExhausted(buffer.size() - 1);
   49|      0|  }
   50|       |
   51|    133|  return StatusWithSize(result);
   52|    133|}

_ZN2pw13StringBuilder6appendEPKcm:
   37|    266|StringBuilder& StringBuilder::append(const char* str, size_t count) {
   38|    266|  char* const append_destination = buffer_.data() + size();
   39|    266|  std::copy_n(str, ResizeAndTerminate(count), append_destination);
   40|    266|  return *this;
   41|    266|}
_ZN2pw13StringBuilder6appendEPKc:
   43|    266|StringBuilder& StringBuilder::append(const char* str) {
   44|       |  // Use buffer_.size() - size() as the maximum length so that strings too long
   45|       |  // to fit in the buffer will request one character too many, which sets the
   46|       |  // status to RESOURCE_EXHAUSTED.
   47|    266|  return append(string::ClampedCString(str, buffer_.size() - size()));
   48|    266|}
_ZN2pw13StringBuilder6appendENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   50|    266|StringBuilder& StringBuilder::append(std::string_view str) {
   51|    266|  return append(str.data(), str.size());
   52|    266|}
_ZN2pw13StringBuilder18ResizeAndTerminateEm:
   65|    266|size_t StringBuilder::ResizeAndTerminate(size_t chars_to_append) {
   66|    266|  const size_t copied = std::min(chars_to_append, max_size() - size());
   67|       |  // NOTE: `+=` is not used in order to avoid implicit integer conversion which
   68|       |  // results in an error on some compilers.
   69|    266|  *size_ = static_cast<InlineString<>::size_type>(copied + *size_);
   70|    266|  NullTerminate();
   71|       |
   72|    266|  if (buffer_.empty() || chars_to_append != copied) {
  ------------------
  |  Branch (72:7): [True: 0, False: 266]
  |  Branch (72:26): [True: 0, False: 266]
  ------------------
   73|      0|    SetErrorStatus(Status::ResourceExhausted());
   74|    266|  } else {
   75|    266|    last_status_ = StatusCode(OkStatus());
   76|    266|  }
   77|    266|  return copied;
   78|    266|}
_ZN2pw13StringBuilder12FormatVaListEPKcP13__va_list_tag:
   99|    133|StringBuilder& StringBuilder::FormatVaList(const char* format, va_list args) {
  100|    133|  HandleStatusWithSize(
  101|    133|      string::FormatVaList(buffer_.subspan(size()), format, args));
  102|    133|  return *this;
  103|    133|}
_ZN2pw13StringBuilder20HandleStatusWithSizeENS_14StatusWithSizeE:
  121|    133|void StringBuilder::HandleStatusWithSize(StatusWithSize written) {
  122|    133|  const Status status = written.status();
  123|    133|  last_status_ = StatusCode(status);
  124|    133|  if (!status.ok()) {
  ------------------
  |  Branch (124:7): [True: 0, False: 133]
  ------------------
  125|      0|    status_ = StatusCode(status);
  126|      0|  }
  127|       |
  128|       |  // NOTE: `+=` is not used in order to avoid implicit integer conversion which
  129|       |  // results in an error on some compilers.
  130|    133|  *size_ = static_cast<InlineString<>::size_type>(written.size() + *size_);
  131|    133|}

_ZN2pw6sys_io10WriteBytesENS_4spanIKSt4byteLm18446744073709551615EEE:
   29|    133|StatusWithSize WriteBytes(ConstByteSpan src) {
   30|  6.59k|  for (size_t i = 0; i < src.size_bytes(); ++i) {
  ------------------
  |  Branch (30:22): [True: 6.45k, False: 133]
  ------------------
   31|  6.45k|    Status result = WriteByte(src[i]);
   32|  6.45k|    if (!result.ok()) {
  ------------------
  |  Branch (32:9): [True: 0, False: 6.45k]
  ------------------
   33|      0|      return StatusWithSize(result, i);
   34|      0|    }
   35|  6.45k|  }
   36|    133|  return StatusWithSize(src.size_bytes());
   37|    133|}

_ZN2pw6sys_io9WriteByteESt4byte:
   39|  6.59k|Status WriteByte(std::byte b) {
   40|  6.59k|  if (std::putchar(static_cast<char>(b)) == EOF) {
  ------------------
  |  Branch (40:7): [True: 0, False: 6.59k]
  ------------------
   41|      0|    return Status::Internal();
   42|      0|  }
   43|  6.59k|  return OkStatus();
   44|  6.59k|}
_ZN2pw6sys_io9WriteLineENSt3__117basic_string_viewIcNS1_11char_traitsIcEEEE:
   46|    133|StatusWithSize WriteLine(std::string_view s) {
   47|    133|  size_t chars_written = 0;
   48|    133|  StatusWithSize size_result = WriteBytes(as_bytes(span(s)));
   49|    133|  if (!size_result.ok()) {
  ------------------
  |  Branch (49:7): [True: 0, False: 133]
  ------------------
   50|      0|    return size_result;
   51|      0|  }
   52|    133|  chars_written += size_result.size();
   53|       |
   54|       |  // Write trailing newline character.
   55|    133|  Status result = WriteByte(static_cast<std::byte>('\n'));
   56|    133|  if (result.ok()) {
  ------------------
  |  Branch (56:7): [True: 133, False: 0]
  ------------------
   57|    133|    chars_written++;
   58|    133|  }
   59|       |
   60|    133|  return StatusWithSize(result, chars_written);
   61|    133|}

