_ZN18FuzzedDataProviderC2EPKhm:
   37|  1.13k|      : data_ptr_(data), remaining_bytes_(size) {}
_ZN18FuzzedDataProvider15ConsumeIntegralIiEET_v:
  195|  2.27k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.27k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.27k|                                std::numeric_limits<T>::max());
  198|  2.27k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIiEET_S1_S1_:
  205|  2.27k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.27k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  2.27k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.27k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.27k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.27k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.27k|  uint64_t result = 0;
  215|  2.27k|  size_t offset = 0;
  216|       |
  217|  8.17k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 6.72k, False: 1.44k]
  |  Branch (217:43): [True: 6.72k, False: 0]
  ------------------
  218|  8.17k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 5.90k, False: 825]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  5.90k|    --remaining_bytes_;
  226|  5.90k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  5.90k|    offset += CHAR_BIT;
  228|  5.90k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.27k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.27k, False: 0]
  ------------------
  232|  2.27k|    result = result % (range + 1);
  233|       |
  234|  2.27k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.27k|}
_ZN18FuzzedDataProvider15ConsumeIntegralIjEET_v:
  195|  2.27k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.27k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.27k|                                std::numeric_limits<T>::max());
  198|  2.27k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIjEET_S1_S1_:
  205|  9.09k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  9.09k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  9.09k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  9.09k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 9.09k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  9.09k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  9.09k|  uint64_t result = 0;
  215|  9.09k|  size_t offset = 0;
  216|       |
  217|  15.9k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 15.2k, False: 727]
  |  Branch (217:43): [True: 11.3k, False: 3.93k]
  ------------------
  218|  15.9k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 6.90k, False: 4.43k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  6.90k|    --remaining_bytes_;
  226|  6.90k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  6.90k|    offset += CHAR_BIT;
  228|  6.90k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  9.09k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 9.09k, False: 0]
  ------------------
  232|  9.09k|    result = result % (range + 1);
  233|       |
  234|  9.09k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  9.09k|}
_ZN18FuzzedDataProvider15ConsumeIntegralIsEET_v:
  195|  2.27k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.27k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.27k|                                std::numeric_limits<T>::max());
  198|  2.27k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIsEET_S1_S1_:
  205|  2.27k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.27k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  2.27k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.27k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.27k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.27k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.27k|  uint64_t result = 0;
  215|  2.27k|  size_t offset = 0;
  216|       |
  217|  6.18k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 4.24k, False: 1.93k]
  |  Branch (217:43): [True: 4.24k, False: 0]
  ------------------
  218|  6.18k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 3.90k, False: 336]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  3.90k|    --remaining_bytes_;
  226|  3.90k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  3.90k|    offset += CHAR_BIT;
  228|  3.90k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.27k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.27k, False: 0]
  ------------------
  232|  2.27k|    result = result % (range + 1);
  233|       |
  234|  2.27k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.27k|}
_ZN18FuzzedDataProvider15ConsumeIntegralItEET_v:
  195|  2.27k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.27k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.27k|                                std::numeric_limits<T>::max());
  198|  2.27k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeItEET_S1_S1_:
  205|  2.27k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.27k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  2.27k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.27k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.27k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.27k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.27k|  uint64_t result = 0;
  215|  2.27k|  size_t offset = 0;
  216|       |
  217|  4.11k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 3.20k, False: 916]
  |  Branch (217:43): [True: 3.20k, False: 0]
  ------------------
  218|  4.11k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 1.84k, False: 1.35k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  1.84k|    --remaining_bytes_;
  226|  1.84k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  1.84k|    offset += CHAR_BIT;
  228|  1.84k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.27k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.27k, False: 0]
  ------------------
  232|  2.27k|    result = result % (range + 1);
  233|       |
  234|  2.27k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.27k|}
_ZN18FuzzedDataProvider15ConsumeIntegralIhEET_v:
  195|  2.27k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.27k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.27k|                                std::numeric_limits<T>::max());
  198|  2.27k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIhEET_S1_S1_:
  205|  2.27k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.27k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  2.27k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.27k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.27k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.27k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.27k|  uint64_t result = 0;
  215|  2.27k|  size_t offset = 0;
  216|       |
  217|  3.30k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 2.27k, False: 1.03k]
  |  Branch (217:43): [True: 2.27k, False: 0]
  ------------------
  218|  3.30k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 1.03k, False: 1.24k]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  1.03k|    --remaining_bytes_;
  226|  1.03k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  1.03k|    offset += CHAR_BIT;
  228|  1.03k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.27k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.27k, False: 0]
  ------------------
  232|  2.27k|    result = result % (range + 1);
  233|       |
  234|  2.27k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.27k|}
_ZN18FuzzedDataProvider15ConsumeIntegralIaEET_v:
  195|  2.27k|template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
  196|  2.27k|  return ConsumeIntegralInRange(std::numeric_limits<T>::min(),
  197|  2.27k|                                std::numeric_limits<T>::max());
  198|  2.27k|}
_ZN18FuzzedDataProvider22ConsumeIntegralInRangeIaEET_S1_S1_:
  205|  2.27k|T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
  206|  2.27k|  static_assert(std::is_integral<T>::value, "An integral type is required.");
  207|  2.27k|  static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
  208|       |
  209|  2.27k|  if (min > max)
  ------------------
  |  Branch (209:7): [True: 0, False: 2.27k]
  ------------------
  210|      0|    abort();
  211|       |
  212|       |  // Use the biggest type possible to hold the range and the result.
  213|  2.27k|  uint64_t range = static_cast<uint64_t>(max) - static_cast<uint64_t>(min);
  214|  2.27k|  uint64_t result = 0;
  215|  2.27k|  size_t offset = 0;
  216|       |
  217|  4.52k|  while (offset < sizeof(T) * CHAR_BIT && (range >> offset) > 0 &&
  ------------------
  |  Branch (217:10): [True: 2.27k, False: 2.25k]
  |  Branch (217:43): [True: 2.27k, False: 0]
  ------------------
  218|  4.52k|         remaining_bytes_ != 0) {
  ------------------
  |  Branch (218:10): [True: 2.25k, False: 21]
  ------------------
  219|       |    // Pull bytes off the end of the seed data. Experimentally, this seems to
  220|       |    // allow the fuzzer to more easily explore the input space. This makes
  221|       |    // sense, since it works by modifying inputs that caused new code to run,
  222|       |    // and this data is often used to encode length of data read by
  223|       |    // |ConsumeBytes|. Separating out read lengths makes it easier modify the
  224|       |    // contents of the data that is actually read.
  225|  2.25k|    --remaining_bytes_;
  226|  2.25k|    result = (result << CHAR_BIT) | data_ptr_[remaining_bytes_];
  227|  2.25k|    offset += CHAR_BIT;
  228|  2.25k|  }
  229|       |
  230|       |  // Avoid division by 0, in case |range + 1| results in overflow.
  231|  2.27k|  if (range != std::numeric_limits<decltype(range)>::max())
  ------------------
  |  Branch (231:7): [True: 2.27k, False: 0]
  ------------------
  232|  2.27k|    result = result % (range + 1);
  233|       |
  234|  2.27k|  return static_cast<T>(static_cast<uint64_t>(min) + result);
  235|  2.27k|}

LLVMFuzzerTestOneInput:
  222|  1.13k|{
  223|  1.13k|    test_one_input({data, size});
  224|  1.13k|    return 0;
  225|  1.13k|}
fuzz.cpp:_ZL14test_one_inputNSt3__14spanIKhLm18446744073709551615EEE:
   83|  1.13k|{
   84|  1.13k|    CheckGlobals check{};
   85|  1.13k|    (*Assert(g_test_one_input))(buffer);
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   86|  1.13k|}

_Z20overflow_fuzz_targetNSt3__14spanIKhLm18446744073709551615EEE:
   42|  1.13k|{
   43|  1.13k|    FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
   44|  1.13k|    TestOverflow<int8_t, int64_t>(fuzzed_data_provider);
   45|  1.13k|    TestOverflow<int16_t, int64_t>(fuzzed_data_provider);
   46|  1.13k|    TestOverflow<int32_t, int64_t>(fuzzed_data_provider);
   47|  1.13k|    TestOverflow<uint8_t, uint64_t>(fuzzed_data_provider);
   48|  1.13k|    TestOverflow<uint16_t, uint64_t>(fuzzed_data_provider);
   49|  1.13k|    TestOverflow<uint32_t, uint64_t>(fuzzed_data_provider);
   50|  1.13k|}
overflow.cpp:_ZN12_GLOBAL__N_112TestOverflowIalEEvR18FuzzedDataProvider:
   18|  1.13k|{
   19|  1.13k|    constexpr auto min{std::numeric_limits<T>::min()};
   20|  1.13k|    constexpr auto max{std::numeric_limits<T>::max()};
   21|       |    // Range needs to be at least twice as big to allow two numbers to be added without overflowing.
   22|  1.13k|    static_assert(min >= std::numeric_limits<W>::min() / 2);
   23|  1.13k|    static_assert(max <= std::numeric_limits<W>::max() / 2);
   24|       |
   25|  1.13k|    auto widen = [](T value) -> W { return value; };
   26|  1.13k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
   27|  1.13k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
   28|       |
   29|  1.13k|    const T i = fuzzed_data_provider.ConsumeIntegral<T>();
   30|  1.13k|    const T j = fuzzed_data_provider.ConsumeIntegral<T>();
   31|  1.13k|    const unsigned shift = fuzzed_data_provider.ConsumeIntegralInRange<unsigned>(0, std::numeric_limits<W>::digits - std::numeric_limits<T>::digits);
   32|       |
   33|  1.13k|    Assert(clamp(widen(i) + widen(j)) == SaturatingAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   34|  1.13k|    Assert(check(widen(i) + widen(j)) == CheckedAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   35|       |
   36|  1.13k|    Assert(clamp(widen(i) << shift) == SaturatingLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   37|  1.13k|    Assert(check(widen(i) << shift) == CheckedLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   38|  1.13k|}
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIalEEvR18FuzzedDataProviderENKUllE_clEl:
   26|  2.27k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIalEEvR18FuzzedDataProviderENKUlaE_clEa:
   25|  6.82k|    auto widen = [](T value) -> W { return value; };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIalEEvR18FuzzedDataProviderENKUllE0_clEl:
   27|  2.27k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
  ------------------
  |  Branch (27:56): [True: 1.41k, False: 856]
  |  Branch (27:72): [True: 890, False: 528]
  ------------------
overflow.cpp:_ZN12_GLOBAL__N_112TestOverflowIslEEvR18FuzzedDataProvider:
   18|  1.13k|{
   19|  1.13k|    constexpr auto min{std::numeric_limits<T>::min()};
   20|  1.13k|    constexpr auto max{std::numeric_limits<T>::max()};
   21|       |    // Range needs to be at least twice as big to allow two numbers to be added without overflowing.
   22|  1.13k|    static_assert(min >= std::numeric_limits<W>::min() / 2);
   23|  1.13k|    static_assert(max <= std::numeric_limits<W>::max() / 2);
   24|       |
   25|  1.13k|    auto widen = [](T value) -> W { return value; };
   26|  1.13k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
   27|  1.13k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
   28|       |
   29|  1.13k|    const T i = fuzzed_data_provider.ConsumeIntegral<T>();
   30|  1.13k|    const T j = fuzzed_data_provider.ConsumeIntegral<T>();
   31|  1.13k|    const unsigned shift = fuzzed_data_provider.ConsumeIntegralInRange<unsigned>(0, std::numeric_limits<W>::digits - std::numeric_limits<T>::digits);
   32|       |
   33|  1.13k|    Assert(clamp(widen(i) + widen(j)) == SaturatingAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   34|  1.13k|    Assert(check(widen(i) + widen(j)) == CheckedAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   35|       |
   36|  1.13k|    Assert(clamp(widen(i) << shift) == SaturatingLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   37|  1.13k|    Assert(check(widen(i) << shift) == CheckedLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   38|  1.13k|}
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIslEEvR18FuzzedDataProviderENKUllE_clEl:
   26|  2.27k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIslEEvR18FuzzedDataProviderENKUlsE_clEs:
   25|  6.82k|    auto widen = [](T value) -> W { return value; };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIslEEvR18FuzzedDataProviderENKUllE0_clEl:
   27|  2.27k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
  ------------------
  |  Branch (27:56): [True: 1.47k, False: 803]
  |  Branch (27:72): [True: 1.03k, False: 432]
  ------------------
overflow.cpp:_ZN12_GLOBAL__N_112TestOverflowIilEEvR18FuzzedDataProvider:
   18|  1.13k|{
   19|  1.13k|    constexpr auto min{std::numeric_limits<T>::min()};
   20|  1.13k|    constexpr auto max{std::numeric_limits<T>::max()};
   21|       |    // Range needs to be at least twice as big to allow two numbers to be added without overflowing.
   22|  1.13k|    static_assert(min >= std::numeric_limits<W>::min() / 2);
   23|  1.13k|    static_assert(max <= std::numeric_limits<W>::max() / 2);
   24|       |
   25|  1.13k|    auto widen = [](T value) -> W { return value; };
   26|  1.13k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
   27|  1.13k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
   28|       |
   29|  1.13k|    const T i = fuzzed_data_provider.ConsumeIntegral<T>();
   30|  1.13k|    const T j = fuzzed_data_provider.ConsumeIntegral<T>();
   31|  1.13k|    const unsigned shift = fuzzed_data_provider.ConsumeIntegralInRange<unsigned>(0, std::numeric_limits<W>::digits - std::numeric_limits<T>::digits);
   32|       |
   33|  1.13k|    Assert(clamp(widen(i) + widen(j)) == SaturatingAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   34|  1.13k|    Assert(check(widen(i) + widen(j)) == CheckedAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   35|       |
   36|  1.13k|    Assert(clamp(widen(i) << shift) == SaturatingLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   37|  1.13k|    Assert(check(widen(i) << shift) == CheckedLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   38|  1.13k|}
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIilEEvR18FuzzedDataProviderENKUllE_clEl:
   26|  2.27k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIilEEvR18FuzzedDataProviderENKUliE_clEi:
   25|  6.82k|    auto widen = [](T value) -> W { return value; };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIilEEvR18FuzzedDataProviderENKUllE0_clEl:
   27|  2.27k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
  ------------------
  |  Branch (27:56): [True: 1.47k, False: 798]
  |  Branch (27:72): [True: 1.11k, False: 357]
  ------------------
overflow.cpp:_ZN12_GLOBAL__N_112TestOverflowIhmEEvR18FuzzedDataProvider:
   18|  1.13k|{
   19|  1.13k|    constexpr auto min{std::numeric_limits<T>::min()};
   20|  1.13k|    constexpr auto max{std::numeric_limits<T>::max()};
   21|       |    // Range needs to be at least twice as big to allow two numbers to be added without overflowing.
   22|  1.13k|    static_assert(min >= std::numeric_limits<W>::min() / 2);
   23|  1.13k|    static_assert(max <= std::numeric_limits<W>::max() / 2);
   24|       |
   25|  1.13k|    auto widen = [](T value) -> W { return value; };
   26|  1.13k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
   27|  1.13k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
   28|       |
   29|  1.13k|    const T i = fuzzed_data_provider.ConsumeIntegral<T>();
   30|  1.13k|    const T j = fuzzed_data_provider.ConsumeIntegral<T>();
   31|  1.13k|    const unsigned shift = fuzzed_data_provider.ConsumeIntegralInRange<unsigned>(0, std::numeric_limits<W>::digits - std::numeric_limits<T>::digits);
   32|       |
   33|  1.13k|    Assert(clamp(widen(i) + widen(j)) == SaturatingAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   34|  1.13k|    Assert(check(widen(i) + widen(j)) == CheckedAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   35|       |
   36|  1.13k|    Assert(clamp(widen(i) << shift) == SaturatingLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   37|  1.13k|    Assert(check(widen(i) << shift) == CheckedLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   38|  1.13k|}
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIhmEEvR18FuzzedDataProviderENKUlmE_clEm:
   26|  2.27k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIhmEEvR18FuzzedDataProviderENKUlhE_clEh:
   25|  6.82k|    auto widen = [](T value) -> W { return value; };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIhmEEvR18FuzzedDataProviderENKUlmE0_clEm:
   27|  2.27k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
  ------------------
  |  Branch (27:56): [True: 2.27k, False: 0]
  |  Branch (27:72): [True: 1.67k, False: 600]
  ------------------
overflow.cpp:_ZN12_GLOBAL__N_112TestOverflowItmEEvR18FuzzedDataProvider:
   18|  1.13k|{
   19|  1.13k|    constexpr auto min{std::numeric_limits<T>::min()};
   20|  1.13k|    constexpr auto max{std::numeric_limits<T>::max()};
   21|       |    // Range needs to be at least twice as big to allow two numbers to be added without overflowing.
   22|  1.13k|    static_assert(min >= std::numeric_limits<W>::min() / 2);
   23|  1.13k|    static_assert(max <= std::numeric_limits<W>::max() / 2);
   24|       |
   25|  1.13k|    auto widen = [](T value) -> W { return value; };
   26|  1.13k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
   27|  1.13k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
   28|       |
   29|  1.13k|    const T i = fuzzed_data_provider.ConsumeIntegral<T>();
   30|  1.13k|    const T j = fuzzed_data_provider.ConsumeIntegral<T>();
   31|  1.13k|    const unsigned shift = fuzzed_data_provider.ConsumeIntegralInRange<unsigned>(0, std::numeric_limits<W>::digits - std::numeric_limits<T>::digits);
   32|       |
   33|  1.13k|    Assert(clamp(widen(i) + widen(j)) == SaturatingAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   34|  1.13k|    Assert(check(widen(i) + widen(j)) == CheckedAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   35|       |
   36|  1.13k|    Assert(clamp(widen(i) << shift) == SaturatingLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   37|  1.13k|    Assert(check(widen(i) << shift) == CheckedLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   38|  1.13k|}
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowItmEEvR18FuzzedDataProviderENKUlmE_clEm:
   26|  2.27k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowItmEEvR18FuzzedDataProviderENKUltE_clEt:
   25|  6.82k|    auto widen = [](T value) -> W { return value; };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowItmEEvR18FuzzedDataProviderENKUlmE0_clEm:
   27|  2.27k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
  ------------------
  |  Branch (27:56): [True: 2.27k, False: 0]
  |  Branch (27:72): [True: 1.71k, False: 558]
  ------------------
overflow.cpp:_ZN12_GLOBAL__N_112TestOverflowIjmEEvR18FuzzedDataProvider:
   18|  1.13k|{
   19|  1.13k|    constexpr auto min{std::numeric_limits<T>::min()};
   20|  1.13k|    constexpr auto max{std::numeric_limits<T>::max()};
   21|       |    // Range needs to be at least twice as big to allow two numbers to be added without overflowing.
   22|  1.13k|    static_assert(min >= std::numeric_limits<W>::min() / 2);
   23|  1.13k|    static_assert(max <= std::numeric_limits<W>::max() / 2);
   24|       |
   25|  1.13k|    auto widen = [](T value) -> W { return value; };
   26|  1.13k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
   27|  1.13k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
   28|       |
   29|  1.13k|    const T i = fuzzed_data_provider.ConsumeIntegral<T>();
   30|  1.13k|    const T j = fuzzed_data_provider.ConsumeIntegral<T>();
   31|  1.13k|    const unsigned shift = fuzzed_data_provider.ConsumeIntegralInRange<unsigned>(0, std::numeric_limits<W>::digits - std::numeric_limits<T>::digits);
   32|       |
   33|  1.13k|    Assert(clamp(widen(i) + widen(j)) == SaturatingAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   34|  1.13k|    Assert(check(widen(i) + widen(j)) == CheckedAdd(i, j));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   35|       |
   36|  1.13k|    Assert(clamp(widen(i) << shift) == SaturatingLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   37|  1.13k|    Assert(check(widen(i) << shift) == CheckedLeftShift(i, shift));
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   38|  1.13k|}
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIjmEEvR18FuzzedDataProviderENKUlmE_clEm:
   26|  2.27k|    auto clamp = [](W value) -> W { return std::clamp<W>(value, min, max); };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIjmEEvR18FuzzedDataProviderENKUljE_clEj:
   25|  6.82k|    auto widen = [](T value) -> W { return value; };
overflow.cpp:_ZZN12_GLOBAL__N_112TestOverflowIjmEEvR18FuzzedDataProviderENKUlmE0_clEm:
   27|  2.27k|    auto check = [](W value) -> std::optional<W> { if (value >= min && value <= max) return value; else return std::nullopt; };
  ------------------
  |  Branch (27:56): [True: 2.27k, False: 0]
  |  Branch (27:72): [True: 1.80k, False: 474]
  ------------------

_ZN12CheckGlobalsC2Ev:
   56|  1.13k|CheckGlobals::CheckGlobals() : m_impl(std::make_unique<CheckGlobalsImpl>()) {}
_ZN12CheckGlobalsD2Ev:
   57|  1.13k|CheckGlobals::~CheckGlobals() = default;
_ZN16CheckGlobalsImplC2Ev:
   17|  1.13k|    {
   18|  1.13k|        g_used_g_prng = false;
   19|  1.13k|        g_seeded_g_prng_zero = false;
   20|  1.13k|        g_used_system_time = false;
   21|  1.13k|        SetMockTime(0s);
   22|  1.13k|    }
_ZN16CheckGlobalsImplD2Ev:
   24|  1.13k|    {
   25|  1.13k|        if (g_used_g_prng && !g_seeded_g_prng_zero) {
  ------------------
  |  Branch (25:13): [True: 0, False: 1.13k]
  |  Branch (25:30): [True: 0, False: 0]
  ------------------
   26|      0|            std::cerr << "\n\n"
   27|      0|                         "The current fuzz target used the global random state.\n\n"
   28|       |
   29|      0|                         "This is acceptable, but requires the fuzz target to call \n"
   30|      0|                         "SeedRandomStateForTest(SeedRand::ZEROS) in the first line \n"
   31|      0|                         "of the FUZZ_TARGET function.\n\n"
   32|       |
   33|      0|                         "An alternative solution would be to avoid any use of globals.\n\n"
   34|       |
   35|      0|                         "Without a solution, fuzz instability and non-determinism can lead \n"
   36|      0|                         "to non-reproducible bugs or inefficient fuzzing.\n\n"
   37|      0|                      << std::endl;
   38|      0|            std::abort(); // Abort, because AFL may try to recover from a std::exit
   39|      0|        }
   40|       |
   41|  1.13k|        if (g_used_system_time) {
  ------------------
  |  Branch (41:13): [True: 0, False: 1.13k]
  ------------------
   42|      0|            std::cerr << "\n\n"
   43|      0|                         "The current fuzz target accessed system time.\n\n"
   44|       |
   45|      0|                         "This is acceptable, but requires the fuzz target to call \n"
   46|      0|                         "SetMockTime() at the beginning of processing the fuzz input.\n\n"
   47|       |
   48|      0|                         "Without setting mock time, time-dependent behavior can lead \n"
   49|      0|                         "to non-reproducible bugs or inefficient fuzzing.\n\n"
   50|      0|                      << std::endl;
   51|      0|            std::abort();
   52|      0|        }
   53|  1.13k|    }

_Z22inline_assertion_checkILb1EbEOT0_S1_PKciS3_S3_:
   52|  28.4k|{
   53|  28.4k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  28.4k|    ) {
   58|  28.4k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 28.4k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  28.4k|    }
   62|  28.4k|    return std::forward<T>(val);
   63|  28.4k|}
_Z22inline_assertion_checkILb1ERPKNSt3__18functionIFvNS0_4spanIKhLm18446744073709551615EEEEEEEOT0_SB_PKciSD_SD_:
   52|  1.13k|{
   53|  1.13k|    if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING
  ------------------
  |  Branch (53:9): [Folded - Ignored]
  |  Branch (53:22): [Folded - Ignored]
  |  Branch (53:54): [Folded - Ignored]
  ------------------
   54|       |#ifdef ABORT_ON_FAILED_ASSUME
   55|       |        || true
   56|       |#endif
   57|  1.13k|    ) {
   58|  1.13k|        if (!val) {
  ------------------
  |  Branch (58:13): [True: 0, False: 1.13k]
  ------------------
   59|      0|            assertion_fail(file, line, func, assertion);
   60|      0|        }
   61|  1.13k|    }
   62|  1.13k|    return std::forward<T>(val);
   63|  1.13k|}

_Z16AdditionOverflowIiEbT_S0_:
   16|  1.13k|{
   17|  1.13k|    static_assert(std::is_integral<T>::value, "Integral required.");
   18|  1.13k|    if constexpr (std::numeric_limits<T>::is_signed) {
   19|  1.13k|        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
  ------------------
  |  Branch (19:17): [True: 368, False: 769]
  |  Branch (19:26): [True: 124, False: 244]
  ------------------
   20|  1.13k|               (i < 0 && j < std::numeric_limits<T>::min() - i);
  ------------------
  |  Branch (20:17): [True: 763, False: 250]
  |  Branch (20:26): [True: 540, False: 223]
  ------------------
   21|  1.13k|    }
   22|      0|    return std::numeric_limits<T>::max() - i < j;
   23|  1.13k|}
_Z10CheckedAddIiENSt3__18optionalIT_EES2_S2_:
   27|  1.13k|{
   28|  1.13k|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (28:9): [True: 664, False: 473]
  ------------------
   29|    664|        return std::nullopt;
   30|    664|    }
   31|    473|    return i + j;
   32|  1.13k|}
_Z13SaturatingAddIiET_S0_S0_:
   36|  1.13k|{
   37|  1.13k|    if constexpr (std::numeric_limits<T>::is_signed) {
   38|  1.13k|        if (i > 0 && j > std::numeric_limits<T>::max() - i) {
  ------------------
  |  Branch (38:13): [True: 368, False: 769]
  |  Branch (38:22): [True: 124, False: 244]
  ------------------
   39|    124|            return std::numeric_limits<T>::max();
   40|    124|        }
   41|  1.01k|        if (i < 0 && j < std::numeric_limits<T>::min() - i) {
  ------------------
  |  Branch (41:13): [True: 763, False: 250]
  |  Branch (41:22): [True: 540, False: 223]
  ------------------
   42|    540|            return std::numeric_limits<T>::min();
   43|    540|        }
   44|       |    } else {
   45|       |        if (std::numeric_limits<T>::max() - i < j) {
   46|       |            return std::numeric_limits<T>::max();
   47|       |        }
   48|       |    }
   49|    473|    return i + j;
   50|  1.13k|}
_Z16AdditionOverflowIjEbT_S0_:
   16|  1.13k|{
   17|  1.13k|    static_assert(std::is_integral<T>::value, "Integral required.");
   18|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   19|       |        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
   20|       |               (i < 0 && j < std::numeric_limits<T>::min() - i);
   21|       |    }
   22|  1.13k|    return std::numeric_limits<T>::max() - i < j;
   23|  1.13k|}
_Z10CheckedAddIjENSt3__18optionalIT_EES2_S2_:
   27|  1.13k|{
   28|  1.13k|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (28:9): [True: 200, False: 937]
  ------------------
   29|    200|        return std::nullopt;
   30|    200|    }
   31|    937|    return i + j;
   32|  1.13k|}
_Z13SaturatingAddIjET_S0_S0_:
   36|  1.13k|{
   37|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   38|       |        if (i > 0 && j > std::numeric_limits<T>::max() - i) {
   39|       |            return std::numeric_limits<T>::max();
   40|       |        }
   41|       |        if (i < 0 && j < std::numeric_limits<T>::min() - i) {
   42|       |            return std::numeric_limits<T>::min();
   43|       |        }
   44|  1.13k|    } else {
   45|  1.13k|        if (std::numeric_limits<T>::max() - i < j) {
  ------------------
  |  Branch (45:13): [True: 200, False: 937]
  ------------------
   46|    200|            return std::numeric_limits<T>::max();
   47|    200|        }
   48|  1.13k|    }
   49|    937|    return i + j;
   50|  1.13k|}
_Z16AdditionOverflowIsEbT_S0_:
   16|  1.13k|{
   17|  1.13k|    static_assert(std::is_integral<T>::value, "Integral required.");
   18|  1.13k|    if constexpr (std::numeric_limits<T>::is_signed) {
   19|  1.13k|        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
  ------------------
  |  Branch (19:17): [True: 419, False: 718]
  |  Branch (19:26): [True: 151, False: 268]
  ------------------
   20|  1.13k|               (i < 0 && j < std::numeric_limits<T>::min() - i);
  ------------------
  |  Branch (20:17): [True: 710, False: 276]
  |  Branch (20:26): [True: 380, False: 330]
  ------------------
   21|  1.13k|    }
   22|      0|    return std::numeric_limits<T>::max() - i < j;
   23|  1.13k|}
_Z10CheckedAddIsENSt3__18optionalIT_EES2_S2_:
   27|  1.13k|{
   28|  1.13k|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (28:9): [True: 531, False: 606]
  ------------------
   29|    531|        return std::nullopt;
   30|    531|    }
   31|    606|    return i + j;
   32|  1.13k|}
_Z13SaturatingAddIsET_S0_S0_:
   36|  1.13k|{
   37|  1.13k|    if constexpr (std::numeric_limits<T>::is_signed) {
   38|  1.13k|        if (i > 0 && j > std::numeric_limits<T>::max() - i) {
  ------------------
  |  Branch (38:13): [True: 419, False: 718]
  |  Branch (38:22): [True: 151, False: 268]
  ------------------
   39|    151|            return std::numeric_limits<T>::max();
   40|    151|        }
   41|    986|        if (i < 0 && j < std::numeric_limits<T>::min() - i) {
  ------------------
  |  Branch (41:13): [True: 710, False: 276]
  |  Branch (41:22): [True: 380, False: 330]
  ------------------
   42|    380|            return std::numeric_limits<T>::min();
   43|    380|        }
   44|       |    } else {
   45|       |        if (std::numeric_limits<T>::max() - i < j) {
   46|       |            return std::numeric_limits<T>::max();
   47|       |        }
   48|       |    }
   49|    606|    return i + j;
   50|  1.13k|}
_Z16AdditionOverflowItEbT_S0_:
   16|  1.13k|{
   17|  1.13k|    static_assert(std::is_integral<T>::value, "Integral required.");
   18|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   19|       |        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
   20|       |               (i < 0 && j < std::numeric_limits<T>::min() - i);
   21|       |    }
   22|  1.13k|    return std::numeric_limits<T>::max() - i < j;
   23|  1.13k|}
_Z10CheckedAddItENSt3__18optionalIT_EES2_S2_:
   27|  1.13k|{
   28|  1.13k|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (28:9): [True: 217, False: 920]
  ------------------
   29|    217|        return std::nullopt;
   30|    217|    }
   31|    920|    return i + j;
   32|  1.13k|}
_Z13SaturatingAddItET_S0_S0_:
   36|  1.13k|{
   37|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   38|       |        if (i > 0 && j > std::numeric_limits<T>::max() - i) {
   39|       |            return std::numeric_limits<T>::max();
   40|       |        }
   41|       |        if (i < 0 && j < std::numeric_limits<T>::min() - i) {
   42|       |            return std::numeric_limits<T>::min();
   43|       |        }
   44|  1.13k|    } else {
   45|  1.13k|        if (std::numeric_limits<T>::max() - i < j) {
  ------------------
  |  Branch (45:13): [True: 217, False: 920]
  ------------------
   46|    217|            return std::numeric_limits<T>::max();
   47|    217|        }
   48|  1.13k|    }
   49|    920|    return i + j;
   50|  1.13k|}
_Z16AdditionOverflowIhEbT_S0_:
   16|  1.13k|{
   17|  1.13k|    static_assert(std::is_integral<T>::value, "Integral required.");
   18|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   19|       |        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
   20|       |               (i < 0 && j < std::numeric_limits<T>::min() - i);
   21|       |    }
   22|  1.13k|    return std::numeric_limits<T>::max() - i < j;
   23|  1.13k|}
_Z10CheckedAddIhENSt3__18optionalIT_EES2_S2_:
   27|  1.13k|{
   28|  1.13k|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (28:9): [True: 251, False: 886]
  ------------------
   29|    251|        return std::nullopt;
   30|    251|    }
   31|    886|    return i + j;
   32|  1.13k|}
_Z13SaturatingAddIhET_S0_S0_:
   36|  1.13k|{
   37|       |    if constexpr (std::numeric_limits<T>::is_signed) {
   38|       |        if (i > 0 && j > std::numeric_limits<T>::max() - i) {
   39|       |            return std::numeric_limits<T>::max();
   40|       |        }
   41|       |        if (i < 0 && j < std::numeric_limits<T>::min() - i) {
   42|       |            return std::numeric_limits<T>::min();
   43|       |        }
   44|  1.13k|    } else {
   45|  1.13k|        if (std::numeric_limits<T>::max() - i < j) {
  ------------------
  |  Branch (45:13): [True: 251, False: 886]
  ------------------
   46|    251|            return std::numeric_limits<T>::max();
   47|    251|        }
   48|  1.13k|    }
   49|    886|    return i + j;
   50|  1.13k|}
_Z16AdditionOverflowIaEbT_S0_:
   16|  1.13k|{
   17|  1.13k|    static_assert(std::is_integral<T>::value, "Integral required.");
   18|  1.13k|    if constexpr (std::numeric_limits<T>::is_signed) {
   19|  1.13k|        return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
  ------------------
  |  Branch (19:17): [True: 454, False: 683]
  |  Branch (19:26): [True: 178, False: 276]
  ------------------
   20|  1.13k|               (i < 0 && j < std::numeric_limits<T>::min() - i);
  ------------------
  |  Branch (20:17): [True: 669, False: 290]
  |  Branch (20:26): [True: 356, False: 313]
  ------------------
   21|  1.13k|    }
   22|      0|    return std::numeric_limits<T>::max() - i < j;
   23|  1.13k|}
_Z10CheckedAddIaENSt3__18optionalIT_EES2_S2_:
   27|  1.13k|{
   28|  1.13k|    if (AdditionOverflow(i, j)) {
  ------------------
  |  Branch (28:9): [True: 534, False: 603]
  ------------------
   29|    534|        return std::nullopt;
   30|    534|    }
   31|    603|    return i + j;
   32|  1.13k|}
_Z13SaturatingAddIaET_S0_S0_:
   36|  1.13k|{
   37|  1.13k|    if constexpr (std::numeric_limits<T>::is_signed) {
   38|  1.13k|        if (i > 0 && j > std::numeric_limits<T>::max() - i) {
  ------------------
  |  Branch (38:13): [True: 454, False: 683]
  |  Branch (38:22): [True: 178, False: 276]
  ------------------
   39|    178|            return std::numeric_limits<T>::max();
   40|    178|        }
   41|    959|        if (i < 0 && j < std::numeric_limits<T>::min() - i) {
  ------------------
  |  Branch (41:13): [True: 669, False: 290]
  |  Branch (41:22): [True: 356, False: 313]
  ------------------
   42|    356|            return std::numeric_limits<T>::min();
   43|    356|        }
   44|       |    } else {
   45|       |        if (std::numeric_limits<T>::max() - i < j) {
   46|       |            return std::numeric_limits<T>::max();
   47|       |        }
   48|       |    }
   49|    603|    return i + j;
   50|  1.13k|}
_Z19SaturatingLeftShiftITkNSt3__18integralEaET_S1_j:
   79|  1.13k|{
   80|  1.13k|    if (auto result{CheckedLeftShift(input, shift)}) return *result;
  ------------------
  |  Branch (80:14): [True: 287, False: 850]
  ------------------
   81|       |    // If input << shift is too big to fit in T, return biggest positive or negative
   82|       |    // number that fits.
   83|    850|    return input < 0 ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max();
  ------------------
  |  Branch (83:12): [True: 500, False: 350]
  ------------------
   84|  1.13k|}
_Z16CheckedLeftShiftITkNSt3__18integralEaENS0_8optionalIT_EES2_j:
   60|  2.27k|{
   61|  2.27k|    if (shift == 0 || input == 0) return input;
  ------------------
  |  Branch (61:9): [True: 502, False: 1.77k]
  |  Branch (61:23): [True: 18, False: 1.75k]
  ------------------
   62|       |    // Avoid undefined c++ behaviour if shift is >= number of bits in T.
   63|  1.75k|    if (shift >= sizeof(T) * CHAR_BIT) return std::nullopt;
  ------------------
  |  Branch (63:9): [True: 1.46k, False: 286]
  ------------------
   64|       |    // If input << shift is too big to fit in T, return nullopt.
   65|    286|    if (input > (std::numeric_limits<T>::max() >> shift)) return std::nullopt;
  ------------------
  |  Branch (65:9): [True: 102, False: 184]
  ------------------
   66|    184|    if (input < (std::numeric_limits<T>::min() >> shift)) return std::nullopt;
  ------------------
  |  Branch (66:9): [True: 130, False: 54]
  ------------------
   67|     54|    return input << shift;
   68|    184|}
_Z19SaturatingLeftShiftITkNSt3__18integralEsET_S1_j:
   79|  1.13k|{
   80|  1.13k|    if (auto result{CheckedLeftShift(input, shift)}) return *result;
  ------------------
  |  Branch (80:14): [True: 433, False: 704]
  ------------------
   81|       |    // If input << shift is too big to fit in T, return biggest positive or negative
   82|       |    // number that fits.
   83|    704|    return input < 0 ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max();
  ------------------
  |  Branch (83:12): [True: 423, False: 281]
  ------------------
   84|  1.13k|}
_Z16CheckedLeftShiftITkNSt3__18integralEsENS0_8optionalIT_EES2_j:
   60|  2.27k|{
   61|  2.27k|    if (shift == 0 || input == 0) return input;
  ------------------
  |  Branch (61:9): [True: 772, False: 1.50k]
  |  Branch (61:23): [True: 14, False: 1.48k]
  ------------------
   62|       |    // Avoid undefined c++ behaviour if shift is >= number of bits in T.
   63|  1.48k|    if (shift >= sizeof(T) * CHAR_BIT) return std::nullopt;
  ------------------
  |  Branch (63:9): [True: 712, False: 776]
  ------------------
   64|       |    // If input << shift is too big to fit in T, return nullopt.
   65|    776|    if (input > (std::numeric_limits<T>::max() >> shift)) return std::nullopt;
  ------------------
  |  Branch (65:9): [True: 302, False: 474]
  ------------------
   66|    474|    if (input < (std::numeric_limits<T>::min() >> shift)) return std::nullopt;
  ------------------
  |  Branch (66:9): [True: 394, False: 80]
  ------------------
   67|     80|    return input << shift;
   68|    474|}
_Z19SaturatingLeftShiftITkNSt3__18integralEiET_S1_j:
   79|  1.13k|{
   80|  1.13k|    if (auto result{CheckedLeftShift(input, shift)}) return *result;
  ------------------
  |  Branch (80:14): [True: 646, False: 491]
  ------------------
   81|       |    // If input << shift is too big to fit in T, return biggest positive or negative
   82|       |    // number that fits.
   83|    491|    return input < 0 ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max();
  ------------------
  |  Branch (83:12): [True: 258, False: 233]
  ------------------
   84|  1.13k|}
_Z16CheckedLeftShiftITkNSt3__18integralEiENS0_8optionalIT_EES2_j:
   60|  2.27k|{
   61|  2.27k|    if (shift == 0 || input == 0) return input;
  ------------------
  |  Branch (61:9): [True: 1.23k, False: 1.04k]
  |  Branch (61:23): [True: 8, False: 1.03k]
  ------------------
   62|       |    // Avoid undefined c++ behaviour if shift is >= number of bits in T.
   63|  1.03k|    if (shift >= sizeof(T) * CHAR_BIT) return std::nullopt;
  ------------------
  |  Branch (63:9): [True: 44, False: 990]
  ------------------
   64|       |    // If input << shift is too big to fit in T, return nullopt.
   65|    990|    if (input > (std::numeric_limits<T>::max() >> shift)) return std::nullopt;
  ------------------
  |  Branch (65:9): [True: 448, False: 542]
  ------------------
   66|    542|    if (input < (std::numeric_limits<T>::min() >> shift)) return std::nullopt;
  ------------------
  |  Branch (66:9): [True: 490, False: 52]
  ------------------
   67|     52|    return input << shift;
   68|    542|}
_Z19SaturatingLeftShiftITkNSt3__18integralEhET_S1_j:
   79|  1.13k|{
   80|  1.13k|    if (auto result{CheckedLeftShift(input, shift)}) return *result;
  ------------------
  |  Branch (80:14): [True: 788, False: 349]
  ------------------
   81|       |    // If input << shift is too big to fit in T, return biggest positive or negative
   82|       |    // number that fits.
   83|    349|    return input < 0 ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max();
  ------------------
  |  Branch (83:12): [True: 0, False: 349]
  ------------------
   84|  1.13k|}
_Z16CheckedLeftShiftITkNSt3__18integralEhENS0_8optionalIT_EES2_j:
   60|  2.27k|{
   61|  2.27k|    if (shift == 0 || input == 0) return input;
  ------------------
  |  Branch (61:9): [True: 1.45k, False: 818]
  |  Branch (61:23): [True: 74, False: 744]
  ------------------
   62|       |    // Avoid undefined c++ behaviour if shift is >= number of bits in T.
   63|    744|    if (shift >= sizeof(T) * CHAR_BIT) return std::nullopt;
  ------------------
  |  Branch (63:9): [True: 584, False: 160]
  ------------------
   64|       |    // If input << shift is too big to fit in T, return nullopt.
   65|    160|    if (input > (std::numeric_limits<T>::max() >> shift)) return std::nullopt;
  ------------------
  |  Branch (65:9): [True: 114, False: 46]
  ------------------
   66|     46|    if (input < (std::numeric_limits<T>::min() >> shift)) return std::nullopt;
  ------------------
  |  Branch (66:9): [True: 0, False: 46]
  ------------------
   67|     46|    return input << shift;
   68|     46|}
_Z19SaturatingLeftShiftITkNSt3__18integralEtET_S1_j:
   79|  1.13k|{
   80|  1.13k|    if (auto result{CheckedLeftShift(input, shift)}) return *result;
  ------------------
  |  Branch (80:14): [True: 796, False: 341]
  ------------------
   81|       |    // If input << shift is too big to fit in T, return biggest positive or negative
   82|       |    // number that fits.
   83|    341|    return input < 0 ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max();
  ------------------
  |  Branch (83:12): [True: 0, False: 341]
  ------------------
   84|  1.13k|}
_Z16CheckedLeftShiftITkNSt3__18integralEtENS0_8optionalIT_EES2_j:
   60|  2.27k|{
   61|  2.27k|    if (shift == 0 || input == 0) return input;
  ------------------
  |  Branch (61:9): [True: 1.49k, False: 776]
  |  Branch (61:23): [True: 26, False: 750]
  ------------------
   62|       |    // Avoid undefined c++ behaviour if shift is >= number of bits in T.
   63|    750|    if (shift >= sizeof(T) * CHAR_BIT) return std::nullopt;
  ------------------
  |  Branch (63:9): [True: 402, False: 348]
  ------------------
   64|       |    // If input << shift is too big to fit in T, return nullopt.
   65|    348|    if (input > (std::numeric_limits<T>::max() >> shift)) return std::nullopt;
  ------------------
  |  Branch (65:9): [True: 280, False: 68]
  ------------------
   66|     68|    if (input < (std::numeric_limits<T>::min() >> shift)) return std::nullopt;
  ------------------
  |  Branch (66:9): [True: 0, False: 68]
  ------------------
   67|     68|    return input << shift;
   68|     68|}
_Z19SaturatingLeftShiftITkNSt3__18integralEjET_S1_j:
   79|  1.13k|{
   80|  1.13k|    if (auto result{CheckedLeftShift(input, shift)}) return *result;
  ------------------
  |  Branch (80:14): [True: 863, False: 274]
  ------------------
   81|       |    // If input << shift is too big to fit in T, return biggest positive or negative
   82|       |    // number that fits.
   83|    274|    return input < 0 ? std::numeric_limits<T>::min() : std::numeric_limits<T>::max();
  ------------------
  |  Branch (83:12): [True: 0, False: 274]
  ------------------
   84|  1.13k|}
_Z16CheckedLeftShiftITkNSt3__18integralEjENS0_8optionalIT_EES2_j:
   60|  2.27k|{
   61|  2.27k|    if (shift == 0 || input == 0) return input;
  ------------------
  |  Branch (61:9): [True: 1.68k, False: 590]
  |  Branch (61:23): [True: 8, False: 582]
  ------------------
   62|       |    // Avoid undefined c++ behaviour if shift is >= number of bits in T.
   63|    582|    if (shift >= sizeof(T) * CHAR_BIT) return std::nullopt;
  ------------------
  |  Branch (63:9): [True: 84, False: 498]
  ------------------
   64|       |    // If input << shift is too big to fit in T, return nullopt.
   65|    498|    if (input > (std::numeric_limits<T>::max() >> shift)) return std::nullopt;
  ------------------
  |  Branch (65:9): [True: 464, False: 34]
  ------------------
   66|     34|    if (input < (std::numeric_limits<T>::min() >> shift)) return std::nullopt;
  ------------------
  |  Branch (66:9): [True: 0, False: 34]
  ------------------
   67|     34|    return input << shift;
   68|     34|}

_Z11SetMockTimeNSt3__16chrono8durationIxNS_5ratioILl1ELl1EEEEE:
   42|  1.13k|{
   43|  1.13k|    Assert(mock_time_in >= 0s);
  ------------------
  |  |   85|  1.13k|#define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
  ------------------
   44|  1.13k|    g_mock_time.store(mock_time_in, std::memory_order_relaxed);
   45|  1.13k|}

